diff --git a/designer/533.async.js b/designer/971.async.js similarity index 59% rename from designer/533.async.js rename to designer/971.async.js index 602f1a3..9b7d82b 100644 --- a/designer/533.async.js +++ b/designer/971.async.js @@ -1,4 +1,4 @@ -(self.webpackChunkplayground=self.webpackChunkplayground||[]).push([[533],{84089:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(1413),i=n(97685),s=n(4942),o=n(45987),a=n(87363),l=n(93967),c=n.n(l),u=n(63017),p=n(5379),d=["icon","className","onClick","style","primaryColor","secondaryColor"],f={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var h=function(e){var t=e.icon,n=e.className,i=e.onClick,s=e.style,a=e.primaryColor,l=e.secondaryColor,c=(0,o.Z)(e,d),u=f;if(a&&(u={primaryColor:a,secondaryColor:l||(0,p.pw)(a)}),(0,p.C3)(),(0,p.Kp)((0,p.r)(t),"icon should be icon definiton, but got ".concat(t)),!(0,p.r)(t))return null;var h=t;return h&&"function"==typeof h.icon&&(h=(0,r.Z)((0,r.Z)({},h),{},{icon:h.icon(u.primaryColor,u.secondaryColor)})),(0,p.R_)(h.icon,"svg-".concat(h.name),(0,r.Z)({className:n,onClick:i,style:s,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c))};h.displayName="IconReact",h.getTwoToneColors=function(){return(0,r.Z)({},f)},h.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;f.primaryColor=t,f.secondaryColor=n||(0,p.pw)(t),f.calculated=!!n};var m=h;function g(e){var t=(0,p.H9)(e),n=(0,i.Z)(t,2),r=n[0],s=n[1];return m.setTwoToneColors({primaryColor:r,secondaryColor:s})}var y=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g("#1890ff");var _=a.forwardRef((function(e,t){var n,l=e.className,d=e.icon,f=e.spin,h=e.rotate,g=e.tabIndex,_=e.onClick,b=e.twoToneColor,v=(0,o.Z)(e,y),E=a.useContext(u.Z),x=E.prefixCls,S=void 0===x?"anticon":x,O=E.rootClassName,T=c()(O,S,(n={},(0,s.Z)(n,"".concat(S,"-").concat(d.name),!!d.name),(0,s.Z)(n,"".concat(S,"-spin"),!!f||"loading"===d.name),n),l),w=g;void 0===w&&_&&(w=-1);var C=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,A=(0,p.H9)(b),P=(0,i.Z)(A,2),k=P[0],D=P[1];return a.createElement("span",(0,r.Z)((0,r.Z)({role:"img","aria-label":d.name},v),{},{ref:t,tabIndex:w,onClick:_,className:T}),a.createElement(m,{icon:d,primaryColor:k,secondaryColor:D,style:C}))}));_.displayName="AntdIcon",_.getTwoToneColor=function(){var e=m.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},_.setTwoToneColor=g;var b=_},63017:function(e,t,n){"use strict";var r=n(87363),i=(0,r.createContext)({});t.Z=i},16165:function(e,t,n){"use strict";var r=n(1413),i=n(4942),s=n(45987),o=n(87363),a=n(93967),l=n.n(a),c=n(63017),u=n(5379),p=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],d=o.forwardRef((function(e,t){var n=e.className,a=e.component,d=e.viewBox,f=e.spin,h=e.rotate,m=e.tabIndex,g=e.onClick,y=e.children,_=(0,s.Z)(e,p);(0,u.Kp)(Boolean(a||y),"Should have `component` prop or `children`."),(0,u.C3)();var b=o.useContext(c.Z),v=b.prefixCls,E=void 0===v?"anticon":v,x=b.rootClassName,S=l()(x,E,n),O=l()((0,i.Z)({},"".concat(E,"-spin"),!!f)),T=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,w=(0,r.Z)((0,r.Z)({},u.vD),{},{className:O,style:T,viewBox:d});d||delete w.viewBox;var C=m;return void 0===C&&g&&(C=-1),o.createElement("span",(0,r.Z)((0,r.Z)({role:"img"},_),{},{ref:t,tabIndex:C,onClick:g,className:S}),a?o.createElement(a,(0,r.Z)({},w),y):y?((0,u.Kp)(Boolean(d)||1===o.Children.count(y)&&o.isValidElement(y)&&"use"===o.Children.only(y).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),o.createElement("svg",(0,r.Z)((0,r.Z)({},w),{},{viewBox:d}),y)):null)}));d.displayName="AntdIcon",t.Z=d},91321:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(1413),i=n(45987),s=n(87363),o=n(16165),a=["type","children"],l=new Set;function c(e){return Boolean("string"==typeof e&&e.length&&!l.has(e))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e[t];if(c(n)){var r=document.createElement("script");r.setAttribute("src",n),r.setAttribute("data-namespace",n),e.length>t+1&&(r.onload=function(){u(e,t+1)},r.onerror=function(){u(e,t+1)}),l.add(n),document.body.appendChild(r)}}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,l=void 0===n?{}:n;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?u(t.reverse()):u([t]));var c=s.forwardRef((function(e,t){var n=e.type,c=e.children,u=(0,i.Z)(e,a),p=null;return e.type&&(p=s.createElement("use",{xlinkHref:"#".concat(n)})),c&&(p=c),s.createElement(o.Z,(0,r.Z)((0,r.Z)((0,r.Z)({},l),u),{},{ref:t}),p)}));return c.displayName="Iconfont",c}},56466:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="AppstoreAddOutlined";var l=i.forwardRef(a)},65184:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="BranchesOutlined";var l=i.forwardRef(a)},50067:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"}}]},name:"build",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="BuildOutlined";var l=i.forwardRef(a)},40717:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"cluster",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="ClusterOutlined";var l=i.forwardRef(a)},10620:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M841 370c3-3.3 2.7-8.3-.6-11.3a8.24 8.24 0 00-5.3-2.1h-72.6c-2.4 0-4.6 1-6.1 2.8L633.5 504.6a7.96 7.96 0 01-13.4-1.9l-63.5-141.3a7.9 7.9 0 00-7.3-4.7H380.7l.9-4.7 8-42.3c10.5-55.4 38-81.4 85.8-81.4 18.6 0 35.5 1.7 48.8 4.7l14.1-66.8c-22.6-4.7-35.2-6.1-54.9-6.1-103.3 0-156.4 44.3-175.9 147.3l-9.4 49.4h-97.6c-3.8 0-7.1 2.7-7.8 6.4L181.9 415a8.07 8.07 0 007.8 9.7H284l-89 429.9a8.07 8.07 0 007.8 9.7H269c3.8 0 7.1-2.7 7.8-6.4l89.7-433.1h135.8l68.2 139.1c1.4 2.9 1 6.4-1.2 8.8l-180.6 203c-2.9 3.3-2.6 8.4.7 11.3 1.5 1.3 3.4 2 5.3 2h72.7c2.4 0 4.6-1 6.1-2.8l123.7-146.7c2.8-3.4 7.9-3.8 11.3-1 .9.8 1.6 1.7 2.1 2.8L676.4 784c1.3 2.8 4.1 4.7 7.3 4.7h64.6a8.02 8.02 0 007.2-11.5l-95.2-198.9c-1.4-2.9-.9-6.4 1.3-8.8L841 370z"}}]},name:"function",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="FunctionOutlined";var l=i.forwardRef(a)},60532:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="MenuOutlined";var l=i.forwardRef(a)},5379:function(e,t,n){"use strict";n.d(t,{R_:function(){return re},pw:function(){return ie},r:function(){return te},H9:function(){return se},vD:function(){return oe},C3:function(){return le},Kp:function(){return ee}});var r=n(1413),i=n(71002);function s(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return e<=1?"".concat(100*Number(e),"%"):e}function a(e){return 1===e.length?"0"+e:String(e)}function l(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function c(e){return u(e)/255}function u(e){return parseInt(e,16)}var p={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function d(e){var t,n,r,i={r:0,g:0,b:0},a=1,d=null,f=null,h=null,m=!1,_=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(p[e])e=p[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=g.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=g.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=g.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=g.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=g.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=g.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=g.hex8.exec(e),n)return{r:u(n[1]),g:u(n[2]),b:u(n[3]),a:c(n[4]),format:t?"name":"hex8"};if(n=g.hex6.exec(e),n)return{r:u(n[1]),g:u(n[2]),b:u(n[3]),format:t?"name":"hex"};if(n=g.hex4.exec(e),n)return{r:u(n[1]+n[1]),g:u(n[2]+n[2]),b:u(n[3]+n[3]),a:c(n[4]+n[4]),format:t?"name":"hex8"};if(n=g.hex3.exec(e),n)return{r:u(n[1]+n[1]),g:u(n[2]+n[2]),b:u(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(y(e.r)&&y(e.g)&&y(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*s(t,255),g:255*s(n,255),b:255*s(r,255)},m=!0,_="%"===String(e.r).substr(-1)?"prgb":"rgb"):y(e.h)&&y(e.s)&&y(e.v)?(d=o(e.s),f=o(e.v),i=function(e,t,n){e=6*s(e,360),t=s(t,100),n=s(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),l=n*(1-(1-i)*t),c=r%6;return{r:255*[n,a,o,o,l,n][c],g:255*[l,n,n,a,o,o][c],b:255*[o,o,l,n,n,a][c]}}(e.h,d,f),m=!0,_="hsv"):y(e.h)&&y(e.s)&&y(e.l)&&(d=o(e.s),h=o(e.l),i=function(e,t,n){var r,i,o;if(e=s(e,360),t=s(t,100),n=s(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=l(c,a,e+1/3),i=l(c,a,e),o=l(c,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,d,h),m=!0,_="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(a=e.a)),a=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(a),{ok:m,format:e.format||_,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:a}}var f="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),h="[\\s|\\(]+(".concat(f,")[,|\\s]+(").concat(f,")[,|\\s]+(").concat(f,")\\s*\\)?"),m="[\\s|\\(]+(".concat(f,")[,|\\s]+(").concat(f,")[,|\\s]+(").concat(f,")[,|\\s]+(").concat(f,")\\s*\\)?"),g={CSS_UNIT:new RegExp(f),rgb:new RegExp("rgb"+h),rgba:new RegExp("rgba"+m),hsl:new RegExp("hsl"+h),hsla:new RegExp("hsla"+m),hsv:new RegExp("hsv"+h),hsva:new RegExp("hsva"+m),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function y(e){return Boolean(g.CSS_UNIT.exec(String(e)))}var _=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function b(e){var t=function(e,t,n){e=s(e,255),t=s(t,255),n=s(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,l=r-i,c=0===r?0:l/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/l+(t=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function S(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function O(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function T(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=d(e),i=5;i>0;i-=1){var s=b(r),o=v(d({h:x(s,i,!0),s:S(s,i,!0),v:O(s,i,!0)}));n.push(o)}n.push(v(r));for(var a=1;a<=4;a+=1){var l=b(r),c=v(d({h:x(l,a),s:S(l,a),v:O(l,a)}));n.push(c)}return"dark"===t.theme?_.map((function(e){var r=e.index,i=e.opacity;return v(E(d(t.backgroundColor||"#141414"),d(n[r]),100*i))})):n}var w={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},C={},A={};Object.keys(w).forEach((function(e){C[e]=T(w[e]),C[e].primary=C[e][5],A[e]=T(w[e],{theme:"dark",backgroundColor:"#141414"}),A[e].primary=A[e][5]}));C.red,C.volcano,C.gold,C.orange,C.yellow,C.lime,C.green,C.cyan,C.blue,C.geekblue,C.purple,C.magenta,C.grey;var P=n(87363),k=n.n(P),D={},R=[];function I(e,t){}function L(e,t){}function B(e,t,n){t||D[n]||(e(!1,n),D[n]=!0)}function M(e,t){B(I,e,t)}M.preMessage=function(e){R.push(e)},M.resetWarned=function(){D={}},M.noteOnce=function(e,t){B(L,e,t)};var j=M;function N(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var F="data-rc-order",U="data-rc-priority",V="rc-util-key",K=new Map;function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):V}function $(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function q(e){return"queue"===e?"prependQueue":e?"prepend":"append"}function Q(e){return Array.from((K.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!N())return null;var n=t.csp,r=t.prepend,i=t.priority,s=void 0===i?0:i,o=q(r),a="prependQueue"===o,l=document.createElement("style");l.setAttribute(F,o),a&&s&&l.setAttribute(U,"".concat(s)),null!=n&&n.nonce&&(l.nonce=null==n?void 0:n.nonce),l.innerHTML=e;var c=$(t),u=c.firstChild;if(r){if(a){var p=Q(c).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(F)))return!1;var t=Number(e.getAttribute(U)||0);return s>=t}));if(p.length)return c.insertBefore(l,p[p.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=$(t);return Q(n).find((function(n){return n.getAttribute(W(t))===e}))}function G(e,t){var n=K.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=z("",t),i=r.parentNode;K.set(e,i),e.removeChild(r)}}function Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=$(n);G(r,n);var i=X(t,n);if(i){var s,o,a;if(null!==(s=n.csp)&&void 0!==s&&s.nonce&&i.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce))i.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return i.innerHTML!==e&&(i.innerHTML=e),i}var l=z(e,n);return l.setAttribute(W(n),t),l}var Y=n(63017),H=n(68929),J=n.n(H);function ee(e,t){j(e,"[@ant-design/icons] ".concat(t))}function te(e){return"object"===(0,i.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,i.Z)(e.icon)||"function"==typeof e.icon)}function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[J()(n)]=r;return t}),{})}function re(e,t,n){return n?k().createElement(e.tag,(0,r.Z)((0,r.Z)({key:t},ne(e.attrs)),n),(e.children||[]).map((function(n,r){return re(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):k().createElement(e.tag,(0,r.Z)({key:t},ne(e.attrs)),(e.children||[]).map((function(n,r){return re(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function ie(e){return T(e)[0]}function se(e){return e?Array.isArray(e)?e:[e]:[]}var oe={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ae="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae,t=(0,P.useContext)(Y.Z),n=t.csp;(0,P.useEffect)((function(){Z(e,"@ant-design-icons",{prepend:!0,csp:n})}),[])}},70597:function(e,t,n){"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:s,height:l},u)},p),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},43891:function(e,t,n){"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:s,height:l},u)},p),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},92509:function(e,t,n){!function(e,t,n,r){"use strict";const i=0,s=1,o=2,a=3,l=4,c=-1;let u;e.addSegment=void 0,e.addMapping=void 0,e.maybeAddSegment=void 0,e.maybeAddMapping=void 0,e.setSourceContent=void 0,e.toDecodedMap=void 0,e.toEncodedMap=void 0,e.fromMap=void 0,e.allMappings=void 0;class p{constructor({file:e,sourceRoot:n}={}){this._names=new t.SetArray,this._sources=new t.SetArray,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n}}function d(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function f(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][i]);n=r--);return n}function h(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function m(e){const{length:t}=e;let n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);nu(!1,e,t,n,r,i,s,o,a),e.maybeAddSegment=(e,t,n,r,i,s,o,a)=>u(!0,e,t,n,r,i,s,o,a),e.addMapping=(e,t)=>b(!1,e,t),e.maybeAddMapping=(e,t)=>b(!0,e,t),e.setSourceContent=(e,n,r)=>{const{_sources:i,_sourcesContent:s}=e;s[t.put(i,n)]=r},e.toDecodedMap=e=>{const{file:t,sourceRoot:n,_mappings:r,_sources:i,_sourcesContent:s,_names:o}=e;return m(r),{version:3,file:t||void 0,names:o.array,sourceRoot:n||void 0,sources:i.array,sourcesContent:s,mappings:r}},e.toEncodedMap=t=>{const r=e.toDecodedMap(t);return Object.assign(Object.assign({},r),{mappings:n.encode(r.mappings)})},e.allMappings=e=>{const t=[],{_mappings:n,_sources:r,_names:c}=e;for(let e=0;e{const t=new r.TraceMap(e),n=new p({file:t.file,sourceRoot:t.sourceRoot});return g(n._names,t.names),g(n._sources,t.sources),n._sourcesContent=t.sourcesContent||t.sources.map((()=>null)),n._mappings=r.decodedMappings(t),n},u=(e,n,r,i,s,o,a,l,u)=>{const{_mappings:p,_sources:m,_sourcesContent:g,_names:b}=n,v=d(p,r),E=f(v,i);if(!s){if(e&&y(v,E))return;return h(v,E,[i])}const x=t.put(m,s),S=l?t.put(b,l):c;if(x===g.length&&(g[x]=null!=u?u:null),!e||!_(v,E,x,o,a,S))return h(v,E,l?[i,x,o,a,S]:[i,x,o,a])},e.GenMapping=p,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(22208),n(92297),n(83446))},48435:function(e){e.exports=function(){"use strict";const e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var r;function i(t){return e.test(t)}function s(e){return e.startsWith("//")}function o(e){return e.startsWith("/")}function a(e){return e.startsWith("file:")}function l(e){return/^[.?#]/.test(e)}function c(e){const n=t.exec(e);return p(n[1],n[2]||"",n[3],n[4]||"",n[5]||"/",n[6]||"",n[7]||"")}function u(e){const t=n.exec(e),r=t[2];return p("file:","",t[1]||"","",o(r)?r:"/"+r,t[3]||"",t[4]||"")}function p(e,t,n,i,s,o,a){return{scheme:e,user:t,host:n,port:i,path:s,query:o,hash:a,type:r.Absolute}}function d(e){if(s(e)){const t=c("http:"+e);return t.scheme="",t.type=r.SchemeRelative,t}if(o(e)){const t=c("http://foo.com"+e);return t.scheme="",t.host="",t.type=r.AbsolutePath,t}if(a(e))return u(e);if(i(e))return c(e);const t=c("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?r.Query:e.startsWith("#")?r.Hash:r.RelativePath:r.Empty,t}function f(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}function h(e,t){m(t,t.type),"/"===e.path?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){const n=t<=r.RelativePath,i=e.path.split("/");let s=1,o=0,a=!1;for(let e=1;ei&&(i=s)}m(n,i);const s=n.query+n.hash;switch(i){case r.Hash:case r.Query:return s;case r.RelativePath:{const r=n.path.slice(1);return r?l(t||e)&&!l(r)?"./"+r+s:r+s:s||"."}case r.AbsolutePath:return n.path+s;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+s}}return function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"}(r||(r={})),g}()},22208:function(e,t){!function(e){"use strict";e.get=void 0,e.put=void 0,e.pop=void 0;class t{constructor(){this._indexes={__proto__:null},this.array=[]}}e.get=(e,t)=>e._indexes[t],e.put=(t,n)=>{const r=e.get(t,n);if(void 0!==r)return r;const{array:i,_indexes:s}=t;return s[n]=i.push(n)-1},e.pop=e=>{const{array:t,_indexes:n}=e;0!==t.length&&(n[t.pop()]=void 0)},e.SetArray=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)},92297:function(e,t,n){var r=n(48764).lW;!function(e){"use strict";const t=",".charCodeAt(0),n=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),o=new Uint8Array(128);for(let e=0;e>>=1,l&&(i=-2147483648|-i),n[r]+=i,t}function p(e,n,r){return!(n>=r)&&e.charCodeAt(n)!==t}function d(e){e.sort(f)}function f(e,t){return e[0]-t[0]}function h(e){const r=new Int32Array(5),i=16384,s=i-36,o=new Uint8Array(i),l=o.subarray(0,s);let c=0,u="";for(let p=0;p0&&(c===i&&(u+=a.decode(o),c=0),o[c++]=n),0!==d.length){r[0]=0;for(let e=0;es&&(u+=a.decode(l),o.copyWithin(0,s,c),c-=s),e>0&&(o[c++]=t),c=m(o,c,r,n,0),1!==n.length&&(c=m(o,c,r,n,1),c=m(o,c,r,n,2),c=m(o,c,r,n,3),4!==n.length&&(c=m(o,c,r,n,4)))}}}return u+a.decode(o.subarray(0,c))}function m(e,t,n,r,i){const o=r[i];let a=o-n[i];n[i]=o,a=a<0?-a<<1|1:a<<1;do{let n=31&a;a>>>=5,a>0&&(n|=32),e[t++]=s[n]}while(a>0);return t}e.decode=l,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}(t)},83446:function(e,t,n){!function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(n);function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),i.default(e,t)}function o(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}const a=0,l=1,c=2,u=3,p=4,d=1,f=2;function h(e,t){const n=m(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r>1),s=e[i][a]-t;if(0===s)return b=!0,i;s<0?n=i+1:r=i-1}return b=!1,n-1}function E(e,t,n){for(let r=n+1;r=0&&e[r][a]===t;n=r--);return n}function S(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function O(e,t,n,r){const{lastKey:i,lastNeedle:s,lastIndex:o}=n;let l=0,c=e.length-1;if(r===i){if(t===s)return b=-1!==o&&e[o][a]===t,o;t>=s?l=-1===o?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=v(e,t,l,c)}function T(e,t){const n=t.map(C);for(let r=0;rt;n--)e[n]=e[n-1];e[t]=n}function C(){return{__proto__:null}}const A=function(t,n){const r="string"==typeof t?JSON.parse(t):t;if(!("sections"in r))return new j(r,n);const i=[],s=[],o=[],a=[];P(r,n,i,s,o,a,0,0,1/0,1/0);const l={version:3,file:r.file,names:a,sources:s,sourcesContent:o,mappings:i};return e.presortedDecodedMap(l)};function P(e,t,n,r,i,s,o,a,l,c){const{sections:u}=e;for(let e=0;eh)return;const n=R(r,t),i=0===e?f:0,s=b[e];for(let e=0;e=m)return;if(1===r.length){n.push([o]);continue}const d=y+r[l],f=r[c],g=r[u];n.push(4===r.length?[o,d,f,g]:[o,d,f,g,_+r[p]])}}}function D(e,t){for(let n=0;ns(e||"",d)));const{mappings:f}=r;"string"==typeof f?(this._encoded=f,this._decoded=void 0):(this._encoded=void 0,this._decoded=h(f,n)),this._decodedMemo=S(),this._bySources=void 0,this._bySourceMemos=void 0}}function N(e,t){return{version:e.version,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t}}function F(e,t,n,r){return{source:e,line:t,column:n,name:r}}function U(e,t){return{line:e,column:t}}function V(e,t,n,r,i){let s=O(e,r,t,n);return b?s=(i===B?E:x)(e,r,s):i===B&&s++,-1===s||s===e.length?-1:s}function K(e,t,n,r,i){let s=V(e,t,n,r,M);if(b||i!==B||s++,-1===s||s===e.length)return[];const o=b?r:e[s][a];b||(s=x(e,o,s));const l=E(e,o,s),c=[];for(;s<=l;s++){const t=e[s];c.push(U(t[d]+1,t[f]))}return c}(()=>{function n(t,n,r,i,s,o){if(--r<0)throw new Error(I);if(i<0)throw new Error(L);const{sources:a,resolvedSources:l}=t;let c=a.indexOf(n);if(-1===c&&(c=l.indexOf(n)),-1===c)return o?[]:U(null,null);const u=(t._bySources||(t._bySources=T(e.decodedMappings(t),t._bySourceMemos=a.map(S))))[c][r];if(null==u)return o?[]:U(null,null);const p=t._bySourceMemos[c];if(o)return K(u,p,r,i,s);const h=V(u,p,r,i,s);if(-1===h)return U(null,null);const m=u[h];return U(m[d]+1,m[f])}e.encodedMappings=e=>{var n;return null!==(n=e._encoded)&&void 0!==n?n:e._encoded=t.encode(e._decoded)},e.decodedMappings=e=>e._decoded||(e._decoded=t.decode(e._encoded)),e.traceSegment=(t,n,r)=>{const i=e.decodedMappings(t);if(n>=i.length)return null;const s=i[n],o=V(s,t._decodedMemo,n,r,M);return-1===o?null:s[o]},e.originalPositionFor=(t,{line:n,column:r,bias:i})=>{if(--n<0)throw new Error(I);if(r<0)throw new Error(L);const s=e.decodedMappings(t);if(n>=s.length)return F(null,null,null,null);const o=s[n],a=V(o,t._decodedMemo,n,r,i||M);if(-1===a)return F(null,null,null,null);const d=o[a];if(1===d.length)return F(null,null,null,null);const{names:f,resolvedSources:h}=t;return F(h[d[l]],d[c]+1,d[u],5===d.length?f[d[p]]:null)},e.allGeneratedPositionsFor=(e,{source:t,line:r,column:i,bias:s})=>n(e,t,r,i,s||B,!0),e.generatedPositionFor=(e,{source:t,line:r,column:i,bias:s})=>n(e,t,r,i,s||M,!1),e.eachMapping=(t,n)=>{const r=e.decodedMappings(t),{names:i,resolvedSources:s}=t;for(let e=0;e{const{sources:n,resolvedSources:r,sourcesContent:i}=e;if(null==i)return null;let s=n.indexOf(t);return-1===s&&(s=r.indexOf(t)),-1===s?null:i[s]},e.presortedDecodedMap=(e,t)=>{const n=new j(N(e,[]),t);return n._decoded=e.mappings,n},e.decodedMap=t=>N(t,e.decodedMappings(t)),e.encodedMap=t=>N(t,e.encodedMappings(t))})(),e.AnyMap=A,e.GREATEST_LOWER_BOUND=M,e.LEAST_UPPER_BOUND=B,e.TraceMap=j,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(92297),n(48435))},26898:function(e,t,n){"use strict";n.d(t,{qt:function(){return ye},Tv:function(){return i},j$:function(){return Me},r:function(){return Fe},gW:function(){return B},Ab:function(){return M},Lx:function(){return I},BB:function(){return de}});class r{constructor(e){this.workspace=e.workspace,this.designer=e.designer}}var i,s=n(68949),o=n(29122),a=n(8521),l=n(23011),c=n(37487),u=n(27848),p=n(86067),d=n(94612);function f(e){const t=e.split("/");let n=t[t.length-1];return n=n.split(".")[0],(0,a.eV)(n)}function h(e,t,n=""){e.startsWith("/")&&(e=e.substring(1));const r=e.replaceAll("/:","@").split("/").join("-");return t.endsWith("/")||(t=`${t}/`),`${t}${r}${n}`}!function(e){e.Module="module",e.StoreEntryModule="storeEntryModule",e.RouteModule="routeModule",e.ServiceModule="serviceModule",e.StoreModule="storeModule",e.ComponentPrototypeModule="componentPrototypeModule",e.ComponentDemoEntryModule="componentDemoEntryModule",e.ComponentsEntryModule="componentsEntryModule",e.BlockEntryModule="blockEntryModule",e.JsxViewModule="jsxViewModule",e.JsonViewModule="jsonViewModule",e.PackageJson="packageJson",e.TangoConfigJson="tangoConfigJson",e.AppJson="appJson",e.File="file",e.Json="json",e.Less="less",e.Scss="scss"}(i||(i={}));const m=window.prettier,g=window.prettierPlugins;function y(e,t="babel"){return m&&g?m.format(e,{parser:t,plugins:g}):e}const _={jsescOption:{minimal:!0},retainLines:!0};function b(e,t=_){let n=(0,u.default)(e,Object.assign({},t)).code;return n=y(n),n}const v=/^\(.+\)$/s;function E(e){let t=b(p.expressionStatement(e)).trim();t.endsWith(";")&&(t=t.slice(0,-1));var n;return(p.isObjectExpression(e)||p.isFunctionExpression(e))&&(n=t,v.test(n))&&(t=t.slice(1,-1)),t}function x(e){let t,n;return(p.isIdentifier(e.object)||p.isJSXIdentifier(e.object))&&(t=e.object.name),(p.isIdentifier(e.property)||p.isJSXIdentifier(e.property))&&(n=e.property.name),(p.isMemberExpression(e.object)||p.isJSXMemberExpression(e.object))&&(t=x(e.object)),(p.isMemberExpression(e.property)||p.isJSXMemberExpression(e.property))&&(n=x(e.property)),`${t}.${n}`}function S(e){if(!e)return void l.kg.error("invalid property key",e);let t;switch(e.type){case"Identifier":case"JSXIdentifier":t=e.name;break;case"StringLiteral":t=`"${e.value}"`;break;case"NumericLiteral":t=e.value;break;case"MemberExpression":case"JSXMemberExpression":t=x(e);break;default:l.kg.error("unknown property key",e)}return t}function O(e){let t="";switch(e.type){case"StringLiteral":case"NumericLiteral":t=e.extra.raw;break;case"BooleanLiteral":t=`${e.value}`;break;case"NullLiteral":t="null";break;default:t=E(e)}return t}function T(e,t=!0){let n;switch(e.type){case"StringLiteral":case"NumericLiteral":case"BooleanLiteral":n=e.value;break;case"NullLiteral":n=null;break;case"Identifier":case"MemberExpression":case"OptionalMemberExpression":case"UnaryExpression":case"ArrowFunctionExpression":case"TemplateLiteral":case"ConditionalExpression":case"LogicalExpression":case"BinaryExpression":case"TaggedTemplateExpression":case"CallExpression":case"JSXElement":case"JSXFragment":n=E(e),t&&(n=`{${n}}`);break;case"ObjectExpression":n=e.properties.reduce(((e,n)=>{if("ObjectProperty"===n.type){const r=S(n.key),i=T(n.value,t);e[r]=i}return e}),{});break;case"ArrayExpression":n=e.elements.map((e=>T(e,t)));break;default:l.kg.error("unknown ast node:",e)}return n}function w(e){if(!e)return!0;let t;if("JSXExpressionContainer"===e.type)t=w(e.expression);else t=T(e);return t}var C=n(77191);const A=new RegExp(`^(${["defineServices","createServices"].join("|")})$`);function P(e){return A.test(e)}function k(e){return"defineStore"===e}function D(e){return/^tango\??\.(stores|services)\??\./.test(e)&&e.split(".").length>2}const R=/^{(.+)}$/s;function I(e,t=!0){return(!t||!M(e))&&R.test(e)}const L={sourceType:"module",plugins:["jsx","doExpressions","objectRestSpread","decorators-legacy","classProperties","asyncGenerators","functionBind","dynamicImport","optionalChaining"]};function B(e){try{(0,C.parse)(e,L)}catch(e){return!1}return!0}function M(e){try{(0,C.parseExpression)(e,L)}catch(e){return!1}return!0}function j(e){if(!e)return;let t;e.endsWith(";")&&(e=e.slice(0,-1));try{t=p.cloneNode((0,C.parseExpression)(e,L),!1,!0)}catch(e){l.kg.error("invalid code",e)}return t}function N(e){let t;switch(typeof e){case"number":t=p.numericLiteral(e);break;case"string":if(I(e)){t=j((0,a.jW)(e))}else t=p.stringLiteral(e);break;case"boolean":t=p.booleanLiteral(e);break;case"function":t=j(String(e));break;case"object":null===e?t=p.nullLiteral():(0,o.PO)(e)?t=F(e):Array.isArray(e)?t=p.arrayExpression(e.map((e=>N(e)))):(t=p.identifier("undefined"),l.kg.error("value2node: not support value!",t));break;case"undefined":t=p.identifier("undefined");break;default:l.kg.error(`value2node: unsupport value <${e}>`)}return t}function F(e,t=N){return(0,o.PO)(e)?p.objectExpression(Object.keys(e).map((n=>{const r=t(e[n],n);return p.objectProperty(p.identifier(n),r)}))):N(e)}function U(e){let t;if("string"==typeof e)if(e.length>1&&(e=e.trim()),(0,a.Ss)(e))t=p.jsxExpressionContainer(j(e));else if(I(e)){const n=(0,a.jW)(e);t=p.jsxExpressionContainer(j(n))}else t=p.stringLiteral(e);else t=p.jsxExpressionContainer(N(e));return t}function V(e){let t;switch(typeof e){case"string":if(I(e)){const n=(0,a.jW)(e);t=p.jsxExpressionContainer(j(n))}else t=p.jsxText(e);break;case"number":t=p.jsxText(String(e));break;case"object":return e}return t?[t]:[]}function K(e,t){return p.jsxAttribute(p.jsxIdentifier(e),U(t))}var W=n(65686),$=n(51472);function q(e,t){const n=p.file(p.program([p.blockStatement([p.expressionStatement(e)])]));return(0,W.default)(n,t),n}function Q(e,t){var n;if(e.openingElement.attributes.forEach((e=>{if((0,o.mf)(t)&&"JSXAttribute"===e.type){const n=S(e.name),r=w(e.value);t(n,r,e)}})),1===e.children.length){const r=e.children[0];let i;p.isJSXText(r)?i=null===(n=r.value)||void 0===n?void 0:n.trim():p.isJSXExpressionContainer(r)&&(i=w(r)),i&&t("children",i,e.children)}}function z(e){const t={};return Q(e,((e,n)=>{t[e]=n})),t}function X(e){const t=[];return function(e,t,n){const r={JSXElement(e){ie(e.node)===t&&n(e.node)}};switch(e.type){case"File":(0,W.default)(e,r);break;case"JSXElement":q(e,r)}}(e,"XFormItem",(e=>{const n=z(e);n.name&&!t.includes(n.name)&&t.push(n.name)})),t}function G(e,t){let n=!1;return Q(e,((e,r)=>{e===$.K.dnd&&r===t&&(n=!0)})),n}function Z(e,t,n){const r=void 0===n;let i=!1;return r?function(e,t){e.openingElement.attributes=e.openingElement.attributes.filter((e=>!p.isJSXAttribute(e)||S(e.name)!==t))}(e,t):Q(e,((r,s,o)=>{r===t&&(i=!0,p.isJSXAttribute(o)?o.value=U(n):"children"===r&&(e.children=V(n)))})),i||r||function(e,t,n){if("children"===t&&e.children)e.children=V(n);else{const r=p.jsxAttribute(p.jsxIdentifier(t),U(n));e.openingElement.attributes.push(r)}}(e,t,n),e}function Y(e){let t=0;return e.body.forEach(((e,n)=>{"ImportDeclaration"===e.type&&(t=n+1)})),t}function H(e){var t;const n=(null===(t=e.specifiers)||void 0===t?void 0:t.map((e=>p.importSpecifier(p.identifier(e),p.identifier(e)))))||[];let r;e.defaultSpecifier&&(r=p.importDefaultSpecifier(p.identifier(e.defaultSpecifier)));const i=[r,...n].filter((e=>!!e));return p.importDeclaration(i,p.stringLiteral(e.sourcePath))}function J(e){return e.map((e=>function(e){switch(e.type){case"ImportDefaultSpecifier":return p.importDefaultSpecifier(p.identifier(e.localName));case"ImportSpecifier":return p.importSpecifier(p.identifier(e.importedName||e.localName),p.identifier(e.localName));case"ImportNamespaceSpecifier":return p.importNamespaceSpecifier(p.identifier(e.localName));default:return}}(e))).filter((e=>!!e))}function ee(e,t){const n=J(t);return p.importDeclaration(n,p.stringLiteral(e))}function te(e,t,n){return(0,W.default)(e,{Program(e){const r=Y(e.node),i=ee(t,n);e.node.body.splice(r,0,i),e.stop()}}),e}function ne(e){const t=[],n={};return(0,W.default)(e,{ImportDeclaration(e){const{defaultSpecifier:t,sourcePath:r}=function(e){const t=T(e.source);let n;const r=[];return e.specifiers.forEach((e=>{"ImportDefaultSpecifier"===e.type?n=S(e.local):"ImportSpecifier"===e.type&&r.push(S(e.local))})),{defaultSpecifier:n,specifiers:r,sourcePath:t}}(e.node);t&&(n[t]=r)},ObjectExpression(e){const{node:n}=e,r=T(n,!1);t.push(r)}}),t.forEach((e=>{e.component&&n[e.component]&&(e.importPath=n[e.component])})),t}function re(e,t){return(0,W.default)(e,{CallExpression(e){if(P(S(e.node.callee))&&e.node.arguments.length){const n=e.node.arguments[0];if(p.isObjectExpression(n)){const e=Object.keys(t).reduce(((e,n)=>{const r=t[n],i=p.objectProperty(p.identifier(n),F(r,((e,t)=>"formatter"===t&&e?j(e):N(e))));return e[n]=i,e}),{});Object.keys(e).forEach((t=>{const r=n.properties.findIndex((e=>!!p.isObjectProperty(e)&&S(e.key)===t));-1!==r?n.properties[r]=e[t]:n.properties.push(e[t])}))}e.stop()}}}),e}function ie(e){return S(e.openingElement.name)}function se(e){return t=>{const n=t.openingElement.attributes.filter((t=>{if(p.isJSXAttribute(t)){const n=S(t.name);return e(n,t)}return!0}));return t.openingElement.attributes=n,t}}const oe=se((e=>e!==$.K.dnd));function ae(e,t){return q(e,{JSXElement(e){const n=se((e=>e!==$.K.dnd&&(!t||!(e in t))))(e.node);if(t){const i=(r=t,Object.keys(r).map((e=>K(e,r[e]))));n.openingElement.attributes=[...i,...e.node.openingElement.attributes]}var r;e.node=n}}),e}function le(e,t){let n=p.cloneNode(e,!0,!0);return n=ae(n,t),n}function ce(e,t){const n={},r={},i=[],s=function(e){return(0,W.default)(e,{JSXElement(e){e.node=oe(e.node)}}),e}(p.cloneNode(e,!0,!0)),o=[];return(0,W.default)(e,{ImportDeclaration(e){const{source:t,specifiers:i}=pe(e.node);n[t]?n[t]=n[t].concat(i):n[t]=i;const s=i.reduce(((e,t)=>{switch(t.type){case"ImportDefaultSpecifier":e.defaultSpecifier=t.localName;break;case"ImportSpecifier":case"ImportNamespaceSpecifier":e.specifiers.push(t.localName)}return e}),{defaultSpecifier:void 0,specifiers:[],sourcePath:t}),o=r[t];r[t]=o?Array.isArray(o)?o.concat([s]):[o,s]:s},MemberExpression(e){const t=T(e.node,!1),n=e.parentPath.node;p.isMemberExpression(n)||!D(t)||o.includes(t)||o.push(t)},OptionalMemberExpression(e){const t=T(e.node,!1);D(t)&&!o.includes(t)&&o.push(t)},JSXElement(e){const n=z(e.node),r=n[$.K.dnd],s=n.tid;let o,l,{component:c,id:u}=(0,a.cj)(r);if(c=c||ie(e.node),!function(e){if(!e)return!1;const t=e.charAt(0);return t===t.toUpperCase()}(c))return;r||(u=t.generateId(c,s).fullId),n[$.K.dnd]||e.node.openingElement.attributes.unshift(K($.K.dnd,u));const d=e.findParent((e=>e.isJSXElement()));if(p.isJSXElement(null==d?void 0:d.node)){const e=z(d.node);o=e[$.K.dnd],l=e.tid}i.push({id:u,codeId:s,parentId:o,parentCodeId:l,component:c,rawNode:e.node})}}),{ast:e,cleanAst:s,nodes:i,imports:n,importedModules:r,variables:o}}function ue(e,t){const n={};return(0,W.default)(e,{ExportNamedDeclaration(e){const r=e.node;let i=T(r.source);var s,o;t&&(s=t,o=i,i=d.join(s,o)),r.specifiers.forEach((e=>{if(p.isExportSpecifier(e)){const t=S(e.exported);t&&(n[t]={source:i,exportedName:t})}}))}}),{ast:e,exportMap:n}}function pe(e){const t=T(e.source),n=[];return e.specifiers.forEach((e=>{const t={localName:S(e.local),type:e.type};"ImportSpecifier"===e.type&&(t.importedName=S(e.imported)),n.push(t)})),{source:t,specifiers:n}}function de(e){if(!e)return"";let t;switch(typeof e){case"string":M(e)?t=e:I(e,!1)?t=(0,a.jW)(e):t=/^".*"$/.test(null==(n=e)?void 0:n.trim())?e:`"${e}"`;break;case"number":t=String(e);break;case"object":t=E(N(e));break;default:t=""}var n;return t}function fe(e,t){let n=e.package;var r,i;t&&/^(\.\.?\/|\/).*(\.[a-z]+)?$/.test(n)&&(r=t,i=n,r=d.dirname(r),n=d.relative(r,i)),n.endsWith(".js")&&(n=n.slice(0,-3));const s=[];return"defaultExport"===e.exportType?s.push({localName:e.name,type:"ImportDefaultSpecifier"}):[e.name,...e.relatedImports||[]].forEach((e=>{s.push({localName:e,type:"ImportSpecifier"})})),{source:n,specifiers:s}}function he(e,t){let n;switch(e.type){case"snippet":n=e.initChildren||e.defaultChildren;break;default:{const r=t?Object.keys(t).map((e=>({name:e,initValue:t[e]}))):[],i=[...e.props,...r].reduce(((t,n)=>{const r=function(e,t){const n=e.name;let r=e.initValue;if(!r&&e.autoInitValue&&(r=t(3)),!(0,o.kK)(r)){switch(typeof r){case"number":case"boolean":r=`{${r}}`;break;case"object":try{r=`{${JSON.stringify(r)}}`}catch(e){l.kg.error(e)}break;case"function":r=`{${r.toString()}}`;break;case"string":I(r)||(r=`"${r}"`)}return`${n}=${r}`}}(n,(t=>(0,a.Vj)(e.name,t)));return r?` ${t} ${r}`:t}),"")||"";n=e.hasChildren?`<${e.name} ${i}>${e.initChildren||e.defaultChildren||""}`:`<${e.name} ${i.trim()} />`;break}}return n}function me(e,t){return j(he(e,t))}class ge{constructor(e){this.map=new Map,this.prefix=(null==e?void 0:e.prefix)?encodeURIComponent(e.prefix):void 0}setItem(e,t){if(this.map.has(e)){const n=this.map.get(e);t&&!n.includes(t)&&n.push(t),this.map.set(e,n)}else{const n=t?[t]:[];this.map.set(e,n)}}generateId(e,t){var n;const r=(null===(n=this.map.get(e))||void 0===n?void 0:n.length)+1||1,i=t||`${(0,a.eV)(e)}${r}`;this.setItem(e,i);let s=`${e}:${i}`;return this.prefix&&(s=`${this.prefix}:${s}`),{id:i,fullId:s}}}var ye,_e;!function(e){e.ReplaceNode="replaceNode",e.InsertBefore="insertBefore",e.InsertAfter="insertAfter",e.InsertChild="insertChild",e.InsertFirstChild="insertFirstChild"}(ye||(ye={}));class be{get node(){return this.workspace.getNode(this.data.id,this.data.filename)}get prototype(){var e,t;return(null===(e=this.data)||void 0===e?void 0:e.name)?this.workspace.getPrototype(null===(t=this.data)||void 0===t?void 0:t.name):null}get id(){var e;return null===(e=this.data)||void 0===e?void 0:e.id}get bounding(){var e;return null===(e=this.data)||void 0===e?void 0:e.bounding}get display(){var e;return null===(e=this.data)||void 0===e?void 0:e.display}constructor(e){this.workspace=e,this.method=ye.InsertAfter,this.data=null,(0,s.rC)(this,{method:s.LO,data:s.LO,set:s.aD,clear:s.aD,node:s.Fl})}set(e,t){this.data=e,this.method=t}clear(){this.data=null}getNode(){return this.node}}!function(e){e.InitView="initView",e.AddFile="addFile",e.RemoveFile="removeFile",e.UpdateDependency="updateDependency",e.RemoveDependency="removeDependency",e.RemoveNode="removeNode",e.ReplaceNode="replaceNode",e.CloneNode="cloneNode",e.InsertNode="insertNode",e.InsertBeforeNode="insertBeforeNode",e.InsertAfterNode="insertAfterNode",e.DropNode="dropNode",e.UpdateAttribute="updateAttribute",e.UpdateCode="updateCode"}(_e||(_e={}));class ve{get index(){return this._index}get length(){return this._records.length}get list(){return(0,s.ZN)(this._records)}get couldBack(){return this._records.length>0&&this._index>-1}get couldForward(){return this._records.length>this._index+1}constructor(e){this._records=[],this._index=0,this._maxSize=100,this.workspace=e,(0,s.rC)(this,{_records:s.LO,_index:s.LO,back:s.aD,forward:s.aD,go:s.aD,push:s.aD,couldBack:s.Fl,couldForward:s.Fl})}_sync(e){e&&Object.keys(e).forEach((t=>{this.workspace.getFile(t).update(e[t])}))}back(){if(this.couldBack){const e=this._records[this._index-1];this._sync(e.data),this._index--}}forward(){if(this.couldForward){const e=this._records[this._index+1];this._sync(e.data),this._index++}}go(e){const t=this._records[e];t&&(this._sync(t.data),this._index=e)}push(e){this._index0&&(this._records.splice(0,t),this._index=this._records.length-1)}}var Ee=n(70393);class xe{get code(){return this._code}get cleanCode(){return this._cleanCode}constructor(e,t,n=!0){this.workspace=e,this.filename=t.filename,this.type=t.type,this.lastModified=Date.now(),n&&this.update(t.code)}update(e){(0,o.kK)(e)||(this.lastModified=Date.now(),this._code=e,this._cleanCode=e),this.workspace.onFilesChange([this.filename])}}class Se extends xe{constructor(e,t){super(e,t,!1),this.update(t.code),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}}class Oe extends xe{get object(){return(0,s.ZN)(this._object)}get json(){return(0,s.ZN)(this._object)}constructor(e,t){super(e,t,!1),this._object={},this.update(t.code),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,_object:s.LO,code:s.Fl,cleanCode:s.Fl,object:s.Fl,json:s.Fl,update:s.aD,setValue:s.aD})}update(e){if(this.lastModified=Date.now(),(0,o.kK)(e)){let e=JSON.stringify(this._object);try{e=y(e,"json")}catch(e){return void l.kg.error(e)}this._code=e,this._cleanCode=e}else{try{e=y(e,"json")}catch(e){return void l.kg.error(e)}this._code=e,this._cleanCode=e;try{const t=JSON.parse(e);this._object=t}catch(e){l.kg.error(e)}}this.workspace.onFilesChange([this.filename])}getValue(e){return(0,Ee.NA)(this.json,e)}setValue(e,t){const n=this.getValue(e);let r;return r="function"==typeof t?null==t?void 0:t(n):t,void 0!==r&&(0,Ee.sO)(this._object,e,r),this}deleteValue(e){const t=e.split("."),n=t.pop(),r=t.join(".");let i;return i=r?this.getValue(r):this.json,i?(delete i[n],r?this.setValue(r,i):this._object=i,this):this}}class Te extends xe{constructor(e,t,n=!0){super(e,t,n)}update(e,t=!0,n=!0){this.lastModified=Date.now(),(0,o.kK)(e)?this._syncByAst():this._syncByCode(e,t),this._analysisAst(),this.workspace.onFilesChange([this.filename]),n&&this.workspace.refresh([this.filename])}addImportDeclaration(e,t){return this.ast=te(this.ast,e,t),this}updateImportDeclaration(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{ImportDeclaration(e){if(T(e.node.source)===t){const r=ee(t,n);e.replaceWith(r),e.stop()}}}),e}(this.ast,e,t),this}_syncByAst(){const e=b(this.ast);this._code=e,this._cleanCode=e}_syncByCode(e,t=!0){e!==this._code&&(t&&(e=y(e)),this._code=e,this._cleanCode=e,this.ast=function(e){try{return(0,C.parse)(e,L)}catch(e){l.kg.error("[code2ast failed!]",e)}}(e))}_analysisAst(){const{imports:e}=function(e){const t={};return(0,W.default)(e,{ImportDeclaration(e){const{source:n,specifiers:r}=pe(e.node);t[n]=r}}),{imports:t}}(this.ast);this.importList=e}}class we extends Te{constructor(e,t){super(e,t,!1),this.update(t.code,!1,!1),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}}class Ce{get start(){return(0,s.ZN)(this._start)}get first(){if(this._items.length)return this._items[0]}get firstNode(){if(this.first)return this.workspace.getNode(this.first.id,this.first.filename)}get size(){return this._items.length}get selected(){return(0,s.ZN)(this._items)}get isSelected(){return!!this.selected.length}get file(){var e;return null===(e=this.firstNode)||void 0===e?void 0:e.file}get nodes(){return this._items.map((e=>this.workspace.getNode(e.id,e.filename))).filter((e=>!!e))}constructor(e){this._items=[],this._start={point:{x:0,y:0},element:null},this.workspace=e,(0,s.rC)(this,{_items:s.LO,_start:s.LO,select:s.aD,setStart:s.aD,clear:s.aD,start:s.Fl,selected:s.Fl,first:s.Fl,firstNode:s.Fl,size:s.Fl,isSelected:s.Fl,file:s.Fl,nodes:s.Fl})}add(){}remove(){}select(e){this._items=e?Array.isArray(e)?e:[e]:[],this._start=null}setStart(e){this._start=e}clear(){this._items=[]}}class Ae{get node(){var e,t;return this.workspace.getNode(null===(e=this.data)||void 0===e?void 0:e.id,null===(t=this.data)||void 0===t?void 0:t.filename)}get prototype(){var e;return this.workspace.getPrototype(null===(e=this.data)||void 0===e?void 0:e.name)}get id(){var e;return null===(e=this.data)||void 0===e?void 0:e.id}get name(){var e;return null===(e=this.data)||void 0===e?void 0:e.name}get bounding(){var e;return null===(e=this.data)||void 0===e?void 0:e.bounding}constructor(e){this.workspace=e,this.data=null,this.isDragging=!1,this.dropTarget=new be(e),(0,s.rC)(this,{data:s.LO,isDragging:s.LO,set:s.aD,clear:s.aD,node:s.Fl,prototype:s.Fl})}set(e){this.data=e,this.isDragging=!!e}clear(){this.data=null,this.isDragging=!1,this.dropTarget.clear()}getNode(){return this.node}}class Pe extends Te{get routes(){return(0,s.ZN)(this._routes)}constructor(e,t){super(e,t,!1),this.update(t.code,!0,!1),(0,s.rC)(this,{_routes:s.LO,_code:s.LO,_cleanCode:s.LO,routes:s.Fl,code:s.Fl,cleanCode:s.Fl,update:s.aD})}getRouteByRoutePath(e){let t;for(const n of this.routes)if(n.path===e){t=n;break}return t}addRoute(e,t){return this.ast=function(e,t,n){/.jsx?$/.test(n)&&(n=n.split(".")[0]);const r=(0,a.xf)(t.split("/").join("-"));return(0,W.default)(e,{Program(e){const t=Y(e.node);e.node.body.splice(t,0,p.importDeclaration([p.importDefaultSpecifier(p.identifier(r))],p.stringLiteral(n.replace("/src","."))))},ArrayExpression(e){const n=p.objectExpression([p.objectProperty(p.identifier("path"),p.stringLiteral(t)),p.objectProperty(p.identifier("component"),p.identifier(r)),p.objectProperty(p.identifier("exact"),p.booleanLiteral(!0))]);e.node.elements.push(n)}}),e}(this.ast,e,t),this}updateRoute(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{ObjectExpression(e){e.node.properties.forEach((e=>{p.isObjectProperty(e)&&"path"===T(e.key,!1)&&T(e.value,!1)===t&&(e.value=p.stringLiteral(n))}))}}),e}(this.ast,e,t),this}removeRoute(e){if("/"===e)return void console.warn("index route should not be removed!");const t=this.getRouteByRoutePath(e);var n,r,i;return this.ast=(n=this.ast,r=e,i=t.importPath,(0,W.default)(n,{ArrayExpression(e){e.node.elements=e.node.elements.filter((e=>"ObjectExpression"!==e.type||T(e).path!==r))},ImportDeclaration(e){T(e.node.source)===i&&e.remove()}}),n),this}_analysisAst(){this._routes=ne(this.ast)}}class ke extends Te{get stores(){return(0,s.ZN)(this._stores)}constructor(e,t){super(e,t,!1),this._stores=[],this.update(t.code,!0,!1),(0,s.rC)(this,{_stores:s.LO,_code:s.LO,_cleanCode:s.LO,stores:s.Fl,code:s.Fl,cleanCode:s.Fl,update:s.aD})}_analysisAst(){this._stores=function(e){const t=[];return(0,W.default)(e,{ExportSpecifier(e){const n=S(e.node.exported);t.push(n)}}),t}(this.ast)}addStore(e){return this.ast=function(e,t){const n=`./${t}`,r=t;return(0,W.default)(e,{Program(e){const t=function(e){let t=0;return e.body.forEach(((e,n)=>{"ExportNamedDeclaration"===e.type&&(t=n+1)})),t}(e.node);e.node.body.splice(t,0,p.exportNamedDeclaration(null,[p.exportSpecifier(p.identifier("default"),p.identifier(r))],p.stringLiteral(n)))}}),e}(this.ast,e),this}removeStore(e){var t,n;return this.ast=(t=this.ast,n=e,(0,W.default)(t,{ExportNamedDeclaration(e){var t;S(null===(t=e.node.specifiers)||void 0===t?void 0:t[0].exported)===n&&(e.remove(),e.stop())}}),t),this}}class De extends Te{constructor(e,t){super(e,t,!1),this.name=f(t.filename),this.update(t.code,!0,!1),(0,s.rC)(this,{states:s.LO,actions:s.LO,_code:s.LO,_cleanCode:s.LO,cleanCode:s.Fl,code:s.Fl,update:s.aD})}addState(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{CallExpression(e){const{node:r}=e;k(S(r.callee))&&r.arguments.length&&p.isObjectExpression(r.arguments[0])&&(r.arguments[0].properties.push(p.objectProperty(p.identifier(t),j(n))),e.stop())}}),e}(this.ast,e,t),this}removeState(e){return this.ast=function(e,t){return(0,W.default)(e,{CallExpression(e){const{node:n}=e;if(k(S(n.callee))&&n.arguments.length&&p.isObjectExpression(n.arguments[0])){let{properties:e}=n.arguments[0];e=e.filter((e=>"SpreadElement"===e.type||S(e.key)!==t)),n.arguments[0].properties=e}}}),e}(this.ast,e),this}updateState(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{CallExpression(e){const{node:r}=e;if(k(S(r.callee))&&r.arguments.length&&p.isObjectExpression(r.arguments[0])){const{properties:e}=r.arguments[0];for(const r of e)if("SpreadElement"!==r.type&&S(r.key)===t&&"ObjectProperty"===r.type){r.value=j(n);break}}}}),e}(this.ast,e,t),this}_analysisAst(){const{namespace:e,states:t,actions:n}=function(e){let t;const n=[],r=[];return(0,W.default)(e,{CallExpression(e){const{node:i}=e;k(S(i.callee))&&i.arguments.length&&p.isObjectExpression(i.arguments[0])&&(i.arguments[0].properties.forEach((e=>{switch(e.type){case"ObjectMethod":n.push({name:S(e.key),type:"method"});break;case"ObjectProperty":{const t=S(e.key);p.isArrowFunctionExpression(e.value)||p.isFunctionExpression(e.value)?n.push({name:t,type:"method",code:O(e.value)}):r.push({name:t,type:"property",code:O(e.value)});break}}})),i.arguments[1]&&(t=T(i.arguments[1],!1)),e.stop())}}),{namespace:t,states:r,actions:n}}(this.ast);this.namespace=e||this.name,this.states=t,this.actions=n}}class Re extends Te{get serviceFunctions(){return(0,s.ZN)(this._serviceFunctions)}get baseConfig(){return(0,s.ZN)(this._baseConfig)}constructor(e,t){super(e,t,!1),this.name=f(t.filename),this.update(t.code,!0,!1),(0,s.rC)(this,{_serviceFunctions:s.LO,_baseConfig:s.LO,_code:s.LO,_cleanCode:s.LO,serviceFunctions:s.Fl,baseConfig:s.Fl,cleanCode:s.Fl,code:s.Fl,update:s.aD})}_analysisAst(){const{imports:e,services:t,baseConfig:n}=function(e){let t;const n={encryptFetch:!1},r={};return(0,W.default)(e,{ImportDeclaration(e){const{source:t,specifiers:n}=pe(e.node);r[t]=n},CallExpression(e){if(P(S(e.node.callee))){if(e.node.arguments.length&&(t=T(e.node.arguments[0],!1),e.node.arguments[1])){const t=T(e.node.arguments[1]);n.encryptFetch=!!t.encryptFetch,n.namespace=t.namespace||"index"}e.stop()}}}),{imports:r,services:t,baseConfig:n}}(this.ast);this.importList=e,this._serviceFunctions=t,this._baseConfig=n,n.namespace&&(this.name=n.namespace)}addServiceFunction(e,t){return this.ast=re(this.ast,{[e]:(0,Ee.d9)(t,!1)}),this}addServiceFunctions(e){return this.ast=re(this.ast,e),this}updateServiceFunction(e,t){return this.ast=re(this.ast,{[e]:(0,Ee.d9)(t,!1)}),this}deleteServiceFunction(e){try{this.ast=function(e,t){return(0,W.default)(e,{CallExpression(e){if(P(S(e.node.callee))){if(e.node.arguments.length){const n=e.node.arguments[0];if(p.isObjectExpression(n)){const e=n.properties.findIndex((e=>!!p.isObjectProperty(e)&&S(e.key)===t));n.properties.splice(e,1)}}e.stop()}}}),e}(this.ast,e)}catch(e){l.kg.error(e)}return this}updateBaseConfig(e){var t,n;return this.ast=(t=this.ast,n=e,(0,W.default)(t,{CallExpression(e){if(P(S(e.node.callee))){switch(e.node.arguments.length){case 1:e.node.arguments.push(N(n));break;case 2:{const t=e.node.arguments[1];if(p.isObjectExpression(t)){const r=T(t);e.node.arguments[1]=N(Object.assign(Object.assign({},r),n))}break}}e.stop()}}}),t),this}}class Ie{get loc(){var e;return null===(e=this.rawNode)||void 0===e?void 0:e.loc}constructor(e){this.file=e.file,this.id=e.id,this.component=e.component,this.rawNode=e.rawNode,this.props=z(le(e.rawNode))}cloneRawNode(e){return le(this.rawNode,e)}destroy(){this.file=null}}class Le extends Te{get nodes(){return this._nodes}get nodesTree(){return(0,s.ZN)(this._nodesTree)}get tree(){return this.ast}constructor(e,t){super(e,t,!1),this._codeIdList=[],this._nodes=new Map,this.idGenerator=new ge({prefix:t.filename}),this.update(t.code,!0,!1),(0,s.rC)(this,{_nodesTree:s.LO,_code:s.LO,_cleanCode:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}_syncByAst(){}_analysisAst(){const{ast:e,cleanAst:t,nodes:n,imports:r,importedModules:i,variables:s}=ce(this.ast,this.idGenerator);this.ast=e,this._code=b(e),this._cleanCode=b(t),this._importedModules=i,this.importList=r,this.importMap=function(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];null==r||r.forEach((e=>{t[e.localName]={source:n,isDefault:"ImportDefaultSpecifier"===e.type}}))})),t}(r),this.variables=s,this._nodes.clear(),this._codeIdList=[],n.forEach((e=>{const t=new Ie(Object.assign(Object.assign({},e),{file:this}));this._nodes.set(e.id,t),e.codeId&&this._codeIdList.push(e.codeId)})),this._nodesTree=function(e){const t={};return e.forEach((e=>{t[e.id]||(t[e.id]=Object.assign(Object.assign({},e),{children:[]})),e.parentId&&t[e.parentId]&&t[e.parentId].children.push(t[e.id])})),Object.values(t).filter((e=>!e.parentId))}(n)}hasNodeByCodeId(e){return this._codeIdList.includes(e)}listImportSources(){return Object.keys(this.importList)}listModals(){const e=[],t=this.nodes||new Map;return Array.from(t.values()).forEach((t=>{["Modal","Drawer"].includes(t.component)&&t.props.id&&e.push({label:`${t.component}(${t.props.id})`,value:t.props.id})})),e}listForms(){const e={},t=this.nodes;return Array.from(t.values()).forEach((t=>{["XAction","XColumnAction","XForm","XStepForm","XSearchForm","XFormList"].includes(t.component)&&(e[t.id]=X(t.rawNode))})),e}addImportSpecifiers(e,t){const n=this.importList[e];if(n){const r=t.filter((e=>!n.find((t=>t.localName===e.localName))));this.ast=function(e,t,n){return(0,W.default)(e,{ImportDeclaration(e){if(T(e.node.source)===t){const t=J(n);e.node.specifiers.push(...t),e.stop()}}}),e}(this.ast,e,r)}else this.ast=te(this.ast,e,t);return this}updateImportSpecifiersLegacy(e){const t=this._importedModules[e.sourcePath];let n;if(t){const r=Array.isArray(t)?t[0]:t,i=Array.isArray(t)?t.reduce(((e,t)=>e.concat(t.specifiers||[])),[]):t.specifiers,s=e.specifiers.filter((e=>!i.includes(e)));n=function(e,t){return(0,W.default)(e,{ImportDeclaration(e){if(T(e.node.source)===t.sourcePath){const n=H(t);e.replaceWith(n),e.stop()}}}),e}(this.ast,Object.assign(Object.assign({},e),{specifiers:s.concat(r.specifiers)}))}else n=function(e,t){return(0,W.default)(e,{Program(e){const n=Y(e.node),r=H(t);e.node.body.splice(n,0,r),e.stop()}}),e}(this.ast,e);return this.ast=n,this}removeUnusedImportSpecifiers(){var e;return this.ast=(e=this.ast,(0,W.default)(e,{ImportDeclaration(e){const t=e.node.source.value;if(!e.node.specifiers.length&&/\.(css|less|scss|js)$/.test(t))return;if(!e.node.specifiers.length)return void e.remove();const n=e.node.specifiers.filter((t=>{const n=S(t.local),r=e.scope.getBinding(n);return null==r?void 0:r.referenced}));n.length?n.length!==e.node.specifiers.length&&(e.node.specifiers=n):e.remove()}}),e),this}getNode(e){return this._nodes.get(e)}removeNode(e){var t,n;return this.ast=(t=this.ast,n=e,(0,W.default)(t,{JSXElement(e){if(G(e.node,n)){const{parentPath:t}=e,n=e.parentPath.parentPath;p.isJSXElement(t.node)?e.remove():p.isJSXAttribute(n.node)?n.remove():l.kg.error("removeJSXElement failed",e.node),e.stop()}}}),t),this}updateNodeAttribute(e,t,n,r){return this.updateNodeAttributes(e,{[t]:n},r)}updateNodeAttributes(e,t,n){if(n&&n.length){const e=n.reduce(((e,t)=>{const n=this.workspace.getPrototype(t),{source:r,specifiers:i}=fe(n,this.filename),s=e[r];return s?i.forEach((e=>{s.find((t=>t.localName===e.localName))||s.push(e)})):e[r]=i,e}),{});Object.keys(e).forEach((t=>{this.addImportSpecifiers(t,e[t])}))}return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(Object.keys(n).forEach((t=>{Z(e.node,t,n[t])})),e.stop())}}),e}(this.ast,e,t),this}insertChild(e,t,n="last"){return this.ast=function(e,t,n,r){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(e.node.openingElement.selfClosing&&(e.node.openingElement.selfClosing=!1,e.node.closingElement=p.jSXClosingElement(e.node.openingElement.name)),"last"===r?e.node.children.push(n):e.node.children.unshift(n),e.stop())}}),e}(this.ast,e,t,n),this}insertAfter(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){if(G(e.node,t)){if(e.parentPath.isJSXElement())e.insertAfter(n);else if(e.parentPath.isJSXExpressionContainer()){const t=p.jsxFragment(p.jsxOpeningFragment(),p.jsxClosingFragment(),[p.cloneDeepWithoutLoc(e.node),n]);e.replaceWith(t)}e.stop()}}}),e}(this.ast,e,t),this}insertBefore(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(e.insertBefore(n),e.stop())}}),e}(this.ast,e,t),this}replaceNode(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(e.replaceWith(n),e.stop())}}),e}(this.ast,e,t),this}replaceViewChildren(e,t){var n,r;return e.length&&(this.ast=(n=this.ast,r=e,(0,W.default)(n,{JSXElement(e){e.node.children=r,e.stop()}}),n)),(null==t?void 0:t.length)&&t.forEach((e=>{this.updateImportSpecifiersLegacy(e)})),this}}class Be extends Te{constructor(e,t){super(e,t,!1),this.update(t.code,!1,!1),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,exportList:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}_analysisAst(){const e=d.dirname(this.filename),{exportMap:t}=ue(this.ast,e);this.exportList=t,Object.keys(this.exportList).forEach((t=>{this.workspace.componentPrototypes.set(t,{name:t,exportType:"namedExport",package:e,type:"element"})}))}}class Me extends EventTarget{get projectConfig(){var e;return null===(e=this.tangoConfigJson)||void 0===e?void 0:e.json}get activeViewModule(){return this.activeViewFile||this.setActiveViewFile(this.activeRoute),this.files.get(this.activeViewFile)}get pages(){var e;const t=[];return null===(e=this.routeModule)||void 0===e||e.routes.forEach((e=>{"*"!==e.path&&t.push({path:e.path,name:e.component})})),t}get bizComps(){var e,t;const n=null===(e=this.tangoConfigJson)||void 0===e?void 0:e.getValue("packages");let r=(null===(t=this.tangoConfigJson)||void 0===t?void 0:t.getValue("bizDependencies"))||[];return n&&(r=[...new Set([...r,...Object.keys(n).filter((e=>"bizDependency"===n[e].type))])]),r}get baseComps(){var e,t;const n=null===(e=this.tangoConfigJson)||void 0===e?void 0:e.getValue("packages");let r=(null===(t=this.tangoConfigJson)||void 0===t?void 0:t.getValue("baseDependencies"))||[];return n&&(r=[...new Set([...r,...Object.keys(n).filter((e=>"baseDependency"===n[e].type))])]),r}get localComps(){var e;return Object.keys((null===(e=this.componentsEntryModule)||void 0===e?void 0:e.exportList)||{})}constructor(e){super(),this.storeModules={},this.serviceModules={},this.on=this.addEventListener,this.off=this.removeEventListener,this.history=new ve(this),this.selectSource=new Ce(this),this.dragSource=new Ae(this),this.componentPrototypes=new Map,this.entry=null==e?void 0:e.entry,this.activeRoute=(null==e?void 0:e.defaultActiveRoute)||"/",this.activeFile=null==e?void 0:e.entry,this.activeViewFile="",this.files=new Map,this.isReady=!1,(null==e?void 0:e.onFilesChange)&&(this.onFilesChange=e.onFilesChange),(null==e?void 0:e.files)&&this.addFiles(e.files),(null==e?void 0:e.prototypes)&&this.setComponentPrototypes(e.prototypes),(0,s.rC)(this,{files:s.LO,activeRoute:s.LO,activeFile:s.LO,activeViewFile:s.LO,pages:s.Fl,bizComps:s.Fl,setActiveRoute:s.aD,setActiveFile:s.aD,addFile:s.aD,removeFile:s.aD})}getPrototype(e){return(0,o.HD)(e)?this.componentPrototypes.get(e):e}setActiveRoute(e){e!==this.activeRoute&&(this.selectSource.clear(),this.activeRoute=e,this.setActiveViewFile(e))}setActiveFile(e,t=!1){this.activeFile=e,t&&(this.activeViewFile=e)}setActiveViewFile(e){let t=this.getFilenameByRoutePath(e);if(!t)for(const[e,n]of this.files)if(n.type===i.JsxViewModule){t=n.filename;break}t&&this.setActiveFile(t,!0)}setComponentPrototypes(e){Object.keys(e).forEach((t=>{this.componentPrototypes.set(t,e[t])}))}addFiles(e=[]){e.forEach((e=>{this.addFile(e.filename,e.code,e.type)}))}addFile(e,t,n){var r;const s=n||function(e){return/\/tango\.config\.json$/.test(e)?i.TangoConfigJson:/\/appJson\.json$/.test(e)?i.AppJson:/\/package\.json$/.test(e)?i.PackageJson:/\/routes\.js$/.test(e)?i.RouteModule:/\/pages\/.+\.jsx?$/.test(e)?i.JsxViewModule:/\/pages\/.+\.schema\.json?$/.test(e)?i.JsonViewModule:/\/(blocks|components)\/index\.js/.test(e)?i.ComponentsEntryModule:/\/services\/.+\.js$/.test(e)||/service\.js$/.test(e)?i.ServiceModule:/\/stores\/index\.js$/.test(e)?i.StoreEntryModule:/\/stores\/.+\.js$/.test(e)?i.StoreModule:/\.jsx?$/.test(e)?i.Module:/\.json$/.test(e)?i.Json:/\.less$/.test(e)?i.Less:/\.scss$/.test(e)?i.Scss:i.File}(e),o={filename:e,code:t,type:s};let a;switch(s){case i.StoreEntryModule:a=new ke(this,o),this.storeEntryModule=a;break;case i.ComponentsEntryModule:a=new Be(this,o),this.componentsEntryModule=a;break;case i.RouteModule:a=new Pe(this,o),this.routeModule=a;a.routes.find((e=>e.path===this.activeRoute))||this.setActiveRoute(null===(r=a.routes[0])||void 0===r?void 0:r.path);break;case i.JsxViewModule:a=new Le(this,o);break;case i.ServiceModule:a=new Re(this,o),this.serviceModules[a.name]=a;break;case i.StoreModule:a=new De(this,o),this.storeModules[a.name]=a;break;case i.Module:a=new we(this,o);break;case i.Less:a=new Se(this,o);break;case i.PackageJson:a=new Oe(this,o),this.packageJson=a;break;case i.TangoConfigJson:a=new Oe(this,o),this.tangoConfigJson=a;break;case i.Json:a=new Oe(this,o);break;default:a=new xe(this,o)}this.files.set(e,a)}addServiceFile(e,t){const n=`/src/services/${e}.js`;this.addFile(n,t,i.ServiceModule);const r=this.serviceModules.index;null==r||r.addImportDeclaration(`./${e}`,[]).update()}addStoreFile(e,t){const n=`/src/stores/${e}.js`;this.addFile(n,t),this.storeEntryModule||this.addFile("/src/stores/index.js",""),this.storeEntryModule.addStore(e).update()}addViewFile(e,t){const n=e.startsWith("/")?e:`/${e}`,r=`/src/pages/${e}.js`;this.addFile(r,t),this.addRoute({name:e,path:n},r)}updateFile(e,t,n=!1){const r=this.getFile(e);r.update(t),n&&r instanceof Le&&r.removeUnusedImportSpecifiers().update(),this.history.push({message:_e.UpdateCode,data:{[e]:t}})}removeFile(e){this.files.get(e)?this.files.delete(e):Array.from(this.files.keys()).forEach((t=>{t.startsWith(`${e}/`)&&this.files.delete(t)}))}renameFile(e,t){const n=this.files.get(e);n&&(this.removeFile(e),this.addFile(t,n.code))}renameFolder(e,t){Array.from(this.files.keys()).forEach((n=>{if(n.startsWith(`${e}/`)){const r=n.replace(e,t);this.renameFile(n,r)}}))}getFile(e){return this.files.get(e)}listFiles(){const e={};return this.files.forEach((t=>{e[t.filename]=t.cleanCode})),e}removeViewModule(e){var t;const n=this.getFilenameByRoutePath(e);this.routeModule&&(this.routeModule.removeRoute(e).update(),this.setActiveRoute((null===(t=this.routeModule.routes[0])||void 0===t?void 0:t.path)||"/")),this.removeFile(n)}addRoute(e,t){var n;null===(n=this.routeModule)||void 0===n||n.addRoute(e.path,t).update()}updateRoute(e,t){var n;e!==t.path&&(null===(n=this.routeModule)||void 0===n||n.updateRoute(e,t.path).update())}copyViewPage(e,t){const n=this.getRealViewFilePath(this.getFilenameByRoutePath(e)),r=h(t.path,"/src/pages");this.copyFiles(n,r),this.addRoute(t,r)}getNode(e,t){const n=t?this.getFile(t):this.activeViewModule;if(n instanceof Le)return n.getNode(e)}ready(){var e,t;this.isReady||(this.isReady=!0,this.history.push({message:_e.InitView,data:{[null===(e=this.activeViewModule)||void 0===e?void 0:e.filename]:null===(t=this.activeViewModule)||void 0===t?void 0:t.code}}))}addStoreModule(e,t){this.addStoreFile(e,t)}removeStoreModule(e){const t=h(e,"/src/stores",".js");this.storeEntryModule.removeStore(e).update(),this.removeFile(t)}addStoreState(e,t,n){var r;null===(r=this.storeModules[e])||void 0===r||r.addState(t,n).update()}removeStoreState(e,t){var n;null===(n=this.storeModules[e])||void 0===n||n.removeState(t).update()}removeStoreVariable(e){const{storeName:t,variableName:n}=(0,a.qZ)(e);this.removeStoreState(t,n)}updateStoreVariable(e,t){var n;if((0,o.q9)(e)){const{storeName:r,variableName:i}=(0,a.qZ)(e);null===(n=this.storeModules[r])||void 0===n||n.updateState(i,t).update()}}getServiceFunction(e){var t;const{name:n,moduleName:r}=(0,a.Ak)(e);if(n)return{name:n,moduleName:r,config:null===(t=this.serviceModules[r])||void 0===t?void 0:t.serviceFunctions[n]}}listServiceFunctions(){const e={};return Object.keys(this.serviceModules).forEach((t=>{const n=this.serviceModules[t];Object.keys(n.serviceFunctions).forEach((r=>{const i="index"===t?r:[t,r].join(".");e[i]=n.serviceFunctions[r]}))})),e}updateServiceFunction(e,t,n="index"){this.serviceModules[n].updateServiceFunction(e,t).update()}addServiceFunction(e,t,n="index"){var r;null===(r=this.serviceModules[n])||void 0===r||r.addServiceFunction(e,t).update()}addServiceFunctions(e,t="index"){var n;null===(n=this.serviceModules[t])||void 0===n||n.addServiceFunctions(e).update()}removeServiceFunction(e){var t;const{moduleName:n,name:r}=(0,a.Ak)(e);null===(t=this.serviceModules[n])||void 0===t||t.deleteServiceFunction(r).update()}updateServiceBaseConfig(e,t="index"){var n;null===(n=this.serviceModules[t])||void 0===n||n.updateBaseConfig(e).update()}addDependency(e){}listDependencies(){var e;return null===(e=this.packageJson)||void 0===e?void 0:e.getValue("dependencies")}getDependency(e){var t,n;const r=null===(t=this.tangoConfigJson)||void 0===t?void 0:t.getValue("packages"),i=null===(n=this.packageJson)||void 0===n?void 0:n.getValue("dependencies");return Object.assign({version:null==i?void 0:i[e]},(null==r?void 0:r[e])||{})}updateDependency(e,t,n){var r,i;null===(r=this.packageJson)||void 0===r||r.setValue("dependencies",((n={})=>(n[e]=t,n))).update(),null===(i=this.tangoConfigJson)||void 0===i||i.setValue("packages",(r=>{var i;if(r)return((null==n?void 0:n.package)||r[e])&&(r[e]=Object.assign(Object.assign({type:null===(i=r[e])||void 0===i?void 0:i.type},(null==n?void 0:n.package)||r[e]),{version:t})),r})).update(),this.history.push({message:_e.UpdateDependency,data:{[this.packageJson.filename]:this.packageJson.code}})}removeDependency(e){var t,n;null===(t=this.packageJson)||void 0===t||t.setValue("dependencies",(t=>(t[e]&&delete t[e],t))).update(),null===(n=this.tangoConfigJson)||void 0===n||n.setValue("packages",((t={})=>((null==t?void 0:t[e])&&delete t[e],t))).update(),this.history.push({message:_e.RemoveDependency,data:{[this.packageJson.filename]:this.packageJson.code}})}removeBizComp(e){var t;null===(t=this.tangoConfigJson)||void 0===t||t.setValue("bizDependencies",(t=>{if(t)return t.filter((t=>t!==e))})).update(),this.removeDependency(e)}addBizComp(e,t,n){var r;const i=this.tangoConfigJson.getValue("packages");this.updateDependency(e,t,Object.assign(Object.assign({},n),!!i&&{package:Object.assign(Object.assign({},null==n?void 0:n.package),{type:"bizDependency"})})),(null==n?void 0:n.package)||i||null===(r=this.tangoConfigJson)||void 0===r||r.setValue("bizDependencies",((t=[])=>(t.includes(e)||t.push(e),t))).update(),this.tangoConfigJson&&this.history.push({message:_e.UpdateDependency,data:{[this.tangoConfigJson.filename]:this.tangoConfigJson.code}})}removeSelectedNode(){const e=this.selectSource.file;e&&(this.selectSource.nodes.forEach((t=>{e.removeNode(t.id)})),e.update(),this.selectSource.clear(),this.history.push({message:_e.RemoveNode,data:{[e.filename]:e.code}}))}copySelectedNode(){this.copyTempNodes=this.selectSource.nodes}pasteSelectedNode(){if(1!==this.selectSource.size)return;if(!this.copyTempNodes)return;this.getImportDeclarationByNodes(this.copyTempNodes.map((e=>e.rawNode))).forEach((e=>{this.activeViewModule.updateImportSpecifiersLegacy(e)})),this.copyTempNodes.forEach((e=>{this.activeViewModule.insertAfter(this.selectSource.first.id,e.cloneRawNode())})),this.activeViewModule.update(),this.history.push({message:_e.CloneNode,data:{[this.activeViewModule.filename]:this.activeViewModule.code}})}cloneSelectedNode(){var e,t;const n=this.selectSource.file;let r;(null===(t=null===(e=this.projectConfig)||void 0===e?void 0:e.designerConfig)||void 0===t?void 0:t.autoGenerateComponentId)&&(r={tid:n.idGenerator.generateId(this.selectSource.firstNode.component).id}),n.insertAfter(this.selectSource.first.id,this.selectSource.firstNode.cloneRawNode(r)).update(),this.history.push({message:_e.CloneNode,data:{[n.filename]:n.code}})}insertToNode(e,t){if(!e||!t)return;const n=this.getPrototype(t),r=me(n),i=this.getNode(e).file,{source:s,specifiers:o}=fe(n,i.filename);i.insertChild(e,r,"last").addImportSpecifiers(s,o).update(),this.history.push({message:_e.InsertNode,data:{[i.filename]:i.code}})}replaceNode(e,t){if(!e||!t)return;const n=this.getPrototype(t),r=me(n),i=this.getNode(e).file,{source:s,specifiers:o}=fe(n,i.filename);i.replaceNode(e,r).addImportSpecifiers(s,o).update(),this.history.push({message:_e.ReplaceNode,data:{[i.filename]:i.code}})}insertToSelectedNode(e){const t=this.getPrototype(e);if(t){const e=me(t),n=this.selectSource.file,{source:r,specifiers:i}=fe(t,n.filename);n.insertChild(this.selectSource.first.id,e,"last").addImportSpecifiers(r,i).update(),this.history.push({message:_e.InsertNode,data:{[n.filename]:n.code}})}}insertBeforeSelectedNode(e){if(!e)return;const t=this.selectSource.first.id,n=this.getPrototype(e),r=me(n),i=this.getNode(t).file,{source:s,specifiers:o}=fe(n,i.filename);i.insertBefore(t,r).addImportSpecifiers(s,o).update(),this.history.push({message:_e.InsertBeforeNode,data:{[i.filename]:i.code}})}insertAfterSelectedNode(e){if(!e)return;const t=this.selectSource.first.id,n=this.getPrototype(e),r=me(n),i=this.getNode(t).file,{source:s,specifiers:o}=fe(n,i.filename);i.insertAfter(t,r).addImportSpecifiers(s,o).update(),this.history.push({message:_e.InsertAfterNode,data:{[i.filename]:i.code}})}updateSelectedNodeAttributes(e={},t=[]){const n=this.selectSource.file;n.updateNodeAttributes(this.selectSource.first.id,e,t).update(),this.history.push({message:_e.UpdateAttribute,data:{[n.filename]:n.code}})}dropNode(){var e,t,n,r;const i=this.dragSource,s=i.dropTarget;if(!i.prototype||!s.id)return void l.kg.error("invalid dragSource or dropTarget");const o=i.prototype;let a,c;if((null===(t=null===(e=this.projectConfig)||void 0===e?void 0:e.designerConfig)||void 0===t?void 0:t.autoGenerateComponentId)&&(a={tid:this.activeViewModule.idGenerator.generateId(i.prototype.name).id}),c=i.id?i.getNode().cloneRawNode():me(i.prototype,a),!c)return;const u=null===(n=s.node)||void 0===n?void 0:n.file,p=null===(r=i.node)||void 0===r?void 0:r.file,{source:d,specifiers:f}=fe(o,u.filename);let h=!0;switch(s.method){case ye.InsertChild:u.insertChild(s.id,c,"last").addImportSpecifiers(d,f);break;case ye.InsertFirstChild:u.insertChild(s.id,c,"first").addImportSpecifiers(d,f);break;case ye.InsertAfter:u.insertAfter(s.id,c).addImportSpecifiers(d,f);break;case ye.InsertBefore:u.insertBefore(s.id,c).addImportSpecifiers(d,f);break;case ye.ReplaceNode:u.replaceNode(s.id,c).addImportSpecifiers(d,f);break;default:h=!1}const m=!!i.id;h&&(m&&p.removeNode(i.id),this.selectSource.clear()),u.update(),m&&p.filename!==u.filename&&p.update(),i.clear(),h&&this.history.push({message:_e.DropNode,data:{[u.filename]:u.code}})}onFilesChange(e){}refresh(e){this.dispatchEvent(new CustomEvent("refresh",{detail:{filenames:e,entry:this.entry}}))}getImportDeclarationByNodes(e){let t=e.reduce(((e,t)=>(e=e.concat(function(e){const t=new Set;return q(e,{JSXElement(e){const n=ie(e.node);if(!n)return;if(n.toLowerCase()===n)return;const r=n.split(".");r.length&&t.add(r[0])}}),Array.from(t)}(t)),e)),[]);t=(0,c.jj)(t);const n=function(e,t){const n={};return e.forEach((e=>{const r=t[e];r&&function(e,t,n,r=!1,i=!0){i&&(e[t]={}),r?e[t].defaultSpecifier=n:e[t].specifiers?e[t].specifiers.push(n):e[t].specifiers=[n]}(n,r.source,e,r.isDefault,!n[r.source])})),Object.keys(n).map((e=>Object.assign({sourcePath:e},n[e])))}(t,this.selectSource.file.importMap);return n}getFilenameByRoutePath(e){var t;let n;return null===(t=this.routeModule)||void 0===t||t.routes.forEach((t=>{if(function(e,t){if(!e)return!1;if((e=e.split("?")[0])===t)return!0;const n=t.replaceAll(/:\w+/gi,"\\w+");return new RegExp(`^${n}$`,"i").test(e)}(e,t.path)&&t.importPath){const e=t.importPath.replace(".","/src");n=this.getRealViewFilePath(e)}})),n}getRealViewFilePath(e){if((0,a.U_)(e))return e;const t=[`${e}.js`,`${e}.jsx`,`${e}/index.js`,`${e}/index.jsx`];for(const e of t)if(this.files.has(e))return e}copyFiles(e,t){if(this.files.has(e)){const n=this.files.get(e);this.addFile(`${t}.js`,n.cleanCode,n.type)}else this.files.has(`${e}/index.js`)?Array.from(this.files.keys()).forEach((n=>{if(n.startsWith(`${e}/`)){const r=this.getFile(n);this.addFile(t+n.slice(e.length),r.cleanCode,r.type)}})):l.kg.error("copyFiles failed, source: %s, target: %s",e,t)}}const je={desktop:{name:"desktop",width:1366,height:800},phone:{name:"phone",width:375,height:812}};class Ne{get simulator(){return(0,s.ZN)(this._simulator)}get viewport(){return(0,s.ZN)(this._viewport)}get activeView(){return this._activeView}get isPreview(){return this._isPreview}get showSmartWizard(){return this._showSmartWizard}get activeSidebarPanel(){return this._activeSidebarPanel}get showRightPanel(){return this._showRightPanel}constructor(e){this._simulator=je.desktop,this._viewport={width:1366,height:800},this._activeView="design",this._activeSidebarPanel="",this._showSmartWizard=!1,this._showRightPanel=!0,this._isPreview=!1,this.workspace=e.workspace;const{simulator:t,activeSidebarPanel:n}=e;t&&this.setSimulator(t),n&&this.setActiveSidebarPanel(n),(0,s.rC)(this,{_simulator:s.LO,_viewport:s.LO,_activeView:s.LO,_activeSidebarPanel:s.LO,_showSmartWizard:s.LO,_showRightPanel:s.LO,_isPreview:s.LO,simulator:s.Fl,viewport:s.Fl,activeView:s.Fl,activeSidebarPanel:s.Fl,isPreview:s.Fl,showRightPanel:s.Fl,showSmartWizard:s.Fl,setSimulator:s.aD,setViewport:s.aD,setActiveView:s.aD,setActiveSidebarPanel:s.aD,closeSidebarPanel:s.aD,toggleRightPanel:s.aD,toggleSmartWizard:s.aD,toggleIsPreview:s.aD})}setSimulator(e){this._simulator="string"==typeof e?je[e]:e}setViewport(e){this._viewport=e}setActiveView(e){this._activeView=e}setActiveSidebarPanel(e){e&&e!==this.activeSidebarPanel?this._activeSidebarPanel=e:this._activeSidebarPanel=""}closeSidebarPanel(){this._activeSidebarPanel=""}toggleSmartWizard(e){this._showSmartWizard=e}toggleRightPanel(e){this._showRightPanel=null!=e?e:!this._showRightPanel}toggleIsPreview(e){this._isPreview=null!=e?e:!this._isPreview,e&&this.workspace.selectSource.clear()}}function Fe({workspace:e,defaultSimulatorMode:t="desktop",defaultActiveSidebarPanel:n=""}){return new r({workspace:e,designer:new Ne({workspace:e,simulator:t,activeSidebarPanel:n})})}},98490:function(e,t,n){"use strict";n.d(t,{pq:function(){return r5},lg:function(){return N},Ab:function(){return F},Bz:function(){return t5},pv:function(){return I5},TD:function(){return SJ},YE:function(){return u2},o8:function(){return t0},qs:function(){return U},Jd:function(){return OJ},qX:function(){return KK},Qp:function(){return L5}});var r=n(87363),i=n.n(r);n(8679);function s(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,s=i().createContext(void 0);return s.displayName=r,[s.Provider,function(){const e=i().useContext(s);if(!e&&t)throw new Error(n);return e},s]}const[o,a]=s({name:"DesignerContext"}),l=()=>{var e;return null===(e=a())||void 0===e?void 0:e.sandboxQuery};var c=n(62979),u=n(81821),p=n(68949);if(!r.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!p.rC)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var d=n(61533);function f(e){e()}function h(e){return(0,p.Gf)(e)}var m=!1;function g(){return m}var y=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach((function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))})),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),_=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:y)((function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null})),b=n(61688),v=function(){};function E(e){e.reaction=new p.le("observer".concat(e.name),(function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)}))}function x(e,t){if(void 0===t&&(t="observed"),g())return e();var n=i().useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return _.unregister(r),r.onStoreChange=e,r.reaction||(E(r),r.stateVersion=Symbol()),function(){var e;r.onStoreChange=null,null===(e=r.reaction)||void 0===e||e.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var s,o,a=n.current;if(a.reaction||(E(a),_.register(n,a,a)),i().useDebugValue(a.reaction,h),(0,b.useSyncExternalStore)(a.subscribe,a.getSnapshot,v),a.reaction.track((function(){try{s=e()}catch(e){o=e}})),o)throw o;return s}var S="function"==typeof Symbol&&Symbol.for,O=S?Symbol.for("react.forward_ref"):"function"==typeof r.forwardRef&&(0,r.forwardRef)((function(e){return null})).$$typeof,T=S?Symbol.for("react.memo"):"function"==typeof r.memo&&(0,r.memo)((function(e){return null})).$$typeof;function w(e,t){var n;if(T&&e.$$typeof===T)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(g())return e;var i=null!==(n=null==t?void 0:t.forwardRef)&&void 0!==n&&n,s=e,o=e.displayName||e.name;if(O&&e.$$typeof===O&&(i=!0,"function"!=typeof(s=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(e,t){return x((function(){return s(e,t)}),o)};return a.displayName=e.displayName,Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes),i&&(a=(0,r.forwardRef)(a)),function(e,t){Object.keys(e).forEach((function(n){C[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,a=(0,r.memo)(a)),a}var C={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};var A,P;(P=d.unstable_batchedUpdates)||(P=f),(0,p.jQ)({reactionScheduler:P});A=_.finalizeAllImmediately;const[k,D]=s({name:"TangoEngineContext"}),R=()=>{var e;return null===(e=D())||void 0===e?void 0:e.engine.workspace},I=()=>{var e;return null===(e=D())||void 0===e?void 0:e.engine.designer},L=()=>{var e,t,n,r,i;const s=D(),o=R(),a=[],l=[],c=[],u=[];Object.values(o.storeModules).forEach((e=>{const t=`stores.${e.name}`,n=e.states.map((e=>({title:e.name,key:`${t}.${e.name}`,raw:e.code,showRemoveButton:!0}))),r=e.actions.map((e=>({title:e.name,key:`${t}.${e.name}`,type:"function",raw:e.code,showRemoveButton:!0})));a.push({title:e.name,key:t,selectable:!1,children:n,showAddButton:!0}),l.push({title:e.name,key:t,selectable:!1,children:r}),c.push({title:e.name,key:t,selectable:!1,children:[...n,...r],showAddButton:!0})})),Object.values(o.serviceModules).forEach((e=>{const t="index"!==e.name?`services.${e.name}`:"services";u.push({title:e.name,key:t,selectable:!1,showAddButton:!0,children:Object.keys(e.serviceFunctions||{}).map((e=>({title:e,key:[t,e].join("."),type:"function",showRemoveButton:!0})))})}));const p=null===(e=o.pages)||void 0===e?void 0:e.map((e=>({label:`${e.name} (${e.path})`,value:e.path})));let d=[B("数据模型","$stores",l),B("服务函数","$services",u)];(null===(t=s.config)||void 0===t?void 0:t.customActionVariables)&&(d=d.concat(null===(n=s.config)||void 0===n?void 0:n.customActionVariables));let f=[B("数据模型","$stores",c),B("服务函数","$services",u)];return(null===(r=s.config)||void 0===r?void 0:r.customExpressionVariables)&&(f=f.concat(null===(i=s.config)||void 0===i?void 0:i.customExpressionVariables)),{modelVariables:[B("数据模型","stores",a)],actionVariables:d,storeVariables:c,serviceVariables:u,expressionVariables:f,routeOptions:p}};function B(e,t,n){return{key:t,title:e,children:n}}var M=n(82925),j=(0,c.B1)({colors:{primary:{10:"#e8f3ff",20:"#bedaff",30:"#94bfff",40:"#6aa1ff",50:"#4080ff",60:"#165dff",70:"#0e42d2"},line:{normal:"#e5e6eb"},background:{normal:"#f3f3f4",secondary:"#e5e6eb"},text:{title:"#1d2129",body:"#4e5969",note:"#86909c",placeholder:"#c9cdd4"},custom:{topNavBg:"#222",topNavColor:"#fff",topNavBorderColor:"#222",toolbarDividerColor:"gray.60",toolbarButtonBg:"rgba(223, 223, 223, 0.08)",toolbarButtonBgHover:"#4080ff",toolbarButtonBgDisabled:"rgba(223,223,223, 0.08)",toolbarButtonBgActive:"#4080ff",toolbarButtonTextColor:"#FFF",toolbarButtonTextColorHover:"#FFF",toolbarButtonTextColorDisabled:"hsla(0,0%,100%,0.3)",toolbarButtonTextColorActive:"#fff",sidebarBg:"#fff",sidebarExpandBg:"#fff",sidebarItemActiveBg:"#f2f3f5",sidebarItemHoverBg:"#f2f3f5",viewportBg:"#f0f2f5"}},radii:{s:"2px",m:"2px",l:"4px",xl:"8px",xxl:"16px"}});function N(e){const{engine:t,config:n,theme:s,sandboxQuery:a,remoteServices:l={},children:p}=e,d=(0,r.useMemo)((()=>(0,c.B1)(s,j)),[s]);return i().createElement(c.Xn,{theme:d,prefix:"--tango"},i().createElement(u.ConfigProvider,{locale:M.Z},i().createElement(k,{value:{engine:t,config:n}},i().createElement(o,{value:{sandboxQuery:a,remoteServices:l}},p))))}function F(e){const{header:t,logo:n,description:r,actions:s,children:o}=e;return i().createElement(c.xu,{height:"100vh",overflow:"hidden",className:"DesignerPanel"},null!=t?t:i().createElement(c.xu,{display:"flex",justifyContent:"space-between",alignItems:"center",height:"48px",bg:"colors.custom.topNavBg",color:"colors.custom.topNavColor",borderBottom:"solid",borderColor:"colors.custom.topNavBorderColor",className:"DesignerPanelHeader"},i().createElement(c.xu,{display:"flex",alignItems:"center"},n,r),i().createElement(c.xu,{flex:"1"},s)),i().createElement(c.xu,{display:"flex",height:"calc(100vh - 48px)",overflow:"hidden",className:"DesignerPanelBody"},o))}function U({children:e}){return i().createElement(c.xu,{flex:"1",display:"flex",flexDirection:"column",overflow:"hidden",bg:"colors.custom.viewportBg",position:"relative",className:"WorkspacePanel"},e)}function V(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{(0,$.mf)(e)&&(null==e||e(...t))}))}}var z=n(16165);function X(e,t){const n=t=>i().createElement(z.Z,Object.assign({component:e},t));return t&&(n.displayName=t),n}const G=X((()=>i().createElement("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},i().createElement("path",{d:"m31 16-7 7-1.41-1.41 5.58-5.59-5.58-5.59 1.41-1.41z"}),i().createElement("path",{d:"m1 16 7-7 1.41 1.41-5.58 5.59 5.58 5.59-1.41 1.41z"}),i().createElement("path",{d:"m5.91 15h20.17v2h-20.17z",transform:"matrix(.25881905 -.96592583 .96592583 .25881905 -3.6 27.31)"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none",transform:"matrix(0 -1 1 0 0 32)"}))),"CodeOutlined"),Z=X((()=>i().createElement("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},i().createElement("path",{d:"M212.8 468.8H43.2C17.6 468.8 0 486.4 0 512s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM980.8 468.8H811.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM596.8 468.8H427.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2z"}))),"LineSolidOutlined"),Y=X((()=>i().createElement("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},i().createElement("path",{d:"M141.21142578 496.55047632h741.57714844v30.89904736H141.21142578z"}))),"LineSolidOutlined"),H=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm0 22h-16v-20h16z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelFilledLeftOutlined"),J=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelFilledRightOutlined"),ee=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h6v20h-6zm24 20h-16v-20h16z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelLeftOutlined"),te=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16zm24 20h-6v-20h6z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelRightOutlined"),ne=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m20 10h-12.1851l3.5874-3.5859-1.4023-1.4141-6 6 6 6 1.4023-1.4146-3.5844-3.5854h12.1821a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16z"}))),"UndoOutlined"),re=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m12 10h12.1851l-3.5874-3.5859 1.4023-1.4141 6 6-6 6-1.4023-1.4146 3.5844-3.5854h-12.1821a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16z"}))),"RedoOutlined");var ie=n(93967),se=n.n(ie);const oe=c.iv` +(self.webpackChunkplayground=self.webpackChunkplayground||[]).push([[971],{84089:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(1413),i=n(97685),s=n(4942),o=n(45987),a=n(87363),l=n(93967),c=n.n(l),u=n(63017),p=n(5379),d=["icon","className","onClick","style","primaryColor","secondaryColor"],f={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var h=function(e){var t=e.icon,n=e.className,i=e.onClick,s=e.style,a=e.primaryColor,l=e.secondaryColor,c=(0,o.Z)(e,d),u=f;if(a&&(u={primaryColor:a,secondaryColor:l||(0,p.pw)(a)}),(0,p.C3)(),(0,p.Kp)((0,p.r)(t),"icon should be icon definiton, but got ".concat(t)),!(0,p.r)(t))return null;var h=t;return h&&"function"==typeof h.icon&&(h=(0,r.Z)((0,r.Z)({},h),{},{icon:h.icon(u.primaryColor,u.secondaryColor)})),(0,p.R_)(h.icon,"svg-".concat(h.name),(0,r.Z)({className:n,onClick:i,style:s,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c))};h.displayName="IconReact",h.getTwoToneColors=function(){return(0,r.Z)({},f)},h.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;f.primaryColor=t,f.secondaryColor=n||(0,p.pw)(t),f.calculated=!!n};var m=h;function g(e){var t=(0,p.H9)(e),n=(0,i.Z)(t,2),r=n[0],s=n[1];return m.setTwoToneColors({primaryColor:r,secondaryColor:s})}var y=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g("#1890ff");var _=a.forwardRef((function(e,t){var n,l=e.className,d=e.icon,f=e.spin,h=e.rotate,g=e.tabIndex,_=e.onClick,b=e.twoToneColor,v=(0,o.Z)(e,y),E=a.useContext(u.Z),x=E.prefixCls,S=void 0===x?"anticon":x,O=E.rootClassName,T=c()(O,S,(n={},(0,s.Z)(n,"".concat(S,"-").concat(d.name),!!d.name),(0,s.Z)(n,"".concat(S,"-spin"),!!f||"loading"===d.name),n),l),w=g;void 0===w&&_&&(w=-1);var C=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,A=(0,p.H9)(b),P=(0,i.Z)(A,2),k=P[0],D=P[1];return a.createElement("span",(0,r.Z)((0,r.Z)({role:"img","aria-label":d.name},v),{},{ref:t,tabIndex:w,onClick:_,className:T}),a.createElement(m,{icon:d,primaryColor:k,secondaryColor:D,style:C}))}));_.displayName="AntdIcon",_.getTwoToneColor=function(){var e=m.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},_.setTwoToneColor=g;var b=_},63017:function(e,t,n){"use strict";var r=n(87363),i=(0,r.createContext)({});t.Z=i},16165:function(e,t,n){"use strict";var r=n(1413),i=n(4942),s=n(45987),o=n(87363),a=n(93967),l=n.n(a),c=n(63017),u=n(5379),p=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],d=o.forwardRef((function(e,t){var n=e.className,a=e.component,d=e.viewBox,f=e.spin,h=e.rotate,m=e.tabIndex,g=e.onClick,y=e.children,_=(0,s.Z)(e,p);(0,u.Kp)(Boolean(a||y),"Should have `component` prop or `children`."),(0,u.C3)();var b=o.useContext(c.Z),v=b.prefixCls,E=void 0===v?"anticon":v,x=b.rootClassName,S=l()(x,E,n),O=l()((0,i.Z)({},"".concat(E,"-spin"),!!f)),T=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,w=(0,r.Z)((0,r.Z)({},u.vD),{},{className:O,style:T,viewBox:d});d||delete w.viewBox;var C=m;return void 0===C&&g&&(C=-1),o.createElement("span",(0,r.Z)((0,r.Z)({role:"img"},_),{},{ref:t,tabIndex:C,onClick:g,className:S}),a?o.createElement(a,(0,r.Z)({},w),y):y?((0,u.Kp)(Boolean(d)||1===o.Children.count(y)&&o.isValidElement(y)&&"use"===o.Children.only(y).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),o.createElement("svg",(0,r.Z)((0,r.Z)({},w),{},{viewBox:d}),y)):null)}));d.displayName="AntdIcon",t.Z=d},91321:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(1413),i=n(45987),s=n(87363),o=n(16165),a=["type","children"],l=new Set;function c(e){return Boolean("string"==typeof e&&e.length&&!l.has(e))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e[t];if(c(n)){var r=document.createElement("script");r.setAttribute("src",n),r.setAttribute("data-namespace",n),e.length>t+1&&(r.onload=function(){u(e,t+1)},r.onerror=function(){u(e,t+1)}),l.add(n),document.body.appendChild(r)}}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,l=void 0===n?{}:n;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?u(t.reverse()):u([t]));var c=s.forwardRef((function(e,t){var n=e.type,c=e.children,u=(0,i.Z)(e,a),p=null;return e.type&&(p=s.createElement("use",{xlinkHref:"#".concat(n)})),c&&(p=c),s.createElement(o.Z,(0,r.Z)((0,r.Z)((0,r.Z)({},l),u),{},{ref:t}),p)}));return c.displayName="Iconfont",c}},56466:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="AppstoreAddOutlined";var l=i.forwardRef(a)},65184:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="BranchesOutlined";var l=i.forwardRef(a)},50067:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"}}]},name:"build",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="BuildOutlined";var l=i.forwardRef(a)},40717:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"cluster",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="ClusterOutlined";var l=i.forwardRef(a)},10620:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M841 370c3-3.3 2.7-8.3-.6-11.3a8.24 8.24 0 00-5.3-2.1h-72.6c-2.4 0-4.6 1-6.1 2.8L633.5 504.6a7.96 7.96 0 01-13.4-1.9l-63.5-141.3a7.9 7.9 0 00-7.3-4.7H380.7l.9-4.7 8-42.3c10.5-55.4 38-81.4 85.8-81.4 18.6 0 35.5 1.7 48.8 4.7l14.1-66.8c-22.6-4.7-35.2-6.1-54.9-6.1-103.3 0-156.4 44.3-175.9 147.3l-9.4 49.4h-97.6c-3.8 0-7.1 2.7-7.8 6.4L181.9 415a8.07 8.07 0 007.8 9.7H284l-89 429.9a8.07 8.07 0 007.8 9.7H269c3.8 0 7.1-2.7 7.8-6.4l89.7-433.1h135.8l68.2 139.1c1.4 2.9 1 6.4-1.2 8.8l-180.6 203c-2.9 3.3-2.6 8.4.7 11.3 1.5 1.3 3.4 2 5.3 2h72.7c2.4 0 4.6-1 6.1-2.8l123.7-146.7c2.8-3.4 7.9-3.8 11.3-1 .9.8 1.6 1.7 2.1 2.8L676.4 784c1.3 2.8 4.1 4.7 7.3 4.7h64.6a8.02 8.02 0 007.2-11.5l-95.2-198.9c-1.4-2.9-.9-6.4 1.3-8.8L841 370z"}}]},name:"function",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="FunctionOutlined";var l=i.forwardRef(a)},60532:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),i=n(87363),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},o=n(84089),a=function(e,t){return i.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};a.displayName="MenuOutlined";var l=i.forwardRef(a)},5379:function(e,t,n){"use strict";n.d(t,{R_:function(){return re},pw:function(){return ie},r:function(){return te},H9:function(){return se},vD:function(){return oe},C3:function(){return le},Kp:function(){return ee}});var r=n(1413),i=n(71002);function s(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return e<=1?"".concat(100*Number(e),"%"):e}function a(e){return 1===e.length?"0"+e:String(e)}function l(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function c(e){return u(e)/255}function u(e){return parseInt(e,16)}var p={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function d(e){var t,n,r,i={r:0,g:0,b:0},a=1,d=null,f=null,h=null,m=!1,_=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(p[e])e=p[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=g.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=g.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=g.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=g.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=g.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=g.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=g.hex8.exec(e),n)return{r:u(n[1]),g:u(n[2]),b:u(n[3]),a:c(n[4]),format:t?"name":"hex8"};if(n=g.hex6.exec(e),n)return{r:u(n[1]),g:u(n[2]),b:u(n[3]),format:t?"name":"hex"};if(n=g.hex4.exec(e),n)return{r:u(n[1]+n[1]),g:u(n[2]+n[2]),b:u(n[3]+n[3]),a:c(n[4]+n[4]),format:t?"name":"hex8"};if(n=g.hex3.exec(e),n)return{r:u(n[1]+n[1]),g:u(n[2]+n[2]),b:u(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(y(e.r)&&y(e.g)&&y(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*s(t,255),g:255*s(n,255),b:255*s(r,255)},m=!0,_="%"===String(e.r).substr(-1)?"prgb":"rgb"):y(e.h)&&y(e.s)&&y(e.v)?(d=o(e.s),f=o(e.v),i=function(e,t,n){e=6*s(e,360),t=s(t,100),n=s(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),l=n*(1-(1-i)*t),c=r%6;return{r:255*[n,a,o,o,l,n][c],g:255*[l,n,n,a,o,o][c],b:255*[o,o,l,n,n,a][c]}}(e.h,d,f),m=!0,_="hsv"):y(e.h)&&y(e.s)&&y(e.l)&&(d=o(e.s),h=o(e.l),i=function(e,t,n){var r,i,o;if(e=s(e,360),t=s(t,100),n=s(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=l(c,a,e+1/3),i=l(c,a,e),o=l(c,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,d,h),m=!0,_="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(a=e.a)),a=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(a),{ok:m,format:e.format||_,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:a}}var f="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),h="[\\s|\\(]+(".concat(f,")[,|\\s]+(").concat(f,")[,|\\s]+(").concat(f,")\\s*\\)?"),m="[\\s|\\(]+(".concat(f,")[,|\\s]+(").concat(f,")[,|\\s]+(").concat(f,")[,|\\s]+(").concat(f,")\\s*\\)?"),g={CSS_UNIT:new RegExp(f),rgb:new RegExp("rgb"+h),rgba:new RegExp("rgba"+m),hsl:new RegExp("hsl"+h),hsla:new RegExp("hsla"+m),hsv:new RegExp("hsv"+h),hsva:new RegExp("hsva"+m),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function y(e){return Boolean(g.CSS_UNIT.exec(String(e)))}var _=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function b(e){var t=function(e,t,n){e=s(e,255),t=s(t,255),n=s(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,l=r-i,c=0===r?0:l/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/l+(t=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function S(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function O(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function T(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=d(e),i=5;i>0;i-=1){var s=b(r),o=v(d({h:x(s,i,!0),s:S(s,i,!0),v:O(s,i,!0)}));n.push(o)}n.push(v(r));for(var a=1;a<=4;a+=1){var l=b(r),c=v(d({h:x(l,a),s:S(l,a),v:O(l,a)}));n.push(c)}return"dark"===t.theme?_.map((function(e){var r=e.index,i=e.opacity;return v(E(d(t.backgroundColor||"#141414"),d(n[r]),100*i))})):n}var w={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},C={},A={};Object.keys(w).forEach((function(e){C[e]=T(w[e]),C[e].primary=C[e][5],A[e]=T(w[e],{theme:"dark",backgroundColor:"#141414"}),A[e].primary=A[e][5]}));C.red,C.volcano,C.gold,C.orange,C.yellow,C.lime,C.green,C.cyan,C.blue,C.geekblue,C.purple,C.magenta,C.grey;var P=n(87363),k=n.n(P),D={},R=[];function I(e,t){}function L(e,t){}function B(e,t,n){t||D[n]||(e(!1,n),D[n]=!0)}function M(e,t){B(I,e,t)}M.preMessage=function(e){R.push(e)},M.resetWarned=function(){D={}},M.noteOnce=function(e,t){B(L,e,t)};var j=M;function N(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var F="data-rc-order",U="data-rc-priority",V="rc-util-key",K=new Map;function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):V}function $(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function q(e){return"queue"===e?"prependQueue":e?"prepend":"append"}function Q(e){return Array.from((K.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!N())return null;var n=t.csp,r=t.prepend,i=t.priority,s=void 0===i?0:i,o=q(r),a="prependQueue"===o,l=document.createElement("style");l.setAttribute(F,o),a&&s&&l.setAttribute(U,"".concat(s)),null!=n&&n.nonce&&(l.nonce=null==n?void 0:n.nonce),l.innerHTML=e;var c=$(t),u=c.firstChild;if(r){if(a){var p=Q(c).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(F)))return!1;var t=Number(e.getAttribute(U)||0);return s>=t}));if(p.length)return c.insertBefore(l,p[p.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=$(t);return Q(n).find((function(n){return n.getAttribute(W(t))===e}))}function G(e,t){var n=K.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=z("",t),i=r.parentNode;K.set(e,i),e.removeChild(r)}}function Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=$(n);G(r,n);var i=X(t,n);if(i){var s,o,a;if(null!==(s=n.csp)&&void 0!==s&&s.nonce&&i.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce))i.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return i.innerHTML!==e&&(i.innerHTML=e),i}var l=z(e,n);return l.setAttribute(W(n),t),l}var H=n(63017),Y=n(68929),J=n.n(Y);function ee(e,t){j(e,"[@ant-design/icons] ".concat(t))}function te(e){return"object"===(0,i.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,i.Z)(e.icon)||"function"==typeof e.icon)}function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[J()(n)]=r;return t}),{})}function re(e,t,n){return n?k().createElement(e.tag,(0,r.Z)((0,r.Z)({key:t},ne(e.attrs)),n),(e.children||[]).map((function(n,r){return re(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):k().createElement(e.tag,(0,r.Z)({key:t},ne(e.attrs)),(e.children||[]).map((function(n,r){return re(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function ie(e){return T(e)[0]}function se(e){return e?Array.isArray(e)?e:[e]:[]}var oe={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ae="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae,t=(0,P.useContext)(H.Z),n=t.csp;(0,P.useEffect)((function(){Z(e,"@ant-design-icons",{prepend:!0,csp:n})}),[])}},70597:function(e,t,n){"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:s,height:l},u)},p),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},43891:function(e,t,n){"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:s,height:l},u)},p),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},92509:function(e,t,n){!function(e,t,n,r){"use strict";const i=0,s=1,o=2,a=3,l=4,c=-1;let u;e.addSegment=void 0,e.addMapping=void 0,e.maybeAddSegment=void 0,e.maybeAddMapping=void 0,e.setSourceContent=void 0,e.toDecodedMap=void 0,e.toEncodedMap=void 0,e.fromMap=void 0,e.allMappings=void 0;class p{constructor({file:e,sourceRoot:n}={}){this._names=new t.SetArray,this._sources=new t.SetArray,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n}}function d(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function f(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][i]);n=r--);return n}function h(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function m(e){const{length:t}=e;let n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);nu(!1,e,t,n,r,i,s,o,a),e.maybeAddSegment=(e,t,n,r,i,s,o,a)=>u(!0,e,t,n,r,i,s,o,a),e.addMapping=(e,t)=>b(!1,e,t),e.maybeAddMapping=(e,t)=>b(!0,e,t),e.setSourceContent=(e,n,r)=>{const{_sources:i,_sourcesContent:s}=e;s[t.put(i,n)]=r},e.toDecodedMap=e=>{const{file:t,sourceRoot:n,_mappings:r,_sources:i,_sourcesContent:s,_names:o}=e;return m(r),{version:3,file:t||void 0,names:o.array,sourceRoot:n||void 0,sources:i.array,sourcesContent:s,mappings:r}},e.toEncodedMap=t=>{const r=e.toDecodedMap(t);return Object.assign(Object.assign({},r),{mappings:n.encode(r.mappings)})},e.allMappings=e=>{const t=[],{_mappings:n,_sources:r,_names:c}=e;for(let e=0;e{const t=new r.TraceMap(e),n=new p({file:t.file,sourceRoot:t.sourceRoot});return g(n._names,t.names),g(n._sources,t.sources),n._sourcesContent=t.sourcesContent||t.sources.map((()=>null)),n._mappings=r.decodedMappings(t),n},u=(e,n,r,i,s,o,a,l,u)=>{const{_mappings:p,_sources:m,_sourcesContent:g,_names:b}=n,v=d(p,r),E=f(v,i);if(!s){if(e&&y(v,E))return;return h(v,E,[i])}const x=t.put(m,s),S=l?t.put(b,l):c;if(x===g.length&&(g[x]=null!=u?u:null),!e||!_(v,E,x,o,a,S))return h(v,E,l?[i,x,o,a,S]:[i,x,o,a])},e.GenMapping=p,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(22208),n(92297),n(83446))},48435:function(e){e.exports=function(){"use strict";const e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var r;function i(t){return e.test(t)}function s(e){return e.startsWith("//")}function o(e){return e.startsWith("/")}function a(e){return e.startsWith("file:")}function l(e){return/^[.?#]/.test(e)}function c(e){const n=t.exec(e);return p(n[1],n[2]||"",n[3],n[4]||"",n[5]||"/",n[6]||"",n[7]||"")}function u(e){const t=n.exec(e),r=t[2];return p("file:","",t[1]||"","",o(r)?r:"/"+r,t[3]||"",t[4]||"")}function p(e,t,n,i,s,o,a){return{scheme:e,user:t,host:n,port:i,path:s,query:o,hash:a,type:r.Absolute}}function d(e){if(s(e)){const t=c("http:"+e);return t.scheme="",t.type=r.SchemeRelative,t}if(o(e)){const t=c("http://foo.com"+e);return t.scheme="",t.host="",t.type=r.AbsolutePath,t}if(a(e))return u(e);if(i(e))return c(e);const t=c("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?r.Query:e.startsWith("#")?r.Hash:r.RelativePath:r.Empty,t}function f(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}function h(e,t){m(t,t.type),"/"===e.path?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){const n=t<=r.RelativePath,i=e.path.split("/");let s=1,o=0,a=!1;for(let e=1;ei&&(i=s)}m(n,i);const s=n.query+n.hash;switch(i){case r.Hash:case r.Query:return s;case r.RelativePath:{const r=n.path.slice(1);return r?l(t||e)&&!l(r)?"./"+r+s:r+s:s||"."}case r.AbsolutePath:return n.path+s;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+s}}return function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"}(r||(r={})),g}()},22208:function(e,t){!function(e){"use strict";e.get=void 0,e.put=void 0,e.pop=void 0;class t{constructor(){this._indexes={__proto__:null},this.array=[]}}e.get=(e,t)=>e._indexes[t],e.put=(t,n)=>{const r=e.get(t,n);if(void 0!==r)return r;const{array:i,_indexes:s}=t;return s[n]=i.push(n)-1},e.pop=e=>{const{array:t,_indexes:n}=e;0!==t.length&&(n[t.pop()]=void 0)},e.SetArray=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)},92297:function(e,t,n){var r=n(48764).lW;!function(e){"use strict";const t=",".charCodeAt(0),n=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),o=new Uint8Array(128);for(let e=0;e>>=1,l&&(i=-2147483648|-i),n[r]+=i,t}function p(e,n,r){return!(n>=r)&&e.charCodeAt(n)!==t}function d(e){e.sort(f)}function f(e,t){return e[0]-t[0]}function h(e){const r=new Int32Array(5),i=16384,s=i-36,o=new Uint8Array(i),l=o.subarray(0,s);let c=0,u="";for(let p=0;p0&&(c===i&&(u+=a.decode(o),c=0),o[c++]=n),0!==d.length){r[0]=0;for(let e=0;es&&(u+=a.decode(l),o.copyWithin(0,s,c),c-=s),e>0&&(o[c++]=t),c=m(o,c,r,n,0),1!==n.length&&(c=m(o,c,r,n,1),c=m(o,c,r,n,2),c=m(o,c,r,n,3),4!==n.length&&(c=m(o,c,r,n,4)))}}}return u+a.decode(o.subarray(0,c))}function m(e,t,n,r,i){const o=r[i];let a=o-n[i];n[i]=o,a=a<0?-a<<1|1:a<<1;do{let n=31&a;a>>>=5,a>0&&(n|=32),e[t++]=s[n]}while(a>0);return t}e.decode=l,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}(t)},83446:function(e,t,n){!function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(n);function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),i.default(e,t)}function o(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}const a=0,l=1,c=2,u=3,p=4,d=1,f=2;function h(e,t){const n=m(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r>1),s=e[i][a]-t;if(0===s)return b=!0,i;s<0?n=i+1:r=i-1}return b=!1,n-1}function E(e,t,n){for(let r=n+1;r=0&&e[r][a]===t;n=r--);return n}function S(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function O(e,t,n,r){const{lastKey:i,lastNeedle:s,lastIndex:o}=n;let l=0,c=e.length-1;if(r===i){if(t===s)return b=-1!==o&&e[o][a]===t,o;t>=s?l=-1===o?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=v(e,t,l,c)}function T(e,t){const n=t.map(C);for(let r=0;rt;n--)e[n]=e[n-1];e[t]=n}function C(){return{__proto__:null}}const A=function(t,n){const r="string"==typeof t?JSON.parse(t):t;if(!("sections"in r))return new j(r,n);const i=[],s=[],o=[],a=[];P(r,n,i,s,o,a,0,0,1/0,1/0);const l={version:3,file:r.file,names:a,sources:s,sourcesContent:o,mappings:i};return e.presortedDecodedMap(l)};function P(e,t,n,r,i,s,o,a,l,c){const{sections:u}=e;for(let e=0;eh)return;const n=R(r,t),i=0===e?f:0,s=b[e];for(let e=0;e=m)return;if(1===r.length){n.push([o]);continue}const d=y+r[l],f=r[c],g=r[u];n.push(4===r.length?[o,d,f,g]:[o,d,f,g,_+r[p]])}}}function D(e,t){for(let n=0;ns(e||"",d)));const{mappings:f}=r;"string"==typeof f?(this._encoded=f,this._decoded=void 0):(this._encoded=void 0,this._decoded=h(f,n)),this._decodedMemo=S(),this._bySources=void 0,this._bySourceMemos=void 0}}function N(e,t){return{version:e.version,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t}}function F(e,t,n,r){return{source:e,line:t,column:n,name:r}}function U(e,t){return{line:e,column:t}}function V(e,t,n,r,i){let s=O(e,r,t,n);return b?s=(i===B?E:x)(e,r,s):i===B&&s++,-1===s||s===e.length?-1:s}function K(e,t,n,r,i){let s=V(e,t,n,r,M);if(b||i!==B||s++,-1===s||s===e.length)return[];const o=b?r:e[s][a];b||(s=x(e,o,s));const l=E(e,o,s),c=[];for(;s<=l;s++){const t=e[s];c.push(U(t[d]+1,t[f]))}return c}(()=>{function n(t,n,r,i,s,o){if(--r<0)throw new Error(I);if(i<0)throw new Error(L);const{sources:a,resolvedSources:l}=t;let c=a.indexOf(n);if(-1===c&&(c=l.indexOf(n)),-1===c)return o?[]:U(null,null);const u=(t._bySources||(t._bySources=T(e.decodedMappings(t),t._bySourceMemos=a.map(S))))[c][r];if(null==u)return o?[]:U(null,null);const p=t._bySourceMemos[c];if(o)return K(u,p,r,i,s);const h=V(u,p,r,i,s);if(-1===h)return U(null,null);const m=u[h];return U(m[d]+1,m[f])}e.encodedMappings=e=>{var n;return null!==(n=e._encoded)&&void 0!==n?n:e._encoded=t.encode(e._decoded)},e.decodedMappings=e=>e._decoded||(e._decoded=t.decode(e._encoded)),e.traceSegment=(t,n,r)=>{const i=e.decodedMappings(t);if(n>=i.length)return null;const s=i[n],o=V(s,t._decodedMemo,n,r,M);return-1===o?null:s[o]},e.originalPositionFor=(t,{line:n,column:r,bias:i})=>{if(--n<0)throw new Error(I);if(r<0)throw new Error(L);const s=e.decodedMappings(t);if(n>=s.length)return F(null,null,null,null);const o=s[n],a=V(o,t._decodedMemo,n,r,i||M);if(-1===a)return F(null,null,null,null);const d=o[a];if(1===d.length)return F(null,null,null,null);const{names:f,resolvedSources:h}=t;return F(h[d[l]],d[c]+1,d[u],5===d.length?f[d[p]]:null)},e.allGeneratedPositionsFor=(e,{source:t,line:r,column:i,bias:s})=>n(e,t,r,i,s||B,!0),e.generatedPositionFor=(e,{source:t,line:r,column:i,bias:s})=>n(e,t,r,i,s||M,!1),e.eachMapping=(t,n)=>{const r=e.decodedMappings(t),{names:i,resolvedSources:s}=t;for(let e=0;e{const{sources:n,resolvedSources:r,sourcesContent:i}=e;if(null==i)return null;let s=n.indexOf(t);return-1===s&&(s=r.indexOf(t)),-1===s?null:i[s]},e.presortedDecodedMap=(e,t)=>{const n=new j(N(e,[]),t);return n._decoded=e.mappings,n},e.decodedMap=t=>N(t,e.decodedMappings(t)),e.encodedMap=t=>N(t,e.encodedMappings(t))})(),e.AnyMap=A,e.GREATEST_LOWER_BOUND=M,e.LEAST_UPPER_BOUND=B,e.TraceMap=j,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(92297),n(48435))},26898:function(e,t,n){"use strict";n.d(t,{qt:function(){return ye},Tv:function(){return i},j$:function(){return Me},r:function(){return Fe},gW:function(){return B},Ab:function(){return M},Lx:function(){return I},BB:function(){return de}});class r{constructor(e){this.workspace=e.workspace,this.designer=e.designer}}var i,s=n(68949),o=n(29122),a=n(8521),l=n(23011),c=n(37487),u=n(27848),p=n(86067),d=n(94612);function f(e){const t=e.split("/");let n=t[t.length-1];return n=n.split(".")[0],(0,a.eV)(n)}function h(e,t,n=""){e.startsWith("/")&&(e=e.substring(1));const r=e.replaceAll("/:","@").split("/").join("-");return t.endsWith("/")||(t=`${t}/`),`${t}${r}${n}`}!function(e){e.Module="module",e.StoreEntryModule="storeEntryModule",e.RouteModule="routeModule",e.ServiceModule="serviceModule",e.StoreModule="storeModule",e.ComponentPrototypeModule="componentPrototypeModule",e.ComponentDemoEntryModule="componentDemoEntryModule",e.ComponentsEntryModule="componentsEntryModule",e.BlockEntryModule="blockEntryModule",e.JsxViewModule="jsxViewModule",e.JsonViewModule="jsonViewModule",e.PackageJson="packageJson",e.TangoConfigJson="tangoConfigJson",e.AppJson="appJson",e.File="file",e.Json="json",e.Less="less",e.Scss="scss"}(i||(i={}));const m=window.prettier,g=window.prettierPlugins;function y(e,t="babel"){return m&&g?m.format(e,{parser:t,plugins:g}):e}const _={jsescOption:{minimal:!0},retainLines:!0};function b(e,t=_){let n=(0,u.default)(e,Object.assign({},t)).code;return n=y(n),n}const v=/^\(.+\)$/s;function E(e){let t=b(p.expressionStatement(e)).trim();t.endsWith(";")&&(t=t.slice(0,-1));var n;return(p.isObjectExpression(e)||p.isFunctionExpression(e))&&(n=t,v.test(n))&&(t=t.slice(1,-1)),t}function x(e){let t,n;return(p.isIdentifier(e.object)||p.isJSXIdentifier(e.object))&&(t=e.object.name),(p.isIdentifier(e.property)||p.isJSXIdentifier(e.property))&&(n=e.property.name),(p.isMemberExpression(e.object)||p.isJSXMemberExpression(e.object))&&(t=x(e.object)),(p.isMemberExpression(e.property)||p.isJSXMemberExpression(e.property))&&(n=x(e.property)),`${t}.${n}`}function S(e){if(!e)return void l.kg.error("invalid property key",e);let t;switch(e.type){case"Identifier":case"JSXIdentifier":t=e.name;break;case"StringLiteral":t=`"${e.value}"`;break;case"NumericLiteral":t=e.value;break;case"MemberExpression":case"JSXMemberExpression":t=x(e);break;default:l.kg.error("unknown property key",e)}return t}function O(e){let t="";switch(e.type){case"StringLiteral":case"NumericLiteral":t=e.extra.raw;break;case"BooleanLiteral":t=`${e.value}`;break;case"NullLiteral":t="null";break;default:t=E(e)}return t}function T(e,t=!0){let n;switch(e.type){case"StringLiteral":case"NumericLiteral":case"BooleanLiteral":n=e.value;break;case"NullLiteral":n=null;break;case"Identifier":case"MemberExpression":case"OptionalMemberExpression":case"UnaryExpression":case"ArrowFunctionExpression":case"TemplateLiteral":case"ConditionalExpression":case"LogicalExpression":case"BinaryExpression":case"TaggedTemplateExpression":case"CallExpression":case"JSXElement":case"JSXFragment":n=E(e),t&&(n=`{${n}}`);break;case"ObjectExpression":n=e.properties.reduce(((e,n)=>{if("ObjectProperty"===n.type){const r=S(n.key),i=T(n.value,t);e[r]=i}return e}),{});break;case"ArrayExpression":n=e.elements.map((e=>T(e,t)));break;default:l.kg.error("unknown ast node:",e)}return n}function w(e){if(!e)return!0;let t;if("JSXExpressionContainer"===e.type)t=w(e.expression);else t=T(e);return t}var C=n(77191);const A=new RegExp(`^(${["defineServices","createServices"].join("|")})$`);function P(e){return A.test(e)}function k(e){return"defineStore"===e}function D(e){return/^tango\??\.(stores|services)\??\./.test(e)&&e.split(".").length>2}const R=/^{(.+)}$/s;function I(e,t=!0){return(!t||!M(e))&&R.test(e)}const L={sourceType:"module",plugins:["jsx","doExpressions","objectRestSpread","decorators-legacy","classProperties","asyncGenerators","functionBind","dynamicImport","optionalChaining"]};function B(e){try{(0,C.parse)(e,L)}catch(e){return!1}return!0}function M(e){try{(0,C.parseExpression)(e,L)}catch(e){return!1}return!0}function j(e){if(!e)return;let t;e.endsWith(";")&&(e=e.slice(0,-1));try{t=p.cloneNode((0,C.parseExpression)(e,L),!1,!0)}catch(e){l.kg.error("invalid code",e)}return t}function N(e){let t;switch(typeof e){case"number":t=p.numericLiteral(e);break;case"string":if(I(e)){t=j((0,a.jW)(e))}else t=p.stringLiteral(e);break;case"boolean":t=p.booleanLiteral(e);break;case"function":t=j(String(e));break;case"object":null===e?t=p.nullLiteral():(0,o.PO)(e)?t=F(e):Array.isArray(e)?t=p.arrayExpression(e.map((e=>N(e)))):(t=p.identifier("undefined"),l.kg.error("value2node: not support value!",t));break;case"undefined":t=p.identifier("undefined");break;default:l.kg.error(`value2node: unsupport value <${e}>`)}return t}function F(e,t=N){return(0,o.PO)(e)?p.objectExpression(Object.keys(e).map((n=>{const r=t(e[n],n);return p.objectProperty(p.identifier(n),r)}))):N(e)}function U(e){let t;if("string"==typeof e)if(e.length>1&&(e=e.trim()),(0,a.Ss)(e))t=p.jsxExpressionContainer(j(e));else if(I(e)){const n=(0,a.jW)(e);t=p.jsxExpressionContainer(j(n))}else t=p.stringLiteral(e);else t=p.jsxExpressionContainer(N(e));return t}function V(e){let t;switch(typeof e){case"string":if(I(e)){const n=(0,a.jW)(e);t=p.jsxExpressionContainer(j(n))}else t=p.jsxText(e);break;case"number":t=p.jsxText(String(e));break;case"object":return e}return t?[t]:[]}function K(e,t){return p.jsxAttribute(p.jsxIdentifier(e),U(t))}var W=n(65686),$=n(51472);function q(e,t){const n=p.file(p.program([p.blockStatement([p.expressionStatement(e)])]));return(0,W.default)(n,t),n}function Q(e,t){var n;if(e.openingElement.attributes.forEach((e=>{if((0,o.mf)(t)&&"JSXAttribute"===e.type){const n=S(e.name),r=w(e.value);t(n,r,e)}})),1===e.children.length){const r=e.children[0];let i;p.isJSXText(r)?i=null===(n=r.value)||void 0===n?void 0:n.trim():p.isJSXExpressionContainer(r)&&(i=w(r)),i&&t("children",i,e.children)}}function z(e){const t={};return Q(e,((e,n)=>{t[e]=n})),t}function X(e){const t=[];return function(e,t,n){const r={JSXElement(e){ie(e.node)===t&&n(e.node)}};switch(e.type){case"File":(0,W.default)(e,r);break;case"JSXElement":q(e,r)}}(e,"XFormItem",(e=>{const n=z(e);n.name&&!t.includes(n.name)&&t.push(n.name)})),t}function G(e,t){let n=!1;return Q(e,((e,r)=>{e===$.K.dnd&&r===t&&(n=!0)})),n}function Z(e,t,n){const r=void 0===n;let i=!1;return r?function(e,t){e.openingElement.attributes=e.openingElement.attributes.filter((e=>!p.isJSXAttribute(e)||S(e.name)!==t))}(e,t):Q(e,((r,s,o)=>{r===t&&(i=!0,p.isJSXAttribute(o)?o.value=U(n):"children"===r&&(e.children=V(n)))})),i||r||function(e,t,n){if("children"===t&&e.children)e.children=V(n);else{const r=p.jsxAttribute(p.jsxIdentifier(t),U(n));e.openingElement.attributes.push(r)}}(e,t,n),e}function H(e){let t=0;return e.body.forEach(((e,n)=>{"ImportDeclaration"===e.type&&(t=n+1)})),t}function Y(e){var t;const n=(null===(t=e.specifiers)||void 0===t?void 0:t.map((e=>p.importSpecifier(p.identifier(e),p.identifier(e)))))||[];let r;e.defaultSpecifier&&(r=p.importDefaultSpecifier(p.identifier(e.defaultSpecifier)));const i=[r,...n].filter((e=>!!e));return p.importDeclaration(i,p.stringLiteral(e.sourcePath))}function J(e){return e.map((e=>function(e){switch(e.type){case"ImportDefaultSpecifier":return p.importDefaultSpecifier(p.identifier(e.localName));case"ImportSpecifier":return p.importSpecifier(p.identifier(e.importedName||e.localName),p.identifier(e.localName));case"ImportNamespaceSpecifier":return p.importNamespaceSpecifier(p.identifier(e.localName));default:return}}(e))).filter((e=>!!e))}function ee(e,t){const n=J(t);return p.importDeclaration(n,p.stringLiteral(e))}function te(e,t,n){return(0,W.default)(e,{Program(e){const r=H(e.node),i=ee(t,n);e.node.body.splice(r,0,i),e.stop()}}),e}function ne(e){const t=[],n={};return(0,W.default)(e,{ImportDeclaration(e){const{defaultSpecifier:t,sourcePath:r}=function(e){const t=T(e.source);let n;const r=[];return e.specifiers.forEach((e=>{"ImportDefaultSpecifier"===e.type?n=S(e.local):"ImportSpecifier"===e.type&&r.push(S(e.local))})),{defaultSpecifier:n,specifiers:r,sourcePath:t}}(e.node);t&&(n[t]=r)},ObjectExpression(e){const{node:n}=e,r=T(n,!1);t.push(r)}}),t.forEach((e=>{e.component&&n[e.component]&&(e.importPath=n[e.component])})),t}function re(e,t){return(0,W.default)(e,{CallExpression(e){if(P(S(e.node.callee))&&e.node.arguments.length){const n=e.node.arguments[0];if(p.isObjectExpression(n)){const e=Object.keys(t).reduce(((e,n)=>{const r=t[n],i=p.objectProperty(p.identifier(n),F(r,((e,t)=>"formatter"===t&&e?j(e):N(e))));return e[n]=i,e}),{});Object.keys(e).forEach((t=>{const r=n.properties.findIndex((e=>!!p.isObjectProperty(e)&&S(e.key)===t));-1!==r?n.properties[r]=e[t]:n.properties.push(e[t])}))}e.stop()}}}),e}function ie(e){return S(e.openingElement.name)}function se(e){return t=>{const n=t.openingElement.attributes.filter((t=>{if(p.isJSXAttribute(t)){const n=S(t.name);return e(n,t)}return!0}));return t.openingElement.attributes=n,t}}const oe=se((e=>e!==$.K.dnd));function ae(e,t){return q(e,{JSXElement(e){const n=se((e=>e!==$.K.dnd&&(!t||!(e in t))))(e.node);if(t){const i=(r=t,Object.keys(r).map((e=>K(e,r[e]))));n.openingElement.attributes=[...i,...e.node.openingElement.attributes]}var r;e.node=n}}),e}function le(e,t){let n=p.cloneNode(e,!0,!0);return n=ae(n,t),n}function ce(e,t){const n={},r={},i=[],s=function(e){return(0,W.default)(e,{JSXElement(e){e.node=oe(e.node)}}),e}(p.cloneNode(e,!0,!0)),o=[];return(0,W.default)(e,{ImportDeclaration(e){const{source:t,specifiers:i}=pe(e.node);n[t]?n[t]=n[t].concat(i):n[t]=i;const s=i.reduce(((e,t)=>{switch(t.type){case"ImportDefaultSpecifier":e.defaultSpecifier=t.localName;break;case"ImportSpecifier":case"ImportNamespaceSpecifier":e.specifiers.push(t.localName)}return e}),{defaultSpecifier:void 0,specifiers:[],sourcePath:t}),o=r[t];r[t]=o?Array.isArray(o)?o.concat([s]):[o,s]:s},MemberExpression(e){const t=T(e.node,!1),n=e.parentPath.node;p.isMemberExpression(n)||!D(t)||o.includes(t)||o.push(t)},OptionalMemberExpression(e){const t=T(e.node,!1);D(t)&&!o.includes(t)&&o.push(t)},JSXElement(e){const n=z(e.node),r=n[$.K.dnd],s=n.tid;let o,l,{component:c,id:u}=(0,a.cj)(r);if(c=c||ie(e.node),!function(e){if(!e)return!1;const t=e.charAt(0);return t===t.toUpperCase()}(c))return;r||(u=t.generateId(c,s).fullId),n[$.K.dnd]||e.node.openingElement.attributes.unshift(K($.K.dnd,u));const d=e.findParent((e=>e.isJSXElement()));if(p.isJSXElement(null==d?void 0:d.node)){const e=z(d.node);o=e[$.K.dnd],l=e.tid}i.push({id:u,codeId:s,parentId:o,parentCodeId:l,component:c,rawNode:e.node})}}),{ast:e,cleanAst:s,nodes:i,imports:n,importedModules:r,variables:o}}function ue(e,t){const n={};return(0,W.default)(e,{ExportNamedDeclaration(e){const r=e.node;let i=T(r.source);var s,o;t&&(s=t,o=i,i=d.join(s,o)),r.specifiers.forEach((e=>{if(p.isExportSpecifier(e)){const t=S(e.exported);t&&(n[t]={source:i,exportedName:t})}}))}}),{ast:e,exportMap:n}}function pe(e){const t=T(e.source),n=[];return e.specifiers.forEach((e=>{const t={localName:S(e.local),type:e.type};"ImportSpecifier"===e.type&&(t.importedName=S(e.imported)),n.push(t)})),{source:t,specifiers:n}}function de(e){if(!e)return"";let t;switch(typeof e){case"string":M(e)?t=e:I(e,!1)?t=(0,a.jW)(e):t=/^".*"$/.test(null==(n=e)?void 0:n.trim())?e:`"${e}"`;break;case"number":t=String(e);break;case"object":t=E(N(e));break;default:t=""}var n;return t}function fe(e,t){let n=e.package;var r,i;t&&/^(\.\.?\/|\/).*(\.[a-z]+)?$/.test(n)&&(r=t,i=n,r=d.dirname(r),n=d.relative(r,i)),n.endsWith(".js")&&(n=n.slice(0,-3));const s=[];return"defaultExport"===e.exportType?s.push({localName:e.name,type:"ImportDefaultSpecifier"}):[e.name,...e.relatedImports||[]].forEach((e=>{s.push({localName:e,type:"ImportSpecifier"})})),{source:n,specifiers:s}}function he(e,t){let n;switch(e.type){case"snippet":n=e.initChildren||e.defaultChildren;break;default:{const r=t?Object.keys(t).map((e=>({name:e,initValue:t[e]}))):[],i=[...e.props,...r].reduce(((t,n)=>{const r=function(e,t){const n=e.name;let r=e.initValue;if(!r&&e.autoInitValue&&(r=t(3)),!(0,o.kK)(r)){switch(typeof r){case"number":case"boolean":r=`{${r}}`;break;case"object":try{r=`{${JSON.stringify(r)}}`}catch(e){l.kg.error(e)}break;case"function":r=`{${r.toString()}}`;break;case"string":I(r)||(r=`"${r}"`)}return`${n}=${r}`}}(n,(t=>(0,a.Vj)(e.name,t)));return r?` ${t} ${r}`:t}),"")||"";n=e.hasChildren?`<${e.name} ${i}>${e.initChildren||e.defaultChildren||""}`:`<${e.name} ${i.trim()} />`;break}}return n}function me(e,t){return j(he(e,t))}class ge{constructor(e){this.map=new Map,this.prefix=(null==e?void 0:e.prefix)?encodeURIComponent(e.prefix):void 0}setItem(e,t){if(this.map.has(e)){const n=this.map.get(e);t&&!n.includes(t)&&n.push(t),this.map.set(e,n)}else{const n=t?[t]:[];this.map.set(e,n)}}generateId(e,t){var n;const r=(null===(n=this.map.get(e))||void 0===n?void 0:n.length)+1||1,i=t||`${(0,a.eV)(e)}${r}`;this.setItem(e,i);let s=`${e}:${i}`;return this.prefix&&(s=`${this.prefix}:${s}`),{id:i,fullId:s}}}var ye,_e;!function(e){e.ReplaceNode="replaceNode",e.InsertBefore="insertBefore",e.InsertAfter="insertAfter",e.InsertChild="insertChild",e.InsertFirstChild="insertFirstChild"}(ye||(ye={}));class be{get node(){return this.workspace.getNode(this.data.id,this.data.filename)}get prototype(){var e,t;return(null===(e=this.data)||void 0===e?void 0:e.name)?this.workspace.getPrototype(null===(t=this.data)||void 0===t?void 0:t.name):null}get id(){var e;return null===(e=this.data)||void 0===e?void 0:e.id}get bounding(){var e;return null===(e=this.data)||void 0===e?void 0:e.bounding}get display(){var e;return null===(e=this.data)||void 0===e?void 0:e.display}constructor(e){this.workspace=e,this.method=ye.InsertAfter,this.data=null,(0,s.rC)(this,{method:s.LO,data:s.LO,set:s.aD,clear:s.aD,node:s.Fl})}set(e,t){this.data=e,this.method=t}clear(){this.data=null}getNode(){return this.node}}!function(e){e.InitView="initView",e.AddFile="addFile",e.RemoveFile="removeFile",e.UpdateDependency="updateDependency",e.RemoveDependency="removeDependency",e.RemoveNode="removeNode",e.ReplaceNode="replaceNode",e.CloneNode="cloneNode",e.InsertNode="insertNode",e.InsertBeforeNode="insertBeforeNode",e.InsertAfterNode="insertAfterNode",e.DropNode="dropNode",e.UpdateAttribute="updateAttribute",e.UpdateCode="updateCode"}(_e||(_e={}));class ve{get index(){return this._index}get length(){return this._records.length}get list(){return(0,s.ZN)(this._records)}get couldBack(){return this._records.length>0&&this._index>-1}get couldForward(){return this._records.length>this._index+1}constructor(e){this._records=[],this._index=0,this._maxSize=100,this.workspace=e,(0,s.rC)(this,{_records:s.LO,_index:s.LO,back:s.aD,forward:s.aD,go:s.aD,push:s.aD,couldBack:s.Fl,couldForward:s.Fl})}_sync(e){e&&Object.keys(e).forEach((t=>{this.workspace.getFile(t).update(e[t])}))}back(){if(this.couldBack){const e=this._records[this._index-1];this._sync(e.data),this._index--}}forward(){if(this.couldForward){const e=this._records[this._index+1];this._sync(e.data),this._index++}}go(e){const t=this._records[e];t&&(this._sync(t.data),this._index=e)}push(e){this._index0&&(this._records.splice(0,t),this._index=this._records.length-1)}}var Ee=n(70393);class xe{get code(){return this._code}get cleanCode(){return this._cleanCode}constructor(e,t,n=!0){this.workspace=e,this.filename=t.filename,this.type=t.type,this.lastModified=Date.now(),n&&this.update(t.code)}update(e){(0,o.kK)(e)||(this.lastModified=Date.now(),this._code=e,this._cleanCode=e),this.workspace.onFilesChange([this.filename])}}class Se extends xe{constructor(e,t){super(e,t,!1),this.update(t.code),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}}class Oe extends xe{get object(){return(0,s.ZN)(this._object)}get json(){return(0,s.ZN)(this._object)}constructor(e,t){super(e,t,!1),this._object={},this.update(t.code),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,_object:s.LO,code:s.Fl,cleanCode:s.Fl,object:s.Fl,json:s.Fl,update:s.aD,setValue:s.aD})}update(e){if(this.lastModified=Date.now(),(0,o.kK)(e)){let e=JSON.stringify(this._object);try{e=y(e,"json")}catch(e){return void l.kg.error(e)}this._code=e,this._cleanCode=e}else{try{e=y(e,"json")}catch(e){return void l.kg.error(e)}this._code=e,this._cleanCode=e;try{const t=JSON.parse(e);this._object=t}catch(e){l.kg.error(e)}}this.workspace.onFilesChange([this.filename])}getValue(e){return(0,Ee.NA)(this.json,e)}setValue(e,t){const n=this.getValue(e);let r;return r="function"==typeof t?null==t?void 0:t(n):t,void 0!==r&&(0,Ee.sO)(this._object,e,r),this}deleteValue(e){const t=e.split("."),n=t.pop(),r=t.join(".");let i;return i=r?this.getValue(r):this.json,i?(delete i[n],r?this.setValue(r,i):this._object=i,this):this}}class Te extends xe{constructor(e,t,n=!0){super(e,t,n)}update(e,t=!0,n=!0){this.lastModified=Date.now(),(0,o.kK)(e)?this._syncByAst():this._syncByCode(e,t),this._analysisAst(),this.workspace.onFilesChange([this.filename]),n&&this.workspace.refresh([this.filename])}addImportDeclaration(e,t){return this.ast=te(this.ast,e,t),this}updateImportDeclaration(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{ImportDeclaration(e){if(T(e.node.source)===t){const r=ee(t,n);e.replaceWith(r),e.stop()}}}),e}(this.ast,e,t),this}_syncByAst(){const e=b(this.ast);this._code=e,this._cleanCode=e}_syncByCode(e,t=!0){e!==this._code&&(t&&(e=y(e)),this._code=e,this._cleanCode=e,this.ast=function(e){try{return(0,C.parse)(e,L)}catch(e){l.kg.error("[code2ast failed!]",e)}}(e))}_analysisAst(){const{imports:e}=function(e){const t={};return(0,W.default)(e,{ImportDeclaration(e){const{source:n,specifiers:r}=pe(e.node);t[n]=r}}),{imports:t}}(this.ast);this.importList=e}}class we extends Te{constructor(e,t){super(e,t,!1),this.update(t.code,!1,!1),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}}class Ce{get start(){return(0,s.ZN)(this._start)}get first(){if(this._items.length)return this._items[0]}get firstNode(){if(this.first)return this.workspace.getNode(this.first.id,this.first.filename)}get size(){return this._items.length}get selected(){return(0,s.ZN)(this._items)}get isSelected(){return!!this.selected.length}get file(){var e;return null===(e=this.firstNode)||void 0===e?void 0:e.file}get nodes(){return this._items.map((e=>this.workspace.getNode(e.id,e.filename))).filter((e=>!!e))}constructor(e){this._items=[],this._start={point:{x:0,y:0},element:null},this.workspace=e,(0,s.rC)(this,{_items:s.LO,_start:s.LO,select:s.aD,setStart:s.aD,clear:s.aD,start:s.Fl,selected:s.Fl,first:s.Fl,firstNode:s.Fl,size:s.Fl,isSelected:s.Fl,file:s.Fl,nodes:s.Fl})}add(){}remove(){}select(e){this._items=e?Array.isArray(e)?e:[e]:[],this._start=null}setStart(e){this._start=e}clear(){this._items=[]}}class Ae{get node(){var e,t;return this.workspace.getNode(null===(e=this.data)||void 0===e?void 0:e.id,null===(t=this.data)||void 0===t?void 0:t.filename)}get prototype(){var e;return this.workspace.getPrototype(null===(e=this.data)||void 0===e?void 0:e.name)}get id(){var e;return null===(e=this.data)||void 0===e?void 0:e.id}get name(){var e;return null===(e=this.data)||void 0===e?void 0:e.name}get bounding(){var e;return null===(e=this.data)||void 0===e?void 0:e.bounding}constructor(e){this.workspace=e,this.data=null,this.isDragging=!1,this.dropTarget=new be(e),(0,s.rC)(this,{data:s.LO,isDragging:s.LO,set:s.aD,clear:s.aD,node:s.Fl,prototype:s.Fl})}set(e){this.data=e,this.isDragging=!!e}clear(){this.data=null,this.isDragging=!1,this.dropTarget.clear()}getNode(){return this.node}}class Pe extends Te{get routes(){return(0,s.ZN)(this._routes)}constructor(e,t){super(e,t,!1),this.update(t.code,!0,!1),(0,s.rC)(this,{_routes:s.LO,_code:s.LO,_cleanCode:s.LO,routes:s.Fl,code:s.Fl,cleanCode:s.Fl,update:s.aD})}getRouteByRoutePath(e){let t;for(const n of this.routes)if(n.path===e){t=n;break}return t}addRoute(e,t){return this.ast=function(e,t,n){/.jsx?$/.test(n)&&(n=n.split(".")[0]);const r=(0,a.xf)(t.split("/").join("-"));return(0,W.default)(e,{Program(e){const t=H(e.node);e.node.body.splice(t,0,p.importDeclaration([p.importDefaultSpecifier(p.identifier(r))],p.stringLiteral(n.replace("/src","."))))},ArrayExpression(e){const n=p.objectExpression([p.objectProperty(p.identifier("path"),p.stringLiteral(t)),p.objectProperty(p.identifier("component"),p.identifier(r)),p.objectProperty(p.identifier("exact"),p.booleanLiteral(!0))]);e.node.elements.push(n)}}),e}(this.ast,e,t),this}updateRoute(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{ObjectExpression(e){e.node.properties.forEach((e=>{p.isObjectProperty(e)&&"path"===T(e.key,!1)&&T(e.value,!1)===t&&(e.value=p.stringLiteral(n))}))}}),e}(this.ast,e,t),this}removeRoute(e){if("/"===e)return void console.warn("index route should not be removed!");const t=this.getRouteByRoutePath(e);var n,r,i;return this.ast=(n=this.ast,r=e,i=t.importPath,(0,W.default)(n,{ArrayExpression(e){e.node.elements=e.node.elements.filter((e=>"ObjectExpression"!==e.type||T(e).path!==r))},ImportDeclaration(e){T(e.node.source)===i&&e.remove()}}),n),this}_analysisAst(){this._routes=ne(this.ast)}}class ke extends Te{get stores(){return(0,s.ZN)(this._stores)}constructor(e,t){super(e,t,!1),this._stores=[],this.update(t.code,!0,!1),(0,s.rC)(this,{_stores:s.LO,_code:s.LO,_cleanCode:s.LO,stores:s.Fl,code:s.Fl,cleanCode:s.Fl,update:s.aD})}_analysisAst(){this._stores=function(e){const t=[];return(0,W.default)(e,{ExportSpecifier(e){const n=S(e.node.exported);t.push(n)}}),t}(this.ast)}addStore(e){return this.ast=function(e,t){const n=`./${t}`,r=t;return(0,W.default)(e,{Program(e){const t=function(e){let t=0;return e.body.forEach(((e,n)=>{"ExportNamedDeclaration"===e.type&&(t=n+1)})),t}(e.node);e.node.body.splice(t,0,p.exportNamedDeclaration(null,[p.exportSpecifier(p.identifier("default"),p.identifier(r))],p.stringLiteral(n)))}}),e}(this.ast,e),this}removeStore(e){var t,n;return this.ast=(t=this.ast,n=e,(0,W.default)(t,{ExportNamedDeclaration(e){var t;S(null===(t=e.node.specifiers)||void 0===t?void 0:t[0].exported)===n&&(e.remove(),e.stop())}}),t),this}}class De extends Te{constructor(e,t){super(e,t,!1),this.name=f(t.filename),this.update(t.code,!0,!1),(0,s.rC)(this,{states:s.LO,actions:s.LO,_code:s.LO,_cleanCode:s.LO,cleanCode:s.Fl,code:s.Fl,update:s.aD})}addState(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{CallExpression(e){const{node:r}=e;k(S(r.callee))&&r.arguments.length&&p.isObjectExpression(r.arguments[0])&&(r.arguments[0].properties.push(p.objectProperty(p.identifier(t),j(n))),e.stop())}}),e}(this.ast,e,t),this}removeState(e){return this.ast=function(e,t){return(0,W.default)(e,{CallExpression(e){const{node:n}=e;if(k(S(n.callee))&&n.arguments.length&&p.isObjectExpression(n.arguments[0])){let{properties:e}=n.arguments[0];e=e.filter((e=>"SpreadElement"===e.type||S(e.key)!==t)),n.arguments[0].properties=e}}}),e}(this.ast,e),this}updateState(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{CallExpression(e){const{node:r}=e;if(k(S(r.callee))&&r.arguments.length&&p.isObjectExpression(r.arguments[0])){const{properties:e}=r.arguments[0];for(const r of e)if("SpreadElement"!==r.type&&S(r.key)===t&&"ObjectProperty"===r.type){r.value=j(n);break}}}}),e}(this.ast,e,t),this}_analysisAst(){const{namespace:e,states:t,actions:n}=function(e){let t;const n=[],r=[];return(0,W.default)(e,{CallExpression(e){const{node:i}=e;k(S(i.callee))&&i.arguments.length&&p.isObjectExpression(i.arguments[0])&&(i.arguments[0].properties.forEach((e=>{switch(e.type){case"ObjectMethod":n.push({name:S(e.key),type:"method"});break;case"ObjectProperty":{const t=S(e.key);p.isArrowFunctionExpression(e.value)||p.isFunctionExpression(e.value)?n.push({name:t,type:"method",code:O(e.value)}):r.push({name:t,type:"property",code:O(e.value)});break}}})),i.arguments[1]&&(t=T(i.arguments[1],!1)),e.stop())}}),{namespace:t,states:r,actions:n}}(this.ast);this.namespace=e||this.name,this.states=t,this.actions=n}}class Re extends Te{get serviceFunctions(){return(0,s.ZN)(this._serviceFunctions)}get baseConfig(){return(0,s.ZN)(this._baseConfig)}constructor(e,t){super(e,t,!1),this.name=f(t.filename),this.update(t.code,!0,!1),(0,s.rC)(this,{_serviceFunctions:s.LO,_baseConfig:s.LO,_code:s.LO,_cleanCode:s.LO,serviceFunctions:s.Fl,baseConfig:s.Fl,cleanCode:s.Fl,code:s.Fl,update:s.aD})}_analysisAst(){const{imports:e,services:t,baseConfig:n}=function(e){let t;const n={encryptFetch:!1},r={};return(0,W.default)(e,{ImportDeclaration(e){const{source:t,specifiers:n}=pe(e.node);r[t]=n},CallExpression(e){if(P(S(e.node.callee))){if(e.node.arguments.length&&(t=T(e.node.arguments[0],!1),e.node.arguments[1])){const t=T(e.node.arguments[1]);n.encryptFetch=!!t.encryptFetch,n.namespace=t.namespace||"index"}e.stop()}}}),{imports:r,services:t,baseConfig:n}}(this.ast);this.importList=e,this._serviceFunctions=t,this._baseConfig=n,n.namespace&&(this.name=n.namespace)}addServiceFunction(e,t){return this.ast=re(this.ast,{[e]:(0,Ee.d9)(t,!1)}),this}addServiceFunctions(e){return this.ast=re(this.ast,e),this}updateServiceFunction(e,t){return this.ast=re(this.ast,{[e]:(0,Ee.d9)(t,!1)}),this}deleteServiceFunction(e){try{this.ast=function(e,t){return(0,W.default)(e,{CallExpression(e){if(P(S(e.node.callee))){if(e.node.arguments.length){const n=e.node.arguments[0];if(p.isObjectExpression(n)){const e=n.properties.findIndex((e=>!!p.isObjectProperty(e)&&S(e.key)===t));n.properties.splice(e,1)}}e.stop()}}}),e}(this.ast,e)}catch(e){l.kg.error(e)}return this}updateBaseConfig(e){var t,n;return this.ast=(t=this.ast,n=e,(0,W.default)(t,{CallExpression(e){if(P(S(e.node.callee))){switch(e.node.arguments.length){case 1:e.node.arguments.push(N(n));break;case 2:{const t=e.node.arguments[1];if(p.isObjectExpression(t)){const r=T(t);e.node.arguments[1]=N(Object.assign(Object.assign({},r),n))}break}}e.stop()}}}),t),this}}class Ie{get loc(){var e;return null===(e=this.rawNode)||void 0===e?void 0:e.loc}constructor(e){this.file=e.file,this.id=e.id,this.component=e.component,this.rawNode=e.rawNode,this.props=z(le(e.rawNode))}cloneRawNode(e){return le(this.rawNode,e)}destroy(){this.file=null}}class Le extends Te{get nodes(){return this._nodes}get nodesTree(){return(0,s.ZN)(this._nodesTree)}get tree(){return this.ast}constructor(e,t){super(e,t,!1),this._codeIdList=[],this._nodes=new Map,this.idGenerator=new ge({prefix:t.filename}),this.update(t.code,!0,!1),(0,s.rC)(this,{_nodesTree:s.LO,_code:s.LO,_cleanCode:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}_syncByAst(){}_analysisAst(){const{ast:e,cleanAst:t,nodes:n,imports:r,importedModules:i,variables:s}=ce(this.ast,this.idGenerator);this.ast=e,this._code=b(e),this._cleanCode=b(t),this._importedModules=i,this.importList=r,this.importMap=function(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];null==r||r.forEach((e=>{t[e.localName]={source:n,isDefault:"ImportDefaultSpecifier"===e.type}}))})),t}(r),this.variables=s,this._nodes.clear(),this._codeIdList=[],n.forEach((e=>{const t=new Ie(Object.assign(Object.assign({},e),{file:this}));this._nodes.set(e.id,t),e.codeId&&this._codeIdList.push(e.codeId)})),this._nodesTree=function(e){const t={};return e.forEach((e=>{t[e.id]||(t[e.id]=Object.assign(Object.assign({},e),{children:[]})),e.parentId&&t[e.parentId]&&t[e.parentId].children.push(t[e.id])})),Object.values(t).filter((e=>!e.parentId))}(n)}hasNodeByCodeId(e){return this._codeIdList.includes(e)}listImportSources(){return Object.keys(this.importList)}listModals(){const e=[],t=this.nodes||new Map;return Array.from(t.values()).forEach((t=>{["Modal","Drawer"].includes(t.component)&&t.props.id&&e.push({label:`${t.component}(${t.props.id})`,value:t.props.id})})),e}listForms(){const e={},t=this.nodes;return Array.from(t.values()).forEach((t=>{["XAction","XColumnAction","XForm","XStepForm","XSearchForm","XFormList"].includes(t.component)&&(e[t.id]=X(t.rawNode))})),e}addImportSpecifiers(e,t){const n=this.importList[e];if(n){const r=t.filter((e=>!n.find((t=>t.localName===e.localName))));this.ast=function(e,t,n){return(0,W.default)(e,{ImportDeclaration(e){if(T(e.node.source)===t){const t=J(n);e.node.specifiers.push(...t),e.stop()}}}),e}(this.ast,e,r)}else this.ast=te(this.ast,e,t);return this}updateImportSpecifiersLegacy(e){const t=this._importedModules[e.sourcePath];let n;if(t){const r=Array.isArray(t)?t[0]:t,i=Array.isArray(t)?t.reduce(((e,t)=>e.concat(t.specifiers||[])),[]):t.specifiers,s=e.specifiers.filter((e=>!i.includes(e)));n=function(e,t){return(0,W.default)(e,{ImportDeclaration(e){if(T(e.node.source)===t.sourcePath){const n=Y(t);e.replaceWith(n),e.stop()}}}),e}(this.ast,Object.assign(Object.assign({},e),{specifiers:s.concat(r.specifiers)}))}else n=function(e,t){return(0,W.default)(e,{Program(e){const n=H(e.node),r=Y(t);e.node.body.splice(n,0,r),e.stop()}}),e}(this.ast,e);return this.ast=n,this}removeUnusedImportSpecifiers(){var e;return this.ast=(e=this.ast,(0,W.default)(e,{ImportDeclaration(e){const t=e.node.source.value;if(!e.node.specifiers.length&&/\.(css|less|scss|js)$/.test(t))return;if(!e.node.specifiers.length)return void e.remove();const n=e.node.specifiers.filter((t=>{const n=S(t.local),r=e.scope.getBinding(n);return null==r?void 0:r.referenced}));n.length?n.length!==e.node.specifiers.length&&(e.node.specifiers=n):e.remove()}}),e),this}getNode(e){return this._nodes.get(e)}removeNode(e){var t,n;return this.ast=(t=this.ast,n=e,(0,W.default)(t,{JSXElement(e){if(G(e.node,n)){const{parentPath:t}=e,n=e.parentPath.parentPath;p.isJSXElement(t.node)?e.remove():p.isJSXAttribute(n.node)?n.remove():l.kg.error("removeJSXElement failed",e.node),e.stop()}}}),t),this}updateNodeAttribute(e,t,n,r){return this.updateNodeAttributes(e,{[t]:n},r)}updateNodeAttributes(e,t,n){if(n&&n.length){const e=n.reduce(((e,t)=>{const n=this.workspace.getPrototype(t),{source:r,specifiers:i}=fe(n,this.filename),s=e[r];return s?i.forEach((e=>{s.find((t=>t.localName===e.localName))||s.push(e)})):e[r]=i,e}),{});Object.keys(e).forEach((t=>{this.addImportSpecifiers(t,e[t])}))}return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(Object.keys(n).forEach((t=>{Z(e.node,t,n[t])})),e.stop())}}),e}(this.ast,e,t),this}insertChild(e,t,n="last"){return this.ast=function(e,t,n,r){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(e.node.openingElement.selfClosing&&(e.node.openingElement.selfClosing=!1,e.node.closingElement=p.jSXClosingElement(e.node.openingElement.name)),"last"===r?e.node.children.push(n):e.node.children.unshift(n),e.stop())}}),e}(this.ast,e,t,n),this}insertAfter(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){if(G(e.node,t)){if(e.parentPath.isJSXElement())e.insertAfter(n);else if(e.parentPath.isJSXExpressionContainer()){const t=p.jsxFragment(p.jsxOpeningFragment(),p.jsxClosingFragment(),[p.cloneDeepWithoutLoc(e.node),n]);e.replaceWith(t)}e.stop()}}}),e}(this.ast,e,t),this}insertBefore(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(e.insertBefore(n),e.stop())}}),e}(this.ast,e,t),this}replaceNode(e,t){return this.ast=function(e,t,n){return(0,W.default)(e,{JSXElement(e){G(e.node,t)&&(e.replaceWith(n),e.stop())}}),e}(this.ast,e,t),this}replaceViewChildren(e,t){var n,r;return e.length&&(this.ast=(n=this.ast,r=e,(0,W.default)(n,{JSXElement(e){e.node.children=r,e.stop()}}),n)),(null==t?void 0:t.length)&&t.forEach((e=>{this.updateImportSpecifiersLegacy(e)})),this}}class Be extends Te{constructor(e,t){super(e,t,!1),this.update(t.code,!1,!1),(0,s.rC)(this,{_code:s.LO,_cleanCode:s.LO,exportList:s.LO,code:s.Fl,cleanCode:s.Fl,update:s.aD})}_analysisAst(){const e=d.dirname(this.filename),{exportMap:t}=ue(this.ast,e);this.exportList=t,Object.keys(this.exportList).forEach((t=>{this.workspace.componentPrototypes.set(t,{name:t,exportType:"namedExport",package:e,type:"element"})}))}}class Me extends EventTarget{get projectConfig(){var e;return null===(e=this.tangoConfigJson)||void 0===e?void 0:e.json}get activeViewModule(){return this.activeViewFile||this.setActiveViewFile(this.activeRoute),this.files.get(this.activeViewFile)}get pages(){var e;const t=[];return null===(e=this.routeModule)||void 0===e||e.routes.forEach((e=>{"*"!==e.path&&t.push({path:e.path,name:e.component})})),t}get bizComps(){var e,t;const n=null===(e=this.tangoConfigJson)||void 0===e?void 0:e.getValue("packages");let r=(null===(t=this.tangoConfigJson)||void 0===t?void 0:t.getValue("bizDependencies"))||[];return n&&(r=[...new Set([...r,...Object.keys(n).filter((e=>"bizDependency"===n[e].type))])]),r}get baseComps(){var e,t;const n=null===(e=this.tangoConfigJson)||void 0===e?void 0:e.getValue("packages");let r=(null===(t=this.tangoConfigJson)||void 0===t?void 0:t.getValue("baseDependencies"))||[];return n&&(r=[...new Set([...r,...Object.keys(n).filter((e=>"baseDependency"===n[e].type))])]),r}get localComps(){var e;return Object.keys((null===(e=this.componentsEntryModule)||void 0===e?void 0:e.exportList)||{})}constructor(e){super(),this.storeModules={},this.serviceModules={},this.on=this.addEventListener,this.off=this.removeEventListener,this.history=new ve(this),this.selectSource=new Ce(this),this.dragSource=new Ae(this),this.componentPrototypes=new Map,this.entry=null==e?void 0:e.entry,this.activeRoute=(null==e?void 0:e.defaultActiveRoute)||"/",this.activeFile=null==e?void 0:e.entry,this.activeViewFile="",this.files=new Map,this.isReady=!1,(null==e?void 0:e.onFilesChange)&&(this.onFilesChange=e.onFilesChange),(null==e?void 0:e.files)&&this.addFiles(e.files),(null==e?void 0:e.prototypes)&&this.setComponentPrototypes(e.prototypes),(0,s.rC)(this,{files:s.LO,activeRoute:s.LO,activeFile:s.LO,activeViewFile:s.LO,pages:s.Fl,bizComps:s.Fl,setActiveRoute:s.aD,setActiveFile:s.aD,addFile:s.aD,removeFile:s.aD})}getPrototype(e){return(0,o.HD)(e)?this.componentPrototypes.get(e):e}setActiveRoute(e){e!==this.activeRoute&&(this.selectSource.clear(),this.activeRoute=e,this.setActiveViewFile(e))}setActiveFile(e,t=!1){this.activeFile=e,t&&(this.activeViewFile=e)}setActiveViewFile(e){let t=this.getFilenameByRoutePath(e);if(!t)for(const[e,n]of this.files)if(n.type===i.JsxViewModule){t=n.filename;break}t&&this.setActiveFile(t,!0)}setComponentPrototypes(e){Object.keys(e).forEach((t=>{this.componentPrototypes.set(t,e[t])}))}addFiles(e=[]){e.forEach((e=>{this.addFile(e.filename,e.code,e.type)}))}addFile(e,t,n){var r;const s=n||function(e){return/\/tango\.config\.json$/.test(e)?i.TangoConfigJson:/\/appJson\.json$/.test(e)?i.AppJson:/\/package\.json$/.test(e)?i.PackageJson:/\/routes\.js$/.test(e)?i.RouteModule:/\/pages\/.+\.jsx?$/.test(e)?i.JsxViewModule:/\/pages\/.+\.schema\.json?$/.test(e)?i.JsonViewModule:/\/(blocks|components)\/index\.js/.test(e)?i.ComponentsEntryModule:/\/services\/.+\.js$/.test(e)||/service\.js$/.test(e)?i.ServiceModule:/\/stores\/index\.js$/.test(e)?i.StoreEntryModule:/\/stores\/.+\.js$/.test(e)?i.StoreModule:/\.jsx?$/.test(e)?i.Module:/\.json$/.test(e)?i.Json:/\.less$/.test(e)?i.Less:/\.scss$/.test(e)?i.Scss:i.File}(e),o={filename:e,code:t,type:s};let a;switch(s){case i.StoreEntryModule:a=new ke(this,o),this.storeEntryModule=a;break;case i.ComponentsEntryModule:a=new Be(this,o),this.componentsEntryModule=a;break;case i.RouteModule:a=new Pe(this,o),this.routeModule=a;a.routes.find((e=>e.path===this.activeRoute))||this.setActiveRoute(null===(r=a.routes[0])||void 0===r?void 0:r.path);break;case i.JsxViewModule:a=new Le(this,o);break;case i.ServiceModule:a=new Re(this,o),this.serviceModules[a.name]=a;break;case i.StoreModule:a=new De(this,o),this.storeModules[a.name]=a;break;case i.Module:a=new we(this,o);break;case i.Less:a=new Se(this,o);break;case i.PackageJson:a=new Oe(this,o),this.packageJson=a;break;case i.TangoConfigJson:a=new Oe(this,o),this.tangoConfigJson=a;break;case i.Json:a=new Oe(this,o);break;default:a=new xe(this,o)}this.files.set(e,a)}addServiceFile(e,t){const n=`/src/services/${e}.js`;this.addFile(n,t,i.ServiceModule);const r=this.serviceModules.index;null==r||r.addImportDeclaration(`./${e}`,[]).update()}addStoreFile(e,t){const n=`/src/stores/${e}.js`;this.addFile(n,t),this.storeEntryModule||this.addFile("/src/stores/index.js",""),this.storeEntryModule.addStore(e).update()}addViewFile(e,t){const n=e.startsWith("/")?e:`/${e}`,r=`/src/pages/${e}.js`;this.addFile(r,t),this.addRoute({name:e,path:n},r)}updateFile(e,t,n=!1){const r=this.getFile(e);r.update(t),n&&r instanceof Le&&r.removeUnusedImportSpecifiers().update(),this.history.push({message:_e.UpdateCode,data:{[e]:t}})}removeFile(e){this.files.get(e)?this.files.delete(e):Array.from(this.files.keys()).forEach((t=>{t.startsWith(`${e}/`)&&this.files.delete(t)}))}renameFile(e,t){const n=this.files.get(e);n&&(this.removeFile(e),this.addFile(t,n.code))}renameFolder(e,t){Array.from(this.files.keys()).forEach((n=>{if(n.startsWith(`${e}/`)){const r=n.replace(e,t);this.renameFile(n,r)}}))}getFile(e){return this.files.get(e)}listFiles(){const e={};return this.files.forEach((t=>{e[t.filename]=t.cleanCode})),e}removeViewModule(e){var t;const n=this.getFilenameByRoutePath(e);this.routeModule&&(this.routeModule.removeRoute(e).update(),this.setActiveRoute((null===(t=this.routeModule.routes[0])||void 0===t?void 0:t.path)||"/")),this.removeFile(n)}addRoute(e,t){var n;null===(n=this.routeModule)||void 0===n||n.addRoute(e.path,t).update()}updateRoute(e,t){var n;e!==t.path&&(null===(n=this.routeModule)||void 0===n||n.updateRoute(e,t.path).update())}copyViewPage(e,t){const n=this.getRealViewFilePath(this.getFilenameByRoutePath(e)),r=h(t.path,"/src/pages");this.copyFiles(n,r),this.addRoute(t,r)}getNode(e,t){const n=t?this.getFile(t):this.activeViewModule;if(n instanceof Le)return n.getNode(e)}ready(){var e,t;this.isReady||(this.isReady=!0,this.history.push({message:_e.InitView,data:{[null===(e=this.activeViewModule)||void 0===e?void 0:e.filename]:null===(t=this.activeViewModule)||void 0===t?void 0:t.code}}))}addStoreModule(e,t){this.addStoreFile(e,t)}removeStoreModule(e){const t=h(e,"/src/stores",".js");this.storeEntryModule.removeStore(e).update(),this.removeFile(t)}addStoreState(e,t,n){var r;null===(r=this.storeModules[e])||void 0===r||r.addState(t,n).update()}removeStoreState(e,t){var n;null===(n=this.storeModules[e])||void 0===n||n.removeState(t).update()}removeStoreVariable(e){const{storeName:t,variableName:n}=(0,a.qZ)(e);this.removeStoreState(t,n)}updateStoreVariable(e,t){var n;if((0,o.q9)(e)){const{storeName:r,variableName:i}=(0,a.qZ)(e);null===(n=this.storeModules[r])||void 0===n||n.updateState(i,t).update()}}getServiceFunction(e){var t;const{name:n,moduleName:r}=(0,a.Ak)(e);if(n)return{name:n,moduleName:r,config:null===(t=this.serviceModules[r])||void 0===t?void 0:t.serviceFunctions[n]}}listServiceFunctions(){const e={};return Object.keys(this.serviceModules).forEach((t=>{const n=this.serviceModules[t];Object.keys(n.serviceFunctions).forEach((r=>{const i="index"===t?r:[t,r].join(".");e[i]=n.serviceFunctions[r]}))})),e}updateServiceFunction(e,t,n="index"){this.serviceModules[n].updateServiceFunction(e,t).update()}addServiceFunction(e,t,n="index"){var r;null===(r=this.serviceModules[n])||void 0===r||r.addServiceFunction(e,t).update()}addServiceFunctions(e,t="index"){var n;null===(n=this.serviceModules[t])||void 0===n||n.addServiceFunctions(e).update()}removeServiceFunction(e){var t;const{moduleName:n,name:r}=(0,a.Ak)(e);null===(t=this.serviceModules[n])||void 0===t||t.deleteServiceFunction(r).update()}updateServiceBaseConfig(e,t="index"){var n;null===(n=this.serviceModules[t])||void 0===n||n.updateBaseConfig(e).update()}addDependency(e){}listDependencies(){var e;return null===(e=this.packageJson)||void 0===e?void 0:e.getValue("dependencies")}getDependency(e){var t,n;const r=null===(t=this.tangoConfigJson)||void 0===t?void 0:t.getValue("packages"),i=null===(n=this.packageJson)||void 0===n?void 0:n.getValue("dependencies");return Object.assign({version:null==i?void 0:i[e]},(null==r?void 0:r[e])||{})}updateDependency(e,t,n){var r,i;null===(r=this.packageJson)||void 0===r||r.setValue("dependencies",((n={})=>(n[e]=t,n))).update(),null===(i=this.tangoConfigJson)||void 0===i||i.setValue("packages",(r=>{var i;if(r)return((null==n?void 0:n.package)||r[e])&&(r[e]=Object.assign(Object.assign({type:null===(i=r[e])||void 0===i?void 0:i.type},(null==n?void 0:n.package)||r[e]),{version:t})),r})).update(),this.history.push({message:_e.UpdateDependency,data:{[this.packageJson.filename]:this.packageJson.code}})}removeDependency(e){var t,n;null===(t=this.packageJson)||void 0===t||t.setValue("dependencies",(t=>(t[e]&&delete t[e],t))).update(),null===(n=this.tangoConfigJson)||void 0===n||n.setValue("packages",((t={})=>((null==t?void 0:t[e])&&delete t[e],t))).update(),this.history.push({message:_e.RemoveDependency,data:{[this.packageJson.filename]:this.packageJson.code}})}removeBizComp(e){var t;null===(t=this.tangoConfigJson)||void 0===t||t.setValue("bizDependencies",(t=>{if(t)return t.filter((t=>t!==e))})).update(),this.removeDependency(e)}addBizComp(e,t,n){var r;const i=this.tangoConfigJson.getValue("packages");this.updateDependency(e,t,Object.assign(Object.assign({},n),!!i&&{package:Object.assign(Object.assign({},null==n?void 0:n.package),{type:"bizDependency"})})),(null==n?void 0:n.package)||i||null===(r=this.tangoConfigJson)||void 0===r||r.setValue("bizDependencies",((t=[])=>(t.includes(e)||t.push(e),t))).update(),this.tangoConfigJson&&this.history.push({message:_e.UpdateDependency,data:{[this.tangoConfigJson.filename]:this.tangoConfigJson.code}})}removeSelectedNode(){const e=this.selectSource.file;e&&(this.selectSource.nodes.forEach((t=>{e.removeNode(t.id)})),e.update(),this.selectSource.clear(),this.history.push({message:_e.RemoveNode,data:{[e.filename]:e.code}}))}copySelectedNode(){this.copyTempNodes=this.selectSource.nodes}pasteSelectedNode(){if(1!==this.selectSource.size)return;if(!this.copyTempNodes)return;this.getImportDeclarationByNodes(this.copyTempNodes.map((e=>e.rawNode))).forEach((e=>{this.activeViewModule.updateImportSpecifiersLegacy(e)})),this.copyTempNodes.forEach((e=>{this.activeViewModule.insertAfter(this.selectSource.first.id,e.cloneRawNode())})),this.activeViewModule.update(),this.history.push({message:_e.CloneNode,data:{[this.activeViewModule.filename]:this.activeViewModule.code}})}cloneSelectedNode(){var e,t;const n=this.selectSource.file;let r;(null===(t=null===(e=this.projectConfig)||void 0===e?void 0:e.designerConfig)||void 0===t?void 0:t.autoGenerateComponentId)&&(r={tid:n.idGenerator.generateId(this.selectSource.firstNode.component).id}),n.insertAfter(this.selectSource.first.id,this.selectSource.firstNode.cloneRawNode(r)).update(),this.history.push({message:_e.CloneNode,data:{[n.filename]:n.code}})}insertToNode(e,t){if(!e||!t)return;const n=this.getPrototype(t),r=me(n),i=this.getNode(e).file,{source:s,specifiers:o}=fe(n,i.filename);i.insertChild(e,r,"last").addImportSpecifiers(s,o).update(),this.history.push({message:_e.InsertNode,data:{[i.filename]:i.code}})}replaceNode(e,t){if(!e||!t)return;const n=this.getPrototype(t),r=me(n),i=this.getNode(e).file,{source:s,specifiers:o}=fe(n,i.filename);i.replaceNode(e,r).addImportSpecifiers(s,o).update(),this.history.push({message:_e.ReplaceNode,data:{[i.filename]:i.code}})}insertToSelectedNode(e){const t=this.getPrototype(e);if(t){const e=me(t),n=this.selectSource.file,{source:r,specifiers:i}=fe(t,n.filename);n.insertChild(this.selectSource.first.id,e,"last").addImportSpecifiers(r,i).update(),this.history.push({message:_e.InsertNode,data:{[n.filename]:n.code}})}}insertBeforeSelectedNode(e){if(!e)return;const t=this.selectSource.first.id,n=this.getPrototype(e),r=me(n),i=this.getNode(t).file,{source:s,specifiers:o}=fe(n,i.filename);i.insertBefore(t,r).addImportSpecifiers(s,o).update(),this.history.push({message:_e.InsertBeforeNode,data:{[i.filename]:i.code}})}insertAfterSelectedNode(e){if(!e)return;const t=this.selectSource.first.id,n=this.getPrototype(e),r=me(n),i=this.getNode(t).file,{source:s,specifiers:o}=fe(n,i.filename);i.insertAfter(t,r).addImportSpecifiers(s,o).update(),this.history.push({message:_e.InsertAfterNode,data:{[i.filename]:i.code}})}updateSelectedNodeAttributes(e={},t=[]){const n=this.selectSource.file;n.updateNodeAttributes(this.selectSource.first.id,e,t).update(),this.history.push({message:_e.UpdateAttribute,data:{[n.filename]:n.code}})}dropNode(){var e,t,n,r;const i=this.dragSource,s=i.dropTarget;if(!i.prototype||!s.id)return void l.kg.error("invalid dragSource or dropTarget");const o=i.prototype;let a,c;if((null===(t=null===(e=this.projectConfig)||void 0===e?void 0:e.designerConfig)||void 0===t?void 0:t.autoGenerateComponentId)&&(a={tid:this.activeViewModule.idGenerator.generateId(i.prototype.name).id}),c=i.id?i.getNode().cloneRawNode():me(i.prototype,a),!c)return;const u=null===(n=s.node)||void 0===n?void 0:n.file,p=null===(r=i.node)||void 0===r?void 0:r.file,{source:d,specifiers:f}=fe(o,u.filename);let h=!0;switch(s.method){case ye.InsertChild:u.insertChild(s.id,c,"last").addImportSpecifiers(d,f);break;case ye.InsertFirstChild:u.insertChild(s.id,c,"first").addImportSpecifiers(d,f);break;case ye.InsertAfter:u.insertAfter(s.id,c).addImportSpecifiers(d,f);break;case ye.InsertBefore:u.insertBefore(s.id,c).addImportSpecifiers(d,f);break;case ye.ReplaceNode:u.replaceNode(s.id,c).addImportSpecifiers(d,f);break;default:h=!1}const m=!!i.id;h&&(m&&p.removeNode(i.id),this.selectSource.clear()),u.update(),m&&p.filename!==u.filename&&p.update(),i.clear(),h&&this.history.push({message:_e.DropNode,data:{[u.filename]:u.code}})}onFilesChange(e){}refresh(e){this.dispatchEvent(new CustomEvent("refresh",{detail:{filenames:e,entry:this.entry}}))}getImportDeclarationByNodes(e){let t=e.reduce(((e,t)=>(e=e.concat(function(e){const t=new Set;return q(e,{JSXElement(e){const n=ie(e.node);if(!n)return;if(n.toLowerCase()===n)return;const r=n.split(".");r.length&&t.add(r[0])}}),Array.from(t)}(t)),e)),[]);t=(0,c.jj)(t);const n=function(e,t){const n={};return e.forEach((e=>{const r=t[e];r&&function(e,t,n,r=!1,i=!0){i&&(e[t]={}),r?e[t].defaultSpecifier=n:e[t].specifiers?e[t].specifiers.push(n):e[t].specifiers=[n]}(n,r.source,e,r.isDefault,!n[r.source])})),Object.keys(n).map((e=>Object.assign({sourcePath:e},n[e])))}(t,this.selectSource.file.importMap);return n}getFilenameByRoutePath(e){var t;let n;return null===(t=this.routeModule)||void 0===t||t.routes.forEach((t=>{if(function(e,t){if(!e)return!1;if((e=e.split("?")[0])===t)return!0;const n=t.replaceAll(/:\w+/gi,"\\w+");return new RegExp(`^${n}$`,"i").test(e)}(e,t.path)&&t.importPath){const e=t.importPath.replace(".","/src");n=this.getRealViewFilePath(e)}})),n}getRealViewFilePath(e){if((0,a.U_)(e))return e;const t=[`${e}.js`,`${e}.jsx`,`${e}/index.js`,`${e}/index.jsx`];for(const e of t)if(this.files.has(e))return e}copyFiles(e,t){if(this.files.has(e)){const n=this.files.get(e);this.addFile(`${t}.js`,n.cleanCode,n.type)}else this.files.has(`${e}/index.js`)?Array.from(this.files.keys()).forEach((n=>{if(n.startsWith(`${e}/`)){const r=this.getFile(n);this.addFile(t+n.slice(e.length),r.cleanCode,r.type)}})):l.kg.error("copyFiles failed, source: %s, target: %s",e,t)}}const je={desktop:{name:"desktop",width:1366,height:800},phone:{name:"phone",width:375,height:812}};class Ne{get simulator(){return(0,s.ZN)(this._simulator)}get viewport(){return(0,s.ZN)(this._viewport)}get activeView(){return this._activeView}get isPreview(){return this._isPreview}get showSmartWizard(){return this._showSmartWizard}get activeSidebarPanel(){return this._activeSidebarPanel}get showRightPanel(){return this._showRightPanel}constructor(e){this._simulator=je.desktop,this._viewport={width:1366,height:800},this._activeView="design",this._activeSidebarPanel="",this._showSmartWizard=!1,this._showRightPanel=!0,this._isPreview=!1,this.workspace=e.workspace;const{simulator:t,activeSidebarPanel:n}=e;t&&this.setSimulator(t),n&&this.setActiveSidebarPanel(n),(0,s.rC)(this,{_simulator:s.LO,_viewport:s.LO,_activeView:s.LO,_activeSidebarPanel:s.LO,_showSmartWizard:s.LO,_showRightPanel:s.LO,_isPreview:s.LO,simulator:s.Fl,viewport:s.Fl,activeView:s.Fl,activeSidebarPanel:s.Fl,isPreview:s.Fl,showRightPanel:s.Fl,showSmartWizard:s.Fl,setSimulator:s.aD,setViewport:s.aD,setActiveView:s.aD,setActiveSidebarPanel:s.aD,closeSidebarPanel:s.aD,toggleRightPanel:s.aD,toggleSmartWizard:s.aD,toggleIsPreview:s.aD})}setSimulator(e){this._simulator="string"==typeof e?je[e]:e}setViewport(e){this._viewport=e}setActiveView(e){this._activeView=e}setActiveSidebarPanel(e){e&&e!==this.activeSidebarPanel?this._activeSidebarPanel=e:this._activeSidebarPanel=""}closeSidebarPanel(){this._activeSidebarPanel=""}toggleSmartWizard(e){this._showSmartWizard=e}toggleRightPanel(e){this._showRightPanel=null!=e?e:!this._showRightPanel}toggleIsPreview(e){this._isPreview=null!=e?e:!this._isPreview,e&&this.workspace.selectSource.clear()}}function Fe({workspace:e,defaultSimulatorMode:t="desktop",defaultActiveSidebarPanel:n=""}){return new r({workspace:e,designer:new Ne({workspace:e,simulator:t,activeSidebarPanel:n})})}},87190:function(e,t,n){"use strict";n.d(t,{pq:function(){return r5},lg:function(){return N},Ab:function(){return F},Bz:function(){return t5},pv:function(){return I5},TD:function(){return SJ},YE:function(){return u2},o8:function(){return t0},qs:function(){return U},Jd:function(){return OJ},qX:function(){return KK},Qp:function(){return L5}});var r=n(87363),i=n.n(r);n(8679);function s(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,s=i().createContext(void 0);return s.displayName=r,[s.Provider,function(){const e=i().useContext(s);if(!e&&t)throw new Error(n);return e},s]}const[o,a]=s({name:"DesignerContext"}),l=()=>{var e;return null===(e=a())||void 0===e?void 0:e.sandboxQuery};var c=n(62979),u=n(81821),p=n(68949);if(!r.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!p.rC)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var d=n(61533);function f(e){e()}function h(e){return(0,p.Gf)(e)}var m=!1;function g(){return m}var y=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach((function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))})),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),_=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:y)((function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null})),b=n(61688),v=function(){};function E(e){e.reaction=new p.le("observer".concat(e.name),(function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)}))}function x(e,t){if(void 0===t&&(t="observed"),g())return e();var n=i().useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return _.unregister(r),r.onStoreChange=e,r.reaction||(E(r),r.stateVersion=Symbol()),function(){var e;r.onStoreChange=null,null===(e=r.reaction)||void 0===e||e.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var s,o,a=n.current;if(a.reaction||(E(a),_.register(n,a,a)),i().useDebugValue(a.reaction,h),(0,b.useSyncExternalStore)(a.subscribe,a.getSnapshot,v),a.reaction.track((function(){try{s=e()}catch(e){o=e}})),o)throw o;return s}var S="function"==typeof Symbol&&Symbol.for,O=S?Symbol.for("react.forward_ref"):"function"==typeof r.forwardRef&&(0,r.forwardRef)((function(e){return null})).$$typeof,T=S?Symbol.for("react.memo"):"function"==typeof r.memo&&(0,r.memo)((function(e){return null})).$$typeof;function w(e,t){var n;if(T&&e.$$typeof===T)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(g())return e;var i=null!==(n=null==t?void 0:t.forwardRef)&&void 0!==n&&n,s=e,o=e.displayName||e.name;if(O&&e.$$typeof===O&&(i=!0,"function"!=typeof(s=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(e,t){return x((function(){return s(e,t)}),o)};return a.displayName=e.displayName,Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes),i&&(a=(0,r.forwardRef)(a)),function(e,t){Object.keys(e).forEach((function(n){C[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,a=(0,r.memo)(a)),a}var C={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};var A,P;(P=d.unstable_batchedUpdates)||(P=f),(0,p.jQ)({reactionScheduler:P});A=_.finalizeAllImmediately;const[k,D]=s({name:"TangoEngineContext"}),R=()=>{var e;return null===(e=D())||void 0===e?void 0:e.engine.workspace},I=()=>{var e;return null===(e=D())||void 0===e?void 0:e.engine.designer},L=()=>{var e,t,n,r,i;const s=D(),o=R(),a=[],l=[],c=[],u=[];Object.values(o.storeModules).forEach((e=>{const t=`stores.${e.name}`,n=e.states.map((e=>({title:e.name,key:`${t}.${e.name}`,raw:e.code,showRemoveButton:!0}))),r=e.actions.map((e=>({title:e.name,key:`${t}.${e.name}`,type:"function",raw:e.code,showRemoveButton:!0})));a.push({title:e.name,key:t,selectable:!1,children:n,showAddButton:!0}),l.push({title:e.name,key:t,selectable:!1,children:r}),c.push({title:e.name,key:t,selectable:!1,children:[...n,...r],showAddButton:!0})})),Object.values(o.serviceModules).forEach((e=>{const t="index"!==e.name?`services.${e.name}`:"services";u.push({title:e.name,key:t,selectable:!1,showAddButton:!0,children:Object.keys(e.serviceFunctions||{}).map((e=>({title:e,key:[t,e].join("."),type:"function",showRemoveButton:!0})))})}));const p=null===(e=o.pages)||void 0===e?void 0:e.map((e=>({label:`${e.name} (${e.path})`,value:e.path})));let d=[B("数据模型","$stores",l),B("服务函数","$services",u)];(null===(t=s.config)||void 0===t?void 0:t.customActionVariables)&&(d=d.concat(null===(n=s.config)||void 0===n?void 0:n.customActionVariables));let f=[B("数据模型","$stores",c),B("服务函数","$services",u)];return(null===(r=s.config)||void 0===r?void 0:r.customExpressionVariables)&&(f=f.concat(null===(i=s.config)||void 0===i?void 0:i.customExpressionVariables)),{modelVariables:[B("数据模型","stores",a)],actionVariables:d,storeVariables:c,serviceVariables:u,expressionVariables:f,routeOptions:p}};function B(e,t,n){return{key:t,title:e,children:n}}var M=n(82925),j=(0,c.B1)({colors:{primary:{10:"#e8f3ff",20:"#bedaff",30:"#94bfff",40:"#6aa1ff",50:"#4080ff",60:"#165dff",70:"#0e42d2"},line:{normal:"#e5e6eb"},background:{normal:"#f3f3f4",secondary:"#e5e6eb"},text:{title:"#1d2129",body:"#4e5969",note:"#86909c",placeholder:"#c9cdd4"},custom:{topNavBg:"#222",topNavColor:"#fff",topNavBorderColor:"#222",toolbarDividerColor:"gray.60",toolbarButtonBg:"rgba(223, 223, 223, 0.08)",toolbarButtonBgHover:"#4080ff",toolbarButtonBgDisabled:"rgba(223,223,223, 0.08)",toolbarButtonBgActive:"#4080ff",toolbarButtonTextColor:"#FFF",toolbarButtonTextColorHover:"#FFF",toolbarButtonTextColorDisabled:"hsla(0,0%,100%,0.3)",toolbarButtonTextColorActive:"#fff",sidebarBg:"#fff",sidebarExpandBg:"#fff",sidebarItemActiveBg:"#f2f3f5",sidebarItemHoverBg:"#f2f3f5",viewportBg:"#f0f2f5"}},radii:{s:"2px",m:"2px",l:"4px",xl:"8px",xxl:"16px"}});function N(e){const{engine:t,config:n,theme:s,sandboxQuery:a,remoteServices:l={},children:p}=e,d=(0,r.useMemo)((()=>(0,c.B1)(s,j)),[s]);return i().createElement(c.Xn,{theme:d,prefix:"--tango"},i().createElement(u.ConfigProvider,{locale:M.Z},i().createElement(k,{value:{engine:t,config:n}},i().createElement(o,{value:{sandboxQuery:a,remoteServices:l}},p))))}function F(e){const{header:t,logo:n,description:r,actions:s,children:o}=e;return i().createElement(c.xu,{height:"100vh",overflow:"hidden",className:"DesignerPanel"},null!=t?t:i().createElement(c.xu,{display:"flex",justifyContent:"space-between",alignItems:"center",height:"48px",bg:"colors.custom.topNavBg",color:"colors.custom.topNavColor",borderBottom:"solid",borderColor:"colors.custom.topNavBorderColor",className:"DesignerPanelHeader"},i().createElement(c.xu,{display:"flex",alignItems:"center"},n,r),i().createElement(c.xu,{flex:"1"},s)),i().createElement(c.xu,{display:"flex",height:"calc(100vh - 48px)",overflow:"hidden",className:"DesignerPanelBody"},o))}function U({children:e}){return i().createElement(c.xu,{flex:"1",display:"flex",flexDirection:"column",overflow:"hidden",bg:"colors.custom.viewportBg",position:"relative",className:"WorkspacePanel"},e)}function V(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{(0,$.mf)(e)&&(null==e||e(...t))}))}}var z=n(16165);function X(e,t){const n=t=>i().createElement(z.Z,Object.assign({component:e},t));return t&&(n.displayName=t),n}const G=X((()=>i().createElement("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},i().createElement("path",{d:"m31 16-7 7-1.41-1.41 5.58-5.59-5.58-5.59 1.41-1.41z"}),i().createElement("path",{d:"m1 16 7-7 1.41 1.41-5.58 5.59 5.58 5.59-1.41 1.41z"}),i().createElement("path",{d:"m5.91 15h20.17v2h-20.17z",transform:"matrix(.25881905 -.96592583 .96592583 .25881905 -3.6 27.31)"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none",transform:"matrix(0 -1 1 0 0 32)"}))),"CodeOutlined"),Z=X((()=>i().createElement("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},i().createElement("path",{d:"M212.8 468.8H43.2C17.6 468.8 0 486.4 0 512s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM980.8 468.8H811.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM596.8 468.8H427.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2z"}))),"LineSolidOutlined"),H=X((()=>i().createElement("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},i().createElement("path",{d:"M141.21142578 496.55047632h741.57714844v30.89904736H141.21142578z"}))),"LineSolidOutlined"),Y=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm0 22h-16v-20h16z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelFilledLeftOutlined"),J=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelFilledRightOutlined"),ee=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h6v20h-6zm24 20h-16v-20h16z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelLeftOutlined"),te=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16zm24 20h-6v-20h6z"}),i().createElement("path",{d:"m0 0h32v32h-32z",fill:"none"}))),"OpenPanelRightOutlined"),ne=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m20 10h-12.1851l3.5874-3.5859-1.4023-1.4141-6 6 6 6 1.4023-1.4146-3.5844-3.5854h12.1821a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16z"}))),"UndoOutlined"),re=X((()=>i().createElement("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},i().createElement("path",{d:"m12 10h12.1851l-3.5874-3.5859 1.4023-1.4141 6 6-6 6-1.4023-1.4146 3.5844-3.5854h-12.1821a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16z"}))),"RedoOutlined");var ie=n(93967),se=n.n(ie);const oe=c.iv` display: inline-flex; align-items: center; justify-content: center; @@ -45,6 +45,11 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: var(--tango-colors-text3); + + &:hover { + color: var(--tango-colors-text2); + } } .anticon-down { @@ -164,10 +169,11 @@ } &.shape-text { - padding: 0px 8px; + padding: 0px 4px; + height: auto; border: 0; border-radius: var(--tango-radii-s); - color: var(--tango-colors-gray-40); + color: var(--tango-colors-text2); background: transparent; &.selected.type-normal { @@ -175,7 +181,8 @@ } &.selected.type-primary { - color: var(--tango-colors-brand); + color: var(--tango-colors-white); + background-color: var(--tango-colors-brand); } &:hover { @@ -212,7 +219,7 @@ &.shape-ghost { background-color: var(--tango-colors-custom-toolbarButtonBg, rgba(223, 223, 223, 0.08)); - color: var(--tango-colors-custom-toolbarButtonTextColor, #fff); + color: var(--tango-colors-custom-toolbarButtonTextColor, #999); border: 0; border-radius: var(--tango-radii-m); @@ -235,7 +242,7 @@ &.disabled { pointer-events: none; } -`;function qe(e){const{size:t="m",shape:n="outline",type:r="normal",disabled:s,selected:o,children:a,icon:l,tip:p,tooltip:d=p,tooltipPlacement:f="bottom",items:h,overlay:m,overlayStyle:g,onItemClick:y,dropdownProps:_={}}=e,b=V(e,["size","shape","type","disabled","selected","children","icon","tip","tooltip","tooltipPlacement","items","overlay","overlayStyle","onItemClick","dropdownProps"]),v=se()({[`size-${t}`]:t,[`shape-${n}`]:n,[`type-${r}`]:r,disabled:s,selected:o}),E=!!h||!!m;let x=i().createElement(c.zx,Object.assign({css:$e,className:v,type:"button"},b),i().createElement(c.xu,{as:"span"},l&&i().createElement(c.xu,{as:"span",className:"buttonIcon",mr:"s"},l),a),E?i().createElement(me,null):null);return d&&(x=i().createElement(u.Tooltip,{title:d,placement:f},x)),E&&(x=i().createElement(u.Dropdown,Object.assign({},_,{overlay:m,overlayStyle:g,menu:{items:h,onClick:y}}),x)),x}var Qe=n(87462),ze=n(63366);class Xe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=rt(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Ze.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=rt(this,e,t);let n=[];return this.decompose(e,t,n,0),Ze.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Je(this),i=new Je(e);for(let e=t,s=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(s+=r.value.length,r.done||s>=n)return!0}}iter(e=1){return new Je(this,e)}iterRange(e,t=this.length){return new et(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new tt(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Ge(e):Ze.from(Ge.split(e,[])):Xe.empty}}class Ge extends Xe{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.text[i],o=r+s.length;if((t?n:o)>=e)return new nt(r,o,n,s);r=o+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new Ge(He(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=Ye(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new Ge(t,e.length+i.length));else{let e=t.length>>1;n.push(new Ge(t.slice(0,e)),new Ge(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof Ge))return super.replace(e,t,n);[e,t]=rt(this,e,t);let r=Ye(this.text,Ye(n.text,He(this.text,0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new Ge(r,i):Ze.from(Ge.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){[e,t]=rt(this,e,t);let r="";for(let i=0,s=0;i<=t&&se&&s&&(r+=n),ei&&(r+=o.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new Ge(n,r)),n=[],r=-1);return r>-1&&t.push(new Ge(n,r)),t}}class Ze extends Xe{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.children[i],o=r+s.length,a=n+s.lines-1;if((t?a:o)>=e)return s.lineInner(e,t,n,r);r=o+1,n=a+1}}decompose(e,t,n,r){for(let i=0,s=0;s<=t&&i=s){let i=r&((s<=e?1:0)|(a>=t?2:0));s>=e&&a<=t&&!i?n.push(o):o.decompose(e-s,t-s,n,i)}s=a+1}}replace(e,t,n){if([e,t]=rt(this,e,t),n.lines=i&&t<=o){let a=s.replace(e-i,t-i,n),l=this.lines-s.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new Ze(i,this.length-(t-e)+n.length)}return super.replace(i,o,a)}i=o+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=rt(this,e,t);let r="";for(let i=0,s=0;ie&&i&&(r+=n),es&&(r+=o.sliceString(e-s,t-s,n)),s=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ze))return 0;let n=0,[r,i,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==s||i==o)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new Ge(n,t)}let r=Math.max(32,n>>5),i=r<<1,s=r>>1,o=[],a=0,l=-1,c=[];function u(e){let t;if(e.lines>i&&e instanceof Ze)for(let t of e.children)u(t);else e.lines>s&&(a>s||!a)?(p(),o.push(e)):e instanceof Ge&&a&&(t=c[c.length-1])instanceof Ge&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new Ge(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>r&&p(),a+=e.lines,l+=e.length+1,c.push(e))}function p(){0!=a&&(o.push(1==c.length?c[0]:Ze.from(c,l)),l=-1,a=c.length=0)}for(let t of e)u(t);return p(),1==o.length?o[0]:new Ze(o,t)}}function Ye(e,t,n=0,r=1e9){for(let i=0,s=0,o=!0;s=n&&(l>r&&(a=a.slice(0,r-i)),i0?1:(e instanceof Ge?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],s=i>>1,o=r instanceof Ge?r.text.length:r.children.length;if(s==(t>0?o:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof Ge){let i=r.text[s+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[s+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Ge?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class et{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Je(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class tt{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Xe.prototype[Symbol.iterator]=function(){return this.iter()},Je.prototype[Symbol.iterator]=et.prototype[Symbol.iterator]=tt.prototype[Symbol.iterator]=function(){return this});class nt{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function rt(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}let it="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;ee)return it[t-1]<=e;return!1}function ot(e){return e>=127462&&e<=127487}function at(e,t,n=!0,r=!0){return(n?lt:ct)(e,t,r)}function lt(e,t,n){if(t==e.length)return t;t&&ut(e.charCodeAt(t))&&pt(e.charCodeAt(t-1))&&t--;let r=dt(e,t);for(t+=ht(r);t=0&&ot(dt(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function ct(e,t,n){for(;t>0;){let r=lt(e,t-2,n);if(r=56320&&e<57344}function pt(e){return e>=55296&&e<56320}function dt(e,t){let n=e.charCodeAt(t);if(!pt(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ut(r)?r-56320+(n-55296<<10)+65536:n}function ft(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function ht(e){return e<65536?1:2}const mt=/\r\n?|\n/;var gt=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(gt||(gt={}));class yt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return i+(e-r);i+=o}else{if(n!=gt.Simple&&l>=e&&(n==gt.TrackDel&&re||n==gt.TrackBefore&&re))return null;if(l>e||l==e&&t<0&&!o)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&i>=e)return!(rt)||"cover";r=i}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new yt(e)}static create(e){return new yt(e)}}class _t extends yt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Et(this,((t,n,r,i,s)=>e=e.replace(r,r+(n-t),s)),!1),e}mapDesc(e,t=!1){return xt(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r=0){t[r]=o,t[r+1]=s;let a=r>>1;for(;n.length0&&vt(n,t,i.text),i.forward(e),o+=e}let l=e[s++];for(;o>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],s=0,o=null;function a(e=!1){if(!e&&!r.length)return;so||e<0||o>t)throw new RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let u=c?"string"==typeof c?Xe.of(c.split(n||mt)):c:Xe.empty,p=u.length;if(e==o&&0==p)return;es&&bt(r,e-s,-1),bt(r,o-e,p),vt(i,r,u),s=o}}(e),a(!o),o}static empty(e){return new _t(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)t.push(i[0],0);else{for(;n.length=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function vt(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(i,c,s,u,p),i=c,s=u}}}function xt(e,t,n,r=!1){let i=[],s=r?[]:null,o=new Ot(e),a=new Ot(t);for(let e=-1;;)if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);bt(i,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(a.len=0&&e=0)){if(o.done&&a.done)return s?_t.createSet(i,s):yt.create(i);throw new Error("Mismatched change set lengths")}{let t=0,n=o.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.lent||o.ins>=0&&o.len>t)&&(e||r.length>n),s.forward2(t),o.forward(t)}}else bt(r,0,o.ins,e),i&&vt(i,r,o.text),o.next()}}class Ot{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Xe.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Xe.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Tt{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new Tt(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return wt.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return wt.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return wt.range(e.anchor,e.head)}static create(e,t,n){return new Tt(e,t,n)}}class wt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:wt.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new wt(e.ranges.map((e=>Tt.fromJSON(e))),e.main)}static single(e,t=e){return new wt([wt.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;re?8:0)|i)}static normalized(e,t=0){let n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;nr.head?wt.range(o,s):wt.range(s,o))}}return new wt(e,t)}}function Ct(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let At=0;class Pt{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=At++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new Pt(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:kt),!!e.static,e.enables)}of(e){return new Dt([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Dt(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Dt(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function kt(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class Dt{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=At++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,s=e[i]>>1,o=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:0==(1&(null!==(t=e[n.id])&&void 0!==t?t:1))&&c.push(e[n.id]);return{create(e){return e.values[s]=n(e),1},update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||It(e,c)){let t=n(e);if(o?!Rt(t,e.values[s],r):!r(t,e.values[s]))return e.values[s]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=Xt(t,l);if(this.dependencies.every((n=>n instanceof Pt?t.facet(n)===e.facet(n):!(n instanceof Mt)||t.field(n,!1)==e.field(n,!1)))||(o?Rt(a=n(e),i,r):r(a=n(e),i)))return e.values[s]=i,0}else a=n(e);return e.values[s]=a,1}}}}function Rt(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id])),i=n.map((e=>e.type)),s=r.filter((e=>!(1&e))),o=e[t.id]>>1;function a(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Bt).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Bt.of({field:this,create:e})]}get extension(){return this}}const jt=4,Nt=3,Ft=2,Ut=1;function Vt(e){return t=>new Wt(t,e)}const Kt={highest:Vt(0),high:Vt(Ut),default:Vt(Ft),low:Vt(Nt),lowest:Vt(jt)};class Wt{constructor(e,t){this.inner=e,this.prec=t}}class $t{of(e){return new qt(this,e)}reconfigure(e){return $t.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class qt{constructor(e,t){this.compartment=e,this.inner=t}}class Qt{constructor(e,t,n,r,i,s){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],i=Object.create(null),s=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],i=new Map;function s(e,o){let a=i.get(e);if(null!=a){if(a<=o)return;let t=r[a].indexOf(e);t>-1&&r[a].splice(t,1),e instanceof qt&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)s(t,o);else if(e instanceof qt){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),s(r,o)}else if(e instanceof Wt)s(e.inner,e.prec);else if(e instanceof Mt)r[o].push(e),e.provides&&s(e.provides,o);else if(e instanceof Dt)r[o].push(e),e.facet.extensions&&s(e.facet.extensions,Ft);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(t,o)}}return s(e,Ft),r.reduce(((e,t)=>e.concat(t)))}(e,t,s))n instanceof Mt?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let o=Object.create(null),a=[],l=[];for(let e of r)o[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,s=c&&c[e]||[];if(t.every((e=>0==e.type)))if(o[r.id]=a.length<<1|1,kt(s,t))a.push(n.facet(r));else{let e=r.combine(t.map((e=>e.value)));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(o[e.id]=a.length<<1|1,a.push(e.value)):(o[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));o[r.id]=l.length<<1,l.push((e=>Lt(e,r,t)))}}let u=l.map((e=>e(o)));return new Qt(e,s,u,o,a,i)}}function zt(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Xt(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const Gt=Pt.define(),Zt=Pt.define({combine:e=>e.some((e=>e)),static:!0}),Yt=Pt.define({combine:e=>e.length?e[0]:void 0,static:!0}),Ht=Pt.define(),Jt=Pt.define(),en=Pt.define(),tn=Pt.define({combine:e=>!!e.length&&e[0]});class nn{constructor(e,t){this.type=e,this.value=t}static define(){return new rn}}class rn{of(e){return new nn(this,e)}}class sn{constructor(e){this.map=e}of(e){return new on(this,e)}}class on{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new on(this.type,t)}is(e){return this.type==e}static define(e={}){return new sn(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}on.reconfigure=on.define(),on.appendConfig=on.define();class an{constructor(e,t,n,r,i,s){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,n&&Ct(n,t.newLength),i.some((e=>e.type==an.time))||(this.annotations=i.concat(an.time.of(Date.now())))}static create(e,t,n,r,i,s){return new an(e,t,n,r,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(an.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function ln(e,t){let n=[];for(let r=0,i=0;;){let s,o;if(r=e[r]))s=e[r++],o=e[r++];else{if(!(i=0;i--){let s=n[i](e);s&&Object.keys(s).length&&(r=cn(r,un(t,s,e.changes.newLength),!0))}return r==e?e:an.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(Ht)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:ln(n,t))}if(!0!==n){let r,i;if(!1===n)i=e.changes.invertedDesc,r=_t.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=an.create(t,r,e.selection&&e.selection.map(i),on.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Jt);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof an?i:Array.isArray(i)&&1==i.length&&i[0]instanceof an?i[0]:pn(t,fn(i),!1)}return e}(i):i)}an.time=nn.define(),an.userEvent=nn.define(),an.addToHistory=nn.define(),an.remote=nn.define();const dn=[];function fn(e){return null==e?dn:Array.isArray(e)?e:[e]}var hn=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(hn||(hn={}));const mn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let gn;try{gn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function yn(e){return t=>{if(!/\S/.test(t))return hn.Space;if(function(e){if(gn)return gn.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||mn.test(n)))return!0}return!1}(t))return hn.Word;for(let n=0;n-1)return hn.Word;return hn.Other}}class _n{constructor(e,t,n,r,i,s){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let e=0;ei.set(t,e))),n=null),i.set(t.value.compartment,t.value.extension)):t.is(on.reconfigure)?(n=null,r=t.value):t.is(on.appendConfig)&&(n=null,r=fn(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=Qt.resolve(r,i,this),t=new _n(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let s=e.startState.facet(Zt)?e.newSelection:e.newSelection.asSingle();new _n(n,e.newDoc,s,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:wt.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],s=fn(n.effects);for(let n=1;ni.spec.fromJSON(s,e))))}return _n.create({doc:e.doc,selection:wt.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Qt.resolve(e.extensions||[],new Map),n=e.doc instanceof Xe?e.doc:Xe.of((e.doc||"").split(t.staticFacet(_n.lineSeparator)||mt)),r=e.selection?e.selection instanceof wt?e.selection:wt.single(e.selection.anchor,e.selection.head):wt.single(0);return Ct(r,n.length),t.staticFacet(Zt)||(r=r.asSingle()),new _n(t,n,r,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(_n.tabSize)}get lineBreak(){return this.facet(_n.lineSeparator)||"\n"}get readOnly(){return this.facet(tn)}phrase(e,...t){for(let t of this.facet(_n.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]}))),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Gt))for(let s of i(this,t,n))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return yn(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),s=e-n,o=e-n;for(;s>0;){let e=at(t,s,!1);if(i(t.slice(e,s))!=hn.Word)break;s=e}for(;oe.length?e[0]:4}),_n.lineSeparator=Yt,_n.readOnly=tn,_n.phrases=Pt.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((n=>e[n]==t[n]))}}),_n.languageData=Gt,_n.changeFilter=Ht,_n.transactionFilter=Jt,_n.transactionExtender=en,$t.reconfigure=on.define();class vn{eq(e){return this==e}range(e,t=e){return En.create(e,t,this)}}vn.prototype.startSide=vn.prototype.endSide=0,vn.prototype.point=!1,vn.prototype.mapMode=gt.TrackDel;class En{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new En(e,t,n)}}function xn(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class Sn{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let s=r,o=i.length;;){if(s==o)return s;let r=s+o>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==s)return a>=0?s:o;a>=0?o=r:s=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),s=this.findIndex(n,1e9,!1,i);ic||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(s<0&&(s=l),u.point&&(o=Math.max(o,c-l)),n.push(u),r.push(l-s),i.push(c-s))}return{mapped:n.length?new Sn(r,i,n,o):null,pos:s}}}class On{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new On(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,s=e.filter;if(0==t.length&&!s)return this;if(n&&(t=t.slice().sort(xn)),this.isEmpty)return t.length?On.of(t):this;let o=new Cn(this,null,-1).goto(0),a=0,l=[],c=new Tn;for(;o.value||a=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||io.to||i=i&&e<=i+s.length&&!1===s.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return An.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return An.from(e).goto(t)}static compare(e,t,n,r,i=-1){let s=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i)),o=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i)),a=wn(s,o,n),l=new kn(s,a,i),c=new kn(o,a,i);n.iterGaps(((e,t,n)=>Dn(l,e,c,t,n,r))),n.empty&&0==n.length&&Dn(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(i.length!=s.length)return!1;if(!i.length)return!0;let o=wn(i,s),a=new kn(i,o,0).goto(n),l=new kn(s,o,0).goto(n);for(;;){if(a.to!=l.to||!Rn(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let s=new kn(e,null,i).goto(t),o=t,a=s.openStart;for(;;){let e=Math.min(s.to,n);if(s.point){let n=s.activeForPoint(s.to),i=s.pointFromo&&(r.span(o,e,s.active,a),a=s.openEnd(e));if(s.to>n)return a+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(e,t=!1){let n=new Tn;for(let r of e instanceof En?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(xn);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return On.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=On.empty;r=r.nextLayer)t=new On(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}On.empty=new On([],[],null,-1),On.empty.nextLayer=On.empty;class Tn{finishChunk(e){this.chunks.push(new Sn(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Tn)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(On.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=On.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function wn(e,t,n){let r=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new Cn(s,t,n,i));return 1==r.length?r[0]:new An(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)Pn(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)Pn(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Pn(this.heap,0)}}}function Pn(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let i=e[r];if(r+1=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}class kn{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=An.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){In(this.active,e),In(this.activeTo,e),In(this.activeRank,e),this.minActive=Bn(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t0;)t++;Ln(this.active,t,n),Ln(this.activeTo,t,r),Ln(this.activeRank,t,i),e&&Ln(e,t,this.cursor.from),this.minActive=Bn(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&In(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Dn(e,t,n,r,i,s){e.goto(t),n.goto(r);let o=r+i,a=r,l=r-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,r=t<0?e.to+l:n.to,i=Math.min(r,o);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Rn(e.activeForPoint(e.to),n.activeForPoint(n.to))||s.comparePoint(a,i,e.point,n.point):i>a&&!Rn(e.active,n.active)&&s.compareRange(a,i,e.active,n.active),r>o)break;a=r,t<=0&&e.next(),t>=0&&n.next()}}function Rn(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function Bn(e,t){let n=-1,r=1e9;for(let i=0;i=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=at(e,r)}return!0===r?-1:e.length}const Nn="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Fn="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Un="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Vn{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,s,o){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return s.push(e[0]+";");for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),o,s);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),o,a,c)}else null!=o&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+o+";")}(a.length||c)&&s.push((!n||l||o?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Un[Nn]||1;return Un[Nn]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[Fn],i=n&&n.nonce;r?i&&r.setNonce(i):r=new Wn(e,i),r.mount(Array.isArray(t)?t:[t],e)}}let Kn=new Map;class Wn{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Kn.get(n);if(t)return e[Fn]=t;this.sheet=new r.CSSStyleSheet,Kn.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Fn]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t-1&&(this.modules.splice(o,1),i--,o=-1),-1==o){if(this.modules.splice(i++,0,s),n)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Qn="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),zn="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xn=0;Xn<10;Xn++)$n[48+Xn]=$n[96+Xn]=String(Xn);for(Xn=1;Xn<=24;Xn++)$n[Xn+111]="F"+Xn;for(Xn=65;Xn<=90;Xn++)$n[Xn]=String.fromCharCode(Xn+32),qn[Xn]=String.fromCharCode(Xn);for(var Gn in $n)qn.hasOwnProperty(Gn)||(qn[Gn]=$n[Gn]);function Zn(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Yn(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Hn(e,t){if(!t.anchorNode)return!1;try{return Yn(e,t.anchorNode)}catch(e){return!1}}function Jn(e){return 3==e.nodeType?dr(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function er(e,t,n,r){return!!n&&(rr(e,t,n,r,-1)||rr(e,t,n,r,1))}function tr(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function nr(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function rr(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:ir(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=tr(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?ir(e):0}}}function ir(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function sr(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function or(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function ar(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class lr{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?ir(t):0),n,Math.min(e.focusOffset,n?ir(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let cr,ur=null;function pr(e){if(e.setActive)return e.setActive();if(ur)return e.focus(ur);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==ur?{get preventScroll(){return ur={preventScroll:!0},!0}}:void 0),!ur){ur=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function gr(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=ir(n)}else{if(!n.parentNode||nr(n))return null;r=tr(n),n=n.parentNode}}}function yr(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&rt)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){s=a,o=c;break}c=u,l=u+n.breakAfter}return{from:i,to:o<0?n+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=br){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Sr(e,t,n,r,i,s,o,a,l){let{children:c}=e,u=c.length?c[t]:null,p=s.length?s[s.length-1]:null,d=p?p.breakAfter:o;if(!(t==r&&u&&!o&&!d&&s.length<2&&u.merge(n,i,s.length?p:null,0==n,a,l))){if(r0&&(!o&&s.length&&u.merge(n,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(n2);var Mr={mac:Br||/Mac/.test(Tr.platform),windows:/Win/.test(Tr.platform),linux:/Linux|X11/.test(Tr.platform),ie:kr,ie_version:Ar?wr.documentMode||6:Pr?+Pr[1]:Cr?+Cr[1]:0,gecko:Dr,gecko_version:Dr?+(/Firefox\/(\d+)/.exec(Tr.userAgent)||[0,0])[1]:0,chrome:!!Rr,chrome_version:Rr?+Rr[1]:0,ios:Br,android:/Android\b/.test(Tr.userAgent),webkit:Ir,safari:Lr,webkit_version:Ir?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=wr.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class jr extends vr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof jr)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new jr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new _r(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,s=t,o=0;0==t&&n<0||t==r&&n>=0?Mr.chrome||Mr.gecko||(t?(i--,o=1):s=0)?0:a.length-1];Mr.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l);return o?sr(l,o<0):l||null}(this.dom,e,t)}}class Nr extends vr{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(hr(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,s){return(!n||!(!(n instanceof Nr&&n.mark.eq(this.mark))||e&&i<=0||te&&t.push(n=e&&(r=i),n=o,i++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Nr(this.mark,t,s)}domAtPos(e){return Vr(this,e)}coordsAt(e,t){return Wr(this,e,t)}}class Fr extends vr{static create(e,t,n){return new Fr(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Fr.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,r,i,s){return!(n&&(!(n instanceof Fr&&this.widget.compare(n.widget))||e>0&&i<=0||t0)?_r.before(this.dom):_r.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let t=s?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top0?_r.before(this.dom):_r.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Xe.empty}get isHidden(){return!0}}function Vr(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;ie&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e0&&t instanceof Nr&&i.length&&(r=i[i.length-1])instanceof Nr&&r.mark.eq(t.mark)?Kr(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function Wr(e,t,n){let r=null,i=-1,s=null,o=-1;!function e(t,a){for(let l=0,c=0;l=a&&(u.children.length?e(u,a-c):(!s||s.isHidden&&n>0)&&(p>a||c==p&&u.getSide()>0)?(s=u,o=a-c):(c-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let s of r)if(s!=n&&(-1==i.indexOf(s)||e[s]!==t[s]))return!1;return!0}function zr(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function Xr(e){let t=Object.create(null);for(let n=0;n0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Qr(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Kr(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=$r(t,this.attrs||{})),n&&(this.attrs=$r({class:n},this.attrs||{}))}domAtPos(e){return Vr(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(hr(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(zr(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&vr.get(r)instanceof Nr;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=vr.get(r))||void 0===n?void 0:n.isEditable)||Mr.ios&&this.children.some((e=>e instanceof jr))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof jr)||/[^ -~]/.test(n.text))return null;let r=Jn(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=Wr(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(i instanceof Gr)return i;if(s>t)break}r=s+i.breakAfter}return null}}class Zr extends vr{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,s){return!(n&&(!(n instanceof Zr&&this.widget.compare(n.widget))||e>0&&i<=0||t0)}}class Yr{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Hr=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Hr||(Hr={}));class Jr extends vn{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new ei(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new ni(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:s}=ri(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(s?r?2e8:1:-6e8)}return new ni(e,t,n,r,e.widget||null,!0)}static line(e){return new ti(e)}static set(e,t=!1){return On.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Jr.none=On.empty;class ei extends Jr{constructor(e){let{start:t,end:n}=ri(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof ei&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&Qr(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}ei.prototype.point=!1;class ti extends Jr{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ti&&this.spec.class==e.spec.class&&Qr(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ti.prototype.mapMode=gt.TrackBefore,ti.prototype.point=!0;class ni extends Jr{constructor(e,t,n,r,i,s){super(t,n,i,e),this.block=r,this.isReplace=s,this.mapMode=r?t<=0?gt.TrackBefore:gt.TrackAfter:gt.TrackDel}get type(){return this.startSide!=this.endSide?Hr.WidgetRange:this.startSide<=0?Hr.WidgetBefore:Hr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ni&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function ri(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function ii(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}ni.prototype.point=!0;class si{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Zr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Gr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(oi(new Ur(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Zr||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(oi(new jr(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,s){if(this.disallowBlockEffectsFor[s]&&n instanceof ni){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=t-e;if(n instanceof ni)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Zr(n.widget||ai.block,o,n));else{let s=Fr.create(n.widget||ai.inline,o,o?0:n.startSide),a=this.atCursorPos&&!s.isEditable&&i<=r.length&&(e0),l=!s.isEditable&&(er.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||s.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(oi(new Ur(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(oi(s,r),i),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let s=new si(e,t,n,i);return s.openEnd=On.spans(r,t,n,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function oi(e,t){for(let n of t)e=new Nr(n,[e],e.length);return e}class ai extends Yr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ai.inline=new ai("span"),ai.block=new ai("div");var li=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(li||(li={}));const ci=li.LTR,ui=li.RTL;function pi(e){let t=[];for(let n=0;n=t){if(o.level==n)return s;(i<0||(0!=r?r<0?o.fromt:e[i].level>o.level))&&(i=s)}}if(i<0)throw new RangeError("Index out of range");return i}}function bi(e,t){if(e.length!=t.length)return!1;for(let n=0;nl&&o.push(new _i(l,h.from,d)),xi(e,h.direction==ci!=!(d%2)?r+1:r,i,h.inner,h.from,h.to,o),l=h.to}f=h.to}else{if(f==n||(t?vi[f]!=a:vi[f]==a))break;f++}p?Ei(e,l,f,r+1,i,p,o):lt;){let n=!0,u=!1;if(!c||l>s[c-1].to){let e=vi[l-1];e!=a&&(n=!1,u=16==e)}let p=n||1!=a?null:[],d=n?r:r+1,f=l;e:for(;;)if(c&&f==s[c-1].to){if(u)break e;let h=s[--c];if(!n)for(let e=h.from,n=c;;){if(e==t)break e;if(!n||s[n-1].to!=e){if(vi[e-1]==a)break e;break}e=s[--n].from}if(p)p.push(h);else{h.to=0;e-=3)if(mi[e+1]==-n){let t=mi[e+2],n=2&t?i:4&t?1&t?s:i:0;n&&(vi[o]=vi[mi[e]]=n),a=e;break}}else{if(189==mi.length)break;mi[a++]=o,mi[a++]=t,mi[a++]=l}else if(2==(r=vi[o])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=mi[t+2];if(2&n)break;if(e)mi[t+2]|=2;else{if(4&n)break;mi[t+2]|=4}}}}}(e,i,s,r,a),function(e,t,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:e,a=il;)t==s&&(t=n[--r].from,s=r?n[r-1].to:e),vi[--t]=u;l=o}else s=o,l++}}}(i,s,r,a),Ei(e,i,s,t,n,r,o)}function Si(e,t,n){if(!e)return[new _i(0,0,t==ui?1:0)];if(t==ci&&!n.length&&!yi.test(e))return Oi(e.length);if(n.length)for(;e.length>vi.length;)vi[vi.length]=256;let r=[],i=t==ci?0:1;return xi(e,i,i,n,0,e.length,r),r}function Oi(e){return[new _i(0,e,0)]}let Ti="";function wi(e,t,n,r,i){var s;let o=r.head-e.from,a=_i.find(t,o,null!==(s=r.bidiLevel)&&void 0!==s?s:-1,r.assoc),l=t[a],c=l.side(i,n);if(o==c){let e=a+=i?1:-1;if(e<0||e>=t.length)return null;l=t[a=e],o=l.side(!i,n),c=l.side(i,n)}let u=at(e.text,o,l.forward(i,n));(ul.to)&&(u=c),Ti=e.text.slice(Math.min(o,u),Math.max(o,u));let p=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return p&&u==c&&p.level+(i?0:1)e.some((e=>e))}),Mi=Pt.define({combine:e=>e.some((e=>e))}),ji=Pt.define();class Ni{constructor(e,t="nearest",n="nearest",r=5,i=5,s=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=s}map(e){return e.empty?this:new Ni(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ni(wt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Fi=on.define({map:(e,t)=>e.map(t)});function Ui(e,t,n){let r=e.facet(Di);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Vi=Pt.define({combine:e=>!e.length||e[0]});let Ki=0;const Wi=Pt.define();class $i{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:s}=t||{};return new $i(Ki++,e,n,r,(e=>{let t=[Wi.of(e)];return s&&t.push(Xi.of((t=>{let n=t.plugin(e);return n?s(n):Jr.none}))),i&&t.push(i(e)),t}))}static fromClass(e,t){return $i.define((t=>new e(t)),t)}}class qi{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Ui(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ui(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Ui(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Qi=Pt.define(),zi=Pt.define(),Xi=Pt.define(),Gi=Pt.define(),Zi=Pt.define(),Yi=Pt.define();function Hi(e,t){let n=e.state.facet(Yi);if(!n.length)return n;let r=n.map((t=>t instanceof Function?t(e):t)),i=[];return On.spans(r,t.from,t.to,{point(){},span(e,n,r,s){let o=e-t.from,a=n-t.from,l=i;for(let e=r.length-1;e>=0;e--,s--){let n,i=r[e].spec.bidiIsolate;if(null==i&&(i=Ci(t.text,o,a)),s>0&&l.length&&(n=l[l.length-1]).to==o&&n.direction==i)n.to=a,l=n.inner;else{let e={from:o,to:a,direction:i,inner:[]};l.push(e),l=e.inner}}}}),i}const Ji=Pt.define();function es(e){let t=0,n=0,r=0,i=0;for(let s of e.state.facet(Ji)){let o=s(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(n=Math.max(n,o.right)),null!=o.top&&(r=Math.max(r,o.top)),null!=o.bottom&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}const ts=Pt.define();class ns{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new ns(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAc)break;i+=2}if(!a)return n;new ns(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),s=a.toA,o=a.toB}}}class rs{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=_t.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges(((e,t,n,i)=>r.push(new ns(e,t,n,i)))),this.changedRanges=r}static create(e,t,n){return new rs(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class is extends vr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.compositionBarrier=Jr.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Gr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ns(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:e,toA:t})=>tthis.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,r)=>{et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=as(e,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc,c=new ns(l.mapPos(s),l.mapPos(o),s,o),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=vr.get(t);if(n instanceof Nr)u.push({node:t,deco:n.mark});else{if(n instanceof Gr||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:i,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new ei({inclusive:!0,attributes:Xr(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new ns(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(Mr.ie||Mr.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=function(e,t,n){let r=new class{constructor(){this.changes=[]}compareRange(e,t){ii(e,t,this.changes)}comparePoint(e,t){ii(e,t,this.changes)}};return On.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=ns.extendWithRanges(n,s),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=Mr.chrome||Mr.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let i=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let s,o,a,l,{fromA:c,toA:u,fromB:p,toB:d}=t;if(n&&n.range.fromBp){let e=si.build(this.view.state.doc,p,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=si.build(this.view.state.doc,n.range.toB,d,this.decorations,this.dynamicDecorationMap);o=e.breakAtStart,a=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),s=e.content.concat(r).concat(t.content)}else({content:s,breakAtStart:o,openStart:a,openEnd:l}=si.build(this.view.state.doc,p,d,this.decorations,this.dynamicDecorationMap));let{i:f,off:h}=i.findPos(u,1),{i:m,off:g}=i.findPos(c,-1);Sr(this,m,g,f,h,s,o,a,l)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new jr(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new Nr(n,[t],t.length);let n=new Gr;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=vr.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&Hn(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let s=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(o.anchor)),l=o.empty?a:this.moveToLine(this.domAtPos(o.head));if(Mr.gecko&&o.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=l=new _r(e,0),s=!0}var c;let u=this.view.observer.selectionRange;!s&&u.focusNode&&(er(a.node,a.offset,u.anchorNode,u.anchorOffset)&&er(l.node,l.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,o))||(this.view.observer.ignore((()=>{Mr.android&&Mr.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Zn(this.view.root);if(e)if(o.empty){if(Mr.gecko){let e=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(to.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new _r(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new _r(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&!this.compositionBarrier.size&&er(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Zn(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let s=Gr.find(this,t.head);if(!s)return;let o=s.posAtStart;if(t.head==o||t.head==o+s.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=vr.get(n.childNodes[r]);e instanceof Gr&&(t=e.domAtPos(e.length))}return t?new _r(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=vr.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;s--){let o=this.children[s],a=i-o.breakAfter,l=a-o.length;if(ae||o.covers(1))&&(!n||o instanceof Gr&&!(n instanceof Gr&&t>=0))&&(n=o,r=l),i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Gr))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof jr))return null;let i=at(r.text,n);if(i==n)return null;let s=dr(r.dom,n,i).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==li.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),s){let t=c.dom.lastChild,r=t?Jn(t):[];if(r.length){let t=r[r.length-1],s=a?t.right-n.left:n.right-t.left;s>o&&(o=s,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?li.RTL:li.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Gr){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let i=Jn(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new xr(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],s=i?i.from-1:this.length;if(s>n){let r=(t.lineBlockAt(s).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Jr.replace({widget:new os(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,s))}if(!i)break;n=i.to+1}return Jr.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Xi).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,r=this.view.state.facet(Gi).map(((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e}));for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(On.join(r))),this.decorations=[this.compositionBarrier,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e{i.point?n=!1:i.endSide<0&&tn.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=es(this.view),s={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,r,i,s,o,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,p=!1;u&&!p;)if(1==u.nodeType){let e,d=u==l.body,f=1,h=1;if(d)e=or(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(p=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:f,scaleY:h}=ar(u,t)),e={left:t.left,right:t.left+u.clientWidth*f,top:t.top,bottom:t.top+u.clientHeight*h}}let m=0,g=0;if("nearest"==i)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+m+s)):t.right>e.right&&(m=t.right-e.right+s,n<0&&t.lefte?t.left-e:Math.max(0,e-t.right)}function cs(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function us(e,t){return e.topt.top+1}function ps(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function fs(e,t,n){let r,i,s,o,a,l,c,u,p=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=Jn(d);for(let f=0;fg||o==g&&s>m){r=d,i=h,s=m,o=g;let a=g?n0?f0)}0==m?n>h.bottom&&(!c||c.bottomh.top)&&(l=d,u=h):c&&us(c,h)?c=ds(c,h.bottom):u&&us(u,h)&&(u=ps(u,h.top))}}if(c&&c.bottom>=n?(r=a,i=c):u&&u.top<=n&&(r=l,i=u),!r)return{node:e,offset:0};let d=Math.max(i.left,Math.min(i.right,t));return 3==r.nodeType?hs(r,d,n):p&&"false"!=r.contentEditable?fs(r,d,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}}function hs(e,t,n){let r=e.nodeValue.length,i=-1,s=1e9,o=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u=(c.left+c.right)/2,r=n;if(Mr.chrome||Mr.gecko){dr(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),s=u}}}return{node:e,offset:i>-1?i:o>0?e.nodeValue.length:0}}function ms(e,t,n,r=-1){var i,s;let o,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:p}=t,d=p-l;if(d<0)return 0;if(d>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;o=e.elementAtHeight(d),o.type!=Hr.Text;)for(;d=r>0?o.bottom+t:o.top-t,!(d>=0&&d<=c);){if(i)return n?null:0;i=!0,r=-r}p=l+d;let f=o.from;if(fe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:gs(e,a,o,u,p);let h=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:h,g=m.elementFromPoint(u,p);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,p),g&&!e.contentDOM.contains(g)&&(g=null));let y,_=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(h.caretPositionFromPoint){let e=h.caretPositionFromPoint(u,p);e&&({offsetNode:y,offset:_}=e)}else if(h.caretRangeFromPoint){let t=h.caretRangeFromPoint(u,p);t&&(({startContainer:y,startOffset:_}=t),(!e.contentDOM.contains(y)||Mr.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return dr(e,r-1,r).getBoundingClientRect().left>n}(y,_,u)||Mr.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():dr(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(y,_,u))&&(y=void 0))}if(!y||!e.docView.dom.contains(y)){let t=Gr.find(e.docView,f);if(!t)return d>o.top+o.height/2?o.to:o.from;({node:y,offset:_}=fs(t.dom,u,p))}let b=e.docView.nearest(y);if(!b)return null;if(b.isWidget&&1==(null===(s=b.dom)||void 0===s?void 0:s.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;s+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+jn(o,s,e.state.tabSize)}function ys(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==Hr.Text))return e;return n}function _s(e,t,n,r){let i=e.state.doc.lineAt(t.head),s=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=wi(i,s,o,a,n),c=Ti;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),s=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function bs(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,((e,i,s)=>{if(t>e&&tt(e))),n.from,t.head>n.from?-1:1);return r==n.from?n:wt.cursor(r,rnull)),Mr.gecko&&function(e){Xs.has(e)||(Xs.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=vr.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Ss(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,s=n[e];s&&i!=!s.handlers.length&&(r.removeEventListener(e,this.handleEvent),s=null),s||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode)))&&!e.ctrlKey||Ts.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from0||!!(Mr.safari&&!Mr.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function xs(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Ui(n.state,e)}}}function Ss(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(xs(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(xs(t.value,i))}}for(let e in Ps)n(e).handlers.push(Ps[e]);for(let e in ks)n(e).observers.push(ks[e]);return t}const Os=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Ts="dthko",ws=[16,17,18,20,91,92,224,225];function Cs(e){return.7*Math.max(0,e)+8}class As{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM),this.atoms=e.state.facet(Zi).map((t=>t(e)));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(_n.allowMultipleSelections)&&function(e,t){let n=e.state.facet(Ai);return n.length?n[0](t):Mr.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Zn(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=Ks(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=es(this.view);e.clientX-s.left<=i.left+6?n=-Cs(i.left-e.clientX):e.clientX+s.right>=i.right-6&&(n=Cs(e.clientX-i.right)),e.clientY-s.top<=i.top+6?r=-Cs(i.top-e.clientY):e.clientY+s.bottom>=i.bottom-6&&(r=Cs(e.clientY-i.bottom)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;nthis.select(this.lastEvent)),20)}}const Ps=Object.create(null),ks=Object.create(null),Ds=Mr.ie&&Mr.ie_version<15||Mr.ios&&Mr.webkit_version<604;function Rs(e,t){let n,{state:r}=e,i=1,s=r.toText(t),o=s.lines==r.selection.ranges.length,a=null!=$s&&r.selection.ranges.every((e=>e.empty))&&$s==s.toString();if(a){let e=-1;n=r.changeByRange((n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((o?s.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:wt.cursor(n.from+l.length)}}))}else n=o?r.changeByRange((e=>{let t=s.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:wt.cursor(e.from+t.length)}})):r.replaceSelection(s);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function Is(e,t,n,r){if(1==r)return wt.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),s=t-i.from;if(0==i.length)return wt.cursor(t);0==s?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=at(i.text,s,!1):a=at(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let e=at(i.text,o,!1);if(r(i.text.slice(e,o))!=l)break;o=e}for(;a{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Ps.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),ks.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},ks.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},Ps.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(ki))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=js(e,t),r=Ks(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,s,o){let a,l=js(e,t),c=Is(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let t=Is(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),s=Math.max(t.to,c.to);c=i1&&(a=function(e,t){for(let n=0;n=t)return wt.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:o?i.addRange(c):wt.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new As(e,t,n,r)),r&&e.observer.ignore((()=>pr(e.contentDOM)));let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let Ls=(e,t)=>e>=t.top&&e<=t.bottom,Bs=(e,t,n)=>Ls(t,n)&&e>=n.left&&e<=n.right;function Ms(e,t,n,r){let i=Gr.find(e.docView,t);if(!i)return 1;let s=t-i.posAtStart;if(0==s)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&Bs(n,r,o))return-1;let a=i.coordsAt(s,1);return a&&Bs(n,r,a)?1:o&&Ls(r,o)?-1:1}function js(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:Ms(e,n,t.clientX,t.clientY)}}const Ns=Mr.ie&&Mr.ie_version<=11;let Fs=null,Us=0,Vs=0;function Ks(e){if(!Ns)return e.detail;let t=Fs,n=Vs;return Fs=e,Vs=Date.now(),Us=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Us+1)%3:1}function Ws(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:s}=e.inputState,o=r&&s&&function(e,t){let n=e.state.facet(Pi);return n.length?n[0](t):Mr.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=e.state.changes(o?[o,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Ps.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=wt.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},Ps.dragend=e=>(e.inputState.draggedContent=null,!1),Ps.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&Ws(e,t,r.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),s()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return Ws(e,t,n,!0),!0}return!1},Ps.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Ds?null:t.clipboardData;return n?(Rs(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),Rs(e,n.value)}),50)}(e),!1)};let $s=null;Ps.copy=Ps.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let s=e.doc.lineAt(r);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;$s=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Ds?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((()=>{r.remove(),e.focus()}),50)}(e,n),!1)};const qs=nn.define();function Qs(e,t){let n=[];for(let r of e.facet(Li)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:qs.of(!0)}):null}function zs(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Qs(e.state,t);n?e.dispatch(n):e.update([])}}),10)}ks.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),zs(e)},ks.blur=e=>{e.observer.clearSelectionRange(),zs(e)},ks.compositionstart=ks.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0,e.docView.maybeCreateCompositionBarrier()&&(e.update([]),e.docView.clearCompositionBarrier()))},ks.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Mr.chrome&&Mr.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},ks.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Ps.beforeinput=(e,t)=>{var n;let r;if(Mr.chrome&&Mr.android&&(r=Os.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return Mr.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),Mr.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>ks.compositionend(e,t)),20),!1};const Xs=new Set;const Gs=["pre-wrap","normal","pre-line","break-spaces"];class Zs{constructor(e){this.lineWrapping=e,this.doc=Xe.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Gs.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>eo&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return to.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,s=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:c,toB:u}=r[o],p=i.lineAt(a,Js.ByPosNoHeight,n.setDoc(t),0,0),d=p.to>=l?p:i.lineAt(l,Js.ByPosNoHeight,n,0,0);for(u+=d.to-l,l=d.to;o>0&&p.from<=r[o-1].toA;)a=r[o-1].fromA,c=r[o-1].fromB,o--,a2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r=i&&s(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ro extends no{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new Hs(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof ro||r instanceof io&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof io?r=new ro(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):to.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class io extends to{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*s);n=t/s,this.length>s+1&&(o=(this.height-t)/(this.length-s-1))}else n=this.height/s;return{firstLine:r,lastLine:i,perLine:n,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:s,perLine:o,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e0){let e=n[n.length-1];e instanceof io?n[n.length-1]=new io(e.length+r):n.push(null,new io(r-1))}if(e>0){let t=n[0];t instanceof io?n[0]=new io(e+t.length):n.unshift(new io(e-1),null)}return to.of(n)}decomposeLeft(e,t){t.push(new io(e-1),null)}decomposeRight(e,t){t.push(null,new io(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],s=Math.max(t,r.from),o=-1;for(r.from>t&&n.push(new io(r.from-t-1).updateHeight(e,t));s<=i&&r.more;){let t=e.doc.lineAt(s).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==o?o=i:Math.abs(i-o)>=eo&&(o=-2);let a=new ro(t,i);a.outdated=!1,n.push(a),s+=t+1}s<=i&&n.push(null,new io(i-s).updateHeight(e,s));let a=to.of(n);return(o<0||Math.abs(a.height-this.height)>=eo||Math.abs(o-this.heightMetrics(e,t).perLine)>=eo)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class so extends to{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return eo))return l;let c=t==Js.ByPosNoHeight?Js.ByPosNoHeight:Js.ByPos;return a?l.join(this.right.lineAt(o,c,n,s,o)):this.left.lineAt(o,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,s){let o=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,o,a,s);else{let l=this.lineAt(a,Js.ByPos,n,r,i);e=e&&l.from<=t&&s(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,o,a,s)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let s=i.length;for(let e of n)i.push(e);if(e>0&&oo(i,s-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?to.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:s}=this,o=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+s.length&&r.more?a=s=s.updateHeight(e,o,n,r):s.updateHeight(e,o,n),a?this.balanced(i,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function oo(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof io&&(r=e[t+1])instanceof io&&e.splice(t-1,3,new io(n.length+1+r.length))}class ao{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof ro?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new ro(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,i,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new ro(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new io(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ro)return e;let t=new ro(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof ro||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();s=Math.max(s,r.left),o=Math.min(o,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function uo(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class po{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new Zs(t),this.stateDeco=e.facet(Xi).filter((e=>"function"!=typeof e)),this.heightMap=to.empty().applyChanges(this.stateDeco,Xe.empty,this.heightOracle.setDoc(e.doc),[new ns(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Jr.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some((({from:e,to:t})=>r>=e&&r<=t))){let{from:t,to:n}=this.lineBlockAt(r);e.push(new mo(t,n))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?bo:new vo(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:Eo(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Xi).filter((e=>"function"!=typeof e));let r=e.changedRanges,i=ns.extendWithRanges(r,function(e,t,n){let r=new lo;return On.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:_t.empty(this.state.doc.length))),s=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=s&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Mi)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?li.RTL:li.LTR;let s=this.heightOracle.mustRefreshForWrapping(i),o=t.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let l=0,c=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=ar(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=8,s=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,p=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==p||(this.paddingTop=u,this.paddingBottom=p,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=mr(e.scrollDOM);let f=(this.printing?uo:co)(t,this.paddingTop),h=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let y=o.width;if(this.contentDOMWidth==y&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(s=!0),s||r.lineWrapping&&Math.abs(y-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:a}=e.docView.measureTextSize();s=n>0&&r.refresh(i,n,o,a,y/o,t),s&&(e.docView.minWidth=0,l|=8)}h>0&&m>0?c=Math.max(h,m):h<0&&m<0&&(c=Math.min(h,m)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(s?to.empty().applyChanges(this.stateDeco,Xe.empty,this.heightOracle,[new ns(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new Ys(n.from,i))}r.heightChanged&&(l|=2)}let _=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return _&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:s,visibleBottom:o}=this,a=new mo(r.lineAt(s-1e3*n,Js.ByHeight,i,0,0).from,r.lineAt(o+1e3*(1-n),Js.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let n,s=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=r.lineAt(e,Js.ByPos,i,0,0);n="center"==t.y?(o.top+o.bottom)/2-s/2:"start"==t.y||"nearest"==t.y&&e=o+Math.max(10,Math.min(n,250)))&&r>s-2e3&&i>1,s=r<<1;if(this.defaultTextDirection!=li.LTR&&!n)return[];let o=[],a=(r,s,l,c)=>{if(s-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt))));if(!d){if(se.from<=s&&e.to>=s))){let e=t.moveToLineBoundary(wt.cursor(s),!1,!0).head;e>r&&(s=e)}d=new po(r,s,this.gapSize(l,r,s,c))}o.push(d)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,i,e,t),oe.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];On.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,n)=>e.from!=t[n].from||e.to!=t[n].to));return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||Eo(this.heightMap.lineAt(e,Js.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Eo(this.heightMap.lineAt(this.scaler.fromDOM(e),Js.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Eo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class mo{constructor(e,t){this.from=e,this.to=t}}function go(e,t,n){let r=[],i=e,s=0;return On.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),s+=e-i),i=t}},20),i=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],s=i-n;if(r<=s)return n+r;r-=s}}function _o(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const bo={toDOM(e){return e},fromDOM(e){return e},scale:1};class vo{constructor(e,t,n){let r=0,i=0,s=0;this.viewports=n.map((({from:n,to:i})=>{let s=t.lineAt(n,Js.ByPos,e,0,0).top,o=t.lineAt(i,Js.ByPos,e,0,0).bottom;return r+=o-s,{from:n,to:i,top:s,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=s+(e.top-i)*this.scale,s=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=tEo(e,t))):e._content)}const xo=Pt.define({combine:e=>e.join(" ")}),So=Pt.define({combine:e=>e.indexOf(!0)>-1}),Oo=Vn.newName(),To=Vn.newName(),wo=Vn.newName(),Co={"&light":"."+To,"&dark":"."+wo};function Ao(e,t,n){return new Vn(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t}})}const Po=Ao("."+Oo,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Co),ko="￿";class Do{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(_n.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ko}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let s=vr.get(r),o=vr.get(i);(s&&o?s.breakAfter:(s?s.breakAfter:nr(r))||nr(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,s=-1,o=1;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(i=r.exec(t))&&(s=i.index,o=i[0].length),this.append(t.slice(n,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);n=s+o}}readNode(e){if(e.cmIgnore)return;let t=vr.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Ro(e,n.node,n.offset)?t:0))}}function Ro(e,t,n){for(;;){if(!t||n-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=e.observer.selectionRange;n&&(t.push(new Io(n,r)),i==n&&s==r||t.push(new Io(i,s)));return t}(e),n=new Do(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?wt.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!Yn(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=s&&s.node==t.anchorNode&&s.offset==t.anchorOffset||!Yn(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),o=e.viewport;if((Mr.ios||Mr.chrome)&&e.state.selection.main.empty&&n!=r&&(o.from>0||o.toDate.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:o}=t.bounds,a=i.from,l=null;(8===s||Mr.android&&t.text.length0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;if("end"==r){n-=o+Math.max(0,s-Math.min(o,a))-s}if(o=o?s-n:0,a=s+(a-o),o=s}else if(a=a?s-n:0,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}(e.state.doc.sliceString(r,o,ko),t.text,a-r,l);c&&(Mr.chrome&&13==s&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==ko+ko&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:Xe.of(t.text.slice(c.from,c.toB).split(ko))})}else r&&(!e.hasFocus&&e.state.facet(Vi)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(Mr.mac||Mr.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=wt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Xe.of([" "])}):Mr.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=wt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Xe.of([" "])}),n){if(Mr.ios&&e.inputState.flushIOSKey(n))return!0;if(Mr.android&&(n.to==i.to&&(n.from==i.from||n.from==i.from-1&&" "==e.state.sliceDoc(n.from,i.from))&&1==n.insert.length&&2==n.insert.lines&&fr(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==s&&n.insert.lengthi.head)&&fr(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&fr(e.contentDOM,"Delete",46)))return!0;let t,o=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>t||(t=function(e,t,n){let r,i=e.state,s=i.selection.main;if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=s.fromt.to?i.sliceDoc(t.to,s.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),a=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=s.to&&t.to>=s.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&as(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(s.head);let p=s.to-t.to,d=s.to-s.from;r=i.changeByRange((n=>{if(n.from==s.from&&n.to==s.to)return{changes:o,range:a||n.map(o)};let r=n.to-p,u=r-c.length;if(n.to-n.from!=d||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),h=n.to-s.to;return{changes:f,range:a?wt.range(Math.max(0,a.anchor+h),Math.max(0,a.head+h)):n.map(f)}}))}else r={changes:o,selection:a&&i.selection.replaceRange(a)}}let o="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,o+=".compose",e.inputState.compositionFirstChange&&(o+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:o,scrollIntoView:!0})}(e,n,r));return e.state.facet(Ii).some((t=>t(e,n.from,n.to,o,a)))||e.dispatch(a()),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const Mo={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},jo=Mr.ie&&Mr.ie_version<=11;class No{constructor(e){this.view=e,this.active=!1,this.selectionRange=new lr,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(Mr.ie&&Mr.ie_version<=11||Mr.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),jo&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(e){("change"!=e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Vi)?n.root.activeElement!=this.dom:!Hn(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(Mr.ie&&Mr.ie_version<=11||Mr.android&&Mr.chrome)&&!n.state.selection.main.empty&&r.focusNode&&er(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Mr.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,s=t.endContainer,o=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);er(a.node,a.offset,s,o)&&([r,i,s,o]=[s,o,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}}(this.view)||Zn(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=Hn(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&fr(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&Hn(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Lo(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=Bo(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=Fo(t,e.previousSibling||e.target.previousSibling,-1),r=Fo(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Fo(e,t,n){for(;t;){let r=vr.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class Uo{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach((e=>t(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new ho(e.state||_n.create(e)),e.scrollTo&&e.scrollTo.is(Fi)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Wi).map((e=>new qi(e)));for(let e of this.plugins)e.update(this);this.observer=new No(this),this.inputState=new Es(this),this.inputState.ensureHandlers(this.plugins),this.docView=new is(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=1==e.length&&e[0]instanceof an?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let s=this.hasFocus,o=0,a=null;e.some((e=>e.annotation(qs)))?(this.inputState.notifiedFocused=s,o=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=Qs(i,s),a||(o=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(_n.phrases)!=this.state.facet(_n.phrases))return this.setState(i);t=rs.create(this,i,e),t.flags|=o;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new Ni(e.empty?e:wt.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Fi)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=Wo.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(ts)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(xo)!=t.state.facet(xo)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(Ri))try{e(t)}catch(e){Ui(this.state,e,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Bo(this,c)&&l.force&&fr(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new ho(e),this.plugins=e.facet(Wi).map((e=>new qi(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new is(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Wi),n=e.state.facet(Wi);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new qi(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(s<0)if(mr(n))i=-1,s=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,s=e.top}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&o||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((e=>{try{return e.read(this)}catch(e){return Ui(this.state,e),Ko}})),c=rs.create(this,this.state,[]),u=!1;c.flags|=o,t?t.flags|=o:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c),u&&this.docViewUpdate());for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,s=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Ri))e(t)}get themeClasses(){return Oo+" "+(this.state.facet(So)?wo:To)+" "+this.state.facet(xo)}updateAttrs(){let e=$o(this,Qi,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Vi)?"true":"false",class:"cm-content",style:`${Mr.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),$o(this,zi,t);let n=this.observer.ignore((()=>{let n=zr(this.contentDOM,this.contentAttrs,t),r=zr(this.dom,this.editorAttrs,e);return n||r}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(Uo.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(ts);let e=this.state.facet(Uo.cspNonce);Vn.mount(this.root,this.styleModules.concat(Po).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return vs(this,e,_s(this,e,t,n))}moveByGroup(e,t){return vs(this,e,_s(this,e,t,(t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==hn.Space&&(i=t),i==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return wt.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=ys(e,t.head),s=r&&i.type==Hr.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==li.LTR)?t.right-1:t.left+1,y:(s.top+s.bottom)/2});if(null!=o)return wt.cursor(o,n?-1:1)}return wt.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return vs(this,e,function(e,t,n,r){let i=t.head,s=n?1:-1;if(i==(n?e.state.doc.length:0))return wt.cursor(i,t.assoc);let o,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),o=s<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),o=(s<0?t.top:t.bottom)+u}let p=l.left+a,d=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=o+(d+t)*s,r=ms(e,{x:p,y:n},!1,s);if(nl.bottom||(s<0?ri)){let t=e.docView.coordsForChar(r),i=!t||n0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Bi)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Vo)return Oi(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||bi(r.isolates,t=Hi(this,e))))return r.order;t||(t=Hi(this,e));let r=Si(e.text,n,t);return this.bidiCache.push(new Wo(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Mr.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{pr(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Fi.of(new Ni("number"==typeof e?wt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Fi.of(new Ni(wt.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return $i.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return $i.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=Vn.newName(),r=[xo.of(n),ts.of(Ao(`.${n}`,e))];return t&&t.dark&&r.push(So.of(!0)),r}static baseTheme(e){return Kt.lowest(ts.of(Ao("."+Oo,e,Co)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&vr.get(n)||vr.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}Uo.styleModule=ts,Uo.inputHandler=Ii,Uo.scrollHandler=ji,Uo.focusChangeEffect=Li,Uo.perLineTextDirection=Bi,Uo.exceptionSink=Di,Uo.updateListener=Ri,Uo.editable=Vi,Uo.mouseSelectionStyle=ki,Uo.dragMovesSelection=Pi,Uo.clickAddsSelectionRange=Ai,Uo.decorations=Xi,Uo.outerDecorations=Gi,Uo.atomicRanges=Zi,Uo.bidiIsolatedRanges=Yi,Uo.scrollMargins=Ji,Uo.darkTheme=So,Uo.cspNonce=Pt.define({combine:e=>e.length?e[0]:""}),Uo.contentAttributes=zi,Uo.editorAttributes=Qi,Uo.lineWrapping=Uo.contentAttributes.of({class:"cm-lineWrapping"}),Uo.announce=on.define();const Vo=4096,Ko={};class Wo{constructor(e,t,n,r,i,s){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=s}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],r=e.length?e[e.length-1].dir:li.LTR;for(let i=Math.max(0,e.length-10);i=0;i--){let t=r[i],s="function"==typeof t?t(e):t;s&&$r(s,n)}return n}const qo=Mr.mac?"mac":Mr.windows?"win":Mr.linux?"linux":"key";function Qo(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const zo=Kt.default(Uo.domEventHandlers({keydown(e,t){return Ho(Zo(t.state),e,t,"editor")}})),Xo=Pt.define({enables:zo}),Go=new WeakMap;function Zo(e){let t=e.facet(Xo),n=Go.get(t);return n||Go.set(t,n=function(e,t=qo){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},s=(e,r,s,o,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),p=r.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,s,o,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e{let r=Yo={view:t,prefix:n,scope:e};return setTimeout((()=>{Yo==r&&(Yo=null)}),4e3),!0}]})}let d=p.join(" ");i(d,!1);let f=u[d]||(u[d]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});s&&f.run.push(s),o&&(f.preventDefault=!0),a&&(f.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)s(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&s(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}let Yo=null;function Ho(e,t,n,r){let i=function(e){var t=!(Qn&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||zn&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?qn:$n)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),s=ht(dt(i,0))==i.length&&" "!=i,o="",a=!1,l=!1,c=!1;Yo&&Yo.view==n&&Yo.scope==r&&(o=Yo.prefix+" ",ws.indexOf(t.keyCode)<0&&(l=!0,Yo=null));let u,p,d=new Set,f=e=>{if(e){for(let r of e.run)if(!d.has(r)&&(d.add(r),r(n,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},h=e[r];return h&&(f(h[o+Qo(i,t,!s)])?a=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Mr.windows&&t.ctrlKey&&t.altKey)&&(u=$n[t.keyCode])&&u!=i?(f(h[o+Qo(u,t,!0)])||t.shiftKey&&(p=qn[t.keyCode])!=i&&p!=u&&f(h[o+Qo(p,t,!1)]))&&(a=!0):s&&t.shiftKey&&f(h[o+Qo(i,t,!0)])&&(a=!0),!a&&f(h._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),a}class Jo{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=ea(e);return[new Jo(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),s=e.textDirection==li.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),l=ea(e),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),p=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),f=ys(e,r),h=ys(e,i),m=f.type==Hr.Text?f:null,g=h.type==Hr.Text?h:null;m&&(e.lineWrapping||f.widgetLineBreaks)&&(m=ta(e,r,m));g&&(e.lineWrapping||h.widgetLineBreaks)&&(g=ta(e,i,g));if(m&&g&&m.from==g.from)return _(b(n.from,n.to,m));{let t=m?b(n.from,null,m):v(f,!1),r=g?b(null,n.to,g):v(h,!0),i=[];return(m||f).to<(g||h).from-(m&&g?1:0)||f.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2c&&r.from=s)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,s),null==n&&a>=u,o.dir)}if(i=r.to+1,i>=s)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:i,bottom:o,horizontal:a}}function v(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function ea(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==li.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function ta(e,t,n){let r=wt.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:Hr.Text}}class na{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ra)!=e.state.facet(ra)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(ra);for(;t!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ra=Pt.define();function ia(e){return[$i.define((t=>new na(t,e))),ra.of(e)]}const sa=!Mr.ios,oa=Pt.define({combine(e){return bn(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function aa(e){return e.startState.facet(oa)!=e.state.facet(oa)}const la=ia({above:!0,markers(e){let{state:t}=e,n=t.facet(oa),r=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||sa:n.drawRangeCursor){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:wt.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Jo.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=aa(e);return n&&ca(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){ca(t.state,e)},class:"cm-cursorLayer"});function ca(e,t){t.style.animationDuration=e.facet(oa).cursorBlinkRate+"ms"}const ua=ia({above:!1,markers(e){return e.state.selection.ranges.map((t=>t.empty?[]:Jo.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t)))},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||aa(e)},class:"cm-selectionLayer"}),pa={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};sa&&(pa[".cm-line"].caretColor="transparent !important",pa[".cm-content"]={caretColor:"transparent !important"});const da=Kt.highest(Uo.theme(pa)),fa=on.define({map(e,t){return null==e?null:t.mapPos(e)}}),ha=Mt.define({create(){return null},update(e,t){return null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(fa)?t.value:e),e)}}),ma=$i.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(ha);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(ha)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(ha),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(ha)!=e&&this.view.dispatch({effects:fa.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function ga(e,t,n,r,i){t.lastIndex=0;for(let s,o=e.iterRange(n,r),a=n;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=t.exec(o.value);)i(a+s.index,s)}class ya{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:s=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let s=n(e,t,r);s&&i(r,r+e[0].length,s)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n)}this.boundary=i,this.maxLength=s}createDeco(e){let t=new Tn,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),s=Math.min(e.state.doc.lineAt(s).to,s+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}(e,this.maxLength))ga(e.state.doc,this.regexp,t,r,((t,r)=>this.addMatch(r,e,t,n)));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges(((t,i,s,o)=>{o>e.view.viewport.from&&s1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let s=Math.max(i.from,n),o=Math.min(i.to,r);if(o>s){let n=e.state.doc.lineAt(s),r=n.ton.from;s--)if(this.boundary.test(n.text[s-1-n.from])){a=s;break}for(;ou.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.indexthis.addMatch(n,e,t,p)));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>el,add:u})}}return t}}const _a=null!=/x/.unicode?"gu":"g",ba=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",_a),va={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ea=null;const xa=Pt.define({combine(e){let t=bn(e,{render:null,specialChars:ba,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==Ea&&"undefined"!=typeof document&&document.body){let t=document.body.style;Ea=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return Ea||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,_a)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,_a)),t}});let Sa=null;class Oa extends Yr{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(va[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement("span");return i.textContent=t,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class Ta extends Yr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const wa=Jr.line({class:"cm-activeLine"}),Ca=$i.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(wa.range(i.from)),t=i.from)}return Jr.set(n)}},{decorations:e=>e.decorations});class Aa extends Yr{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Jn(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=sr(t[0],"rtl"!=n.direction),i=parseInt(n.lineHeight);return r.bottom-r.top>1.5*i?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}const Pa=2e3;function ka(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,s=i>Pa?-1:i==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Mn(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function Da(e,t){let n=ka(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,s){let o=ka(e,t);if(!o)return r;let a=function(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),s=[];if(t.off>Pa||n.off>Pa||t.col<0||n.col<0){let o=Math.min(t.off,n.off),a=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=a&&s.push(wt.range(n.from+o,n.to+a))}}else{let o=Math.min(t.col,n.col),a=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=jn(n.text,o,e.tabSize,!0);if(r<0)s.push(wt.cursor(n.to));else{let t=jn(n.text,a,e.tabSize);s.push(wt.range(n.from+r,n.from+t))}}}return s}(e.state,n,o);return a.length?s?wt.create(a.concat(r.ranges)):wt.create(a):r}}:null}const Ra={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},Ia={style:"cursor: crosshair"};const La="-10000px";class Ba{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e));let i=null;this.tooltipViews=this.tooltips.map((e=>i=n(e,i)))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter((e=>e));if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],o=t?[]:null;for(let n=0;nt[n]=e)),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=s,!0}}function Ma(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const ja=Pt.define({combine:e=>{var t,n,r;return{position:Mr.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((e=>e.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find((e=>e.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||Ma}}}),Na=new WeakMap,Fa=$i.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(ja);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Ba(e,Ka,((e,t)=>this.createTooltip(e,t)),(e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()})),this.above=this.manager.tooltips.map((e=>!!e.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(ja);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.insertBefore(e,r)}return n.dom.style.position=this.position,n.dom.style.top=La,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect(),t=1,n=1,r=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Mr.gecko)r=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==La&&"0px"==e.style.left){let t=e.getBoundingClientRect();r=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(r||"absolute"==this.position)if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,n=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:n}=this.view.viewState);return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(ja).tooltipSpace(this.view),scaleX:t,scaleY:n,makeAbsolute:r}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:n,space:r,scaleX:i,scaleY:s}=e,o=[];for(let a=0;a=Math.min(n.bottom,r.bottom)||p.rightMath.min(n.right,r.right)+.1){u.style.top=La;continue}let f=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,h=f?7:0,m=d.right-d.left,g=null!==(t=Na.get(c))&&void 0!==t?t:d.bottom-d.top,y=c.offset||Va,_=this.view.textDirection==li.LTR,b=d.width>r.right-r.left?_?r.left:r.right-d.width:_?Math.min(p.left-(f?14:0)+y.x,r.right-m):Math.max(r.left,p.left-m+(f?14:0)-y.x),v=this.above[a];!l.strictSide&&(v?p.top-(d.bottom-d.top)-y.yr.bottom)&&v==r.bottom-p.bottom>p.top-r.top&&(v=this.above[a]=!v);let E=(v?p.top-r.top:r.bottom-p.bottom)-h;if(Eb&&e.topx&&(x=v?e.top-g-2-h:e.bottom+h+2);if("absolute"==this.position?(u.style.top=(x-e.parent.top)/s+"px",u.style.left=(b-e.parent.left)/i+"px"):(u.style.top=x/s+"px",u.style.left=b/i+"px"),f){let e=p.left+(_?y.x:-y.x)-(b+14-7);f.style.left=e/i+"px"}!0!==c.overlap&&o.push({left:b,top:x,right:S,bottom:x+g}),u.classList.toggle("cm-tooltip-above",v),u.classList.toggle("cm-tooltip-below",!v),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=La}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Ua=Uo.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Va={x:0,y:0},Ka=Pt.define({enables:[Fa,Ua]}),Wa=Pt.define({combine:e=>e.reduce(((e,t)=>e.concat(t)),[])});class $a{static create(e){return new $a(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Ba(e,Wa,((e,t)=>this.createHostedView(e,t)),(e=>e.dom.remove()))}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r)if(void 0===t)t=r;else if(t!==r)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const qa=Ka.compute([Wa],(e=>{let t=e.facet(Wa);return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:$a.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class Qa{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let s=e.bidiSpans(e.state.doc.lineAt(r)).find((e=>e.from<=r&&e.to>=r)),o=s&&s.dir==li.RTL?-1:1;i=t.x{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(t=>Ui(e.state,t,"hover tooltip")))}else!s||Array.isArray(s)&&!s.length||e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(Fa),t=e?e.manager.tooltips.findIndex((e=>e.create==$a.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(e,t){let n=e.getBoundingClientRect();return t.clientX>=n.left-4&&t.clientX<=n.right+4&&t.clientY>=n.top-4&&t.clientY<=n.bottom+4}(i.dom,e)||this.pending){let{pos:i}=r[0]||this.pending,s=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:i;(i==s?this.view.posAtCoords(this.lastMove)==i:function(e,t,n,r,i,s){let o=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>r||o.righti||Math.min(o.bottom,a)=t&&l<=n}(this.view,i,s,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function za(e,t={}){let n=on.define(),r=Mt.define({create(){return[]},update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter((e=>!t.hideOn(r,e)))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,gt.TrackDel);if(null!=e){let i=Object.assign(Object.create(null),n);i.pos=e,null!=i.end&&(i.end=r.changes.mapPos(i.end)),t.push(i)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(Ga)&&(e=[]);return e},provide:e=>Wa.from(e)});return[r,$i.define((i=>new Qa(i,e,r,n,t.hoverTime||300))),qa]}function Xa(e,t){let n=e.plugin(Fa);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const Ga=on.define();const Za=Pt.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function Ya(e,t){let n=e.plugin(Ha),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const Ha=$i.fromClass(class{constructor(e){this.input=e.state.facet(tl),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(Za);this.top=new Ja(e,!0,t.topContainer),this.bottom=new Ja(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(Za);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Ja(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ja(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(tl);if(n!=this.input){let t=n.filter((e=>e)),r=[],i=[],s=[],o=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),o.push(t)):(t=this.panels[a],t.update&&t.update(e)),r.push(t),(t.top?i:s).push(t)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(s);for(let e of o)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Uo.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class Ja{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=el(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=el(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function el(e){let t=e.nextSibling;return e.remove(),t}const tl=Pt.define({enables:Ha});class nl extends vn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}nl.prototype.elementClass="",nl.prototype.toDOM=void 0,nl.prototype.mapMode=gt.TrackBefore,nl.prototype.startSide=nl.prototype.endSide=-1,nl.prototype.point=!0;const rl=Pt.define(),il={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>On.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},sl=Pt.define();function ol(e){return[ll(),sl.of(Object.assign(Object.assign({},il),e))]}const al=Pt.define({combine:e=>e.some((e=>e))});function ll(e){let t=[cl];return e&&!1===e.fixed&&t.push(al.of(!0)),t}const cl=$i.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(sl).map((t=>new fl(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(al),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(al)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=On.iter(this.view.state.facet(rl),this.view.viewport.from),r=[],i=this.gutters.map((e=>new dl(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let s of e.type)if(s.type==Hr.Text&&t){pl(n,r,s.from);for(let e of i)e.line(this.view,s,r);t=!1}else if(s.widget)for(let e of i)e.widget(this.view,s)}else if(e.type==Hr.Text){pl(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(sl),n=e.state.facet(sl),r=e.docChanged||e.heightChanged||e.viewportChanged||!On.eq(e.startState.facet(rl),e.state.facet(rl),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new fl(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>Uo.scrollMargins.of((t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==li.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null}))});function ul(e){return Array.isArray(e)?e:[e]}function pl(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class dl{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=On.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,s=t.height/e.scaleY;if(this.i==r.elements.length){let t=new hl(e,s,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,s,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];pl(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let s=this.gutter;(0!=r.length||s.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class fl{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(r=>{let i,s=r.target;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let e=s.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=r.clientY;let o=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()}));this.markers=ul(t.markers(e)),t.initialSpacer&&(this.spacer=new hl(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=ul(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!On.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class hl{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;nr(e,t,n)||i(e,t,n):i}return n}})}});class yl extends nl{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function _l(e,t){return e.state.facet(gl).formatNumber(t,e.state)}const bl=sl.compute([gl],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(ml)},lineMarker(e,t,n){return n.some((e=>e.toDOM))?null:new yl(_l(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(gl)!=e.state.facet(gl),initialSpacer(e){return new yl(_l(e,vl(e.state.doc.lines)))},updateSpacer(e,t){let n=_l(t.view,vl(t.view.state.doc.lines));return n==e.number?e:new yl(n)},domEventHandlers:e.facet(gl).domEventHandlers})));function vl(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(El.range(i)))}return On.of(t)}));const Sl=1024;let Ol=0;class Tl{constructor(e,t){this.from=e,this.to=t}}class wl{constructor(e={}){this.id=Ol++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Pl.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}wl.closedBy=new wl({deserialize:e=>e.split(" ")}),wl.openedBy=new wl({deserialize:e=>e.split(" ")}),wl.group=new wl({deserialize:e=>e.split(" ")}),wl.isolate=new wl({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),wl.contextHash=new wl({perNode:!0}),wl.lookAhead=new wl({perNode:!0}),wl.mounted=new wl({perNode:!0});class Cl{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[wl.mounted.id]}}const Al=Object.create(null);class Pl{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Al,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new Pl(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(wl.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(wl.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}Pl.none=new Pl("",Object.create(null),0,8);class kl{constructor(e){this.types=e;for(let t=0;t=t){let o=new Ul(s.tree,s.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(Nl(o,t,n,!1))}}return i?ql(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,s=e.mode||0,o=(s&Il.IncludeAnonymous)>0;for(let e=this.cursor(s|Il.IncludeAnonymous);;){let s=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;s=!0}for(;s&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;s=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Yl(Pl.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new Ll(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new Ll(Pl.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=Sl,reused:s=[],minRepeatType:o=r.types.length}=e,a=Array.isArray(n)?new Bl(n,n.length):n,l=r.types,c=0,u=0;function p(e,t,n,_,b,v){let{id:E,start:x,end:S,size:O}=a,T=u;for(;O<0;){if(a.next(),-1==O){let t=s[E];return n.push(t),void _.push(x-e)}if(-3==O)return void(c=E);if(-4==O)return void(u=E);throw new RangeError(`Unrecognized record size: ${O}`)}let w,C,A=l[E],P=x-e;if(S-x<=i&&(C=g(a.pos-t,b))){let t=new Uint16Array(C.size-C.skip),n=a.pos-C.size,i=t.length;for(;a.pos>n;)i=y(C.start,t,i);w=new Ml(t,S-C.start,r),P=C.start-e}else{let e=a.pos-O;a.next();let t=[],n=[],r=E>=o?E:-1,s=0,l=S;for(;a.pos>e;)r>=0&&a.id==r&&a.size>=0?(a.end<=l-i&&(h(t,n,x,s,a.end,l,r,T),s=t.length,l=a.end),a.next()):v>2500?d(x,e,t,n):p(x,e,t,n,r,v+1);if(r>=0&&s>0&&s-1&&s>0){let e=f(A);w=Yl(A,t,n,0,t.length,0,S-x,e,e)}else w=m(A,t,n,S-x,T-S)}n.push(w),_.push(P)}function d(e,t,n,s){let o=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:r}=a;if(r>4)a.next();else{if(c>-1&&t=0;e-=3)t[n++]=o[e],t[n++]=o[e+1]-i,t[n++]=o[e+2]-i,t[n++]=n;n.push(new Ml(t,o[2]-i,r)),s.push(i-e)}}function f(e){return(t,n,r)=>{let i,s,o=0,a=t.length-1;if(a>=0&&(i=t[a])instanceof Ll){if(!a&&i.type==e&&i.length==r)return i;(s=i.prop(wl.lookAhead))&&(o=n[a]+i.length+s)}return m(e,t,n,r,o)}}function h(e,t,n,i,s,o,a,l){let c=[],u=[];for(;e.length>i;)c.push(e.pop()),u.push(t.pop()+n-s);e.push(m(r.types[a],c,u,o-s,l-o)),t.push(s-n)}function m(e,t,n,r,i=0,s){if(c){let e=[wl.contextHash,c];s=s?[e].concat(s):[e]}if(i>25){let e=[wl.lookAhead,i];s=s?[e].concat(s):[e]}return new Ll(e,t,n,r,s)}function g(e,t){let n=a.fork(),r=0,s=0,l=0,c=n.end-i,u={size:0,start:0,skip:0};e:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=s,u.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a=o?4:0,d=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break e;p+=4}else n.id>=o&&(p+=4);n.next()}s=d,r+=e,l+=p}return(t<0||r==e)&&(u.size=r,u.start=s,u.skip=l),u.size>4?u:void 0}function y(e,t,n){let{id:r,start:i,end:s,size:l}=a;if(a.next(),l>=0&&r4){let r=a.pos-(l-4);for(;a.pos>r;)n=y(e,t,n)}t[--n]=o,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else-3==l?c=r:-4==l&&(u=r);return n}let _=[],b=[];for(;a.pos>0;)p(e.start||0,e.bufferStart||0,_,b,-1,0);let v=null!==(t=e.length)&&void 0!==t?t:_.length?b[0]+_[0].length:0;return new Ll(l[e.topID],_.reverse(),b.reverse(),v)}(e)}}Ll.empty=new Ll(Pl.none,[],[],0);class Bl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Bl(this.buffer,this.index)}}class Ml{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pl.none}toString(){let e=[];for(let t=0;t0));a=s[a+3]);return o}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),s=0;for(let o=e,a=0;o=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Nl(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?o.length:-1;e!=l;e+=t){let l=o[e],c=a[e]+s.from;if(jl(r,n,c,c+l.length))if(l instanceof Ml){if(i&Il.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,t,n-c,r);if(o>-1)return new $l(new Wl(s,l,e,c),null,o)}else if(i&Il.IncludeAnonymous||!l.type.isAnonymous||Xl(l)){let o;if(!(i&Il.IgnoreMounts)&&(o=Cl.get(l))&&!o.overlay)return new Ul(o.tree,c,e,s);let a=new Ul(l,c,e,s);return i&Il.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(i&Il.IncludeAnonymous||!s.type.isAnonymous)return null;if(e=s.index>=0?s.index+t:t<0?-1:s._parent._tree.children.length,s=s._parent,!s)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&Il.IgnoreOverlays)&&(r=Cl.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e=n:i>n))return new Ul(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Vl(e,t,n,r){let i=e.cursor(),s=[];if(!i.firstChild())return s;if(null!=n)for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return s;for(;;){if(null!=r&&i.type.is(r))return s;if(i.type.is(t)&&s.push(i.node),!i.nextSibling())return null==r?s:[]}}function Kl(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class Wl{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class $l extends Fl{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new $l(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&Il.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new $l(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new $l(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new $l(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let s=n.buffer[this.index+1];e.push(n.slice(r,i,s)),t.push(0)}return new Ll(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ql(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||i.to0){if(this.index-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&Il.IncludeAnonymous||e instanceof Ml||!e.type.isAnonymous||Xl(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;t=s,n=i+1;break e}r=this.stack[--i]}for(let e=n;e=0;i--){if(i<0)return Kl(this.node,e,r);let s=n[t.buffer[this.stack[i]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function Xl(e){return e.children.some((e=>e instanceof Ml||!e.type.isAnonymous||Xl(e)))}const Gl=new WeakMap;function Zl(e,t){if(!e.isAnonymous||t instanceof Ml||t.type!=e)return 1;let n=Gl.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Ll)){n=1;break}n+=Zl(e,r)}Gl.set(t,n)}return n}function Yl(e,t,n,r,i,s,o,a,l){let c=0;for(let n=r;n=u)break;h+=t}if(c==i+1){if(h>u){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}p.push(n[i])}else{let t=r[c-1]+n[c-1].length-f;p.push(Yl(e,n,r,i,c,f,t,null,l))}d.push(f+a-s)}}(t,n,r,i,0),(a||l)(p,d,o)}class Hl{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof $l?this.setBuffer(e.context.buffer,e.index,t):e instanceof Ul&&this.map.set(e.tree,t)}get(e){return e instanceof $l?this.getBuffer(e.context.buffer,e.index):e instanceof Ul?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Jl{constructor(e,t,n,r,i=!1,s=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(s?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new Jl(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,s=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let c=o=n)for(;s&&s.from=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new Jl(e,n,t.tree,t.offset+l,o>0,!!c)}if(t&&r.push(t),s.to>u)break;s=inew Tl(e.from,e.to))):[new Tl(0,0)]:[new Tl(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class tc{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new wl({perNode:!0});let nc=0;class rc{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=nc++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new rc([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new sc;return t=>t.modified.indexOf(e)>-1?t:sc.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let ic=0;class sc{constructor(){this.instances=[],this.id=ic++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>n.base==e&&function(e,t){return e.length==t.length&&e.every(((e,n)=>e==t[n]))}(t,n.modified)));if(n)return n;let r=[],i=new rc(r,e,t);for(let e of t)e.instances.push(i);let s=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of s)r.push(sc.get(t,e));return i}}function oc(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){i=0;break}if("/"!=o)throw new RangeError("Invalid path: "+e);s=e.slice(t)}let o=n.length-1,a=n[o];if(!a)throw new RangeError("Invalid path: "+e);let l=new lc(r,i,o>0?n.slice(0,o):null);t[a]=l.sort(t[a])}}return ac.add(t)}const ac=new wl;class lc{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function uc(e,t,n,r=0,i=e.length){let s=new pc(r,Array.isArray(t)?t:[t],n);s.highlightRange(e.cursor(),r,i,"",s.highlighters),s.flush(i)}lc.empty=new lc([],2,null);class pc{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:s,from:o,to:a}=e;if(o>=n||a<=t)return;s.isTop&&(i=this.highlighters.filter((e=>!e.scope||e.scope(s))));let l=r,c=function(e){let t=e.type.prop(ac);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||lc.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(Math.max(t,o),l),c.opaque)return;let p=e.tree&&e.tree.prop(wl.mounted);if(p&&p.overlay){let s=e.node.enter(p.overlay[0].from+o,1),c=this.highlighters.filter((e=>!e.scope||e.scope(p.tree.type))),u=e.firstChild();for(let d=0,f=o;;d++){let h=d=m)&&e.nextSibling()););if(!h||m>n)break;f=h.to+o,f>t&&(this.highlightRange(s.cursor(),Math.max(t,h.from+o),Math.min(n,f),"",c),this.startSpan(Math.min(n,f),l))}u&&e.parent()}else if(e.firstChild()){p&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const dc=rc.define,fc=dc(),hc=dc(),mc=dc(hc),gc=dc(hc),yc=dc(),_c=dc(yc),bc=dc(yc),vc=dc(),Ec=dc(vc),xc=dc(),Sc=dc(),Oc=dc(),Tc=dc(Oc),wc=dc(),Cc={comment:fc,lineComment:dc(fc),blockComment:dc(fc),docComment:dc(fc),name:hc,variableName:dc(hc),typeName:mc,tagName:dc(mc),propertyName:gc,attributeName:dc(gc),className:dc(hc),labelName:dc(hc),namespace:dc(hc),macroName:dc(hc),literal:yc,string:_c,docString:dc(_c),character:dc(_c),attributeValue:dc(_c),number:bc,integer:dc(bc),float:dc(bc),bool:dc(yc),regexp:dc(yc),escape:dc(yc),color:dc(yc),url:dc(yc),keyword:xc,self:dc(xc),null:dc(xc),atom:dc(xc),unit:dc(xc),modifier:dc(xc),operatorKeyword:dc(xc),controlKeyword:dc(xc),definitionKeyword:dc(xc),moduleKeyword:dc(xc),operator:Sc,derefOperator:dc(Sc),arithmeticOperator:dc(Sc),logicOperator:dc(Sc),bitwiseOperator:dc(Sc),compareOperator:dc(Sc),updateOperator:dc(Sc),definitionOperator:dc(Sc),typeOperator:dc(Sc),controlOperator:dc(Sc),punctuation:Oc,separator:dc(Oc),bracket:Tc,angleBracket:dc(Tc),squareBracket:dc(Tc),paren:dc(Tc),brace:dc(Tc),content:vc,heading:Ec,heading1:dc(Ec),heading2:dc(Ec),heading3:dc(Ec),heading4:dc(Ec),heading5:dc(Ec),heading6:dc(Ec),contentSeparator:dc(vc),list:dc(vc),quote:dc(vc),emphasis:dc(vc),strong:dc(vc),link:dc(vc),monospace:dc(vc),strikethrough:dc(vc),inserted:dc(),deleted:dc(),changed:dc(),invalid:dc(),meta:wc,documentMeta:dc(wc),annotation:dc(wc),processingInstruction:dc(wc),definition:rc.defineModifier(),constant:rc.defineModifier(),function:rc.defineModifier(),standard:rc.defineModifier(),local:rc.defineModifier(),special:rc.defineModifier()};cc([{tag:Cc.link,class:"tok-link"},{tag:Cc.heading,class:"tok-heading"},{tag:Cc.emphasis,class:"tok-emphasis"},{tag:Cc.strong,class:"tok-strong"},{tag:Cc.keyword,class:"tok-keyword"},{tag:Cc.atom,class:"tok-atom"},{tag:Cc.bool,class:"tok-bool"},{tag:Cc.url,class:"tok-url"},{tag:Cc.labelName,class:"tok-labelName"},{tag:Cc.inserted,class:"tok-inserted"},{tag:Cc.deleted,class:"tok-deleted"},{tag:Cc.literal,class:"tok-literal"},{tag:Cc.string,class:"tok-string"},{tag:Cc.number,class:"tok-number"},{tag:[Cc.regexp,Cc.escape,Cc.special(Cc.string)],class:"tok-string2"},{tag:Cc.variableName,class:"tok-variableName"},{tag:Cc.local(Cc.variableName),class:"tok-variableName tok-local"},{tag:Cc.definition(Cc.variableName),class:"tok-variableName tok-definition"},{tag:Cc.special(Cc.variableName),class:"tok-variableName2"},{tag:Cc.definition(Cc.propertyName),class:"tok-propertyName tok-definition"},{tag:Cc.typeName,class:"tok-typeName"},{tag:Cc.namespace,class:"tok-namespace"},{tag:Cc.className,class:"tok-className"},{tag:Cc.macroName,class:"tok-macroName"},{tag:Cc.propertyName,class:"tok-propertyName"},{tag:Cc.operator,class:"tok-operator"},{tag:Cc.comment,class:"tok-comment"},{tag:Cc.meta,class:"tok-meta"},{tag:Cc.invalid,class:"tok-invalid"},{tag:Cc.punctuation,class:"tok-punctuation"}]);var Ac;const Pc=new wl;function kc(e){return Pt.define({combine:e?t=>t.concat(e):void 0})}const Dc=new wl;class Rc{constructor(e,t,n=[],r=""){this.data=e,this.name=r,_n.prototype.hasOwnProperty("tree")||Object.defineProperty(_n.prototype,"tree",{get(){return Bc(this)}}),this.parser=t,this.extension=[$c.of(this),_n.languageData.of(((e,t,n)=>{let r=Ic(e,t,n),i=r.type.prop(Pc);if(!i)return[];let s=e.facet(i),o=r.type.prop(Dc);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(s)}}return s}))].concat(n)}isActiveAt(e,t,n=-1){return Ic(e,t,n).type.prop(Pc)==this.data}findRegions(e){let t=e.facet($c);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(Pc)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(wl.mounted);if(i){if(i.tree.prop(Pc)==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(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0))]}),e.name)}configure(e,t){return new Lc(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Bc(e){let t=e.field(Rc.state,!1);return t?t.tree:Ll.empty}class Mc{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=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let jc=null;class Nc{constructor(e,t,n=[],r,i,s,o,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=s,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Nc(e,t,[],Ll.empty,0,n,[],null)}startParse(){return this.parser.startParse(new Mc(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ll.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.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(Jl.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=jc;jc=this;try{return e()}finally{jc=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Fc(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:s,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i}))),n=Jl.applyChanges(n,t),r=Ll.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=Fc(this.fragments,n,r),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 ec{createParse(t,n,r){let i=r[0].from,s=r[r.length-1].to,o={parsedPos:i,advance(){let t=jc;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new Ll(Pl.none,[],[],s-i)},stoppedAt:null,stopAt(){}};return o}}}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 jc}}function Fc(e,t,n){return Jl.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class Uc{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 Uc(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Nc.create(e.facet($c).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Uc(n)}}Rc.state=Mt.define({create:Uc.init,update(e,t){for(let e of t.effects)if(e.is(Rc.setState))return e.value;return t.startState.facet($c)!=t.state.facet($c)?Uc.init(t.state):e.apply(t)}});let Vc=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(Vc=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Kc="undefined"!=typeof navigator&&(null===(Ac=navigator.scheduling)||void 0===Ac?void 0:Ac.isInputPending)?()=>navigator.scheduling.isInputPending():null,Wc=$i.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(Rc.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Rc.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=Vc(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,a=i.context.work((()=>Kc&&Kc()||Date.now()>s),r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Rc.setState.of(new Uc(i.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>Ui(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()}}}),$c=Pt.define({combine(e){return e.length?e[0]:null},enables:e=>[Rc.state,Wc,Uo.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class qc{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Qc=Pt.define(),zc=Pt.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 Xc(e){let t=e.facet(zc);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Gc(e,t){let n="",r=e.tabSize,i=e.facet(zc)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(let e=0;e=t?function(e,t,n){let r=t.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t!=r.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Jc(r,e,n)}(e,n,t):null}class Yc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Xc(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r-1&&(i+=s-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Mn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Hc=new wl;function Jc(e,t,n){for(let r=e;r;r=r.next){let e=eu(r.node);if(e)return e(nu.create(t,n,r))}return 0}function eu(e){let t=e.type.prop(Hc);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(wl.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>su(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?tu:null}function tu(){return 0}class nu extends Yc{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new nu(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(ru(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Jc(this.context.next,this.base,this.pos)}}function ru(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function iu({closing:e,align:t=!0,units:n=1}){return r=>su(r,t,n,e)}function su(e,t,n,r,i){let s=e.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==e.pos+o,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,s=e.state.doc.lineAt(n.from),o=null==i||i<=s.from?s.to:Math.min(s.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped)return i.from{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const au=Pt.define(),lu=new wl;function cu(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function uu(e,t,n){for(let r of e.facet(au)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=Bc(e);if(r.lengthn)continue;if(i&&o.from=t&&r.to>n&&(i=r)}}return i}(e,t,n)}function pu(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const du=on.define({map:pu}),fu=on.define({map:pu});function hu(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 mu=Mt.define({create(){return Jr.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(du)&&!yu(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(xu),i=r?Jr.replace({widget:new wu(r(t.state,n.value))}):Tu;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(fu)&&(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:r}=t.selection.main;e.between(r,r,((e,t)=>{er&&(n=!0)})),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>Uo.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{(!i||i.from>e)&&(i={from:e,to:t})})),i}function yu(e,t,n){let r=!1;return e.between(t,t,((e,i)=>{e==t&&i==n&&(r=!0)})),r}function _u(e,t){return e.field(mu,!1)?t:t.concat(on.appendConfig.of(Su()))}function bu(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return Uo.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}const vu=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of hu(e)){let n=uu(e.state,t.from,t.to);if(n)return e.dispatch({effects:_u(e.state,[du.of(n),bu(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(mu,!1))return!1;let t=[];for(let n of hu(e)){let r=gu(e.state,n.from,n.to);r&&t.push(fu.of(r),bu(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(mu,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(fu.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],Eu={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},xu=Pt.define({combine(e){return bn(e,Eu)}});function Su(e){let t=[mu,Pu];return e&&t.push(xu.of(e)),t}function Ou(e,t){let{state:n}=e,r=n.facet(xu),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=gu(e.state,n.from,n.to);r&&e.dispatch({effects:fu.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const Tu=Jr.replace({widget:new class extends Yr{toDOM(e){return Ou(e,null)}}});class wu extends Yr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ou(e,this.value)}}const Cu={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Au extends nl{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}}const Pu=Uo.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 ku{constructor(e,t){let n;function r(e){let t=Vn.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,s=t.scope;this.scope=s instanceof Rc?e=>e.prop(Pc)==s.data:s?e=>e==s:void 0,this.style=cc(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:i}).style,this.module=n?new Vn(n):null,this.themeType=t.themeType}static define(e,t){return new ku(e,t||{})}}const Du=Pt.define(),Ru=Pt.define({combine(e){return e.length?[e[0]]:null}});function Iu(e){let t=e.facet(Du);return t.length?t:e.facet(Ru)}function Lu(e,t){let n,r=[Mu];return e instanceof ku&&(e.module&&r.push(Uo.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(Ru.of(e)):n?r.push(Du.computeN([Uo.darkTheme],(t=>t.facet(Uo.darkTheme)==("dark"==n)?[e]:[]))):r.push(Du.of(e)),r}class Bu{constructor(e){this.markCache=Object.create(null),this.tree=Bc(e.state),this.decorations=this.buildDeco(e,Iu(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Bc(e.state),n=Iu(e.state),r=n!=Iu(e.startState),{viewport:i}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Jr.none;let n=new Tn;for(let{from:r,to:i}of e.visibleRanges)uc(this.tree,t,((e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=Jr.mark({class:r})))}),r,i);return n.finish()}}const Mu=Kt.high($i.fromClass(Bu,{decorations:e=>e.decorations})),ju=ku.define([{tag:Cc.meta,color:"#404740"},{tag:Cc.link,textDecoration:"underline"},{tag:Cc.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Cc.emphasis,fontStyle:"italic"},{tag:Cc.strong,fontWeight:"bold"},{tag:Cc.strikethrough,textDecoration:"line-through"},{tag:Cc.keyword,color:"#708"},{tag:[Cc.atom,Cc.bool,Cc.url,Cc.contentSeparator,Cc.labelName],color:"#219"},{tag:[Cc.literal,Cc.inserted],color:"#164"},{tag:[Cc.string,Cc.deleted],color:"#a11"},{tag:[Cc.regexp,Cc.escape,Cc.special(Cc.string)],color:"#e40"},{tag:Cc.definition(Cc.variableName),color:"#00f"},{tag:Cc.local(Cc.variableName),color:"#30a"},{tag:[Cc.typeName,Cc.namespace],color:"#085"},{tag:Cc.className,color:"#167"},{tag:[Cc.special(Cc.variableName),Cc.macroName],color:"#256"},{tag:Cc.definition(Cc.propertyName),color:"#00c"},{tag:Cc.comment,color:"#940"},{tag:Cc.invalid,color:"#f00"}]),Nu=Uo.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Fu="()[]{}",Uu=Pt.define({combine(e){return bn(e,{afterCursor:!0,brackets:Fu,maxScanDistance:1e4,renderMatch:Wu})}}),Vu=Jr.mark({class:"cm-matchingBracket"}),Ku=Jr.mark({class:"cm-nonmatchingBracket"});function Wu(e){let t=[],n=e.matched?Vu:Ku;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 $u=Mt.define({create(){return Jr.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(Uu);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=Gu(t.state,e.head,-1,r)||e.head>0&&Gu(t.state,e.head-1,1,r)||r.afterCursor&&(Gu(t.state,e.head,1,r)||e.headUo.decorations.from(e)}),qu=[$u,Nu];const Qu=new wl;function zu(e,t,n){let r=e.prop(t<0?wl.openedBy:wl.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function Xu(e){let t=e.type.prop(Qu);return t?t(e.node):e}function Gu(e,t,n,r={}){let i=r.maxScanDistance||1e4,s=r.brackets||Fu,o=Bc(e),a=o.resolveInner(t,n);for(let r=a;r;r=r.parent){let i=zu(r.type,n,s);if(i&&r.from0?t>=o.from&&to.from&&t<=o.to))return Zu(e,t,n,r,o,i,s)}}return function(e,t,n,r,i,s,o){let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%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),p=0;for(let e=0;!u.next().done&&e<=s;){let s=u.value;n<0&&(e+=s.length);let a=t+e*n;for(let e=n>0?0:s.length-1,t=n>0?s.length:-1;e!=t;e+=n){let t=o.indexOf(s[e]);if(!(t<0||r.resolveInner(a+e,1).type!=i))if(t%2==0==n>0)p++;else{if(1==p)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};p--}}n>0&&(e+=s.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,o,a.type,i,s)}function Zu(e,t,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&s.indexOf(u.type.name)>-1&&u.from-1||(Ju.push(e),console.warn(t))}function rp(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||Cc[n];r?"function"==typeof r?t.length?t=t.map(r):np(n,`Modifier ${n} used at start of tag`):t.length?np(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:np(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map((e=>e.id)),s=ep[i];if(s)return s.id;let o=ep[i]=Pl.define({id:Hu.length,name:r,props:[oc({[r]:n})]});return Hu.push(o),o.id}li.RTL,li.LTR;function ip(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}const sp=ip(up,0),op=ip(cp,0),ap=ip(((e,t)=>cp(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),s=t.length-1;s>=0&&t[s].to>r.from?t[s].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t))),0);function lp(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function cp(e,t,n=t.selection.ranges){let r=n.map((e=>lp(t,e.from).block));if(!r.every((e=>e)))return null;let i=n.map(((e,n)=>function(e,{open:t,close:n},r,i){let s,o,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,p=a.length-c;if(a.slice(p-t.length,p)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=100?s=o=e.sliceDoc(r,i):(s=e.sliceDoc(r,r+50),o=e.sliceDoc(i-50,i));let d=/^\s*/.exec(s)[0].length,f=/\s*$/.exec(o)[0].length,h=o.length-f-n.length;return s.slice(d,d+t.length)==t&&o.slice(h,h+n.length)==n?{open:{pos:r+d+t.length,margin:/\s/.test(s.charAt(d+t.length))?1:0},close:{pos:i-f-n.length,margin:/\s/.test(o.charAt(h-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!i.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&i.some((e=>e))){let e=[];for(let t,n=0;ni&&(e==s||s>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:i,empty:s,single:o}of r)!o&&s||e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,s=r+i.length;" "==t.text[s-t.from]&&s++,e.push({from:r,to:s})}return{changes:e}}return null}const pp=nn.define(),dp=nn.define(),fp=Pt.define(),hp=Pt.define({combine(e){return bn(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),mp=Mt.define({create(){return kp.empty},update(e,t){let n=t.state.facet(hp),r=t.annotation(pp);if(r){let i=Ep.fromTransaction(t,r.selection),s=r.side,o=0==s?e.undone:e.done;return o=i?xp(o,o.length,n.minDepth,i):Tp(o,t.startState.selection),new kp(0==s?r.rest:o,0==s?o:r.rest)}let i=t.annotation(dp);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(an.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=Ep.fromTransaction(t),o=t.annotation(an.time),a=t.annotation(an.userEvent);return s?e=e.addChanges(s,o,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,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 kp(e.done.map(Ep.fromJSON),e.undone.map(Ep.fromJSON))}});function gp(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(mp,!1);if(!i)return!1;let s=i.pop(e,n,t);return!!s&&(r(s),!0)}}const yp=gp(0,!1),_p=gp(1,!1),bp=gp(0,!0),vp=gp(1,!0);class Ep{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new Ep(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 Ep(e.changes&&_t.fromJSON(e.changes),[],e.mapped&&yt.fromJSON(e.mapped),e.startSelection&&wt.fromJSON(e.startSelection),e.selectionsAfter.map(wt.fromJSON))}static fromTransaction(e,t){let n=Op;for(let t of e.startState.facet(fp)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Ep(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Op)}static selection(e){return new Ep(void 0,Op,void 0,void 0,e)}}function xp(e,t,n,r){let i=t+1>n+20?t-n-1:0,s=e.slice(i,t);return s.push(r),s}function Sp(e,t){return e.length?t.length?e.concat(t):e:t}const Op=[];function Tp(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),xp(e,e.length-1,1e9,n.setSelAfter(r)))}return[Ep.selection([t])]}function wp(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 Cp(e,t){if(!e.length)return e;let n=e.length,r=Op;for(;n;){let i=Ap(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Ep.selection(r)]:Op}function Ap(e,t,n){let r=Sp(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Op,n);if(!e.changes)return Ep.selection(r);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(s):s;return new Ep(i,on.mapEffects(e.effects,t),o,e.startSelection.map(s),r)}const Pp=/^(input\.type|delete)($|\.)/;class kp{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new kp(this.done,this.undone):this}addChanges(e,t,n,r,i){let s=this.done,o=s[s.length-1];return s=o&&o.changes&&!o.changes.empty&&e.changes&&(!n||Pp.test(n))&&(!o.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,i,s)=>{for(let e=0;e=t&&i<=o&&(r=!0)}})),r}(o.changes,e.changes))||"input.type.compose"==n)?xp(s,s.length-1,r.minDepth,new Ep(e.changes.compose(o.changes),Sp(e.effects,o.effects),o.mapped,o.startSelection,Op)):xp(s,s.length,r.minDepth,e),new kp(s,Op,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Op;return i.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(i[i.length-1],e)?this:new kp(Tp(this.done,e),this.undone,t,n)}addMapping(e){return new kp(Cp(this.done,e),Cp(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],s=i.selectionsAfter[0]||t.selection;if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:pp.of({side:e,rest:wp(r),selection:s}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?Op:r.slice(0,r.length-1);return i.mapped&&(n=Cp(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:pp.of({side:e,rest:n,selection:s}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}kp.empty=new kp(Op,Op);const Dp=[{key:"Mod-z",run:yp,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:_p,preventDefault:!0},{linux:"Ctrl-Shift-z",run:_p,preventDefault:!0},{key:"Mod-u",run:bp,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:vp,preventDefault:!0}];function Rp(e,t){return wt.create(e.ranges.map(t),e.mainIndex)}function Ip(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Lp({state:e,dispatch:t},n){let r=Rp(e.selection,n);return!r.eq(e.selection,!0)&&(t(Ip(e,r)),!0)}function Bp(e,t){return wt.cursor(t?e.to:e.from)}function Mp(e,t){return Lp(e,(n=>n.empty?e.moveByChar(n,t):Bp(n,t)))}function jp(e){return e.textDirectionAt(e.state.selection.main.head)==li.LTR}const Np=e=>Mp(e,!jp(e)),Fp=e=>Mp(e,jp(e));function Up(e,t){return Lp(e,(n=>n.empty?e.moveByGroup(n,t):Bp(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function Vp(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Kp(e,t,n){let r,i,s=Bc(e).resolveInner(t.head),o=n?wl.closedBy:wl.openedBy;for(let r=t.head;;){let t=n?s.childAfter(r):s.childBefore(r);if(!t)break;Vp(e,t,o)?s=t:r=n?t.to:t.from}return i=s.type.prop(o)&&(r=n?Gu(e,s.from,1):Gu(e,s.to,-1))&&r.matched?n?r.end.to:r.end.from:n?s.to:s.from,wt.cursor(i,n?-1:1)}function Wp(e,t){return Lp(e,(n=>{if(!n.empty)return Bp(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const $p=e=>Wp(e,!1),qp=e=>Wp(e,!0);function Qp(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):Bp(n,t)));if(s.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+r.marginTop,l=o.bottom-r.marginBottom;t&&t.top>a&&t.bottomzp(e,!1),Gp=e=>zp(e,!0);function Zp(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=wt.cursor(r.from+n))}return i}function Yp(e,t,n){let r=!1,i=Rp(e.selection,(t=>{let i=Gu(e,t.head,-1)||Gu(e,t.head,1)||t.head>0&&Gu(e,t.head-1,1)||t.head{let n=t(e);return wt.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(Ip(e.state,n)),!0)}function Jp(e,t){return Hp(e,(n=>e.moveByChar(n,t)))}const ed=e=>Jp(e,!jp(e)),td=e=>Jp(e,jp(e));function nd(e,t){return Hp(e,(n=>e.moveByGroup(n,t)))}function rd(e,t){return Hp(e,(n=>e.moveVertically(n,t)))}const id=e=>rd(e,!1),sd=e=>rd(e,!0);function od(e,t){return Hp(e,(n=>e.moveVertically(n,t,Qp(e).height)))}const ad=e=>od(e,!1),ld=e=>od(e,!0),cd=({state:e,dispatch:t})=>(t(Ip(e,{anchor:0})),!0),ud=({state:e,dispatch:t})=>(t(Ip(e,{anchor:e.doc.length})),!0),pd=({state:e,dispatch:t})=>(t(Ip(e,{anchor:e.selection.main.anchor,head:0})),!0),dd=({state:e,dispatch:t})=>(t(Ip(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function fd(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange((r=>{let{from:i,to:s}=r;if(i==s){let o=t(r);oi&&(n="delete.forward",o=hd(e,o,!0)),i=Math.min(i,o),s=Math.max(s,o)}else i=hd(e,i,!1),s=hd(e,s,!0);return i==s?{range:r}:{changes:{from:i,to:s},range:wt.cursor(i,it(e))))r.between(t,t,((e,r)=>{et&&(t=n?r:e)}));return t}const md=(e,t)=>fd(e,(n=>{let r,i,s=n.from,{state:o}=e,a=o.doc.lineAt(s);if(!t&&s>a.from&&smd(e,!1),yd=e=>md(e,!0),_d=(e,t)=>fd(e,(n=>{let r=n.head,{state:i}=e,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?s.to:s.from)){r==n.head&&s.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=at(s.text,r-s.from,t)+s.from,l=s.text.slice(Math.min(r,a)-s.from,Math.max(r,a)-s.from),c=o(l);if(null!=e&&c!=e)break;" "==l&&r==n.head||(e=c),r=a}return r})),bd=e=>_d(e,!1);function vd(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),s=e.doc.lineAt(r.to);if(r.empty||r.to!=s.from||(s=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=s.to,e.ranges.push(r)}else t.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return t}function Ed(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of vd(e)){if(n?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(n?t.to+1:t.from-1),o=s.length+1;if(n){r.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak});for(let n of t.ranges)i.push(wt.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text});for(let e of t.ranges)i.push(wt.range(e.anchor-o,e.head-o))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:wt.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function xd(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of vd(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Sd=Od(!1);function Od(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange((n=>{let{from:r,to:i}=n,s=t.doc.lineAt(r),o=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=Bc(e).resolveInner(t),i=r.childBefore(t),s=r.childAfter(t);return i&&s&&i.to<=t&&s.from>=t&&(n=i.type.prop(wl.closedBy))&&n.indexOf(s.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(s.from).from&&!/\S/.test(e.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}(t,r);e&&(r=i=(i<=s.to?s:t.doc.lineAt(i)).to);let a=new Yc(t,{simulateBreak:r,simulateDoubleBreak:!!o}),l=Zc(a,r);for(null==l&&(l=Mn(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));is.from&&r{let i=[];for(let s=r.from;s<=r.to;){let o=e.doc.lineAt(s);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),s=o.to+1}let s=e.changes(i);return{changes:i,range:wt.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}}))}const wd=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Td(e,((t,n)=>{n.push({from:t.from,insert:e.facet(zc)})})),{userEvent:"input.indent"})),!0),Cd=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Td(e,((t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Mn(r,e.tabSize),s=0,o=Gc(e,Math.max(0,i-Xc(e)));for(;sLp(e,(t=>wt.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>Hp(e,(t=>wt.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>Lp(e,(t=>wt.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>Hp(e,(t=>wt.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:yd},{key:"Ctrl-h",run:gd},{key:"Ctrl-k",run:e=>fd(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:Xe.of(["",""])},range:wt.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,r=e.doc.lineAt(n),i=n==r.from?n-1:at(r.text,n-r.from,!1)+r.from,s=n==r.to?n+1:at(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(i,n))},range:wt.cursor(s)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Gp}],Pd=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Lp(e,(t=>Kp(e.state,t,!jp(e)))),shift:e=>Hp(e,(t=>Kp(e.state,t,!jp(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Lp(e,(t=>Kp(e.state,t,jp(e)))),shift:e=>Hp(e,(t=>Kp(e.state,t,jp(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Ed(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>xd(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Ed(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>xd(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=wt.create([n.main]):n.main.empty||(r=wt.create([wt.cursor(n.main.head)])),!!r&&(t(Ip(e,r)),!0)}},{key:"Mod-Enter",run:Od(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=vd(e).map((({from:t,to:n})=>wt.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:wt.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=Rp(e.selection,(t=>{var n;for(let r=Bc(e).resolveStack(t.from,1);r;r=r.next){let{node:e}=r;if((e.from=t.to||e.to>t.to&&e.from<=t.from)&&(null===(n=e.parent)||void 0===n?void 0:n.parent))return wt.range(e.to,e.from)}return t}));return t(Ip(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:Cd},{key:"Mod-]",run:wd},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Yc(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=Td(e,((t,i,s)=>{let o=Zc(r,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=Gc(e,o);(a!=l||s.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(vd(t).map((({from:e,to:n})=>(e>0?e--:ne.moveVertically(t,!0))).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>Yp(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=lp(e.state,n.from);return r.line?sp(e):!!r.block&&ap(e)}},{key:"Alt-A",run:op}].concat([{key:"ArrowLeft",run:Np,shift:ed,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>Up(e,!jp(e)),shift:e=>nd(e,!jp(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Lp(e,(t=>Zp(e,t,!jp(e)))),shift:e=>Hp(e,(t=>Zp(e,t,!jp(e)))),preventDefault:!0},{key:"ArrowRight",run:Fp,shift:td,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>Up(e,jp(e)),shift:e=>nd(e,jp(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Lp(e,(t=>Zp(e,t,jp(e)))),shift:e=>Hp(e,(t=>Zp(e,t,jp(e)))),preventDefault:!0},{key:"ArrowUp",run:$p,shift:id,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cd,shift:pd},{mac:"Ctrl-ArrowUp",run:Xp,shift:ad},{key:"ArrowDown",run:qp,shift:sd,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ud,shift:dd},{mac:"Ctrl-ArrowDown",run:Gp,shift:ld},{key:"PageUp",run:Xp,shift:ad},{key:"PageDown",run:Gp,shift:ld},{key:"Home",run:e=>Lp(e,(t=>Zp(e,t,!1))),shift:e=>Hp(e,(t=>Zp(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:cd,shift:pd},{key:"End",run:e=>Lp(e,(t=>Zp(e,t,!0))),shift:e=>Hp(e,(t=>Zp(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:ud,shift:dd},{key:"Enter",run:Sd},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:gd,shift:gd},{key:"Delete",run:yd},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bd},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>_d(e,!0)},{mac:"Mod-Backspace",run:e=>fd(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>fd(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head({mac:e.key,run:e.run,shift:e.shift}))))),kd={key:"Tab",run:wd,shift:Cd};function Dd(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;te.normalize("NFKD"):e=>e;class Ld{constructor(e,t,n=0,r=e.length,i,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(Id(e)):Id,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return dt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ft(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ht(e);let r=this.normalize(t);for(let e=0,i=n;;e++){let s=r.charCodeAt(e),o=this.match(s,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Vd(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new Fd(t,e.sliceString(t,n));return Nd.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:s}=r;return s>t&&(i=e.sliceString(t,s)+i,s=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=Vd(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Fd.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Vd(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function Kd(e){let t=Dd("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,s,o,a,l]=n,c=a?+a.slice(1):0,u=o?+o:i.number;if(o&&l){let e=u/100;s&&(e=e*("-"==s?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&s&&(u=u*("-"==s?-1:1)+i.number);let p=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),d=wt.cursor(p.from+Math.max(0,Math.min(c,p.length)));e.dispatch({effects:[Wd.of(!1),Uo.scrollIntoView(d.from,{y:"center"})],selection:d}),e.focus()}return{dom:Dd("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:Wd.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},Dd("label",e.state.phrase("Go to line"),": ",t)," ",Dd("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(jd.prototype[Symbol.iterator]=Ud.prototype[Symbol.iterator]=function(){return this});const Wd=on.define(),$d=Mt.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(Wd)&&(e=n.value);return e},provide:e=>tl.from(e,(e=>e?Kd:null))}),qd=Uo.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Qd={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zd=Pt.define({combine(e){return bn(e,Qd,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});const Xd=Jr.mark({class:"cm-selectionMatch"}),Gd=Jr.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Zd(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==hn.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==hn.Word)}const Yd=$i.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(zd),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Jr.none;let i,s=r.main,o=null;if(s.empty){if(!t.highlightWordAroundCursor)return Jr.none;let e=n.wordAt(s.head);if(!e)return Jr.none;o=n.charCategorizer(s.head),i=n.sliceDoc(e.from,e.to)}else{let e=s.to-s.from;if(e200)return Jr.none;if(t.wholeWords){if(i=n.sliceDoc(s.from,s.to),o=n.charCategorizer(s.head),!Zd(o,n,s.from,s.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==hn.Word&&e(t.sliceDoc(r-1,r))==hn.Word}(o,n,s.from,s.to))return Jr.none}else if(i=n.sliceDoc(s.from,s.to),!i)return Jr.none}let a=[];for(let r of e.visibleRanges){let e=new Ld(n.doc,i,r.from,r.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!o||Zd(o,n,r,i))&&(s.empty&&r<=s.from&&i>=s.to?a.push(Gd.range(r,i)):(r>=s.to||i<=s.from)&&a.push(Xd.range(r,i)),a.length>t.maxMatches))return Jr.none}}return Jr.set(a)}},{decorations:e=>e.decorations}),Hd=Uo.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const Jd=Pt.define({combine(e){return bn(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Pf(e),scrollToMatch:e=>Uo.scrollIntoView(e)})}});class ef{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,Md),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new lf(this):new rf(this)}getCursor(e,t=0,n){let r=e.doc?e:_n.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?sf(this,r,t,n):nf(this,r,t,n)}}class tf{constructor(e){this.spec=e}}function nf(e,t,n,r){return new Ld(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(n,r,i,s)=>((s>n||s+i.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=nf(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function sf(e,t,n,r){return new jd(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(of(n.input,n.index))!=hn.Word||i(af(n.input,n.index))!=hn.Word)&&(i(af(n.input,n.index+n[0].length))!=hn.Word||i(of(n.input,n.index+n[0].length))!=hn.Word)):void 0},n,r);var i}function of(e,t){return e.slice(at(e,t,!1),t)}function af(e,t){return e.slice(t,at(e,t))}class lf extends tf{nextMatch(e,t,n){let r=sf(this.spec,e,n,e.doc.length).next();return r.done&&(r=sf(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),s=sf(this.spec,e,i,n),o=null;for(;!s.next().done;)o=s.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=sf(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const cf=on.define(),uf=on.define(),pf=Mt.define({create(e){return new df(Sf(e).create(),null)},update(e,t){for(let n of t.effects)n.is(cf)?e=new df(n.value.create(),e.panel):n.is(uf)&&(e=new df(e.query,n.value?xf:null));return e},provide:e=>tl.from(e,(e=>e.panel))});class df{constructor(e,t){this.query=e,this.panel=t}}const ff=Jr.mark({class:"cm-searchMatch"}),hf=Jr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mf=$i.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(pf))}update(e){let t=e.state.field(pf);(t!=e.startState.field(pf)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Jr.none;let{view:n}=this,r=new Tn;for(let t=0,i=n.visibleRanges,s=i.length;ti[t+1].from-500;)a=i[++t].to;e.highlight(n.state,o,a,((e,t)=>{let i=n.state.selection.ranges.some((n=>n.from==e&&n.to==t));r.add(e,t,i?hf:ff)}))}return r.finish()}},{decorations:e=>e.decorations});function gf(e){return t=>{let n=t.state.field(pf,!1);return n&&n.query.spec.valid?e(t,n):wf(t)}}const yf=gf(((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=wt.single(r.from,r.to),s=e.state.facet(Jd);return e.dispatch({selection:i,effects:[Rf(e,r),s.scrollToMatch(i.main,e)],userEvent:"select.search"}),Tf(e),!0})),_f=gf(((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let s=wt.single(i.from,i.to),o=e.state.facet(Jd);return e.dispatch({selection:s,effects:[Rf(e,i),o.scrollToMatch(s.main,e)],userEvent:"select.search"}),Tf(e),!0})),bf=gf(((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:wt.create(n.map((e=>wt.range(e.from,e.to)))),userEvent:"select.search.matches"}),!0)})),vf=gf(((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=t.nextMatch(n,r,r);if(!s)return!1;let o,a,l=[],c=[];if(s.from==r&&s.to==i&&(a=n.toText(t.getReplacement(s)),l.push({from:s.from,to:s.to,insert:a}),s=t.nextMatch(n,s.from,s.to),c.push(Uo.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let t=0==l.length||l[0].from>=s.to?0:s.to-s.from-a.length;o=wt.single(s.from-t,s.to-t),c.push(Rf(e,s)),c.push(n.facet(Jd).scrollToMatch(o.main,e))}return e.dispatch({changes:l,selection:o,effects:c,userEvent:"input.replace"}),!0})),Ef=gf(((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map((e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}}));if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Uo.announce.of(r),userEvent:"input.replace.all"}),!0}));function xf(e){return e.state.facet(Jd).createPanel(e)}function Sf(e,t){var n,r,i,s,o;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(Jd);return new ef({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:c.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:c.literal,regexp:null!==(s=null==t?void 0:t.regexp)&&void 0!==s?s:c.regexp,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:c.wholeWord})}function Of(e){let t=Ya(e,xf);return t&&t.dom.querySelector("[main-field]")}function Tf(e){let t=Of(e);t&&t==e.root.activeElement&&t.select()}const wf=e=>{let t=e.state.field(pf,!1);if(t&&t.panel){let n=Of(e);if(n&&n!=e.root.activeElement){let r=Sf(e.state,t.query.spec);r.valid&&e.dispatch({effects:cf.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[uf.of(!0),t?cf.of(Sf(e.state,t.query.spec)):on.appendConfig.of(Lf)]});return!0},Cf=e=>{let t=e.state.field(pf,!1);if(!t||!t.panel)return!1;let n=Ya(e,xf);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:uf.of(!1)}),!0},Af=[{key:"Mod-f",run:wf,scope:"editor search-panel"},{key:"F3",run:yf,shift:_f,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:yf,shift:_f,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Cf,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let t=new Ld(e.doc,e.sliceDoc(r,i));!t.next().done;){if(s.length>1e3)return!1;t.value.from==r&&(o=s.length),s.push(wt.range(t.value.from,t.value.to))}return t(e.update({selection:wt.create(s,o),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=Ya(e,Kd);if(!t){let n=[Wd.of(!0)];null==e.state.field($d,!1)&&n.push(on.appendConfig.of([$d,qd])),e.dispatch({effects:n}),t=Ya(e,Kd)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=wt.create(n.ranges.map((t=>e.wordAt(t.head)||wt.cursor(t.head))),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=r)))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Ld(e.doc,t,r[r.length-1].to);;){if(i.next(),!i.done){if(n&&r.some((e=>e.from==i.value.from)))continue;if(s){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}if(n)return null;i=new Ld(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(wt.range(i.from,i.to),!1),effects:Uo.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class Pf{constructor(e){this.view=e;let t=this.query=e.state.field(pf).query.spec;function n(e,t,n){return Dd("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Dd("input",{value:t.search,placeholder:kf(e,"Find"),"aria-label":kf(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Dd("input",{value:t.replace,placeholder:kf(e,"Replace"),"aria-label":kf(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Dd("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Dd("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Dd("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Dd("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>yf(e)),[kf(e,"next")]),n("prev",(()=>_f(e)),[kf(e,"previous")]),n("select",(()=>bf(e)),[kf(e,"all")]),Dd("label",null,[this.caseField,kf(e,"match case")]),Dd("label",null,[this.reField,kf(e,"regexp")]),Dd("label",null,[this.wordField,kf(e,"by word")]),...e.state.readOnly?[]:[Dd("br"),this.replaceField,n("replace",(()=>vf(e)),[kf(e,"replace")]),n("replaceAll",(()=>Ef(e)),[kf(e,"replace all")])],Dd("button",{name:"close",onclick:()=>Cf(e),"aria-label":kf(e,"close"),type:"button"},["×"])])}commit(){let e=new ef({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cf.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",Ho(Zo(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?_f:yf)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),vf(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(cf)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Jd).top}}function kf(e,t){return e.state.phrase(t)}const Df=/[\s\.,:;?!]/;function Rf(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,s=Math.max(r.from,t-30),o=Math.min(i,n+30),a=e.state.sliceDoc(s,o);if(s!=r.from)for(let e=0;e<30;e++)if(!Df.test(a[e+1])&&Df.test(a[e])){a=a.slice(e);break}if(o!=i)for(let e=a.length-1;e>a.length-30;e--)if(!Df.test(a[e-1])&&Df.test(a[e])){a=a.slice(0,e);break}return Uo.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}const If=Uo.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Lf=[pf,Kt.low(mf),If];class Bf{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=Bc(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),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Uf(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function Mf(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 jf(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,r]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}class Nf{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function Ff(e){return e.selection.main.from}function Uf(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],s="$"!=r[r.length-1];return i||s?new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const Vf=nn.define();const Kf=new WeakMap;function Wf(e){if(!Array.isArray(e))return e;let t=Kf.get(e);return t||Kf.set(e,t=jf(e)),t}const $f=on.define(),qf=on.define();class Qf{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(_=ft(l))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!r||1==b&&m||0==y&&0!=b)&&(t[u]==l||n[u]==l&&(p=!0)?s[u++]=r:s.length&&(g=!1)),y=b,r+=ht(l)}return u==a&&0==s[0]&&g?this.result((p?-200:0)-100,s,e):d==a&&0==f?this.ret(-200-e.length+(h==e.length?0:-100),[0,h]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):d==a?this.ret(-900-e.length,[f,h]):u==a?this.result((p?-200:0)-100-700+(g?0:-1100),s,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?ht(dt(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class zf{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Zf,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Gf(e(n),t(n)),optionClass:(e,t)=>n=>Gf(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Gf(e,t){return e?t?e+" "+t:e:t}function Zf(e,t,n,r,i,s){let o,a,l=e.textDirection==li.RTL,c=l,u=!1,p="top",d=t.left-i.left,f=i.right-t.right,h=r.right-r.left,m=r.bottom-r.top;if(c&&d=m||e>t.top?o=n.bottom-t.top:(p="bottom",o=t.bottom-n.top)}return{style:`${p}: ${o/((t.bottom-t.top)/s.offsetHeight)}px; max-width: ${a/((t.right-t.left)/s.offsetWidth)}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":c?"left":"right")}}function Yf(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 r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class Hf{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:s}=r.open,o=e.state.facet(Xf);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,r){let i=document.createElement("span");i.className="cm-completionLabel";let s=e.displayLabel||e.label,o=0;for(let e=0;eo&&i.appendChild(document.createTextNode(s.slice(o,t)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(t,n))),a.className="cm-completionMatchedText",o=n}return oe.position-t.position)).map((e=>e.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Yf(i.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:r}=e.state.field(t).open;for(let t,i=n.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(t=/-(\d+)$/.exec(i.id))&&+t[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Xf).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:qf.of(null)})})),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:s,disabled:o}=n.open;r.open&&r.open.options==i||(this.range=Yf(i.length,s,e.state.facet(Xf).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),o!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}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.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Yf(t.options.length,t.selected,this.view.state.facet(Xf).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(n);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)})).catch((e=>Ui(this.view.state,e,"completion info"))):this.addInfoPane(i,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}(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(),r=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}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottomn.from||0==n.from))if(i=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+s,c.setAttribute("role","option");let u=this.optionClass(o);u&&(c.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tonew Hf(n,e,t)}function eh(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class th{constructor(e,t,n,r,i,s){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new th(this.options,ih(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i){let s=function(e,t){let n=[],r=null,i=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some((t=>t.name==e))||r.push("string"==typeof t?{name:e}:t)}},s=t.facet(Xf);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)i(new Nf(t,r.source,e?e(t):[],1e9-n.length));else{let n,o=t.sliceDoc(r.from,r.to),a=s.filterStrict?new zf(o):new Qf(o);for(let t of r.result.options)if(n=a.match(t.label)){let s=t.displayLabel?e?e(t,n.matched):[]:n.matched;i(new Nf(t,r.source,s,n.score+(t.boost||0)))}}}if(r){let e=Object.create(null),t=0,i=(e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.namet.score-e.score||l(e.completion,t.completion)))){let t=e.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?o.push(e):eh(e.completion)>eh(a)&&(o[o.length-1]=e),a=e.completion}return o}(e,t);if(!s.length)return r&&e.some((e=>1==e.state))?new th(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let o=t.facet(Xf).selectOnOpen?0:-1;if(r&&r.selected!=o&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:fh,above:i.aboveCursor},r?r.timestamp:Date.now(),o,!1)}map(e){return new th(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class nh{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new nh(sh,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Xf),r=(n.override||t.languageDataAt("autocomplete",Ff(t)).map(Wf)).map((t=>{let r=this.active.find((e=>e.source==t))||new ah(t,this.active.some((e=>0!=e.state))?1:0);return r.update(e,n)}));r.length==this.active.length&&r.every(((e,t)=>e==this.active[t]))&&(r=this.active);let i=this.open;i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n1==e.state))&&(i=null),!i&&r.every((e=>1!=e.state))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new ah(e.source,0):e)));for(let t of e.effects)t.is(uh)&&(i=i&&i.setSelected(t.value,this.id));return r==this.active&&i==this.open?this:new nh(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:rh}}const rh={"aria-autocomplete":"list"};function ih(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const sh=[];function oh(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class ah{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=oh(e),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new ah(r.source,0));for(let t of e.effects)if(t.is($f))r=new ah(r.source,1,t.value?Ff(e.state):-1);else if(t.is(qf))r=new ah(r.source,0);else if(t.is(ch))for(let e of t.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new ah(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(Ff(e.startState))?new ah(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ah(this.source,this.state,e.mapPos(this.explicitPos))}}class lh extends ah{constructor(e,t,n,r,i){super(e,2,t),this.result=n,this.from=r,this.to=i}hasResult(){return!0}handleUserEvent(e,t,n){var r;let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Ff(e.state);if((this.explicitPos<0?a<=s:ao||!i||"delete"==t&&Ff(e.startState)==this.from)return new ah(this.source,"input"==t&&n.activateOnTyping?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):Uf(e,!0).test(i)}(i.validFor,e.state,s,o)?new lh(this.source,l,i,s,o):i.update&&(i=i.update(i,s,o,new Bf(e.state,a,l>=0)))?new lh(this.source,l,i,i.from,null!==(r=i.to)&&void 0!==r?r:Ff(e.state)):new ah(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ah(this.source,0):this.map(e.changes)}map(e){if(e.empty)return this;return(this.result.map?this.result.map(this.result,e):this.result)?new lh(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ah(this.source,0)}}const ch=on.define({map(e,t){return e.map((e=>e.map(t)))}}),uh=on.define(),ph=Mt.define({create(){return nh.start()},update(e,t){return e.update(t)},provide:e=>[Ka.from(e,(e=>e.tooltip)),Uo.contentAttributes.from(e,(e=>e.attrs))]});function dh(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(ph).active.find((e=>e.source==t.source));return r instanceof lh&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,s=n-i.from,o=r-i.from;return Object.assign(Object.assign({},e.changeByRange((a=>a!=i&&n!=r&&e.sliceDoc(a.from+s,a.from+o)!=e.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:t},range:wt.cursor(a.from+s+t.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:Vf.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}const fh=Jf(ph,dh);function hh(e,t="option"){return n=>{let r=n.state.field(ph,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+s*(e?1:-1):e?0:o-1;return a<0?a="page"==t?0:o-1:a>=o&&(a="page"==t?o-1:0),n.dispatch({effects:uh.of(a)}),!0}}class mh{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const gh=$i.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(ph).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(ph);if(!e.selectionSet&&!e.docChanged&&e.startState.field(ph)==t)return;let n=e.transactions.some((e=>(e.selection||e.docChanged)&&!oh(e)));for(let t=0;t50&&Date.now()-r.time>1e3){for(let e of r.context.abortListeners)try{e()}catch(e){Ui(this.view.state,e)}r.context.abortListeners=null,this.running.splice(t--,1)}else r.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is($f)))))&&(this.pendingStart=!0);let r=this.pendingStart?50:e.state.facet(Xf).activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),r):-1,0!=this.composing)for(let t of e.transactions)"input"==oh(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(ph);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=Ff(t),r=new Bf(t,n,e.explicitPos==n),i=new mh(e,r);this.running.push(i),Promise.resolve(e.source(r)).then((e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:qf.of(null)}),Ui(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Xf).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Xf);for(let r=0;re.source==i.active.source));if(s&&1==s.state)if(null==i.done){let e=new ah(i.active.source,0);for(let t of i.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(s)}t.length&&this.view.dispatch({effects:ch.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(ph,!1);if(t&&t.tooltip&&this.view.state.facet(Xf).closeOnBlur){let n=t.open&&Xa(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:qf.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:$f.of(!1)})),20),this.composing=0}}}),yh="object"==typeof navigator&&/Win/.test(navigator.platform),_h=Kt.highest(Uo.domEventHandlers({keydown(e,t){let n=t.state.field(ph,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!yh||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find((e=>e.source==r.source)),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&dh(t,r),!1}})),bh=Uo.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, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&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"}}});class vh{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class Eh{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,gt.TrackDel),n=e.mapPos(this.to,1,gt.TrackDel);return null==t||null==n?null:new Eh(this.field,t,n)}}class xh{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),s=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=s,o=/^\t*/.exec(i)[0].length;for(let t=0;tnew Eh(e.field,r[e.line]+e.from,r[e.line]+e.to)));return{text:n,ranges:o}}static parse(e){let t,n=[],r=[],i=[];for(let s of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let e=t[1]?+t[1]:null,o=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}i.push(new vh(a,r.length,t.index,t.index+o.length)),s=s.slice(0,t.index)+o+s.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(s);){s=s.slice(0,e.index)+e[1]+s.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(s)}return new xh(r,i)}}let Sh=Jr.widget({widget:new class extends Yr{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),Oh=Jr.mark({class:"cm-snippetField"});class Th{constructor(e,t){this.ranges=e,this.active=t,this.deco=Jr.set(e.map((e=>(e.from==e.to?Sh:Oh).range(e.from,e.to))))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new Th(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const wh=on.define({map(e,t){return e&&e.map(t)}}),Ch=on.define(),Ah=Mt.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(wh))return n.value;if(n.is(Ch)&&e)return new Th(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Uo.decorations.from(e,(e=>e?e.deco:Jr.none))});function Ph(e,t){return wt.create(e.filter((e=>e.field==t)).map((e=>wt.range(e.from,e.to))))}function kh(e){let t=xh.parse(e);return(e,n,r,i)=>{let{text:s,ranges:o}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:Xe.of(s)},scrollIntoView:!0,annotations:n?[Vf.of(n),an.userEvent.of("input.complete")]:void 0};if(o.length&&(a.selection=Ph(o,0)),o.some((e=>e.field>0))){let t=new Th(o,0),n=a.effects=[wh.of(t)];void 0===e.state.field(Ah,!1)&&n.push(on.appendConfig.of([Ah,Lh,Mh,bh]))}e.dispatch(e.state.update(a))}}function Dh(e){return({state:t,dispatch:n})=>{let r=t.field(Ah,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,s=e>0&&!r.ranges.some((t=>t.field==i+e));return n(t.update({selection:Ph(r.ranges,i),effects:wh.of(s?null:new Th(r.ranges,i)),scrollIntoView:!0})),!0}}const Rh=[{key:"Tab",run:Dh(1),shift:Dh(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(Ah,!1)&&(t(e.update({effects:wh.of(null)})),!0)}],Ih=Pt.define({combine(e){return e.length?e[0]:Rh}}),Lh=Kt.highest(Xo.compute([Ih],(e=>e.facet(Ih))));function Bh(e,t){return Object.assign(Object.assign({},t),{apply:kh(e)})}const Mh=Uo.domEventHandlers({mousedown(e,t){let n,r=t.state.field(Ah,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find((e=>e.from<=n&&e.to>=n));return!(!i||i.field==r.active)&&(t.dispatch({selection:Ph(r.ranges,i.field),effects:wh.of(r.ranges.some((e=>e.field>i.field))?new Th(r.ranges,i.field):null),scrollIntoView:!0}),!0)}});const jh={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Nh=on.define({map(e,t){let n=t.mapPos(e,-1,gt.TrackAfter);return null==n?void 0:n}}),Fh=new class extends vn{};Fh.startSide=1,Fh.endSide=-1;const Uh=Mt.define({create(){return On.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Nh)&&(e=e.update({add:[Fh.range(n.value,n.value+1)]}));return e}});const Vh="()[]{}<>";function Kh(e){for(let t=0;t{if(($h?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==ht(dt(r,0))||t!=i.from||n!=i.to)return!1;let s=function(e,t){let n=Wh(e,e.selection.main.head),r=n.brackets||jh.brackets;for(let i of r){let s=Kh(dt(i,0));if(t==i)return s==i?Yh(e,i,r.indexOf(i+i+i)>-1,n):Gh(e,i,s,n.before||jh.before);if(t==s&&zh(e,e.selection.main.from))return Zh(e,i,s)}return null}(e.state,r);return!!s&&(e.dispatch(s),!0)})),Qh=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Wh(e,e.selection.main.head).brackets||jh.brackets,r=null,i=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return ht(dt(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&Xh(e.doc,t.head)==Kh(dt(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:wt.cursor(t.head-i.length)}}return{range:r=t}}));return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function zh(e,t){let n=!1;return e.field(Uh).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function Xh(e,t){let n=e.sliceString(t,t+2);return n.slice(0,ht(dt(n,0)))}function Gh(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:Nh.of(s.to+t.length),range:wt.range(s.anchor+t.length,s.head+t.length)};let o=Xh(e.doc,s.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:s.head},effects:Nh.of(s.head+t.length),range:wt.cursor(s.head+t.length)}:{range:i=s}}));return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Zh(e,t,n){let r=null,i=e.changeByRange((t=>t.empty&&Xh(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:wt.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Yh(e,t,n,r){let i=r.stringPrefixes||jh.stringPrefixes,s=null,o=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Nh.of(r.to+t.length),range:wt.range(r.anchor+t.length,r.head+t.length)};let o,a=r.head,l=Xh(e.doc,a);if(l==t){if(Hh(e,a))return{changes:{insert:t+t,from:a},effects:Nh.of(a+t.length),range:wt.cursor(a+t.length)};if(zh(e,a)){let r=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+r.length,insert:r},range:wt.cursor(a+r.length)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(o=Jh(e,a-2*t.length,i))>-1&&Hh(e,o))return{changes:{insert:t+t+t+t,from:a},effects:Nh.of(a+t.length),range:wt.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=hn.Word&&Jh(e,a,i)>-1&&!function(e,t,n,r){let i=Bc(e).resolveInner(t,-1),s=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),a=o.indexOf(n);if(!a||a>-1&&r.indexOf(o.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,a,t,i))return{changes:{insert:t+t,from:a},effects:Nh.of(a+t.length),range:wt.cursor(a+t.length)}}return{range:s=r}}));return s?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Hh(e,t){let n=Bc(e).resolveInner(t+1);return n.parent&&n.from==t}function Jh(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=hn.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))!=hn.Word)return n}return-1}const em=[{key:"Ctrl-Space",run:e=>!!e.state.field(ph,!1)&&(e.dispatch({effects:$f.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(ph,!1);return!(!t||!t.active.some((e=>0!=e.state)))&&(e.dispatch({effects:qf.of(null)}),!0)}},{key:"ArrowDown",run:hh(!0)},{key:"ArrowUp",run:hh(!1)},{key:"PageDown",run:hh(!0,"page")},{key:"PageUp",run:hh(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(ph,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(Xf).defaultKeymap?[em]:[])));class nm{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class rm{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(ym).markerFilter;i&&(r=i(r,n));let s=Jr.set(r.map((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?Jr.widget({widget:new vm(e),diagnostic:e}).range(e.from):Jr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e,inclusive:!0}).range(e.from,e.to))),!0);return new rm(s,t,im(s))}}function im(e,t=null,n=0){let r=null;return e.between(n,1e9,((e,n,{spec:i})=>{if(!t||i.diagnostic==t)return r=new nm(e,n,i.diagnostic),!1})),r}function sm(e,t){let n=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(am)))&&!e.changes.touchesRange(n.from,n.to))}function om(e,t){return e.field(um,!1)?t:t.concat(on.appendConfig.of(Lm))}const am=on.define(),lm=on.define(),cm=on.define(),um=Mt.define({create(){return new rm(Jr.none,null,null)},update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=im(n,e.selected.diagnostic,i)||im(n,null,i)}e=new rm(n,e.panel,r)}for(let n of t.effects)n.is(am)?e=rm.init(n.value,e.panel,t.state):n.is(lm)?e=new rm(e.diagnostics,n.value?xm.open:null,e.selected):n.is(cm)&&(e=new rm(e.diagnostics,e.panel,n.value));return e},provide:e=>[tl.from(e,(e=>e.panel)),Uo.decorations.from(e,(e=>e.diagnostics))]});const pm=Jr.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function dm(e,t,n){let{diagnostics:r}=e.state.field(um),i=[],s=2e8,o=0;r.between(t-(n<0?1:0),t+(n>0?1:0),((e,r,{spec:a})=>{t>=e&&t<=r&&(e==r||(t>e||n>0)&&(tbm(e,t,!1))))}const hm=e=>{let t=e.state.field(um,!1);return!(!t||!t.panel)&&(e.dispatch({effects:lm.of(!1)}),!0)},mm=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(um,!1);t&&t.panel||e.dispatch({effects:om(e.state,[lm.of(!0)])});let n=Ya(e,xm.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(um,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],gm=$i.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(ym);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let e=Date.now();if(ePromise.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:om(e,[am.of(t)])}}(this.view.state,n))}),(e=>{Ui(this.view.state,e)}))}}update(e){let t=e.state.facet(ym);(e.docChanged||t!=e.startState.facet(ym)||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)}}),ym=Pt.define({combine(e){return Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},bn(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}))}});function _m(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function bm(e,t,n){var r;let i=n?_m(t.actions):[];return Dd("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Dd("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map(((n,r)=>{let s=!1,o=r=>{if(r.preventDefault(),s)return;s=!0;let i=im(e.state.field(um).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),Dd("u",a.slice(l,l+1)),a.slice(l+1)];return Dd("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)})),t.source&&Dd("div",{class:"cm-diagnosticSource"},t.source))}class vm extends Yr{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Dd("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Em{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=bm(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class xm{constructor(e){this.view=e,this.items=[];this.list=Dd("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)hm(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],r=_m(n.actions);for(let i=0;i{for(let t=0;thm(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(um).selected;if(!e)return-1;for(let t=0;t{let a,l=-1;for(let e=n;en&&(this.items.splice(n,l-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}));n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&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=im(this.view.state.field(um).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:cm.of(t)})}static open(e){return new xm(e)}}function Sm(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function Om(e){return Sm(``,'width="6" height="3"')}const Tm=Uo.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-diagnostic-hint":{borderLeft:"5px solid #66d"},".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:Om("#d11")},".cm-lintRange-warning":{backgroundImage:Om("orange")},".cm-lintRange-info":{backgroundImage:Om("#999")},".cm-lintRange-hint":{backgroundImage:Om("#66d")},".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-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".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}}});function wm(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}class Cm extends nl{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce(((e,t)=>wm(e)function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:Dm.of({pos:r.from,above:!1,create(){return{dom:fm(e,n),getCoords:()=>t.getBoundingClientRect()}}})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let i=t.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientY{clearTimeout(s),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(s),s=setTimeout(r,i)}}(e,t,n)),t}}function Am(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new Cm(n[e]).range(+e));return On.of(r,!0)}const Pm=ol({class:"cm-gutter-lint",markers:e=>e.state.field(km)}),km=Mt.define({create(){return On.empty},update(e,t){e=e.map(t.changes);let n=t.state.facet(Bm).markerFilter;for(let r of t.effects)if(r.is(am)){let i=r.value;n&&(i=n(i||[],t.state)),e=Am(t.state.doc,i.slice(0))}return e}}),Dm=on.define(),Rm=Mt.define({create(){return null},update(e,t){return e&&t.docChanged&&(e=sm(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce(((e,t)=>t.is(Dm)?t.value:e),e)},provide:e=>Ka.from(e)}),Im=Uo.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Sm('')},".cm-lint-marker-warning":{content:Sm('')},".cm-lint-marker-error":{content:Sm('')}}),Lm=[um,Uo.decorations.compute([um],(e=>{let{selected:t,panel:n}=e.field(um);return t&&n&&t.from!=t.to?Jr.set([pm.range(t.from,t.to)]):Jr.none})),za(dm,{hideOn:sm}),Tm],Bm=Pt.define({combine(e){return bn(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});var Mm=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(Qh)),!1!==e.defaultKeymap&&(n=n.concat(Pd)),!1!==e.searchKeymap&&(n=n.concat(Af)),!1!==e.historyKeymap&&(n=n.concat(Dp)),!1!==e.foldKeymap&&(n=n.concat(vu)),!1!==e.completionKeymap&&(n=n.concat(em)),!1!==e.lintKeymap&&(n=n.concat(mm));var r=[];return!1!==e.lineNumbers&&r.push(function(e={}){return[gl.of(e),ll(),bl]}()),!1!==e.highlightActiveLineGutter&&r.push(xl),!1!==e.highlightSpecialChars&&r.push(function(e={}){return[xa.of(e),Sa||(Sa=$i.fromClass(class{constructor(e){this.view=e,this.decorations=Jr.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(xa)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new ya({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,s=dt(t[0],0);if(9==s){let e=i.lineAt(r),t=n.state.tabSize,s=Mn(e.text,t,r-e.from);return Jr.replace({widget:new Ta((t-s%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Jr.replace({widget:new Oa(e,s)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(xa);e.startState.facet(xa)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&r.push(function(e={}){return[mp,hp.of(e),Uo.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?yp:"historyRedo"==e.inputType?_p:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(e={}){let t=Object.assign(Object.assign({},Cu),e),n=new Au(t,!0),r=new Au(t,!1),i=$i.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet($c)!=e.state.facet($c)||e.startState.field(mu,!1)!=e.state.field(mu,!1)||Bc(e.startState)!=Bc(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new Tn;for(let i of e.viewportLineBlocks){let s=gu(e.state,i.from,i.to)?r:uu(e.state,i.from,i.to)?n:null;s&&t.add(i.from,i.from,s)}return t.finish()}}),{domEventHandlers:s}=t;return[i,ol({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||On.empty},initialSpacer(){return new Au(t,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(e,t,n)=>{if(s.click&&s.click(e,t,n))return!0;let r=gu(e.state,t.from,t.to);if(r)return e.dispatch({effects:fu.of(r)}),!0;let i=uu(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:du.of(i)}),!0)}})}),Su()]}()),!1!==e.drawSelection&&r.push(function(e={}){return[oa.of(e),la,ua,da,Mi.of(!0)]}()),!1!==e.dropCursor&&r.push([ha,ma]),!1!==e.allowMultipleSelections&&r.push(_n.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(_n.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:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let s=n.sliceString(i.from,r);if(!t.some((e=>e.test(s))))return e;let{state:o}=e,a=-1,l=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=Zc(o,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=Gc(o,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&r.push(Lu(ju,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(e={}){return[Uu.of(e),qu]}()),!1!==e.closeBrackets&&r.push([qh,Uh]),!1!==e.autocompletion&&r.push(function(e={}){return[_h,ph,Xf.of(e),gh,tm,bh]}()),!1!==e.rectangularSelection&&r.push(function(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return Uo.mouseSelectionStyle.of(((e,n)=>t(n)?Da(e,n):null))}()),!1!==t&&r.push(function(e={}){let[t,n]=Ra[e.key||"Alt"],r=$i.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,Uo.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?Ia:null}))]}()),!1!==e.highlightActiveLine&&r.push(Ca),!1!==e.highlightSelectionMatches&&r.push(function(e){let t=[Hd,Yd];return e&&t.push(zd.of(e)),t}()),e.tabSize&&"number"==typeof e.tabSize&&r.push(zc.of(" ".repeat(e.tabSize))),r.concat([Xo.of(n.flat())]).filter(Boolean)};const jm="#e5c07b",Nm="#e06c75",Fm="#56b6c2",Um="#ffffff",Vm="#abb2bf",Km="#7d8799",Wm="#61afef",$m="#98c379",qm="#d19a66",Qm="#c678dd",zm="#21252b",Xm="#2c313a",Gm="#282c34",Zm="#353a42",Ym="#3E4451",Hm="#528bff",Jm=[Uo.theme({"&":{color:Vm,backgroundColor:Gm},".cm-content":{caretColor:Hm},".cm-cursor, .cm-dropCursor":{borderLeftColor:Hm},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Ym},".cm-panels":{backgroundColor:zm,color:Vm},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Gm,color:Km,border:"none"},".cm-activeLineGutter":{backgroundColor:Xm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Zm},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Zm,borderBottomColor:Zm},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Xm,color:Vm}}},{dark:!0}),Lu(ku.define([{tag:Cc.keyword,color:Qm},{tag:[Cc.name,Cc.deleted,Cc.character,Cc.propertyName,Cc.macroName],color:Nm},{tag:[Cc.function(Cc.variableName),Cc.labelName],color:Wm},{tag:[Cc.color,Cc.constant(Cc.name),Cc.standard(Cc.name)],color:qm},{tag:[Cc.definition(Cc.name),Cc.separator],color:Vm},{tag:[Cc.typeName,Cc.className,Cc.number,Cc.changed,Cc.annotation,Cc.modifier,Cc.self,Cc.namespace],color:jm},{tag:[Cc.operator,Cc.operatorKeyword,Cc.url,Cc.escape,Cc.regexp,Cc.link,Cc.special(Cc.string)],color:Fm},{tag:[Cc.meta,Cc.comment],color:Km},{tag:Cc.strong,fontWeight:"bold"},{tag:Cc.emphasis,fontStyle:"italic"},{tag:Cc.strikethrough,textDecoration:"line-through"},{tag:Cc.link,color:Km,textDecoration:"underline"},{tag:Cc.heading,fontWeight:"bold",color:Nm},{tag:[Cc.atom,Cc.bool,Cc.special(Cc.variableName)],color:qm},{tag:[Cc.processingInstruction,Cc.string,Cc.inserted],color:$m},{tag:Cc.invalid,color:Um}]))];var eg=Uo.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),tg=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:s="",basicSetup:o=!0}=e,a=[];switch(t&&a.unshift(Xo.of([kd])),o&&("boolean"==typeof o?a.unshift(Mm()):a.unshift(Mm(o))),s&&a.unshift(function(e){return $i.fromClass(class{constructor(t){this.view=t,this.placeholder=e?Jr.set([Jr.widget({widget:new Aa(e),side:1}).range(0)]):Jr.none}get decorations(){return this.view.state.doc.length?Jr.none:this.placeholder}},{decorations:e=>e.decorations})}(s)),i){case"light":a.push(eg);break;case"dark":a.push(Jm);break;case"none":break;default:a.push(i)}return!1===n&&a.push(Uo.editable.of(!1)),r&&a.push(_n.readOnly.of(!0)),[...a]},ng=nn.define(),rg=[];var ig=n(86074),sg=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],og=(0,r.forwardRef)(((e,t)=>{var{className:n,value:i="",selection:s,extensions:o=[],onChange:a,onStatistics:l,onCreateEditor:c,onUpdate:u,autoFocus:p,theme:d="light",height:f,minHeight:h,maxHeight:m,width:g,minWidth:y,maxWidth:_,basicSetup:b,placeholder:v,indentWithTab:E,editable:x,readOnly:S,root:O,initialState:T}=e,w=(0,ze.Z)(e,sg),C=(0,r.useRef)(null),{state:A,view:P,container:k}=function(e){var{value:t,selection:n,onChange:i,onStatistics:s,onCreateEditor:o,onUpdate:a,extensions:l=rg,autoFocus:c,theme:u="light",height:p=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:m=null,maxWidth:g=null,placeholder:y="",editable:_=!0,readOnly:b=!1,indentWithTab:v=!0,basicSetup:E=!0,root:x,initialState:S}=e,[O,T]=(0,r.useState)(),[w,C]=(0,r.useState)(),[A,P]=(0,r.useState)(),k=Uo.theme({"&":{height:p,minHeight:d,maxHeight:f,width:h,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),D=Uo.updateListener.of((e=>{if(e.docChanged&&"function"==typeof i&&!e.transactions.some((e=>e.annotation(ng)))){var t=e.state.doc.toString();i(t,e)}s&&s((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),R=[D,k,...tg({theme:u,editable:_,readOnly:b,placeholder:y,indentWithTab:v,basicSetup:E})];return a&&"function"==typeof a&&R.push(Uo.updateListener.of(a)),R=R.concat(l),(0,r.useEffect)((()=>{if(O&&!A){var e={doc:t,selection:n,extensions:R},r=S?_n.fromJSON(S.json,e,S.fields):_n.create(e);if(P(r),!w){var i=new Uo({state:r,parent:O,root:x});C(i),o&&o(i,r)}}return()=>{w&&(P(void 0),C(void 0))}}),[O,A]),(0,r.useEffect)((()=>T(e.container)),[e.container]),(0,r.useEffect)((()=>()=>{w&&(w.destroy(),C(void 0))}),[w]),(0,r.useEffect)((()=>{c&&w&&w.focus()}),[c,w]),(0,r.useEffect)((()=>{w&&w.dispatch({effects:on.reconfigure.of(R)})}),[u,l,p,d,f,h,m,g,y,_,b,v,E,i,a]),(0,r.useEffect)((()=>{if(void 0!==t){var e=w?w.state.doc.toString():"";w&&t!==e&&w.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[ng.of(!0)]})}}),[t,w]),{state:A,setState:P,view:w,setView:C,container:O,setContainer:T}}({container:C.current,root:O,value:i,autoFocus:p,theme:d,height:f,minHeight:h,maxHeight:m,width:g,minWidth:y,maxWidth:_,basicSetup:b,placeholder:v,indentWithTab:E,editable:x,readOnly:S,selection:s,onChange:a,onStatistics:l,onCreateEditor:c,onUpdate:u,extensions:o,initialState:T});if((0,r.useImperativeHandle)(t,(()=>({editor:C.current,state:A,view:P})),[C,k,A,P]),"string"!=typeof i)throw new Error("value must be typeof string but got "+typeof i);var D="string"==typeof d?"cm-theme-"+d:"cm-theme";return(0,ig.jsx)("div",(0,Qe.Z)({ref:C,className:D+(n?" "+n:"")},w))}));og.displayName="CodeMirror";var ag=og,lg=n(34155);class cg{constructor(e,t,n,r,i,s,o,a,l,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=s,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new cg(e,[],t,n,n,0,[],0,r?new ug(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,s=i.dynamicPrecedence(r);if(s&&(this.score+=s),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(r,a)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let i=e,{parser:s}=this.p;(r>this.pos||t<=s.maxNode)&&(this.pos=r,s.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,n),this.shiftContext(t,n),t<=s.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new cg(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new pg(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,i=0;i1&t&&e==r))||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ug{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class pg{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class dg{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new dg(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new dg(this.stack,this.pos,this.index)}}function fg(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),s+=i,n)break;s*=46}n?n[i++]=s:n=new t(s)}return n}class hg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const mg=new hg;class gg{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=mg,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=mg,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class yg{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;vg(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}yg.prototype.contextual=yg.prototype.fallback=yg.prototype.extend=!1;class _g{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?fg(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(vg(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(n||r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}_g.prototype.contextual=yg.prototype.fallback=yg.prototype.extend=!1;class bg{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function vg(e,t,n,r,i,s){let o=0,a=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||xg(n,t.token.value,i,s))){t.acceptToken(n);break}}let r=t.next,c=0,u=e[o+2];if(!(t.next<0&&u>c&&65535==e[n+3*u-3])){for(;c>1,s=n+i+(i<<1),a=e[s],l=e[s+1]||65536;if(r=l)){o=e[s+2],t.advance();continue e}c=i+1}}break}o=e[n+3*u-1]}}function Eg(e,t,n){for(let r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function xg(e,t,n,r){let i=Eg(n,r,t);return i<0||Eg(n,r,e)t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class wg{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Tg(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Tg(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(i instanceof Ll){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+i.length}}}class Cg{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new hg))}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,s=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let r=0;rc.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||(n=new hg,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new hg,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(i>>1)){0==(1&i)?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new wg(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sr)i.push(o);else{if(this.advanceStack(o,i,n))continue;{e||(e=[],t=[]),e.push(o);let n=this.tokens.getMainToken(o);t.push(n.value,n.end)}}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return Sg&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort(((e,t)=>t.score-e.score));i.length>e;)i.pop();i.some((e=>e.reducePos>r))&&this.recovering--}else if(i.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){i.splice(e--,1);continue e}i.splice(n--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(wl.contextHash)||0)==n))return e.useNode(o,r),Sg&&console.log(s+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof Ll)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof Ll&&0==o.positions[0]))break;o=a}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),Sg&&console.log(s+this.stackID(e)+` (via always-reduce ${i.getName(65535&o)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let o=0;or?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Pg(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let s=0;s ":"";if(o.deadEnd){if(i)continue;if(i=!0,o.restart(),Sg&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))continue}let u=o.split(),p=c;for(let e=0;u.forceReduce()&&e<10;e++){if(Sg&&console.log(p+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;Sg&&(p=this.stackID(u)+" -> ")}for(let e of o.recoverByInsert(a))Sg&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),Sg&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),Pg(o,n)):(!r||r.scoree;class Rg extends ec{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1])),r=[];for(let e=0;e=0)i(r,e,t[n++]);else{let s=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,s);n++}}}this.nodeSet=new kl(t.map(((t,i)=>Pl.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Sl;let s=fg(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new yg(s,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Ag(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],s=1&t,o=r[i++];if(s&&n)return o;for(let n=i+(t>>1);i0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=Ig(this.data,n+2)}r=t(Ig(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=Ig(this.data,n+2)}if(0==(1&this.data[n+2])){let e=this.data[n+1];t.some(((t,n)=>1&n&&t==e))||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(Rg.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let n=e.tokenizers.find((e=>e.from==t));return n?n.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((n,r)=>{let i=e.specializers.find((e=>e.from==n.external));if(!i)return n;let s=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=Lg(s),s}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map((()=>!1));if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee.external(n,r)<<1|t}return e.get}const Bg=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Mg=new class{constructor(e){this.start=e.start,this.shift=e.shift||Dg,this.reduce=e.reduce||Dg,this.reuse=e.reuse||Dg,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}({start:!1,shift(e,t){return 4==t||5==t||312==t?e:313==t},strict:!1}),jg=new bg(((e,t)=>{let{next:n}=e;(125==n||-1==n||t.context)&&e.acceptToken(310)}),{contextual:!0,fallback:!0}),Ng=new bg(((e,t)=>{let n,{next:r}=e;Bg.indexOf(r)>-1||(47!=r||47!=(n=e.peek(1))&&42!=n)&&(125==r||59==r||-1==r||t.context||e.acceptToken(309))}),{contextual:!0}),Fg=new bg(((e,t)=>{let{next:n}=e;if((43==n||45==n)&&(e.advance(),n==e.next)){e.advance();let n=!t.context&&t.canShift(1);e.acceptToken(n?1:2)}}),{contextual:!0});function Ug(e,t){return e>=65&&e<=90||e>=97&&e<=122||95==e||e>=192||!t&&e>=48&&e<=57}const Vg=new bg(((e,t)=>{if(60!=e.next||!t.dialectEnabled(0))return;if(e.advance(),47==e.next)return;let n=0;for(;Bg.indexOf(e.next)>-1;)e.advance(),n++;if(Ug(e.next,!0)){for(e.advance(),n++;Ug(e.next,!1);)e.advance(),n++;for(;Bg.indexOf(e.next)>-1;)e.advance(),n++;if(44==e.next)return;for(let t=0;;t++){if(7==t){if(!Ug(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),n++}}e.acceptToken(3,-n)})),Kg=oc({"get set async static":Cc.modifier,"for while do if else switch try catch finally return throw break continue default case":Cc.controlKeyword,"in of await yield void typeof delete instanceof":Cc.operatorKeyword,"let var const using function class extends":Cc.definitionKeyword,"import export from":Cc.moduleKeyword,"with debugger as new":Cc.keyword,TemplateString:Cc.special(Cc.string),super:Cc.atom,BooleanLiteral:Cc.bool,this:Cc.self,null:Cc.null,Star:Cc.modifier,VariableName:Cc.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Cc.function(Cc.variableName),VariableDefinition:Cc.definition(Cc.variableName),Label:Cc.labelName,PropertyName:Cc.propertyName,PrivatePropertyName:Cc.special(Cc.propertyName),"CallExpression/MemberExpression/PropertyName":Cc.function(Cc.propertyName),"FunctionDeclaration/VariableDefinition":Cc.function(Cc.definition(Cc.variableName)),"ClassDeclaration/VariableDefinition":Cc.definition(Cc.className),PropertyDefinition:Cc.definition(Cc.propertyName),PrivatePropertyDefinition:Cc.definition(Cc.special(Cc.propertyName)),UpdateOp:Cc.updateOperator,"LineComment Hashbang":Cc.lineComment,BlockComment:Cc.blockComment,Number:Cc.number,String:Cc.string,Escape:Cc.escape,ArithOp:Cc.arithmeticOperator,LogicOp:Cc.logicOperator,BitOp:Cc.bitwiseOperator,CompareOp:Cc.compareOperator,RegExp:Cc.regexp,Equals:Cc.definitionOperator,Arrow:Cc.function(Cc.punctuation),": Spread":Cc.punctuation,"( )":Cc.paren,"[ ]":Cc.squareBracket,"{ }":Cc.brace,"InterpolationStart InterpolationEnd":Cc.special(Cc.brace),".":Cc.derefOperator,", ;":Cc.separator,"@":Cc.meta,TypeName:Cc.typeName,TypeDefinition:Cc.definition(Cc.typeName),"type enum interface implements namespace module declare":Cc.definitionKeyword,"abstract global Privacy readonly override":Cc.modifier,"is keyof unique infer":Cc.operatorKeyword,JSXAttributeValue:Cc.attributeValue,JSXText:Cc.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Cc.angleBracket,"JSXIdentifier JSXNameSpacedName":Cc.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Cc.attributeName,"JSXBuiltin/JSXIdentifier":Cc.standard(Cc.tagName)}),Wg={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:152,yield:161,await:165,class:170,public:227,private:227,protected:227,readonly:229,instanceof:248,satisfies:251,in:252,const:254,import:286,keyof:339,unique:343,infer:349,is:385,abstract:405,implements:407,type:409,let:412,var:414,using:417,interface:423,enum:427,namespace:433,module:435,declare:439,global:443,for:462,of:471,while:474,with:478,do:482,if:486,else:488,switch:492,case:498,try:504,catch:508,finally:512,return:516,throw:520,break:524,continue:528,debugger:532},$g={__proto__:null,async:123,get:125,set:127,declare:187,public:189,private:189,protected:189,static:191,abstract:193,override:195,readonly:201,accessor:203,new:389},qg={__proto__:null,"<":143},Qg=Rg.deserialize({version:14,states:"$RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOOQO'#Ib'#IbOBhQ`O'#EcOOQ07`'#Eb'#EbOCdQ07pO'#EcOCnQ`O'#EVOOQO'#Jp'#JpODSQ`O'#JqOEaQ`O'#EVOCnQ`O'#EcPEnO!0LbO'#CaPOOO)CDu)CDuOOOO'#IX'#IXOEyO!bO,59TOOQ07b,59T,59TOOOO'#IY'#IYOFXO#tO,59TO%[Q^O'#D`OOOO'#I['#I[OFgO?MpO,59xOOQ07b,59x,59xOFuQ^O'#I]OGYQWO'#JkOI[QrO'#JkO+}Q^O'#JkOIcQWO,5:OOIyQWO'#ElOJWQWO'#JyOJcQWO'#JxOJcQWO'#JxOJkQWO,5;YOJpQWO'#JwOOQ07f,5:Z,5:ZOJwQ^O,5:ZOLxQ08SO,5:eOMiQWO,5:mONSQ07hO'#JvONZQWO'#JuO9ZQWO'#JuONoQWO'#JuONwQWO,5;XON|QWO'#JuO!#UQrO'#JjOOQ07b'#Ch'#ChO%[Q^O'#ERO!#tQpO,5:rOOQO'#Jr'#JrOOQO-EmOOQU'#J`'#J`OOQU,5>n,5>nOOQU-EpQWO'#HQO9aQWO'#HSO!CgQWO'#HSO:RQ7[O'#HUO!ClQWO'#HUOOQU,5=j,5=jO!CqQWO'#HVO!DSQWO'#CnO!DXQWO,59OO!DcQWO,59OO!FhQ^O,59OOOQU,59O,59OO!FxQ07hO,59OO%[Q^O,59OO!ITQ^O'#H^OOQU'#H_'#H_OOQU'#H`'#H`O`Q^O,5=vO!IkQWO,5=vO`Q^O,5=|O`Q^O,5>OO!IpQWO,5>QO`Q^O,5>SO!IuQWO,5>VO!IzQ^O,5>]OOQU,5>c,5>cO%[Q^O,5>cO9kQ07hO,5>eOOQU,5>g,5>gO!NUQWO,5>gOOQU,5>i,5>iO!NUQWO,5>iOOQU,5>k,5>kO!NZQ`O'#D[O%[Q^O'#JmO!NxQ`O'#JmO# gQ`O'#DjO# xQ`O'#DjO#$ZQ^O'#DjO#$bQWO'#JlO#$jQWO,5:TO#$oQWO'#EpO#$}QWO'#JzO#%VQWO,5;ZO#%[Q`O'#DjO#%iQ`O'#EUOOQ07b,5:n,5:nO%[Q^O,5:nO#%pQWO,5:nO>pQWO,5;UO!@}Q`O,5;UO!AVQ7[O,5;UO:RQ7[O,5;UO#%xQWO,5@XO#%}Q$ISO,5:rOOQO-E<`-E<`O#'TQ07pO,5:}OCnQ`O,5:qO#'_Q`O,5:qOCnQ`O,5:}O!@rQ07hO,5:qOOQ07`'#Ef'#EfOOQO,5:},5:}O%[Q^O,5:}O#'lQ07hO,5:}O#'wQ07hO,5:}O!@}Q`O,5:qOOQO,5;T,5;TO#(VQ07hO,5:}POOO'#IV'#IVP#(kO!0LbO,58{POOO,58{,58{OOOO-EwO+}Q^O,5>wOOQO,5>},5>}O#)VQ^O'#I]OOQO-EjQ08SO1G0{O#>wQ08SO1G0{O#@uQ08SO1G0{O#CuQ(CYO'#ChO#EsQ(CYO1G1^O#EzQ(CYO'#JjO!,lQWO1G1dO#F[Q08SO,5?TOOQ07`-EkQWO1G3lO$2dQ^O1G3nO$6hQ^O'#HmOOQU1G3q1G3qO$6uQWO'#HsO>pQWO'#HuOOQU1G3w1G3wO$6}Q^O1G3wO9kQ07hO1G3}OOQU1G4P1G4POOQ07`'#GY'#GYO9kQ07hO1G4RO9kQ07hO1G4TO$;UQWO,5@XO!*fQ^O,5;[O9ZQWO,5;[O>pQWO,5:UO!*fQ^O,5:UO!@}Q`O,5:UO$;ZQ(CYO,5:UOOQO,5;[,5;[O$;eQ`O'#I^O$;{QWO,5@WOOQ07b1G/o1G/oO$pQWO1G0pO!@}Q`O1G0pO!AVQ7[O1G0pOOQ07`1G5s1G5sO!@rQ07hO1G0]OOQO1G0i1G0iO%[Q^O1G0iO$PQrO1G4cOOQO1G4i1G4iO%[Q^O,5>wO$>ZQWO1G5qO$>cQWO1G6OO$>kQrO1G6PO9ZQWO,5>}O$>uQ08SO1G5|O%[Q^O1G5|O$?VQ07hO1G5|O$?hQWO1G5{O$?hQWO1G5{O9ZQWO1G5{O$?pQWO,5?QO9ZQWO,5?QOOQO,5?Q,5?QO$@UQWO,5?QO$'ZQWO,5?QOOQO-EXOOQU,5>X,5>XO%[Q^O'#HnO%7dQWO'#HpOOQU,5>_,5>_O9ZQWO,5>_OOQU,5>a,5>aOOQU7+)c7+)cOOQU7+)i7+)iOOQU7+)m7+)mOOQU7+)o7+)oO%7iQ`O1G5sO%7}Q(CYO1G0vO%8XQWO1G0vOOQO1G/p1G/pO%8dQ(CYO1G/pO>pQWO1G/pO!*fQ^O'#DjOOQO,5>x,5>xOOQO-E<[-E<[OOQO,5?O,5?OOOQO-EpQWO7+&[O!@}Q`O7+&[OOQO7+%w7+%wO$=mQ08SO7+&TOOQO7+&T7+&TO%[Q^O7+&TO%8nQ07hO7+&TO!@rQ07hO7+%wO!@}Q`O7+%wO%8yQ07hO7+&TO%9XQ08SO7++hO%[Q^O7++hO%9iQWO7++gO%9iQWO7++gOOQO1G4l1G4lO9ZQWO1G4lO%9qQWO1G4lOOQO7+%|7+%|O#%sQWO<zQ08SO1G2ZO%A]Q08SO1G2mO%ChQ08SO1G2oO%EsQ7[O,5>yOOQO-E<]-E<]O%E}QrO,5>zO%[Q^O,5>zOOQO-E<^-E<^O%FXQWO1G5uOOQ07b<YOOQU,5>[,5>[O&5oQWO1G3yO9ZQWO7+&bO!*fQ^O7+&bOOQO7+%[7+%[O&5tQ(CYO1G6PO>pQWO7+%[OOQ07b<pQWO<pQWO7+)eO'&sQWO<}AN>}O%[Q^OAN?ZOOQO<qQ(CYOG26}O!*fQ^O'#DyO1PQWO'#EWO'@gQrO'#JiO!*fQ^O'#DqO'@nQ^O'#D}O'@uQrO'#ChO'C]QrO'#ChO!*fQ^O'#EPO'CmQ^O,5;VO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O,5;aO!*fQ^O'#IiO'EpQWO,5a#@O#@^#@d#Ax#BW#Cr#DQ#DW#D^#Dd#Dn#Dt#Dz#EU#Eh#EnPPPPPPPPPP#EtPPPPPPP#Fi#Ip#KP#KW#K`PPPP$!d$%Z$+r$+u$+x$,q$,t$,w$-O$-WPP$-^$-b$.Y$/X$/]$/qPP$/u$/{$0PP$0S$0W$0Z$1P$1h$2P$2T$2W$2Z$2a$2d$2h$2lR!{RoqOXst!Z#c%j&m&o&p&r,h,m1w1zY!uQ'Z-Y1[5]Q%pvQ%xyQ&P|Q&e!VS'R!e-QQ'a!iS'g!r!xS*c$|*hQ+f%yQ+s&RQ,X&_Q-W'YQ-b'bQ-j'hQ/|*jQ1f,YR;Y:g%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%j%p%}&f&i&m&o&p&r&v'O']'m'}(P(V(^(r(v(z)y+O+S,e,h,m-^-f-t-z.l.s0[0a0q1_1o1p1r1t1w1z1|2m2s3Z5Y5d5t5u5x6]7w7|8]8gS#p]:d!r)[$[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q*u%ZQ+k%{Q,Z&bQ,b&jQ.c;QQ0h+^Q0l+`Q0w+lQ1n,`Q2{.[Q4v0rQ5k1gQ6i3PQ6u;RQ7h4wR8m6j&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]t!nQ!r!u!x!y'R'Y'Z'g'h'i-Q-W-Y-j1[5]5_$v$si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:371,context:Mg,nodeProps:[["isolate",-8,4,5,13,33,35,48,50,52,""],["group",-26,8,16,18,65,201,205,209,210,212,215,218,228,230,236,238,240,242,245,251,257,259,261,263,265,267,268,"Statement",-32,12,13,28,31,32,38,48,51,52,54,59,67,75,79,81,83,84,106,107,116,117,134,137,139,140,141,142,144,145,164,165,167,"Expression",-23,27,29,33,37,39,41,168,170,172,173,175,176,177,179,180,181,183,184,185,195,197,199,200,"Type",-3,87,99,105,"ClassItem"],["openedBy",22,"<",34,"InterpolationStart",53,"[",57,"{",72,"(",157,"JSXStartCloseTag"],["closedBy",23,">",36,"InterpolationEnd",47,"]",58,"}",73,")",162,"JSXEndTag"]],propSources:[Kg],skippedNodes:[0,4,5,271],repeatNodeCount:37,tokenData:"$Fj(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Ns!`!a$#_!a!b$(l!b!c$,k!c!}Er!}#O$-u#O#P$/P#P#Q$4h#Q#R$5r#R#SEr#S#T$7P#T#o$8Z#o#p$q#r#s$?}#s$f%Z$f$g+g$g#BYEr#BY#BZ$AX#BZ$ISEr$IS$I_$AX$I_$I|Er$I|$I}$Dd$I}$JO$Dd$JO$JTEr$JT$JU$AX$JU$KVEr$KV$KW$AX$KW&FUEr&FU&FV$AX&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AX?HUOEr(n%d_$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(OpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$f&j(Op(R!b't(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST(P#S$f&j'u(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$f&j(Op(R!b'u(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$f&j!o$Ip(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/|3l_'}$(n$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$f&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$a`$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$a``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$a`$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(R!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$a`(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k#%|:hh$f&j(Op(R!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXVS$f&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSVSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWVS(R!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]VS$f&j(OpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWVS(OpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYVS(Op(R!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%lQ^$f&j!USOY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@Y!_!}!=y!}#O!Bw#O#P!Dj#P#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!?Ta$f&j!USO!^&c!_#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&cS!@_X!USOY!@YZ!P!@Y!P!Q!@z!Q!}!@Y!}#O!Ac#O#P!Bb#P;'S!@Y;'S;=`!Bq<%lO!@YS!APU!US#Z#[!@z#]#^!@z#a#b!@z#g#h!@z#i#j!@z#m#n!@zS!AfVOY!AcZ#O!Ac#O#P!A{#P#Q!@Y#Q;'S!Ac;'S;=`!B[<%lO!AcS!BOSOY!AcZ;'S!Ac;'S;=`!B[<%lO!AcS!B_P;=`<%l!AcS!BeSOY!@YZ;'S!@Y;'S;=`!Bq<%lO!@YS!BtP;=`<%l!@Y&n!B|[$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#O!Bw#O#P!Cr#P#Q!=y#Q#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!CwX$f&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!DgP;=`<%l!Bw&n!DoX$f&jOY!=yYZ&cZ!^!=y!^!_!@Y!_#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!E_P;=`<%l!=y(Q!Eki$f&j(R!b!USOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#Z&}#Z#[!Eb#[#]&}#]#^!Eb#^#a&}#a#b!Eb#b#g&}#g#h!Eb#h#i&}#i#j!Eb#j#m&}#m#n!Eb#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GaZ(R!b!USOY!GYZw!GYwx!@Yx!P!GY!P!Q!HS!Q!}!GY!}#O!Ic#O#P!Bb#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb(R!b!USOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX(R!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$f&j(R!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#Wg[e]||-1},{term:334,get:e=>$g[e]||-1},{term:70,get:e=>qg[e]||-1}],tokenPrec:14638}),zg=[Bh("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Bh("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Bh("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Bh("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Bh("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Bh("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),Bh("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Bh("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),Bh("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Bh('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Bh('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Xg=zg.concat([Bh("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Bh("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Bh("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Gg=new Hl,Zg=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Yg(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}const Hg=["FunctionDeclaration"],Jg={FunctionDeclaration:Yg("function"),ClassDeclaration:Yg("class"),ClassExpression:()=>!0,EnumDeclaration:Yg("constant"),TypeAliasDeclaration:Yg("type"),NamespaceDeclaration:Yg("namespace"),VariableDefinition(e,t){e.matchContext(Hg)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function ey(e,t){let n=Gg.get(t);if(n)return n;let r=[],i=!0;function s(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Il.IncludeAnonymous).iterate((t=>{if(i)i=!1;else if(t.name){let e=Jg[t.name];if(e&&e(t,s)||Zg.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of ey(e,t.node))r.push(n);return!1}})),Gg.set(t,r),r}const ty=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ny=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function ry(e){let t=Bc(e.state).resolveInner(e.pos,-1);if(ny.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&ty.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)Zg.has(n.name)&&(r=r.concat(ey(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:ty}}const iy=Lc.define({name:"javascript",parser:Qg.configure({props:[Hc.add({IfStatement:ou({except:/^\s*({|else\b)/}),TryStatement:ou({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:iu({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":ou({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),lu.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.to/^JSX/.test(e.name),facet:kc({commentTokens:{block:{open:"{/*",close:"*/}"}}})},oy=iy.configure({dialect:"ts"},"typescript"),ay=iy.configure({dialect:"jsx",props:[Dc.add((e=>e.isTop?[sy]:void 0))]}),ly=iy.configure({dialect:"jsx ts",props:[Dc.add((e=>e.isTop?[sy]:void 0))]},"typescript");let cy=e=>({label:e,type:"keyword"});const uy="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(cy),py=uy.concat(["declare","implements","private","protected","public"].map(cy));function dy(e={}){let t=e.jsx?e.typescript?ly:ay:e.typescript?oy:iy,n=e.typescript?Xg.concat(py):zg.concat(uy);return new qc(t,[iy.data.of({autocomplete:(r=ny,i=jf(n),e=>{for(let t=Bc(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(r.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return i(e)})}),iy.data.of({autocomplete:ry}),e.jsx?my:[]]);var r,i}function fy(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}const hy="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),my=Uo.inputHandler.of(((e,t,n,r,i)=>{if((hy?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!iy.isActiveAt(e.state,t,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange((e=>{var t;let n,{head:i}=e,s=Bc(o).resolveInner(i-1,-1);if("JSXStartTag"==s.name&&(s=s.parent),o.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==s.name&&s.to>i);else{if(">"==r&&"JSXFragmentTag"==s.name)return{range:e,changes:{from:i,insert:""}};if("/"==r&&"JSXStartCloseTag"==s.name){let e=s.parent,r=e.parent;if(r&&e.from==i-2&&((n=fy(o.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(t=r.firstChild)||void 0===t?void 0:t.name))){let e=`${n}>`;return{range:wt.cursor(i+e.length,-1),changes:{from:i,insert:e}}}}else if(">"==r){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(s);if(t&&"JSXOpenTag"==t.name&&!/^\/?>|^<\//.test(o.doc.sliceString(i,i+2))&&(n=fy(o.doc,t,i)))return{range:e,changes:{from:i,insert:``}}}}return{range:e}}));return!a.changes.empty&&(e.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function gy(e,t,n,r){return n.line(e+r.line).from+t+(1==e?r.col-1:-1)}function yy(e,t,n){let r=gy(e.line,e.column,t,n),i={from:r,to:null!=e.endLine&&1!=e.endColumn?gy(e.endLine,e.endColumn,t,n):r,message:e.message,source:e.ruleId?"eslint:"+e.ruleId:"eslint",severity:1==e.severity?"warning":"error"};if(e.fix){let{range:t,text:s}=e.fix,o=t[0]+n.pos-r,a=t[1]+n.pos-r;i.actions=[{name:"fix",apply(e,t){e.dispatch({changes:{from:t+o,to:t+a,insert:s},scrollIntoView:!0})}}]}return i}var _y=n(48764).lW,by=n(34155);if(!vy)var vy=globalThis||window;var Ey,xy={exports:{}};function Sy(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var Oy=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Ty=function(e){return Oy.exec(e).slice(1)};function wy(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return e=Sy(ky(e.split("/"),(function(e){return!!e})),!t).join("/"),(t?"/":"")+e||"."}function Cy(e){var t=Ay(e),n="/"===Dy(e,-1);return e=Sy(ky(e.split("/"),(function(e){return!!e})),!t).join("/"),e||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function Ay(e){return"/"===e.charAt(0)}var Py={extname:function(e){return Ty(e)[3]},basename:function(e,t){var n=Ty(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},dirname:function(e){var t=Ty(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},sep:"/",delimiter:":",relative:function(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=wy(e).substr(1),t=wy(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),s=Math.min(r.length,i.length),o=s,a=0;a>18&63]+Iy[i>>12&63]+Iy[i>>6&63]+Iy[63&i]);return s.join("")}function Fy(e){var t;My||jy();for(var n=e.length,r=n%3,i="",s=[],o=16383,a=0,l=n-r;al?l:a+o));return 1===r?(t=e[n-1],i+=Iy[t>>2],i+=Iy[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=Iy[t>>10],i+=Iy[t>>4&63],i+=Iy[t<<2&63],i+="="),s.push(i),s.join("")}function Uy(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<>1,u=-7,p=n?i-1:0,d=n?-1:1,f=e[t+p];for(p+=d,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=256*s+e[t+p],p+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)}function Vy(e,t,n,r,i,s){var o,a,l,c=8*s-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+p>=1?d/l:d*Math.pow(2,1-p))*l>=2&&(o++,l/=2),o+p>=u?(a=0,o=u):o+p>=1?(a=(t*l-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=h,a/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=h,o/=256,c-=8);e[n+f-h]|=128*m}var Ky={}.toString,Wy=Array.isArray||function(e){return"[object Array]"==Ky.call(e)};function $y(){return Qy.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function qy(e,t){if($y()=$y())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$y().toString(16)+" bytes");return 0|e}function Hy(e){return!(null==e||!e._isBuffer)}function Jy(e,t){if(Hy(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return w_(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return C_(e).length;default:if(r)return w_(e).length;t=(""+t).toLowerCase(),r=!0}}function e_(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return m_(this,t,n);case"utf8":case"utf-8":return p_(this,t,n);case"ascii":return f_(this,t,n);case"latin1":case"binary":return h_(this,t,n);case"base64":return u_(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g_(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function t_(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n_(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=Qy.from(t,r)),Hy(t))return 0===t.length?-1:r_(e,t,n,r,i);if("number"==typeof t)return t&=255,Qy.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):r_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function r_(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=n;sa&&(n=a-l),s=n;s>=0;s--){for(var p=!0,d=0;di&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function u_(e,t,n){return 0===t&&n===e.length?Fy(e):Fy(e.slice(t,n))}function p_(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(u=c);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=p}return function(e){var t=e.length;if(t<=d_)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Qy.prototype.compare=function(e,t,n,r,i){if(!Hy(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),a=Math.min(s,o),l=this.slice(r,i),c=e.slice(t,n),u=0;ui)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return i_(this,e,t,n);case"utf8":case"utf-8":return s_(this,e,t,n);case"ascii":return o_(this,e,t,n);case"latin1":case"binary":return a_(this,e,t,n);case"base64":return l_(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c_(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},Qy.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var d_=4096;function f_(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function __(e,t,n,r,i,s){if(!Hy(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function b_(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function v_(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function E_(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x_(e,t,n,r,i){return i||E_(e,0,n,4),Vy(e,t,n,r,23,4),n+4}function S_(e,t,n,r,i){return i||E_(e,0,n,8),Vy(e,t,n,r,52,8),n+8}Qy.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},Qy.prototype.readUInt8=function(e,t){return t||y_(e,1,this.length),this[e]},Qy.prototype.readUInt16LE=function(e,t){return t||y_(e,2,this.length),this[e]|this[e+1]<<8},Qy.prototype.readUInt16BE=function(e,t){return t||y_(e,2,this.length),this[e]<<8|this[e+1]},Qy.prototype.readUInt32LE=function(e,t){return t||y_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Qy.prototype.readUInt32BE=function(e,t){return t||y_(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Qy.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||y_(e,t,this.length);for(var r=this[e],i=1,s=0;++s=(i*=128)&&(r-=Math.pow(2,8*t)),r},Qy.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||y_(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},Qy.prototype.readInt8=function(e,t){return t||y_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Qy.prototype.readInt16LE=function(e,t){t||y_(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Qy.prototype.readInt16BE=function(e,t){t||y_(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Qy.prototype.readInt32LE=function(e,t){return t||y_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Qy.prototype.readInt32BE=function(e,t){return t||y_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Qy.prototype.readFloatLE=function(e,t){return t||y_(e,4,this.length),Uy(this,e,!0,23,4)},Qy.prototype.readFloatBE=function(e,t){return t||y_(e,4,this.length),Uy(this,e,!1,23,4)},Qy.prototype.readDoubleLE=function(e,t){return t||y_(e,8,this.length),Uy(this,e,!0,52,8)},Qy.prototype.readDoubleBE=function(e,t){return t||y_(e,8,this.length),Uy(this,e,!1,52,8)},Qy.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||__(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+i]=e/s&255;return t+n},Qy.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,1,255,0),Qy.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Qy.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,65535,0),Qy.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):b_(this,e,t,!0),t+2},Qy.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,65535,0),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):b_(this,e,t,!1),t+2},Qy.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,4294967295,0),Qy.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):v_(this,e,t,!0),t+4},Qy.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,4294967295,0),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):v_(this,e,t,!1),t+4},Qy.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);__(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+n},Qy.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);__(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},Qy.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,1,127,-128),Qy.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Qy.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,32767,-32768),Qy.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):b_(this,e,t,!0),t+2},Qy.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,32767,-32768),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):b_(this,e,t,!1),t+2},Qy.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,2147483647,-2147483648),Qy.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):v_(this,e,t,!0),t+4},Qy.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):v_(this,e,t,!1),t+4},Qy.prototype.writeFloatLE=function(e,t,n){return x_(this,e,t,!0,n)},Qy.prototype.writeFloatBE=function(e,t,n){return x_(this,e,t,!1,n)},Qy.prototype.writeDoubleLE=function(e,t,n){return S_(this,e,t,!0,n)},Qy.prototype.writeDoubleBE=function(e,t,n){return S_(this,e,t,!1,n)},Qy.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3||!Qy.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function C_(e){return function(e){var t,n,r,i,s,o;My||jy();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[a-2]?2:"="===e[a-1]?1:0,o=new By(3*a/4-s),r=s>0?a-4:a;var l=0;for(t=0,n=0;t>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===s?(i=Ly[e.charCodeAt(t)]<<2|Ly[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===s&&(i=Ly[e.charCodeAt(t)]<<10|Ly[e.charCodeAt(t+1)]<<4|Ly[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(O_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function A_(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function P_(e){return null!=e&&(!!e._isBuffer||k_(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&k_(e.slice(0,0))}(e))}function k_(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function D_(){throw new Error("setTimeout has not been defined")}function R_(){throw new Error("clearTimeout has not been defined")}var I_=D_,L_=R_;function B_(e){if(I_===setTimeout)return setTimeout(e,0);if((I_===D_||!I_)&&setTimeout)return I_=setTimeout,setTimeout(e,0);try{return I_(e,0)}catch(t){try{return I_.call(null,e,0)}catch(t){return I_.call(this,e,0)}}}"function"==typeof vy.setTimeout&&(I_=setTimeout),"function"==typeof vy.clearTimeout&&(L_=clearTimeout);var M_,j_=[],N_=!1,F_=-1;function U_(){N_&&M_&&(N_=!1,M_.length?j_=M_.concat(j_):F_=-1,j_.length&&V_())}function V_(){if(!N_){var e=B_(U_);N_=!0;for(var t=j_.length;t;){for(M_=j_,j_=[];++F_1)for(var n=1;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),o=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),fb(t)?n.showHidden=t:t&&Ab(n,t),yb(n.showHidden)&&(n.showHidden=!1),yb(n.depth)&&(n.depth=2),yb(n.colors)&&(n.colors=!1),yb(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ab),cb(n,e,n.depth)}function ab(e,t){var n=ob.styles[t];return n?"["+ob.colors[n][0]+"m"+e+"["+ob.colors[n][1]+"m":e}function lb(e,t){return e}function cb(e,t,n){if(e.customInspect&&t&&xb(t.inspect)&&t.inspect!==ob&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return gb(r)||(r=cb(e,r,n)),r}var i=function(e,t){if(yb(t))return e.stylize("undefined","undefined");if(gb(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(mb(t))return e.stylize(""+t,"number");if(fb(t))return e.stylize(""+t,"boolean");if(hb(t))return e.stylize("null","null")}(e,t);if(i)return i;var s=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),Eb(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return ub(t);if(0===s.length){if(xb(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(_b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(vb(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Eb(t))return ub(t)}var l,c="",u=!1,p=["{","}"];(db(t)&&(u=!0,p=["[","]"]),xb(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return _b(t)&&(c=" "+RegExp.prototype.toString.call(t)),vb(t)&&(c=" "+Date.prototype.toUTCString.call(t)),Eb(t)&&(c=" "+ub(t)),0!==s.length||u&&0!=t.length?n<0?_b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=u?function(e,t,n,r,i){for(var s=[],o=0,a=t.length;o60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(l,c,p)):p[0]+c+p[1]}function ub(e){return"["+Error.prototype.toString.call(e)+"]"}function pb(e,t,n,r,i,s){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),Pb(r,i)||(o="["+i+"]"),a||(e.seen.indexOf(l.value)<0?(a=hb(n)?cb(e,l.value,null):cb(e,l.value,n-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),yb(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function db(e){return Array.isArray(e)}function fb(e){return"boolean"==typeof e}function hb(e){return null===e}function mb(e){return"number"==typeof e}function gb(e){return"string"==typeof e}function yb(e){return void 0===e}function _b(e){return bb(e)&&"[object RegExp]"===Ob(e)}function bb(e){return"object"==typeof e&&null!==e}function vb(e){return bb(e)&&"[object Date]"===Ob(e)}function Eb(e){return bb(e)&&("[object Error]"===Ob(e)||e instanceof Error)}function xb(e){return"function"==typeof e}function Sb(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Ob(e){return Object.prototype.toString.call(e)}function Tb(e){return e<10?"0"+e.toString(10):e.toString(10)}ob.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ob.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var wb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cb(){var e=new Date,t=[Tb(e.getHours()),Tb(e.getMinutes()),Tb(e.getSeconds())].join(":");return[e.getDate(),wb[e.getMonth()],t].join(" ")}function Ab(e,t){if(!t||!bb(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function Pb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var kb={inherits:tb,_extend:Ab,log:function(){console.log("%s - %s",Cb(),rb.apply(null,arguments))},isBuffer:function(e){return _y.isBuffer(e)},isPrimitive:Sb,isFunction:xb,isError:Eb,isDate:vb,isObject:bb,isRegExp:_b,isUndefined:yb,isSymbol:function(e){return"symbol"==typeof e},isString:gb,isNumber:mb,isNullOrUndefined:function(e){return null==e},isNull:hb,isBoolean:fb,isArray:db,inspect:ob,deprecate:function e(t,n){if(yb(vy.process))return function(){return e(t,n).apply(this,arguments)};if(!0===eb.noDeprecation)return t;var r=!1;return function(){if(!r){if(eb.throwDeprecation)throw new Error(n);eb.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}},format:rb,debuglog:function(e){if(yb(ib)&&(ib=eb.env.NODE_DEBUG||""),e=e.toUpperCase(),!sb[e])if(new RegExp("\\b"+e+"\\b","i").test(ib)){sb[e]=function(){var t=rb.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else sb[e]=function(){};return sb[e]}};function Db(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i=0){var o=r.indexOf("\n",s+1);r=r.substring(o+1)}this.stack=r}}}function Wb(e,t){return"string"==typeof e?e.length=0;a--)if(l[a]!==c[a])return!1;for(a=l.length-1;a>=0;a--)if(!zb(e[o=l[a]],t[o],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function Xb(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function Gb(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function Zb(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&qb(i,n,"Missing expected exception"+r);var s="string"==typeof r,o=!e&&i&&!n;if((!e&&Eb(i)&&s&&Gb(i,n)||o)&&qb(i,n,"Got unwanted exception"+r),e&&i&&n&&!Gb(i,n)||!e&&i)throw i}Fb.AssertionError=Kb,tb(Kb,Error),Fb.fail=qb,Fb.ok=Qb,Fb.equal=function e(t,n,r){t!=n&&qb(t,n,r,"==",e)},Fb.notEqual=function e(t,n,r){t==n&&qb(t,n,r,"!=",e)},Fb.deepEqual=function e(t,n,r){zb(t,n,!1)||qb(t,n,r,"deepEqual",e)},Fb.deepStrictEqual=function e(t,n,r){zb(t,n,!0)||qb(t,n,r,"deepStrictEqual",e)},Fb.notDeepEqual=function e(t,n,r){zb(t,n,!1)&&qb(t,n,r,"notDeepEqual",e)},Fb.notDeepStrictEqual=function e(t,n,r){zb(t,n,!0)&&qb(t,n,r,"notDeepStrictEqual",e)},Fb.strictEqual=function e(t,n,r){t!==n&&qb(t,n,r,"===",e)},Fb.notStrictEqual=function e(t,n,r){t===n&&qb(t,n,r,"!==",e)},Fb.throws=function(e,t,n){Zb(!0,e,t,n)},Fb.doesNotThrow=function(e,t,n){Zb(!1,e,t,n)},Fb.ifError=function(e){if(e)throw e};var Yb,Hb={};function Jb(){return Yb||(Yb=1,function(e){!function e(t){var n,r,i,s,o,a;function l(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],r[t]="object"==typeof n&&null!==n?l(n):n);return r}function c(e,t){this.parent=e,this.key=t}function u(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function p(){}function d(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function f(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function h(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function m(e,t){return(new p).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,r,i,s;for(r=e.length,i=0;r;)t(e[s=i+(n=r>>>1)])?r=n:(i=s+1,r-=n+1);return i}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},i={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},r={Break:s={},Skip:o={},Remove:a={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){var e,t,n,r,i;function s(e,t){if(Array.isArray(t))for(n=0,r=t.length;n=0;)if(_=a[p=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]&&!h(r,_[g])){if(f(l,y[m]))i=new u(_[g],[p,g],"Property",null);else{if(!d(_[g]))continue;i=new u(_[g],[p,g],null,null)}n.push(i)}}else if(d(_)){if(h(r,_))continue;n.push(new u(_,p,null,null))}}}else if(i=r.pop(),c=this.__execute(t.leave,i),this.__state===s||c===s)return},p.prototype.replace=function(e,t){var n,r,i,l,p,h,m,g,y,_,b,v,E;function x(e){var t,r,i,s;if(e.ref.remove())for(r=e.ref.key,s=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===s){if(i.ref.key=0;)if(_=i[E=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]){if(f(l,y[m]))h=new u(_[g],[E,g],"Property",new c(_,g));else{if(!d(_[g]))continue;h=new u(_[g],[E,g],null,new c(_,g))}n.push(h)}}else d(_)&&n.push(new u(_,E,null,new c(i,E)))}}else if(h=r.pop(),void 0!==(p=this.__execute(t.leave,h))&&p!==s&&p!==o&&p!==a&&h.ref.replace(p),this.__state!==a&&p!==a||x(h),this.__state===s||p===s)return v.root;return v.root},t.Syntax=n,t.traverse=m,t.replace=function(e,t){return(new p).replace(e,t)},t.attachComments=function(e,t,n){var i,s,o,a,c=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,s=t.length;oe.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(a,1)):a+=1;return a===c.length?r.Break:c[a].extendedRange[0]>e.range[1]?r.Skip:void 0}}),a=0,m(e,{leave:function(e){for(var t;ae.range[1]?r.Skip:void 0}}),e},t.VisitorKeys=i,t.VisitorOption=r,t.Controller=p,t.cloneEnvironment=function(){return e({})},t}(e)}(Hb)),Hb}var ev,tv,nv={},rv="4.3.0";function iv(){return ev||(ev=1,function(){var e=Jb();function t(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function n(t,n){n=n||{},this.__visitor=t||this,this.__childVisitorKeys=n.childVisitorKeys?Object.assign({},e.VisitorKeys,n.childVisitorKeys):e.VisitorKeys,"iteration"===n.fallback?this.__fallback=Object.keys:"function"==typeof n.fallback&&(this.__fallback=n.fallback)}n.prototype.visitChildren=function(n){var r,i,s,o,a,l,c;if(null!=n){if(r=n.type||e.Syntax.Property,!(i=this.__childVisitorKeys[r])){if(!this.__fallback)throw new Error("Unknown node type "+r+".");i=this.__fallback(n)}for(s=0,o=i.length;s0&&n.every(d)}__staticCloseRef(e){this.__resolve(e)||this.__delegateToUpperScope(e)}__dynamicCloseRef(e){let t=this;do{t.through.push(e),t=t.upper}while(t)}__globalCloseRef(e){this.__shouldStaticallyCloseForGlobal(e)?this.__staticCloseRef(e):this.__dynamicCloseRef(e)}__close(e){let t;t=this.__shouldStaticallyClose(e)?this.__staticCloseRef:"global"!==this.type?this.__dynamicCloseRef:this.__globalCloseRef;for(let e=0,n=this.__left.length;ee.name.range[0]>=n)))}}class x extends f{constructor(e,t,n){super(e,"for",t,n,!1)}}class S extends f{constructor(e,t,n){super(e,"class",t,n,!1)}}class O extends f{constructor(e,t,n){super(e,"class-field-initializer",t,n,!0)}}class T extends f{constructor(e,t,n){super(e,"class-static-block",t,n,!0)}}class w{constructor(e){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=e,this.__declaredVariables=new WeakMap}__useDirective(){return this.__options.directive}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||"commonjs"===this.__options.sourceType}isModule(){return"module"===this.__options.sourceType}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(e){return this.__nodeToScope.get(e)}getDeclaredVariables(e){return this.__declaredVariables.get(e)||[]}acquire(e,t){function n(e){return"function"!==e.type||!e.functionExpressionScope}const r=this.__get(e);if(!r||0===r.length)return null;if(1===r.length)return r[0];if(t)for(let e=r.length-1;e>=0;--e){const t=r[e];if(n(t))return t}else for(let e=0,t=r.length;e=6}}const{Syntax:C}=s.default;class A extends o.default.Visitor{static isPattern(e){const t=e.type;return t===C.Identifier||t===C.ObjectPattern||t===C.ArrayPattern||t===C.SpreadElement||t===C.RestElement||t===C.AssignmentPattern}constructor(e,t,n){super(null,e),this.rootPattern=t,this.callback=n,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(e){const t=(n=this.restElements)[n.length-1]||null;var n;this.callback(e,{topLevel:e===this.rootPattern,rest:null!=t&&t.argument===e,assignments:this.assignments})}Property(e){e.computed&&this.rightHandNodes.push(e.key),this.visit(e.value)}ArrayPattern(e){for(let t=0,n=e.elements.length;t{this.rightHandNodes.push(e)})),this.visit(e.callee)}}const{Syntax:P}=s.default;class k extends o.default.Visitor{constructor(e,t){super(null,t.options),this.declaration=e,this.referencer=t}visitImport(e,t){this.referencer.visitPattern(e,(e=>{this.referencer.currentScope().__define(e,new c(l.ImportBinding,e,t,this.declaration,null,null))}))}ImportNamespaceSpecifier(e){const t=e.local||e.id;t&&this.visitImport(t,e)}ImportDefaultSpecifier(e){const t=e.local||e.id;this.visitImport(t,e)}ImportSpecifier(e){const t=e.local||e.id;e.name?this.visitImport(e.name,e):this.visitImport(t,e)}}class D extends o.default.Visitor{constructor(e,t){super(null,e),this.options=e,this.scopeManager=t,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(e){for(;this.currentScope()&&e===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(e){const t=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=e,t}popInnerMethodDefinition(e){this.isInnerMethodDefinition=e}referencingDefaultValue(e,t,n,r){const i=this.currentScope();t.forEach((t=>{i.__referencing(e,a.WRITE,t.right,n,e!==t.left,r)}))}visitPattern(e,t,n){let r=t,i=n;"function"==typeof t&&(i=t,r={processRightHandNodes:!1}),function(e,t,n,r){const i=new A(e,t,r);i.visit(t),null!=n&&i.rightHandNodes.forEach(n.visit,n)}(this.options,e,r.processRightHandNodes?this:null,i)}visitFunction(e){let t,n;e.type===P.FunctionDeclaration&&this.currentScope().__define(e.id,new c(l.FunctionName,e.id,e,null,null,null)),e.type===P.FunctionExpression&&e.id&&this.scopeManager.__nestFunctionExpressionNameScope(e),this.scopeManager.__nestFunctionScope(e,this.isInnerMethodDefinition);const r=this;function i(n,i){r.currentScope().__define(n,new u(n,e,t,i.rest)),r.referencingDefaultValue(n,i.assignments,null,!0)}for(t=0,n=e.params.length;t{this.currentScope().__define(t,new u(t,e,e.params.length,!0))})),e.body&&(e.body.type===P.BlockStatement?this.visitChildren(e.body):this.visit(e.body)),this.close(e)}visitClass(e){e.type===P.ClassDeclaration&&this.currentScope().__define(e.id,new c(l.ClassName,e.id,e,null,null,null)),this.visit(e.superClass),this.scopeManager.__nestClassScope(e),e.id&&this.currentScope().__define(e.id,new c(l.ClassName,e.id,e)),this.visit(e.body),this.close(e)}visitProperty(e){let t;e.computed&&this.visit(e.key);const n=e.type===P.MethodDefinition;n&&(t=this.pushInnerMethodDefinition(!0)),this.visit(e.value),n&&this.popInnerMethodDefinition(t)}visitForIn(e){e.left.type===P.VariableDeclaration&&"var"!==e.left.kind&&this.scopeManager.__nestForScope(e),e.left.type===P.VariableDeclaration?(this.visit(e.left),this.visitPattern(e.left.declarations[0].id,(t=>{this.currentScope().__referencing(t,a.WRITE,e.right,null,!0,!0)}))):this.visitPattern(e.left,{processRightHandNodes:!0},((t,n)=>{let r=null;this.currentScope().isStrict||(r={pattern:t,node:e}),this.referencingDefaultValue(t,n.assignments,r,!1),this.currentScope().__referencing(t,a.WRITE,e.right,r,!0,!1)})),this.visit(e.right),this.visit(e.body),this.close(e)}visitVariableDeclaration(e,t,n,r){const i=n.declarations[r],s=i.init;this.visitPattern(i.id,{processRightHandNodes:!0},((o,l)=>{e.__define(o,new c(t,o,i,n,r,n.kind)),this.referencingDefaultValue(o,l.assignments,null,!0),s&&this.currentScope().__referencing(o,a.WRITE,s,null,!l.topLevel,!0)}))}AssignmentExpression(e){A.isPattern(e.left)?"="===e.operator?this.visitPattern(e.left,{processRightHandNodes:!0},((t,n)=>{let r=null;this.currentScope().isStrict||(r={pattern:t,node:e}),this.referencingDefaultValue(t,n.assignments,r,!1),this.currentScope().__referencing(t,a.WRITE,e.right,r,!n.topLevel,!1)})):this.currentScope().__referencing(e.left,a.RW,e.right):this.visit(e.left),this.visit(e.right)}CatchClause(e){this.scopeManager.__nestCatchScope(e),this.visitPattern(e.param,{processRightHandNodes:!0},((t,n)=>{this.currentScope().__define(t,new c(l.CatchClause,e.param,e,null,null,null)),this.referencingDefaultValue(t,n.assignments,null,!0)})),this.visit(e.body),this.close(e)}Program(e){this.scopeManager.__nestGlobalScope(e),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(e,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(e),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(e),this.close(e)}Identifier(e){this.currentScope().__referencing(e)}PrivateIdentifier(){}UpdateExpression(e){A.isPattern(e.argument)?this.currentScope().__referencing(e.argument,a.RW,null):this.visitChildren(e)}MemberExpression(e){this.visit(e.object),e.computed&&this.visit(e.property)}Property(e){this.visitProperty(e)}PropertyDefinition(e){const{computed:t,key:n,value:r}=e;t&&this.visit(n),r&&(this.scopeManager.__nestClassFieldInitializerScope(r),this.visit(r),this.close(r))}StaticBlock(e){this.scopeManager.__nestClassStaticBlockScope(e),this.visitChildren(e),this.close(e)}MethodDefinition(e){this.visitProperty(e)}BreakStatement(){}ContinueStatement(){}LabeledStatement(e){this.visit(e.body)}ForStatement(e){e.init&&e.init.type===P.VariableDeclaration&&"var"!==e.init.kind&&this.scopeManager.__nestForScope(e),this.visitChildren(e),this.close(e)}ClassExpression(e){this.visitClass(e)}ClassDeclaration(e){this.visitClass(e)}CallExpression(e){this.scopeManager.__ignoreEval()||e.callee.type!==P.Identifier||"eval"!==e.callee.name||this.currentScope().variableScope.__detectEval(),this.visitChildren(e)}BlockStatement(e){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(e),this.visitChildren(e),this.close(e)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(e){this.visit(e.object),this.scopeManager.__nestWithScope(e),this.visit(e.body),this.close(e)}VariableDeclaration(e){const t="var"===e.kind?this.currentScope().variableScope:this.currentScope();for(let n=0,r=e.declarations.length;ne)return!1;if((n+=t[r+1])>=e)return!0}return!1}function d(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==t&&p(e,n)))}function f(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==r&&(p(e,n)||p(e,t)))))}var h=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new h(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},y={startsExpr:!0},_={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,_[e]=new h(e,t)}var v={num:new h("num",y),regexp:new h("regexp",y),string:new h("string",y),name:new h("name",y),privateId:new h("privateId",y),eof:new h("eof"),bracketL:new h("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new h("]"),braceL:new h("{",{beforeExpr:!0,startsExpr:!0}),braceR:new h("}"),parenL:new h("(",{beforeExpr:!0,startsExpr:!0}),parenR:new h(")"),comma:new h(",",g),semi:new h(";",g),colon:new h(":",g),dot:new h("."),question:new h("?",g),questionDot:new h("?."),arrow:new h("=>",g),template:new h("template"),invalidTemplate:new h("invalidTemplate"),ellipsis:new h("...",g),backQuote:new h("`",y),dollarBraceL:new h("${",{beforeExpr:!0,startsExpr:!0}),eq:new h("=",{beforeExpr:!0,isAssign:!0}),assign:new h("_=",{beforeExpr:!0,isAssign:!0}),incDec:new h("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new h("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=/===/!==",6),relational:m("/<=/>=",7),bitShift:m("<>/>>>",8),plusMin:new h("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new h("**",{beforeExpr:!0}),coalesce:m("??",1),_break:b("break"),_case:b("case",g),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",g),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",g),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",g),_switch:b("switch"),_throw:b("throw",g),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class",y),_extends:b("extends",g),_export:b("export"),_import:b("import",y),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,x=new RegExp(E.source,"g");function S(e){return 10===e||13===e||8232===e||8233===e}function O(e,t,n){void 0===n&&(n=e.length);for(var r=t;r>10),56320+(1023&e)))}var L=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,B=function(e,t){this.line=e,this.column=t};B.prototype.offset=function(e){return new B(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function j(e,t){for(var n=1,r=0;;){var i=O(e,r,t);if(i<0)return new B(n,t-r);++n,r=i}}var N={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},F=!1;function U(e){var t={};for(var n in N)t[n]=e&&k(e,n)?e[n]:N[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!F&&"object"==typeof console&&console.warn&&(F=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),D(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return D(t.onComment)&&(t.onComment=V(t,t.onComment)),t}function V(e,t){return function(n,r,i,s,o,a){var l={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(l.loc=new M(this,o,a)),e.ranges&&(l.range=[i,s]),t.push(l)}}var K=1,W=2,$=4,q=8,Q=16,z=32,X=64,G=128,Z=256,Y=K|W|Z;function H(e,t){return W|(e?$:0)|(t?q:0)}var J=0,ee=1,te=2,ne=3,re=4,ie=5,se=function(e,t,n){this.options=e=U(e),this.sourceFile=e.sourceFile,this.keywords=R(a[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=s[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=R(r);var i=(r?r+" ":"")+s.strict;this.reservedWordsStrict=R(i),this.reservedWordsStrictBind=R(i+" "+s.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(K),this.regexpState=null,this.privateNameStack=[]},oe={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};se.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},oe.inFunction.get=function(){return(this.currentVarScope().flags&W)>0},oe.inGenerator.get=function(){return(this.currentVarScope().flags&q)>0&&!this.currentVarScope().inClassFieldInit},oe.inAsync.get=function(){return(this.currentVarScope().flags&$)>0&&!this.currentVarScope().inClassFieldInit},oe.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Z)return!1;if(t.flags&W)return(t.flags&$)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},oe.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(t&X)>0||n||this.options.allowSuperOutsideMethod},oe.allowDirectSuper.get=function(){return(this.currentThisScope().flags&G)>0},oe.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},oe.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(t&(W|Z))>0||n},oe.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Z)>0},se.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,w.lastIndex=e,e+=w.exec(this.input)[0].length,";"===this.input[e]&&e++}},ae.eat=function(e){return this.type===e&&(this.next(),!0)},ae.isContextual=function(e){return this.type===v.name&&this.value===e&&!this.containsEsc},ae.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},ae.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ae.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},ae.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ae.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},ae.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ae.expect=function(e){this.eat(e)||this.unexpected()},ae.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var ce=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ae.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},ae.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},ae.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&r<56320)return!0;if(d(r,!0)){for(var i=n+1;f(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!l.test(s))return!0}return!1},ue.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;w.lastIndex=this.pos;var e,t=w.exec(this.input),n=this.pos+t[0].length;return!(E.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(f(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},ue.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=v._var,r="let"),i){case v._break:case v._continue:return this.parseBreakContinueStatement(s,i.keyword);case v._debugger:return this.parseDebuggerStatement(s);case v._do:return this.parseDoStatement(s);case v._for:return this.parseForStatement(s);case v._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case v._class:return e&&this.unexpected(),this.parseClass(s,!0);case v._if:return this.parseIfStatement(s);case v._return:return this.parseReturnStatement(s);case v._switch:return this.parseSwitchStatement(s);case v._throw:return this.parseThrowStatement(s);case v._try:return this.parseTryStatement(s);case v._const:case v._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case v._while:return this.parseWhileStatement(s);case v._with:return this.parseWithStatement(s);case v.braceL:return this.parseBlock(!0,s);case v.semi:return this.parseEmptyStatement(s);case v._export:case v._import:if(this.options.ecmaVersion>10&&i===v._import){w.lastIndex=this.pos;var o=w.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===v._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var c=this.value,u=this.parseExpression();return i===v.name&&"Identifier"===u.type&&this.eat(v.colon)?this.parseLabeledStatement(s,c,u,e):this.parseExpressionStatement(s,u)}},ue.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},ue.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(pe),this.enterScope(0),this.expect(v.parenL),this.type===v.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===v._var||this.type===v._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===r.declarations.length?(this.options.ecmaVersion>=9&&(this.type===v._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var s=this.isContextual("let"),o=!1,a=new ce,l=this.parseExpression(!(t>-1)||"await",a);return this.type===v._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===v._in?t>-1&&this.unexpected(t):e.await=t>-1),s&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,a),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},ue.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,he|(n?0:me),!1,t)},ue.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(v._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},ue.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},ue.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(de),this.enterScope(0);for(var n=!1;this.type!==v.braceR;)if(this.type===v._case||this.type===v._default){var r=this.type===v._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(v.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},ue.parseThrowStatement=function(e){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var fe=[];ue.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?z:0),this.checkLValPattern(e,t?re:te),this.expect(v.parenR),e},ue.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch){var t=this.startNode();this.next(),this.eat(v.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},ue.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},ue.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(pe),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},ue.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},ue.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},ue.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},ue.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},ue.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(v.braceL),e&&this.enterScope(0);this.type!==v.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},ue.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},ue.parseForIn=function(e,t){var n=this.type===v._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},ue.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(v.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===v._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(v.comma))break}return e},ue.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?ee:te,!1)};var he=1,me=2,ge=4;function ye(e,t){var n=t.key.name,r=e[n],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[n]="true",!1):!!r||(e[n]=i,!1)}function _e(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}ue.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===v.star&&t&me&&this.unexpected(),e.generator=this.eat(v.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&he&&(e.id=t&ge&&this.type!==v.name?null:this.parseIdent(),!e.id||t&me||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ee:te:ne));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(H(e.async,e.generator)),t&he||(e.id=this.type===v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&he?"FunctionDeclaration":"FunctionExpression")},ue.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ue.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(v.braceL);this.type!==v.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(i.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&ye(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},ue.parseClassElement=function(e){if(this.eat(v.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(v.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===v.star?a=!0:r="static"}if(n.static=a,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==v.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(t>=9||!s)&&this.eat(v.star)&&(i=!0),!r&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===v.parenL||"method"!==o||i||s){var c=!n.static&&_e(n,"constructor"),u=c&&e;c&&"method"!==o&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":o,this.parseClassMethod(n,i,s,u)}else this.parseClassField(n);return n},ue.isClassElementNameStart=function(){return this.type===v.name||this.type===v.privateId||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword},ue.parseClassElementName=function(e){this.type===v.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},ue.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&_e(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},ue.parseClassField=function(e){if(_e(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&_e(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(v.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},ue.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Z|X);this.type!==v.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},ue.parseClassId=function(e,t){this.type===v.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,te,!1)):(!0===t&&this.unexpected(),e.id=null)},ue.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts(null,!1):null},ue.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},ue.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,n=e.used,r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},ue.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.parseExportAllDeclaration(e,t);if(this.eat(v._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var n=0,r=e.specifiers;n=13&&this.type===v.string){var e=this.parseLiteral(this.value);return L.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},ue.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var be=se.prototype;be.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(v._function))return this.overrideContext(Ee.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(v.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===v.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(v.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[l],!0,t)}return l;case v.regexp:var c=this.value;return(r=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},r;case v.num:case v.string:return this.parseLiteral(this.value);case v._null:case v._true:case v._false:return(r=this.startNode()).value=this.type===v._null?null:this.type===v._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case v.parenL:var u=this.start,p=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),p;case v.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(v.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case v.braceL:return this.overrideContext(Ee.b_expr),this.parseObj(!1,e);case v._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case v._class:return this.parseClass(this.startNode(),!1);case v._new:return this.parseNew();case v.backQuote:return this.parseTemplate();case v._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Se.parseExprAtomDefault=function(){this.unexpected()},Se.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var n=this.parseIdent(!0);return this.type!==v.parenL||e?this.type===v.dot?(t.meta=n,this.parseImportMeta(t)):void this.unexpected():this.parseDynamicImport(t)},Se.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(v.parenR)){var t=this.start;this.eat(v.comma)&&this.eat(v.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Se.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Se.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Se.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},Se.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Se.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,l=this.startLoc,c=[],u=!0,p=!1,d=new ce,f=this.yieldPos,h=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==v.parenR;){if(u?u=!1:this.expect(v.comma),s&&this.afterTrailingComma(v.parenR,!0)){p=!0;break}if(this.type===v.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===v.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(v.parenR),e&&this.shouldParseArrow(c)&&this.eat(v.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(r,i,c,t);c.length&&!p||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,c.length>1?((n=this.startNodeAt(a,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",m,g)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,i);return y.expression=n,this.finishNode(y,"ParenthesizedExpression")}return n},Se.parseParenItem=function(e){return e},Se.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Te=[];Se.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(v.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(v.parenL)?e.arguments=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Te,this.finishNode(e,"NewExpression")},Se.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===v.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===v.backQuote,this.finishNode(n,"TemplateElement")},Se.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===v.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(v.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(v.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Se.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===v.name||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===v.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},Se.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(v.braceR);){if(r)r=!1;else if(this.expect(v.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(v.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Se.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(v.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===v.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===v.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(v.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(v.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},Se.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var n=e.value.start;"get"===e.kind?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Se.parsePropertyValue=function(e,t,n,r,i,s,o,a){(n||r)&&this.type===v.colon&&this.unexpected(),this.eat(v.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===v.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r)):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===v.comma||this.type===v.braceR||this.type===v.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===v.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},Se.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(v.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(v.bracketR),e.key;e.computed=!1}return e.key=this.type===v.num||this.type===v.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Se.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Se.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(H(t,r.generator)|X|(n?G:0)),this.expect(v.parenL),r.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},Se.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(H(n,!1)|Q),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Se.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==v.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ie),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Se.isSimpleParamList=function(e){for(var t=0,n=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&K&&delete this.undefinedExports[e]}else if(t===re)this.currentScope().lexical.push(e);else if(t===ne){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(a.flags&z&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&a.flags&K&&delete this.undefinedExports[e],a.flags&Y)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Ce.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Ce.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ce.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Y)return t}},Ce.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Y&&!(t.flags&Q))return t}};var Pe=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ke=se.prototype;function De(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}ke.startNode=function(){return new Pe(this,this.start,this.startLoc)},ke.startNodeAt=function(e,t){return new Pe(this,e,t)},ke.finishNode=function(e,t){return De.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ke.finishNodeAt=function(e,t,n,r){return De.call(this,e,t,n,r)},ke.copyNode=function(e){var t=new Pe(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Re="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Ie=Re+" Extended_Pictographic",Le=Ie+" EBase EComp EMod EPres ExtPict",Be={9:Re,10:Ie,11:Ie,12:Le,13:Le,14:Le},Me={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},je="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ne="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Fe=Ne+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ue=Fe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ve=Ue+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ke=Ve+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",We={9:Ne,10:Fe,11:Ue,12:Ve,13:Ke,14:Ke+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},$e={};function qe(e){var t=$e[e]={binary:R(Be[e]+" "+je),binaryOfStrings:R(Me[e]),nonBinary:{General_Category:R(je),Script:R(We[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Qe=0,ze=[9,10,11,12,13,14];Qe=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=$e[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Ze(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Ye(e){return d(e,!0)||36===e||95===e}function He(e){return f(e,!0)||36===e||95===e||8204===e||8205===e}function Je(e){return e>=65&&e<=90||e>=97&&e<=122}function et(e){return e>=0&&e<=1114111}Ge.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},Ge.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ge.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(i<<10)+s-56613888:i},Ge.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},Ge.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Ge.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ge.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ge.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Ge.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0,i=e;r-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},Xe.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Xe.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Xe.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Xe.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Xe.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Xe.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Xe.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Xe.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Ze(t)&&(e.lastIntValue=t,e.advance(),!0)},Xe.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Ze(n);)e.advance();return e.pos!==t},Xe.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Xe.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Xe.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Xe.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=I(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=I(e.lastIntValue);return!0}return!1},Xe.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Ye(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Xe.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),He(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Xe.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Xe.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Xe.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Xe.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Xe.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Xe.regexp_eatZero=function(e){return 48===e.current()&&!ut(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Xe.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Xe.regexp_eatControlLetter=function(e){var t=e.current();return!!Je(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Xe.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(i-55296)+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&et(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Xe.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Xe.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};var tt=0,nt=1,rt=2;function it(e){return 100===e||68===e||115===e||83===e||119===e||87===e}function st(e){return Je(e)||95===e}function ot(e){return st(e)||ut(e)}function at(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}function lt(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}function ct(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}function ut(e){return e>=48&&e<=57}function pt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function dt(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ft(e){return e>=48&&e<=55}Xe.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(it(t))return e.lastIntValue=-1,e.advance(),nt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===rt&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return tt},Xe.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),nt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return tt},Xe.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){k(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Xe.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?nt:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?rt:void e.raise("Invalid property name")},Xe.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";st(t=e.current());)e.lastStringValue+=I(t),e.advance();return""!==e.lastStringValue},Xe.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ot(t=e.current());)e.lastStringValue+=I(t),e.advance();return""!==e.lastStringValue},Xe.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Xe.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===rt&&e.raise("Negated character class may contain strings"),!0}return!1},Xe.regexp_classContents=function(e){return 93===e.current()?nt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),nt)},Xe.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Xe.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||ft(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Xe.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Xe.regexp_classSetExpression=function(e){var t,n=nt;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){t===rt&&(n=rt);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?t!==rt&&(n=nt):e.raise("Invalid character in character class");if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;t===rt&&(n=rt)}},Xe.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Xe.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?nt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Xe.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===rt&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Xe.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},Xe.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===rt&&(t=rt);return t},Xe.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?nt:rt},Xe.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var n=e.current();return!(n<0||n===e.lookahead()&&at(n)||lt(n)||(e.advance(),e.lastIntValue=n,0))},Xe.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!ct(t)&&(e.lastIntValue=t,e.advance(),!0)},Xe.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!ut(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Xe.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Xe.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;ut(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Xe.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;pt(n=e.current());)e.lastIntValue=16*e.lastIntValue+dt(n),e.advance();return e.pos!==t},Xe.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Xe.regexp_eatOctalDigit=function(e){var t=e.current();return ft(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Xe.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r=this.input.length?this.finishToken(v.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},mt.readToken=function(e){return d(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},mt.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},mt.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=O(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},mt.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&T.test(String.fromCharCode(e))))break e;++this.pos}}},mt.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},mt.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(v.ellipsis)):(++this.pos,this.finishToken(v.dot))},mt.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(v.assign,2):this.finishOp(v.slash,1)},mt.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?v.star:v.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=v.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(v.assign,n+1):this.finishOp(r,n)},mt.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(v.assign,3):this.finishOp(124===e?v.logicalOR:v.logicalAND,2):61===t?this.finishOp(v.assign,2):this.finishOp(124===e?v.bitwiseOR:v.bitwiseAND,1)},mt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(v.assign,2):this.finishOp(v.bitwiseXOR,1)},mt.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!E.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(v.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(v.assign,2):this.finishOp(v.plusMin,1)},mt.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(v.assign,n+1):this.finishOp(v.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(v.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},mt.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(v.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(v.arrow)):this.finishOp(61===e?v.eq:v.prefix,1)},mt.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(v.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(v.assign,3):this.finishOp(v.coalesce,2)}return this.finishOp(v.question,1)},mt.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,d(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(v.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+I(e)+"'")},mt.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(v.parenL);case 41:return++this.pos,this.finishToken(v.parenR);case 59:return++this.pos,this.finishToken(v.semi);case 44:return++this.pos,this.finishToken(v.comma);case 91:return++this.pos,this.finishToken(v.bracketL);case 93:return++this.pos,this.finishToken(v.bracketR);case 123:return++this.pos,this.finishToken(v.braceL);case 125:return++this.pos,this.finishToken(v.braceR);case 58:return++this.pos,this.finishToken(v.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(v.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(v.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+I(e)+"'")},mt.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},mt.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(E.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Ge(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(i,o)}catch(e){}return this.finishToken(v.regexp,{pattern:i,flags:o,value:l})},mt.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,l=0,c=null==t?1/0:t;l=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;a=u,o=o*e+p}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:o},mt.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=yt(this.input.slice(t,this.pos)),++this.pos):d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,n)},mt.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=yt(this.input.slice(t,this.pos));return++this.pos,d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=gt(this.input.slice(t,this.pos),n);return this.finishToken(v.num,s)},mt.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},mt.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(v.string,t)};var _t={};mt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==_t)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},mt.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw _t;this.raise(e,t)},mt.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==v.template&&this.type!==v.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(v.template,e)):36===n?(this.pos+=2,this.finishToken(v.dollarBraceL)):(++this.pos,this.finishToken(v.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(S(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},mt.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return S(t)?"":String.fromCharCode(t)}},mt.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},mt.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),n=/^[\da-fA-F]+$/,r=/^\d+$/,i=new WeakMap;function s(e){e=e.Parser.acorn||e;let t=i.get(e);if(!t){const n=e.tokTypes,r=e.TokContext,s=e.TokenType,o=new r("...",!0,!0),c={tc_oTag:o,tc_cTag:a,tc_expr:l},u={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};u.jsxTagStart.updateContext=function(){this.context.push(l),this.context.push(o),this.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===o&&e===n.slash||t===a?(this.context.pop(),this.exprAllowed=this.curContext()===l):this.exprAllowed=!0},t={tokContexts:c,tokTypes:u},i.set(e,t)}return t}function o(e){return e?"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?o(e.object)+"."+o(e.property):void 0:e}e.exports=function(e){return e=e||{},function(i){return function(e,i){const a=i.acorn||dv(),l=s(a),c=a.tokTypes,u=l.tokTypes,p=a.tokContexts,d=l.tokContexts.tc_oTag,f=l.tokContexts.tc_cTag,h=l.tokContexts.tc_expr,m=a.isNewLine,g=a.isIdentifierStart,y=a.isIdentifierChar;return class extends i{static get acornJsx(){return l}jsx_readToken(){let e="",t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:return this.pos===this.start?60===n&&this.exprAllowed?(++this.pos,this.finishToken(u.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.pos),this.finishToken(u.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===n?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t}jsx_readString(e){let t="",n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let r=this.input.charCodeAt(this.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):m(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(c.string,t)}jsx_readEntity(){let e,i="",s=0,o=this.input[this.pos];"&"!==o&&this.raise(this.pos,"Entity must start with an ampersand");let a=++this.pos;for(;this.pos")}let a=i.name?"Element":"Fragment";return n["opening"+a]=i,n["closing"+a]=s,n.children=r,this.type===c.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(n,"JSX"+a)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type="JSXText",e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===u.jsxText?this.jsx_parseText():this.type===u.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===h)return this.jsx_readToken();if(t===d||t===f){if(g(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(u.jsxTagEnd);if((34===e||39===e)&&t==d)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(u.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==c.braceL){var t=this.curContext();t==d?this.context.push(p.b_expr):t==h?this.context.push(p.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==c.slash||e!==u.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(f),this.exprAllowed=!1}}}}({allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},i)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(dv()).tokTypes},configurable:!0,enumerable:!0})}(yv)),yv.exports}function bv(){if(gv)return uv;gv=1,Object.defineProperty(uv,"__esModule",{value:!0});var e=dv(),t=_v(),n=lv();function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var s=i(e),o=r(t),a=i(n);const l="Boolean",c="Identifier",u="PrivateIdentifier",p="Keyword",d="Null",f="Numeric",h="Punctuator",m="String",g="RegularExpression",y="Template",_="JSXIdentifier",b="JSXText";function v(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}v.prototype={constructor:v,translate(e,t){const n=e.type,r=this._acornTokTypes;if(n===r.name)e.type=c,"static"===e.value&&(e.type=p),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=p);else if(n===r.privateId)e.type=u;else if(n===r.semi||n===r.comma||n===r.parenL||n===r.parenR||n===r.braceL||n===r.braceR||n===r.dot||n===r.bracketL||n===r.colon||n===r.question||n===r.bracketR||n===r.ellipsis||n===r.arrow||n===r.jsxTagStart||n===r.incDec||n===r.starstar||n===r.jsxTagEnd||n===r.prefix||n===r.questionDot||n.binop&&!n.keyword||n.isAssign)e.type=h,e.value=this._code.slice(e.start,e.end);else if(n===r.jsxName)e.type=_;else if("jsxText"===n.label||n===r.jsxAttrValueToken)e.type=b;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type=l:"null"===n.keyword?e.type=d:e.type=p;else if(n===r.num)e.type=f,e.value=this._code.slice(e.start,e.end);else if(n===r.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=b):e.type=m,e.value=this._code.slice(e.start,e.end);else if(n===r.regexp){e.type=g;const t=e.value;e.regex={flags:t.flags,pattern:t.pattern},e.value=`/${t.pattern}/${t.flags}`}return e},onToken(e,t){const n=this._acornTokTypes,r=t.tokens,i=this._tokens,s=()=>{r.push(function(e,t){const n=e[0],r=e[e.length-1],i={type:y,value:t.slice(n.start,r.end)};return n.loc&&(i.loc={start:n.loc.start,end:r.loc.end}),n.range&&(i.start=n.range[0],i.end=r.range[1],i.range=[i.start,i.end]),i}(this._tokens,this._code)),this._tokens=[]};if(e.type!==n.eof){if(e.type===n.backQuote)return this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),i.push(e),void(i.length>1&&s());if(e.type===n.dollarBraceL)return i.push(e),void s();if(e.type===n.braceR)return this._curlyBrace&&r.push(this.translate(this._curlyBrace,t)),void(this._curlyBrace=e);if(e.type===n.template||e.type===n.invalidTemplate)return this._curlyBrace&&(i.push(this._curlyBrace),this._curlyBrace=null),void i.push(e);this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(this.translate(e,t))}else this._curlyBrace&&r.push(this.translate(this._curlyBrace,t))}};const E=[3,5,6,7,8,9,10,11,12,13,14,15];function x(){return E[E.length-1]}function S(e){const t=function(e=5){let t="latest"===e?x():e;if("number"!=typeof t)throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!E.includes(t))throw new Error("Invalid ecmaVersion.");return t}(e.ecmaVersion),n=function(e="script"){if("script"===e||"module"===e)return e;if("commonjs"===e)return"script";throw new Error("Invalid sourceType.")}(e.sourceType),r=!0===e.range,i=!0===e.loc;if(3!==t&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(void 0!==e.allowReserved&&"boolean"!=typeof e.allowReserved)throw new Error("`allowReserved`, when present, must be `true` or `false`");const s=3===t&&(e.allowReserved||"never"),o=e.ecmaFeatures||{},a="commonjs"===e.sourceType||Boolean(o.globalReturn);if("module"===n&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:n,ranges:r,locations:i,allowReserved:s,allowReturnOutsideFunction:a})}const O=Symbol("espree's internal state"),T=Symbol("espree's esprimaFinishNode");var w=()=>e=>{const t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(e,n){"object"==typeof e&&null!==e||(e={}),"string"==typeof n||n instanceof String||(n=String(n));const r=e.sourceType,i=S(e),s=i.ecmaFeatures||{},o=!0===i.tokens?new v(t,n):null,a={originalSourceType:r||i.sourceType,tokens:o?[]:null,comments:!0===i.comment?[]:null,impliedStrict:!0===s.impliedStrict&&i.ecmaVersion>=5,ecmaVersion:i.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:i.ecmaVersion,sourceType:i.sourceType,ranges:i.ranges,locations:i.locations,allowReserved:i.allowReserved,allowReturnOutsideFunction:i.allowReturnOutsideFunction,onToken(e){o&&o.onToken(e,a),e.type!==t.eof&&(a.lastToken=e)},onComment(e,t,r,i,s,o){if(a.comments){const l=function(e,t,n,r,i,s,o){let a;a=e?"Block":"#!"===o.slice(n,n+2)?"Hashbang":"Line";const l={type:a,value:t};return"number"==typeof n&&(l.start=n,l.end=r,l.range=[n,r]),"object"==typeof i&&(l.loc={start:i,end:s}),l}(e,t,r,i,s,o,n);a.comments.push(l)}}},n),this[O]=a}tokenize(){do{this.next()}while(this.type!==t.eof);this.next();const e=this[O],n=e.tokens;return e.comments&&(n.comments=e.comments),n}finishNode(...e){const t=super.finishNode(...e);return this[T](t)}finishNodeAt(...e){const t=super.finishNodeAt(...e);return this[T](t)}parse(){const e=this[O],t=super.parse();if(t.sourceType=e.originalSourceType,e.comments&&(t.comments=e.comments),e.tokens&&(t.tokens=e.tokens),t.body.length){const[e]=t.body;t.range&&(t.range[0]=e.range[0]),t.loc&&(t.loc.start=e.loc.start),t.start=e.start}return e.lastToken&&(t.range&&(t.range[1]=e.lastToken.range[1]),t.loc&&(t.loc.end=e.lastToken.loc.end),t.end=e.lastToken.end),this[O].templateElements.forEach((e=>{const t=e.tail?1:2;e.start+=-1,e.end+=t,e.range&&(e.range[0]+=-1,e.range[1]+=t),e.loc&&(e.loc.start.column+=-1,e.loc.end.column+=t)})),t}parseTopLevel(e){return this[O].impliedStrict&&(this.strict=!0),super.parseTopLevel(e)}raise(t,n){const r=e.acorn.getLineInfo(this.input,t),i=new SyntaxError(n);throw i.index=t,i.lineNumber=r.line,i.column=r.column+1,i}raiseRecoverable(e,t){this.raise(e,t)}unexpected(e){let t="Unexpected token";if(null!=e){if(this.pos=e,this.options.locations)for(;this.posthis.start&&(t+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,t)}jsx_readString(e){const n=super.jsx_readString(e);return this.type===t.string&&(this[O].jsxAttrValueToken=!0),n}[T](e){return"TemplateElement"===e.type&&this[O].templateElements.push(e),e.type.includes("Function")&&!e.generator&&(e.generator=!1),e}}};const C={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=s.Parser.extend(w())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=s.Parser.extend(o.default(),w())),this._jsx},get(e){return Boolean(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};const A=a.KEYS,P=function(){let e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),A)Object.hasOwnProperty.call(A,e)&&(t[e]=e);return"function"==typeof Object.freeze&&Object.freeze(t),t}(),k=x(),D=[...E];return uv.Syntax=P,uv.VisitorKeys=A,uv.latestEcmaVersion=k,uv.name="espree",uv.parse=function(e,t){return new(C.get(t))(t,e).parse()},uv.supportedEcmaVersions=D,uv.tokenize=function(e,t){const n=C.get(t);return t&&!0===t.tokens||(t=Object.assign({},t,{tokens:!0})),new n(t,e).tokenize()},uv.version="9.6.1",uv}var vv,Ev={exports:{}};function xv(){return vv||(vv=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",s="[object Function]",o="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[s]=c["[object Map]"]=c["[object Number]"]=c[o]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof vy&&vy&&vy.Object===Object&&vy,p="object"==typeof self&&self&&self.Object===Object&&self,d=u||p||Function("return this")(),f=t&&!t.nodeType&&t,h=f&&e&&!e.nodeType&&e,m=h&&h.exports===f,g=m&&u.process,y=function(){try{var e=h&&h.require&&h.require("util").types;return e||g&&g.binding&&g.binding("util")}catch(e){}}(),_=y&&y.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var v,E,x,S=Array.prototype,O=Function.prototype,T=Object.prototype,w=d["__core-js_shared__"],C=O.toString,A=T.hasOwnProperty,P=(v=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",k=T.toString,D=C.call(Object),R=RegExp("^"+C.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=m?d.Buffer:void 0,L=d.Symbol,B=d.Uint8Array,M=I?I.allocUnsafe:void 0,j=(E=Object.getPrototypeOf,x=Object,function(e){return E(x(e))}),N=Object.create,F=T.propertyIsEnumerable,U=S.splice,V=L?L.toStringTag:void 0,K=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),W=I?I.isBuffer:void 0,$=Math.max,q=Date.now,Q=he(d,"Map"),z=he(Object,"create"),X=function(){function e(){}return function(t){if(!we(t))return{};if(N)return N(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Z.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(Q||Z),string:new G}},Y.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return fe(this,e).get(e)},Y.prototype.has=function(e){return fe(this,e).has(e)},Y.prototype.set=function(e,t){var n=fe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},H.prototype.clear=function(){this.__data__=new Z,this.size=0},H.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},H.prototype.get=function(e){return this.__data__.get(e)},H.prototype.has=function(e){return this.__data__.has(e)},H.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Y(r)}return n.set(e,t),this.size=n.size,this};var ie,se=function(e,t,n){for(var r=-1,i=Object(e),s=n(e),o=s.length;o--;){var a=s[ie?o:++r];if(!1===t(i[a],a,i))break}return e};function oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?function(e){var t=A.call(e,V),n=e[V];try{e[V]=void 0;var r=!0}catch(e){}var i=k.call(e);r&&(t?e[V]=n:delete e[V]);return i}(e):function(e){return k.call(e)}(e)}function ae(e){return Ce(e)&&oe(e)==i}function le(e){return!(!we(e)||function(e){return!!P&&P in e}(e))&&(Oe(e)?R:a).test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ce(e){if(!we(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)("constructor"!=r||!t&&A.call(e,r))&&n.push(r);return n}function ue(e,t,n,r,i){e!==t&&se(t,(function(s,a){if(i||(i=new H),we(s))!function(e,t,n,r,i,s,a){var l=ye(e,n),c=ye(t,n),u=a.get(c);if(u)return void ee(e,n,u);var p=s?s(l,c,n+"",e,t,a):void 0,d=void 0===p;if(d){var f=Ee(c),h=!f&&Se(c),m=!f&&!h&&Ae(c);p=c,f||h||m?Ee(l)?p=l:Ce(v=l)&&xe(v)?p=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(de);function be(e,t){return e===t||e!=e&&t!=t}var ve=ae(function(){return arguments}())?ae:function(e){return Ce(e)&&A.call(e,"callee")&&!F.call(e,"callee")},Ee=Array.isArray;function xe(e){return null!=e&&Te(e.length)&&!Oe(e)}var Se=W||function(){return!1};function Oe(e){if(!we(e))return!1;var t=oe(e);return t==s||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ce(e){return null!=e&&"object"==typeof e}var Ae=_?function(e){return function(t){return e(t)}}(_):function(e){return Ce(e)&&Te(e.length)&&!!c[oe(e)]};function Pe(e){return xe(e)?J(e,!0):ce(e)}var ke,De=(ke=function(e,t,n){ue(e,t,n)},pe((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(i=ke.length>3&&"function"==typeof i?(r--,i):void 0,s&&function(e,t,n){if(!we(n))return!1;var r=typeof t;return!!("number"==r?xe(n)&&me(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],s)&&(i=r<3?void 0:i,r=1),e=Object(e);++n",description:"An AST-based pattern checker for JavaScript.",bin:{eslint:"./bin/eslint.js"},main:"./lib/api.js",exports:{"./package.json":"./package.json",".":"./lib/api.js","./use-at-your-own-risk":"./lib/unsupported-api.js"},scripts:{"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js",lint:"node Makefile.js lint","lint:docs:js":"node Makefile.js lintDocsJS","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:fix":"node Makefile.js lint -- fix","lint:fix:docs:js":"node Makefile.js lintDocsJS -- fix","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf"},gitHooks:{"pre-commit":"lint-staged"},"lint-staged":{"*.js":"eslint --fix","*.md":"markdownlint --fix","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"npx svgo -r --multipass"},files:["LICENSE","README.md","bin","conf","lib","messages"],repository:"eslint/eslint",funding:"https://opencollective.com/eslint",homepage:"https://eslint.org",bugs:"https://github.com/eslint/eslint/issues/",dependencies:{"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.6.1","@eslint/eslintrc":"^2.1.4","@eslint/js":"8.57.0","@humanwhocodes/config-array":"^0.11.14","@humanwhocodes/module-importer":"^1.0.1","@nodelib/fs.walk":"^1.2.8","@ungap/structured-clone":"^1.2.0",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2",doctrine:"^3.0.0","escape-string-regexp":"^4.0.0","eslint-scope":"^7.2.2","eslint-visitor-keys":"^3.4.3",espree:"^9.6.1",esquery:"^1.4.2",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^6.0.1","find-up":"^5.0.0","glob-parent":"^6.0.2",globals:"^13.19.0",graphemer:"^1.4.0",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","is-path-inside":"^3.0.3","js-yaml":"^4.1.0","json-stable-stringify-without-jsonify":"^1.0.1",levn:"^0.4.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","strip-ansi":"^6.0.1","text-table":"^0.2.0"},devDependencies:{"@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@wdio/browser-runner":"^8.14.6","@wdio/cli":"^8.14.6","@wdio/concise-reporter":"^8.14.0","@wdio/globals":"^8.14.6","@wdio/mocha-framework":"^8.14.0","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-eslint-plugin":"^5.2.1","eslint-plugin-internal-rules":"file:tools/internal-rules","eslint-plugin-jsdoc":"^46.2.5","eslint-plugin-n":"^16.6.0","eslint-plugin-unicorn":"^49.0.0","eslint-release":"^3.2.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^7.1.6",got:"^11.8.3","gray-matter":"^4.0.3","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",markdownlint:"^0.32.0","markdownlint-cli":"^0.37.0",marked:"^4.0.8",memfs:"^3.0.1",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^8.3.2","mocha-junit-reporter":"^2.0.0","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.2",sinon:"^11.0.0","vite-plugin-commonjs":"^0.10.0",webdriverio:"^8.14.6",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},keywords:["ast","lint","javascript","ecmascript","espree"],license:"MIT",engines:{node:"^12.22.0 || ^14.17.0 || >=16.0.0"}};function Av(){if(Ov)return Sv;Ov=1;const e=/\r\n|[\r\n\u2028\u2029]/u;return Sv={breakableTypePattern:/^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/u,lineBreakPattern:e,createGlobalLinebreakMatcher:function(){return new RegExp(e.source,"gu")},shebangPattern:/^#!([^\r\n]+)/u}}function Pv(){if(wv)return Tv;wv=1;return Tv={directivesPattern:/^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u}}var kv,Dv,Rv,Iv,Lv,Bv,Mv,jv,Nv,Fv={},Uv={exports:{}};function Vv(){return kv||(kv=1,function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=f-h,w=Math.floor,C=String.fromCharCode;function A(e){throw new RangeError(O[e])}function P(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+P((e=e.replace(S,".")).split("."),t).join(".")}function D(e){for(var t=[],n=0,r=e.length;n=55296&&i<=56319&&n>1,e+=w(e/t);e>T*m>>1;r+=f)e=w(e/T);return w(r+(T+1)*e/(e+g))},M=function(e){var t=[],n=e.length,r=0,i=b,s=_,o=e.lastIndexOf(v);o<0&&(o=0);for(var a=0;a=128&&A("not-basic"),t.push(e.charCodeAt(a));for(var l=o>0?o+1:0;l=n&&A("invalid-input");var g=I(e.charCodeAt(l++));(g>=f||g>w((d-r)/u))&&A("overflow"),r+=g*u;var y=p<=s?h:p>=s+m?m:p-s;if(gw(d/E)&&A("overflow"),u*=E}var x=t.length+1;s=B(r-c,x,0==c),w(r/x)>d-i&&A("overflow"),i+=w(r/x),r%=x,t.splice(r++,0,i)}return String.fromCodePoint.apply(String,t)},j=function(e){var t=[],n=(e=D(e)).length,r=b,i=0,s=_,o=!0,a=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var p=c.value;p<128&&t.push(C(p))}}catch(e){a=!0,l=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw l}}var g=t.length,y=g;for(g&&t.push(v);y=r&&kw((d-i)/R)&&A("overflow"),i+=(E-r)*R,r=E;var I=!0,M=!1,j=void 0;try{for(var N,F=e[Symbol.iterator]();!(I=(N=F.next()).done);I=!0){var U=N.value;if(Ud&&A("overflow"),U==r){for(var V=i,K=f;;K+=f){var W=K<=s?h:K>=s+m?m:K-s;if(V>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function W(e){for(var t="",n=0,r=e.length;n=194&&i<224){if(r-n>=6){var s=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&s)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var o=parseInt(e.substr(n+4,2),16),a=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function $(e,t){function n(e){var n=W(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,K).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,K).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,K).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,K).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,K).replace(t.PCT_ENCODED,i)),e}function q(e){return e.replace(/^0*(.*)/,"$1")||"0"}function Q(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(q).join("."):e}function z(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),i=r[1],s=r[2];if(i){for(var o=i.toLowerCase().split("::").reverse(),a=u(o,2),l=a[0],c=a[1],p=c?c.split(":").map(q):[],d=l.split(":").map(q),f=t.IPV4ADDRESS.test(d[d.length-1]),h=f?7:8,m=d.length-h,g=Array(h),y=0;y1){var v=g.slice(0,_.index),E=g.slice(_.index+_.length);b=v.join(":")+"::"+E.join(":")}else b=g.join(":");return s&&(b+="%"+s),b}return e}var X=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?c:l;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(X);if(i){G?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=z(Q(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var s=V[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)$(n,r);else{if(n.host&&(t.domainHost||s&&s.domainHost))try{n.host=U.toASCII(n.host.replace(r.PCT_ENCODED,W).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}$(n,l)}s&&s.parse&&s.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function Y(e,t){var n=!1!==t.iri?c:l,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(z(Q(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}var H=/^\.\.?\//,J=/^\/\.(\/|$)/,ee=/^\/\.\.(\/|$)/,te=/^\/?(?:.|\n)*?(?=\/|$)/;function ne(e){for(var t=[];e.length;)if(e.match(H))e=e.replace(H,"");else if(e.match(J))e=e.replace(J,"/");else if(e.match(ee))e=e.replace(ee,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(te);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?c:l,r=[],i=V[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(n.PCT_ENCODED,W).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}$(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var s=Y(e,t);if(void 0!==s&&("suffix"!==t.reference&&r.push("//"),r.push(s),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var o=e.path;t.absolutePath||i&&i.absolutePath||(o=ne(o)),void 0===s&&(o=o.replace(/^\/\//,"/%2F")),r.push(o)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=Z(re(e,n),n),t=Z(re(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=ne(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=ne(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function se(e,t,n){var r=o({scheme:"null"},n);return re(ie(Z(e,r),Z(t,r),r,!0),r)}function oe(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===r(e)&&(e=Z(re(e,t),t)),e}function ae(e,t,n){return"string"==typeof e?e=re(Z(e,n),n):"object"===r(e)&&(e=re(e,n)),"string"==typeof t?t=re(Z(t,n),n):"object"===r(t)&&(t=re(t,n)),e===t}function le(e,t){return e&&e.toString().replace(t&&t.iri?c.ESCAPE:l.ESCAPE,K)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?c.PCT_ENCODED:l.PCT_ENCODED,W)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},pe={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function de(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=de(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(de(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),i=r[0],s=r[1];e.path=i&&"/"!==i?i:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},me={},ge="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",_e=n(n("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+n("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+n("%"+ye+ye)),be="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ve=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Ee="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(ge,"g"),Se=new RegExp(_e,"g"),Oe=new RegExp(t("[^]",be,"[\\.]",'[\\"]',ve),"g"),Te=new RegExp(t("[^]",ge,Ee),"g"),we=Te;function Ce(e){var t=W(e);return t.match(xe)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,s={},o=n.query.split("&"),a=0,l=o.length;a=55296&&t<=56319&&i=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var u=o,p=i.split("/"),f=0;f=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function c(e,t,n){var r=u.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function u(e,t,n){for(var r=0;r",_=f?">":"<",b=void 0;if(!d&&"number"!=typeof a&&void 0!==a)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(h+" must be number or boolean");if(g){var v=e.util.getData(m.$data,o,e.dataPathArr),E="exclusive"+s,x="exclType"+s,S="exclIsNumber"+s,O="' + "+(C="op"+s)+" + '";i+=" var schemaExcl"+s+" = "+v+"; ",i+=" var "+E+"; var "+x+" = typeof "+(v="schemaExcl"+s)+"; if ("+x+" != 'boolean' && "+x+" != 'undefined' && "+x+" != 'number') { ";var T;b=h;(T=T||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var w=i;i=T.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+x+" == 'number' ? ( ("+E+" = "+r+" === undefined || "+v+" "+y+"= "+r+") ? "+p+" "+_+"= "+v+" : "+p+" "+_+" "+r+" ) : ( ("+E+" = "+v+" === true) ? "+p+" "+_+"= "+r+" : "+p+" "+_+" "+r+" ) || "+p+" !== "+p+") { var op"+s+" = "+E+" ? '"+y+"' : '"+y+"='; ",void 0===a&&(b=h,c=e.errSchemaPath+"/"+h,r=v,d=g)}else{O=y;if((S="number"==typeof m)&&d){var C="'"+O+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+m+" "+y+"= "+r+" ? "+p+" "+_+"= "+m+" : "+p+" "+_+" "+r+" ) || "+p+" !== "+p+") { "}else{S&&void 0===a?(E=!0,b=h,c=e.errSchemaPath+"/"+h,r=m,_+="="):(S&&(r=Math[f?"min":"max"](m,a)),m===(!S||r)?(E=!0,b=h,c=e.errSchemaPath+"/"+h,_+="="):(E=!1,O+="="));C="'"+O+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+p+" "+_+" "+r+" || "+p+" !== "+p+") { "}}b=b||t,(T=T||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+C+", limit: "+r+", exclusive: "+E+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+O+" ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";w=i;return i=T.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { "),i}),LE}function gx(){return jE||(jE=1,ME=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+p+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var f=t,h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),ME}function yx(){return FE||(FE=1,NE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");var f="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+p+".length ":i+=" ucs2length("+p+") ",i+=" "+f+" "+r+") { ";var h=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),NE}function _x(){return VE||(VE=1,UE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+p+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var f=t,h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),UE}function bx(){if(ax)return ox;ax=1;var e=(sx||(sx=1,ix={$ref:(fE||(fE=1,dE=function(e,t,n){var r,i,s=" ",o=e.level,a=e.dataLevel,l=e.schema[t],c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(a||""),d="valid"+o;if("#"==l||"#/"==l)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var f=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===f){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(_=_||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),s+=" } "):s+=" {} ";var m=s;s=_.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),u&&(s+=" if (true) { ")}}else if(f.inline){var g=e.util.copy(e);g.level++;var y="valid"+g.level;g.schema=f.schema,g.schemaPath="",g.errSchemaPath=l,s+=" "+e.validate(g).replace(/validate\.schema/g,f.code)+" ",u&&(s+=" if ("+y+") { ")}else r=!0===f.$async||e.async&&!1!==f.$async,i=f.code}if(i){var _;(_=_||[]).push(s),s="",e.opts.passContext?s+=" "+i+".call(this, ":s+=" "+i+"( ",s+=" "+p+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var b=s+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData) ";if(s=_.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(s+=" var "+d+"; "),s+=" try { await "+b+"; ",u&&(s+=" "+d+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(s+=" "+d+" = false; "),s+=" } ",u&&(s+=" if ("+d+") { ")}else s+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",u&&(s+=" else { ")}return s}),dE),allOf:(mE||(mE=1,hE=function(e,t,n){var r=" ",i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),o=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,p=l.baseId,d=!0,f=i;if(f)for(var h,m=-1,g=f.length-1;m0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(d=!1,l.schema=h,l.schemaPath=s+"["+m+"]",l.errSchemaPath=o+"/"+m,r+=" "+e.validate(l)+" ",l.baseId=p,a&&(r+=" if ("+u+") { ",c+="}"));return a&&(r+=d?" if (true) { ":" "+c.slice(0,-1)+" "),r}),hE),anyOf:(yE||(yE=1,gE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e),h="";f.level++;var m="valid"+f.level,g=o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var y=f.baseId;r+=" var "+d+" = errors; var "+p+" = false; ";var _=e.compositeRule;e.compositeRule=f.compositeRule=!0;var b=o;if(b)for(var v,E=-1,x=b.length-1;E0||!1===o:e.util.schemaHasRules(o,e.RULES.all);if(r+="var "+d+" = errors;var "+p+";",b){var v=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=o,f.schemaPath=a,f.errSchemaPath=l,r+=" var "+h+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var E=u+"["+m+"]";f.dataPathArr[g]=m;var x=e.validate(f);f.baseId=_,e.util.varOccurences(x,y)<2?r+=" "+e.util.varReplace(x,y,E)+" ":r+=" var "+y+" = "+E+"; "+x+" ",r+=" if ("+h+") break; } ",e.compositeRule=f.compositeRule=v,r+=" if (!"+h+") {"}else r+=" if ("+u+".length == 0) {";var S=S||[];S.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var O=r;return r=S.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+O+"]); ":r+=" validate.errors = ["+O+"]; return false; ":r+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",b&&(r+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r}),xE),dependencies:(TE||(TE=1,OE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e),f="";d.level++;var h="valid"+d.level,m={},g={},y=e.opts.ownProperties;for(E in o)if("__proto__"!=E){var _=o[E],b=Array.isArray(_)?g:m;b[E]=_}r+="var "+p+" = errors;";var v=e.errorPath;for(var E in r+="var missing"+i+";",g)if((b=g[E]).length){if(r+=" if ( "+u+e.util.getProperty(E)+" !== undefined ",y&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(E)+"') "),c){r+=" && ( ";var x=b;if(x)for(var S=-1,O=x.length-1;S0||!1===_:e.util.schemaHasRules(_,e.RULES.all))&&(r+=" "+h+" = true; if ( "+u+e.util.getProperty(E)+" !== undefined ",y&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(E)+"') "),r+=") { ",d.schema=_,d.schemaPath=a+e.util.getProperty(E),d.errSchemaPath=l+"/"+e.util.escapeFragment(E),r+=" "+e.validate(d)+" ",d.baseId=B,r+=" } ",c&&(r+=" if ("+h+") { ",f+="}"));return c&&(r+=" "+f+" if ("+p+" == errors) {"),r}),OE),enum:(CE||(CE=1,wE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d=e.opts.$data&&o&&o.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="i"+i,h="schema"+i;d||(r+=" var "+h+" = validate.schema"+a+";"),r+="var "+p+";",d&&(r+=" if (schema"+i+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+i+")) "+p+" = false; else {"),r+=p+" = false;for (var "+f+"=0; "+f+"<"+h+".length; "+f+"++) if (equal("+u+", "+h+"["+f+"])) { "+p+" = true; break; }",d&&(r+=" } "),r+=" if (!"+p+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var g=r;return r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}),wE),format:(PE||(PE=1,AE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||"");if(!1===e.opts.format)return c&&(r+=" if (true) { "),r;var p,d=e.opts.$data&&o&&o.$data;d?(r+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+i):p=o;var f=e.opts.unknownFormats,h=Array.isArray(f);if(d)r+=" var "+(m="format"+i)+" = formats["+p+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(y="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(r+=" var async"+i+" = "+m+".async; "),r+=" "+m+" = "+m+".validate; } if ( ",d&&(r+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),r+=" (","ignore"!=f&&(r+=" ("+p+" && !"+m+" ",h&&(r+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),r+=") || "),r+=" ("+m+" && "+y+" == '"+n+"' && !(typeof "+m+" == 'function' ? ",e.async?r+=" (async"+i+" ? await "+m+"("+u+") : "+m+"("+u+")) ":r+=" "+m+"("+u+") ",r+=" : "+m+".test("+u+"))))) {";else{var m;if(!(m=e.formats[o])){if("ignore"==f)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(r+=" if (true) { "),r;if(h&&f.indexOf(o)>=0)return c&&(r+=" if (true) { "),r;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,y=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var _=!0===m.async;m=m.validate}if(y!=n)return c&&(r+=" if (true) { "),r;if(_){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(b="formats"+e.util.getProperty(o)+".validate")+"("+u+"))) { "}else{r+=" if (! ";var b="formats"+e.util.getProperty(o);g&&(b+=".validate"),r+="function"==typeof m?" "+b+"("+u+") ":" "+b+".test("+u+") ",r+=") { "}}var v=v||[];v.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",r+=d?""+p:""+e.util.toQuotedString(o),r+=" } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=d?"' + "+p+" + '":""+e.util.escapeQuotes(o),r+="\"' "),e.opts.verbose&&(r+=" , schema: ",r+=d?"validate.schema"+a:""+e.util.toQuotedString(o),r+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var E=r;return r=v.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r}),AE),if:(DE||(DE=1,kE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e);f.level++;var h="valid"+f.level,m=e.schema.then,g=e.schema.else,y=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),_=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=f.baseId;if(y||_){var v;f.createErrors=!1,f.schema=o,f.schemaPath=a,f.errSchemaPath=l,r+=" var "+d+" = errors; var "+p+" = true; ";var E=e.compositeRule;e.compositeRule=f.compositeRule=!0,r+=" "+e.validate(f)+" ",f.baseId=b,f.createErrors=!0,r+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=f.compositeRule=E,y?(r+=" if ("+h+") { ",f.schema=e.schema.then,f.schemaPath=e.schemaPath+".then",f.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(f)+" ",f.baseId=b,r+=" "+p+" = "+h+"; ",y&&_?r+=" var "+(v="ifClause"+i)+" = 'then'; ":v="'then'",r+=" } ",_&&(r+=" else { ")):r+=" if (!"+h+") { ",_&&(f.schema=e.schema.else,f.schemaPath=e.schemaPath+".else",f.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(f)+" ",f.baseId=b,r+=" "+p+" = "+h+"; ",y&&_?r+=" var "+(v="ifClause"+i)+" = 'else'; ":v="'else'",r+=" } "),r+=" if (!"+p+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+v+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+v+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",c&&(r+=" else { ")}else c&&(r+=" if (true) { ");return r}),kE),items:(IE||(IE=1,RE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e),h="";f.level++;var m="valid"+f.level,g="i"+i,y=f.dataLevel=e.dataLevel+1,_="data"+y,b=e.baseId;if(r+="var "+d+" = errors;var "+p+";",Array.isArray(o)){var v=e.schema.additionalItems;if(!1===v){r+=" "+p+" = "+u+".length <= "+o.length+"; ";var E=l;l=e.errSchemaPath+"/additionalItems",r+=" if (!"+p+") { ";var x=x||[];x.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var S=r;r=x.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+S+"]); ":r+=" validate.errors = ["+S+"]; return false; ":r+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",l=E,c&&(h+="}",r+=" else { ")}var O=o;if(O)for(var T,w=-1,C=O.length-1;w0||!1===T:e.util.schemaHasRules(T,e.RULES.all)){r+=" "+m+" = true; if ("+u+".length > "+w+") { ";var A=u+"["+w+"]";f.schema=T,f.schemaPath=a+"["+w+"]",f.errSchemaPath=l+"/"+w,f.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0),f.dataPathArr[y]=w;var P=e.validate(f);f.baseId=b,e.util.varOccurences(P,_)<2?r+=" "+e.util.varReplace(P,_,A)+" ":r+=" var "+_+" = "+A+"; "+P+" ",r+=" } ",c&&(r+=" if ("+m+") { ",h+="}")}"object"==typeof v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all))&&(f.schema=v,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+m+" = true; if ("+u+".length > "+o.length+") { for (var "+g+" = "+o.length+"; "+g+" < "+u+".length; "+g+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0),A=u+"["+g+"]",f.dataPathArr[y]=g,P=e.validate(f),f.baseId=b,e.util.varOccurences(P,_)<2?r+=" "+e.util.varReplace(P,_,A)+" ":r+=" var "+_+" = "+A+"; "+P+" ",c&&(r+=" if (!"+m+") break; "),r+=" } } ",c&&(r+=" if ("+m+") { ",h+="}"))}else(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all))&&(f.schema=o,f.schemaPath=a,f.errSchemaPath=l,r+=" for (var "+g+" = 0; "+g+" < "+u+".length; "+g+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0),A=u+"["+g+"]",f.dataPathArr[y]=g,P=e.validate(f),f.baseId=b,e.util.varOccurences(P,_)<2?r+=" "+e.util.varReplace(P,_,A)+" ":r+=" var "+_+" = "+A+"; "+P+" ",c&&(r+=" if (!"+m+") break; "),r+=" }");return c&&(r+=" "+h+" if ("+d+" == errors) {"),r}),RE),maximum:mx(),minimum:mx(),maxItems:gx(),minItems:gx(),maxLength:yx(),minLength:yx(),maxProperties:_x(),minProperties:_x(),multipleOf:(WE||(WE=1,KE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");i+="var division"+s+";if (",d&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+s+" = "+p+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+s+" !== parseInt(division"+s+") ",i+=" ) ",d&&(i+=" ) "),i+=" ) { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var h=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),KE),not:(qE||(qE=1,$E=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=a,d.errSchemaPath=l,r+=" var "+p+" = errors; ";var h,m=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(h=d.opts.allErrors,d.opts.allErrors=!1),r+=" "+e.validate(d)+" ",d.createErrors=!0,h&&(d.opts.allErrors=h),e.compositeRule=d.compositeRule=m,r+=" if ("+f+") { ";var g=g||[];g.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var y=r;r=g.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+y+"]); ":r+=" validate.errors = ["+y+"]; return false; ":r+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}),$E),oneOf:(zE||(zE=1,QE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e),h="";f.level++;var m="valid"+f.level,g=f.baseId,y="prevValid"+i,_="passingSchemas"+i;r+="var "+d+" = errors , "+y+" = false , "+p+" = false , "+_+" = null; ";var b=e.compositeRule;e.compositeRule=f.compositeRule=!0;var v=o;if(v)for(var E,x=-1,S=v.length-1;x0||!1===E:e.util.schemaHasRules(E,e.RULES.all))?(f.schema=E,f.schemaPath=a+"["+x+"]",f.errSchemaPath=l+"/"+x,r+=" "+e.validate(f)+" ",f.baseId=g):r+=" var "+m+" = true; ",x&&(r+=" if ("+m+" && "+y+") { "+p+" = false; "+_+" = ["+_+", "+x+"]; } else { ",h+="}"),r+=" if ("+m+") { "+p+" = "+y+" = true; "+_+" = "+x+"; }";return e.compositeRule=f.compositeRule=b,r+=h+"if (!"+p+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+_+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r}),QE),pattern:(GE||(GE=1,XE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(d?"(new RegExp("+r+"))":e.usePattern(a))+".test("+p+") ) { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",i+=d?""+r:""+e.util.toQuotedString(a),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=d?"' + "+r+" + '":""+e.util.escapeQuotes(a),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var h=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),XE),properties:(YE||(YE=1,ZE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e),f="";d.level++;var h="valid"+d.level,m="key"+i,g="idx"+i,y=d.dataLevel=e.dataLevel+1,_="data"+y,b="dataProperties"+i,v=Object.keys(o||{}).filter(I),E=e.schema.patternProperties||{},x=Object.keys(E).filter(I),S=e.schema.additionalProperties,O=v.length||x.length,T=!1===S,w="object"==typeof S&&Object.keys(S).length,C=e.opts.removeAdditional,A=T||w||C,P=e.opts.ownProperties,k=e.baseId,D=e.schema.required;if(D&&(!e.opts.$data||!D.$data)&&D.length8)r+=" || validate.schema"+a+".hasOwnProperty("+m+") ";else{var L=v;if(L)for(var B=-1,M=L.length-1;B0||!1===H:e.util.schemaHasRules(H,e.RULES.all)){var J=e.util.getProperty(G),ee=(q=u+J,z&&void 0!==H.default);if(d.schema=H,d.schemaPath=a+J,d.errSchemaPath=l+"/"+e.util.escapeFragment(G),d.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),d.dataPathArr[y]=e.util.toQuotedString(G),Q=e.validate(d),d.baseId=k,e.util.varOccurences(Q,_)<2){Q=e.util.varReplace(Q,_,q);var te=q}else te=_,r+=" var "+_+" = "+q+"; ";if(ee)r+=" "+Q+" ";else{if(R&&R[G]){r+=" if ( "+te+" === undefined ",P&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),r+=") { "+h+" = false; ",U=e.errorPath,K=l;var ne,re=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(U,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(ne=ne||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+re+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+re+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",W=r,r=ne.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+W+"]); ":r+=" validate.errors = ["+W+"]; return false; ":r+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=K,e.errorPath=U,r+=" } else { "}else c?(r+=" if ( "+te+" === undefined ",P&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),r+=") { "+h+" = true; } else { "):(r+=" if ("+te+" !== undefined ",P&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),r+=" ) { ");r+=" "+Q+" } "}}c&&(r+=" if ("+h+") { ",f+="}")}}if(x.length){var ie=x;if(ie)for(var se,oe=-1,ae=ie.length-1;oe0||!1===H:e.util.schemaHasRules(H,e.RULES.all))&&(d.schema=H,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(se),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(se),r+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+u+") { ",r+=" if ("+e.usePattern(se)+".test("+m+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers),q=u+"["+m+"]",d.dataPathArr[y]=m,Q=e.validate(d),d.baseId=k,e.util.varOccurences(Q,_)<2?r+=" "+e.util.varReplace(Q,_,q)+" ":r+=" var "+_+" = "+q+"; "+Q+" ",c&&(r+=" if (!"+h+") break; "),r+=" } ",c&&(r+=" else "+h+" = true; "),r+=" } ",c&&(r+=" if ("+h+") { ",f+="}"))}return c&&(r+=" "+f+" if ("+p+" == errors) {"),r}),ZE),propertyNames:(JE||(JE=1,HE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(r+="var "+p+" = errors;",e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=a,d.errSchemaPath=l;var h="key"+i,m="idx"+i,g="i"+i,y="' + "+h+" + '",_="data"+(d.dataLevel=e.dataLevel+1),b="dataProperties"+i,v=e.opts.ownProperties,E=e.baseId;v&&(r+=" var "+b+" = undefined; "),r+=v?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+h+" = "+b+"["+m+"]; ":" for (var "+h+" in "+u+") { ",r+=" var startErrs"+i+" = errors; ";var x=h,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var O=e.validate(d);d.baseId=E,e.util.varOccurences(O,_)<2?r+=" "+e.util.varReplace(O,_,x)+" ":r+=" var "+_+" = "+x+"; "+O+" ",e.compositeRule=d.compositeRule=S,r+=" if (!"+f+") { for (var "+g+"=startErrs"+i+"; "+g+"0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=g)}}else h=o;if(d||h.length){var v=e.errorPath,E=d||h.length>=e.opts.loopRequired,x=e.opts.ownProperties;if(c)if(r+=" var missing"+i+"; ",E){d||(r+=" var "+f+" = validate.schema"+a+"; ");var S="' + "+(P="schema"+i+"["+(C="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(v,P,e.opts.jsonPointers)),r+=" var "+p+" = true; ",d&&(r+=" if (schema"+i+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+i+")) "+p+" = false; else {"),r+=" for (var "+C+" = 0; "+C+" < "+f+".length; "+C+"++) { "+p+" = "+u+"["+f+"["+C+"]] !== undefined ",x&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+C+"]) "),r+="; if (!"+p+") break; } ",d&&(r+=" } "),r+=" if (!"+p+") { ",(T=T||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+S+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var O=r;r=T.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+O+"]); ":r+=" validate.errors = ["+O+"]; return false; ":r+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var T,w=h;if(w)for(var C=-1,A=w.length-1;C 1) { ";var h=e.schema.items&&e.schema.items.type,m=Array.isArray(h);if(!h||"object"==h||"array"==h||m&&(h.indexOf("object")>=0||h.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+d+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](h,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",f&&(i+=" } "),i+=" if (!"+d+") { ";var y=y||[];y.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var _=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { ")}else u&&(i+=" if (true) { ");return i}),nx),validate:aE()}),ix),t=Wv().toHash;return ox=function(){var n=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],r=["type","$comment"];return n.all=t(r),n.types=t(["number","integer","string","array","object","boolean","null"]),n.forEach((function(t){t.rules=t.rules.map((function(t){var i;if("object"==typeof t){var s=Object.keys(t)[0];i=t[s],t=s,i.forEach((function(e){r.push(e),n.all[e]=!0}))}return r.push(t),n.all[t]={keyword:t,code:e[t],implements:i}})),n.all.$comment={keyword:"$comment",code:e.$comment},t.type&&(n.types[t.type]=t)})),n.keywords=t(r.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),n.custom={},n},ox}function vx(){if(px)return ux;px=1;var e=sE().MissingRef;return ux=function t(n,r,i){var s=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(i=r,r=void 0);var o=a(n).then((function(){var e=s._addSchema(n,void 0,r);return e.validate||l(e)}));i&&o.then((function(e){i(null,e)}),i);return o;function a(e){var n=e.$schema;return n&&!s.getSchema(n)?t.call(s,{$ref:n},!0):Promise.resolve()}function l(t){try{return s._compile(t)}catch(n){if(n instanceof e)return function(e){var n=e.missingSchema;if(c(n))throw new Error("Schema "+n+" is loaded but "+e.missingRef+" cannot be resolved");var i=s._loadingSchemas[n];i||(i=s._loadingSchemas[n]=s._opts.loadSchema(n)).then(o,o);return i.then((function(e){if(!c(n))return a(e).then((function(){c(n)||s.addSchema(e,n,void 0,r)}))})).then((function(){return l(t)}));function o(){delete s._loadingSchemas[n]}function c(e){return s._refs[e]||s._schemas[e]}}(n);throw n}}},ux}var Ex,xx,Sx,Ox,Tx={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};function wx(){if(Ox)return Sx;Ox=1;var e=/^[a-z_$][a-z0-9_$-]*$/i,t=(fx||(fx=1,dx=function(e,t,n){var r,i,s=" ",o=e.level,a=e.dataLevel,l=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,d="data"+(a||""),f="valid"+o,h="errs__"+o,m=e.opts.$data&&l&&l.$data;m?(s+=" var schema"+o+" = "+e.util.getData(l.$data,a,e.dataPathArr)+"; ",i="schema"+o):i=l;var g,y,_,b,v,E=this,x="definition"+o,S=E.definition,O="";if(m&&S.$data){v="keywordValidate"+o;var T=S.validateSchema;s+=" var "+x+" = RULES.custom['"+t+"'].definition; var "+v+" = "+x+".validate;"}else{if(!(b=e.useCustomRule(E,l,e.schema,e)))return;i="validate.schema"+c,v=b.code,g=S.compile,y=S.inline,_=S.macro}var w=v+".errors",C="i"+o,A="ruleErr"+o,P=S.async;if(P&&!e.async)throw new Error("async keyword in sync schema");if(y||_||(s+=w+" = null;"),s+="var "+h+" = errors;var "+f+";",m&&S.$data&&(O+="}",s+=" if ("+i+" === undefined) { "+f+" = true; } else { ",T&&(O+="}",s+=" "+f+" = "+x+".validateSchema("+i+"); if ("+f+") { ")),y)S.statements?s+=" "+b.validate+" ":s+=" "+f+" = "+b.validate+"; ";else if(_){var k=e.util.copy(e);O="",k.level++;var D="valid"+k.level;k.schema=b.validate,k.schemaPath="";var R=e.compositeRule;e.compositeRule=k.compositeRule=!0;var I=e.validate(k).replace(/validate\.schema/g,v);e.compositeRule=k.compositeRule=R,s+=" "+I}else{(j=j||[]).push(s),s="",s+=" "+v+".call( ",e.opts.passContext?s+="this":s+="self",g||!1===S.schema?s+=" , "+d+" ":s+=" , "+i+" , "+d+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var L=a?"data"+(a-1||""):"parentData",B=a?e.dataPathArr[a]:"parentDataProperty",M=s+=" , "+L+" , "+B+" , rootData ) ";s=j.pop(),!1===S.errors?(s+=" "+f+" = ",P&&(s+="await "),s+=M+"; "):s+=P?" var "+(w="customErrors"+o)+" = null; try { "+f+" = await "+M+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+w+" = e.errors; else throw e; } ":" "+w+" = null; "+f+" = "+M+"; "}if(S.modifying&&(s+=" if ("+L+") "+d+" = "+L+"["+B+"];"),s+=""+O,S.valid)p&&(s+=" if (true) { ");else{var j;s+=" if ( ",void 0===S.valid?(s+=" !",s+=_?""+D:""+f):s+=" "+!S.valid+" ",s+=") { ",r=E.keyword,(j=j||[]).push(s),s="",(j=j||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),s+=" } "):s+=" {} ";var N=s;s=j.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+N+"]); ":s+=" validate.errors = ["+N+"]; return false; ":s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var F=s;s=j.pop(),y?S.errors?"full"!=S.errors&&(s+=" for (var "+C+"="+h+"; "+C+"%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,a=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,l=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,c=/^(?:\/(?:[^~/]|~0|~1)*)*$/,u=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function d(t){return t="full"==t?"full":"fast",e.copy(d[t])}function f(e){var r=e.match(t);if(!r)return!1;var i=+r[1],s=+r[2],o=+r[3];return s>=1&&s<=12&&o>=1&&o<=(2==s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(i)?29:n[s])}function h(e,t){var n=e.match(r);if(!n)return!1;var i=n[1],s=n[2],o=n[3],a=n[5];return(i<=23&&s<=59&&o<=59||23==i&&59==s&&60==o)&&(!t||a)}uE=d,d.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":o,url:a,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:_,uuid:l,"json-pointer":c,"json-pointer-uri-fragment":u,"relative-json-pointer":p},d.full={date:f,time:h,"date-time":function(e){var t=e.split(m);return 2==t.length&&f(t[0])&&h(t[1],!0)},uri:function(e){return g.test(e)&&s.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":o,url:a,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:_,uuid:l,"json-pointer":c,"json-pointer-uri-fragment":u,"relative-json-pointer":p};var m=/t|\s/i,g=/\/|:/,y=/[^\\]\\Z/;function _(e){if(y.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}return uE}(),o=bx(),a=function(){if(cx)return lx;cx=1;var e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return lx=function(t,n){for(var r=0;r(e[t]=n,e)),{}),p=[0,1,2,"off","warn","error"];function d(e){const t=Array.isArray(e)?e[0]:e;return 0===t||1===t||2===t?t:"string"==typeof t&&u[t.toLowerCase()]||0}function f(e){let t=Array.isArray(e)?e[0]:e;return"string"==typeof t&&(t=t.toLowerCase()),-1!==p.indexOf(t)}function h(e){switch(e){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${e}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var m={__proto__:null,getRuleSeverity:d,normalizeToStrings:function(e){e.rules&&Object.keys(e.rules).forEach((t=>{const n=e.rules[t];"number"==typeof n?e.rules[t]=c[n]||c[0]:Array.isArray(n)&&"number"==typeof n[0]&&(n[0]=c[n[0]]||c[0])}))},isErrorSeverity:function(e){return 2===d(e)},isValidSeverity:f,isEverySeverityValid:function(e){return Object.keys(e).every((t=>f(e[t])))},normalizeConfigGlobal:h};const g={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},y=new Set;const _={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};const b={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},v={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...b},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...b},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};const E=function(e,t){const n={};for(const[r,i]of Object.entries(e))Object.hasOwnProperty.call(t,r)||(n[r]=i);return n}(l.default.es2015,l.default.es5),x={Atomics:!1,SharedArrayBuffer:!1},S={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},O={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var T=new Map(Object.entries({builtin:{globals:l.default.es5},es6:{globals:E,parserOptions:{ecmaVersion:6}},es2015:{globals:E,parserOptions:{ecmaVersion:6}},es2016:{globals:E,parserOptions:{ecmaVersion:7}},es2017:{globals:{...E,...x},parserOptions:{ecmaVersion:8}},es2018:{globals:{...E,...x},parserOptions:{ecmaVersion:9}},es2019:{globals:{...E,...x},parserOptions:{ecmaVersion:10}},es2020:{globals:{...E,...x,...S},parserOptions:{ecmaVersion:11}},es2021:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:12}},es2022:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:13}},es2023:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:14}},es2024:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:15}},browser:{globals:l.default.browser},node:{globals:l.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:l.default["shared-node-browser"]},worker:{globals:l.default.worker},serviceworker:{globals:l.default.serviceworker},commonjs:{globals:l.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:l.default.amd},mocha:{globals:l.default.mocha},jasmine:{globals:l.default.jasmine},jest:{globals:l.default.jest},phantomjs:{globals:l.default.phantomjs},jquery:{globals:l.default.jquery},qunit:{globals:l.default.qunit},prototypejs:{globals:l.default.prototypejs},shelljs:{globals:l.default.shelljs},meteor:{globals:l.default.meteor},mongo:{globals:l.default.mongo},protractor:{globals:l.default.protractor},applescript:{globals:l.default.applescript},nashorn:{globals:l.default.nashorn},atomtest:{globals:l.default.atomtest},embertest:{globals:l.default.embertest},webextensions:{globals:l.default.webextensions},greasemonkey:{globals:l.default.greasemonkey}}));const w=((e={})=>{const t=new a.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...e});return t.addMetaSchema(_),t._opts.defaultMeta=_.id,t})(),C=new WeakMap,A=Function.prototype;let P;const k={error:2,warn:1,off:0},D=new WeakSet;const R=/^@.*\//iu;var I={__proto__:null,normalizePackageName:function(e,t){let n=e;if(n.includes("\\")&&(n=n.replace(/\\/gu,"/")),"@"===n.charAt(0)){const e=new RegExp(`^(@[^/]+)(?:/(?:${t})?)?$`,"u"),r=new RegExp(`^${t}(-|$)`,"u");e.test(n)?n=n.replace(e,`$1/${t}`):r.test(n.split("/")[1])||(n=n.replace(/^@([^/]+)\/(.*)$/u,`@$1/${t}-$2`))}else n.startsWith(`${t}-`)||(n=`${t}-${n}`);return n},getShorthandName:function(e,t){if("@"===e[0]){let n=new RegExp(`^(@[^/]+)/${t}$`,"u").exec(e);if(n)return n[1];if(n=new RegExp(`^(@[^/]+)/${t}-(.+)$`,"u").exec(e),n)return`${n[1]}/${n[2]}`}else if(e.startsWith(`${t}-`))return e.slice(t.length+1);return e},getNamespaceFromTerm:function(e){const t=e.match(R);return t?t[0]:""}};const L={environments:T,ConfigOps:m,ConfigValidator:class{constructor({builtInRules:e=new Map}={}){this.builtInRules=e}getRuleOptionsSchema(e){if(!e)return null;const t=e.schema||e.meta&&e.meta.schema;return Array.isArray(t)?t.length?{type:"array",items:t,minItems:0,maxItems:t.length}:{type:"array",minItems:0,maxItems:0}:t||null}validateRuleSeverity(e){const t=Array.isArray(e)?e[0]:e,n="string"==typeof t?k[t.toLowerCase()]:t;if(0===n||1===n||2===n)return n;throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${s.default.inspect(t).replace(/'/gu,'"').replace(/\n/gu,"")}').\n`)}validateRuleSchema(e,t){if(!C.has(e)){const t=this.getRuleOptionsSchema(e);t&&C.set(e,w.compile(t))}const n=C.get(e);if(n&&(n(t),n.errors))throw new Error(n.errors.map((e=>`\tValue ${JSON.stringify(e.data)} ${e.message}.\n`)).join(""))}validateRuleOptions(e,t,n,r=null){try{0!==this.validateRuleSeverity(n)&&this.validateRuleSchema(e,Array.isArray(n)?n.slice(1):[])}catch(e){const n=`Configuration for rule "${t}" is invalid:\n${e.message}`;throw"string"==typeof r?new Error(`${r}:\n\t${n}`):new Error(n)}}validateEnvironment(e,t,n=A){e&&Object.keys(e).forEach((e=>{if(!(n(e)||T.get(e)||null)){throw new Error(`${t}:\n\tEnvironment key "${e}" is unknown\n`)}}))}validateRules(e,t,n=A){e&&Object.keys(e).forEach((r=>{const i=n(r)||this.builtInRules.get(r)||null;this.validateRuleOptions(i,r,e[r],t)}))}validateGlobals(e,t=null){e&&Object.entries(e).forEach((([e,n])=>{try{h(n)}catch(n){throw new Error(`ESLint configuration of global '${e}' in ${t} is invalid:\n${n.message}`)}}))}validateProcessor(e,t,n){if(e&&!n(e))throw new Error(`ESLint configuration of processor in '${t}' is invalid: '${e}' was not found.`)}formatErrors(e){return e.map((e=>{if("additionalProperties"===e.keyword){return`Unexpected top-level property "${e.dataPath.length?`${e.dataPath.slice(1)}.${e.params.additionalProperty}`:e.params.additionalProperty}"`}if("type"===e.keyword){return`Property "${e.dataPath.slice(1)}" is the wrong type (expected ${Array.isArray(e.schema)?e.schema.join("/"):e.schema} but got \`${JSON.stringify(e.data)}\`)`}return`"${"."===e.dataPath[0]?e.dataPath.slice(1):e.dataPath}" ${e.message}. Value: ${JSON.stringify(e.data)}`})).map((e=>`\t- ${e}.\n`)).join("")}validateConfigSchema(e,t=null){if(P=P||w.compile(v),!P(e))throw new Error(`ESLint configuration in ${t} is invalid:\n${this.formatErrors(P.errors)}`);Object.hasOwnProperty.call(e,"ecmaFeatures")&&function(e,t){const n=JSON.stringify({source:e,errorCode:t});if(y.has(n))return;y.add(n);const r=o.default.relative(by.cwd(),e),i=g[t];by.emitWarning(`${i} (found in "${r}")`,"DeprecationWarning",t)}(t,"ESLINT_LEGACY_ECMAFEATURES")}validate(e,t,n,r){this.validateConfigSchema(e,t),this.validateRules(e.rules,t,n),this.validateEnvironment(e.env,t,r),this.validateGlobals(e.globals,t);for(const i of e.overrides||[])this.validateRules(i.rules,t,n),this.validateEnvironment(i.env,t,r),this.validateGlobals(e.globals,t)}validateConfigArray(e){const t=Map.prototype.get.bind(e.pluginEnvironments),n=Map.prototype.get.bind(e.pluginProcessors),r=Map.prototype.get.bind(e.pluginRules);for(const i of e)D.has(i)||(D.add(i),this.validateEnvironment(i.env,i.name,t),this.validateGlobals(i.globals,i.name),this.validateProcessor(i.processor,i.name,n),this.validateRules(i.rules,i.name,r))}},naming:I};return Fv.Legacy=L,Fv}var jx,Nx,Fx,Ux,Vx,Kx={exports:{}},Wx={exports:{}};function $x(){if(Nx)return jx;Nx=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,s=365.25*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return jx=function(a,l){l=l||{};var c=typeof a;if("string"===c&&a.length>0)return function(o){if((o=String(o)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!a)return;var l=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(a);if("number"===c&&isFinite(a))return l.long?function(i){var s=Math.abs(i);if(s>=r)return o(i,s,r,"day");if(s>=n)return o(i,s,n,"hour");if(s>=t)return o(i,s,t,"minute");if(s>=e)return o(i,s,e,"second");return i+" ms"}(a):function(i){var s=Math.abs(i);if(s>=r)return Math.round(i/r)+"d";if(s>=n)return Math.round(i/n)+"h";if(s>=t)return Math.round(i/t)+"m";if(s>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},jx}function qx(){if(Ux)return Fx;return Ux=1,Fx=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(43683);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys({NODE_ENV:"production",PUBLIC_PATH:"/designer/"}).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r={NODE_ENV:"production",PUBLIC_PATH:"/designer/"}[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=qx()(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(Qx,Qx.exports)),Qx.exports}function Jx(){return Xx||(Xx=1,void 0===by||"renderer"===by.type||!0===by.browser||by.__nwjs?Kx.exports=(Vx||(Vx=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==by&&"env"in by&&(e={NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=qx()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Wx,Wx.exports)),Wx.exports):Kx.exports=Hx()),Kx.exports}function eS(){if(Zx)return Gx;Zx=1;const e=lv(),t=Jx()("eslint:traverser");function n(){}class r{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(t,r){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=r.visitorKeys||e.KEYS,this._enter=r.enter||n,this._leave=r.leave||n,this._traverse(t,null)}_traverse(n,r){if(function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}(n)){if(this._current=n,this._skipped=!1,this._enter(n,r),!this._skipped&&!this._broken){const r=function(n,r){let i=n[r.type];return i||(i=e.getKeys(r),t('Unknown node type "%s": Estimated visitor keys %j',r.type,i)),i}(this._visitorKeys,n);if(r.length>=1){this._parents.push(n);for(let e=0;e")}function l(e){return o(e,",")}function c(e){return o(e,";")}function u(e){return o(e,":")}function p(e){return o(e,"(")}function d(e){return o(e,")")}function f(e){return o(e,"[")}function h(e){return o(e,"]")}function m(e){return o(e,"{")}function g(e){return o(e,"}")}function y(e){return["Block","Line","Shebang"].includes(e.type)}const _=s(a),b=s(l),v=s(c),E=s(u),x=s(p),S=s(d),O=s(f),T=s(h),w=s(m),C=s(g),A=s(y);function P(e,t){return e.id?t.getTokenAfter(e.id,p):t.getFirstToken(e,p)}function k(e,t){const n=e.parent;let r=null,i=null;if("ArrowFunctionExpression"===e.type){const n=t.getTokenBefore(e.body,a);r=n.loc.start,i=n.loc.end}else"Property"===n.type||"MethodDefinition"===n.type||"PropertyDefinition"===n.type?(r=n.loc.start,i=P(e,t).loc.start):(r=e.loc.start,i=P(e,t).loc.start);return{start:{...r},end:{...i}}}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==vy?vy:{},R=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),I=new Set([Array.isArray,"function"==typeof BigInt?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map((e=>Math[e])).filter((e=>"function"==typeof e)),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter((e=>"function"==typeof e))),L=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function B(e,t){const n=function(e,t){let n=e;for(;("object"==typeof n||"function"==typeof n)&&null!==n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}return null}(e,t);return null!=n&&null!=n.get}function M(e,t){const n=[];for(let r=0;r":return{value:n.value>r.value};case">=":return{value:n.value>=r.value};case"<<":return{value:n.value<>":return{value:n.value>>r.value};case">>>":return{value:n.value>>>r.value};case"+":return{value:n.value+r.value};case"-":return{value:n.value-r.value};case"*":return{value:n.value*r.value};case"/":return{value:n.value/r.value};case"%":return{value:n.value%r.value};case"**":return{value:n.value**r.value};case"|":return{value:n.value|r.value};case"^":return{value:n.value^r.value};case"&":return{value:n.value&r.value}}return null},CallExpression(e,t){const n=e.callee,r=M(e.arguments,t);if(null!=r)if("MemberExpression"===n.type){if("PrivateIdentifier"===n.property.type)return null;const i=N(n.object,t);if(null!=i){if(null==i.value&&(i.optional||e.optional))return{value:void 0,optional:!0};const s=F(n,t);if(null!=s){const e=i.value,t=s.value;if(I.has(e[t]))return{value:e[t](...r)};if(L.has(e[t]))return{value:r[0]}}}}else{const i=N(n,t);if(null!=i){if(null==i.value&&e.optional)return{value:void 0,optional:!0};const t=i.value;if(I.has(t))return{value:t(...r)};if(L.has(t))return{value:r[0]}}}return null},ConditionalExpression(e,t){const n=N(e.test,t);return null!=n?n.value?N(e.consequent,t):N(e.alternate,t):null},ExpressionStatement(e,t){return N(e.expression,t)},Identifier(e,t){if(null!=t){const n=r(t,e);if(null!=n&&0===n.defs.length&&R.has(n.name)&&n.name in D)return{value:D[n.name]};if(null!=n&&1===n.defs.length){const e=n.defs[0];if(e.parent&&"const"===e.parent.kind&&"Identifier"===e.node.id.type)return N(e.node.init,t)}}return null},Literal(e){return null==e.regex&&null==e.bigint||null!=e.value?{value:e.value}:null},LogicalExpression(e,t){const n=N(e.left,t);if(null!=n){if("||"===e.operator&&!0===Boolean(n.value)||"&&"===e.operator&&!1===Boolean(n.value)||"??"===e.operator&&null!=n.value)return n;const r=N(e.right,t);if(null!=r)return r}return null},MemberExpression(e,t){if("PrivateIdentifier"===e.property.type)return null;const n=N(e.object,t);if(null!=n){if(null==n.value&&(n.optional||e.optional))return{value:void 0,optional:!0};const r=F(e,t);if(null!=r&&!B(n.value,r.value))return{value:n.value[r.value]}}return null},ChainExpression(e,t){const n=N(e.expression,t);return null!=n?{value:n.value}:null},NewExpression(e,t){const n=N(e.callee,t),r=M(e.arguments,t);if(null!=n&&null!=r){const e=n.value;if(I.has(e))return{value:new e(...r)}}return null},ObjectExpression(e,t){const n={};for(const r of e.properties)if("Property"===r.type){if("init"!==r.kind)return null;const e=F(r,t),i=N(r.value,t);if(null==e||null==i)return null;n[e.value]=i.value}else{if("SpreadElement"!==r.type&&"ExperimentalSpreadProperty"!==r.type)return null;{const e=N(r.argument,t);if(null==e)return null;Object.assign(n,e.value)}}return{value:n}},SequenceExpression(e,t){return N(e.expressions[e.expressions.length-1],t)},TaggedTemplateExpression(e,t){const n=N(e.tag,t),r=M(e.quasi.expressions,t);if(null!=n&&null!=r){const t=n.value,i=e.quasi.quasis.map((e=>e.value.cooked));if(i.raw=e.quasi.quasis.map((e=>e.value.raw)),t===String.raw)return{value:t(i,...r)}}return null},TemplateLiteral(e,t){const n=M(e.expressions,t);if(null!=n){let t=e.quasis[0].value.cooked;for(let r=0;r",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),q=Object.freeze(new Set(["-","+","!","~"]));function Q(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}const z=Object.freeze(Object.assign(Object.create(null),{$visit(e,t,n){const{type:r}=e;return"function"==typeof this[r]?this[r](e,t,n):this.$visitChildren(e,t,n)},$visitChildren(e,n,r){const{type:i}=e;for(const s of r[i]||t.getKeys(e)){const t=e[s];if(Array.isArray(t)){for(const e of t)if(Q(e)&&this.$visit(e,n,r))return!0}else if(Q(t)&&this.$visit(t,n,r))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(e,t,n){return!(!t.considerImplicitTypeConversion||!$.has(e.operator)||"Literal"===e.left.type&&"Literal"===e.right.type)||this.$visitChildren(e,t,n)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(e,t,n){return!!t.considerGetters||(!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.property.type)||this.$visitChildren(e,t,n))},MethodDefinition(e,t,n){return!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.key.type)||this.$visitChildren(e,t,n)},NewExpression(){return!0},Property(e,t,n){return!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.key.type)||this.$visitChildren(e,t,n)},PropertyDefinition(e,t,n){return!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.key.type)||this.$visitChildren(e,t,n)},UnaryExpression(e,t,n){return"delete"===e.operator||(!(!t.considerImplicitTypeConversion||!q.has(e.operator)||"Literal"===e.argument.type)||this.$visitChildren(e,t,n))},UpdateExpression(){return!0},YieldExpression(){return!0}}));function X(e,n,{considerGetters:r=!1,considerImplicitTypeConversion:i=!1}={}){return z.$visit(e,{considerGetters:r,considerImplicitTypeConversion:i},n.visitorKeys||t.KEYS)}function G(e,t){const n=e.parent;switch(n.type){case"CallExpression":case"NewExpression":return 1===n.arguments.length&&n.arguments[0]===e?t.getTokenAfter(n.callee,p):null;case"DoWhileStatement":return n.test===e?t.getTokenAfter(n.body,p):null;case"IfStatement":case"WhileStatement":return n.test===e?t.getFirstToken(n,1):null;case"ImportExpression":return n.source===e?t.getFirstToken(n,1):null;case"SwitchStatement":return n.discriminant===e?t.getFirstToken(n,1):null;case"WithStatement":return n.object===e?t.getFirstToken(n,1):null;default:return null}}function Z(e,t,n){let r,i,s,o,a;if("number"==typeof e){if(r=0|e,i=t,s=n,!(r>=1))throw new TypeError("'times' should be a positive integer.")}else r=1,i=e,s=t;if(null==i||null==i.parent||"CatchClause"===i.parent.type&&i.parent.param===i)return!1;o=a=i;do{o=s.getTokenBefore(o),a=s.getTokenAfter(a)}while(null!=o&&null!=a&&p(o)&&d(a)&&o!==G(i,s)&&--r>0);return 0===r}const Y=/\$(?:[$&`']|[1-9][0-9]?)/gu,H=new WeakMap;function J(e,t){let n=!1;for(let r=t-1;r>=0&&92===e.charCodeAt(r);--r)n=!n;return n}class ee{constructor(e,{escaped:t=!1}={}){if(!(e instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!e.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");H.set(this,{pattern:new RegExp(e.source,e.flags),escaped:Boolean(t)})}*execAll(e){const{pattern:t,escaped:n}=H.get(this);let r=null,i=0;for(t.lastIndex=0;null!=(r=t.exec(e));)!n&&J(e,r.index)||(i=t.lastIndex,yield r,t.lastIndex=i)}test(e){return!this.execAll(e).next().done}[Symbol.replace](e,t){return"function"==typeof t?function(e,t,n){const r=[];let i=0;for(const s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(String(n(...s,s.index,s.input))),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),t):function(e,t,n){const r=[];let i=0,s=null;function o(e){switch(e){case"$$":return"$";case"$&":return s[0];case"$`":return t.slice(0,s.index);case"$'":return t.slice(s.index+s[0].length);default:{const t=e.slice(1);return t in s?s[t]:e}}}for(s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(n.replace(Y,o)),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),String(t))}}const te=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,ne=Function.call.bind(Object.hasOwnProperty),re=Symbol("read"),ie=Symbol("call"),se=Symbol("construct"),oe=Symbol("esm"),ae={require:{[ie]:!0}};function le(e){return null==e||0!==e.defs.length||e.references.some((e=>e.isWrite()))}function ce(e){const t=e.parent;switch(t&&t.type){case"ConditionalExpression":return t.consequent===e||t.alternate===e;case"LogicalExpression":case"ChainExpression":return!0;case"SequenceExpression":return t.expressions[t.expressions.length-1]===e;default:return!1}}class ue{constructor(e,{mode:t="strict",globalObjectNames:n=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=e,this.mode=t,this.globalObjectNames=n.slice(0)}*iterateGlobalReferences(e){for(const t of Object.keys(e)){const n=e[t],r=[t],i=this.globalScope.set.get(t);le(i)||(yield*this._iterateVariableReferences(i,r,n,!0))}for(const t of this.globalObjectNames){const n=[],r=this.globalScope.set.get(t);le(r)||(yield*this._iterateVariableReferences(r,n,e,!1))}}*iterateCjsReferences(e){for(const{node:t}of this.iterateGlobalReferences(ae)){const n=V(t.arguments[0]);if(null==n||!ne(e,n))continue;const r=e[n],i=[n];r[re]&&(yield{node:t,path:i,type:re,info:r[re]}),yield*this._iteratePropertyReferences(t,i,r)}}*iterateEsmReferences(e){const t=this.globalScope.block;for(const n of t.body){if(!te.test(n.type)||null==n.source)continue;const t=n.source.value;if(!ne(e,t))continue;const r=e[t],i=[t];if(r[re]&&(yield{node:n,path:i,type:re,info:r[re]}),"ExportAllDeclaration"===n.type)for(const e of Object.keys(r)){const t=r[e];t[re]&&(yield{node:n,path:i.concat(e),type:re,info:t[re]})}else for(const e of n.specifiers){const t=ne(r,oe),n=this._iterateImportReferences(e,i,t?r:"legacy"===this.mode?{default:r,...r}:{default:r});if(t)yield*n;else for(const e of n)e.path=e.path.filter(pe),(e.path.length>=2||e.type!==re)&&(yield e)}}}*_iterateVariableReferences(e,t,n,r){if(!this.variableStack.includes(e)){this.variableStack.push(e);try{for(const i of e.references){if(!i.isRead())continue;const e=i.identifier;r&&n[re]&&(yield{node:e,path:t,type:re,info:n[re]}),yield*this._iteratePropertyReferences(e,t,n)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(e,t,n){let r=e;for(;ce(r);)r=r.parent;const i=r.parent;if("MemberExpression"!==i.type)"CallExpression"!==i.type?"NewExpression"!==i.type?"AssignmentExpression"!==i.type?"AssignmentPattern"!==i.type?"VariableDeclarator"===i.type&&i.init===r&&(yield*this._iterateLhsReferences(i.id,t,n)):i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n)):i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n),yield*this._iteratePropertyReferences(i,t,n)):i.callee===r&&n[se]&&(yield{node:i,path:t,type:se,info:n[se]}):i.callee===r&&n[ie]&&(yield{node:i,path:t,type:ie,info:n[ie]});else if(i.object===r){const e=K(i);if(null==e||!ne(n,e))return;t=t.concat(e);const r=n[e];r[re]&&(yield{node:i,path:t,type:re,info:r[re]}),yield*this._iteratePropertyReferences(i,t,r)}}*_iterateLhsReferences(e,t,n){if("Identifier"!==e.type)if("ObjectPattern"!==e.type)"AssignmentPattern"===e.type&&(yield*this._iterateLhsReferences(e.left,t,n));else for(const r of e.properties){const e=K(r);if(null==e||!ne(n,e))continue;const i=t.concat(e),s=n[e];s[re]&&(yield{node:r,path:i,type:re,info:s[re]}),yield*this._iterateLhsReferences(r.value,i,s)}else{const i=r(this.globalScope,e);null!=i&&(yield*this._iterateVariableReferences(i,t,n,!1))}}*_iterateImportReferences(e,t,n){const i=e.type;if("ImportSpecifier"===i||"ImportDefaultSpecifier"===i){const s="ImportDefaultSpecifier"===i?"default":e.imported.name;if(!ne(n,s))return;t=t.concat(s);const o=n[s];return o[re]&&(yield{node:e,path:t,type:re,info:o[re]}),void(yield*this._iterateVariableReferences(r(this.globalScope,e.local),t,o,!1))}if("ImportNamespaceSpecifier"!==i){if("ExportSpecifier"===i){const r=e.local.name;if(!ne(n,r))return;t=t.concat(r);const i=n[r];i[re]&&(yield{node:e,path:t,type:re,info:i[re]})}}else yield*this._iterateVariableReferences(r(this.globalScope,e.local),t,n,!1)}}function pe(e,t){return!(1===t&&"default"===e)}ue.READ=re,ue.CALL=ie,ue.CONSTRUCT=se,ue.ESM=oe;var de={CALL:ie,CONSTRUCT:se,ESM:oe,findVariable:r,getFunctionHeadLocation:k,getFunctionNameWithKind:W,getInnermostScope:n,getPropertyName:K,getStaticValue:U,getStringIfConstant:V,hasSideEffect:X,isArrowToken:a,isClosingBraceToken:g,isClosingBracketToken:h,isClosingParenToken:d,isColonToken:u,isCommaToken:l,isCommentToken:y,isNotArrowToken:_,isNotClosingBraceToken:C,isNotClosingBracketToken:T,isNotClosingParenToken:S,isNotColonToken:E,isNotCommaToken:b,isNotCommentToken:A,isNotOpeningBraceToken:w,isNotOpeningBracketToken:O,isNotOpeningParenToken:x,isNotSemicolonToken:v,isOpeningBraceToken:m,isOpeningBracketToken:f,isOpeningParenToken:p,isParenthesized:Z,isSemicolonToken:c,PatternMatcher:ee,READ:re,ReferenceTracker:ue};e.CALL=ie,e.CONSTRUCT=se,e.ESM=oe,e.PatternMatcher=ee,e.READ=re,e.ReferenceTracker=ue,e.default=de,e.findVariable=r,e.getFunctionHeadLocation=k,e.getFunctionNameWithKind=W,e.getInnermostScope=n,e.getPropertyName=K,e.getStaticValue=U,e.getStringIfConstant=V,e.hasSideEffect=X,e.isArrowToken=a,e.isClosingBraceToken=g,e.isClosingBracketToken=h,e.isClosingParenToken=d,e.isColonToken=u,e.isCommaToken=l,e.isCommentToken=y,e.isNotArrowToken=_,e.isNotClosingBraceToken=C,e.isNotClosingBracketToken=T,e.isNotClosingParenToken=S,e.isNotColonToken=E,e.isNotCommaToken=b,e.isNotCommentToken=A,e.isNotOpeningBraceToken=w,e.isNotOpeningBracketToken=O,e.isNotOpeningParenToken=x,e.isNotSemicolonToken=v,e.isOpeningBraceToken=m,e.isOpeningBracketToken=f,e.isOpeningParenToken=p,e.isParenthesized=Z,e.isSemicolonToken=c}(nS)),nS}var iS,sS,oS={};function aS(){return sS?iS:(sS=1,iS=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const e=[];for(;this.moveNext();)e.push(this.current);return e}moveNext(){throw new Error("Not implemented.")}})}var lS,cS,uS,pS,dS,fS,hS,mS,gS,yS,_S,bS,vS,ES,xS,SS,OS,TS,wS,CS,AS,PS,kS,DS,RS={};function IS(){return lS||(lS=1,RS.search=function(e,t){for(let n=0,r=e.length-1;n<=r;){const i=(n+r)/2|0;if(t<=e[i].range[0]){if(i===n)return i;r=i}else n=i+1}return e.length},RS.getFirstIndex=function(e,t,n){if(n in t)return t[n];if(n-1 in t){const r=t[n-1],i=e[r];return i?i.range[0]>=n?r:r+1:e.length}return 0},RS.getLastIndex=function(e,t,n){if(n in t)return t[n]-1;if(n-1 in t){const r=t[n-1],i=e[r];return i?i.range[1]>n?r-1:r:e.length-1}return e.length-1}),RS}function LS(){if(hS)return fS;hS=1;const e=aS();return fS=class extends e{constructor(e){super(),this.cursor=e}moveNext(){const e=this.cursor.moveNext();return this.current=this.cursor.current,e}},fS}function BS(){if(vS)return bS;vS=1;const e=aS(),t=IS();return bS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.index=t.getFirstIndex(e,r,i),this.indexEnd=t.getLastIndex(e,r,s)}moveNext(){return this.index<=this.indexEnd&&(this.current=this.tokens[this.index],this.index+=1,!0)}getOneToken(){return this.index<=this.indexEnd?this.tokens[this.index]:null}getAllTokens(){return this.tokens.slice(this.index,this.indexEnd+1)}}}function MS(){if(TS)return oS;TS=1;const e=function(){if(uS)return cS;uS=1;const e=aS(),t=IS();return cS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.comments=n,this.tokenIndex=t.getLastIndex(e,r,s),this.commentIndex=t.search(n,s)-1,this.border=i}moveNext(){const e=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,t=this.commentIndex>=0?this.comments[this.commentIndex]:null;return e&&(!t||e.range[1]>t.range[1])?(this.current=e,this.tokenIndex-=1):t?(this.current=t,this.commentIndex-=1):this.current=null,Boolean(this.current)&&(-1===this.border||this.current.range[0]>=this.border)}},cS}(),t=function(){if(dS)return pS;dS=1;const e=aS(),t=IS();return pS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.index=t.getLastIndex(e,r,s),this.indexEnd=t.getFirstIndex(e,r,i)}moveNext(){return this.index>=this.indexEnd&&(this.current=this.tokens[this.index],this.index-=1,!0)}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}}}(),n=function(){if(gS)return mS;gS=1;const e=LS();return mS=class extends e{constructor(e,t){super(e),this.predicate=t}moveNext(){const e=this.predicate;for(;super.moveNext();)if(e(this.current))return!0;return!1}},mS}(),r=function(){if(_S)return yS;_S=1;const e=aS(),t=IS();return yS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.comments=n,this.tokenIndex=t.getFirstIndex(e,r,i),this.commentIndex=t.search(n,i),this.border=s}moveNext(){const e=this.tokenIndex0&&(this.count-=1,super.moveNext())}},ES}(),o=function(){if(OS)return SS;OS=1;const e=LS();return SS=class extends e{constructor(e,t){super(e),this.count=t}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},SS}();class a{constructor(e,t){this.TokenCursor=e,this.TokenCommentCursor=t}createBaseCursor(e,t,n,r,i,s){return new(s?this.TokenCommentCursor:this.TokenCursor)(e,t,n,r,i)}createCursor(e,t,r,i,a,l,c,u,p){let d=this.createBaseCursor(e,t,r,i,a,l);return c&&(d=new n(d,c)),u>=1&&(d=new o(d,u)),p>=0&&(d=new s(d,p)),d}}return oS.forward=new a(i,r),oS.backward=new a(t,e),oS}function jS(){if(PS)return AS;PS=1;const e=Fb,{isCommentToken:t}=rS(),n=MS(),r=BS(),i=function(){if(CS)return wS;CS=1;const e=BS();return wS=class extends e{constructor(e,t,n,r,i,s,o){super(e,t,n,r,i),this.index=Math.max(0,this.index-s),this.indexEnd=Math.min(e.length-1,this.indexEnd+o)}}}(),s=IS(),o=Symbol("tokens"),a=Symbol("comments"),l=Symbol("indexMap");function c(t,n,r,i,s,o,a){let l=!1,c=0,u=null;return"number"==typeof a?c=0|a:"function"==typeof a?u=a:a&&(l=!!a.includeComments,c=0|a.skip,u=a.filter||null),e(c>=0,"options.skip should be zero or a positive integer."),e(!u||"function"==typeof u,"options.filter should be a function."),t.createCursor(n,r,i,s,o,l,u,c,-1)}function u(t,n,r,i,s,o,a){let l=!1,c=0,u=!1,p=null;return"number"==typeof a?(c=0|a,u=!0):"function"==typeof a?p=a:a&&(l=!!a.includeComments,c=0|a.count,u="number"==typeof a.count,p=a.filter||null),e(c>=0,"options.count should be zero or a positive integer."),e(!p||"function"==typeof p,"options.filter should be a function."),t.createCursor(n,r,i,s,o,l,p,0,u?c:-1)}function p(e,t,s,o,a,l,c){return void 0===l&&void 0===c?new r(e,t,s,o,a):"number"==typeof l||void 0===l?new i(e,t,s,o,a,0|l,0|c):u(n.forward,e,t,s,o,a,l)}function d(e){const n=[];let r=e.getOneToken();for(;r&&t(r);)n.push(r),r=e.getOneToken();return n}return AS=class{constructor(e,t){this[o]=e,this[a]=t,this[l]=function(e,t){const n=Object.create(null);let r=0,i=0,s=0,o=null;for(;r1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)>>0;++n=0;--r)t=e(n[r],t);return t})),x=ye((function(e,t){return E(e,t[t.length-1],t.slice(0,-1))})),S=ye((function(e,t){var n,r,i;for(n=[],r=t;null!=(i=e(r));)n.push(i[0]),r=i[1];return n})),O=function(e){return[].concat.apply([],e)},T=ye((function(e,t){var n;return[].concat.apply([],function(){var r,i,s,o=[];for(r=0,s=(i=t).length;rt?1:ee(n)?1:e(t)t&&(t=s);return t},$=function(e){var t,n,r,i,s;for(t=e[0],n=0,i=(r=e.slice(1)).length;ne(n)&&(n=o);return n})),Q=ye((function(e,t){var n,r,i,s,o;for(n=t[0],r=0,s=(i=t.slice(1)).length;r1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)1?n:n.toLowerCase())})).replace(/^([A-Z]+)/,(function(e,t){return t.length>1?t+"-":t.toLowerCase()}))}}}function iO(){if(XS)return zS;var e,t,n,r,i,s,o,a,l,c,u,p,d,f,h,m,g,y,_,b,v,E,x,S,O,T,w,C,A,P,k,D;function R(e,t){var n,r=function(i){return e.length>1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)t?e:t})),t=R((function(e,t){return e0?1:0},s=R((function(e,t){return~~(e/t)})),o=R((function(e,t){return e%t})),a=R((function(e,t){return Math.floor(e/t)})),l=R((function(e,t){var n;return(e%(n=t)+n)%n})),c=function(e){return 1/e},p=2*(u=Math.PI),d=Math.exp,f=Math.sqrt,h=Math.log,m=R((function(e,t){return Math.pow(e,t)})),g=Math.sin,y=Math.tan,_=Math.cos,b=Math.asin,v=Math.acos,E=Math.atan,x=R((function(e,t){return Math.atan2(e,t)})),S=function(e){return~~e},O=Math.round,T=Math.ceil,w=Math.floor,C=function(e){return e!=e},A=function(e){return e%2==0},P=function(e){return e%2!=0},k=R((function(e,t){var n;for(e=Math.abs(e),t=Math.abs(t);0!==t;)n=e%t,e=t,t=n;return e})),D=R((function(e,t){return Math.abs(Math.floor(e/k(e,t)*t))})),zS={max:e,min:t,negate:n,abs:r,signum:i,quot:s,rem:o,div:a,mod:l,recip:c,pi:u,tau:p,exp:d,sqrt:f,ln:h,pow:m,sin:g,tan:y,cos:_,acos:v,asin:b,atan:E,atan2:x,truncate:S,round:O,ceiling:T,floor:w,isItNaN:C,even:A,odd:P,gcd:k,lcm:D}}function sO(){if(ZS)return GS;ZS=1;var e,t,n,r,i,s,o,a,l,c={}.toString;function u(e,t){var n,r=function(i){return e.length>1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)|"+e.source+"|\\S","g"),uO.exports=function(e){var n;if(!e.length)throw new Error("No type specified.");if(function(e,t){var n=-1,r=t.length>>>0;for(;++n",n=e.match(t)||[]))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return c(n)}catch(t){throw new Error(t.message+" - Remaining tokens: "+JSON.stringify(n)+" - Initial input: '"+e+"'")}}}.call(this)),uO.exports}var dO,fO,hO,mO,gO,yO,_O,bO,vO,EO,xO,SO,OO,TO,wO,CO,AO,PO,kO,DO,RO,IO,LO,BO,MO,jO,NO,FO,UO={exports:{}};function VO(){return dO||(dO=1,function(){var e,t,n,r,i,s,o={}.toString;function a(e,t,r){if(!(e instanceof Object))return!1;switch(t.structure){case"fields":return function(e,t,n){var r,i,s,o,a,l,u;for(s in r={},i=0,e)r[s]=!0,i++;for(a in o=0,l=t.of){if(u=l[a],!c(e[a],u,n))return!1;r[a]&&o++}return t.subset||i===o}(e,t,r);case"array":return function(e,t,r){return n((function(e){return c(e,t.of,r)}),e)}(e,t,r);case"tuple":return function(e,t,n){var r,i,s,o,a;for(r=0,i=0,o=(s=t.of).length;i{if(!e)return;const[r,i=null]=e.split(":");n[r]={value:i,comment:t}})),n}parseJsonConfig(n,i){r("Parsing JSON config");let s={};try{if(s=e.parse("Object",n)||{},t.isEverySeverityValid(s))return{success:!0,config:s}}catch{r("Levn parsing failed; falling back to manual parsing.")}s={};const o=n.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{s=JSON.parse(`{${o}}`)}catch(e){return r("Manual parsing failed."),{success:!1,error:{ruleId:null,fatal:!0,severity:2,message:`Failed to parse JSON from '${o}': ${e.message}`,line:i.start.line,column:i.start.column+1,nodeType:null}}}return{success:!0,config:s}}parseListConfig(e){r("Parsing list config");const t={};return e.split(",").forEach((e=>{const n=e.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");n&&(t[n]=!0)})),t}extractDirectiveComment(e){const t=/\s-{2,}\s/u.exec(e);if(!t)return{directivePart:e.trim(),justificationPart:""};return{directivePart:e.slice(0,t.index).trim(),justificationPart:e.slice(t.index+t[0].length).trim()}}parseDirective(e){const{directivePart:t}=this.extractDirectiveComment(e.value),r=n.exec(t),i=r[1];return{directiveText:i,directiveValue:t.slice(r.index+i.length)}}},gO}function qO(){if(bO)return _O;bO=1;const{isCommentToken:e}=rS(),t=jS(),n=Av(),r=eS(),i=NS(),{directivesPattern:s}=Pv(),o=$O(),a=sv(),l=new o;function c(e){switch(e){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${e}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}function u(e,t,n,r){if(function(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[0]||t.range[0]<=e.range[0]&&t.range[1]>=e.range[0]}(t,n))return!1;const[i,s]=t.range[1]<=n.range[0]?[t,n]:[n,t],o=e.getLastToken(i)||i,a=e.getFirstToken(s)||s;let l=o;for(;l!==a;){const t=e.getTokenAfter(l,{includeComments:!0});if(l.range[1]!==t.range[0]||r&&t!==a&&"JSXText"===t.type&&/\s/u.test(t.value))return!0;l=t}return!1}const p=Symbol("caches");return _O=class extends t{constructor(e,t){let i,s,o,a,l;"string"==typeof e?(i=e,s=t):"object"==typeof e&&null!==e&&(i=e.text,s=e.ast,o=e.parserServices,a=e.scopeManager,l=e.visitorKeys),function(e){if(!e.tokens)throw new Error("AST is missing the tokens array.");if(!e.comments)throw new Error("AST is missing the comments array.");if(!e.loc)throw new Error("AST is missing location information.");if(!e.range)throw new Error("AST is missing range information")}(s),super(s.tokens,s.comments),this[p]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.hasBOM=65279===i.charCodeAt(0),this.text=this.hasBOM?i.slice(1):i,this.ast=s,this.parserServices=o||{},this.scopeManager=a||null,this.visitorKeys=l||r.DEFAULT_VISITOR_KEYS;const c=this.text.match(n.shebangPattern);c&&s.comments.length&&s.comments[0].value===c[1]&&(s.comments[0].type="Shebang"),this.tokensAndComments=function(e,t){const n=[];let r=0,i=0;for(;r=t.length||rt.parent.end);)n.trailing.push(r),r=this.getTokenAfter(r,{includeComments:!0})}return this._commentCache.set(t,n),n}getJSDocComment(t){const n=t=>{const n=this.getTokenBefore(t,{includeComments:!0});return n&&e(n)&&"Block"===n.type&&"*"===n.value.charAt(0)&&t.loc.start.line-n.loc.end.line<=1?n:null};let r=t.parent;switch(t.type){case"ClassDeclaration":case"FunctionDeclaration":return n("ExportDefaultDeclaration"===(i=r).type||"ExportNamedDeclaration"===i.type||"ExportAllDeclaration"===i.type||"ExportSpecifier"===i.type?r:t);case"ClassExpression":return n(r.parent);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==r.type&&"NewExpression"!==r.type){for(;!this.getCommentsBefore(r).length&&!/Function/u.test(r.type)&&"MethodDefinition"!==r.type&&"Property"!==r.type&&(r=r.parent,r););if(r&&"FunctionDeclaration"!==r.type&&"Program"!==r.type)return n(r)}return n(t);default:return null}var i}getNodeByRangeIndex(e){let t=null;return r.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(n){n.range[0]<=e&&ethis.text.length)throw new RangeError(`Index out of range (requested index ${e}, but source text has length ${this.text.length}).`);if(e===this.text.length)return{line:this.lines.length,column:this.lines[this.lines.length-1].length};const t=e>=this.lineStartIndices[this.lineStartIndices.length-1]?this.lineStartIndices.length:this.lineStartIndices.findIndex((t=>ethis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${e.line} requested, but only ${this.lineStartIndices.length} lines present).`);const t=this.lineStartIndices[e.line-1],n=e.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[e.line],r=t+e.column;if(e.line===this.lineStartIndices.length&&r>n||e.line=n)throw new RangeError(`Column number out of range (column ${e.column} requested, but the length of line ${e.line} is ${n-t}).`);return r}getScope(e){if(!e)throw new TypeError("Missing required argument: node.");const t=this[p].get("scopes"),n=t.get(e);if(n)return n;const r="Program"!==e.type;for(let n=e;n;n=n.parent){const i=this.scopeManager.acquire(n,r);if(i)return"function-expression-name"===i.type?(t.set(e,i.childScopes[0]),i.childScopes[0]):(t.set(e,i),i)}return t.set(e,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(e){return this.scopeManager.getDeclaredVariables(e)}getAncestors(e){if(!e)throw new TypeError("Missing required argument: node.");const t=[];for(let n=e.parent;n;n=n.parent)t.push(n);return t.reverse()}markVariableAsUsed(e,t=this.ast){const n=this.getScope(t);let r=n;"global"===n.type&&n.childScopes.length>0&&n.childScopes[0].block===this.ast&&(r=n.childScopes[0]);for(let t=r;t;t=t.upper){const n=t.variables.find((t=>t.name===e));if(n)return n.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let e=this[p].get("configNodes");return e||(e=this.ast.comments.filter((e=>{if("Shebang"===e.type)return!1;const{directivePart:t}=l.extractDirectiveComment(e.value),n=s.exec(t);return!!n&&("Line"!==e.type||!!/^eslint-disable-(next-)?line$/u.test(n[1]))})),this[p].set("configNodes",e),e)}applyLanguageOptions(e){const t=Object.assign({},function(e){switch(e){case 3:return i.es3;case 5:return i.es5;default:return e<2015?i[`es${e+2009}`]:i[`es${e}`]}}(e.ecmaVersion),"commonjs"===e.sourceType?i.commonjs:void 0,e.globals);this[p].get("vars").set("configGlobals",t)}applyInlineConfig(){const e=[],t=[],n={},r=Object.create(null);this.getInlineConfigNodes().forEach((i=>{const{directiveText:s,directiveValue:o}=l.parseDirective(i);switch(s){case"exported":Object.assign(n,l.parseStringConfig(o,i));break;case"globals":case"global":for(const[t,{value:n}]of Object.entries(l.parseStringConfig(o,i))){let s;try{s=c(n)}catch(t){e.push({ruleId:null,loc:i.loc,message:t.message});continue}r[t]?(r[t].comments.push(i),r[t].value=s):r[t]={comments:[i],value:s}}break;case"eslint":{const n=l.parseJsonConfig(o,i.loc);n.success?t.push({config:{rules:n.config},node:i}):e.push(n.error);break}}}));const i=this[p].get("vars");return i.set("inlineGlobals",r),i.set("exportedVariables",n),{configs:t,problems:e}}finalize(){const e=this[p].get("vars"),t=this.scopeManager.scopes[0],n=e.get("configGlobals"),r=e.get("inlineGlobals"),i=e.get("exportedVariables");!function(e,t={},n={}){for(const r of new Set([...Object.keys(t),...Object.keys(n)])){const i=void 0===t[r]?void 0:c(t[r]),s=n[r]&&n[r].value||i,o=n[r]&&n[r].comments;if("off"===s)continue;let l=e.set.get(r);l||(l=new a.Variable(r,e),e.variables.push(l),e.set.set(r,l)),l.eslintImplicitGlobalSetting=i,l.eslintExplicitGlobal=void 0!==o,l.eslintExplicitGlobalComments=o,l.writeable="writable"===s}e.through=e.through.filter((t=>{const n=t.identifier.name,r=e.set.get(n);return!r||(t.resolved=r,r.references.push(t),!1)}))}(t,n,r),i&&function(e,t){Object.keys(t).forEach((t=>{const n=e.set.get(t);n&&(n.eslintUsed=!0,n.eslintExported=!0)}))}(t,i)}},_O}function QO(){if(SO)return xO;SO=1;const e=Jx()("eslint:code-path");function t(e){return e.id+(e.reachable?"":"!")}function n(e,t){const n=t?`:${t}`:"";switch(e.type){case"Identifier":return`${e.type}${n} (${e.name})`;case"Literal":return`${e.type}${n} (${e.value})`;default:return`${e.type}${n}`}}return xO={enabled:e.enabled,dump:e,dumpState:e.enabled?function(r,i,s){for(let e=0;e=0&&t.nodes[e]===n(r,"enter")?t.nodes[e]=n(r,void 0):t.nodes.push(n(r,"exit"))}else t.nodes.push(n(r,"enter"))}e([`${i.currentSegments.map(t).join(",")})`,`${r.type}${s?":exit":""}`].join(" "))}:e,dumpDot:e.enabled?function(t){let n='\ndigraph {\nnode[shape=box,style="rounded,filled",fillcolor=white];\ninitial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n';t.returnedSegments.length>0&&(n+='final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n'),t.thrownSegments.length>0&&(n+='thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];\n');const r=Object.create(null),i=this.makeDotArrows(t,r);for(const e in r){const t=r[e];n+=`${e}[`,t.reachable?n+='label="':n+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',t.internal.nodes.length>0?n+=t.internal.nodes.join("\\n"):n+="????",n+='"];\n'}n+=`${i}\n`,n+="}",e("DOT",n)}:e,makeDotArrows(e,t){const n=[[e.initialSegment,0]],r=t||Object.create(null);let i=e.initialSegment.id,s=`initial->${e.initialSegment.id}`;for(;n.length>0;){const e=n.pop(),t=e[0],o=e[1];if(r[t.id]&&0===o)continue;r[t.id]=t;const a=t.allNextSegments[o];a&&(i===t.id?s+=`->${a.id}`:s+=`;\n${t.id}->${a.id}`,i=a.id,n.unshift([t,1+o]),n.push([a,0]))}return e.returnedSegments.forEach((e=>{i===e.id?s+="->final":s+=`;\n${e.id}->final`,i=null})),e.thrownSegments.forEach((e=>{i===e.id?s+="->thrown":s+=`;\n${e.id}->thrown`,i=null})),`${s};`}},xO}function zO(){if(TO)return OO;TO=1;const e=QO();function t(e){return e.reachable}class n{constructor(n,r,i){this.id=n,this.nextSegments=[],this.prevSegments=r.filter(t),this.allNextSegments=[],this.allPrevSegments=r,this.reachable=i,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),e.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(e){return this.internal.loopedPrevSegments.includes(e)}static newRoot(e){return new n(e,[],!0)}static newNext(e,r){return new n(e,n.flattenUnusedSegments(r),r.some(t))}static newUnreachable(e,t){const r=new n(e,n.flattenUnusedSegments(t),!1);return n.markUsed(r),r}static newDisconnected(e,r){return new n(e,[],r.some(t))}static markUsed(e){if(e.internal.used)return;let t;if(e.internal.used=!0,e.reachable)for(t=0;t=0?t:i.length+t,o=n>=0?n:i.length+n,a=[];for(let t=0;te.count;){const n=[];for(let i=0,s=Math.floor(r.length/2);i0&&e.some(n)}makeNext(e,n){return r(this,e,n,t.newNext)}makeUnreachable(e,n){return r(this,e,n,t.newUnreachable)}makeDisconnected(e,n){return r(this,e,n,t.newDisconnected)}add(t){e(t.length>=this.count,`${t.length} >= ${this.count}`),this.segmentsList.push(i(this,t))}replaceHead(t){e(t.length>=this.count,`${t.length} >= ${this.count}`),this.segmentsList.splice(-1,1,i(this,t))}addAll(t){e(t.count===this.count),this.segmentsList.push(...t.segmentsList)}clear(){this.segmentsList=[]}static newRoot(e){const n=new s(e,null,1);return n.add([t.newRoot(e.next())]),n}static newEmpty(e,t){return new s(e.idGenerator,e,(t?2:1)*e.count)}}return wO=s}();class n{constructor(e,n,r,i){this.upper=e,this.breakable=n,this.label=r,this.brokenForkContext=t.newEmpty(i)}}class r{constructor(e){this.upper=e,this.choiceContextCount=0}}class i{constructor(e,n,r,i){this.upper=e,this.kind=n,this.isForkingAsResult=r,this.trueForkContext=t.newEmpty(i),this.falseForkContext=t.newEmpty(i),this.nullishForkContext=t.newEmpty(i),this.processed=!1}}class s{constructor(e,t,n,r){this.upper=e,this.type=t,this.label=n,this.brokenForkContext=r.brokenForkContext}}class o extends s{constructor(e,t,n){super(e,"WhileStatement",t,n),this.test=void 0,this.continueDestSegments=null}}class a extends s{constructor(e,n,r,i){super(e,"DoWhileStatement",n,r),this.test=void 0,this.entrySegments=null,this.continueForkContext=t.newEmpty(i)}}class l extends s{constructor(e,t,n){super(e,"ForStatement",t,n),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class c extends s{constructor(e,t,n){super(e,"ForInStatement",t,n),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class u extends s{constructor(e,t,n){super(e,"ForOfStatement",t,n),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class p{constructor(e,t){this.upper=e,this.hasCase=t,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class d{constructor(e,n,r){this.upper=e,this.hasFinalizer=n,this.position="try",this.returnedForkContext=n?t.newEmpty(r):null,this.thrownForkContext=t.newEmpty(r),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(e,t,n,r){for(let i=0;i=2&&e.markPrevSegmentAsLooped(o,r),t.notifyLooped(r,o)}}function _(e,t,n){t.processed||(t.trueForkContext.add(n),t.falseForkContext.add(n),t.nullishForkContext.add(n)),!0!==e.test&&e.brokenForkContext.addAll(t.falseForkContext),e.endOfTestSegments=t.trueForkContext.makeNext(0,-1)}return AO=class{constructor(e,n){this.idGenerator=e,this.notifyLooped=n,this.forkContext=t.newRoot(e),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const r=this.finalSegments,i=this.returnedForkContext,s=this.thrownForkContext;i.add=f.bind(null,i,s,r),s.add=f.bind(null,s,i,r)}get headSegments(){return this.forkContext.head}get parentForkContext(){const e=this.forkContext;return e&&e.upper}pushForkContext(e){return this.forkContext=t.newEmpty(this.forkContext,e),this.forkContext}popForkContext(){const e=this.forkContext;return this.forkContext=e.upper,this.forkContext.replaceHead(e.makeNext(0,-1)),e}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(e,t){this.choiceContext=new i(this.choiceContext,e,t,this.forkContext)}popChoiceContext(){const e=this.choiceContext,t=this.forkContext,n=t.head;switch(this.choiceContext=e.upper,e.kind){case"&&":case"||":case"??":if(e.processed||(e.trueForkContext.add(n),e.falseForkContext.add(n),e.nullishForkContext.add(n)),e.isForkingAsResult){const t=this.choiceContext;return t.trueForkContext.addAll(e.trueForkContext),t.falseForkContext.addAll(e.falseForkContext),t.nullishForkContext.addAll(e.nullishForkContext),t.processed=!0,e}break;case"test":e.processed?(e.falseForkContext.clear(),e.falseForkContext.add(n)):(e.trueForkContext.clear(),e.trueForkContext.add(n));break;case"loop":return e;default:throw new Error("unreachable")}const r=e.trueForkContext;return r.addAll(e.falseForkContext),t.replaceHead(r.makeNext(0,-1)),e}makeLogicalRight(){const e=this.choiceContext,t=this.forkContext;if(e.processed){let n;switch(e.kind){case"&&":n=e.trueForkContext;break;case"||":n=e.falseForkContext;break;case"??":n=e.nullishForkContext;break;default:throw new Error("unreachable")}t.replaceHead(n.makeNext(0,-1)),n.clear(),e.processed=!1}else{switch(e.kind){case"&&":e.falseForkContext.add(t.head),e.nullishForkContext.add(t.head);break;case"||":e.trueForkContext.add(t.head);break;case"??":e.trueForkContext.add(t.head),e.falseForkContext.add(t.head);break;default:throw new Error("unreachable")}t.replaceHead(t.makeNext(-1,-1))}}makeIfConsequent(){const e=this.choiceContext,t=this.forkContext;e.processed||(e.trueForkContext.add(t.head),e.falseForkContext.add(t.head),e.nullishForkContext.add(t.head)),e.processed=!1,t.replaceHead(e.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const e=this.choiceContext,t=this.forkContext;e.trueForkContext.clear(),e.trueForkContext.add(t.head),e.processed=!0,t.replaceHead(e.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new r(this.chainContext)}popChainContext(){const e=this.chainContext;this.chainContext=e.upper;for(let t=e.choiceContextCount;t>0;--t)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(e,t){this.switchContext=new p(this.switchContext,e),this.pushBreakContext(!0,t)}popSwitchContext(){const e=this.switchContext;this.switchContext=e.upper;const t=this.forkContext,n=this.popBreakContext().brokenForkContext;if(0===e.forkCount)return void(n.empty||(n.add(t.makeNext(-1,-1)),t.replaceHead(n.makeNext(0,-1))));const r=t.head;this.forkBypassPath();const i=t.head;n.add(r),e.lastIsDefault||(e.defaultBodySegments?(!function(e,t){for(let n=0;n0&&e[0].reachable&&this.returnedForkContext.add(e)}},AO}function GO(){if(DO)return kO;DO=1;return kO=class{constructor(e){this.prefix=String(e),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}}function ZO(){if(BO)return LO;BO=1;const e=Fb,{breakableTypePattern:t}=Av(),n=function(){if(IO)return RO;IO=1;const e=XO(),t=GO();return RO=class{constructor({id:n,origin:r,upper:i,onLooped:s}){this.id=n,this.origin=r,this.upper=i,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new e(new t(`${n}_`),s)}),i&&i.childCodePaths.push(this)}static getState(e){return e.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}get currentSegments(){return this.internal.currentSegments}traverseSegments(e,t){let n,r;"function"==typeof e?(r=e,n={}):(n=e||{},r=t);const i=n.first||this.internal.initialSegment,s=n.last;let o=null,a=0,l=0,c=null;const u=new Set,p=[[i,0]];let d=null,f=!1;const h={skip(){p.length<=1?f=!0:d=p[p.length-2][0]},break(){f=!0}};function m(e){return u.has(e)||c.isLoopedPrevSegment(e)}for(;p.length>0;){if(o=p[p.length-1],c=o[0],a=o[1],0===a){if(u.has(c)){p.pop();continue}if(c!==i&&c.prevSegments.length>0&&!c.prevSegments.every(m)){p.pop();continue}if(d&&c.prevSegments.includes(d)&&(d=null),u.add(c),!d&&(r.call(this,c,h),c===s&&h.skip(),f))break}l=c.nextSegments.length-1,a=1&&o.arguments[0]===r&&s.makeOptionalRight();break;case"MemberExpression":!0===o.optional&&o.property===r&&s.makeOptionalRight();break;case"LogicalExpression":o.right===r&&l(o.operator)&&s.makeLogicalRight();break;case"AssignmentExpression":o.right===r&&c(o.operator)&&s.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":o.consequent===r?s.makeIfConsequent():o.alternate===r&&s.makeIfAlternate();break;case"SwitchCase":o.consequent[0]===r&&s.makeSwitchCaseBody(!1,!o.test);break;case"TryStatement":o.handler===r?s.makeCatchBlock():o.finalizer===r&&s.makeFinallyBlock();break;case"WhileStatement":o.test===r?s.makeWhileTest(d(r)):(e(o.body===r),s.makeWhileBody());break;case"DoWhileStatement":o.body===r?s.makeDoWhileBody():(e(o.test===r),s.makeDoWhileTest(d(r)));break;case"ForStatement":o.test===r?s.makeForTest(d(r)):o.update===r?s.makeForUpdate():o.body===r&&s.makeForBody();break;case"ForInStatement":case"ForOfStatement":o.left===r?s.makeForInOfLeft():o.right===r?s.makeForInOfRight():(e(o.body===r),s.makeForInOfBody());break;case"AssignmentPattern":o.right===r&&(s.pushForkContext(),s.forkBypassPath(),s.forkPath())}}(this,r),function(e,r){let i=e.codePath,d=i&&n.getState(i);const h=r.parent;function m(t){i&&(f(e,r),s.dumpState(r,d,!1)),i=e.codePath=new n({id:e.idGenerator.next(),origin:t,upper:i,onLooped:e.onLooped}),d=n.getState(i),s.dump(`onCodePathStart ${i.id}`),e.emitter.emit("onCodePathStart",i,r)}switch(a(r)&&m("class-field-initializer"),r.type){case"Program":m("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":m("function");break;case"StaticBlock":m("class-static-block");break;case"ChainExpression":d.pushChainContext();break;case"CallExpression":case"MemberExpression":!0===r.optional&&d.makeOptionalNode();break;case"LogicalExpression":l(r.operator)&&d.pushChoiceContext(r.operator,p(r));break;case"AssignmentExpression":c(r.operator)&&d.pushChoiceContext(r.operator.slice(0,-1),p(r));break;case"ConditionalExpression":case"IfStatement":d.pushChoiceContext("test",!1);break;case"SwitchStatement":d.pushSwitchContext(r.cases.some(o),u(r));break;case"TryStatement":d.pushTryContext(Boolean(r.finalizer));break;case"SwitchCase":h.discriminant!==r&&h.cases[0]!==r&&d.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":d.pushLoopContext(r.type,u(r));break;case"LabeledStatement":t.test(r.body.type)||d.pushBreakContext(!1,r.label.name)}f(e,r),s.dumpState(r,d,!1)}(this,r),this.original.enterNode(r),this.currentNode=null}leaveNode(e){this.currentNode=e,function(e,r){const i=e.codePath,o=n.getState(i);let a=!1;switch(r.type){case"ChainExpression":o.popChainContext();break;case"IfStatement":case"ConditionalExpression":o.popChoiceContext();break;case"LogicalExpression":l(r.operator)&&o.popChoiceContext();break;case"AssignmentExpression":c(r.operator)&&o.popChoiceContext();break;case"SwitchStatement":o.popSwitchContext();break;case"SwitchCase":0===r.consequent.length&&o.makeSwitchCaseBody(!0,!r.test),o.forkContext.reachable&&(a=!0);break;case"TryStatement":o.popTryContext();break;case"BreakStatement":f(e,r),o.makeBreak(r.label&&r.label.name),a=!0;break;case"ContinueStatement":f(e,r),o.makeContinue(r.label&&r.label.name),a=!0;break;case"ReturnStatement":f(e,r),o.makeReturn(),a=!0;break;case"ThrowStatement":f(e,r),o.makeThrow(),a=!0;break;case"Identifier":(function(e){const t=e.parent;switch(t.type){case"LabeledStatement":case"BreakStatement":case"ContinueStatement":case"ArrayPattern":case"RestElement":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"CatchClause":return!1;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ClassDeclaration":case"ClassExpression":case"VariableDeclarator":return t.id!==e;case"Property":case"PropertyDefinition":case"MethodDefinition":return t.key!==e||t.computed||t.shorthand;case"AssignmentPattern":return t.key!==e;default:return!0}})(r)&&(o.makeFirstThrowablePathInTryBlock(),a=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":o.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":o.popLoopContext();break;case"AssignmentPattern":o.popForkContext();break;case"LabeledStatement":t.test(r.body.type)||o.popBreakContext()}a||f(e,r),s.dumpState(r,o,!0)}(this,e),this.original.leaveNode(e),h(this,e),this.currentNode=null}onLooped(e,t){e.reachable&&t.reachable&&(s.dump(`onCodePathSegmentLoop ${e.id} -> ${t.id}`),this.emitter.emit("onCodePathSegmentLoop",e,t,this.currentNode))}},LO}function YO(){return jO||(jO=1,MO=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),MO}function HO(){if(FO)return NO;FO=1;const e=YO();function t(e,t){return e.line-t.line||e.column-t.column}function n(e,t){const{range:n}=t,r=e.filter((e=>e.ruleId)).map((e=>`'${e.ruleId}'`));return{description:r.length<=2?r.join(" or "):`${r.slice(0,r.length-1).join(", ")}, or ${r[r.length-1]}`,fix:{range:n,text:" "},unprocessedDirective:e[0].unprocessedDirective}}function r(t){const r=function(e){const t=new Map;for(const n of e){const{unprocessedDirective:{parentComment:e}}=n;t.has(e)?t.get(e).push(n):t.set(e,[n])}return[...t.values()]}(t);return r.flatMap((t=>{const{parentComment:r}=t[0].unprocessedDirective,i=new Set(r.ruleIds);for(const e of t)i.delete(e.ruleId);return i.size?function(t,n){const r=n.range[0]+"//".length,i=/^\s*\S+\s+/u.exec(n.value)[0].length,s=n.value.slice(i).split(/\s-{2,}\s/u)[0].trimEnd();return t.map((t=>{const{ruleId:n}=t,o=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${e(n)}\k(?:\s*,\s*|$)`,"u").exec(s),a=o[0],l=i+o.index,c=l+a.length,u=a.indexOf(","),p=a.lastIndexOf(",");let d,f;return u!==p?(d=l+u,f=l+p):(d=l,f=c),{description:`'${n}'`,fix:{range:[r+d,r+f],text:""},unprocessedDirective:t.unprocessedDirective}}))}(t,r.commentToken):[n(t,r.commentToken)]}))}function i(e){const n=[],i=new Set;for(const r of e.problems){let s=[],o=0;for(;o0){const e=s.map((e=>({kind:"directive",justification:e.unprocessedDirective.justification})));r.suppressions?r.suppressions=r.suppressions.concat(e):(r.suppressions=e,i.add(s[s.length-1]))}n.push(r)}const s=e.directives.filter((e=>"disable"===e.type&&!i.has(e))),o=new Set(e.directives.filter((e=>"enable"===e.unprocessedDirective.type)));if(o.size>0)for(const t of function(e){const t=new Map,n=new Set;for(let r=e.length-1;r>=0;r--){const i=e[r];if("disable"===i.type){if(0===t.size)continue;if(null===i.ruleId){for(const e of t.values())n.add(e);t.clear()}else{const e=t.get(i.ruleId);if(e)n.add(e);else{const e=t.get(null);e&&n.add(e)}}}else"enable"===i.type&&(null===i.ruleId?(t.clear(),t.set(null,i)):t.set(i.ruleId,i))}return n}(e.directives))o.delete(t);const a=r(s).concat(r(o)).map((({description:t,fix:n,unprocessedDirective:r})=>{const{parentComment:i,type:s,line:o,column:a}=r;let l;return l="enable"===s?t?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${t}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":t?`Unused eslint-disable directive (no problems were reported from ${t}).`:"Unused eslint-disable directive (no problems were reported).",{ruleId:null,message:l,line:"disable-next-line"===s?i.commentToken.loc.start.line:o,column:"disable-next-line"===s?i.commentToken.loc.start.column+1:a,severity:"warn"===e.reportUnusedDisableDirectives?1:2,nodeType:null,...e.disableFixes?{}:{fix:n}}}));return{problems:n,unusedDirectives:a}}return NO=({directives:e,disableFixes:n,problems:r,reportUnusedDisableDirectives:s="off"})=>{const o=e.filter((e=>"disable"===e.type||"enable"===e.type)).map((e=>Object.assign({},e,{unprocessedDirective:e}))).sort(t),a=e.flatMap((e=>{switch(e.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:e.line,column:1,ruleId:e.ruleId,unprocessedDirective:e},{type:"enable",line:e.line+1,column:0,ruleId:e.ruleId,unprocessedDirective:e}];case"disable-next-line":return[{type:"disable",line:e.line+1,column:1,ruleId:e.ruleId,unprocessedDirective:e},{type:"enable",line:e.line+2,column:0,ruleId:e.ruleId,unprocessedDirective:e}];default:throw new TypeError(`Unrecognized directive type '${e.type}'`)}})).sort(t),l=i({problems:r,directives:o,disableFixes:n,reportUnusedDisableDirectives:s}),c=i({problems:l.problems,directives:a,disableFixes:n,reportUnusedDisableDirectives:s});return"off"!==s?c.problems.concat(l.unusedDirectives).concat(c.unusedDirectives).sort(t):c.problems},NO}function JO(e){return(JO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(e,t)||nT(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tT(e){return function(e){if(Array.isArray(e))return rT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nT(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nT(e,t){if(e){if("string"==typeof e)return rT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rT(e,t):void 0}}function rT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--n)if(e[n].node===t)return!0;return!1}function m(e,t){return(new p).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,r,i,s;for(r=e.length,i=0;r;)t(e[s=i+(n=r>>>1)])?r=n:(i=s+1,r-=n+1);return i}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},i={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},r={Break:s={},Skip:o={},Remove:a={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){var e,t,n,r,i;function s(e,t){if(Array.isArray(t))for(n=0,r=t.length;n=0;)if(_=a[p=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]&&!h(r,_[g])){if(f(l,y[m]))i=new u(_[g],[p,g],"Property",null);else{if(!d(_[g]))continue;i=new u(_[g],[p,g],null,null)}n.push(i)}}else if(d(_)){if(h(r,_))continue;n.push(new u(_,p,null,null))}}}else if(i=r.pop(),c=this.__execute(t.leave,i),this.__state===s||c===s)return},p.prototype.replace=function(e,t){var n,r,i,l,p,h,m,g,y,_,b,v,E;function x(e){var t,r,i,s;if(e.ref.remove())for(r=e.ref.key,s=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===s){if(i.ref.key=0;)if(_=i[E=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]){if(f(l,y[m]))h=new u(_[g],[E,g],"Property",new c(_,g));else{if(!d(_[g]))continue;h=new u(_[g],[E,g],null,new c(_,g))}n.push(h)}}else d(_)&&n.push(new u(_,E,null,new c(i,E)))}}else if(h=r.pop(),void 0!==(p=this.__execute(t.leave,h))&&p!==s&&p!==o&&p!==a&&h.ref.replace(p),this.__state!==a&&p!==a||x(h),this.__state===s||p===s)return v.root;return v.root},t.Syntax=n,t.traverse=m,t.replace=function(e,t){return(new p).replace(e,t)},t.attachComments=function(e,t,n){var i,s,o,a,c=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,s=t.length;oe.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(a,1)):a+=1;return a===c.length?r.Break:c[a].extendedRange[0]>e.range[1]?r.Skip:void 0}}),a=0,m(e,{leave:function(e){for(var t;ae.range[1]?r.Skip:void 0}}),e},t.VisitorKeys=i,t.VisitorOption=r,t.Controller=p,t.cloneEnvironment=function(){return e({})},t}(t)})),oT=iT((function(e){e.exports&&(e.exports=function(){function e(t,n,r,i){this.message=t,this.expected=n,this.found=r,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),e.buildMessage=function(e,t){var n={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,n="";for(t=0;t0){for(t=1,r=1;t<~+.]/,d=ge([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),f=me(">",!1),h=me("~",!1),m=me("+",!1),g=me(",",!1),y=me("!",!1),_=me("*",!1),b=me("#",!1),v=me("[",!1),E=me("]",!1),x=/^[>","<","!"],!1,!1),O=me("=",!1),T=function(e){return(e||"")+"="},w=/^[><]/,C=ge([">","<"],!1,!1),A=me(".",!1),P=function(e,t,n){return{type:"attribute",name:e,operator:t,value:n}},k=me('"',!1),D=/^[^\\"]/,R=ge(["\\",'"'],!0,!1),I=me("\\",!1),L={type:"any"},B=function(e,t){return e+t},M=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},j=me("'",!1),N=/^[^\\']/,F=ge(["\\","'"],!0,!1),U=/^[0-9]/,V=ge([["0","9"]],!1,!1),K=me("type(",!1),W=/^[^ )]/,$=ge([" ",")"],!0,!1),q=me(")",!1),Q=/^[imsu]/,z=ge(["i","m","s","u"],!1,!1),X=me("/",!1),G=/^[^\/]/,Z=ge(["/"],!0,!1),Y=me(":not(",!1),H=me(":matches(",!1),J=me(":has(",!1),ee=me(":first-child",!1),te=me(":last-child",!1),ne=me(":nth-child(",!1),re=me(":nth-last-child(",!1),ie=me(":",!1),se=me("statement",!0),oe=me("expression",!0),ae=me("declaration",!0),le=me("function",!0),ce=me("pattern",!0),ue=0,pe=[{line:1,column:1}],de=0,fe=[],he={};if("startRule"in n){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');c=l[n.startRule]}function me(e,t){return{type:"literal",text:e,ignoreCase:t}}function ge(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function ye(e){var n,r=pe[e];if(r)return r;for(n=e-1;!pe[n];)n--;for(r={line:(r=pe[n]).line,column:r.column};nde&&(de=ue,fe=[]),fe.push(e))}function ve(){var e,t,n,r,i=30*ue+0,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,(t=Ee())!==a&&(n=Oe())!==a&&Ee()!==a?e=t=1===(r=n).length?r[0]:{type:"matches",selectors:r}:(ue=e,e=a),e===a&&(e=ue,(t=Ee())!==a&&(t=void 0),e=t),he[i]={nextPos:ue,result:e},e)}function Ee(){var e,n,r=30*ue+1,i=he[r];if(i)return ue=i.nextPos,i.result;for(e=[],32===t.charCodeAt(ue)?(n=" ",ue++):(n=a,be(u));n!==a;)e.push(n),32===t.charCodeAt(ue)?(n=" ",ue++):(n=a,be(u));return he[r]={nextPos:ue,result:e},e}function xe(){var e,n,r,i=30*ue+2,s=he[i];if(s)return ue=s.nextPos,s.result;if(n=[],p.test(t.charAt(ue))?(r=t.charAt(ue),ue++):(r=a,be(d)),r!==a)for(;r!==a;)n.push(r),p.test(t.charAt(ue))?(r=t.charAt(ue),ue++):(r=a,be(d));else n=a;return n!==a&&(n=n.join("")),e=n,he[i]={nextPos:ue,result:e},e}function Se(){var e,n,r,i=30*ue+3,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,(n=Ee())!==a?(62===t.charCodeAt(ue)?(r=">",ue++):(r=a,be(f)),r!==a&&Ee()!==a?e=n="child":(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ee())!==a?(126===t.charCodeAt(ue)?(r="~",ue++):(r=a,be(h)),r!==a&&Ee()!==a?e=n="sibling":(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ee())!==a?(43===t.charCodeAt(ue)?(r="+",ue++):(r=a,be(m)),r!==a&&Ee()!==a?e=n="adjacent":(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,32===t.charCodeAt(ue)?(n=" ",ue++):(n=a,be(u)),n!==a&&(r=Ee())!==a?e=n="descendant":(ue=e,e=a)))),he[i]={nextPos:ue,result:e},e)}function Oe(){var e,n,r,i,s,o,l,c,u=30*ue+4,p=he[u];if(p)return ue=p.nextPos,p.result;if(e=ue,(n=Te())!==a){for(r=[],i=ue,(s=Ee())!==a?(44===t.charCodeAt(ue)?(o=",",ue++):(o=a,be(g)),o!==a&&(l=Ee())!==a&&(c=Te())!==a?i=s=[s,o,l,c]:(ue=i,i=a)):(ue=i,i=a);i!==a;)r.push(i),i=ue,(s=Ee())!==a?(44===t.charCodeAt(ue)?(o=",",ue++):(o=a,be(g)),o!==a&&(l=Ee())!==a&&(c=Te())!==a?i=s=[s,o,l,c]:(ue=i,i=a)):(ue=i,i=a);r!==a?e=n=[n].concat(r.map((function(e){return e[3]}))):(ue=e,e=a)}else ue=e,e=a;return he[u]={nextPos:ue,result:e},e}function Te(){var e,t,n,r,i,s,o,l=30*ue+5,c=he[l];if(c)return ue=c.nextPos,c.result;if(e=ue,(t=we())!==a){for(n=[],r=ue,(i=Se())!==a&&(s=we())!==a?r=i=[i,s]:(ue=r,r=a);r!==a;)n.push(r),r=ue,(i=Se())!==a&&(s=we())!==a?r=i=[i,s]:(ue=r,r=a);n!==a?(o=t,e=t=n.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),o)):(ue=e,e=a)}else ue=e,e=a;return he[l]={nextPos:ue,result:e},e}function we(){var e,n,r,i,s,o,l,c=30*ue+6,u=he[c];if(u)return ue=u.nextPos,u.result;if(e=ue,33===t.charCodeAt(ue)?(n="!",ue++):(n=a,be(y)),n===a&&(n=null),n!==a){if(r=[],(i=Ce())!==a)for(;i!==a;)r.push(i),i=Ce();else r=a;r!==a?(s=n,l=1===(o=r).length?o[0]:{type:"compound",selectors:o},s&&(l.subject=!0),e=n=l):(ue=e,e=a)}else ue=e,e=a;return he[c]={nextPos:ue,result:e},e}function Ce(){var e,n=30*ue+7,r=he[n];return r?(ue=r.nextPos,r.result):((e=function(){var e,n,r=30*ue+8,i=he[r];return i?(ue=i.nextPos,i.result):(42===t.charCodeAt(ue)?(n="*",ue++):(n=a,be(_)),n!==a&&(n={type:"wildcard",value:n}),e=n,he[r]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i=30*ue+9,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,35===t.charCodeAt(ue)?(n="#",ue++):(n=a,be(b)),n===a&&(n=null),n!==a&&(r=xe())!==a?e=n={type:"identifier",value:r}:(ue=e,e=a),he[i]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s=30*ue+10,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,91===t.charCodeAt(ue)?(n="[",ue++):(n=a,be(v)),n!==a&&Ee()!==a&&(r=function(){var e,n,r,i,s=30*ue+14,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,(n=Ae())!==a&&Ee()!==a&&(r=function(){var e,n,r,i=30*ue+12,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,33===t.charCodeAt(ue)?(n="!",ue++):(n=a,be(y)),n===a&&(n=null),n!==a?(61===t.charCodeAt(ue)?(r="=",ue++):(r=a,be(O)),r!==a?e=n=T(n):(ue=e,e=a)):(ue=e,e=a),he[i]={nextPos:ue,result:e},e)}())!==a&&Ee()!==a?((i=function(){var e,n,r,i,s,o=30*ue+18,l=he[o];if(l)return ue=l.nextPos,l.result;if(e=ue,"type("===t.substr(ue,5)?(n="type(",ue+=5):(n=a,be(K)),n!==a)if(Ee()!==a){if(r=[],W.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be($)),i!==a)for(;i!==a;)r.push(i),W.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be($));else r=a;r!==a&&(i=Ee())!==a?(41===t.charCodeAt(ue)?(s=")",ue++):(s=a,be(q)),s!==a?e=n={type:"type",value:r.join("")}:(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[o]={nextPos:ue,result:e},e}())===a&&(i=function(){var e,n,r,i,s,o,l=30*ue+20,c=he[l];if(c)return ue=c.nextPos,c.result;if(e=ue,47===t.charCodeAt(ue)?(n="/",ue++):(n=a,be(X)),n!==a){if(r=[],G.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(Z)),i!==a)for(;i!==a;)r.push(i),G.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(Z));else r=a;r!==a?(47===t.charCodeAt(ue)?(i="/",ue++):(i=a,be(X)),i!==a?((s=function(){var e,n,r=30*ue+19,i=he[r];if(i)return ue=i.nextPos,i.result;if(e=[],Q.test(t.charAt(ue))?(n=t.charAt(ue),ue++):(n=a,be(z)),n!==a)for(;n!==a;)e.push(n),Q.test(t.charAt(ue))?(n=t.charAt(ue),ue++):(n=a,be(z));else e=a;return he[r]={nextPos:ue,result:e},e}())===a&&(s=null),s!==a?(o=s,e=n={type:"regexp",value:new RegExp(r.join(""),o?o.join(""):"")}):(ue=e,e=a)):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;return he[l]={nextPos:ue,result:e},e}()),i!==a?e=n=P(n,r,i):(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ae())!==a&&Ee()!==a&&(r=function(){var e,n,r,i=30*ue+11,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,x.test(t.charAt(ue))?(n=t.charAt(ue),ue++):(n=a,be(S)),n===a&&(n=null),n!==a?(61===t.charCodeAt(ue)?(r="=",ue++):(r=a,be(O)),r!==a?e=n=T(n):(ue=e,e=a)):(ue=e,e=a),e===a&&(w.test(t.charAt(ue))?(e=t.charAt(ue),ue++):(e=a,be(C))),he[i]={nextPos:ue,result:e},e)}())!==a&&Ee()!==a?((i=function(){var e,n,r,i,s,o,l=30*ue+15,c=he[l];if(c)return ue=c.nextPos,c.result;if(e=ue,34===t.charCodeAt(ue)?(n='"',ue++):(n=a,be(k)),n!==a){for(r=[],D.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(R)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));i!==a;)r.push(i),D.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(R)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));r!==a?(34===t.charCodeAt(ue)?(i='"',ue++):(i=a,be(k)),i!==a?e=n=M(r):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;if(e===a)if(e=ue,39===t.charCodeAt(ue)?(n="'",ue++):(n=a,be(j)),n!==a){for(r=[],N.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(F)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));i!==a;)r.push(i),N.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(F)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));r!==a?(39===t.charCodeAt(ue)?(i="'",ue++):(i=a,be(j)),i!==a?e=n=M(r):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;return he[l]={nextPos:ue,result:e},e}())===a&&(i=function(){var e,n,r,i,s,o,l,c=30*ue+16,u=he[c];if(u)return ue=u.nextPos,u.result;for(e=ue,n=ue,r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));if(r!==a?(46===t.charCodeAt(ue)?(i=".",ue++):(i=a,be(A)),i!==a?n=r=[r,i]:(ue=n,n=a)):(ue=n,n=a),n===a&&(n=null),n!==a){if(r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V)),i!==a)for(;i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));else r=a;r!==a?(o=r,l=(s=n)?[].concat.apply([],s).join(""):"",e=n={type:"literal",value:parseFloat(l+o.join(""))}):(ue=e,e=a)}else ue=e,e=a;return he[c]={nextPos:ue,result:e},e}())===a&&(i=function(){var e,t,n=30*ue+17,r=he[n];return r?(ue=r.nextPos,r.result):((t=xe())!==a&&(t={type:"literal",value:t}),e=t,he[n]={nextPos:ue,result:e},e)}()),i!==a?e=n=P(n,r,i):(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ae())!==a&&(n={type:"attribute",name:n}),e=n)),he[s]={nextPos:ue,result:e},e)}())!==a&&Ee()!==a?(93===t.charCodeAt(ue)?(i="]",ue++):(i=a,be(E)),i!==a?e=n=r:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s,o,l,c,u=30*ue+21,p=he[u];if(p)return ue=p.nextPos,p.result;if(e=ue,46===t.charCodeAt(ue)?(n=".",ue++):(n=a,be(A)),n!==a)if((r=xe())!==a){for(i=[],s=ue,46===t.charCodeAt(ue)?(o=".",ue++):(o=a,be(A)),o!==a&&(l=xe())!==a?s=o=[o,l]:(ue=s,s=a);s!==a;)i.push(s),s=ue,46===t.charCodeAt(ue)?(o=".",ue++):(o=a,be(A)),o!==a&&(l=xe())!==a?s=o=[o,l]:(ue=s,s=a);i!==a?(c=r,n={type:"field",name:i.reduce((function(e,t){return e+t[0]+t[1]}),c)},e=n):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[u]={nextPos:ue,result:e},e}())===a&&(e=function(){var e,n,r,i,s=30*ue+22,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,":not("===t.substr(ue,5)?(n=":not(",ue+=5):(n=a,be(Y)),n!==a&&Ee()!==a&&(r=Oe())!==a&&Ee()!==a?(41===t.charCodeAt(ue)?(i=")",ue++):(i=a,be(q)),i!==a?e=n={type:"not",selectors:r}:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s=30*ue+23,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,":matches("===t.substr(ue,9)?(n=":matches(",ue+=9):(n=a,be(H)),n!==a&&Ee()!==a&&(r=Oe())!==a&&Ee()!==a?(41===t.charCodeAt(ue)?(i=")",ue++):(i=a,be(q)),i!==a?e=n={type:"matches",selectors:r}:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s=30*ue+24,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,":has("===t.substr(ue,5)?(n=":has(",ue+=5):(n=a,be(J)),n!==a&&Ee()!==a&&(r=Oe())!==a&&Ee()!==a?(41===t.charCodeAt(ue)?(i=")",ue++):(i=a,be(q)),i!==a?e=n={type:"has",selectors:r}:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r=30*ue+25,i=he[r];return i?(ue=i.nextPos,i.result):(":first-child"===t.substr(ue,12)?(n=":first-child",ue+=12):(n=a,be(ee)),n!==a&&(n=Pe(1)),e=n,he[r]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r=30*ue+26,i=he[r];return i?(ue=i.nextPos,i.result):(":last-child"===t.substr(ue,11)?(n=":last-child",ue+=11):(n=a,be(te)),n!==a&&(n=ke(1)),e=n,he[r]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s,o=30*ue+27,l=he[o];if(l)return ue=l.nextPos,l.result;if(e=ue,":nth-child("===t.substr(ue,11)?(n=":nth-child(",ue+=11):(n=a,be(ne)),n!==a)if(Ee()!==a){if(r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V)),i!==a)for(;i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));else r=a;r!==a&&(i=Ee())!==a?(41===t.charCodeAt(ue)?(s=")",ue++):(s=a,be(q)),s!==a?e=n=Pe(parseInt(r.join(""),10)):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[o]={nextPos:ue,result:e},e}())===a&&(e=function(){var e,n,r,i,s,o=30*ue+28,l=he[o];if(l)return ue=l.nextPos,l.result;if(e=ue,":nth-last-child("===t.substr(ue,16)?(n=":nth-last-child(",ue+=16):(n=a,be(re)),n!==a)if(Ee()!==a){if(r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V)),i!==a)for(;i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));else r=a;r!==a&&(i=Ee())!==a?(41===t.charCodeAt(ue)?(s=")",ue++):(s=a,be(q)),s!==a?e=n=ke(parseInt(r.join(""),10)):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[o]={nextPos:ue,result:e},e}())===a&&(e=function(){var e,n,r,i=30*ue+29,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,58===t.charCodeAt(ue)?(n=":",ue++):(n=a,be(ie)),n!==a?("statement"===t.substr(ue,9).toLowerCase()?(r=t.substr(ue,9),ue+=9):(r=a,be(se)),r===a&&("expression"===t.substr(ue,10).toLowerCase()?(r=t.substr(ue,10),ue+=10):(r=a,be(oe)),r===a&&("declaration"===t.substr(ue,11).toLowerCase()?(r=t.substr(ue,11),ue+=11):(r=a,be(ae)),r===a&&("function"===t.substr(ue,8).toLowerCase()?(r=t.substr(ue,8),ue+=8):(r=a,be(le)),r===a&&("pattern"===t.substr(ue,7).toLowerCase()?(r=t.substr(ue,7),ue+=7):(r=a,be(ce)))))),r!==a?e=n={type:"class",name:r}:(ue=e,e=a)):(ue=e,e=a),he[i]={nextPos:ue,result:e},e)}()),he[n]={nextPos:ue,result:e},e)}function Ae(){var e,n,r,i,s,o,l,c,u=30*ue+13,p=he[u];if(p)return ue=p.nextPos,p.result;if(e=ue,(n=xe())!==a){for(r=[],i=ue,46===t.charCodeAt(ue)?(s=".",ue++):(s=a,be(A)),s!==a&&(o=xe())!==a?i=s=[s,o]:(ue=i,i=a);i!==a;)r.push(i),i=ue,46===t.charCodeAt(ue)?(s=".",ue++):(s=a,be(A)),s!==a&&(o=xe())!==a?i=s=[s,o]:(ue=i,i=a);r!==a?(l=n,c=r,e=n=[].concat.apply([l],c).join("")):(ue=e,e=a)}else ue=e,e=a;return he[u]={nextPos:ue,result:e},e}function Pe(e){return{type:"nth-child",index:{type:"literal",value:e}}}function ke(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((r=c())!==a&&ue===t.length)return r;throw r!==a&&ue0&&l(e,t,n))&&a(t[0],t.slice(1),n)};case"descendant":var c=bT(e.left),u=bT(e.right);return function(e,t,n){if(u(e,t,n))for(var r=0,i=t.length;r":return function(t){return aT(t,p)>e.value.value};case">=":return function(t){return aT(t,p)>=e.value.value}}throw new Error("Unknown operator: ".concat(e.operator));case"sibling":var h=bT(e.left),m=bT(e.right);return function(t,n,r){return m(t,n,r)&&ST(t,h,n,"LEFT_SIDE",r)||e.left.subject&&h(t,n,r)&&ST(t,m,n,"RIGHT_SIDE",r)};case"adjacent":var g=bT(e.left),y=bT(e.right);return function(t,n,r){return y(t,n,r)&&OT(t,g,n,"LEFT_SIDE",r)||e.right.subject&&g(t,n,r)&&OT(t,y,n,"RIGHT_SIDE",r)};case"nth-child":var _=e.index.value,b=bT(e.right);return function(e,t,n){return b(e,t,n)&&TT(e,t,_,n)};case"nth-last-child":var v=-e.index.value,E=bT(e.right);return function(e,t,n){return E(e,t,n)&&TT(e,t,v,n)};case"class":var x=e.name.toLowerCase();return function(t,n){switch(x){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===n.length||"MetaProperty"!==n[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(e.name))}}throw new Error("Unknown selector type: ".concat(e.type))}function ET(e,t){var n=e.type;return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:sT.VisitorKeys[n]?sT.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return"type"!==e}))}function xT(e){return null!==e&&"object"===JO(e)&&"string"==typeof e.type}function ST(e,t,n,r,i){var s=eT(n,1)[0];if(!s)return!1;for(var o=ET(s,i),a=0;a0&&xT(l[c-1])&&t(l[c-1],n,i))return!0;if("RIGHT_SIDE"===r&&c=0&&le));return n.length?function(...e){if(0===e.length)return[];let t=[...new Set(e[0])];for(const n of e.slice(1))t=t.filter((e=>n.includes(e)));return t}(...n):null}case"child":case"descendant":case"sibling":case"adjacent":return t(e.right);case"class":return"function"===e.name?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function n(e){switch(e.type){case"child":case"descendant":case"sibling":case"adjacent":return n(e.left)+n(e.right);case"compound":case"not":case"matches":return e.selectors.reduce(((e,t)=>e+n(t)),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function r(e){switch(e.type){case"child":case"descendant":case"sibling":case"adjacent":return r(e.left)+r(e.right);case"compound":case"not":case"matches":return e.selectors.reduce(((e,t)=>e+r(t)),0);case"identifier":return 1;default:return 0}}function i(e,t){return e.attributeCount-t.attributeCount||e.identifierCount-t.identifierCount||(e.rawSelector<=t.rawSelector?-1:1)}const s=new Map;function o(i){if(s.has(i))return s.get(i);const o=function(t){try{return e.parse(t.replace(/:exit$/u,""))}catch(e){if(e.location&&e.location.start&&"number"==typeof e.location.start.offset)throw new SyntaxError(`Syntax error in selector "${t}" at position ${e.location.start.offset}: ${e.message}`);throw e}}(i),a={rawSelector:i,isExit:i.endsWith(":exit"),parsedSelector:o,listenerTypes:t(o),attributeCount:n(o),identifierCount:r(o)};return s.set(i,a),a}return lT=class{constructor(e,t){this.emitter=e,this.esqueryOptions=t,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],e.eventNames().forEach((e=>{const t=o(e);if(t.listenerTypes){const e=t.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;return void t.listenerTypes.forEach((n=>{e.has(n)||e.set(n,[]),e.get(n).push(t)}))}(t.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(t)})),this.anyTypeEnterSelectors.sort(i),this.anyTypeExitSelectors.sort(i),this.enterSelectorsByNodeType.forEach((e=>e.sort(i))),this.exitSelectorsByNodeType.forEach((e=>e.sort(i)))}applySelector(t,n){e.matches(t,n.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(n.rawSelector,t)}applySelectors(e,t){const n=(t?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(e.type)||[],r=t?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let s=0,o=0;for(;s=n.length||ot?e.replace(/\{\{([^{}]+?)\}\}/gu,((e,n)=>{const r=n.trim();return r in t?t[r]:e})):e),dT}function RT(){if(mT)return hT;mT=1;const e=Fb,t=function(){if(pT)return uT;function e(e,t){return{range:[e,e],text:t}}pT=1;const t=Object.freeze({insertTextAfter(e,t){return this.insertTextAfterRange(e.range,t)},insertTextAfterRange(t,n){return e(t[1],n)},insertTextBefore(e,t){return this.insertTextBeforeRange(e.range,t)},insertTextBeforeRange(t,n){return e(t[0],n)},replaceText(e,t){return this.replaceTextRange(e.range,t)},replaceTextRange(e,t){return{range:e,text:t}},remove(e){return this.removeRange(e.range)},removeRange(e){return{range:e,text:""}}});return uT=t}(),n=DT();function r(e){return e.loc?e.loc.start?e.loc:{start:e.loc,end:null}:e.node.loc}function i(e){return e?{range:[e.range[0],e.range[1]],text:e.text}:null}function s(t){t&&e(t.range&&"number"==typeof t.range[0]&&"number"==typeof t.range[1],`Fix has invalid range: ${JSON.stringify(t,null,2)}`)}function o(e,t){return e.range[0]-t.range[0]||e.range[1]-t.range[1]}function a(n,r){if("function"!=typeof n.fix)return null;const a=n.fix(t);return a&&Symbol.iterator in a?function(t,n){for(const e of t)s(e);if(0===t.length)return null;if(1===t.length)return i(t[0]);t.sort(o);const r=n.text,a=t[0].range[0],l=t[t.length-1].range[1];let c="",u=Number.MIN_SAFE_INTEGER;for(const n of t)e(n.range[0]>=u,"Fix objects must not be overlapped in a report."),n.range[0]>=0&&(c+=r.slice(Math.max(0,a,u),n.range[0])),c+=n.text,u=n.range[1];return c+=r.slice(Math.max(0,a,u),l),{range:[a,l],text:c}}(Array.from(a),r):(s(a),i(a))}function l(e,t,r){return e.suggest&&Array.isArray(e.suggest)?e.suggest.map((e=>{const i=e.desc||r[e.messageId];return{...e,desc:n(i,e.data),fix:a(e,t)}})).filter((({fix:e})=>e)):[]}return hT=function(t){return(...i)=>{const s=function(...e){return 1===e.length?Object.assign({},e[0]):"string"==typeof e[1]?{node:e[0],message:e[1],data:e[2],fix:e[3]}:{node:e[0],loc:e[1],message:e[2],data:e[3],fix:e[4]}}(...i),o=t.messageIds;let c;if(function(t){t.node?e("object"==typeof t.node,"Node must be an object"):e(t.loc,"Node must be provided when reporting error if location is not provided")}(s),s.messageId){if(!o)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const e=s.messageId;if(s.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!o||!Object.prototype.hasOwnProperty.call(o,e))throw new TypeError(`context.report() called with a messageId of '${e}' which is not present in the 'messages' config: ${JSON.stringify(o,null,2)}`);c=o[e]}else{if(!s.message)throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");c=s.message}return function(e,t){e&&Array.isArray(e)&&e.forEach((e=>{if(e.messageId){const{messageId:n}=e;if(!t)throw new TypeError(`context.report() called with a suggest option with a messageId '${n}', but no messages were present in the rule metadata.`);if(!t[n])throw new TypeError(`context.report() called with a suggest option with a messageId '${n}' which is not present in the 'messages' config: ${JSON.stringify(t,null,2)}`);if(e.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!e.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if("function"!=typeof e.fix)throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${e}`)}))}(s.suggest,o),function(e){const t={ruleId:e.ruleId,severity:e.severity,message:e.message,line:e.loc.start.line,column:e.loc.start.column+1,nodeType:e.node&&e.node.type||null};return e.messageId&&(t.messageId=e.messageId),e.loc.end&&(t.endLine=e.loc.end.line,t.endColumn=e.loc.end.column+1),e.fix&&(t.fix=e.fix),e.suggestions&&e.suggestions.length>0&&(t.suggestions=e.suggestions),t}({ruleId:t.ruleId,severity:t.severity,node:s.node,message:n(c,s.data),messageId:s.messageId,loc:r(s),fix:t.disableFixes?null:a(s,t.sourceCode),suggestions:t.disableFixes?[]:l(s,t.sourceCode,o)})}},hT}PT.parse=AT,PT.match=CT,PT.traverse=wT,PT.matches=function(e,t,n,r){return!t||!!e&&(n||(n=[]),bT(t)(e,n,r))},PT.query=PT;var IT,LT={exports:{}},BT={},MT={exports:{}};var jT,NT={exports:{}};function FT(){return jT||(jT=1,function(){var e,t,n,r,i,s;function o(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},e={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},n=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],r=new Array(128),s=0;s<128;++s)r[s]=s>=97&&s<=122||s>=65&&s<=90||36===s||95===s;for(i=new Array(128),s=0;s<128;++s)i[s]=s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||36===s||95===s;NT.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&n.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?r[e]:t.NonAsciiIdentifierStart.test(o(e))},isIdentifierPartES5:function(e){return e<128?i[e]:t.NonAsciiIdentifierPart.test(o(e))},isIdentifierStartES6:function(t){return t<128?r[t]:e.NonAsciiIdentifierStart.test(o(t))},isIdentifierPartES6:function(t){return t<128?i[t]:e.NonAsciiIdentifierPart.test(o(t))}}}()),NT.exports}var UT,VT,KT,WT,$T,qT,QT,zT,XT,GT,ZT,YT,HT,JT,ew,tw,nw,rw,iw,sw,ow,aw,lw,cw,uw,pw,dw,fw,hw,mw,gw,yw,_w,bw,vw,Ew,xw,Sw,Ow,Tw,ww,Cw={exports:{}};function Aw(){return VT||(VT=1,BT.ast=(IT||(IT=1,function(){function e(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function t(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}MT.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:e,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(t){return e(t)||null!=t&&"FunctionDeclaration"===t.type},isProblematicIfStatement:function(e){var n;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;n=e.consequent;do{if("IfStatement"===n.type&&null==n.alternate)return!0;n=t(n)}while(n);return!1},trailingStatement:t}}()),MT.exports),BT.code=FT(),BT.keyword=(UT||(UT=1,function(){var e=FT();function t(e,t){return!(!t&&"yield"===e)&&n(e,t)}function n(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function r(e,n){return"null"===e||"true"===e||"false"===e||t(e,n)}function i(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function s(t){var n,r,i;if(0===t.length)return!1;if(i=t.charCodeAt(0),!e.isIdentifierStartES5(i))return!1;for(n=1,r=t.length;n=r)return!1;if(!(56320<=(s=t.charCodeAt(n))&&s<=57343))return!1;i=1024*(i-55296)+(s-56320)+65536}if(!o(i))return!1;o=e.isIdentifierPartES6}return!0}Cw.exports={isKeywordES5:t,isKeywordES6:n,isReservedWordES5:r,isReservedWordES6:i,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:s,isIdentifierNameES6:o,isIdentifierES5:function(e,t){return s(e)&&!r(e,t)},isIdentifierES6:function(e,t){return o(e)&&!i(e,t)}}}()),Cw.exports)),BT}function Pw(){return KT||(KT=1,function(e){const{KEYS:t}=lv(),n=Aw(),r=bv(),i=YO(),{breakableTypePattern:s,createGlobalLinebreakMatcher:o,lineBreakPattern:a,shebangPattern:l}=Av(),c=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,u=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,p=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,d=/Array$/u,f=/^(?:bind|call|apply)$/u,h=/^[\s*]*@this/mu,m=/^(?:eslint[- ]|(?:globals?|exported) )/u,g=new Set(["\r\n","\r","\n","\u2028","\u2029"]),y=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),_=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,b=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,v=new Set(["&&=","||=","??="]);function E(e,t,n){const r=e.identifier,i=0===t||n[t-1].identifier!==r;return r&&!1===e.init&&e.isWrite()&&i}function x(e){return e[0]!==e[0].toLocaleLowerCase()}function S(e){return e.id&&x(e.id.name)}function O(e){for(let t=e;t;t=t.parent)if(c.test(t.type))return t;return null}function T(e){return Boolean(e&&c.test(e.type))}function w(e){return Boolean(e&&u.test(e.type))}function C(e){return"Literal"===e.type&&null===e.value&&!e.regex&&!e.bigint}function A(e){return C(e)||"Identifier"===e.type&&"undefined"===e.name||"UnaryExpression"===e.type&&"void"===e.operator}function P(e){return"CallExpression"===e.parent.type&&e.parent.callee===e}function k(e){switch(e.type){case"Literal":if(null!==e.value)return String(e.value);if(C(e))return String(e.value);if(e.regex)return`/${e.regex.pattern}/${e.regex.flags}`;if(e.bigint)return e.bigint;break;case"TemplateLiteral":if(0===e.expressions.length&&1===e.quasis.length)return e.quasis[0].value.cooked}return null}function D(e){let t;switch(e&&e.type){case"ChainExpression":return D(e.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":t=e.key;break;case"MemberExpression":t=e.property}return t?"Identifier"!==t.type||e.computed?k(t):t.name:null}function R(e){return e&&"ChainExpression"===e.type?e.expression:e}function I(e,t){return"string"==typeof t?e===t:t.test(e)}function L(e,t){return"Identifier"===e.type&&I(e.name,t)}function B(e,t,n){const r=R(e);if("MemberExpression"!==r.type)return!1;if(t&&!L(r.object,t))return!1;if(n){const e=D(r);if("string"!=typeof e||!I(e,n))return!1}return!0}function M(e,t){return e.regex||t.regex?Boolean(e.regex&&t.regex&&e.regex.pattern===t.regex.pattern&&e.regex.flags===t.regex.flags):e.bigint||t.bigint?e.bigint===t.bigint:e.value===t.value}function j(e){return B(e,"Reflect","apply")}function N(e){return B(e,d,"from")}function F(e){return B(e,null,p)}function U(e){return t=>!e(t)}function V(e){return"=>"===e.value&&"Punctuator"===e.type}function K(e){return","===e.value&&"Punctuator"===e.type}function W(e){return"."===e.value&&"Punctuator"===e.type}function $(e){return"?."===e.value&&"Punctuator"===e.type}function q(e){return";"===e.value&&"Punctuator"===e.type}function Q(e){return":"===e.value&&"Punctuator"===e.type}function z(e){return"("===e.value&&"Punctuator"===e.type}function X(e){return")"===e.value&&"Punctuator"===e.type}function G(e){return"["===e.value&&"Punctuator"===e.type}function Z(e){return"]"===e.value&&"Punctuator"===e.type}function Y(e){return"{"===e.value&&"Punctuator"===e.type}function H(e){return"}"===e.value&&"Punctuator"===e.type}function J(e,t){if("ArrowFunctionExpression"===e.type&&1===e.params.length){const n=t.getFirstToken(e.params[0]),r=t.getTokenBefore(n);return z(r)?r:n}return e.id?t.getTokenAfter(e.id,z):t.getFirstToken(e,z)}function ee(e){return"LogicalExpression"===e.type&&("&&"===e.operator||"||"===e.operator)}function te(e){return"LogicalExpression"===e.type&&"??"===e.operator}function ne(e){return null===e.value?"null"!==e.raw&&("object"==typeof e.regex||null):!!e.value}function re(e,t){switch(e.type){case"Literal":return"||"===t&&!0===ne(e)||"&&"===t&&!1===ne(e);case"UnaryExpression":return"&&"===t&&"void"===e.operator;case"LogicalExpression":return t===e.operator&&(re(e.left,t)||re(e.right,t));case"AssignmentExpression":return["||=","&&="].includes(e.operator)&&t===e.operator.slice(0,-1)&&re(e.right,t)}return!1}function ie(e,t){const n=e.references.find((e=>e.identifier===t));return Boolean(n&&n.resolved&&"global"===n.resolved.scope.type&&0===n.resolved.defs.length)}let se;{const e=new Set(["BreakStatement","ContinueStatement"]),t=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),n=new Set(["Identifier","Keyword"]),r={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},i=new Set([":",";","{","=>","++","--"]),s=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);se=function(o,a){const l=o.getTokenBefore(a);if(!l||"Punctuator"===l.type&&i.has(l.value))return!1;const c=o.getNodeByRangeIndex(l.range[0]);if(X(l))return!s.has(c.type);if(H(l))return"BlockStatement"===c.type&&"FunctionExpression"===c.parent.type||"ClassBody"===c.type&&"ClassExpression"===c.parent.type||"ObjectExpression"===c.type;if(n.has(l.type)){if(e.has(c.parent.type))return!1;const t=l.value,n=r[t];return c.type!==n}return"String"!==l.type||!t.has(c.parent.type)}}e.exports={COMMENTS_IGNORE_PATTERN:/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,LINEBREAKS:g,LINEBREAK_MATCHER:a,SHEBANG_MATCHER:l,STATEMENT_LIST_PARENTS:y,isTokenOnSameLine(e,t){return e.loc.end.line===t.loc.start.line},isNullOrUndefined:A,isCallee:P,isES5Constructor:S,getUpperFunction:O,isFunction:T,isLoop:w,isInLoop:function(e){for(let t=e;t&&!T(t);t=t.parent)if(w(t))return!0;return!1},isArrayFromMethod:N,isParenthesised:function(e,t){const n=e.getTokenBefore(t),r=e.getTokenAfter(t);return Boolean(n&&r)&&"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]},createGlobalLinebreakMatcher:o,equalTokens:function(e,t,n){const r=n.getTokens(e),i=n.getTokens(t);if(r.length!==i.length)return!1;for(let e=0;eh.test(e.value)))}(e,t))return!1;const r=null===e.id;let i=e;for(;i;){const e=i.parent;switch(e.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":i=e;break;case"ReturnStatement":{const t=O(e);if(null===t||!P(t))return!0;i=t.parent;break}case"ArrowFunctionExpression":if(i!==e.body||!P(e))return!0;i=e.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return e.value!==i;case"AssignmentExpression":case"AssignmentPattern":return"MemberExpression"!==e.left.type&&!(n&&r&&"Identifier"===e.left.type&&x(e.left.name));case"VariableDeclarator":return!(n&&r&&e.init===i&&"Identifier"===e.id.type&&x(e.id.name));case"MemberExpression":if(e.object===i&&B(e,null,f)){const t="ChainExpression"===e.parent.type?e.parent:e;return!(P(t)&&t.parent.arguments.length>=1&&!A(t.parent.arguments[0]))}return!0;case"CallExpression":return j(e.callee)?3!==e.arguments.length||e.arguments[0]!==i||A(e.arguments[1]):N(e.callee)?3!==e.arguments.length||e.arguments[1]!==i||A(e.arguments[2]):!F(e.callee)||(2!==e.arguments.length||e.arguments[0]!==i||A(e.arguments[1]));default:return!0}}return!0},getPrecedence(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(e.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return e.type in t?20:-1}},isEmptyBlock(e){return Boolean(e&&"BlockStatement"===e.type&&0===e.body.length)},isEmptyFunction(t){return T(t)&&e.exports.isEmptyBlock(t.body)},getDirectivePrologue(e){const t=[];if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type){const n="Program"===e.type?e.body:e.body.body;for(const e of n){if("ExpressionStatement"!==e.type||"Literal"!==e.expression.type)break;t.push(e)}}return t},isDecimalInteger(e){return"Literal"===e.type&&"number"==typeof e.value&&_.test(e.raw)},isDecimalIntegerNumericToken(e){return"Numeric"===e.type&&_.test(e.value)},getFunctionNameWithKind(e){const t=e.parent,n=[];if("MethodDefinition"!==t.type&&"PropertyDefinition"!==t.type||(t.static&&n.push("static"),t.computed||"PrivateIdentifier"!==t.key.type||n.push("private")),e.async&&n.push("async"),e.generator&&n.push("generator"),"Property"===t.type||"MethodDefinition"===t.type){if("constructor"===t.kind)return"constructor";"get"===t.kind?n.push("getter"):"set"===t.kind?n.push("setter"):n.push("method")}else"PropertyDefinition"===t.type?n.push("method"):("ArrowFunctionExpression"===e.type&&n.push("arrow"),n.push("function"));if("Property"===t.type||"MethodDefinition"===t.type||"PropertyDefinition"===t.type)if(t.computed||"PrivateIdentifier"!==t.key.type){const r=D(t);null!==r?n.push(`'${r}'`):e.id&&n.push(`'${e.id.name}'`)}else n.push(`#${t.key.name}`);else e.id&&n.push(`'${e.id.name}'`);return n.join(" ")},getFunctionHeadLoc(e,t){const n=e.parent;let r=null,i=null;if("Property"===n.type||"MethodDefinition"===n.type||"PropertyDefinition"===n.type)r=n.loc.start,i=J(e,t).loc.start;else if("ArrowFunctionExpression"===e.type){const n=t.getTokenBefore(e.body,V);r=n.loc.start,i=n.loc.end}else r=e.loc.start,i=J(e,t).loc.start;return{start:Object.assign({},r),end:Object.assign({},i)}},getNextLocation(e,{line:t,column:n}){return ni.range[0])&&(i=e)}}else i=e;if("Shebang"===i.type||"Hashbang"===i.type)return!1;if("string"==typeof t){let e;try{e=r.tokenize(t,n)}catch{return!1}const i=e.comments;if(s=e[0],i.length){const e=i[0];(!s||e.range[0]e.value.cooked.length))||n.expressions.every((n=>e(t,n,!1)));case"ArrayExpression":return!!r||n.elements.every((n=>e(t,n,!1)));case"UnaryExpression":return!!("void"===n.operator||"typeof"===n.operator&&r)||("!"===n.operator?e(t,n.argument,!0):e(t,n.argument,!1));case"BinaryExpression":return e(t,n.left,!1)&&e(t,n.right,!1)&&"in"!==n.operator;case"LogicalExpression":{const i=e(t,n.left,r),s=e(t,n.right,r),o=i&&re(n.left,n.operator),a=r&&s&&re(n.right,n.operator);return i&&s||o||a}case"NewExpression":return r;case"AssignmentExpression":return"="===n.operator?e(t,n.right,r):!(!["||=","&&="].includes(n.operator)||!r)&&re(n.right,n.operator.slice(0,-1));case"SequenceExpression":return e(t,n.expressions[n.expressions.length-1],r);case"SpreadElement":return e(t,n.argument,r);case"CallExpression":return!("Identifier"!==n.callee.type||"Boolean"!==n.callee.name||0!==n.arguments.length&&!e(t,n.arguments[0],!0))&&ie(t,n.callee);case"Identifier":return"undefined"===n.name&&ie(t,n)}return!1},isTopLevelExpressionStatement:function(e){if("ExpressionStatement"!==e.type)return!1;const t=e.parent;return"Program"===t.type||"BlockStatement"===t.type&&T(t.parent)},isDirective:function(e){return"ExpressionStatement"===e.type&&"string"==typeof e.directive},isStartOfExpressionStatement:function(e){const t=e.range[0];let n=e;for(;(n=n.parent)&&n.range[0]===t;)if("ExpressionStatement"===n.type)return!0;return!1},needsPrecedingSemicolon:se}}(LT)),LT.exports}function kw(){if($T)return WT;$T=1;const e=Pw();function t(e){return"get"===e.kind||"set"===e.kind}function n(t,n,r,i){const s=t.parent;return"CallExpression"===s.type&&e.isSpecificMemberAccess(s.callee,r,i)&&s.arguments[n]===t}return WT={meta:{type:"suggestion",docs:{description:"Enforce getter and setter pairs in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/accessor-pairs"},schema:[{type:"object",properties:{getWithoutSet:{type:"boolean",default:!1},setWithoutGet:{type:"boolean",default:!0},enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingGetterInPropertyDescriptor:"Getter is not present in property descriptor.",missingSetterInPropertyDescriptor:"Setter is not present in property descriptor.",missingGetterInObjectLiteral:"Getter is not present for {{ name }}.",missingSetterInObjectLiteral:"Setter is not present for {{ name }}.",missingGetterInClass:"Getter is not present for class {{ name }}.",missingSetterInClass:"Setter is not present for class {{ name }}."}},create(r){const i=r.options[0]||{},s=!0===i.getWithoutSet,o=!1!==i.setWithoutGet,a=!1!==i.enforceForClassMembers,l=r.sourceCode;function c(t,n){"Property"===t.type?r.report({node:t,messageId:`${n}InObjectLiteral`,loc:e.getFunctionHeadLoc(t.value,l),data:{name:e.getFunctionNameWithKind(t.value)}}):"MethodDefinition"===t.type?r.report({node:t,messageId:`${n}InClass`,loc:e.getFunctionHeadLoc(t.value,l),data:{name:e.getFunctionNameWithKind(t.value)}}):r.report({node:t,messageId:`${n}InPropertyDescriptor`})}function u(e,t){for(const n of e)c(n,t)}function p(n){const r=[];let i=!1;for(let s=0;s"Property"===e.type)))}(e),function(e){if(n(e,2,"Object","defineProperty")||n(e,2,"Reflect","defineProperty"))return!0;const t=e.parent.parent;return"ObjectExpression"===t.type&&(n(t,1,"Object","create")||n(t,1,"Object","defineProperties"))}(e)&&function(e){const t=new Set(e.properties.filter((e=>"Property"===e.type&&"init"===e.kind&&!e.computed)).map((({key:e})=>e.name))),n=t.has("get"),r=t.has("set");o&&r&&!n&&c(e,"missingGetter"),s&&n&&!r&&c(e,"missingSetter")}(e)},a&&(d.ClassBody=function(e){const t=e.body.filter((e=>"MethodDefinition"===e.type));p(t.filter((e=>e.static))),p(t.filter((e=>!e.static)))})),d}},WT}function Dw(){if(QT)return qT;QT=1;const e=Pw();return qT={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(t){const n=t.sourceCode;function r(e){const t=function(e){let t=!1,n=!1,r=0;return e?"consistent"===e?(t=!0,r=Number.POSITIVE_INFINITY):"always"===e||0===e.minItems?r=0:"never"===e?r=Number.POSITIVE_INFINITY:(n=Boolean(e.multiline),r=e.minItems||Number.POSITIVE_INFINITY):(t=!1,n=!0,r=Number.POSITIVE_INFINITY),{consistent:t,multiline:n,minItems:r}}(e);return{ArrayExpression:t,ArrayPattern:t}}function i(i){const s=i.elements,o=r(t.options[0])[i.type],a=n.getFirstToken(i),l=n.getLastToken(i),c=n.getTokenAfter(a,{includeComments:!0}),u=n.getTokenBefore(l,{includeComments:!0}),p=n.getTokenAfter(a),d=n.getTokenBefore(l);s.length>=o.minItems||o.multiline&&s.length>0&&c.loc.start.line!==u.loc.end.line||0===s.length&&"Block"===c.type&&c.loc.start.line!==u.loc.end.line&&c===u||o.consistent&&a.loc.end.line!==p.loc.start.line?(e.isTokenOnSameLine(a,p)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingOpeningLinebreak",fix(e){return e.insertTextAfter(n,"\n")}})}(i,a),e.isTokenOnSameLine(d,l)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingClosingLinebreak",fix(e){return e.insertTextBefore(n,"\n")}})}(i,l)):(e.isTokenOnSameLine(a,p)||function(r,i){t.report({node:r,loc:i.loc,messageId:"unexpectedOpeningLinebreak",fix(t){const r=n.getTokenAfter(i,{includeComments:!0});return e.isCommentToken(r)?null:t.removeRange([i.range[1],r.range[0]])}})}(i,a),e.isTokenOnSameLine(d,l)||function(r,i){t.report({node:r,loc:i.loc,messageId:"unexpectedClosingLinebreak",fix(t){const r=n.getTokenBefore(i,{includeComments:!0});return e.isCommentToken(r)?null:t.removeRange([r.range[1],i.range[0]])}})}(i,l))}return{ArrayPattern:i,ArrayExpression:i}}},qT}function Rw(){if(XT)return zT;XT=1;const e=Pw();return zT={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(t){const n="always"===t.options[0],r=t.sourceCode;function i(e){return!!t.options[1]&&t.options[1][e]===!n}const s={spaced:n,singleElementException:i("singleValue"),objectsInArraysException:i("objectsInArrays"),arraysInArraysException:i("arraysInArrays")};function o(e){return e&&("ObjectExpression"===e.type||"ObjectPattern"===e.type)}function a(e){return e&&("ArrayExpression"===e.type||"ArrayPattern"===e.type)}function l(n){if(s.spaced&&0===n.elements.length)return;const i=r.getFirstToken(n),l=r.getFirstToken(n,1),c=n.typeAnnotation?r.getTokenBefore(n.typeAnnotation):r.getLastToken(n),u=r.getTokenBefore(c),p=n.elements[0],d=n.elements[n.elements.length-1],f=s.objectsInArraysException&&o(p)||s.arraysInArraysException&&a(p)||s.singleElementException&&1===n.elements.length?!s.spaced:s.spaced,h=s.objectsInArraysException&&o(d)||s.arraysInArraysException&&a(d)||s.singleElementException&&1===n.elements.length?!s.spaced:s.spaced;e.isTokenOnSameLine(i,l)&&(f&&!r.isSpaceBetweenTokens(i,l)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingSpaceAfter",data:{tokenValue:n.value},fix(e){return e.insertTextAfter(n," ")}})}(n,i),!f&&r.isSpaceBetweenTokens(i,l)&&function(e,n){const i=r.getTokenAfter(n);t.report({node:e,loc:{start:n.loc.end,end:i.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:n.value},fix(e){return e.removeRange([n.range[1],i.range[0]])}})}(n,i)),i!==u&&e.isTokenOnSameLine(u,c)&&(h&&!r.isSpaceBetweenTokens(u,c)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingSpaceBefore",data:{tokenValue:n.value},fix(e){return e.insertTextBefore(n," ")}})}(n,c),!h&&r.isSpaceBetweenTokens(u,c)&&function(e,n){const i=r.getTokenBefore(n);t.report({node:e,loc:{start:i.loc.end,end:n.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:n.value},fix(e){return e.removeRange([i.range[1],n.range[0]])}})}(n,c))}return{ArrayPattern:l,ArrayExpression:l}}},zT}function Iw(){if(ZT)return GT;ZT=1;const e=Pw(),t=/^(?:Arrow)?FunctionExpression$/u,n=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function r(t){return e.isSpecificMemberAccess(t,null,n)}function i(e){return["from","of","isArray"].includes(e)?"Array.".concat(e):"Array.prototype.".concat(e)}function s(e){return"UnaryExpression"===e.type&&"void"===e.operator}function o(t,n,r){const i=e.getPrecedence(n)"Keyword"===e.type&&"return"===e.value),o=t.getTokenAfter(s),a="return"===s.value&&s.range[1]===o.range[0];return[r.insertTextBefore(o,`${a?" ":""}void ${i?"(":""}`),r.insertTextAfter(n,i?")":"")]}function a(t,n,r){const i=t.getTokenBefore(n.body,e.isArrowToken),s=t.getTokenAfter(i),o=t.getLastToken(n);return[r.insertTextBefore(s,"{"),r.insertTextAfter(o,"}")]}return GT={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(n){const l=n.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},c=n.sourceCode;let u={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function p(t){if(!u.shouldCheck)return;const r={messageId:"",suggest:[]};if("forEach"===u.arrayMethodName){if(l.checkForEach&&"ArrowFunctionExpression"===t.type&&t.expression)if(l.allowVoid){if(s(t.body))return;r.messageId="expectedNoReturnValue",r.suggest=[{messageId:"wrapBraces",fix(e){return a(c,t,e)}},{messageId:"prependVoid",fix(e){return o(c,t.body,e)}}]}else r.messageId="expectedNoReturnValue",r.suggest=[{messageId:"wrapBraces",fix(e){return a(c,t,e)}}]}else"BlockStatement"===t.body.type&&function(e){for(const t of e)if(t.reachable)return!0;return!1}(u.currentSegments)&&(r.messageId=u.hasReturn?"expectedAtEnd":"expectedInside");if(r.messageId){const s=e.getFunctionNameWithKind(t);n.report({node:t,loc:e.getFunctionHeadLoc(t,c),messageId:r.messageId,data:{name:s,arrayMethodName:i(u.arrayMethodName)},suggest:0!==r.suggest.length?r.suggest:null})}}return{onCodePathStart(n,i){let s=null;t.test(i.type)&&(s=function(t){let n=t;for(;n;){const t=n.parent;switch(t.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":n=t;break;case"ReturnStatement":{const r=e.getUpperFunction(t);if(null===r||!e.isCallee(r))return null;n=r.parent;break}case"CallExpression":return e.isArrayFromMethod(t.callee)&&t.arguments.length>=2&&t.arguments[1]===n?"from":r(t.callee)&&t.arguments.length>=1&&t.arguments[0]===n?e.getStaticPropertyName(t.callee):null;default:return null}}return null}(i)),u={arrayMethodName:s,upper:u,codePath:n,hasReturn:!1,shouldCheck:s&&!i.async&&!i.generator,node:i,currentSegments:new Set}},onCodePathEnd(){u=u.upper},onUnreachableCodePathSegmentStart(e){u.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){u.currentSegments.delete(e)},onCodePathSegmentStart(e){u.currentSegments.add(e)},onCodePathSegmentEnd(e){u.currentSegments.delete(e)},ReturnStatement(t){if(!u.shouldCheck)return;u.hasReturn=!0;const r={messageId:"",suggest:[]};if("forEach"===u.arrayMethodName){if(l.checkForEach&&t.argument)if(l.allowVoid){if(s(t.argument))return;r.messageId="expectedNoReturnValue",r.suggest=[{messageId:"prependVoid",fix(e){return o(c,t.argument,e)}}]}else r.messageId="expectedNoReturnValue"}else l.allowImplicit||t.argument||(r.messageId="expectedReturnValue");r.messageId&&n.report({node:t,messageId:r.messageId,data:{name:e.getFunctionNameWithKind(u.node),arrayMethodName:i(u.arrayMethodName)},suggest:0!==r.suggest.length?r.suggest:null})},"FunctionExpression:exit":p,"ArrowFunctionExpression:exit":p}}},GT}function Lw(){if(HT)return YT;HT=1;const e=Pw();return YT={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(t){const n=t.sourceCode;function r(e){let t,n=!1,r=!1;const i=e||"always";return i&&"always"!==i&&0!==i.minItems?"never"===i?t=Number.POSITIVE_INFINITY:"consistent"===i?(n=!0,t=Number.POSITIVE_INFINITY):(r=Boolean(i.multiline),t=i.minItems||Number.POSITIVE_INFINITY):t=0,{consistent:n,multiline:r,minItems:t}}function i(i){const s=i.elements,o=function(e){if(e&&(e.ArrayExpression||e.ArrayPattern)){let t,n;return e.ArrayExpression&&(t=r(e.ArrayExpression)),e.ArrayPattern&&(n=r(e.ArrayPattern)),{ArrayExpression:t,ArrayPattern:n}}const t=r(e);return{ArrayExpression:t,ArrayPattern:t}}(t.options[0]),a=o[i.type];if(!a)return;let l=!1;a.multiline&&(l=s.filter((e=>null!==e)).some((e=>e.loc.start.line!==e.loc.end.line)));let c=0;for(let t=0;t=a.minItems||a.multiline&&l||a.consistent&&c>0&&c{const o=s[i-1];if(0===i||null===r||null===o)return;const a=n.getFirstTokenBetween(o,r,e.isCommaToken),l=n.getTokenBefore(a),c=n.getTokenAfter(a);u?e.isTokenOnSameLine(l,c)&&function(e){const r=n.getTokenBefore(e,{includeComments:!0});t.report({loc:{start:r.loc.end,end:e.loc.start},messageId:"missingLineBreak",fix(t){return t.replaceTextRange([r.range[1],e.range[0]],"\n")}})}(c):e.isTokenOnSameLine(l,c)||function(r){const i=n.getTokenBefore(r,{includeComments:!0});t.report({loc:{start:i.loc.end,end:r.loc.start},messageId:"unexpectedLineBreak",fix(t){if(e.isCommentToken(i))return null;if(!e.isTokenOnSameLine(i,r))return t.replaceTextRange([i.range[1],r.range[0]]," ");const s=n.getTokenBefore(i,{includeComments:!0});return e.isCommentToken(s)?null:t.replaceTextRange([s.range[1],i.range[0]],"")}})}(c)}))}return{ArrayPattern:i,ArrayExpression:i}}},YT}function Bw(){if(ew)return JT;ew=1;const e=Pw();return JT={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(t){const n=t.options,r="always"===n[0],i=!n[0]||"as-needed"===n[0],s="never"===n[0],o=n[1]&&n[1].requireReturnForObjectLiteral,a=t.sourceCode;let l=null;function c(e){return!(!e||!e.parent)&&("ForStatement"===e.parent.type&&e.parent.init===e||c(e.parent))}function u(n){const u=n.body;if("BlockStatement"===u.type){const r=u.body;if(1!==r.length&&!s)return;if(i&&o&&"ReturnStatement"===r[0].type&&r[0].argument&&"ObjectExpression"===r[0].argument.type)return;if(s||i&&"ReturnStatement"===r[0].type){let i;i=0===r.length?"unexpectedEmptyBlock":r.length>1?"unexpectedOtherBlock":null===r[0].argument?"unexpectedSingleBlock":e.isOpeningBraceToken(a.getFirstToken(r[0],{skip:1}))?"unexpectedObjectBlock":"unexpectedSingleBlock",t.report({node:n,loc:u.loc,messageId:i,fix(t){const i=[];if(1!==r.length||"ReturnStatement"!==r[0].type||!r[0].argument||(s=a.getTokenAfter(u))&&"Punctuator"===s.type&&/^[([/`+-]/u.test(s.value))return i;var s;const o=a.getFirstToken(u),p=a.getLastToken(u),d=a.getFirstToken(r[0],1),f=a.getLastToken(r[0]);return a.commentsExistBetween(o,d)||a.commentsExistBetween(f,p)?i.push(t.remove(o),t.remove(p),t.remove(a.getTokenAfter(o))):i.push(t.removeRange([o.range[0],d.range[0]]),t.removeRange([f.range[1],p.range[1]])),(e.isOpeningBraceToken(d)||"SequenceExpression"===r[0].argument.type||l.hasInOperator&&c(n))&&(e.isParenthesised(a,r[0].argument)||i.push(t.insertTextBefore(d,"("),t.insertTextAfter(f,")"))),e.isSemicolonToken(f)&&i.push(t.remove(f)),i}})}}else(r||i&&o&&"ObjectExpression"===u.type)&&t.report({node:n,loc:u.loc,messageId:"expectedBlock",fix(t){const r=[],i=a.getTokenBefore(u,e.isArrowToken),[s,o]=a.getTokensAfter(i,{count:2}),l=a.getLastToken(n);let c=null;if(e.isOpeningParenToken(s)&&e.isOpeningBraceToken(o)){const e=a.getNodeByRangeIndex(o.range[0]);"ObjectExpression"===e.type&&(c=e)}if(c){const n=s,i=o;e.isTokenOnSameLine(n,i)?r.push(t.replaceText(n,"{return ")):r.push(t.replaceText(n,"{"),t.insertTextBefore(i,"return ")),r.push(t.remove(function(t){let n=t;for(;!e.isParenthesised(a,n);)n=n.parent;return a.getTokenAfter(n)}(c))),r.push(t.insertTextAfter(l,"}"))}else r.push(t.insertTextBefore(s,"{return ")),r.push(t.insertTextAfter(l,"}"));return r}})}return{"BinaryExpression[operator='in']"(){let e=l;for(;e;)e.hasInOperator=!0,e=e.upper},ArrowFunctionExpression(){l={upper:l,hasInOperator:!1}},"ArrowFunctionExpression:exit"(e){u(e),l=l.upper}}}},JT}function Mw(){if(nw)return tw;nw=1;const e=Pw();return tw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(t){const n="as-needed"===t.options[0],r=n&&t.options[1]&&!0===t.options[1].requireForBlockBody,i=t.sourceCode;function s(t){return i.getTokenAfter(t.params[0],e.isClosingParenToken)}return{"ArrowFunctionExpression[params.length=1]"(o){const a=!n||r&&function(e){return"BlockStatement"===e.body.type}(o),l=function(t){const n=i.getTokenBefore(t.params[0]);return n&&e.isOpeningParenToken(n)&&t.range[0]<=n.range[0]?n:null}(o),c=null!==l,[u]=o.params;a&&!c&&t.report({node:o,messageId:r?"expectedParensBlock":"expectedParens",loc:u.loc,*fix(e){yield e.insertTextBefore(u,"("),yield e.insertTextAfter(u,")")}}),a||!c||"Identifier"!==u.type||u.typeAnnotation||o.returnType||function(e,t){return i.commentsExistBetween(t,s(e))}(o,l)||function(e,t){const n=e.async?1:0;return i.getFirstToken(e,{skip:n})!==t}(o,l)||t.report({node:o,messageId:r?"unexpectedParensInline":"unexpectedParens",loc:u.loc,*fix(t){const n=i.getTokenBefore(l),r=s(o);n&&n.range[1]===l.range[0]&&!e.canTokensBeAdjacent(n,i.getFirstToken(u))&&(yield t.insertTextBefore(l," ")),yield t.removeRange([l.range[0],u.range[0]]),yield t.removeRange([u.range[1],r.range[1]])}})}}}},tw}function jw(){if(iw)return rw;iw=1;const e=Pw();return rw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(t){const n=Object.assign({},t.options[0]);n.before=!1!==n.before,n.after=!1!==n.after;const r=t.sourceCode;return{ArrowFunctionExpression:function(i){const s=function(t){const n=r.getTokenBefore(t.body,e.isArrowToken);return{before:r.getTokenBefore(n),arrow:n,after:r.getTokenAfter(n)}}(i),o=function(e){return{before:e.arrow.range[0]-e.before.range[1],after:e.after.range[0]-e.arrow.range[1]}}(s);n.before?0===o.before&&t.report({node:s.before,messageId:"expectedBefore",fix(e){return e.insertTextBefore(s.arrow," ")}}):o.before>0&&t.report({node:s.before,messageId:"unexpectedBefore",fix(e){return e.removeRange([s.before.range[1],s.arrow.range[0]])}}),n.after?0===o.after&&t.report({node:s.after,messageId:"expectedAfter",fix(e){return e.insertTextAfter(s.arrow," ")}}):o.after>0&&t.report({node:s.after,messageId:"unexpectedAfter",fix(e){return e.removeRange([s.arrow.range[1],s.after.range[0]])}})}}}},rw}function Nw(){if(lw)return aw;lw=1;const e=Pw();return aw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(t){const n="never"!==t.options[0],r=n?"missing":"extra",i=t.sourceCode;function s(t,r){return!e.isTokenOnSameLine(t,r)||i.isSpaceBetweenTokens(t,r)===n}function o(e){const o=function(e){return"SwitchStatement"===e.type?e.cases.length>0?i.getTokenBefore(e.cases[0]):i.getLastToken(e,1):"StaticBlock"===e.type?i.getFirstToken(e,{skip:1}):i.getFirstToken(e)}(e),a=i.getLastToken(e),l=i.getTokenAfter(o,{includeComments:!0}),c=i.getTokenBefore(a,{includeComments:!0});if("Punctuator"===o.type&&"{"===o.value&&"Punctuator"===a.type&&"}"===a.value&&l!==a&&(n||"Line"!==l.type)){if(!s(o,l)){let i=o.loc;"extra"===r&&(i={start:o.loc.end,end:l.loc.start}),t.report({node:e,loc:i,messageId:r,data:{location:"after",token:o.value},fix(e){return n?e.insertTextBefore(l," "):e.removeRange([o.range[1],l.range[0]])}})}if(!s(c,a)){let i=a.loc;"extra"===r&&(i={start:c.loc.end,end:a.loc.start}),t.report({node:e,loc:i,messageId:r,data:{location:"before",token:a.value},fix(e){return n?e.insertTextAfter(c," "):e.removeRange([c.range[1],a.range[0]])}})}}}return{BlockStatement:o,StaticBlock:o,SwitchStatement:o}}},aw}function Fw(){return dw||(dw=1,pw={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(e){const t=e.options[0]||["callback","cb","next"],n=e.sourceCode;function r(e,t){return e.parent?t.includes(e.parent.type)?e.parent:r(e.parent,t):null}function i(e){if("Identifier"===e.type)return!0;if("MemberExpression"===e.type){if("Identifier"===e.object.type)return!0;if("MemberExpression"===e.object.type)return i(e.object)}return!1}function s(e){return i(e.callee)&&t.includes(n.getText(e.callee))}function o(e,t){return!(!t||"ExpressionStatement"!==t.type)&&(t.expression===e||("BinaryExpression"===t.expression.type||"LogicalExpression"===t.expression.type)&&t.expression.right===e)}return{CallExpression(t){if(!s(t))return;const n=r(t,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if("ReturnStatement"!==n.type&&"ArrowFunctionExpression"!==n.type){if("BlockStatement"===n.type){const e=n.body[n.body.length-1];if(o(t,e)){const e=n.parent.type;if("FunctionExpression"===e||"FunctionDeclaration"===e||"ArrowFunctionExpression"===e)return}if("ReturnStatement"===e.type&&o(t,n.body[n.body.length-2]))return}r(t,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&e.report({node:t,messageId:"missingReturn"})}}}}}),pw}function Uw(){if(hw)return fw;hw=1;const e=Pw();return fw={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:[{type:"string"}],minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(t){const n=t.options[0]||{},r="never"===n.properties?"never":"always",i=n.ignoreDestructuring,s=n.ignoreImports,o=n.ignoreGlobals,a=n.allow||[],l=t.sourceCode,c=new Set;function u(e){return!function(e){const t=e.replace(/^_+|_+$/gu,"");return t.includes("_")&&t!==t.toUpperCase()}(e)||function(e){return a.some((t=>e===t||e.match(new RegExp(t,"u"))))}(e)}function p(t){const n=t.name,r="AssignmentPattern"===t.parent.type?t.parent:t,i=r.parent;switch(i.type){case"Property":return("ObjectPattern"===i.parent.type||"ObjectExpression"===i.parent.type)&&i.value===r&&!i.computed&&"Identifier"===i.key.type&&i.key.name===n;case"ImportSpecifier":return i.local===t&&e.getModuleExportName(i.imported)===n;default:return!1}}function d(e){c.has(e.range[0])||(c.add(e.range[0]),t.report({node:e,messageId:"PrivateIdentifier"===e.type?"notCamelCasePrivate":"notCamelCase",data:{name:e.name}}))}function f(e){"CallExpression"!==e.parent.type&&"NewExpression"!==e.parent.type&&("AssignmentPattern"===e.parent.type&&e.parent.right===e||i&&p(e)||d(e))}return{Program(e){const t=l.getScope(e);if(!o)for(const e of t.variables)if(!(e.identifiers.length>0||u(e.name)))for(const t of e.references)f(t.identifier);for(const e of t.through){const t=e.identifier;u(t.name)||f(t)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](e){for(const t of l.getDeclaredVariables(e)){if(u(t.name))continue;const e=t.identifiers[0];i&&p(e)||d(e);for(const e of t.references)e.init||f(e.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](e){"never"===r||u(e.name)||d(e)},"MemberExpression[computed!=true] > Identifier.property"(e){"never"!==r&&function(e){const t=e.parent;switch(t.type){case"AssignmentExpression":case"AssignmentPattern":return t.left===e;case"Property":return"ObjectPattern"===t.parent.type&&t.value===e;case"ArrayPattern":case"RestElement":return!0;default:return!1}}(e.parent)&&!u(e.name)&&d(e)},ImportDeclaration(e){for(const t of l.getDeclaredVariables(e)){if(u(t.name))continue;const e=t.identifiers[0];s&&p(e)||d(e);for(const e of t.references)f(e.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](e){u(e.name)||d(e)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](e){u(e.name)||d(e)}}}},fw}function Vw(){if(_w)return yw;_w=1;const e=gw?mw:(gw=1,mw=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/u),t=Pw().COMMENTS_IGNORE_PATTERN,n=/\s/gu,r=/^\s*[^:/?#\s]+:\/\/[^?#]/u,i={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},s={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function o(e,t){return Object.assign({},s,e[t]||e)}return yw={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[i,{type:"object",properties:{line:i,block:i},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(i){const s=i.options[0]||"always",a=function(e={}){return{Line:o(e,"line"),Block:o(e,"block")}}(i.options[1]),l=i.sourceCode;function c(i,o){if(t.test(i.value))return!0;const a=i.value.replace(/\*/gu,"");if(o.ignorePatternRegExp&&o.ignorePatternRegExp.test(a))return!0;if(o.ignoreInlineComments&&function(e){const t=l.getTokenBefore(e,{includeComments:!0}),n=l.getTokenAfter(e,{includeComments:!0});return Boolean(t&&n&&e.loc.start.line===t.loc.end.line&&e.loc.end.line===n.loc.start.line)}(i))return!0;if(o.ignoreConsecutiveComments&&function(e){const t=l.getTokenBefore(e,{includeComments:!0});return Boolean(t&&["Block","Line"].includes(t.type))}(i))return!0;if(r.test(a))return!0;const c=a.replace(n,"");if(0===c.length)return!0;const u=c[0];if(!e.test(u))return!0;const p=u!==u.toLocaleLowerCase(),d=u!==u.toLocaleUpperCase();return("always"!==s||!d)&&("never"!==s||!p)}function u(t){const n=a[t.type];if(!c(t,n)){const n="always"===s?"unexpectedLowercaseComment":"unexpectedUppercaseComment";i.report({node:null,loc:t.loc,messageId:n,fix(n){const r=t.value.match(e);return n.replaceTextRange([t.range[0]+r.index+2,t.range[0]+r.index+3],"always"===s?r[0].toLocaleUpperCase():r[0].toLocaleLowerCase())}})}}return function(e){Object.keys(e).forEach((t=>{const n=e[t].ignorePattern;if(n){const r=RegExp(`^\\s*(?:${n})`,"u");e[t].ignorePatternRegExp=r}}))}(a),{Program(){l.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(u)}}}},yw}function Kw(){if(vw)return bw;vw=1;const e=Pw();return bw={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(t){const n=Object.assign({},t.options[0]),r=!1!==n.enforceForClassFields,i=new Set(n.exceptMethods||[]),s=[];function o(){s.push(!1)}function a(){return s.pop()}function l(){o()}function c(t){if(function(e){switch(e.type){case"MethodDefinition":return!e.static&&"constructor"!==e.kind;case"PropertyDefinition":return!e.static&&r;default:return!1}}(t)){if(t.computed)return!0;const n="PrivateIdentifier"===t.key.type?"#":"",r="Literal"===t.key.type?e.getStaticStringValue(t.key):t.key.name||"";return!i.has(n+r)}return!1}function u(n){const r=a();c(n.parent)&&!r&&t.report({node:n,loc:e.getFunctionHeadLoc(n,t.sourceCode),messageId:"missingThis",data:{name:e.getFunctionNameWithKind(n)}})}function p(){s.length&&(s[s.length-1]=!0)}return{FunctionDeclaration:l,"FunctionDeclaration:exit":u,FunctionExpression:l,"FunctionExpression:exit":u,"PropertyDefinition > *.key:exit":o,"PropertyDefinition:exit":a,StaticBlock:o,"StaticBlock:exit":a,ThisExpression:p,Super:p,...r&&{"PropertyDefinition > ArrowFunctionExpression.value":l,"PropertyDefinition > ArrowFunctionExpression.value:exit":u}}}},bw}function Ww(){if(xw)return Ew;xw=1;const e=Pw(),t=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});return Ew={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(n){const r=(i=n.options[0],s=n.languageOptions.ecmaVersion,"string"==typeof i?{arrays:i,objects:i,imports:i,exports:i,functions:s<2017?"ignore":i}:"object"==typeof i&&null!==i?{arrays:i.arrays||t.arrays,objects:i.objects||t.objects,imports:i.imports||t.imports,exports:i.exports||t.exports,functions:i.functions||t.functions}:t);var i,s;const o=n.sourceCode;function a(e){function t(e){return e[e.length-1]}switch(e.type){case"ObjectExpression":case"ObjectPattern":return t(e.properties);case"ArrayExpression":case"ArrayPattern":return t(e.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return t(e.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return t(e.params);case"CallExpression":case"NewExpression":return t(e.arguments);default:return null}}function l(t,n){switch(t.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return o.getLastToken(t,1);default:{const t=o.getTokenAfter(n);return e.isCommaToken(t)?t:o.getLastToken(n)}}}function c(e){const t=a(e);if(!t)return!1;const n=l(e,t);return o.getTokenAfter(n).loc.end.line!==n.loc.end.line}function u(t){const r=a(t);if(!r||"ImportDeclaration"===t.type&&"ImportSpecifier"!==r.type)return;const i=l(t,r);e.isCommaToken(i)&&n.report({node:r,loc:i.loc,messageId:"unexpected",*fix(e){yield e.remove(i),yield e.insertTextBefore(o.getTokenBefore(i),""),yield e.insertTextAfter(o.getTokenAfter(i),"")}})}function p(t){const r=a(t);if(!r||"ImportDeclaration"===t.type&&"ImportSpecifier"!==r.type)return;if(!function(e){return!("RestElement"===e.type||"RestProperty"===e.type||"ExperimentalRestProperty"===e.type)}(r))return void u(t);const i=l(t,r);","!==i.value&&n.report({node:r,loc:{start:i.loc.end,end:e.getNextLocation(o,i.loc.end)},messageId:"missing",*fix(e){yield e.insertTextAfter(i,","),yield e.insertTextBefore(i,""),yield e.insertTextAfter(o.getTokenAfter(i),"")}})}const d={always:p,"always-multiline":function(e){c(e)?p(e):u(e)},"only-multiline":function(e){c(e)||u(e)},never:u,ignore(){}};return{ObjectExpression:d[r.objects],ObjectPattern:d[r.objects],ArrayExpression:d[r.arrays],ArrayPattern:d[r.arrays],ImportDeclaration:d[r.imports],ExportNamedDeclaration:d[r.exports],FunctionDeclaration:d[r.functions],FunctionExpression:d[r.functions],ArrowFunctionExpression:d[r.functions],CallExpression:d[r.functions],NewExpression:d[r.functions]}}},Ew}function $w(){if(ww)return Tw;ww=1;const e=Pw();return Tw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(t){const n=t.options[0]||"last",r=t.sourceCode,i={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(2===t.options.length&&Object.prototype.hasOwnProperty.call(t.options[1],"exceptions")){const e=Object.keys(t.options[1].exceptions);for(let n=0;n1||s){let n=r.getFirstToken(t);if(i.forEach((t=>{const i=t?r.getTokenBefore(t):n,s=t?r.getFirstToken(t):r.getTokenAfter(i),a=t||s;if(e.isCommaToken(i)&&o(n,i,s,a),t){const i=r.getTokenAfter(t,e.isNotClosingParenToken);n=i?r.getTokenBefore(i):r.ast.tokens[r.ast.tokens.length-1]}else n=s})),s){const n=r.getLastToken(t),i=r.getTokenBefore(n);e.isCommaToken(i)&&o(r.getTokenBefore(i),i,n,n)}}}const l={};return i.VariableDeclaration||(l.VariableDeclaration=function(e){a(e,"declarations")}),i.ObjectExpression||(l.ObjectExpression=function(e){a(e,"properties")}),i.ObjectPattern||(l.ObjectPattern=function(e){a(e,"properties")}),i.ArrayExpression||(l.ArrayExpression=function(e){a(e,"elements")}),i.ArrayPattern||(l.ArrayPattern=function(e){a(e,"elements")}),i.FunctionDeclaration||(l.FunctionDeclaration=function(e){a(e,"params")}),i.FunctionExpression||(l.FunctionExpression=function(e){a(e,"params")}),i.ArrowFunctionExpression||(l.ArrowFunctionExpression=function(e){a(e,"params")}),i.CallExpression||(l.CallExpression=function(e){a(e,"arguments")}),i.ImportDeclaration||(l.ImportDeclaration=function(e){a(e,"specifiers")}),i.NewExpression||(l.NewExpression=function(e){a(e,"arguments")}),l}},Tw}var qw,Qw={},zw={},Xw={};function Gw(){return qw||(qw=1,function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENDED_PICTOGRAPHIC=e.CLUSTER_BREAK=void 0,(t=e.CLUSTER_BREAK||(e.CLUSTER_BREAK={}))[t.CR=0]="CR",t[t.LF=1]="LF",t[t.CONTROL=2]="CONTROL",t[t.EXTEND=3]="EXTEND",t[t.REGIONAL_INDICATOR=4]="REGIONAL_INDICATOR",t[t.SPACINGMARK=5]="SPACINGMARK",t[t.L=6]="L",t[t.V=7]="V",t[t.T=8]="T",t[t.LV=9]="LV",t[t.LVT=10]="LVT",t[t.OTHER=11]="OTHER",t[t.PREPEND=12]="PREPEND",t[t.E_BASE=13]="E_BASE",t[t.E_MODIFIER=14]="E_MODIFIER",t[t.ZWJ=15]="ZWJ",t[t.GLUE_AFTER_ZWJ=16]="GLUE_AFTER_ZWJ",t[t.E_BASE_GAZ=17]="E_BASE_GAZ",e.EXTENDED_PICTOGRAPHIC=101}(Xw)),Xw}var Zw,Yw={};var Hw,Jw,eC,tC,nC,rC,iC,sC,oC,aC,lC,cC,uC,pC,dC,fC,hC,mC,gC,yC,_C,bC,vC,EC,xC,SC,OC,TC,wC,CC,AC,PC,kC,DC,RC,IC,LC,BC,MC,jC,NC,FC,UC,VC,KC,WC,$C,qC,QC,zC,XC,GC,ZC,YC,HC,JC,eA,tA,nA,rA,iA,sA,oA,aA,lA,cA,uA,pA,dA,fA,hA,mA,gA,yA,_A,bA,vA,EA,xA,SA,OA,TA,wA,CA,AA,PA,kA,DA,RA,IA,LA,BA,MA,jA,NA,FA,UA,VA,KA,WA,$A,qA,QA,zA,XA,GA,ZA,YA,HA,JA,eP,tP,nP,rP,iP,sP,oP,aP,lP,cP,uP,pP,dP,fP,hP,mP,gP,yP,_P,bP,vP,EP,xP,SP,OP,TP,wP,CP,AP,PP,kP,DP,RP,IP,LP,BP,MP,jP,NP,FP,UP,VP,KP,WP,$P,qP,QP,zP,XP,GP,ZP,YP,HP,JP={};function ek(){if(Jw)return zw;Jw=1;var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zw,"__esModule",{value:!0});const t=Gw(),n=e(function(){if(Zw)return Yw;Zw=1,Object.defineProperty(Yw,"__esModule",{value:!0});const e=Gw();return Yw.default=class{static isSurrogate(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}static codePointAt(e,t){void 0===t&&(t=0);const n=e.charCodeAt(t);if(55296<=n&&n<=56319&&t=1){const r=e.charCodeAt(t-1);return 55296<=r&&r<=56319?1024*(r-55296)+(n-56320)+65536:n}return n}static shouldBreak(t,n,r,i,s,o){const a=[t].concat(n).concat([r]),l=[i].concat(s).concat([o]),c=a[a.length-2],u=r,p=o,d=a.lastIndexOf(e.CLUSTER_BREAK.REGIONAL_INDICATOR);if(d>0&&a.slice(1,d).every((function(t){return t===e.CLUSTER_BREAK.REGIONAL_INDICATOR}))&&-1===[e.CLUSTER_BREAK.PREPEND,e.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(c))return a.filter((function(t){return t===e.CLUSTER_BREAK.REGIONAL_INDICATOR})).length%2==1?3:4;if(c===e.CLUSTER_BREAK.CR&&u===e.CLUSTER_BREAK.LF)return 0;if(c===e.CLUSTER_BREAK.CONTROL||c===e.CLUSTER_BREAK.CR||c===e.CLUSTER_BREAK.LF)return 1;if(u===e.CLUSTER_BREAK.CONTROL||u===e.CLUSTER_BREAK.CR||u===e.CLUSTER_BREAK.LF)return 1;if(c===e.CLUSTER_BREAK.L&&(u===e.CLUSTER_BREAK.L||u===e.CLUSTER_BREAK.V||u===e.CLUSTER_BREAK.LV||u===e.CLUSTER_BREAK.LVT))return 0;if(!(c!==e.CLUSTER_BREAK.LV&&c!==e.CLUSTER_BREAK.V||u!==e.CLUSTER_BREAK.V&&u!==e.CLUSTER_BREAK.T))return 0;if((c===e.CLUSTER_BREAK.LVT||c===e.CLUSTER_BREAK.T)&&u===e.CLUSTER_BREAK.T)return 0;if(u===e.CLUSTER_BREAK.EXTEND||u===e.CLUSTER_BREAK.ZWJ)return 0;if(u===e.CLUSTER_BREAK.SPACINGMARK)return 0;if(c===e.CLUSTER_BREAK.PREPEND)return 0;const f=l.slice(0,-1).lastIndexOf(e.EXTENDED_PICTOGRAPHIC);return-1!==f&&l[f]===e.EXTENDED_PICTOGRAPHIC&&a.slice(f+1,-2).every((function(t){return t===e.CLUSTER_BREAK.EXTEND}))&&c===e.CLUSTER_BREAK.ZWJ&&p===e.EXTENDED_PICTOGRAPHIC?0:-1!==n.indexOf(e.CLUSTER_BREAK.REGIONAL_INDICATOR)?2:c===e.CLUSTER_BREAK.REGIONAL_INDICATOR&&u===e.CLUSTER_BREAK.REGIONAL_INDICATOR?0:1}},Yw}()),r=e(function(){if(Hw)return JP;Hw=1,Object.defineProperty(JP,"__esModule",{value:!0});let e=class{constructor(e,t){this._index=0,this._str=e,this._nextBreak=t}[Symbol.iterator](){return this}next(){let e;if((e=this._nextBreak(this._str,this._index))=t.length-1)return t.length;const i=n.default.codePointAt(t,r),s=e.getGraphemeBreakProperty(i),o=e.getEmojiProperty(i),a=[],l=[];for(let i=r+1;i{!function(e,t){const n=t.set.get(e);n&&(n.defs.some((e=>"VariableDeclarator"===e.node.type&&null!==e.node.init))||n.references.some((e=>{const n=e.writeExpr;return e.from===t&&n&&"ThisExpression"===n.type&&"="===n.parent.operator}))||n.defs.map((e=>e.node)).forEach((t=>{r(t,e)})))}(e,i)}))}return 0===e.options.length?t.push("that"):t=e.options,{"Program:exit":s,"FunctionExpression:exit":s,"FunctionDeclaration:exit":s,VariableDeclarator(e){const t=e.id,n="ArrayPattern"===t.type||"ObjectPattern"===t.type;null===e.init||n||i(e,t.name,e.init)},AssignmentExpression(e){"Identifier"===e.left.type&&i(e,e.left.name,e.right)}}}}),cC}function ik(){if(hC)return fC;hC=1;const e=Pw();return fC={meta:{type:"suggestion",docs:{description:"Enforce consistent brace style for all control statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/curly"},schema:{anyOf:[{type:"array",items:[{enum:["all"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["multi","multi-line","multi-or-nest"]},{enum:["consistent"]}],minItems:0,maxItems:2}]},fixable:"code",messages:{missingCurlyAfter:"Expected { after '{{name}}'.",missingCurlyAfterCondition:"Expected { after '{{name}}' condition.",unexpectedCurlyAfter:"Unnecessary { after '{{name}}'.",unexpectedCurlyAfterCondition:"Unnecessary { after '{{name}}' condition."}},create(t){const n="multi"===t.options[0],r="multi-line"===t.options[0],i="multi-or-nest"===t.options[0],s="consistent"===t.options[1],o=t.sourceCode;function a(t){if("EmptyStatement"===t.type)return!0;const n=o.getFirstToken(t),r=o.getLastToken(t),i=e.isSemicolonToken(r)?o.getTokenBefore(r):r;return n.loc.start.line===i.loc.end.line}function l(e){switch(e.type){case"IfStatement":return!e.alternate||l(e.alternate);case"ForStatement":case"ForInStatement":case"ForOfStatement":case"LabeledStatement":case"WithStatement":case"WhileStatement":return l(e.body);default:return!1}}function c(e){const t=e.body[0];return function(e){return"VariableDeclaration"===e.type?"const"===e.kind||"let"===e.kind:"FunctionDeclaration"===e.type||"ClassDeclaration"===e.type}(t)||l(t)&&function(e){const t=o.getTokenAfter(e);return Boolean(t)&&"else"===(n=t).value&&"Keyword"===n.type;var n}(e)}function u(s,l,u,p){const d="BlockStatement"===l.type;let f=null;if(d&&(1!==l.body.length||c(l)))f=!0;else if(n)f=!1;else if(r)(function(t){const n=o.getTokenBefore(t),r=o.getLastToken(t),i=e.isSemicolonToken(r)?o.getTokenBefore(r):r;return n.loc.start.line===i.loc.end.line})(l)||(f=!0);else if(i)if(d){const e=l.body[0],t=o.getCommentsBefore(e);f=!a(e)||t.length>0}else f=!a(l);else f=!0;return{actual:d,expected:f,check(){null!==this.expected&&this.expected!==this.actual&&(this.expected?t.report({node:s,loc:l.loc,messageId:p&&p.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:u},fix:e=>e.replaceText(l,`{${o.getText(l)}}`)}):t.report({node:s,loc:l.loc,messageId:p&&p.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:u},fix(t){const n="DoWhileStatement"===s.type&&o.getTokenBefore(l).range[1]===l.range[0]&&!e.canTokensBeAdjacent("do",o.getFirstToken(l,{skip:1})),r=o.getFirstToken(l),i=o.getLastToken(l),a=o.getTokenBefore(i);if(function(t){const n=o.getTokenBefore(t),r=o.getTokenAfter(t),i=o.getNodeByRangeIndex(n.range[0]);return!(e.isSemicolonToken(n)||!r||"BlockStatement"===i.type&&"FunctionExpression"!==i.parent.type&&"ArrowFunctionExpression"!==i.parent.type||n.loc.end.line!==r.loc.start.line&&!/^[([/`+-]/u.test(r.value)&&("Punctuator"!==n.type||"++"!==n.value&&"--"!==n.value))}(i))return null;const c=o.getText().slice(r.range[1],a.range[0])+o.getText(a)+o.getText().slice(a.range[1],i.range[0]);return t.replaceText(l,(n?" ":"")+c)}}))}}}return{IfStatement(e){const t=e.parent;"IfStatement"===t.type&&t.alternate===e||function(e){const t=[];for(let n=e;n;n=n.alternate)if(t.push(u(n,n.consequent,"if",{condition:!0})),n.alternate&&"IfStatement"!==n.alternate.type){t.push(u(n,n.alternate,"else"));break}if(s){const e=t.some((e=>null!==e.expected?e.expected:e.actual));t.forEach((t=>{t.expected=e}))}return t}(e).forEach((e=>{e.check()}))},WhileStatement(e){u(e,e.body,"while",{condition:!0}).check()},DoWhileStatement(e){u(e,e.body,"do").check()},ForStatement(e){u(e,e.body,"for",{condition:!0}).check()},ForInStatement(e){u(e,e.body,"for-in").check()},ForOfStatement(e){u(e,e.body,"for-of").check()}}}},fC}function sk(){if(xC)return EC;xC=1;const e=Pw();return EC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(t){const n=t.options[0],r="object"===n||!n,i=t.sourceCode;return{MemberExpression:function(n){n.computed||function(n){const s=n.property,o=i.getTokenBefore(s);if(r){const r=i.getTokenBefore(o);e.isTokenOnSameLine(r,o)||t.report({node:n,loc:o.loc,messageId:"expectedDotAfterObject",*fix(t){o.value.startsWith(".")&&e.isDecimalIntegerNumericToken(r)?yield t.insertTextAfter(r,` ${o.value}`):yield t.insertTextAfter(r,o.value),yield t.remove(o)}})}else e.isTokenOnSameLine(o,s)||t.report({node:n,loc:o.loc,messageId:"expectedDotBeforeProperty",*fix(e){yield e.remove(o),yield e.insertTextBefore(s,o.value)}})}(n)}}}},EC}function ok(){return OC?SC:(OC=1,SC=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"])}function ak(){if(kC)return PC;kC=1;const e=Pw();return PC={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(t){const n=t.options[0]||"always",r=t.options[1]||{},i=t.sourceCode,s="always"===n?r.null||"always":"ignore",o="always"===s,a="never"===s;function l(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}function c(e){return l(e.left)||l(e.right)}function u(e){return"Literal"===e.left.type&&"Literal"===e.right.type&&typeof e.left.value==typeof e.right.value}function p(e,n){const r=i.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator));t.report({node:e,loc:r.loc,messageId:"unexpected",data:{expectedOperator:n,actualOperator:e.operator},fix(t){return c(e)||u(e)?t.replaceText(r,n):null}})}return{BinaryExpression(t){const r=function(t){return e.isNullLiteral(t.right)||e.isNullLiteral(t.left)}(t);"=="===t.operator||"!="===t.operator?"smart"===n&&(c(t)||u(t)||r)||!o&&r||p(t,`${t.operator}=`):a&&r&&p(t,t.operator.slice(0,-1))}}}},PC}function lk(){if(NC)return jC;NC=1;const e=Pw();return jC={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(t){const n=t.sourceCode;function r(e){const t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&(t.method||"get"===t.kind||"set"===t.kind)}function i(r){t.report({node:r,messageId:"unnamed",loc:e.getFunctionHeadLoc(r,n),data:{name:e.getFunctionNameWithKind(r)}})}function s(s){const o=n.getDeclaredVariables(s)[0];if((a=o)&&"FunctionName"===a.defs[0].type&&o.references.length>0)return;var a;const l=Boolean(s.id&&s.id.name),c=function(e){return e.generator&&t.options.length>1&&t.options[1].generators?t.options[1].generators:t.options[0]||"always"}(s);"never"===c?l&&"FunctionDeclaration"!==s.type&&function(r){t.report({node:r,messageId:"named",loc:e.getFunctionHeadLoc(r,n),data:{name:e.getFunctionNameWithKind(r)}})}(s):"as-needed"===c?l||function(e){const t=e.parent;return r(e)||"VariableDeclarator"===t.type&&"Identifier"===t.id.type&&t.init===e||"Property"===t.type&&t.value===e||"PropertyDefinition"===t.type&&t.value===e||"AssignmentExpression"===t.type&&"Identifier"===t.left.type&&t.right===e||"AssignmentPattern"===t.type&&"Identifier"===t.left.type&&t.right===e}(s)||i(s):l||r(s)||i(s)}return{"FunctionExpression:exit":s,"ExportDefaultDeclaration > FunctionDeclaration":s}}},jC}function ck(){if($C)return WC;$C=1;const e=Pw();return WC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks inside function parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-paren-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent","multiline","multiline-arguments"]},{type:"object",properties:{minItems:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{expectedBefore:"Expected newline before ')'.",expectedAfter:"Expected newline after '('.",expectedBetween:"Expected newline between arguments/params.",unexpectedBefore:"Unexpected newline before ')'.",unexpectedAfter:"Unexpected newline after '('."}},create(t){const n=t.sourceCode,r=t.options[0]||"multiline",i="multiline"===r,s="multiline-arguments"===r,o="consistent"===r;let a;function l(e,t){return s&&1===e.length?t:i||s?e.some(((t,n)=>n!==e.length-1&&t.loc.end.line!==e[n+1].loc.start.line)):o?t:e.length>=a}return a="object"==typeof r?r.minItems:"always"===r?0:"never"===r?1/0:null,{[["ArrowFunctionExpression","CallExpression","FunctionDeclaration","FunctionExpression","ImportExpression","NewExpression"]](r){const i=function(t){switch(t.type){case"NewExpression":if(!(t.arguments.length||e.isOpeningParenToken(n.getLastToken(t,{skip:1}))&&e.isClosingParenToken(n.getLastToken(t))&&t.callee.range[1]e.insertTextAfter(s,"\n")}),p&&!d?t.report({node:o,messageId:"unexpectedBefore",fix(e){return n.getText().slice(c.range[1],o.range[0]).trim()?null:e.removeRange([c.range[1],o.range[0]])}}):!p&&d&&t.report({node:o,messageId:"expectedBefore",fix:e=>e.insertTextBefore(o,"\n")})}(i,o),s&&function(r,i){const s=r.leftParen,o=n.getTokenAfter(s),a=l(i,!e.isTokenOnSameLine(s,o));for(let e=0;e<=i.length-2;e++){const n=i[e],r=i[e+1];n.loc.end.line===r.loc.start.line&&a&&t.report({node:n,messageId:"expectedBetween",fix:e=>e.insertTextBefore(r,"\n")})}}(i,o))}}}},WC}function uk(){if(QC)return qC;QC=1;const e={oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]};return qC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing around `*` operators in generator functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/generator-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"},named:e,anonymous:e,method:e},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){const t={before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}};function n(e,n){return e?"string"==typeof e?t[e]:Object.assign({},n,e):n}const r=function(e){const r=n(e,t.before);return{named:n(e.named,r),anonymous:n(e.anonymous,r),method:n(e.method,r)}}(e.options[0]||{}),i=e.sourceCode;function s(e){return"*"===e.value&&"Punctuator"===e.type}function o(t,n,i,s){if(!!(s.range[0]-i.range[1])!==r[t][n]){const a="*"===i.value,l=r[t][n],c=a?i:s,u=`${l?"missing":"unexpected"}${o=n,o[0].toUpperCase()+o.slice(1)}`;e.report({node:c,messageId:u,fix(e){return l?a?e.insertTextAfter(c," "):e.insertTextBefore(c," "):e.removeRange([i.range[1],s.range[0]])}})}var o}function a(e){if(!e.generator)return;const t=function(e){return i.getFirstToken(e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,s)}(e),n=i.getTokenBefore(t),r=i.getTokenAfter(t);let a="named";"MethodDefinition"===e.parent.type||"Property"===e.parent.type&&e.parent.method?a="method":e.id||(a="anonymous"),"method"===a&&t===i.getFirstToken(e.parent)||o(a,"before",n,t),o(a,"after",t,r)}return{FunctionDeclaration:a,FunctionExpression:a}}},qC}function pk(){return nA||(nA=1,tA={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(e){const t=e.options[0]||"err",n=e.sourceCode;function r(r){const i=function(e){return e.variables.filter((e=>e.defs[0]&&"Parameter"===e.defs[0].type))}(n.getScope(r)),s=i[0];s&&function(e){if("^"===t[0])return new RegExp(t,"u").test(e);return e===t}(s.name)&&0===s.references.length&&e.report({node:r,messageId:"expected"})}return{FunctionDeclaration:r,FunctionExpression:r,ArrowFunctionExpression:r}}}),tA}function dk(){if(iA)return rA;return iA=1,rA={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(e){const t=new Set(e.options),n=new Set,r=e.sourceCode;let i;function s(e){const t=e.parent;return"MemberExpression"!==t.type||t.property!==e||t.computed?!("CallExpression"===t.type||"NewExpression"===t.type||function(e){const t=e.parent;return"ImportSpecifier"===t.type&&t.imported!==t.local&&t.imported===e||"ExportSpecifier"===t.type&&t.parent.source&&t.local!==t.exported&&t.local===e}(e)||function(e){const t=e.parent;return!t.computed&&"Property"===t.type&&"ObjectPattern"===t.parent.type&&t.value!==e&&t.key===e}(e)||function(e){const t=i.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(e)&&!function(e){const t=e.parent;return"Property"===t.type&&"ObjectExpression"===t.parent.type&&t.shorthand}(e)):function(e){const t=e.parent;return"AssignmentExpression"===t.type&&t.left===e||"ArrayPattern"===t.type||"RestElement"===t.type||"Property"===t.type&&t.value===e&&"ObjectPattern"===t.parent.type||"AssignmentPattern"===t.type&&t.left===e}(t)}return{Program(e){i=r.getScope(e)},Identifier(r){var i;i=r.name,t.has(i)&&s(r)&&function(t){n.has(t.range.toString())||(e.report({node:t,messageId:"restricted",data:{name:t.name}}),n.add(t.range.toString()))}(r)}}}},rA}function fk(){if(oA)return sA;return oA=1,sA={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(e){const t=new Set(e.options),n=new Set,r=e.sourceCode;let i;function s(e){const t=e.parent;return"MemberExpression"!==t.type||t.property!==e||t.computed?"CallExpression"!==t.type&&"NewExpression"!==t.type&&!function(e){const t=e.parent;return"ImportSpecifier"===t.type&&t.imported!==t.local&&t.imported===e||"ExportSpecifier"===t.type&&t.parent.source&&t.local!==t.exported&&t.local===e}(e)&&!function(e){const t=e.parent;return!t.computed&&"Property"===t.type&&"ObjectPattern"===t.parent.type&&t.key===e}(e)&&!function(e){const t=i.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(e):function(e){const t=e.parent;return"AssignmentExpression"===t.type&&t.left===e||"ArrayPattern"===t.type||"RestElement"===t.type||"Property"===t.type&&t.value===e&&"ObjectPattern"===t.parent.type||"AssignmentPattern"===t.type&&t.left===e}(t)}return{Program(e){i=r.getScope(e)},[["Identifier","PrivateIdentifier"]](r){var i;i=r.name,t.has(i)&&s(r)&&function(t){if(!n.has(t.range.toString())){const r="PrivateIdentifier"===t.type;e.report({node:t,messageId:r?"restrictedPrivate":"restricted",data:{name:t.name}}),n.add(t.range.toString())}}(r)}}}},sA}function hk(){if(lA)return aA;lA=1;const{getGraphemeCount:e}=tk();return aA={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(t){const n=t.options[0]||{},r=void 0!==n.min?n.min:2,i=void 0!==n.max?n.max:1/0,s="never"!==n.properties,o=new Set(n.exceptions),a=(n.exceptionPatterns||[]).map((e=>new RegExp(e,"u"))),l=new Set;const c={MemberExpression:s&&function(e){return!e.computed&&(e.parent.left===e&&"AssignmentExpression"===e.parent.type||"Property"===e.parent.type&&e.parent.value===e&&"ObjectPattern"===e.parent.parent.type&&e.parent.parent.parent.left===e.parent.parent)},AssignmentPattern(e,t){return e.left===t},VariableDeclarator(e,t){return e.id===t},Property(e,t){if("ObjectPattern"===e.parent.type){const n=e.value.name===e.key.name;return!n&&e.value===t||n&&e.key===t&&s}return s&&!e.computed&&e.key.name===t.name},ImportDefaultSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](n){const s=n.name,u=n.parent,p=e(s),d=pi)||o.has(s)||function(e){return a.some((t=>t.test(e)))}(s))return;const f=c[u.type];if(f&&!l.has(n.range.toString())&&(!0===f||f(u,n))){l.add(n.range.toString());let e=d?"tooShort":"tooLong";"PrivateIdentifier"===n.type&&(e+="Private"),t.report({node:n,messageId:e,data:{name:s,min:r,max:i}})}}}}},aA}function mk(){return uA||(uA=1,cA={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(e){const t=e.options[0]||"^.+$",n=new RegExp(t,"u"),r=e.options[1]||{},i=!!r.properties,s=!!r.classFields,o=!!r.onlyDeclarations,a=!!r.ignoreDestructuring,l=e.sourceCode;let c;const u=new Set,p=new Set(["CallExpression","NewExpression"]),d=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function h(e){return!n.test(e)}function m(e,t){return(!o||d.has(e.type))&&!p.has(e.type)&&h(t)}function g(n){if(!u.has(n.range.toString())){const r="PrivateIdentifier"===n.type?"notMatchPrivate":"notMatch";e.report({node:n,messageId:r,data:{name:n.name,pattern:t}}),u.add(n.range.toString())}}return{Program(e){c=l.getScope(e)},Identifier(e){const t=e.name,n=e.parent,r="MemberExpression"===n.type?n.parent:n;if(!function(e){const t=c.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(e))if("MemberExpression"===n.type){if(!i)return;"Identifier"===n.object.type&&n.object.name===t||"AssignmentExpression"===r.type&&"MemberExpression"===r.left.type&&r.left.property.name===e.name?h(t)&&g(e):"AssignmentExpression"===r.type&&"MemberExpression"!==r.right.type&&h(t)&&g(e)}else if("Property"!==n.type||"ObjectExpression"!==n.parent.type||n.key!==e||n.computed)if("Property"===n.type||"AssignmentPattern"===n.type){if(n.parent&&"ObjectPattern"===n.parent.type){!a&&n.shorthand&&n.value.left&&h(t)&&g(e);const r=n.key.name===n.value.name;if(!r&&n.key===e)return;!(n.value.name&&h(t))||r&&a||g(e)}if(!i&&!n.computed||a&&function(e){let{parent:t}=e;for(;t;){if("ObjectPattern"===t.type)return!0;t=t.parent}return!1}(e))return;n.right!==e&&m(r,t)&&g(e)}else f.has(n.type)?n.local&&n.local.name===e.name&&h(t)&&g(e):"PropertyDefinition"===n.type?s&&h(t)&&g(e):m(r,t)&&g(e);else i&&h(t)&&g(e)},PrivateIdentifier(e){"PropertyDefinition"===e.parent.type&&!s||h(e.name)&&g(e)}}}}),cA}function gk(){if(dA)return pA;dA=1;const{isCommentToken:e,isNotOpeningParenToken:t}=Pw();return pA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(n){const r=n.sourceCode,i=n.options[0]||"beside";return{ArrowFunctionExpression:s=>function(s){if("BlockStatement"===s.body.type)return;const o=r.getTokenBefore(s.body,t),a=r.getTokenAfter(o);o.loc.end.line===a.loc.start.line&&"below"===i?n.report({node:a,messageId:"expected",fix:e=>e.insertTextBefore(a,"\n")}):o.loc.end.line!==a.loc.start.line&&"beside"===i&&n.report({node:a,messageId:"unexpected",fix(t){return r.getFirstTokenBetween(o,a,{includeComments:!0,filter:e})?null:t.replaceTextRange([o.range[1],a.range[0]]," ")}})}(s)}}},pA}function yk(){if(hA)return fA;hA=1;const e=Pw(),t=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class n{constructor(e){this._values=Array(e+1)}insert(e,t){this._values[e]=t}findLastNotAfter(e){const t=this._values;for(let n=e;n>=0;n--){const e=t[n];if(e)return e}}deleteRange(e,t){this._values.fill(void 0,e,t)}}class r{constructor(e){this.sourceCode=e,this.firstTokensByLineNumber=new Map;const t=e.tokensAndComments;for(let n=0;n=e[0]&&t.range[1]<=e[1],a=o&&this._getOffsetDescriptor(t);this._indexMap.deleteRange(e[0]+1,e[1]),this._indexMap.insert(e[0],i),o&&(this._indexMap.insert(t.range[0],a),this._indexMap.insert(t.range[1],i)),this._indexMap.insert(e[1],s)}getDesiredIndent(e){if(!this._desiredIndentCache.has(e))if(this._ignoredTokens.has(e))this._desiredIndentCache.set(e,this._tokenInfo.getTokenIndent(e));else if(this._lockedFirstTokens.has(e)){const t=this._lockedFirstTokens.get(e);this._desiredIndentCache.set(e,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(t))+this._indentType.repeat(t.loc.start.column-this._tokenInfo.getFirstTokenOfLine(t).loc.start.column))}else{const t=this._getOffsetDescriptor(e),n=!t.from||t.from.loc.start.line!==e.loc.start.line||/^\s*?\n/u.test(e.value)||t.force?t.offset*this._indentSize:0;this._desiredIndentCache.set(e,(t.from?this.getDesiredIndent(t.from):"")+this._indentType.repeat(n))}return this._desiredIndentCache.get(e)}ignoreToken(e){this._tokenInfo.isFirstTokenOfLine(e)&&this._ignoredTokens.add(e)}getFirstDependency(e){return this._getOffsetDescriptor(e).from}}const s={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return fA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[s,{type:"object",properties:{var:s,let:s,const:s},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:s,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:s,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:s},additionalProperties:!1},ArrayExpression:s,ObjectExpression:s,ImportDeclaration:s,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(n){let s="space",o=4;const a={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};n.options.length&&("tab"===n.options[0]?(o=1,s="tab"):(o=n.options[0],s="space"),n.options[1]&&(Object.assign(a,n.options[1]),"number"!=typeof a.VariableDeclarator&&"first"!==a.VariableDeclarator||(a.VariableDeclarator={var:a.VariableDeclarator,let:a.VariableDeclarator,const:a.VariableDeclarator})));const l=n.sourceCode,c=new r(l),u=new i(c,o,"space"===s?" ":"\t",l.text.length),p=new WeakSet;function d(e,t,n){let r;return r=t>0?"space"===s?t:`${t} ${"space"+(1===t?"":"s")}`:n>0?"tab"===s?n:`${n} ${"tab"+(1===n?"":"s")}`:"0",{expected:`${e} ${s}${1===e?"":"s"}`,actual:r}}function f(e,t){const r=Array.from(c.getTokenIndent(e)),i=r.filter((e=>" "===e)).length,s=r.filter((e=>"\t"===e)).length;n.report({node:e,messageId:"wrongIndentation",data:d(t.length,i,s),loc:{start:{line:e.loc.start.line,column:0},end:{line:e.loc.start.line,column:e.loc.start.column}},fix(n){const r=[e.range[0]-e.loc.start.column,e.range[0]],i=t;return n.replaceTextRange(r,i)}})}function h(e,t){const n=c.getTokenIndent(e);return n===t||n.includes(" ")&&n.includes("\t")}function m(t,n,r,i){function s(t){let r=l.getTokenBefore(t);for(;e.isOpeningParenToken(r)&&r!==n;)r=l.getTokenBefore(r);return l.getTokenAfter(r)}u.setDesiredOffsets([n.range[1],r.range[0]],n,"number"==typeof i?i:1),u.setDesiredOffset(r,n,0),"first"===i&&t.length&&!t[0]||t.forEach(((r,o)=>{if(r&&("off"===i&&u.ignoreToken(s(r)),0!==o))if("first"===i&&c.isFirstTokenOfLine(s(r)))u.matchOffsetOf(s(t[0]),s(r));else{const i=t[o-1],a=i&&s(i),c=i&&l.getLastToken(i);i&&c.loc.end.line-function(t){const n=t.match(/\s*$/u)[0].match(e.createGlobalLinebreakMatcher());return null===n?0:n.length}(c.value)>n.loc.end.line&&u.setDesiredOffsets([i.range[1],r.range[1]],a,0)}}))}function g(t){if("BlockStatement"!==t.type){const n=l.getTokenBefore(t,e.isNotOpeningParenToken);let r=l.getFirstToken(t),i=l.getLastToken(t);for(;e.isOpeningParenToken(l.getTokenBefore(r))&&e.isClosingParenToken(l.getTokenAfter(i));)r=l.getTokenBefore(r),i=l.getTokenAfter(i);u.setDesiredOffsets([r.range[0],i.range[1]],n,1)}}function y(t){let n;n=t.arguments.length?l.getFirstTokenBetween(t.callee,t.arguments[0],e.isOpeningParenToken):l.getLastToken(t,1);const r=l.getLastToken(t);if(p.add(n),p.add(r),t.optional){const r=l.getTokenAfter(t.callee,e.isQuestionDotToken),i=l.getTokensBetween(t.callee,r,{filter:e.isClosingParenToken}).length,s=i?l.getTokenBefore(t.callee,{skip:i-1}):l.getFirstToken(t.callee),o=l.getTokenBefore(r),a=o.loc.end.line===n.loc.start.line?o:s;u.setDesiredOffset(r,a,1)}const i="TaggedTemplateExpression"===t.callee.type?l.getFirstToken(t.callee.quasi):n,s=l.getTokenBefore(i);u.setDesiredOffset(n,s,0),m(t.arguments,n,r,a.CallExpression.arguments)}function _(e){const t=new Set(l.getTokens(e,{includeComments:!0}));t.forEach((e=>{if(!t.has(u.getFirstDependency(e))){const t=c.getFirstTokenOfLine(e);e===t?u.ignoreToken(e):u.setDesiredOffset(e,t,0)}}))}function b(e,t){const n=e.loc.end.line,r=t.loc.start.line;if(n===r||n===r-1)return!1;for(let e=n+1;ee))||n,e.isClosingBracketToken);m(t.elements,n,r,a.ArrayExpression)},"ObjectExpression, ObjectPattern"(t){const n=l.getFirstToken(t),r=l.getTokenAfter(t.properties.length?t.properties[t.properties.length-1]:n,e.isClosingBraceToken);m(t.properties,n,r,a.ObjectExpression)},ArrowFunctionExpression(t){const n=l.getFirstToken(t,{skip:t.async?1:0});if(e.isOpeningParenToken(n)){const r=n,i=l.getTokenBefore(t.body,e.isClosingParenToken);p.add(r),p.add(i),m(t.params,r,i,a.FunctionExpression.parameters)}g(t.body)},AssignmentExpression(e){const t=l.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator));u.setDesiredOffsets([t.range[0],e.range[1]],l.getLastToken(e.left),1),u.ignoreToken(t),u.ignoreToken(l.getTokenAfter(t))},"BinaryExpression, LogicalExpression"(e){const t=l.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator)),n=l.getTokenAfter(t);u.ignoreToken(t),u.ignoreToken(n),u.setDesiredOffset(n,t,0)},"BlockStatement, ClassBody"(t){let n;n=t.parent&&function(e){if(!e.parent||"CallExpression"!==e.parent.type||e.parent.callee!==e)return!1;let t=e.parent&&e.parent.parent;for(;"UnaryExpression"===t.type&&["!","~","+","-"].includes(t.operator)||"AssignmentExpression"===t.type||"LogicalExpression"===t.type||"SequenceExpression"===t.type||"VariableDeclarator"===t.type;)t=t.parent;return("ExpressionStatement"===t.type||"VariableDeclaration"===t.type)&&"Program"===t.parent.type}(t.parent)?a.outerIIFEBody:!t.parent||"FunctionExpression"!==t.parent.type&&"ArrowFunctionExpression"!==t.parent.type?t.parent&&"FunctionDeclaration"===t.parent.type?a.FunctionDeclaration.body:1:a.FunctionExpression.body,e.STATEMENT_LIST_PARENTS.has(t.parent.type)||u.setDesiredOffset(l.getFirstToken(t),l.getFirstToken(t.parent),0),m(t.body,l.getFirstToken(t),l.getLastToken(t),n)},CallExpression:y,"ClassDeclaration[superClass], ClassExpression[superClass]"(t){const n=l.getFirstToken(t),r=l.getTokenBefore(t.superClass,e.isNotOpeningParenToken);u.setDesiredOffsets([r.range[0],t.body.range[0]],n,1)},ConditionalExpression(t){const n=l.getFirstToken(t);if(!a.flatTernaryExpressions||!e.isTokenOnSameLine(t.test,t.consequent)||function(e,t){let n=t;for(;n.parent&&!n.parent.type.endsWith("Statement")&&!n.parent.type.endsWith("Declaration");)n=n.parent;return n=n.parent,!n||n.loc.start.line===e.loc.start.line}(n,t)){const e=l.getFirstTokenBetween(t.test,t.consequent,(e=>"Punctuator"===e.type&&"?"===e.value)),r=l.getFirstTokenBetween(t.consequent,t.alternate,(e=>"Punctuator"===e.type&&":"===e.value)),i=l.getTokenAfter(e),s=l.getTokenBefore(r),o=l.getTokenAfter(r);u.setDesiredOffset(e,n,1),u.setDesiredOffset(r,n,1),u.setDesiredOffset(i,n,"Punctuator"===i.type&&a.offsetTernaryExpressions?2:1),s.loc.end.line===o.loc.start.line?u.setDesiredOffset(o,i,0):u.setDesiredOffset(o,n,"Punctuator"===o.type&&a.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":e=>g(e.body),ExportNamedDeclaration(t){if(null===t.declaration){const n=l.getLastToken(t,e.isClosingBraceToken);m(t.specifiers,l.getFirstToken(t,{skip:1}),n,1),t.source&&u.setDesiredOffsets([n.range[1],t.range[1]],l.getFirstToken(t),1)}},ForStatement(e){const t=l.getFirstToken(e,1);e.init&&u.setDesiredOffsets(e.init.range,t,1),e.test&&u.setDesiredOffsets(e.test.range,t,1),e.update&&u.setDesiredOffsets(e.update.range,t,1),g(e.body)},"FunctionDeclaration, FunctionExpression"(e){const t=l.getTokenBefore(e.body),n=l.getTokenBefore(e.params.length?e.params[0]:t);p.add(n),p.add(t),m(e.params,n,t,a[e.type].parameters)},IfStatement(e){g(e.consequent),e.alternate&&g(e.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(t){let n;"IfStatement"===t.type?(n=[t.consequent],t.alternate&&n.push(t.alternate)):n=[t.body];for(const r of n){const n=l.getLastToken(r);if(e.isSemicolonToken(n)){const r=l.getTokenBefore(n),i=l.getTokenAfter(n);!e.isTokenOnSameLine(r,n)&&i&&e.isTokenOnSameLine(n,i)&&u.setDesiredOffset(n,l.getFirstToken(t),0)}}},ImportDeclaration(t){if(t.specifiers.some((e=>"ImportSpecifier"===e.type))){const n=l.getFirstToken(t,e.isOpeningBraceToken),r=l.getLastToken(t,e.isClosingBraceToken);m(t.specifiers.filter((e=>"ImportSpecifier"===e.type)),n,r,a.ImportDeclaration)}const n=l.getLastToken(t,(e=>"Identifier"===e.type&&"from"===e.value)),r=l.getLastToken(t,(e=>"String"===e.type)),i=l.getLastToken(t,(e=>"Punctuator"===e.type&&";"===e.value));if(n){const e=i&&i.range[1]===r.range[1]?t.range[1]:r.range[1];u.setDesiredOffsets([n.range[0],e],l.getFirstToken(t),1)}},ImportExpression(e){const t=l.getFirstToken(e,1),n=l.getLastToken(e);p.add(t),p.add(n),u.setDesiredOffset(t,l.getTokenBefore(t),0),m([e.source],t,n,a.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(t){const n="MetaProperty"===t.type?t.meta:t.object,r=l.getFirstTokenBetween(n,t.property,e.isNotClosingParenToken),i=l.getTokenAfter(r),s=l.getTokensBetween(n,t.property,{filter:e.isClosingParenToken}).length,o=s?l.getTokenBefore(n,{skip:s-1}):l.getFirstToken(n),c=l.getTokenBefore(r),p=t.computed?r:i;t.computed&&(u.setDesiredOffset(l.getLastToken(t),r,0),u.setDesiredOffsets(t.property.range,r,1));const d=c.loc.end.line===p.loc.start.line?c:o;"number"==typeof a.MemberExpression?(u.setDesiredOffset(r,d,a.MemberExpression),u.setDesiredOffset(i,t.computed?r:d,a.MemberExpression)):(u.ignoreToken(r),u.ignoreToken(i),u.setDesiredOffset(r,d,0),u.setDesiredOffset(i,r,0))},NewExpression(t){(t.arguments.length>0||e.isClosingParenToken(l.getLastToken(t))&&e.isOpeningParenToken(l.getLastToken(t,1)))&&y(t)},Property(t){if(!t.shorthand&&!t.method&&"init"===t.kind){const n=l.getFirstTokenBetween(t.key,t.value,e.isColonToken);u.ignoreToken(l.getTokenAfter(n))}},PropertyDefinition(t){const n=l.getFirstToken(t),r=l.getLastToken(t);let i=null;if(t.computed){const r=l.getTokenBefore(t.key,e.isOpeningBracketToken),s=i=l.getTokenAfter(t.key,e.isClosingBracketToken),o=[r.range[1],s.range[0]];r!==n&&u.setDesiredOffset(r,n,0),u.setDesiredOffsets(o,r,1),u.setDesiredOffset(s,r,0)}else{const e=i=l.getFirstToken(t.key);e!==n&&u.setDesiredOffset(e,n,1)}if(t.value){const n=l.getTokenBefore(t.value,e.isEqToken),s=l.getTokenAfter(n);u.setDesiredOffset(n,i,1),u.setDesiredOffset(s,n,1),e.isSemicolonToken(r)&&u.setDesiredOffset(r,n,1)}else e.isSemicolonToken(r)&&u.setDesiredOffset(r,i,1)},StaticBlock(e){const t=l.getFirstToken(e,{skip:1}),n=l.getLastToken(e);m(e.body,t,n,a.StaticBlock.body)},SwitchStatement(t){const n=l.getTokenAfter(t.discriminant,e.isOpeningBraceToken),r=l.getLastToken(t);u.setDesiredOffsets([n.range[1],r.range[0]],n,a.SwitchCase),t.cases.length&&l.getTokensBetween(t.cases[t.cases.length-1],r,{includeComments:!0,filter:e.isCommentToken}).forEach((e=>u.ignoreToken(e)))},SwitchCase(e){if(1!==e.consequent.length||"BlockStatement"!==e.consequent[0].type){const t=l.getFirstToken(e),n=l.getTokenAfter(e);u.setDesiredOffsets([t.range[1],n.range[0]],t,1)}},TemplateLiteral(e){e.expressions.forEach(((t,n)=>{const r=e.quasis[n],i=e.quasis[n+1],s=r.loc.start.line===r.loc.end.line?l.getFirstToken(r):null;u.setDesiredOffsets([r.range[1],i.range[0]],s,1),u.setDesiredOffset(l.getFirstToken(i),s,0)}))},VariableDeclaration(t){let n=Object.prototype.hasOwnProperty.call(a.VariableDeclarator,t.kind)?a.VariableDeclarator[t.kind]:1;const r=l.getFirstToken(t),i=l.getLastToken(t);if("first"===a.VariableDeclarator[t.kind]){if(t.declarations.length>1)return void m(t.declarations,r,i,"first");n=1}t.declarations[t.declarations.length-1].loc.start.line>t.loc.start.line?u.setDesiredOffsets(t.range,r,n,!0):u.setDesiredOffsets(t.range,r,n),e.isSemicolonToken(i)&&u.ignoreToken(i)},VariableDeclarator(t){if(t.init){const n=l.getTokenBefore(t.init,e.isNotOpeningParenToken),r=l.getTokenAfter(n);u.ignoreToken(n),u.ignoreToken(r),u.setDesiredOffsets([r.range[0],t.range[1]],n,1),u.setDesiredOffset(n,l.getLastToken(t.id),0)}},"JSXAttribute[value]"(e){const t=l.getFirstTokenBetween(e.name,e.value,(e=>"Punctuator"===e.type&&"="===e.value));u.setDesiredOffsets([t.range[0],e.value.range[1]],l.getFirstToken(e.name),1)},JSXElement(e){e.closingElement&&m(e.children,l.getFirstToken(e.openingElement),l.getFirstToken(e.closingElement),1)},JSXOpeningElement(e){const t=l.getFirstToken(e);let n;e.selfClosing?(n=l.getLastToken(e,{skip:1}),u.setDesiredOffset(l.getLastToken(e),n,0)):n=l.getLastToken(e),u.setDesiredOffsets(e.name.range,l.getFirstToken(e)),m(e.attributes,t,n,1)},JSXClosingElement(e){const t=l.getFirstToken(e);u.setDesiredOffsets(e.name.range,t,1)},JSXFragment(e){const t=l.getFirstToken(e.openingFragment),n=l.getFirstToken(e.closingFragment);m(e.children,t,n,1)},JSXOpeningFragment(e){const t=l.getFirstToken(e),n=l.getLastToken(e);u.setDesiredOffsets(e.range,t,1),u.matchOffsetOf(t,n)},JSXClosingFragment(t){const n=l.getFirstToken(t),r=l.getLastToken(t,{skip:1}),i=l.getLastToken(t),s=e.isTokenOnSameLine(r,i)?r:i;u.setDesiredOffsets(t.range,n,1),u.matchOffsetOf(n,s)},JSXExpressionContainer(e){const t=l.getFirstToken(e),n=l.getLastToken(e);u.setDesiredOffsets([t.range[1],n.range[0]],t,1)},JSXSpreadAttribute(e){const t=l.getFirstToken(e),n=l.getLastToken(e);u.setDesiredOffsets([t.range[1],n.range[0]],t,1)},"*"(e){const t=l.getFirstToken(e);t&&!v.has(t)&&u.setDesiredOffsets(e.range,t,0)}},x=[],S={};for(const[e,t]of Object.entries(E))S[e]=e=>x.push({listener:t,node:e});const O=new Set;function T(e){O.add(e),v.add(l.getFirstToken(e))}const w=a.ignoredNodes.reduce(((e,t)=>Object.assign(e,{[t]:T})),{});return Object.assign(S,w,{"*:exit"(e){t.has(e.type)||T(e)},"Program:exit"(){a.ignoreComments&&l.getAllComments().forEach((e=>u.ignoreToken(e)));for(let e=0;e=0;e--){const t=r[e].left,n=r[e].right;if(!p.has(t)&&!p.has(n)){const e=new Set(l.getTokensBetween(t,n));e.forEach((n=>{e.has(u.getFirstDependency(n))||u.setDesiredOffset(n,t,1)}))}u.setDesiredOffset(n,t,0)}}(l.ast.tokens);const t=new WeakMap;for(let e=0;e0&&n>0?`${t} ${i} and ${n} ${s}`:t>0?"space"===r?t:`${t} ${i}`:n>0?"tab"===r?n:`${n} ${s}`:"0",{expected:`${e} ${r}${1===e?"":"s"}`,actual:o}}function c(e,n,i,s,o,a){if(i&&s)return;const c=("space"===r?" ":"\t").repeat(n),u=a?[e.range[1]-e.loc.end.column,e.range[1]-e.loc.end.column+i+s]:[e.range[0]-e.loc.start.column,e.range[0]-e.loc.start.column+i+s];t.report({node:e,loc:o,messageId:"expected",data:l(n,i,s),fix:e=>e.replaceTextRange(u,c)})}function u(e,t){const n=t?o.getLastToken(e):o.getFirstToken(e),i=o.getText(n,n.loc.start.column).split(""),s=i.slice(0,i.findIndex((e=>" "!==e&&"\t"!==e))),a=s.filter((e=>" "===e)).length,l=s.filter((e=>"\t"===e)).length;return{space:a,tab:l,goodChar:"space"===r?a:l,badChar:"space"===r?l:a}}function p(e,t){const n=!0===t?o.getLastToken(e,1):o.getTokenBefore(e);return(!0===t?e.loc.end.line:e.loc.start.line)!==(n?n.loc.end.line:-1)}function d(e,t){const n=u(e,!1);if("ArrayExpression"===e.type||"ObjectExpression"===e.type||n.goodChar===t&&0===n.badChar||!p(e)||c(e,t,n.space,n.tab),"IfStatement"===e.type&&e.alternate){d(o.getTokenBefore(e.alternate),t),p(e.alternate)||d(e.alternate,t)}if("TryStatement"===e.type&&e.handler){d(o.getFirstToken(e.handler),t)}if("TryStatement"===e.type&&e.finalizer){d(o.getTokenBefore(e.finalizer),t)}if("DoWhileStatement"===e.type){d(o.getTokenAfter(e.body),t)}}function f(e,t){e.forEach((e=>d(e,t)))}function h(e,t){const n=o.getLastToken(e),r=u(n,!0);r.goodChar===t&&0===r.badChar||!p(e,!0)||c(e,t,r.space,r.tab,{line:n.loc.start.line,column:n.loc.start.column},!0)}function m(e,t,n){let r=e.parent;const i=new Set(n||["Program"]);for(;r.type!==t&&!i.has(r.type)&&"Program"!==r.type;)r=r.parent;return r.type===t?r:null}function g(e){return m(e,"VariableDeclarator")}function y(e,t){return t&&t.parent.loc.start.line===e.loc.start.line&&t.parent.declarations.length>1}function _(e){const t=o.getLastToken(e);return e.loc.start.line===t.loc.end.line}function b(e){if(_(e))return;let t,n,r="ArrayExpression"===e.type?e.elements:e.properties;r=r.filter((e=>null!==e));const o=g(e);if(p(e)){const n=e.parent;if(t=u(n).goodChar,!(o&&o.loc.start.line===e.loc.start.line||"VariableDeclarator"===n.type&&o!==o.parent.declarations[0]))if("VariableDeclarator"===n.type&&o.loc.start.line===n.loc.start.line)t+=i*s.VariableDeclarator[o.parent.kind];else if("ObjectExpression"===n.type||"ArrayExpression"===n.type){const r="ObjectExpression"===e.parent.type?e.parent.properties:e.parent.elements;r[0]&&r[0].loc.start.line===n.loc.start.line&&r[0].loc.end.line!==n.loc.start.line||("number"==typeof s[n.type]?t+=s[n.type]*i:t=r[0].loc.start.column)}else"CallExpression"===n.type||"NewExpression"===n.type?"number"==typeof s.CallExpression.arguments?t+=s.CallExpression.arguments*i:"first"===s.CallExpression.arguments?n.arguments.includes(e)&&(t=n.arguments[0].loc.start.column):t+=i:"LogicalExpression"!==n.type&&"ArrowFunctionExpression"!==n.type||(t+=i);!function(e,t){const n=u(e,!1);n.goodChar===t&&0===n.badChar||!p(e)||c(e,t,n.space,n.tab,{line:e.loc.start.line,column:e.loc.start.column})}(e,t)}else t=u(e).goodChar;n="first"===s[e.type]?r.length?r[0].loc.start.column:0:t+i*s[e.type],y(e,o)&&(n+=i*s.VariableDeclarator[o.parent.kind]),f(r,n),r.length>0&&r[r.length-1].loc.end.line===e.loc.end.line||h(e,t+(y(e,o)?s.VariableDeclarator[o.parent.kind]*i:0))}function v(e){if(_(e))return;if(e.parent&&("FunctionExpression"===e.parent.type||"FunctionDeclaration"===e.parent.type||"ArrowFunctionExpression"===e.parent.type))return void function(e){const t=e.parent;let n;if(n=!t.parent||"Property"!==t.parent.type&&"ArrayExpression"!==t.parent.type?u(t).goodChar:u(t,!1).goodChar,"CallExpression"===t.parent.type){const r=t.parent;"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type?r&&r.loc.start.line=2&&t.arguments[1]===e&&t.arguments[0].loc.end.line>t.arguments[0].loc.start.line}(t)&&r.callee.loc.start.line===r.callee.loc.end.line&&!p(t)&&(n=u(r).goodChar)}let r=i;null!==s.outerIIFEBody&&function(e){const t=e.parent;let n=t.parent;if("CallExpression"!==t.type||t.callee!==e)return!1;for(;"UnaryExpression"===n.type&&("!"===n.operator||"~"===n.operator||"+"===n.operator||"-"===n.operator)||"AssignmentExpression"===n.type||"LogicalExpression"===n.type||"SequenceExpression"===n.type||"VariableDeclarator"===n.type;)n=n.parent;return("ExpressionStatement"===n.type||"VariableDeclaration"===n.type)&&n.parent&&"Program"===n.parent.type}(t)?r=s.outerIIFEBody*i:"FunctionExpression"===t.type?r=s.FunctionExpression.body*i:"FunctionDeclaration"===t.type&&(r=s.FunctionDeclaration.body*i),n+=r;const o=g(e);o&&y(e,o)&&(n+=i*s.VariableDeclarator[o.parent.kind]),e.body.length>0&&f(e.body,n),h(e,n-r)}(e);let t,n=[];t=e.parent&&["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"].includes(e.parent.type)&&function(e){return"BlockStatement"===e.type||"ClassBody"===e.type||e.body&&"BlockStatement"===e.body.type||e.consequent&&"BlockStatement"===e.consequent.type}(e)?u(e.parent).goodChar:e.parent&&"CatchClause"===e.parent.type?u(e.parent.parent).goodChar:u(e).goodChar,n="IfStatement"===e.type&&"BlockStatement"!==e.consequent.type?[e.consequent]:Array.isArray(e.body)?e.body:[e.body],n.length>0&&f(n,t+i),"BlockStatement"===e.type&&h(e,t)}function E(e){"BlockStatement"!==e.body.type&&v(e)}function x(e,t){const n="SwitchStatement"===e.type?e:e.parent,r=void 0===t?u(n).goodChar:t;let o;return a[n.loc.start.line]?a[n.loc.start.line]:(o=n.cases.length>0&&0===s.SwitchCase?r:r+i*s.SwitchCase,a[n.loc.start.line]=o,o)}return{Program(e){e.body.length>0&&f(e.body,u(e).goodChar)},ClassBody:v,BlockStatement:v,WhileStatement:E,ForStatement:E,ForInStatement:E,ForOfStatement:E,DoWhileStatement:E,IfStatement(e){"BlockStatement"!==e.consequent.type&&e.consequent.loc.start.line>e.loc.start.line&&v(e)},VariableDeclaration(e){e.declarations[e.declarations.length-1].loc.start.line>e.declarations[0].loc.start.line&&function(e){const t=function(e){return e.declarations.reduce(((t,n)=>{const r=t[t.length-1];return(n.loc.start.line!==e.loc.start.line&&!r||r&&r.loc.start.line!==n.loc.start.line)&&t.push(n),t}),[])}(e),n=u(e).goodChar,r=t[t.length-1],a=n+i*s.VariableDeclarator[e.kind];if(f(t,a),o.getLastToken(e).loc.end.line<=r.loc.end.line)return;const l=o.getTokenBefore(r);","===l.value?h(e,u(l).goodChar):h(e,a-i)}(e)},ObjectExpression(e){b(e)},ArrayExpression(e){b(e)},MemberExpression(e){if(void 0===s.MemberExpression)return;if(_(e))return;if(m(e,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"]))return;if(m(e,"AssignmentExpression",["FunctionExpression"]))return;const t=u(e).goodChar+i*s.MemberExpression,n=[e.property],r=o.getTokenBefore(e.property);"Punctuator"===r.type&&"."===r.value&&n.push(r),f(n,t)},SwitchStatement(e){const t=u(e).goodChar,n=x(e,t);f(e.cases,n),h(e,t)},SwitchCase(e){if(_(e))return;const t=x(e);f(e.consequent,t+i)},FunctionDeclaration(e){_(e)||("first"===s.FunctionDeclaration.parameters&&e.params.length?f(e.params.slice(1),e.params[0].loc.start.column):null!==s.FunctionDeclaration.parameters&&f(e.params,u(e).goodChar+i*s.FunctionDeclaration.parameters))},FunctionExpression(e){_(e)||("first"===s.FunctionExpression.parameters&&e.params.length?f(e.params.slice(1),e.params[0].loc.start.column):null!==s.FunctionExpression.parameters&&f(e.params,u(e).goodChar+i*s.FunctionExpression.parameters))},ReturnStatement(t){if(_(t))return;const n=u(t).goodChar;!function(e){const t=o.getText(e).replace(o.getText(e.argument),"");return/^return\s*?\(\s*?\);*?/u.test(t)}(t)?d(t,n):function(t,n){const r=o.getLastToken(t,e.isClosingParenToken);if(o.getText(r,r.loc.start.column).slice(0,-1).trim())return;const i=u(r,!0);i.goodChar!==n&&c(t,n,i.space,i.tab,{line:r.loc.start.line,column:r.loc.start.column},!0)}(t,n)},CallExpression(e){_(e)||("first"===s.CallExpression.arguments&&e.arguments.length?f(e.arguments.slice(1),e.arguments[0].loc.start.column):null!==s.CallExpression.arguments&&f(e.arguments,u(e).goodChar+i*s.CallExpression.arguments))}}}},mA}function bk(){if(vA)return bA;vA=1;const e=Pw(),t={"prefer-double":{quote:'"',description:"singlequote",convert(e){return e.replace(/'/gu,'"')}},"prefer-single":{quote:"'",description:"doublequote",convert(e){return e.replace(/"/gu,"'")}}};return bA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either double or single quotes in JSX attributes",recommended:!1,url:"https://eslint.org/docs/latest/rules/jsx-quotes"},fixable:"whitespace",schema:[{enum:["prefer-single","prefer-double"]}],messages:{unexpected:"Unexpected usage of {{description}}."}},create(n){const r=n.options[0]||"prefer-double",i=t[r];return{JSXAttribute(t){const r=t.value;r&&e.isStringLiteral(r)&&!function(t){return t.value.includes(i.quote)||e.isSurroundedBy(t.raw,i.quote)}(r)&&n.report({node:r,messageId:"unexpected",data:{description:i.description},fix(e){return e.replaceText(r,i.convert(r.raw))}})}}}},bA}function vk(){if(xA)return EA;xA=1;const e=Pw(),{getGraphemeCount:t}=tk();function n(e){return e[e.length-1]}function r(e){return e.loc.end.line===e.loc.start.line}function i(e,t){return e.mode=t.mode||"strict",void 0!==t.beforeColon?e.beforeColon=+t.beforeColon:e.beforeColon=0,void 0!==t.afterColon?e.afterColon=+t.afterColon:e.afterColon=1,void 0!==t.align&&("object"==typeof t.align?e.align=t.align:e.align={on:t.align,mode:e.mode,beforeColon:e.beforeColon,afterColon:e.afterColon}),e}return EA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing between keys and values in object literal properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/key-spacing"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{align:{anyOf:[{enum:["colon","value"]},{type:"object",properties:{mode:{enum:["strict","minimum"]},on:{enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{align:{anyOf:[{enum:["colon","value"]},{type:"object",properties:{mode:{enum:["strict","minimum"]},on:{enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},align:{type:"object",properties:{mode:{enum:["strict","minimum"]},on:{enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{extraKey:"Extra space after {{computed}}key '{{key}}'.",extraValue:"Extra space before value for {{computed}}key '{{key}}'.",missingKey:"Missing space after {{computed}}key '{{key}}'.",missingValue:"Missing space before value for {{computed}}key '{{key}}'."}},create(s){const o=s.options[0]||{},a=(p={},"object"==typeof(d=o).align?(p.align=i({},d.align),p.align.on=d.align.on||"colon",p.align.mode=d.align.mode||"strict",p.multiLine=i({},d.multiLine||d),p.singleLine=i({},d.singleLine||d)):(p.multiLine=i({},d.multiLine||d),p.singleLine=i({},d.singleLine||d),p.multiLine.align&&(p.align={on:p.multiLine.align.on,mode:p.multiLine.align.mode||p.multiLine.mode,beforeColon:p.multiLine.align.beforeColon,afterColon:p.multiLine.align.afterColon})),p),l=a.multiLine,c=a.singleLine,u=a.align||null;var p,d;const f=s.sourceCode;function h(e){return!(e.method||e.shorthand||"init"!==e.kind||"Property"!==e.type)}function m(t){return f.getTokenAfter(t,e.isColonToken)}function g(e,t){const r=e.loc.start.line,i=(h(t)?function(e){const t=m(e);return f.getTokenAfter(t)}(t.key):t).loc.start.line;if(i-r<=1)return!0;const s=f.getCommentsBefore(t);if(s.length&&s[0].loc.start.line-r<=1&&i-n(s).loc.end.line<=1){for(let e=1;e1)return!1;return!0}return!1}function y(t){const n=t.key;return t.computed?f.getText().slice(n.range[0],n.range[1]):e.getStaticPropertyName(t)}function _(t,n,r,i,o){const a=r.length-i;if((a&&"strict"===o||a<0&&"minimum"===o||a>0&&!i&&"minimum"===o)&&(!i||(l=r,!e.LINEBREAK_MATCHER.test(l)))){const e=m(t.key),r=f.getTokenBefore(e,{includeComments:!0}),i=f.getTokenAfter(e,{includeComments:!0}),o="key"===n,l=a>0,c=Math.abs(a),u=Array(c+1).join(" "),p=o?r.loc.end:e.loc.start,d=o?e.loc.start:i.loc.start,h=o?r.loc:i.loc,g=l?{start:p,end:d}:h;let _;if(l){let e;e=o?[r.range[1],r.range[1]+c]:[i.range[0]-c,i.range[0]],_=function(t){return t.removeRange(e)}}else _=o?function(e){return e.insertTextAfter(r,u)}:function(e){return e.insertTextBefore(i,u)};let b="";b=l?"key"===n?"extraKey":"extraValue":"key"===n?"missingKey":"missingValue",s.report({node:t[n],loc:g,messageId:b,data:{computed:t.computed?"computed ":"",key:y(t)},fix:_})}var l}function b(e){const n=f.getFirstToken(e),r=function(e){const t=m(e);return f.getTokenBefore(t)}(e.key);return t(f.getText().slice(n.range[0],r.range[1]))}function v(e){const t=/(\s*):(\s*)/u.exec(f.getText().slice(e.key.range[1],e.value.range[0]));return t?{beforeColon:t[1],afterColon:t[2]}:null}function E(e,t){const n=v(e);n&&(_(e,"key",n.beforeColon,t.beforeColon,t.mode),_(e,"value",n.afterColon,t.afterColon,t.mode))}function x(e,t){const n=e.length;for(let r=0;r{const r=n(e),i=n(r);return!i||g(i,t)?r.push(t):e.push([t]),e}),[[]])})(e).forEach((e=>{const t=e.filter(h);t.length>0&&function(e){const[t]=e,r=n(e);return t.loc.start.line===r.loc.end.line}(t)?x(t,l):function(e){const t=e.length,n=e.map(b),r=u.on;let i,s,o,a=Math.max(...n);u&&t>1?(i=u.beforeColon,s=u.afterColon,o=u.mode):(i=l.beforeColon,s=l.afterColon,o=u.mode),a+="colon"===r?i:s;for(let l=0;l{const n=e.loc.start.line,r=e.loc.end.line;t.push(n,r)})),t}(u),d=function(e){const t=e.map(((e,t)=>({code:e.trim(),num:t+1}))).filter((e=>!e.code)).map((e=>e.num));return t}(l),f=new Set(p.concat(d));function h(e,t){return e.type===t||e.body&&e.body.type===t||e.consequent&&e.consequent.type===t}function m(e){const t=a.getNodeByRangeIndex(e.range[0]);if(t&&"StaticBlock"===t.type){const n=a.getFirstToken(t,{skip:1});return e.range[0]>=n.range[0]?t:null}return t}function g(t,n){const r=m(t);if(r&&h(r,n)){let n=r;return"StaticBlock"===r.type?n=a.getFirstToken(r,{skip:1}):"SwitchStatement"===r.type&&(n=a.getTokenAfter(r.discriminant,{filter:e.isOpeningBraceToken})),t.loc.start.line-n.loc.start.line==1}return!1}function y(e,t){const n=m(e);return!!n&&h(n,t)&&n.loc.end.line-e.loc.end.line==1}function _(e){return g(e,"ClassBody")}function b(e){return y(e,"ClassBody")}function v(l,u){if(o&&i.test(l.value))return;if(r&&s.test(l.value))return;let p=u.after,d=u.before;const h=l.loc.start.line-1,m=l.loc.end.line+1,v=function(t){let n=t;do{n=a.getTokenBefore(n,{includeComments:!0})}while(n&&e.isCommentToken(n));if(n&&e.isTokenOnSameLine(n,t))return!0;n=t;do{n=a.getTokenAfter(n,{includeComments:!0})}while(n&&e.isCommentToken(n));return!(!n||!e.isTokenOnSameLine(t,n))}(l),E=n.allowBlockStart&&function(e){return g(e,"ClassBody")||g(e,"BlockStatement")||g(e,"StaticBlock")||g(e,"SwitchCase")||g(e,"SwitchStatement")}(l)&&!(!1===n.allowClassStart&&_(l)),x=n.allowBlockEnd&&function(e){return y(e,"ClassBody")||y(e,"BlockStatement")||y(e,"StaticBlock")||y(e,"SwitchCase")||y(e,"SwitchStatement")}(l)&&!(!1===n.allowClassEnd&&b(l)),S=n.allowClassStart&&_(l),O=n.allowClassEnd&&b(l),T=n.allowObjectStart&&function(e){return g(e,"ObjectExpression")||g(e,"ObjectPattern")}(l),w=n.allowObjectEnd&&function(e){return y(e,"ObjectExpression")||y(e,"ObjectPattern")}(l),C=n.allowArrayStart&&function(e){return g(e,"ArrayExpression")||g(e,"ArrayPattern")}(l),A=n.allowArrayEnd&&function(e){return y(e,"ArrayExpression")||y(e,"ArrayPattern")}(l),P=E||S||T||C,k=x||O||w||A;if(h<1&&(d=!1),m>=c&&(p=!1),v)return;const D=a.getTokenBefore(l,{includeComments:!0}),R=a.getTokenAfter(l,{includeComments:!0});if(!P&&d&&!f.has(h)&&(!e.isCommentToken(D)||!e.isTokenOnSameLine(D,l))){const e=l.range[0]-l.loc.start.column,n=[e,e];t.report({node:l,messageId:"before",fix(e){return e.insertTextBeforeRange(n,"\n")}})}k||!p||f.has(m)||e.isCommentToken(R)&&e.isTokenOnSameLine(l,R)||t.report({node:l,messageId:"after",fix(e){return e.insertTextAfter(l,"\n")}})}return{Program(){u.forEach((e=>{"Line"===e.type?(n.beforeLineComment||n.afterLineComment)&&v(e,{after:n.afterLineComment,before:n.beforeLineComment}):"Block"===e.type?(n.beforeBlockComment||n.afterBlockComment)&&v(e,{after:n.afterBlockComment,before:n.beforeBlockComment}):"Shebang"===e.type&&n.afterHashbangComment&&v(e,{after:n.afterHashbangComment,before:!1})}))}}}},PA}function xk(){if(MA)return BA;MA=1;const e=Pw(),t=new Set(["Identifier","Super","ThisExpression"]);function n(t,n){return"Identifier"===t.type&&"undefined"===t.name?e.isReferenceToGlobalVariable(n,t):"UnaryExpression"===t.type&&"void"===t.operator&&"Literal"===t.argument.type&&0===t.argument.value}function r(e){return"Identifier"===e.type&&"undefined"!==e.name||"MemberExpression"===e.type}function i(t,i){const s="UnaryExpression"===t.type&&"!"===t.operator,o=s?t.argument:t;switch(!0){case r(o):return{reference:o,operator:s?"||":"&&"};case"UnaryExpression"===o.type&&"!"===o.operator&&r(o.argument):return{reference:o.argument,operator:"&&"};case function(t,n){return"CallExpression"===t.type&&"Boolean"===t.callee.name&&1===t.arguments.length&&e.isReferenceToGlobalVariable(n,t.callee)}(o,i)&&r(o.arguments[0]):return{reference:o.arguments[0],operator:s?"||":"&&"};case function(t,i){if("BinaryExpression"!==t.type||"=="!==t.operator)return!1;const s=r(t.left)?"left":"right",o="left"===s?"right":"left";return r(t[s])&&(e.isNullLiteral(t[o])||n(t[o],i))}(t,i):return{reference:r(t.left)?t.left:t.right,operator:"??"};case function(t,i){if(!function(e){return"LogicalExpression"===e.type&&"||"===e.operator&&"BinaryExpression"===e.left.type&&"==="===e.left.operator&&"BinaryExpression"===e.right.type&&"==="===e.right.operator}(t))return!1;const s=r(t.left.left)?"left":"right",o="left"===s?"right":"left",a=r(t.right.left)?"left":"right",l="left"===a?"right":"left";return e.isSameReference(t.left[s],t.right[a])&&(e.isNullLiteral(t.left[o])&&n(t.right[l],i)||n(t.left[o],i)&&e.isNullLiteral(t.right[l]))}(t,i):return{reference:r(t.left.left)?t.left.left:t.left.right,operator:"??"};default:return null}}function s(e){return"Program"!==e.type&&("WithStatement"===e.parent.type&&e.parent.body===e||s(e.parent))}return BA={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(n){const o="never"===n.options[0]?"never":"always",a="always"===o&&n.options.length>1&&n.options[1].enforceForIfStatements,l=n.sourceCode,c=l.getScope(l.ast).isStrict;function u(e){return"Identifier"===e.type&&(c||!s(e))}function p(e){return!c&&s(e)?"Identifier"===e.type:"MemberExpression"===e.type&&t.has(e.object.type)&&(!e.computed||"MemberExpression"!==e.property.type&&"ChainExpression"!==e.property.type)}function d(e,t,n){return n?{...e,fix:t.fix}:{...e,suggest:[t]}}function f(e){return l.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator))}return"never"===o?{AssignmentExpression(t){if(!e.isLogicalAssignmentOperator(t.operator))return;const r={messageId:"unexpected",node:t,data:{operator:t.operator}},i={messageId:"separate",*fix(n){if(l.getCommentsInside(t).length>0)return;const r=f(t);yield n.replaceText(r,"=");const i=l.getText(t.left),s=t.operator.slice(0,-1);yield n.insertTextAfter(r,` ${i} ${s}`);const o=e.getPrecedence(t.right)<=e.getPrecedence({type:"LogicalExpression",operator:s}),a="??="===t.operator&&e.isLogicalExpression(t.right);e.isParenthesised(l,t.right)||!o&&!a||(yield n.insertTextBefore(t.right,"("),yield n.insertTextAfter(t.right,")"))}};n.report(d(r,i,u(t.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(t){const r=function(t,n){let r=n.left;for(;"LogicalExpression"===r.type&&r.operator===n.operator;){if(e.isParenthesised(t,r))return r;r=r.left}return r}(l,t.right);if(!e.isSameReference(t.left,r))return;const i={messageId:"assignment",node:t,data:{operator:`${t.right.operator}=`}},s={messageId:"useLogicalOperator",data:{operator:`${t.right.operator}=`},*fix(e){if(l.getCommentsInside(t).length>0)return;const n=f(t);yield e.insertTextBefore(n,t.right.operator);const i=f(r.parent),s=l.getTokenAfter(i);yield e.removeRange([r.parent.range[0],s.range[0]])}};n.report(d(i,s,u(t.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(t){if(r(t.left)&&e.isSameReference(t.left,t.right.left)){const r={messageId:"logical",node:t,data:{operator:`${t.operator}=`}},i={messageId:"convertLogical",data:{operator:`${t.operator}=`},*fix(n){if(l.getCommentsInside(t).length>0)return;const r=e.getPrecedence(t.parent),i="ExpressionStatement"!==t.parent.type&&(-1===r||e.getPrecedence({type:"AssignmentExpression"})0)return;const n=l.getFirstToken(s),i=l.getTokenBefore(t);if(null!==i&&";"!==i.value&&"{"!==i.value&&"Identifier"!==n.type&&"Keyword"!==n.type)return;const o=f(s.expression);yield e.insertTextBefore(o,c.operator),yield e.removeRange([t.range[0],s.range[0]]),yield e.removeRange([s.range[1],t.range[1]]);const a=l.getTokenAfter(s.expression);r&&null!==a&&";"!==a.value&&(yield e.insertTextAfter(t,";"))}},o=u(c.reference)||"LogicalExpression"!==t.test.type&&p(c.reference);n.report(d(e,i,o))}}}}},BA}function Sk(){if(KA)return VA;KA=1;const e={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},t={anyOf:[e,{type:"integer",minimum:0}]};return VA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[t,t,e],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(e){const t=/[^:/?#]:\/\/[^?#]/u,n=e.sourceCode;const r=Object.assign({},e.options[e.options.length-1]);"number"==typeof e.options[0]&&(r.code=e.options[0]),"number"==typeof e.options[1]&&(r.tabWidth=e.options[1]);const i="number"==typeof r.code?r.code:80,s="number"==typeof r.tabWidth?r.tabWidth:4,o=!!r.ignoreComments,a=!!r.ignoreStrings,l=!!r.ignoreTemplateLiterals,c=!!r.ignoreRegExpLiterals,u=!!r.ignoreTrailingComments||!!r.ignoreComments,p=!!r.ignoreUrls,d=r.comments;let f=r.ignorePattern||null;function h(e,t,n){return n&&n.loc.start.line===t&&t<=n.loc.end.line&&(n.loc.end.line>t||n.loc.end.column===e.length)}function m(e,t){return e.slice(0,t.loc.start.column).replace(/\s+$/u,"")}function g(e){const t={};for(let s=0;s{const r=n.getNodeByRangeIndex(t.range[0]);!function(e){if(!e||!e.parent||"JSXEmptyExpression"!==e.type||"JSXExpressionContainer"!==e.parent.type)return!1;const t=e.parent;return t.loc.start.line===t.loc.end.line}(r)?e.push(t):e[e.length-1]!==r.parent&&e.push(r.parent)})),e}():[];let b=0;const v=g(n.ast.tokens.filter((e=>"String"===e.type||"JSXText"===e.type&&"JSXAttribute"===n.getNodeByRangeIndex(e.range[0]-1).type))),E=g(n.ast.tokens.filter((e=>"Template"===e.type))),x=g(n.ast.tokens.filter((e=>"RegularExpression"===e.type)));y.forEach(((n,g)=>{const y=g+1;let S,O=!1;if(b<_.length){let e=null;do{e=_[++b]}while(e&&e.loc.start.line<=y);if(e=_[--b],function(e,t,n){const r=n.loc.start,i=n.loc.end,s=!e.slice(0,n.loc.start.column).trim();return n&&(r.linet||i.line===t&&i.column===e.length)}(n,y,e))O=!0,S=n;else if(u&&h(n,y,e)){S=m(n,e);let t=b;for(;h(S,y,_[--t]);)S=m(S,_[t])}else S=n}else S=n;if(f&&f.test(S)||p&&t.test(S)||a&&v[y]||l&&E[y]||c&&x[y])return;const T=function(e,t){let n=0;return e.replace(/\t/gu,((e,r)=>{n+=t-(t?(r+n)%t:0)-1})),Array.from(e).length+n}(S,s),w=O&&d;if(O&&o)return;const C={start:{line:y,column:0},end:{line:y,column:S.length}};w?T>d&&e.report({node:r,loc:C,messageId:"maxComment",data:{lineLength:T,maxCommentLength:d}}):T>i&&e.report({node:r,loc:C,messageId:"max",data:{lineLength:T,maxLength:i}})}))}}}},VA}function Ok(){if($A)return WA;$A=1;const e=Pw();return WA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(t){const n=t.options[0];let r=300;"object"==typeof n&&Object.prototype.hasOwnProperty.call(n,"max")?r=n.max:"number"==typeof n&&(r=n);const i=n&&n.skipComments,s=n&&n.skipBlankLines,o=t.sourceCode;function a(e){return e&&("Block"===e.type||"Line"===e.type)}function l(t){let n,r=t.loc.start.line,i=t.loc.end.line;n=t;do{n=o.getTokenBefore(n,{includeComments:!0})}while(a(n));n&&e.isTokenOnSameLine(n,t)&&(r+=1),n=t;do{n=o.getTokenAfter(n,{includeComments:!0})}while(a(n));return n&&e.isTokenOnSameLine(t,n)&&(i-=1),r<=i?function(e,t){return[...Array(t-e).keys()].map((t=>t+e))}(r,i+1):[]}return{"Program:exit"(){let e=o.lines.map(((e,t)=>({lineNumber:t+1,text:e})));if(e.length>1&&""===e[e.length-1].text&&e.pop(),s&&(e=e.filter((e=>""!==e.text.trim()))),i){const t=o.getAllComments(),n=new Set(t.flatMap(l));e=e.filter((e=>!n.has(e.lineNumber)))}if(e.length>r){const n={start:{line:e[r].lineNumber,column:0},end:{line:o.lines.length,column:o.lines[o.lines.length-1].length}};t.report({loc:n,messageId:"exceed",data:{max:r,actual:e.length}})}}}}},WA}function Tk(){if(QA)return qA;QA=1;const e=Pw(),{upperCaseFirst:t}=tk();return qA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[{oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]}],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(n){const r=n.sourceCode,i=r.lines,s=n.options[0];let o=50,a=!1,l=!1,c=!1;"object"==typeof s?(o="number"==typeof s.max?s.max:50,a=!!s.skipComments,l=!!s.skipBlankLines,c=!!s.IIFEs):"number"==typeof s&&(o=s);const u=function(e){const t=new Map;return e.forEach((e=>{for(let n=e.loc.start.line;n<=e.loc.end.line;n++)t.set(n,e)})),t}(r.getAllComments());function p(e,t,n){const r=n.loc.start,i=n.loc.end,s=r.line===t&&!e.slice(0,r.column).trim(),o=i.line===t&&!e.slice(i.column).trim();return n&&(r.linet||o)}function d(r){const s=function(e){return!!e.parent&&e===e.parent.value&&("MethodDefinition"===e.parent.type||"Property"===e.parent.type&&(!0===e.parent.method||"get"===e.parent.kind||"set"===e.parent.kind))}(r)?r.parent:r;if(!c&&function(e){return("FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)&&e.parent&&"CallExpression"===e.parent.type&&e.parent.callee===e}(s))return;let d=0;for(let e=s.loc.start.line-1;eo){const i=t(e.getFunctionNameWithKind(r));n.report({node:s,messageId:"exceed",data:{name:i,lineCount:d,maxLines:o}})}}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d}}},qA}function wk(){if(eP)return JA;eP=1;const e=Pw();return JA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=void 0!==r.max?r.max:1;let s,o=0,a=0;const l=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function c(){s&&t.report({node:s,messageId:"exceed",data:{numberOfStatementsOnThisLine:a,maxStatementsPerLine:i,statements:1===a?"statement":"statements"}}),s=null}function u(e){const t=e.loc.start.line;l.test(e.parent.type)&&e.parent.alternate!==e||(t===o?a+=1:(c(),a=1,o=t),a===i+1&&(s=s||e))}function p(t){const r=function(t){return n.getLastToken(t,e.isNotSemicolonToken)}(t).loc.end.line;r!==o&&(c(),a=1,o=r)}return{BreakStatement:u,ClassDeclaration:u,ContinueStatement:u,DebuggerStatement:u,DoWhileStatement:u,ExpressionStatement:u,ForInStatement:u,ForOfStatement:u,ForStatement:u,FunctionDeclaration:u,IfStatement:u,ImportDeclaration:u,LabeledStatement:u,ReturnStatement:u,SwitchStatement:u,ThrowStatement:u,TryStatement:u,VariableDeclaration:u,WhileStatement:u,WithStatement:u,ExportNamedDeclaration:u,ExportDefaultDeclaration:u,ExportAllDeclaration:u,"BreakStatement:exit":p,"ClassDeclaration:exit":p,"ContinueStatement:exit":p,"DebuggerStatement:exit":p,"DoWhileStatement:exit":p,"ExpressionStatement:exit":p,"ForInStatement:exit":p,"ForOfStatement:exit":p,"ForStatement:exit":p,"FunctionDeclaration:exit":p,"IfStatement:exit":p,"ImportDeclaration:exit":p,"LabeledStatement:exit":p,"ReturnStatement:exit":p,"SwitchStatement:exit":p,"ThrowStatement:exit":p,"TryStatement:exit":p,"VariableDeclaration:exit":p,"WhileStatement:exit":p,"WithStatement:exit":p,"ExportNamedDeclaration:exit":p,"ExportDefaultDeclaration:exit":p,"ExportAllDeclaration:exit":p,"Program:exit":c}}},JA}function Ck(){if(nP)return tP;nP=1;const e=Pw();return tP={meta:{type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(t){const n=t.sourceCode,r=t.options[0]||"starred-block",i=!!(t.options[1]||{}).checkJSDoc;function s([t]){if("Block"!==t.type)return!1;const n=t.value.split(e.LINEBREAK_MATCHER);return n.length>0&&n.every(((e,t)=>(0===t||t===n.length-1?/^\s*$/u:/^\s*\*/u).test(e)))}function o([t]){if("Block"!==t.type)return!1;const n=t.value.split(e.LINEBREAK_MATCHER);return/^\*\s*$/u.test(n[0])&&n.slice(1,-1).every((e=>/^\s* /u.test(e)))&&/^\s*$/u.test(n[n.length-1])}function a(t){const[r]=t;return"Line"===r.type?function(e){const t=e.map((({value:e})=>e)).filter((e=>e.trim().length)).every((e=>e.startsWith(" ")));return e.map((({value:e})=>t?e.replace(/^ /u,""):e))}(t):s(t)?function(t){const n=t.value.split(e.LINEBREAK_MATCHER).filter(((e,t,n)=>!(0===t||t===n.length-1))).map((e=>e.replace(/^\s*$/u,""))),r=n.map((e=>e.replace(/\s*\*/u,""))).filter((e=>e.trim().length)).every((e=>e.startsWith(" ")));return n.map((e=>e.replace(r?/\s*\* ?/u:/\s*\*/u,"")))}(r):function(t){const r=t.value.split(e.LINEBREAK_MATCHER).map((e=>e.replace(/^\s*$/u,""))),i=`${n.text.slice(t.range[0]-t.loc.start.column,t.range[0])} `;let s="";for(const[e,t]of r.entries()){if(!t.trim().length||0===e)continue;const[,n]=t.match(/^(\s*\*?\s*)/u);if(n.lengths.length&&(s=e)}}return r.map((e=>{const t=e.match(/^(\s*\*?\s*)(.*)/u),[,n,r]=t;return n.length>i.length?`${n.slice(i.length-(s.length+n.length))}${r}`:n.lengthe.includes("*/"))))if(r.length>1)t.report({loc:{start:i.loc.start,end:r[r.length-1].loc.end},messageId:"expectedBlock",fix(e){const t=[i.range[0],r[r.length-1].range[1]];return s.some((e=>e.startsWith("/")))?null:e.replaceTextRange(t,function(e,t){const n=l(e);return`/*\n${t.map((e=>`${n} * ${e}`)).join("\n")}\n${n} */`}(i,s))}});else{const r=i.value.split(e.LINEBREAK_MATCHER),s=`${l(i)} *`;if(!/^\*?\s*$/u.test(r[0])){const e=i.value.startsWith("*")?i.range[0]+1:i.range[0];t.report({loc:{start:i.loc.start,end:{line:i.loc.start.line,column:i.loc.start.column+2}},messageId:"startNewline",fix:t=>t.insertTextAfterRange([e,e+2],`\n${s}`)})}/^\s*$/u.test(r[r.length-1])||t.report({loc:{start:{line:i.loc.end.line,column:i.loc.end.column-2},end:i.loc.end},messageId:"endNewline",fix:e=>e.replaceTextRange([i.range[1]-2,i.range[1]],`\n${s}/`)});for(let e=i.loc.start.line+1;e<=i.loc.end.line;e++){const o=n.lines[e-1],a=/^\s*\*/u.test(o)?"alignment":"missingStar";o.startsWith(s)||t.report({loc:{start:{line:e,column:0},end:{line:e,column:o.length}},messageId:a,fix(t){const l=n.getIndexFromLoc({line:e,column:0});if("alignment"===a){const[,e=""]=o.match(/^(\s*\*)/u)||[],n=l+e.length;return t.replaceTextRange([l,n],s)}const[,c=""]=o.match(/^(\s*)/u)||[],u=l+c.length;let p;for(const[e,t]of r.entries()){if(!/\S+/u.test(t))continue;const r=n.lines[i.loc.start.line-1+e],[,s="",a=""]=r.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];p=`${c.slice(s.length)}${a}`,/^\s*\//u.test(o)&&0===p.length&&(p+=" ");break}return t.replaceTextRange([l,u],`${s}${p}`)}})}}},"separate-lines"(e){const[r]=e,s=o(e);if("Block"!==r.type||!i&&s)return;let c=a(e);s&&(c=c.slice(1,c.length-1));const u=n.getTokenAfter(r,{includeComments:!0});u&&r.loc.end.line===u.loc.start.line||t.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+2}},messageId:"expectedLines",fix(e){return e.replaceText(r,function(e,t){return t.map((e=>`// ${e}`)).join(`\n${l(e)}`)}(r,c))}})},"bare-block"(e){if(o(e))return;const[n]=e,r=a(e);"Line"===n.type&&r.length>1&&!r.some((e=>e.includes("*/")))&&t.report({loc:{start:n.loc.start,end:e[e.length-1].loc.end},messageId:"expectedBlock",fix(t){return t.replaceTextRange([n.range[0],e[e.length-1].range[1]],c(n,r))}}),s(e)&&t.report({loc:{start:n.loc.start,end:{line:n.loc.start.line,column:n.loc.start.column+2}},messageId:"expectedBareBlock",fix(e){return e.replaceText(n,c(n,r))}})}};return{Program(){return n.getAllComments().filter((e=>"Shebang"!==e.type)).filter((t=>!e.COMMENTS_IGNORE_PATTERN.test(t.value))).filter((e=>{const t=n.getTokenBefore(e,{includeComments:!0});return!t||t.loc.end.line{const s=n.getTokenBefore(t,{includeComments:!0});return"Line"===t.type&&r&&"Line"===i[r-1].type&&s&&s.loc.end.line===t.loc.start.line-1&&s===i[r-1]?e[e.length-1].push(t):e.push([t]),e}),[]).filter((e=>!(1===e.length&&e[0].loc.start.line===e[0].loc.end.line))).forEach(u[r])}}}},tP}function Ak(){if(oP)return sP;oP=1;const e=Pw(),t=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function n(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)&&!Array.isArray(e[t]))throw new TypeError(`${t}, if provided, must be an Array`);return e[t]||n}function r(e,t){return e[t]=!0,e}return sP={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(i){const s=Object.assign({},i.options[0]);s.newIsCap=!1!==s.newIsCap,s.capIsNew=!1!==s.capIsNew;const o=!1===s.properties,a=n(s,"newIsCapExceptions",[]).reduce(r,{}),l=s.newIsCapExceptionPattern?new RegExp(s.newIsCapExceptionPattern,"u"):null,c=function(e){let i=n(e,"capIsNewExceptions",t);return i!==t&&(i=i.concat(t)),i.reduce(r,{})}(s),u=s.capIsNewExceptionPattern?new RegExp(s.capIsNewExceptionPattern,"u"):null,p={},d=i.sourceCode;function f(t){return"Identifier"===t.callee.type?t.callee.name:e.getStaticPropertyName(t.callee)||""}function h(e){const t=e.charAt(0),n=t.toLowerCase();return n===t.toUpperCase()?"non-alpha":t===n?"lower":"upper"}function m(t,n,r,i){const s=d.getText(n.callee);if(t[r]||t[s])return!0;if(i&&i.test(s))return!0;const a=e.skipChainExpression(n.callee);return"UTC"===r&&"MemberExpression"===a.type?"Identifier"===a.object.type&&"Date"===a.object.name:o&&"MemberExpression"===a.type}function g(t,n){let r=e.skipChainExpression(t.callee);"MemberExpression"===r.type&&(r=r.property),i.report({node:t,loc:r.loc,messageId:n})}return s.newIsCap&&(p.NewExpression=function(e){const t=f(e);if(t){"lower"!==h(t)||m(a,e,t,l)||g(e,"lower")}}),s.capIsNew&&(p.CallExpression=function(e){const t=f(e);if(t){"upper"!==h(t)||m(c,e,t,u)||g(e,"upper")}}),p}},sP}function Pk(){if(uP)return cP;uP=1;const e=Pw();return cP={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(t){const n=t.sourceCode,r="never"===t.options[0]?"never":"always",i=n.getAllComments().reduce(((e,t)=>(e[t.loc.start.line]=t.loc.end.line,e)),{});function s(e){const t=i[e];return i[t+1]?s(t+1):t}return{VariableDeclaration:function(o){const a=function(e){const t=n.getLastToken(e);if("Punctuator"===t.type&&";"===t.value){const e=n.getTokenBefore(t);if(e.loc.end.line!==t.loc.start.line)return e}return t}(o),l=a===n.getLastToken(o)?n.getTokenAfter(o):n.getLastToken(o),c=a.loc.end.line+1;if(!l)return;if(function(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}(o.parent.type))return;if("ExportNamedDeclaration"===(u=o.parent.type)||"ExportSpecifier"===u||"ExportDefaultDeclaration"===u||"ExportAllDeclaration"===u)return;var u;if("Keyword"===l.type&&function(e){return"var"===e||"let"===e||"const"===e}(l.value))return;if(function(e){const t=n.getTokenAfter(e);return!t||"Punctuator"===t.type&&"}"===t.value}(o))return;const p=l.loc.start.line>c,d=void 0!==i[c];var f;"never"===r&&p&&!d&&t.report({node:o,messageId:"unexpected",fix(t){const r=n.getText().slice(a.range[1],l.range[0]).split(e.LINEBREAK_MATCHER);return t.replaceTextRange([a.range[1],l.range[0]],`${r.slice(0,-1).join("")}\n${r[r.length-1]}`)}}),"always"!==r||p&&(!d||(f=c,l.loc.start.line>s(f)+1))||t.report({node:o,messageId:"expected",fix(e){return(p?s(c):a.loc.end.line)===l.loc.start.line?e.insertTextBefore(l,"\n\n"):e.insertTextBeforeRange([l.range[0]-l.loc.start.column,l.range[1]],"\n")}})}}}},cP}function kk(){return dP||(dP=1,pP={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(e){const t=e.sourceCode;function n(e,n){const r=t.getTokenBefore(e);return n.includes(r.value)}function r(e){const n=e.loc.start.line,r=function(e){const n=t.getTokenBefore(e);let r;return r=n?n.loc.end.line:0,r}(e),i=function(e,n){const r=t.getCommentsBefore(e);let i=0;return r.length?(r.forEach((t=>{i++,"Block"===t.type&&(i+=t.loc.end.line-t.loc.start.line),t.loc.start.line===n&&i--,t.loc.end.line===e.loc.start.line&&i--})),i):i}(e,r);return n-r-i>1}return{ReturnStatement(i){(function(e){const t=e.parent.type;return e.parent.body?Array.isArray(e.parent.body)?e.parent.body[0]===e:e.parent.body===e:n(e,"IfStatement"===t?["else",")"]:"DoWhileStatement"===t?["do"]:"SwitchCase"===t?[":"]:[")"])})(i)||r(i)||e.report({node:i,messageId:"expected",fix(e){if(function(e){const n=t.getCommentsBefore(e),r=n[n.length-1],i=t.getTokenBefore(e);return 0===n.length||r.loc.end.line===i.loc.end.line&&r.loc.end.line!==e.loc.start.line}(i)){const n=t.getTokenBefore(i),r=i.loc.start.line===n.loc.end.line?"\n\n":"\n";return e.insertTextBefore(i,r)}return null}})}}}}),pP}function Dk(){if(gP)return mP;gP=1;const{getStaticPropertyName:e,getVariableByName:t,skipChainExpression:n}=Pw();function r(e){return/^(alert|confirm|prompt)$/u.test(e)}function i(e,t){const n=function(e,t){const n=e.references.filter((e=>e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]));return 1===n.length?n[0]:null}(e,t);return n&&n.resolved&&n.resolved.defs.length>0}return mP={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(s){const o=s.sourceCode;return{CallExpression(a){const l=n(a.callee),c=o.getScope(a);if("Identifier"===l.type){const e=l.name;!i(c,l)&&r(l.name)&&s.report({node:a,messageId:"unexpected",data:{name:e}})}else if("MemberExpression"===l.type&&function(e,n){return"global"===e.type&&"ThisExpression"===n.type||!("Identifier"!==n.type||!("window"===n.name||"globalThis"===n.name&&t(e,"globalThis")))&&!i(e,n)}(c,l.object)){const t=e(l);r(t)&&s.report({node:a,messageId:"unexpected",data:{name:t}})}}}}},mP}function Rk(){if(_P)return yP;_P=1;const{getVariableByName:e,isClosingParenToken:t,isOpeningParenToken:n,isStartOfExpressionStatement:r,needsPrecedingSemicolon:i}=Pw();return yP={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(s){const o=s.sourceCode;function a(a){if("Identifier"!==a.callee.type||"Array"!==a.callee.name||1===a.arguments.length&&"SpreadElement"!==a.arguments[0].type)return;const l=e(o.getScope(a),"Array");if(l&&0===l.identifiers.length){const e=function(e){const r=o.getLastToken(e);if(!t(r))return"";let i=e.callee;do{if(i=o.getTokenAfter(i),!i||i===r)return""}while(!n(i));return o.text.slice(i.range[1],r.range[0])}(a);let l,c;r(a)&&i(o,a)?(l=`;[${e}]`,c="useLiteralAfterSemicolon"):(l=`[${e}]`,c="useLiteral"),s.report({node:a,messageId:"preferLiteral",suggest:[{messageId:c,fix:e=>e.replaceText(a,l)}]})}}return{CallExpression:a,NewExpression:a}}},yP}function Ik(){if(OP)return SP;OP=1;const e=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return SP={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:e},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(t){const n=t.options[0]||{},r=n.allow||[],i=!0===n.int32Hint;function s(n){!function(t){return e.includes(t.operator)}(n)||function(e){return r.includes(e.operator)}(n)||function(e){return i&&"|"===e.operator&&e.right&&"Literal"===e.right.type&&0===e.right.value}(n)||function(e){t.report({node:e,messageId:"unexpected",data:{operator:e.operator}})}(n)}return{AssignmentExpression:s,BinaryExpression:s,UnaryExpression:s}}},SP}function Lk(){if(RP)return DP;RP=1;const e=Pw();return DP={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(t){const n=t.sourceCode;return{"CatchClause[param!=null]"(r){let i=n.getScope(r);i.block===r&&(i=i.upper),function(t,n){return null!==e.getVariableByName(t,n)}(i,r.param.name)&&t.report({node:r,messageId:"mutable",data:{name:r.param.name}})}}}},DP}function Bk(){if(NP)return jP;NP=1;const e=Pw(),t=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),n={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return jP={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(r){const i=r.options[0]||"except-parens",s=r.sourceCode;function o(e){return e.parent&&t.has(e.parent.type)&&e===e.parent.test}function a(t){!t.test||"AssignmentExpression"!==t.test.type||("ForStatement"===t.type?e.isParenthesised(s,t.test):function(t){const n=s.getTokenBefore(t,1),r=s.getTokenAfter(t,1);return e.isParenthesised(s,t)&&n&&e.isOpeningParenToken(n)&&n.range[1]<=t.range[0]&&e.isClosingParenToken(r)&&r.range[0]>=t.range[1]}(t.test))||r.report({node:t.test,messageId:"missing"})}return"always"===i?{AssignmentExpression:function(t){const i=function(t){let n=t;do{if(o(n))return n.parent}while((n=n.parent)&&!e.isFunction(n));return null}(t);i&&r.report({node:t,messageId:"unexpected",data:{type:n[i.type]||i.type}})}}:{DoWhileStatement:a,ForStatement:a,IfStatement:a,WhileStatement:a,ConditionalExpression:a}}},jP}function Mk(){if(KP)return VP;KP=1;const e=Pw();return VP={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(t){const n=(t.options[0]||{}).allow||[],r=t.sourceCode;function i(e){const t=e.identifier;return t&&"console"===t.name}function s(t){const r=t.identifier,i=r.parent;return"MemberExpression"===i.type&&i.object===r&&!function(t){const r=e.getStaticPropertyName(t);return r&&n.includes(r)}(i)}function o(t){return"CallExpression"===t.parent.type&&t.parent.callee===t&&"ExpressionStatement"===t.parent.parent.type&&e.STATEMENT_LIST_PARENTS.has(t.parent.parent.parent.type)&&!function(e){const t=r.getTokenBefore(e),n=r.getTokenAfter(e);return Boolean(n)&&/^[-[(/+`]/u.test(n.value)&&"++"!==n.value&&"--"!==n.value&&Boolean(t)&&!/^[:;{]$/u.test(t.value)}(t.parent.parent)}function a(n){const r=n.identifier.parent,i=e.getStaticPropertyName(r);t.report({node:r,loc:r.loc,messageId:"unexpected",suggest:o(r)?[{messageId:"removeConsole",data:{propertyName:i},fix(e){return e.remove(r.parent.parent)}}]:[]})}return{"Program:exit"(t){const n=r.getScope(t),o=e.getVariableByName(n,"console"),l=o&&o.defs.length>0,c=o?o.references:n.through.filter(i);l||c.filter(s).forEach(a)}}}},VP}function jk(){if(QP)return qP;QP=1;const e=Bx(),{isNullLiteral:t,isConstant:n,isReferenceToGlobalVariable:r,isLogicalAssignmentOperator:i}=Pw(),s=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function o(e,n){return t(n)||"Identifier"===n.type&&"undefined"===n.name&&r(e,n)||"UnaryExpression"===n.type&&"void"===n.operator}function a(e,t,n){if(n&&o(e,t))return!1;switch(t.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":case"UnaryExpression":return!0;case"CallExpression":{if("Identifier"!==t.callee.type)return!1;const n=t.callee.name;return("Boolean"===n||"String"===n||"Number"===n)&&r(e,t.callee)}case"LogicalExpression":return"??"===t.operator&&a(e,t.right,!0);case"AssignmentExpression":return"="===t.operator?a(e,t.right,n):!i(t.operator);case"SequenceExpression":return a(e,t.expressions[t.expressions.length-1],n);case"Identifier":return"undefined"===t.name&&r(e,t);default:return!1}}function l(e,t){switch(t.type){case"Literal":return"boolean"==typeof t.value;case"CallExpression":return"Identifier"===t.callee.type&&"Boolean"===t.callee.name&&r(e,t.callee)&&(0===t.arguments.length||n(e,t.arguments[0],!0));case"UnaryExpression":return"!"===t.operator&&n(e,t.argument,!0);default:return!1}}function c(e,t){switch(t.type){case"ObjectExpression":case"ClassExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"Literal":return!0;case"ArrayExpression":{const e=t.elements.filter((e=>null!==e&&"SpreadElement"!==e.type));return 0===t.elements.length||e.length>1}case"UnaryExpression":return"void"===t.operator||"typeof"===t.operator||"!"===t.operator&&n(e,t.argument,!0);case"NewExpression":case"JSXElement":case"JSXFragment":default:return!1;case"CallExpression":return!("Identifier"!==t.callee.type||"Boolean"!==t.callee.name||!r(e,t.callee))&&(0===t.arguments.length||n(e,t.arguments[0],!0));case"Identifier":return"undefined"===t.name&&r(e,t);case"TemplateLiteral":return 0===t.expressions.length;case"AssignmentExpression":return"="===t.operator&&c(e,t.right);case"SequenceExpression":return c(e,t.expressions[t.expressions.length-1])}}function u(e,t){switch(t.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return s.has(t.operator);case"UnaryExpression":return"delete"!==t.operator&&("!"!==t.operator||n(e,t.argument,!0));case"SequenceExpression":return u(e,t.expressions[t.expressions.length-1]);case"Identifier":return"undefined"===t.name&&r(e,t);case"AssignmentExpression":return"="===t.operator?u(e,t.right):!i(t.operator);case"CallExpression":{if("Identifier"!==t.callee.type)return!1;const i=t.callee.name;return!("String"!==i&&"Number"!==i||!r(e,t.callee))||!("Boolean"!==i||!r(e,t.callee))&&(0===t.arguments.length||n(e,t.arguments[0],!0))}default:return!1}}function p(t,n){switch(n.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return"Identifier"===n.callee.type&&(Object.hasOwnProperty.call(e.builtin,n.callee.name)&&r(t,n.callee));case"Literal":return"object"==typeof n.regex;case"SequenceExpression":return p(t,n.expressions[n.expressions.length-1]);case"AssignmentExpression":return"="===n.operator&&p(t,n.right);case"ConditionalExpression":return p(t,n.consequent)&&p(t,n.alternate);default:return!1}}function d(e,t,n,r){if("=="===r||"!="===r){if(o(e,t)&&a(e,n,!1)||l(e,t)&&c(e,n))return n}else if(("==="===r||"!=="===r)&&(o(e,t)&&a(e,n,!1)||l(e,t)&&u(e,n)))return n;return null}return qP={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(e){const t=e.sourceCode;return{LogicalExpression(r){const{operator:i,left:s}=r,o=t.getScope(r);"&&"!==i&&"||"!==i||!n(o,s,!0)?"??"===i&&a(o,s,!1)&&e.report({node:s,messageId:"constantShortCircuit",data:{property:"nullishness",operator:i}}):e.report({node:s,messageId:"constantShortCircuit",data:{property:"truthiness",operator:i}})},BinaryExpression(n){const r=t.getScope(n),{right:i,left:s,operator:o}=n,a=d(r,s,i,o),l=d(r,i,s,o);a?e.report({node:a,messageId:"constantBinaryOperand",data:{operator:o,otherSide:"left"}}):l?e.report({node:l,messageId:"constantBinaryOperand",data:{operator:o,otherSide:"right"}}):"==="===o||"!=="===o?p(r,s)?e.report({node:s,messageId:"alwaysNew"}):p(r,i)&&e.report({node:i,messageId:"alwaysNew"}):"=="!==o&&"!="!==o||p(r,s)&&p(r,i)&&e.report({node:s,messageId:"bothAlwaysNew"})}}}},qP}function Nk(){if(XP)return zP;XP=1;const{isConstant:e}=Pw();return zP={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(t){const n=!1!==(t.options[0]||{}).checkLoops,r=[],i=t.sourceCode;let s=new Set;function o(e){s.has(e)&&(s.delete(e),t.report({node:e.test,messageId:"unexpected"}))}function a(n){n.test&&e(i.getScope(n),n.test,!0)&&t.report({node:n.test,messageId:"unexpected"})}function l(){r.push(s),s=new Set}function c(){s=r.pop()}function u(t){n&&function(t){t.test&&e(i.getScope(t),t.test,!0)&&s.add(t)}(t)}return{ConditionalExpression:a,IfStatement:a,WhileStatement:u,"WhileStatement:exit":o,DoWhileStatement:u,"DoWhileStatement:exit":o,ForStatement:u,"ForStatement > .test":e=>u(e.parent),"ForStatement:exit":o,FunctionDeclaration:l,"FunctionDeclaration:exit":c,FunctionExpression:l,"FunctionExpression:exit":c,YieldExpression:()=>s.clear()}}},zP}var Fk,Uk,Vk,Kk,Wk,$k,qk,Qk,zk,Xk,Gk,Zk,Yk,Hk,Jk,eD,tD,nD,rD,iD,sD,oD,aD,lD,cD,uD,pD,dD,fD,hD,mD,gD,yD,_D,bD,vD,ED,xD,SD,OD,TD,wD,CD,AD,PD,kD,DD,RD,ID,LD,BD,MD,jD,ND,FD,UD,VD,KD,WD,$D,qD,QD,zD,XD,GD,ZD,YD,HD,JD,eR,tR,nR,rR,iR,sR,oR,aR,lR,cR,uR,pR,dR,fR,hR,mR,gR,yR,_R,bR,vR,ER,xR,SR,OR,TR,wR,CR,AR,PR,kR,DR,RR,IR,LR,BR,MR,jR,NR,FR,UR,VR,KR,WR,$R,qR,QR,zR,XR,GR,ZR,YR,HR,JR,eI,tI,nI,rI,iI,sI,oI,aI,lI,cI,uI,pI,dI,fI,hI,mI,gI,yI,_I,bI,vI,EI,xI,SI,OI,TI,wI,CI,AI,PI,kI,DI,RI,II,LI,BI,MI,jI,NI,FI,UI,VI,KI,WI,$I,qI,QI,zI,XI,GI,ZI,YI,HI,JI,eL,tL,nL,rL,iL,sL,oL,aL,lL,cL,uL,pL,dL,fL,hL,mL,gL,yL,_L,bL,vL,EL,xL,SL,OL,TL,wL,CL,AL,PL,kL,DL,RL,IL,LL,BL,ML,jL,NL,FL,UL,VL,KL,WL,$L,qL,QL,zL,XL,GL,ZL,YL,HL,JL,eB,tB,nB,rB,iB,sB,oB,aB,lB,cB,uB,pB,dB,fB,hB,mB,gB,yB,_B,bB,vB,EB,xB,SB,OB,TB,wB,CB,AB,PB,kB,DB,RB,IB,LB,BB,MB,jB,NB,FB,UB,VB,KB,WB,$B,qB,QB,zB,XB,GB,ZB,YB,HB,JB,eM,tM,nM,rM,iM,sM,oM,aM,lM,cM,uM,pM,dM,fM,hM,mM,gM,yM,_M,bM,vM,EM,xM,SM,OM,TM,wM,CM,AM,PM,kM,DM,RM,IM,LM,BM,MM,jM,NM,FM,UM,VM,KM,WM,$M,qM,QM,zM,XM,GM,ZM,YM,HM,JM,ej,tj,nj,rj,ij,sj,oj,aj,lj,cj,uj,pj,dj,fj,hj,mj,gj,yj,_j,bj,vj,Ej,xj,Sj,Oj={};function Tj(){if(Fk)return Oj;Fk=1,Object.defineProperty(Oj,"__esModule",{value:!0});var e=Object.freeze({__proto__:null});let t,n;function r(e){return!(e<48)&&(e<58||!(e<65)&&(e<91||(95===e||!(e<97)&&(e<123||(i(e)||function(e){return s(e,null!=n?n:n=o("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r g0 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 n7q 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 ji 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n"))}(e))))))}function i(e){return s(e,null!=t?t:t=o("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk 2e8 f1 15v 3t6 6 38f"))}function s(e,t){let n=0,r=t.length/2|0,i=0,s=0,o=0;for(;no))return!0;n=i+1}return!1}function o(e){let t=0;return e.split(" ").map((e=>t+=0|parseInt(e,36)))}class a{constructor(e,t,n,r,i,s,o){this._raw2018=e,this._raw2019=t,this._raw2020=n,this._raw2021=r,this._raw2022=i,this._raw2023=s,this._raw2024=o}get es2018(){var e;return null!==(e=this._set2018)&&void 0!==e?e:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var e;return null!==(e=this._set2019)&&void 0!==e?e:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var e;return null!==(e=this._set2020)&&void 0!==e?e:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var e;return null!==(e=this._set2021)&&void 0!==e?e:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var e;return null!==(e=this._set2022)&&void 0!==e?e:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var e;return null!==(e=this._set2023)&&void 0!==e?e:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var e;return null!==(e=this._set2024)&&void 0!==e?e:this._set2024=new Set(this._raw2024.split(" "))}}const l=new Set(["General_Category","gc"]),c=new Set(["Script","Script_Extensions","sc","scx"]),u=new a("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","",""),p=new a("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",""),d=new a("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","");function f(e,t,n){return l.has(t)?e>=2018&&u.es2018.has(n):!!c.has(t)&&(e>=2018&&p.es2018.has(n)||e>=2019&&p.es2019.has(n)||e>=2020&&p.es2020.has(n)||e>=2021&&p.es2021.has(n)||e>=2022&&p.es2022.has(n)||e>=2023&&p.es2023.has(n))}const h=36,m=38,g=40,y=41,_=45,b=48,v=63,E=99,x=91,S=92,O=93,T=94,w=123,C=124,A=125;function P(e){return e>=65&&e<=90||e>=97&&e<=122}function k(e){return e>=b&&e<=57}function D(e){return e>=b&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function R(e){return 10===e||13===e||8232===e||8233===e}function I(e){return e>=97&&e<=102?e-97+10:e>=65&&e<=70?e-65+10:e-b}function L(e){return e>=55296&&e<=56319}function B(e){return e>=56320&&e<=57343}function M(e,t){return 1024*(e-55296)+(t-56320)+65536}const j={at(e,t,n){return n65535?2:1}};class F{constructor(){this._impl=j,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(e,t,n,r){this._impl=r?N:j,this._s=e,this._end=n,this.rewind(t)}rewind(e){const t=this._impl;this._i=e,this._cp1=t.at(this._s,this._end,e),this._w1=t.width(this._cp1),this._cp2=t.at(this._s,this._end,e+this._w1),this._w2=t.width(this._cp2),this._cp3=t.at(this._s,this._end,e+this._w1+this._w2),this._w3=t.width(this._cp3),this._cp4=t.at(this._s,this._end,e+this._w1+this._w2+this._w3)}advance(){if(-1!==this._cp1){const e=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=e.width(this._cp2),this._cp3=this._cp4,this._w3=e.width(this._cp3),this._cp4=e.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(e){return this._cp1===e&&(this.advance(),!0)}eat2(e,t){return this._cp1===e&&this._cp2===t&&(this.advance(),this.advance(),!0)}eat3(e,t,n){return this._cp1===e&&this._cp2===t&&this._cp3===n&&(this.advance(),this.advance(),this.advance(),!0)}}class U extends SyntaxError{constructor(e,t,n,r){let i="";if("literal"===e.kind){const t=e.source.slice(e.start,e.end);t&&(i=`: ${t}`)}else if("pattern"===e.kind){i=`: /${e.source.slice(e.start,e.end)}/${`${t.unicode?"u":""}${t.unicodeSets?"v":""}`}`}super(`Invalid regular expression${i}: ${r}`),this.index=n}}const V=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]);const K=new Set([T,h,S,46,42,43,v,g,y,x,O,w,A,C]),W=new Set([m,33,35,h,37,42,43,44,46,58,59,60,61,62,v,64,T,96,126]),$=new Set([g,y,x,O,w,A,47,_,S,C]),q=new Set([m,_,33,35,37,44,58,59,60,61,62,64,96,126]);function Q(e){return K.has(e)}function z(e){return W.has(e)}function X(e){return function(e){return!(e<65)&&(e<91||!(e<97)&&(e<123||i(e)))}(e)||e===h||95===e}function G(e){return P(e)||95===e}class Z{constructor(e){this._reader=new F,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._groupNames=new Set,this._backreferenceNames=new Set,this._srcCtx=null,this._options=null!=e?e:{}}validateLiteral(e,t=0,n=e.length){if(this._srcCtx={source:e,start:t,end:n,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(e,t,n),this.onLiteralEnter(t),this.eat(47)&&this.eatRegExpBody()&&this.eat(47)){const r=this.index,i=e.includes("u",r),s=e.includes("v",r);this.validateFlagsInternal(e,r,n),this.validatePatternInternal(e,t+1,r-1,{unicode:i,unicodeSets:s})}else if(t>=n)this.raise("Empty");else{const e=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${e}'`)}this.onLiteralLeave(t,n)}validateFlags(e,t=0,n=e.length){this._srcCtx={source:e,start:t,end:n,kind:"flags"},this.validateFlagsInternal(e,t,n)}validatePattern(e,t=0,n=e.length,r){this._srcCtx={source:e,start:t,end:n,kind:"pattern"},this.validatePatternInternal(e,t,n,r)}validatePatternInternal(e,t=0,n=e.length,r){const i=this._parseFlagsOptionToMode(r,n);this._unicodeMode=i.unicodeMode,this._nFlag=i.nFlag,this._unicodeSetsMode=i.unicodeSetsMode,this.reset(e,t,n),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&this._groupNames.size>0&&(this._nFlag=!0,this.rewind(t),this.consumePattern())}validateFlagsInternal(e,t,n){const r=new Set;let i=!1,s=!1,o=!1,a=!1,l=!1,c=!1,u=!1,p=!1;for(let d=t;d=2015?l=!0:121===n&&this.ecmaVersion>=2015?a=!0:115===n&&this.ecmaVersion>=2018?c=!0:100===n&&this.ecmaVersion>=2022?u=!0:118===n&&this.ecmaVersion>=2024?p=!0:this.raise(`Invalid flag '${e[d]}'`,{index:t})}this.onRegExpFlags(t,n,{global:i,ignoreCase:s,multiline:o,unicode:l,sticky:a,dotAll:c,hasIndices:u,unicodeSets:p})}_parseFlagsOptionToMode(e,t){let n=!1,r=!1;e&&this.ecmaVersion>=2015&&("object"==typeof e?(n=Boolean(e.unicode),this.ecmaVersion>=2024&&(r=Boolean(e.unicodeSets))):n=e),n&&r&&this.raise("Invalid regular expression flags",{index:t+1,unicode:n,unicodeSets:r});return{unicodeMode:n||r,nFlag:n&&this.ecmaVersion>=2018||r||Boolean(this._options.strict&&this.ecmaVersion>=2023),unicodeSetsMode:r}}get strict(){return Boolean(this._options.strict)||this._unicodeMode}get ecmaVersion(){var e;return null!==(e=this._options.ecmaVersion)&&void 0!==e?e:2024}onLiteralEnter(e){this._options.onLiteralEnter&&this._options.onLiteralEnter(e)}onLiteralLeave(e,t){this._options.onLiteralLeave&&this._options.onLiteralLeave(e,t)}onRegExpFlags(e,t,n){this._options.onRegExpFlags&&this._options.onRegExpFlags(e,t,n),this._options.onFlags&&this._options.onFlags(e,t,n.global,n.ignoreCase,n.multiline,n.unicode,n.sticky,n.dotAll,n.hasIndices)}onPatternEnter(e){this._options.onPatternEnter&&this._options.onPatternEnter(e)}onPatternLeave(e,t){this._options.onPatternLeave&&this._options.onPatternLeave(e,t)}onDisjunctionEnter(e){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(e)}onDisjunctionLeave(e,t){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(e,t)}onAlternativeEnter(e,t){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(e,t)}onAlternativeLeave(e,t,n){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(e,t,n)}onGroupEnter(e){this._options.onGroupEnter&&this._options.onGroupEnter(e)}onGroupLeave(e,t){this._options.onGroupLeave&&this._options.onGroupLeave(e,t)}onCapturingGroupEnter(e,t){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(e,t)}onCapturingGroupLeave(e,t,n){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(e,t,n)}onQuantifier(e,t,n,r,i){this._options.onQuantifier&&this._options.onQuantifier(e,t,n,r,i)}onLookaroundAssertionEnter(e,t,n){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(e,t,n)}onLookaroundAssertionLeave(e,t,n,r){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(e,t,n,r)}onEdgeAssertion(e,t,n){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(e,t,n)}onWordBoundaryAssertion(e,t,n,r){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(e,t,n,r)}onAnyCharacterSet(e,t,n){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(e,t,n)}onEscapeCharacterSet(e,t,n,r){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(e,t,n,r)}onUnicodePropertyCharacterSet(e,t,n,r,i,s,o){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(e,t,n,r,i,s,o)}onCharacter(e,t,n){this._options.onCharacter&&this._options.onCharacter(e,t,n)}onBackreference(e,t,n){this._options.onBackreference&&this._options.onBackreference(e,t,n)}onCharacterClassEnter(e,t,n){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(e,t,n)}onCharacterClassLeave(e,t,n){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(e,t,n)}onCharacterClassRange(e,t,n,r){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(e,t,n,r)}onClassIntersection(e,t){this._options.onClassIntersection&&this._options.onClassIntersection(e,t)}onClassSubtraction(e,t){this._options.onClassSubtraction&&this._options.onClassSubtraction(e,t)}onClassStringDisjunctionEnter(e){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(e)}onClassStringDisjunctionLeave(e,t){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(e,t)}onStringAlternativeEnter(e,t){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(e,t)}onStringAlternativeLeave(e,t,n){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(e,t,n)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(e,t,n){this._reader.reset(e,t,n,this._unicodeMode)}rewind(e){this._reader.rewind(e)}advance(){this._reader.advance()}eat(e){return this._reader.eat(e)}eat2(e,t){return this._reader.eat2(e,t)}eat3(e,t,n){return this._reader.eat3(e,t,n)}raise(e,t){var n,r,i;throw new U(this._srcCtx,{unicode:null!==(n=null==t?void 0:t.unicode)&&void 0!==n?n:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:null!==(r=null==t?void 0:t.unicodeSets)&&void 0!==r?r:this._unicodeSetsMode},null!==(i=null==t?void 0:t.index)&&void 0!==i?i:this.index,e)}eatRegExpBody(){const e=this.index;let t=!1,n=!1;for(;;){const r=this.currentCodePoint;if(-1===r||R(r)){const e=t?"character class":"regular expression";this.raise(`Unterminated ${e}`)}if(n)n=!1;else if(r===S)n=!0;else if(r===x)t=!0;else if(r===O)t=!1;else if(47===r&&!t||42===r&&this.index===e)break;this.advance()}return this.index!==e}consumePattern(){const e=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupNames.clear(),this._backreferenceNames.clear(),this.onPatternEnter(e),this.consumeDisjunction();const t=this.currentCodePoint;if(-1!==this.currentCodePoint){t===y&&this.raise("Unmatched ')'"),t===S&&this.raise("\\ at end of pattern"),t!==O&&t!==A||this.raise("Lone quantifier brackets");const e=String.fromCodePoint(t);this.raise(`Unexpected character '${e}'`)}for(const e of this._backreferenceNames)this._groupNames.has(e)||this.raise("Invalid named capture referenced");this.onPatternLeave(e,this.index)}countCapturingParens(){const e=this.index;let t=!1,n=!1,r=0,i=0;for(;-1!==(i=this.currentCodePoint);)n?n=!1:i===S?n=!0:i===x?t=!0:i===O?t=!1:i!==g||t||this.nextCodePoint===v&&(60!==this.nextCodePoint2||61===this.nextCodePoint3||33===this.nextCodePoint3)||(r+=1),this.advance();return this.rewind(e),r}consumeDisjunction(){const e=this.index;let t=0;this.onDisjunctionEnter(e);do{this.consumeAlternative(t++)}while(this.eat(C));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(w)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(e,this.index)}consumeAlternative(e){const t=this.index;for(this.onAlternativeEnter(t,e);-1!==this.currentCodePoint&&this.consumeTerm(););this.onAlternativeLeave(t,this.index,e)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const e=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(T))return this.onEdgeAssertion(e,this.index,"start"),!0;if(this.eat(h))return this.onEdgeAssertion(e,this.index,"end"),!0;if(this.eat2(S,66))return this.onWordBoundaryAssertion(e,this.index,"word",!0),!0;if(this.eat2(S,98))return this.onWordBoundaryAssertion(e,this.index,"word",!1),!0;if(this.eat2(g,v)){const t=this.ecmaVersion>=2018&&this.eat(60);let n=!1;if(this.eat(61)||(n=this.eat(33))){const r=t?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(e,r,n),this.consumeDisjunction(),this.eat(y)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!t&&!this.strict,this.onLookaroundAssertionLeave(e,this.index,r,n),!0}this.rewind(e)}return!1}consumeQuantifier(e=!1){const t=this.index;let n=0,r=0,i=!1;if(this.eat(42))n=0,r=Number.POSITIVE_INFINITY;else if(this.eat(43))n=1,r=Number.POSITIVE_INFINITY;else if(this.eat(v))n=0,r=1;else{if(!this.eatBracedQuantifier(e))return!1;({min:n,max:r}=this._lastRange)}return i=!this.eat(v),e||this.onQuantifier(t,this.index,n,r,i),!0}eatBracedQuantifier(e){const t=this.index;if(this.eat(w)){if(this.eatDecimalDigits()){const t=this._lastIntValue;let n=t;if(this.eat(44)&&(n=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(A))return!e&&n=2018?this.consumeGroupSpecifier()&&(t=this._lastStrValue):this.currentCodePoint===v&&this.raise("Invalid group"),this.onCapturingGroupEnter(e,t),this.consumeDisjunction(),this.eat(y)||this.raise("Unterminated group"),this.onCapturingGroupLeave(e,this.index,t),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||Boolean(this.consumeCharacterClass())||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const e=this.index;return this.currentCodePoint===S&&this.nextCodePoint===E&&(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(e,this.index,S),!0)}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const e=this.index,t=this.currentCodePoint;return-1!==t&&!Q(t)&&(this.advance(),this.onCharacter(e,this.index,t),!0)}consumeExtendedPatternCharacter(){const e=this.index,t=this.currentCodePoint;return-1!==t&&t!==T&&t!==h&&t!==S&&46!==t&&42!==t&&43!==t&&t!==v&&t!==g&&t!==y&&t!==x&&t!==C&&(this.advance(),this.onCharacter(e,this.index,t),!0)}consumeGroupSpecifier(){if(this.eat(v)){if(this.eatGroupName()){if(!this._groupNames.has(this._lastStrValue))return this._groupNames.add(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return!!(this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName())||((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const e=this.index;if(this.eatDecimalEscape()){const t=this._lastIntValue;if(t<=this._numCapturingParens)return this.onBackreference(e-1,this.index,t),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(e)}return!1}consumeCharacterClassEscape(){var e;const t=this.index;if(this.eat(100))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"digit",!1),{};if(this.eat(68))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"digit",!0),{};if(this.eat(115))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"space",!1),{};if(this.eat(83))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"space",!0),{};if(this.eat(119))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"word",!1),{};if(this.eat(87))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"word",!0),{};let n=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(112)||(n=this.eat(80)))){this._lastIntValue=-1;let r=null;if(this.eat(w)&&(r=this.eatUnicodePropertyValueExpression())&&this.eat(A))return n&&r.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(t-1,this.index,"property",r.key,r.value,n,null!==(e=r.strings)&&void 0!==e&&e),{mayContainStrings:r.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const e=this.index;return!!(this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape())&&(this.onCharacter(e-1,this.index,this._lastIntValue),!0)}consumeKGroupName(){const e=this.index;if(this.eat(107)){if(this.eatGroupName()){const t=this._lastStrValue;return this._backreferenceNames.add(t),this.onBackreference(e-1,this.index,t),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const e=this.index;if(this.eat(x)){const t=this.eat(T);this.onCharacterClassEnter(e,t,this._unicodeSetsMode);const n=this.consumeClassContents();return this.eat(O)||(-1===this.currentCodePoint&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),t&&n.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(e,this.index,t),n}return null}consumeClassContents(){if(this._unicodeSetsMode){if(this.currentCodePoint===O)return{};return this.consumeClassSetExpression()}const e=this.strict||this._unicodeMode;for(;;){const t=this.index;if(!this.consumeClassAtom())break;const n=this._lastIntValue;if(!this.eat(_))continue;if(this.onCharacter(this.index-1,this.index,_),!this.consumeClassAtom())break;const r=this._lastIntValue;-1!==n&&-1!==r?(n>r&&this.raise("Range out of order in character class"),this.onCharacterClassRange(t,this.index,n,r)):e&&this.raise("Invalid character class")}return{}}consumeClassAtom(){const e=this.index,t=this.currentCodePoint;if(-1!==t&&t!==S&&t!==O)return this.advance(),this._lastIntValue=t,this.onCharacter(e,this.index,this._lastIntValue),!0;if(this.eat(S)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===E)return this._lastIntValue=S,this.onCharacter(e,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(e)}return!1}consumeClassEscape(){const e=this.index;if(this.eat(98))return this._lastIntValue=8,this.onCharacter(e-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(_))return this._lastIntValue=_,this.onCharacter(e-1,this.index,this._lastIntValue),!0;let t=0;return this.strict||this._unicodeMode||this.currentCodePoint!==E||!k(t=this.nextCodePoint)&&95!==t?Boolean(this.consumeCharacterClassEscape())||this.consumeCharacterEscape():(this.advance(),this.advance(),this._lastIntValue=t%32,this.onCharacter(e-1,this.index,this._lastIntValue),!0)}consumeClassSetExpression(){const e=this.index;let t=!1,n=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(e))return this.consumeClassUnionRight({}),{};t=!1}else if(n=this.consumeClassSetOperand())t=n.mayContainStrings;else{const e=this.currentCodePoint;e===S&&(this.advance(),this.raise("Invalid escape")),e===this.nextCodePoint&&z(e)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(m,m)){for(;this.currentCodePoint!==m&&(n=this.consumeClassSetOperand());)if(this.onClassIntersection(e,this.index),n.mayContainStrings||(t=!1),!this.eat2(m,m))return{mayContainStrings:t};this.raise("Invalid character in character class")}if(this.eat2(_,_)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(e,this.index),!this.eat2(_,_))return{mayContainStrings:t};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:t})}consumeClassUnionRight(e){let t=e.mayContainStrings;for(;;){const e=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(e);continue}const n=this.consumeClassSetOperand();if(!n)break;n.mayContainStrings&&(t=!0)}return{mayContainStrings:t}}consumeClassSetRangeFromOperator(e){const t=this.index,n=this._lastIntValue;if(this.eat(_)){if(this.consumeClassSetCharacter()){const t=this._lastIntValue;return-1!==n&&-1!==t||this.raise("Invalid character class"),n>t&&this.raise("Range out of order in character class"),this.onCharacterClassRange(e,this.index,n,t),!0}this.rewind(t)}return!1}consumeClassSetOperand(){let e=null;return(e=this.consumeNestedClass())||(e=this.consumeClassStringDisjunction())?e:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const e=this.index;if(this.eat(x)){const t=this.eat(T);this.onCharacterClassEnter(e,t,!0);const n=this.consumeClassContents();return this.eat(O)||this.raise("Unterminated character class"),t&&n.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(e,this.index,t),n}if(this.eat(S)){const t=this.consumeCharacterClassEscape();if(t)return t;this.rewind(e)}return null}consumeClassStringDisjunction(){const e=this.index;if(this.eat3(S,113,w)){this.onClassStringDisjunctionEnter(e);let t=0,n=!1;do{this.consumeClassString(t++).mayContainStrings&&(n=!0)}while(this.eat(C));if(this.eat(A))return this.onClassStringDisjunctionLeave(e,this.index),{mayContainStrings:n};this.raise("Unterminated class string disjunction")}return null}consumeClassString(e){const t=this.index;let n=0;for(this.onStringAlternativeEnter(t,e);-1!==this.currentCodePoint&&this.consumeClassSetCharacter();)n++;return this.onStringAlternativeLeave(t,this.index,e),{mayContainStrings:1!==n}}consumeClassSetCharacter(){const e=this.index,t=this.currentCodePoint;if(!(t===this.nextCodePoint&&z(t)||-1===t||function(e){return $.has(e)}(t)))return this._lastIntValue=t,this.advance(),this.onCharacter(e,this.index,this._lastIntValue),!0;if(this.eat(S)){if(this.consumeCharacterEscape())return!0;if(function(e){return q.has(e)}(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(e,this.index,this._lastIntValue),!0;if(this.eat(98))return this._lastIntValue=8,this.onCharacter(e,this.index,this._lastIntValue),!0;this.rewind(e)}return!1}eatGroupName(){if(this.eat(60)){if(this.eatRegExpIdentifierName()&&this.eat(62))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const e=this.index,t=!this._unicodeMode&&this.ecmaVersion>=2020;let n=this.currentCodePoint;return this.advance(),n===S&&this.eatRegExpUnicodeEscapeSequence(t)?n=this._lastIntValue:t&&L(n)&&B(this.currentCodePoint)&&(n=M(n,this.currentCodePoint),this.advance()),X(n)?(this._lastIntValue=n,!0):(this.index!==e&&this.rewind(e),!1)}eatRegExpIdentifierPart(){const e=this.index,t=!this._unicodeMode&&this.ecmaVersion>=2020;let n=this.currentCodePoint;return this.advance(),n===S&&this.eatRegExpUnicodeEscapeSequence(t)?n=this._lastIntValue:t&&L(n)&&B(this.currentCodePoint)&&(n=M(n,this.currentCodePoint),this.advance()),function(e){return r(e)||e===h||8204===e||8205===e}(n)?(this._lastIntValue=n,!0):(this.index!==e&&this.rewind(e),!1)}eatCControlLetter(){const e=this.index;if(this.eat(E)){if(this.eatControlLetter())return!0;this.rewind(e)}return!1}eatZero(){return this.currentCodePoint===b&&!k(this.nextCodePoint)&&(this._lastIntValue=0,this.advance(),!0)}eatControlEscape(){return this.eat(102)?(this._lastIntValue=12,!0):this.eat(110)?(this._lastIntValue=10,!0):this.eat(114)?(this._lastIntValue=13,!0):this.eat(116)?(this._lastIntValue=9,!0):!!this.eat(118)&&(this._lastIntValue=11,!0)}eatControlLetter(){const e=this.currentCodePoint;return!!P(e)&&(this.advance(),this._lastIntValue=e%32,!0)}eatRegExpUnicodeEscapeSequence(e=!1){const t=this.index,n=e||this._unicodeMode;if(this.eat(117)){if(n&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||n&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||n)&&this.raise("Invalid unicode escape"),this.rewind(t)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const e=this.index;if(this.eatFixedHexDigits(4)){const t=this._lastIntValue;if(L(t)&&this.eat(S)&&this.eat(117)&&this.eatFixedHexDigits(4)){const e=this._lastIntValue;if(B(e))return this._lastIntValue=M(t,e),!0}this.rewind(e)}return!1}eatRegExpUnicodeCodePointEscape(){const e=this.index;return!!(this.eat(w)&&this.eatHexDigits()&&this.eat(A)&&function(e){return e>=0&&e<=1114111}(this._lastIntValue))||(this.rewind(e),!1)}eatIdentityEscape(){const e=this.currentCodePoint;return!!this.isValidIdentityEscape(e)&&(this._lastIntValue=e,this.advance(),!0)}isValidIdentityEscape(e){return-1!==e&&(this._unicodeMode?Q(e)||47===e:this.strict?!r(e):this._nFlag?!(e===E||107===e):e!==E)}eatDecimalEscape(){this._lastIntValue=0;let e=this.currentCodePoint;if(e>=49&&e<=57){do{this._lastIntValue=10*this._lastIntValue+(e-b),this.advance()}while((e=this.currentCodePoint)>=b&&e<=57);return!0}return!1}eatUnicodePropertyValueExpression(){const e=this.index;if(this.eatUnicodePropertyName()&&this.eat(61)){const e=this._lastStrValue;if(this.eatUnicodePropertyValue()){const t=this._lastStrValue;if(f(this.ecmaVersion,e,t))return{key:e,value:t||null};this.raise("Invalid property name")}}if(this.rewind(e),this.eatLoneUnicodePropertyNameOrValue()){const e=this._lastStrValue;if(f(this.ecmaVersion,"General_Category",e))return{key:"General_Category",value:e||null};if(function(e,t){return e>=2018&&d.es2018.has(t)||e>=2019&&d.es2019.has(t)||e>=2021&&d.es2021.has(t)}(this.ecmaVersion,e))return{key:e,value:null};if(this._unicodeSetsMode&&function(e,t){return e>=2024&&V.has(t)}(this.ecmaVersion,e))return{key:e,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";G(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return""!==this._lastStrValue}eatUnicodePropertyValue(){for(this._lastStrValue="";G(e=this.currentCodePoint)||k(e);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();var e;return""!==this._lastStrValue}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const e=this.index;if(this.eat(120)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(e)}return!1}eatDecimalDigits(){const e=this.index;for(this._lastIntValue=0;k(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+I(this.currentCodePoint),this.advance();return this.index!==e}eatHexDigits(){const e=this.index;for(this._lastIntValue=0;D(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+I(this.currentCodePoint),this.advance();return this.index!==e}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const e=this._lastIntValue;if(this.eatOctalDigit()){const t=this._lastIntValue;e<=3&&this.eatOctalDigit()?this._lastIntValue=64*e+8*t+this._lastIntValue:this._lastIntValue=8*e+t}else this._lastIntValue=e;return!0}return!1}eatOctalDigit(){const e=this.currentCodePoint;return function(e){return e>=b&&e<=55}(e)?(this.advance(),this._lastIntValue=e-b,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(e){const t=this.index;this._lastIntValue=0;for(let n=0;ne.name===t));e.resolved=n,n.references.push(e)}}onAlternativeEnter(e){const t=this._node;if("Assertion"!==t.type&&"CapturingGroup"!==t.type&&"Group"!==t.type&&"Pattern"!==t.type)throw new Error("UnknownError");this._node={type:"Alternative",parent:t,start:e,end:e,raw:"",elements:[]},t.alternatives.push(this._node)}onAlternativeLeave(e,t){const n=this._node;if("Alternative"!==n.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onGroupEnter(e){const t=this._node;if("Alternative"!==t.type)throw new Error("UnknownError");this._node={type:"Group",parent:t,start:e,end:e,raw:"",alternatives:[]},t.elements.push(this._node)}onGroupLeave(e,t){const n=this._node;if("Group"!==n.type||"Alternative"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onCapturingGroupEnter(e,t){const n=this._node;if("Alternative"!==n.type)throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:n,start:e,end:e,raw:"",name:t,alternatives:[],references:[]},n.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(e,t){const n=this._node;if("CapturingGroup"!==n.type||"Alternative"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onQuantifier(e,t,n,r,i){const s=this._node;if("Alternative"!==s.type)throw new Error("UnknownError");const o=s.elements.pop();if(null==o||"Quantifier"===o.type||"Assertion"===o.type&&"lookahead"!==o.kind)throw new Error("UnknownError");const a={type:"Quantifier",parent:s,start:o.start,end:t,raw:this.source.slice(o.start,t),min:n,max:r,greedy:i,element:o};s.elements.push(a),o.parent=a}onLookaroundAssertionEnter(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");const i=this._node={type:"Assertion",parent:r,start:e,end:e,raw:"",kind:t,negate:n,alternatives:[]};r.elements.push(i)}onLookaroundAssertionLeave(e,t){const n=this._node;if("Assertion"!==n.type||"Alternative"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onEdgeAssertion(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");r.elements.push({type:"Assertion",parent:r,start:e,end:t,raw:this.source.slice(e,t),kind:n})}onWordBoundaryAssertion(e,t,n,r){const i=this._node;if("Alternative"!==i.type)throw new Error("UnknownError");i.elements.push({type:"Assertion",parent:i,start:e,end:t,raw:this.source.slice(e,t),kind:n,negate:r})}onAnyCharacterSet(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");r.elements.push({type:"CharacterSet",parent:r,start:e,end:t,raw:this.source.slice(e,t),kind:n})}onEscapeCharacterSet(e,t,n,r){const i=this._node;if("Alternative"!==i.type&&"CharacterClass"!==i.type)throw new Error("UnknownError");i.elements.push({type:"CharacterSet",parent:i,start:e,end:t,raw:this.source.slice(e,t),kind:n,negate:r})}onUnicodePropertyCharacterSet(e,t,n,r,i,s,o){const a=this._node;if("Alternative"!==a.type&&"CharacterClass"!==a.type||o&&(s||i))throw new Error("UnknownError");const l={type:"CharacterSet",parent:a,start:e,end:t,raw:this.source.slice(e,t),kind:n,strings:o,key:r},c=o?Object.assign(Object.assign({},l),{value:null,negate:!1,strings:!0}):Object.assign(Object.assign({},l),{value:i,negate:s,strings:!1});a.elements.push(c)}onCharacter(e,t,n){const r=this._node;if("Alternative"!==r.type&&"CharacterClass"!==r.type&&"StringAlternative"!==r.type)throw new Error("UnknownError");r.elements.push({type:"Character",parent:r,start:e,end:t,raw:this.source.slice(e,t),value:n})}onBackreference(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");const i={type:"Backreference",parent:r,start:e,end:t,raw:this.source.slice(e,t),ref:n,resolved:J};r.elements.push(i),this._backreferences.push(i)}onCharacterClassEnter(e,t,n){const r=this._node,i={type:"CharacterClass",parent:r,start:e,end:e,raw:"",unicodeSets:n,negate:t,elements:[]};if("Alternative"===r.type){const e=Object.assign(Object.assign({},i),{parent:r});this._node=e,r.elements.push(e)}else{if("CharacterClass"!==r.type||!r.unicodeSets||!n)throw new Error("UnknownError");{const e=Object.assign(Object.assign({},i),{parent:r,unicodeSets:n});this._node=e,r.elements.push(e)}}}onCharacterClassLeave(e,t){const n=this._node;if("CharacterClass"!==n.type||"Alternative"!==n.parent.type&&"CharacterClass"!==n.parent.type||this._expressionBuffer&&n.elements.length>0)throw new Error("UnknownError");const r=n.parent;n.end=t,n.raw=this.source.slice(e,t),this._node=r;const i=this._expressionBuffer;if(this._expressionBuffer=null,!i)return;const s={type:"ExpressionCharacterClass",parent:r,start:n.start,end:n.end,raw:n.raw,negate:n.negate,expression:i};if(i.parent=s,n!==r.elements.pop())throw new Error("UnknownError");r.elements.push(s)}onCharacterClassRange(e,t){const n=this._node;if("CharacterClass"!==n.type)throw new Error("UnknownError");const r=n.elements,i=r.pop();if(!i||"Character"!==i.type)throw new Error("UnknownError");if(!n.unicodeSets){const e=r.pop();if(!e||"Character"!==e.type||e.value!==_)throw new Error("UnknownError")}const s=r.pop();if(!s||"Character"!==s.type)throw new Error("UnknownError");const o={type:"CharacterClassRange",parent:n,start:e,end:t,raw:this.source.slice(e,t),min:s,max:i};s.parent=o,i.parent=o,r.push(o)}onClassIntersection(e,t){var n;const r=this._node;if("CharacterClass"!==r.type||!r.unicodeSets)throw new Error("UnknownError");const i=r.elements.pop(),s=null!==(n=this._expressionBuffer)&&void 0!==n?n:r.elements.pop();if(!s||!i||"ClassSubtraction"===s.type||"ClassIntersection"!==s.type&&!ee(s)||!ee(i))throw new Error("UnknownError");const o={type:"ClassIntersection",parent:r,start:e,end:t,raw:this.source.slice(e,t),left:s,right:i};s.parent=o,i.parent=o,this._expressionBuffer=o}onClassSubtraction(e,t){var n;const r=this._node;if("CharacterClass"!==r.type||!r.unicodeSets)throw new Error("UnknownError");const i=r.elements.pop(),s=null!==(n=this._expressionBuffer)&&void 0!==n?n:r.elements.pop();if(!s||!i||"ClassIntersection"===s.type||"ClassSubtraction"!==s.type&&!ee(s)||!ee(i))throw new Error("UnknownError");const o={type:"ClassSubtraction",parent:r,start:e,end:t,raw:this.source.slice(e,t),left:s,right:i};s.parent=o,i.parent=o,this._expressionBuffer=o}onClassStringDisjunctionEnter(e){const t=this._node;if("CharacterClass"!==t.type||!t.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:t,start:e,end:e,raw:"",alternatives:[]},t.elements.push(this._node)}onClassStringDisjunctionLeave(e,t){const n=this._node;if("ClassStringDisjunction"!==n.type||"CharacterClass"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onStringAlternativeEnter(e){const t=this._node;if("ClassStringDisjunction"!==t.type)throw new Error("UnknownError");this._node={type:"StringAlternative",parent:t,start:e,end:e,raw:"",elements:[]},t.alternatives.push(this._node)}onStringAlternativeLeave(e,t){const n=this._node;if("StringAlternative"!==n.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}}class ne{constructor(e){this._state=new te(e),this._validator=new Z(this._state)}parseLiteral(e,t=0,n=e.length){this._state.source=e,this._validator.validateLiteral(e,t,n);const r=this._state.pattern,i=this._state.flags,s={type:"RegExpLiteral",parent:null,start:t,end:n,raw:e,pattern:r,flags:i};return r.parent=s,i.parent=s,s}parseFlags(e,t=0,n=e.length){return this._state.source=e,this._validator.validateFlags(e,t,n),this._state.flags}parsePattern(e,t=0,n=e.length,r){return this._state.source=e,this._validator.validatePattern(e,t,n,r),this._state.pattern}}class re{constructor(e){this._handlers=e}visit(e){switch(e.type){case"Alternative":this.visitAlternative(e);break;case"Assertion":this.visitAssertion(e);break;case"Backreference":this.visitBackreference(e);break;case"CapturingGroup":this.visitCapturingGroup(e);break;case"Character":this.visitCharacter(e);break;case"CharacterClass":this.visitCharacterClass(e);break;case"CharacterClassRange":this.visitCharacterClassRange(e);break;case"CharacterSet":this.visitCharacterSet(e);break;case"ClassIntersection":this.visitClassIntersection(e);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(e);break;case"ClassSubtraction":this.visitClassSubtraction(e);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(e);break;case"Flags":this.visitFlags(e);break;case"Group":this.visitGroup(e);break;case"Pattern":this.visitPattern(e);break;case"Quantifier":this.visitQuantifier(e);break;case"RegExpLiteral":this.visitRegExpLiteral(e);break;case"StringAlternative":this.visitStringAlternative(e);break;default:throw new Error(`Unknown type: ${e.type}`)}}visitAlternative(e){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(e),e.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(e)}visitAssertion(e){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(e),"lookahead"!==e.kind&&"lookbehind"!==e.kind||e.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(e)}visitBackreference(e){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(e),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(e)}visitCapturingGroup(e){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(e)}visitCharacter(e){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(e),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(e)}visitCharacterClass(e){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(e),e.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(e)}visitCharacterClassRange(e){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(e),this.visitCharacter(e.min),this.visitCharacter(e.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(e)}visitCharacterSet(e){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(e),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(e)}visitClassIntersection(e){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(e),this.visit(e.left),this.visit(e.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(e)}visitClassStringDisjunction(e){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(e)}visitClassSubtraction(e){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(e),this.visit(e.left),this.visit(e.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(e)}visitExpressionCharacterClass(e){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(e),this.visit(e.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(e)}visitFlags(e){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(e),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(e)}visitGroup(e){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(e)}visitPattern(e){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(e)}visitQuantifier(e){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(e),this.visit(e.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(e)}visitRegExpLiteral(e){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(e),this.visitPattern(e.pattern),this.visitFlags(e.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(e)}visitStringAlternative(e){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(e),e.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(e)}}return Oj.AST=e,Oj.RegExpParser=ne,Oj.RegExpValidator=Z,Oj.parseRegExpLiteral=function(e,t){return new ne(t).parseLiteral(String(e))},Oj.validateRegExpLiteral=function(e,t){new Z(t).validateLiteral(e)},Oj.visitRegExpAST=function(e,t){new re(t).visit(e)},Oj}function wj(){if(Yk)return Zk;Yk=1;const e=Pw();return Zk={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(t){let n=[];return{Program(){n=[]},ClassBody(){n.push(Object.create(null))},"ClassBody:exit"(){n.pop()},"MethodDefinition, PropertyDefinition"(r){const i=e.getStaticPropertyName(r),s="MethodDefinition"===r.type?r.kind:"field";if(null===i||"constructor"===s)return;const o=function(e,t){const r=n[n.length-1],i=`$${e}`;return r[i]||(r[i]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),r[i][t?"static":"nonStatic"]}(i,r.static);let a=!1;"get"===s?(a=o.init||o.get,o.get=!0):"set"===s?(a=o.init||o.set,o.set=!0):(a=o.init||o.get||o.set,o.init=!0),a&&t.report({node:r,messageId:"unexpected",data:{name:i}})}}}},Zk}function Cj(){if(sD)return iD;sD=1;const e=["ImportSpecifier","ExportSpecifier"],t=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function n(n,r){return("named"===r?e:t).includes(n)}function r(e){if(e.specifiers&&e.specifiers.length>0){const t=e.specifiers,r=t.findIndex((({type:e})=>n(e,"named")||n(e,"namespace")));return t[r>-1?r:0].type}return"ExportAllDeclaration"===e.type?e.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function i(e,t){const i=r(e),s=r(t);return!("ExportAll"===i&&"ExportAll"!==s&&"SideEffectImport"!==s||"ExportAll"!==i&&"SideEffectImport"!==i&&"ExportAll"===s)&&!(n(i,"namespace")&&n(s,"named")||n(s,"namespace")&&n(i,"named"))}function s(e,t){let n=0;for(;ne===t)).map((({node:e})=>e))}function a(e){return e&&e.source&&e.source.value?e.source.value.trim():""}function l(e,t,n,r){return function(i){const l=a(i);if(l){!function(e,t,n,r,i){const l=a(t);if(n.has(l)){const a=n.get(l),c=[],u=o(a,"import");let p;i&&(p=o(a,"export")),"import"===r?(s(t,u)&&c.push("import"),i&&s(t,p)&&c.push("importAs")):"export"===r&&(s(t,p)&&c.push("export"),s(t,u)&&c.push("exportAs")),c.forEach((n=>e.report({node:t,messageId:n,data:{module:l}})))}}(e,i,t,n,r);const c={node:i,declarationType:n};let u=[c];if(t.has(l)){u=[...t.get(l),c]}t.set(l,u)}}}return iD={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(e){const t=(e.options[0]||{}).includeExports,n=new Map,r={ImportDeclaration:l(e,n,"import",t)};return t&&(r.ExportNamedDeclaration=l(e,n,"export",t),r.ExportAllDeclaration=l(e,n,"export",t)),r}},iD}function Aj(){if(aD)return oD;aD=1;const e=Pw();return oD=class{constructor(e,t){this.fixer=e,this.sourceCode=t,this.retainedRange=null}retainRange(e){return this.retainedRange=e,this}retainEnclosingFunction(t){const n=e.getUpperFunction(t);return this.retainRange(n?n.range:this.sourceCode.ast.range)}retainSurroundingTokens(e){const t=this.sourceCode.getTokenBefore(e)||e,n=this.sourceCode.getTokenAfter(e)||e;return this.retainRange([t.range[0],n.range[1]])}replaceTextRange(e,t){let n;return n=this.retainedRange?[Math.min(this.retainedRange[0],e[0]),Math.max(this.retainedRange[1],e[1])]:e,this.fixer.replaceTextRange(n,this.sourceCode.text.slice(n[0],e[0])+t+this.sourceCode.text.slice(e[1],n[1]))}remove(e){return this.replaceTextRange(e.range,"")}},oD}function Pj(){if(cD)return lD;cD=1;const e=Pw(),t=Aj();return lD={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(n){const r=n.sourceCode;function i(e){const i=r.getScope(e.parent);n.report({node:e,messageId:"unexpected",fix(n){if(!function(e,t){if("FunctionDeclaration"===e.type)return!1;if("BlockStatement"!==e.type)return!0;const n=t.childScopes.find((({block:t})=>t===e));return!n||function(e,t){if(0===e.length)return!0;const n=t.variableScope;if(t.variables.filter((({defs:e})=>e.length>0)).some((({name:t})=>e.includes(t))))return!1;if(t!==n&&"catch"===t.upper.type&&t.upper.variables.some((({name:t})=>e.includes(t))))return!1;if(t.variables.filter((({defs:e,references:t})=>0===e.length&&t.length>0)).some((({name:t})=>e.includes(t))))return!1;if(t.through.some((t=>e.includes(t.identifier.name))))return!1;if(t!==n){const r=t.block.range;if(n.variables.filter((({name:t})=>e.includes(t))).some((e=>e.defs.some((({node:{range:e}})=>r[0]<=e[0]&&e[1]<=r[1])))))return!1}return!0}(n.variables.map((({name:e})=>e)),t)}(e,i))return null;const s=r.getFirstToken(e),o=r.getTokenBefore(s),a=r.getText(e),l=r.getTokenBefore(o);let c,u;u="Punctuator"===s.type&&"{"===s.value?r.getTokenAfter(s):s;const p="BlockStatement"!==e.parent.consequent.type&&";"!==l.value,d=/^[([/+`-]/u.test(u.value);if(p&&d)return null;const f=r.getLastToken(e),h=r.getTokenBefore(f);if(";"!==h.value){const e=r.getTokenAfter(f),t=e&&/^[([/+`-]/u.test(e.value),n=e&&e.loc.start.line===h.loc.start.line;if(t||n&&"}"!==e.value)return null}return c="Punctuator"===s.type&&"{"===s.value?a.slice(1,-1):a,new t(n,r).retainEnclosingFunction(e).replaceTextRange([o.range[0],e.range[1]],c)}})}function s(e){return"ReturnStatement"===e.type}function o(e){if("BlockStatement"===e.type){const t=e.body,n=t[t.length-1];return n&&s(n)}return s(e)}function a(e){return s(e)||function(e){return"IfStatement"===e.type&&function(e){return e.alternate&&e.consequent}(e)&&o(e.alternate)&&o(e.consequent)}(e)}function l(e){return"BlockStatement"===e.type?e.body.some(a):a(e)}return{"IfStatement:exit":!(n.options[0]&&!1===n.options[0].allowElseIf)?function(t){const n=t.parent;if(!e.STATEMENT_LIST_PARENTS.has(n.type))return;const r=[];let s;for(let e=t;"IfStatement"===e.type;e=e.alternate){if(!e.alternate)return;r.push(e.consequent),s=e.alternate}r.every(l)&&i(s)}:function(t){const n=t.parent;if(!e.STATEMENT_LIST_PARENTS.has(n.type))return;const r=t.alternate;r&&l(t.consequent)&&i(r)}}}},lD}function kj(){if(SD)return xD;SD=1;const e=Pw(),t=Object.freeze(["global","window","globalThis"]);function n(t,n){return e.isSpecificMemberAccess(t,null,n)}return xD={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(r){const i=Boolean(r.options[0]&&r.options[0].allowIndirect),s=r.sourceCode;let o=null;function a(e){const t=s.getScope(e).isStrict;o={upper:o,node:e,strict:t,isTopLevelOfScript:!1,defaultThis:!1,initialized:t}}function l(){o=o.upper}function c(e){const t=e.parent,n="MemberExpression"===e.type?e.property:e,i="CallExpression"===t.type&&t.callee===e?t:e;r.report({node:i,loc:n.loc,messageId:"unexpected"})}return i?{"CallExpression:exit"(t){const n=t.callee;!t.optional&&e.isSpecificId(n,"eval")&&c(n)}}:{"CallExpression:exit"(t){const n=t.callee;e.isSpecificId(n,"eval")&&c(n)},Program(e){const t=s.getScope(e),n=r.parserOptions.ecmaFeatures||{},i=t.isStrict||"module"===e.sourceType||n.globalReturn&&t.childScopes[0].isStrict,a="module"!==e.sourceType&&!n.globalReturn;o={upper:null,node:e,strict:i,isTopLevelOfScript:a,defaultThis:!0,initialized:!0}},"Program:exit"(r){const i=s.getScope(r);l(),function(t){const n=e.getVariableByName(t,"eval");if(!n)return;const r=n.references;for(let t=0;t *.value":a,"PropertyDefinition > *.value:exit":l,StaticBlock:a,"StaticBlock:exit":l,ThisExpression(t){n(t.parent,"eval")&&(o.initialized||(o.initialized=!0,o.defaultThis=e.isDefaultThisBinding(o.node,s)),(o.isTopLevelOfScript||!o.strict&&o.defaultThis)&&c(t.parent))}}}},xD}function Dj(){if(CD)return wD;CD=1;const e=Pw(),t=Bx();return wD={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(n){const r=n.options[0]||{},i=n.sourceCode,s=new Set(r.exceptions||[]),o=new Set(Object.keys(t.builtin).filter((e=>e[0].toUpperCase()===e[0])).filter((e=>!s.has(e))));function a(e,t){n.report({node:e,messageId:"unexpected",data:{builtin:t}})}function l(t){if(!function(t){return Boolean(t&&t.parent&&"MemberExpression"===t.parent.type&&t.parent.object===t&&"prototype"===e.getStaticPropertyName(t.parent))}(t))return;const n="ChainExpression"===t.parent.parent.type?t.parent.parent:t.parent;!function(e){return"MemberExpression"===e.parent.type&&e.parent.object===e&&"AssignmentExpression"===e.parent.parent.type&&e.parent.parent.left===e.parent}(n)?function(t){return"CallExpression"===t.parent.type&&t.parent.arguments[0]===t&&e.isSpecificMemberAccess(t.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}(n)&&a(n.parent,t.name):a(n.parent.parent,t.name)}return{"Program:exit"(e){const t=i.getScope(e);o.forEach((e=>{const n=t.set.get(e);n&&n.references&&n.references.map((e=>e.identifier)).forEach(l)}))}}}},wD}function Rj(){if(PD)return AD;PD=1;const e=Pw(),t=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return AD={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(n){const r=n.sourceCode;let i=null;function s(i){const s=i.parent,o="ChainExpression"===s.parent.type?s.parent.parent:s.parent;n.report({node:o,messageId:"unexpected",loc:s.property.loc,fix(n){if(!function(e){return t.has(e.type)}(o.arguments[0]))return null;const i=[[r.getTokenAfter(s.object,e.isNotClosingParenToken),r.getLastToken(s)],[r.getTokenAfter(s,e.isNotClosingParenToken),r.getLastToken(o)]],a=i[0][0],l=i[1][1];return r.commentsExistBetween(a,l)?null:i.map((([e,t])=>n.removeRange([e.range[0],t.range[1]])))}})}function o(t){if(!e.isSpecificMemberAccess(t.parent,null,"bind"))return!1;const n="ChainExpression"===t.parent.parent.type?t.parent.parent:t.parent;return"CallExpression"===n.parent.type&&n.parent.callee===n&&1===n.parent.arguments.length&&"SpreadElement"!==n.parent.arguments[0].type}function a(e){i={isBound:o(e),thisFound:!1,upper:i}}function l(e){i.isBound&&!i.thisFound&&s(e),i=i.upper}return{"ArrowFunctionExpression:exit":function(e){o(e)&&s(e)},FunctionDeclaration:a,"FunctionDeclaration:exit":l,FunctionExpression:a,"FunctionExpression:exit":l,ThisExpression:function(){i&&(i.thisFound=!0)}}}},AD}function Ij(){if(DD)return kD;DD=1;const e=Pw(),t=rS(),n=e.getPrecedence;return kD={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{type:"object",properties:{enforceForLogicalOperands:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(r){const i=r.sourceCode,s=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(e){return"ChainExpression"===e.parent.type?o(e.parent):function(e){return function(e){return("CallExpression"===e.type||"NewExpression"===e.type)&&"Identifier"===e.callee.type&&"Boolean"===e.callee.name}(e.parent)&&e===e.parent.arguments[0]||s.has(e.parent.type)&&e===e.parent.test||"UnaryExpression"===e.parent.type&&"!"===e.parent.operator}(e)||function(e){return"LogicalExpression"===e.type&&("||"===e.operator||"&&"===e.operator)&&r.options.length&&!0===r.options[0].enforceForLogicalOperands}(e.parent)&&o(e.parent)}function a(e){return Boolean(i.getCommentsInside(e).length)}function l(r,s){if("ChainExpression"===r.parent.type)return l(r.parent,s);if(function(e){return t.isParenthesized(1,e,i)}(r))return!1;const o=r.parent;switch(o.type){case"CallExpression":case"NewExpression":return"SequenceExpression"===s.type;case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":return!1;case"ConditionalExpression":return n(s)<=n(o);case"UnaryExpression":return n(s)=t||S(e)))}function C(e){return a&&"AssignmentExpression"===e.test.type}function A(e){const n=r.getLastToken(e),i=r.getTokenBefore(n);return e.arguments.length>0||t.isOpeningParenToken(i)&&t.isClosingParenToken(n)&&e.callee.range[1]0&&n.test(e[t-1].value))return}}function a(){n.report({node:e,loc:s.loc,messageId:"unexpected",fix:L(e)?n=>{const i=r.text.slice(s.range[1],o.range[0]);return n.replaceTextRange([s.range[0],o.range[1]],(function(e){const n=r.getTokenBefore(e),i=r.getTokenBefore(n,{includeComments:!0}),s=r.getTokenAfter(n,{includeComments:!0});return i&&i.range[1]===n.range[0]&&n.range[1]===s.range[0]&&!t.canTokensBeAdjacent(i,s)}(e)?" ":"")+i+(function(e){const n=r.getTokensAfter(e,{count:2}),i=n[0],s=n[1],o=r.getLastToken(e);return i&&s&&!r.isSpaceBetweenTokens(i,s)&&!t.canTokensBeAdjacent(o,s)}(e)?" ":""))}:null})}b?b.reports.push({node:e,finishReport:a}):a()}function M(e){w(e.argument,s(e))&&B(e.argument)}function j(e){let t=e.object,n=e.object.type;for(;"MemberExpression"===n;)t=t.object,n=t.type;return"CallExpression"===n}function N(e){const t=e.callee;w(t,s(e))&&(!T(t)&&(R(e)||"NewExpression"===t.type&&!A(t)&&("NewExpression"!==e.type||A(e))||"NewExpression"===e.type&&"MemberExpression"===t.type&&j(t)||!e.optional&&"ChainExpression"===t.type)||B(e.callee)),e.arguments.filter((e=>w(e,y))).forEach(B)}function F(e){const n=s(e),r=s(e.left),i=s(e.right),o="**"===e.operator,a=c&&("BinaryExpression"===e.left.type||"LogicalExpression"===e.left.type),l=c&&("BinaryExpression"===e.right.type||"LogicalExpression"===e.right.type);!a&&O(e.left)&&((["AwaitExpression","UnaryExpression"].includes(e.left.type)&&o||t.isMixedLogicalAndCoalesceExpressions(e.left,e)||!(r>n||r===n&&!o))&&!S(e.left)||B(e.left)),!l&&O(e.right)&&(!t.isMixedLogicalAndCoalesceExpressions(e.right,e)&&(i>n||i===n&&o)||S(e.right))&&B(e.right)}function U(e){if(!e.superClass)return;(s(e.superClass)>_?O(e.superClass):T(e.superClass))&&B(e.superClass)}function V(e){w(e.argument,y)&&B(e.argument)}function K(e){const n=x(e)?r.getTokenBefore(e):r.getFirstToken(e),s=r.getTokenAfter(n,t.isNotOpeningParenToken),o=s?r.getTokenAfter(s):null,a=s?r.getTokenAfter(s,t.isNotClosingParenToken):null;t.isOpeningParenToken(n)&&(t.isOpeningBraceToken(s)||"Keyword"===s.type&&("function"===s.value||"class"===s.value||"let"===s.value&&a&&(t.isOpeningBracketToken(a)||"Identifier"===a.type))||s&&"Identifier"===s.type&&"async"===s.value&&o&&"Keyword"===o.type&&"function"===o.value)&&i.add(s);("ExportDefaultDeclaration"===e.parent.type?w(e,y):O(e))&&B(e)}function W(e,t){return function(e,t){const n=[e];let r=e;for(;r!==t;){if(r=r.parent,null===r)throw new Error("Nodes are not in the ancestor-descendant relationship.");n.push(r)}return n}(t,e).reverse()}function $(e,t){switch(e.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return e.params.includes(t);case"CallExpression":case"NewExpression":return e.arguments.includes(t);case"MemberExpression":return e.computed&&e.property===t;case"ConditionalExpression":return e.consequent===t;default:return!1}}function q(e){return b.reports.some((t=>t.node===e))}function Q(e){return"MemberExpression"===e.type&&("NewExpression"===e.parent.type&&e.parent.callee===e||e.parent.object===e&&Q(e.parent))}return{ArrayExpression(e){e.elements.filter((e=>e&&w(e,y))).forEach(B)},ArrayPattern(e){e.elements.filter((e=>I(e)&&O(e))).forEach(B)},ArrowFunctionExpression(e){if(!(k(e)||"ConditionalExpression"===e.body.type&&d||"BlockStatement"===e.body.type)){const n=r.getFirstToken(e.body,t.isNotOpeningParenToken),s=r.getTokenBefore(n);t.isOpeningParenToken(s)&&t.isOpeningBraceToken(n)&&i.add(n),w(e.body,y)&&B(e.body)}},AssignmentExpression(e){I(e.left)&&O(e.left)&&(!function({left:e,operator:t,right:n}){if("Identifier"===e.type&&["=","&&=","||=","??="].includes(t)){const e=n.type;if("ArrowFunctionExpression"===e)return!0;if(("FunctionExpression"===e||"ClassExpression"===e)&&!n.id)return!0}return!1}(e)||S(e.left))&&B(e.left),!k(e)&&w(e.right,s(e))&&B(e.right)},BinaryExpression(e){b&&"in"===e.operator&&b.inExpressionNodes.push(e),F(e)},CallExpression:N,ConditionalExpression(e){if(k(e))return;const t=new Set(["BinaryExpression","LogicalExpression"]);l&&t.has(e.test.type)||C(e)||!w(e.test,s({type:"LogicalExpression",operator:"||"}))||B(e.test),l&&t.has(e.consequent.type)||!w(e.consequent,y)||B(e.consequent),l&&t.has(e.alternate.type)||!w(e.alternate,y)||B(e.alternate)},DoWhileStatement(e){O(e.test)&&!C(e)&&B(e.test)},ExportDefaultDeclaration:e=>K(e.declaration),ExpressionStatement:e=>K(e.expression),ForInStatement(e){if("VariableDeclaration"!==e.left.type){const n=r.getFirstToken(e.left,t.isNotOpeningParenToken);"let"===n.value&&t.isOpeningBracketToken(r.getTokenAfter(n,t.isNotClosingParenToken))&&i.add(n)}O(e.left)&&B(e.left),O(e.right)&&B(e.right)},ForOfStatement(e){if("VariableDeclaration"!==e.left.type){const n=r.getFirstToken(e.left,t.isNotOpeningParenToken);"let"===n.value&&i.add(n)}O(e.left)&&B(e.left),w(e.right,y)&&B(e.right)},ForStatement(e){if(e.test&&O(e.test)&&!C(e)&&B(e.test),e.update&&O(e.update)&&B(e.update),e.init){if("VariableDeclaration"!==e.init.type){const n=r.getFirstToken(e.init,t.isNotOpeningParenToken);"let"===n.value&&t.isOpeningBracketToken(r.getTokenAfter(n,t.isNotClosingParenToken))&&i.add(n)}b={upper:b,inExpressionNodes:[],reports:[]},O(e.init)&&B(e.init)}},"ForStatement > *.init:exit"(e){b.reports.length&&b.inExpressionNodes.forEach((t=>{const n=W(e,t);let r;for(let e=0;et.node!==e))}(r)})),function(){const{upper:e,inExpressionNodes:t,reports:n}=b;e?(e.inExpressionNodes.push(...t),e.reports.push(...n)):n.forEach((({finishReport:e})=>e())),b=e}()},IfStatement(e){O(e.test)&&!C(e)&&B(e.test)},ImportExpression(e){const{source:t}=e;"SequenceExpression"===t.type?T(t)&&B(t):O(t)&&B(t)},LogicalExpression:F,MemberExpression(e){const n=Q(e)&&j(e)?T(e.object):O(e.object)&&!(v(e.parent)&&e.parent.callee===e&&m);n&&s(e.object)>=s(e)&&(e.computed||!(t.isDecimalInteger(e.object)||"Literal"===e.object.type&&e.object.regex))&&B(e.object),n&&"CallExpression"===e.object.type&&B(e.object),n&&!h&&"NewExpression"===e.object.type&&A(e.object)&&B(e.object),n&&e.optional&&"ChainExpression"===e.object.type&&B(e.object),e.computed&&O(e.property)&&B(e.property)},"MethodDefinition[computed=true]"(e){w(e.key,y)&&B(e.key)},NewExpression:N,ObjectExpression(e){e.properties.filter((e=>e.value&&w(e.value,y))).forEach((e=>B(e.value)))},ObjectPattern(e){e.properties.filter((e=>{const t=e.value;return I(t)&&O(t)})).forEach((e=>B(e.value)))},Property(e){if(e.computed){const{key:t}=e;t&&w(t,y)&&B(t)}},PropertyDefinition(e){e.computed&&w(e.key,y)&&B(e.key),e.value&&w(e.value,y)&&B(e.value)},RestElement(e){const t=e.argument;I(t)&&O(t)&&B(t)},ReturnStatement(e){const t=r.getFirstToken(e);k(e)||!e.argument||!D(t,e.argument)||"Literal"===e.argument.type&&e.argument.regex||B(e.argument)},SequenceExpression(e){const t=s(e);e.expressions.filter((e=>w(e,t))).forEach(B)},SwitchCase(e){e.test&&O(e.test)&&B(e.test)},SwitchStatement(e){O(e.discriminant)&&B(e.discriminant)},ThrowStatement(e){D(r.getFirstToken(e),e.argument)&&B(e.argument)},UnaryExpression:M,UpdateExpression(e){if(e.prefix)M(e);else{const{argument:t}=e,n=r.getLastToken(e);t.loc.end.line===n.loc.start.line?M(e):T(t)&&B(t)}},AwaitExpression:M,VariableDeclarator(e){!e.init||!w(e.init,y)||"Literal"===e.init.type&&e.init.regex||B(e.init)},WhileStatement(e){O(e.test)&&!C(e)&&B(e.test)},WithStatement(e){O(e.object)&&B(e.object)},YieldExpression(e){if(e.argument){const t=r.getFirstToken(e);(s(e.argument)>=s(e)&&D(t,e.argument)||T(e.argument))&&B(e.argument)}},ClassDeclaration:U,ClassExpression:U,SpreadElement:V,SpreadProperty:V,ExperimentalSpreadProperty:V,TemplateLiteral(e){e.expressions.filter((e=>e&&O(e))).forEach(B)},AssignmentPattern(e){const{left:t,right:n}=e;I(t)&&O(t)&&B(t),n&&w(n,y)&&B(n)}}}},LD}function Bj(){if(FD)return ND;FD=1;const{directivesPattern:e}=Pv(),t=/falls?\s?through/iu;function n(t,n){return n.test(t)&&!e.test(t.trim())}return ND={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(e){const r=e.options[0]||{},i=[];let s=new Set;const o=e.sourceCode,a=r.allowEmptyCase||!1;let l=null,c=null;return c=r.commentPattern?new RegExp(r.commentPattern,"u"):t,{onCodePathStart(){i.push(s),s=new Set},onCodePathEnd(){s=i.pop()},onUnreachableCodePathSegmentStart(e){s.add(e)},onUnreachableCodePathSegmentEnd(e){s.delete(e)},onCodePathSegmentStart(e){s.add(e)},onCodePathSegmentEnd(e){s.delete(e)},SwitchCase(t){l&&!function(e,t,r,i){const s=r.sourceCode;if(1===e.consequent.length&&"BlockStatement"===e.consequent[0].type){const t=s.getLastToken(e.consequent[0]),r=s.getCommentsBefore(t).pop();if(r&&n(r.value,i))return!0}const o=s.getCommentsBefore(t).pop();return Boolean(o&&n(o.value,i))}(l,t,e,c)&&e.report({messageId:t.test?"case":"default",node:t}),l=null},"SwitchCase:exit"(e){const t=o.getTokenAfter(e);(function(e){for(const t of e)if(t.reachable)return!0;return!1})(s)&&(e.consequent.length>0||!a&&function(e,t){return t.loc.start.line>e.loc.end.line+1}(e,t))&&e.parent.cases[e.parent.cases.length-1]!==e&&(l=e)}}}},ND}function Mj(){if(WD)return KD;WD=1;const e=Pw();return KD={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(t){const n=t.sourceCode;function r(n){var r;"FunctionName"===n.defs[0].type&&(r=n.references,e.getModifyingReferences(r).forEach((e=>{t.report({node:e.identifier,messageId:"isAFunction",data:{name:e.identifier.name}})})))}function i(e){n.getDeclaredVariables(e).forEach(r)}return{FunctionDeclaration:i,FunctionExpression:i}}},KD}function jj(){if(zD)return QD;zD=1;const e=Pw(),t=/^(?:i|lastI)ndexOf$/u;function n(e){return"Literal"===e.type&&"number"==typeof e.value||"CallExpression"===e.type&&("Number"===e.callee.name||"parseInt"===e.callee.name||"parseFloat"===e.callee.name)}function r(t){return e.isStringLiteral(t)||"CallExpression"===t.type&&"Identifier"===t.callee.type&&"String"===t.callee.name}function i(t){return e.isStringLiteral(t)&&(""===t.value||"TemplateLiteral"===t.type&&1===t.quasis.length&&""===t.quasis[0].value.cooked)}function s(e){return i(e.left)?e.right:e.left}return QD={meta:{type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:["~","!!","+","*"]},uniqueItems:!0}},additionalProperties:!1}],messages:{useRecommendation:"use `{{recommendation}}` instead."}},create(o){const a=function(e){return{boolean:!("boolean"in e)||e.boolean,number:!("number"in e)||e.number,string:!("string"in e)||e.string,disallowTemplateShorthand:"disallowTemplateShorthand"in e&&e.disallowTemplateShorthand,allow:e.allow||[]}}(o.options[0]||{}),l=o.sourceCode;function c(t,n,r){o.report({node:t,messageId:"useRecommendation",data:{recommendation:n},fix(i){if(!r)return null;const s=l.getTokenBefore(t);return s&&s.range[1]===t.range[0]&&!e.canTokensBeAdjacent(s,n)?i.replaceText(t,` ${n}`):i.replaceText(t,n)}})}return{UnaryExpression(r){let i;if(i=a.allow.includes("!!"),!i&&a.boolean&&function(e){return"!"===e.operator&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}(r)){c(r,`Boolean(${l.getText(r.argument.argument)})`,!0)}if(i=a.allow.includes("~"),!i&&a.boolean&&function(n){if("~"!==n.operator)return!1;const r=e.skipChainExpression(n.argument);return"CallExpression"===r.type&&e.isSpecificMemberAccess(r.callee,null,t)}(r)){const e="ChainExpression"===r.argument.type?">= 0":"!== -1";c(r,`${l.getText(r.argument)} ${e}`,!1)}if(i=a.allow.includes("+"),!i&&a.number&&"+"===r.operator&&!n(r.argument)){c(r,`Number(${l.getText(r.argument)})`,!0)}},"BinaryExpression:exit"(t){let o;o=a.allow.includes("*");const u=!o&&a.number&&function(e){return"*"===e.operator&&("Literal"===e.left.type&&1===e.left.value||"Literal"===e.right.type&&1===e.right.value)}(t)&&!function(t,n){return"BinaryExpression"===t.type&&"*"===t.operator&&"Literal"===t.right.type&&1===t.right.value&&"BinaryExpression"===t.parent.type&&"/"===t.parent.operator&&t.parent.left===t&&!e.isParenthesised(n,t)}(t,l)&&function(e){const t=e.left,r=e.right;return"BinaryExpression"===r.type||n(r)?"BinaryExpression"===t.type||n(t)?null:t:r}(t);if(u){c(t,`Number(${l.getText(u)})`,!0)}if(o=a.allow.includes("+"),!o&&a.string&&function(e){return"+"===e.operator&&(i(e.left)&&!r(e.right)||i(e.right)&&!r(e.left))}(t)){c(t,`String(${l.getText(s(t))})`,!0)}},AssignmentExpression(e){if(!a.allow.includes("+")&&a.string&&function(e){return"+="===e.operator&&i(e.right)}(e)){const t=l.getText(s(e));c(e,`${t} = String(${t})`,!0)}},TemplateLiteral(e){if(!a.disallowTemplateShorthand)return;if("TaggedTemplateExpression"===e.parent.type)return;if(1!==e.expressions.length)return;if(""!==e.quasis[0].value.cooked)return;if(""!==e.quasis[1].value.cooked)return;if(r(e.expressions[0]))return;c(e,`String(${l.getText(e.expressions[0])})`,!0)}}}},QD}function Nj(){if(YD)return ZD;YD=1;const e=Pw(),{getStaticValue:t}=rS();return ZD={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(n){const r=Object.freeze(["global","window","globalThis"]),i=/^(?:set(?:Interval|Timeout)|execScript)$/u,s=n.sourceCode;function o(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type||"BinaryExpression"===e.type&&"+"===e.operator&&(o(e.left)||o(e.right))}function a(e){const[r]=e.arguments;if(r){const i=t(r,s.getScope(e));(i&&"string"==typeof i.value||o(r))&&n.report({node:e,messageId:"impliedEval"})}}function l(t){const{references:n,name:r}=t;n.forEach((t=>{let n=t.identifier.parent;for(;e.isSpecificMemberAccess(n,null,r);)n=n.parent;if(e.isSpecificMemberAccess(n,null,i)){const e="ChainExpression"===n.parent.type?n.parent:n,t=e.parent;"CallExpression"===t.type&&t.callee===e&&a(t)}}))}return{CallExpression(t){e.isSpecificId(t.callee,i)&&a(t)},"Program:exit"(t){const n=s.getScope(t);r.map((t=>e.getVariableByName(n,t))).filter((e=>!!e&&0===e.defs.length)).forEach(l)}}}},ZD}function Fj(){if(JD)return HD;JD=1;const{findVariable:e}=rS(),t=Pw(),n=/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,r=/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u;function i(i,s){const{parent:o}=i;return"MemberExpression"===o.type&&o.object===i&&(function(e){const{parent:t}=e;return"AssignmentExpression"===t.type&&t.left===e||"ArrayPattern"===t.type||"Property"===t.type&&t.value===e&&"ObjectPattern"===t.parent.type||"RestElement"===t.type||"AssignmentPattern"===t.type&&t.left===e}(o)||function(e){const t="ChainExpression"===e.parent.type?e.parent:e,{parent:n}=t;return"UpdateExpression"===n.type&&n.argument===t||"UnaryExpression"===n.type&&"delete"===n.operator&&n.argument===t}(o)||function(e){const{parent:t}=e;return"ForInStatement"===t.type&&t.left===e||"ForOfStatement"===t.type&&t.left===e}(o))||function(i,s){const{parent:o}=i;if("CallExpression"!==o.type||o.arguments[0]!==i)return!1;const a=t.skipChainExpression(o.callee);if(!t.isSpecificMemberAccess(a,"Object",n)&&!t.isSpecificMemberAccess(a,"Reflect",r))return!1;const l=e(s,a.object);return null!==l&&"global"===l.scope.type}(i,s)}function s(e){let t=e.parent;for(;t&&"AssignmentExpression"!==t.type&&"UpdateExpression"!==t.type&&"UnaryExpression"!==t.type&&"CallExpression"!==t.type&&"ForInStatement"!==t.type&&"ForOfStatement"!==t.type;)t=t.parent;return t||e}return HD={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(e){const t=e.sourceCode;return{ImportDeclaration(n){const r=t.getScope(n);for(const o of t.getDeclaredVariables(n)){const t=o.defs.some((e=>"ImportNamespaceSpecifier"===e.node.type));let n=null;for(const a of o.references){const o=a.identifier;o!==n&&(n=o,a.isWrite()?e.report({node:s(o),messageId:"readonly",data:{name:o.name}}):t&&i(o,r)&&e.report({node:s(o),messageId:"readonlyMember",data:{name:o.name}}))}}}}}},HD}function Uj(){if(sR)return iR;sR=1;const e=new(0,Tj().RegExpValidator),t=/[dgimsuvy]/gu,n=void 0;return iR={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(r){const i=r.options[0];let s=null;if(i&&i.allowConstructorFlags){const e=i.allowConstructorFlags.join("").replace(t,"");e&&(s=new RegExp(`[${e}]`,"giu"))}function o(e,t){r.report({node:e,messageId:"regexMessage",data:{message:t}})}function a(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function l(t,r){try{return e.validatePattern(t,n,n,r),null}catch(e){return e.message}}return{"CallExpression, NewExpression"(t){if("Identifier"!==t.callee.type||"RegExp"!==t.callee.name)return;let n=function(e){return e.arguments.length<2?"":a(e.arguments[1])?e.arguments[1].value:null}(t);n&&s&&(n=n.replace(s,""));let r=function(t){if(!t)return null;try{e.validateFlags(t)}catch{return`Invalid flags supplied to RegExp constructor '${t}'`}return t.includes("u")&&t.includes("v")?"Regex 'u' and 'v' flags cannot be used together":null}(n);if(r)return void o(t,r);if(!a(t.arguments[0]))return;const i=t.arguments[0].value;r=null===n?l(i,{unicode:!0,unicodeSets:!1})&&l(i,{unicode:!1,unicodeSets:!0})&&l(i,{unicode:!1,unicodeSets:!1}):l(i,{unicode:n.includes("u"),unicodeSets:n.includes("v")}),r&&o(t,r)}}}},iR}function Vj(){if(cR)return lR;cR=1;const e=Pw(),t=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,n=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/gmu,r=/[\u2028\u2029]/gmu,i=e.createGlobalLinebreakMatcher();return lR={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(e){let s=[];const o=e.options[0]||{},a=!!o.skipComments,l=!1!==o.skipStrings,c=!!o.skipRegExps,u=!!o.skipTemplates,p=!!o.skipJSXText,d=e.sourceCode,f=d.getAllComments();function h(e){const t=e.loc.start,n=e.loc.end;s=s.filter((({loc:{start:e}})=>e.line=n.column||e.line>n.line))}function m(e){t.test(e.value)&&h(e)}function g(){}const y={};return t.test(d.getText())?(y.Program=function(e){!function(e){d.lines.forEach(((t,r)=>{const i=r+1;let o;for(;null!==(o=n.exec(t));)s.push({node:e,messageId:"noIrregularWhitespace",loc:{start:{line:i,column:o.index},end:{line:i,column:o.index+o[0].length}}})}))}(e),function(e){const t=d.getText(),n=d.lines,o=t.match(i);let a,l=-1;for(;null!==(a=r.exec(t));){const t=o.indexOf(a[0],l+1)||0;s.push({node:e,messageId:"noIrregularWhitespace",loc:{start:{line:t+1,column:n[t].length},end:{line:t+2,column:0}}}),l=t}}(e)},y.Literal=function(e){const n=l&&"string"==typeof e.value,r=c&&Boolean(e.regex);(n||r)&&t.test(e.raw)&&h(e)},y.TemplateElement=u?function(e){"string"==typeof e.value.raw&&t.test(e.value.raw)&&h(e)}:g,y.JSXText=p?function(e){t.test(e.raw)&&h(e)}:g,y["Program:exit"]=function(){a&&f.forEach(m),s.forEach((t=>e.report(t)))}):y.Program=g,y}},lR}function Kj(){if(fR)return dR;fR=1;const e=Pw();return dR={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(t){const n=t.sourceCode;return{LabeledStatement(r){(function(t,n){return null!==e.getVariableByName(t,n)})(n.getScope(r),r.label.name)&&t.report({node:r,messageId:"identifierClashWithLabel"})}}}},dR}function Wj(){if(ER)return vR;function e(e){for(let t=e;t.parent;t=t.parent){const e=t.parent;switch(e.type){case"WhileStatement":case"DoWhileStatement":return e;case"ForStatement":if(e.init!==t)return e;break;case"ForInStatement":case"ForOfStatement":if(e.right!==t)return e;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":return null}}return null}function t(t,n){const r=n.resolved,i=r&&r.defs[0],s=i&&i.parent,o=s&&"VariableDeclaration"===s.type?s.kind:"";if("const"===o)return!0;if("let"===o&&s.range[0]>t.range[0]&&s.range[1]=r;)i=s,s=e(s);return i}(t,"let"===o?s:null).range[0];return Boolean(r)&&r.references.every((function(e){const t=e.identifier;return!e.isWrite()||r.scope.variableScope===e.from.variableScope&&t.range[0]e.resolved&&!t(s,e))).map((e=>e.identifier.name));o.length>0&&n.report({node:i,messageId:"unsafeRefs",data:{varNames:`'${o.join("', '")}'`}})}return{ArrowFunctionExpression:i,FunctionExpression:i,FunctionDeclaration:i}}},vR}function $j(){return SR||(SR=1,xR={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(e){function t(e){return e.raw.replace(/_/gu,"")}function n(e){return`${e[0]}.${e.slice(1)}`}function r(e){for(let t=0;t=0;t--)if("0"!==e[t])return e.slice(0,t+1);return e}(r(e));return{magnitude:e.startsWith("0")?e.length-2:e.length-1,coefficient:n(t)}}(i);return`${s.coefficient}e${t.length>1?parseInt(t[1],10)+s.magnitude:s.magnitude}`}function s(e){return function(e){return["0x","0X","0b","0B","0o","0O"].every((t=>!e.raw.startsWith(t)))&&!/^0[0-7]+$/u.test(e.raw)}(e)?function(e){const n=i(t(e)),r=n.split("e")[0].replace(".","").length;return r>100||n!==i(e.value.toPrecision(r))}(e):function(e){const n=t(e).toUpperCase();let r=0;return r=n.startsWith("0B")?2:n.startsWith("0X")?16:8,!n.endsWith(e.value.toString(r).toUpperCase())}(e)}return{Literal(t){t.value&&function(e){return"number"==typeof e.value}(t)&&s(t)&&e.report({messageId:"noLossOfPrecision",node:t})}}}}),xR}function qj(){if(TR)return OR;TR=1;const e=Pw();function t(e){return"string"==typeof e?BigInt(e.slice(0,-1)):e}return OR={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(n){const r=n.options[0]||{},i=!!r.detectObjects,s=!!r.enforceConst,o=new Set((r.ignore||[]).map(t)),a=!!r.ignoreArrayIndexes,l=!!r.ignoreDefaultValues,c=!!r.ignoreClassFieldInitialValues,u=i?[]:["ObjectExpression","Property","AssignmentExpression"];return{Literal(t){if(!e.isNumericLiteral(t))return;let r,i,p;"UnaryExpression"===t.parent.type&&"-"===t.parent.operator?(r=t.parent,i=-t.value,p=`-${t.raw}`):(r=t,i=t.value,p=t.raw);const d=r.parent;(function(e){return o.has(e)})(i)||l&&function(e){const t=e.parent;return"AssignmentPattern"===t.type&&t.right===e}(r)||c&&function(e){const t=e.parent;return"PropertyDefinition"===t.type&&t.value===e}(r)||function(t){const n=t.parent;return"CallExpression"===n.type&&t===n.arguments[1]&&(e.isSpecificId(n.callee,"parseInt")||e.isSpecificMemberAccess(n.callee,"Number","parseInt"))}(r)||function(e){return 0===e.parent.type.indexOf("JSX")}(r)||a&&function(e,t){const n=e.parent;return"MemberExpression"===n.type&&n.property===e&&(Number.isInteger(t)||"bigint"==typeof t)&&t>=0&&t<4294967295}(r,i)||("VariableDeclarator"===d.type?s&&"const"!==d.parent.kind&&n.report({node:r,messageId:"useConst"}):(!u.includes(d.type)||"AssignmentExpression"===d.type&&"Identifier"===d.left.type)&&n.report({node:r,messageId:"noMagic",data:{raw:p}}))}}}},OR}function Qj(){return BR||(BR=1,LR={isCombiningCharacter:CR?wR:(CR=1,wR=function(e){return/^[\p{Mc}\p{Me}\p{Mn}]$/u.test(String.fromCodePoint(e))}),isEmojiModifier:(PR||(PR=1,AR=function(e){return e>=127995&&e<=127999}),AR),isRegionalIndicatorSymbol:(DR||(DR=1,kR=function(e){return e>=127462&&e<=127487}),kR),isSurrogatePair:IR?RR:(IR=1,RR=function(e,t){return e>=55296&&e<56320&&t>=56320&&t<57344})}),LR}function zj(){if(jR)return MR;jR=1;const{RegExpValidator:e}=Tj();return MR={isValidWithUnicodeFlag:function(t,n){if(t<=5)return!1;const r=new e({ecmaVersion:Math.min(t,2024)});try{r.validatePattern(n,void 0,void 0,{unicode:!0})}catch{return!1}return!0},REGEXPP_LATEST_ECMA_VERSION:2024},MR}function Xj(){if(VR)return UR;VR=1;const e=Pw(),t=["+","-","*","/","%","**"],n=["&","|","^","~","<<",">>",">>>"],r=["==","!=","===","!==",">",">=","<","<="],i=["&&","||"],s=["in","instanceof"],o=[].concat(t,n,r,i,s,["?:"],["??"]),a=[t,n,r,i,s],l=/^(?:Binary|Logical|Conditional)Expression$/u;function c(e){return"ConditionalExpression"===e.type?e.test:e.left}return UR={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(t){const n=t.sourceCode,r=function(e={}){return{groups:e.groups&&e.groups.length>0?e.groups:a,allowSamePrecedence:!1!==e.allowSamePrecedence}}(t.options[0]);function i(t){return n.getTokenAfter(c(t),e.isNotClosingParenToken)}function s(s){l.test(s.parent.type)&&function(t){return t.operator!==t.parent.operator&&!e.isParenthesised(n,t)}(s)&&!function(t){const n=t,i=t.parent;return s=r.groups,o=n.operator,a="ConditionalExpression"===i.type?"?:":i.operator,!s.some((e=>e.includes(o)&&e.includes(a)))||r.allowSamePrecedence&&e.getPrecedence(n)===e.getPrecedence(i);var s,o,a}(s)&&function(e){const n=e.parent,r=c(n)===e?e:n,s=c(n)!==e?e:n,o={leftOperator:r.operator||"?:",rightOperator:s.operator||"?:"};t.report({node:r,loc:i(r).loc,messageId:"unexpectedMixedOperator",data:o}),t.report({node:s,loc:i(s).loc,messageId:"unexpectedMixedOperator",data:o})}(s)}return{BinaryExpression:s,LogicalExpression:s}}},UR}function Gj(){return WR||(WR=1,KR={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(e){const t=e.options[0];let n=!1,r=!1;"object"==typeof t?(n=t.grouping,r=t.allowCall):n=!!t;const i=["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"],s="require",o="uninitialized",a="other",l="computed";function c(e){return e?"CallExpression"===e.type&&"Identifier"===e.callee.type&&"require"===e.callee.name?s:r&&"CallExpression"===e.type&&"CallExpression"===e.callee.type?c(e.callee):"MemberExpression"===e.type?c(e.object):a:o}function u(e){if("MemberExpression"===e.type)return u(e.object);if(0===e.arguments.length)return l;const t=e.arguments[0];return"Literal"!==t.type||"string"!=typeof t.value?l:i.includes(t.value)?"core":/^\.{0,2}\//u.test(t.value)?"file":"module"}function p(e){const t={};return e.forEach((e=>{c(e.init)===s&&(t[u(e.init)]=!0)})),Object.keys(t).length<=1}return{VariableDeclaration(t){!function(e){const t={};return e.forEach((e=>{const n=c(e.init);t[n]=!0})),!(!t[s]||!t[o]&&!t[a])}(t.declarations)?n&&!p(t.declarations)&&e.report({node:t,messageId:"noMixCoreModuleFileComputed"}):e.report({node:t,messageId:"noMixRequire"})}}}}),KR}function Zj(){if(CI)return wI;CI=1;const{getVariableByName:e,isArrowToken:t,isStartOfExpressionStatement:n,needsPrecedingSemicolon:r}=Pw();return wI={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(i){const s=i.sourceCode;function o(o){if("Identifier"!==o.callee.type||"Object"!==o.callee.name||o.arguments.length)return;const a=e(s.getScope(o),"Object");if(a&&0===a.identifiers.length){let e,a,l="useLiteral";!function(e){if(n(e))return!0;const r=s.getTokenBefore(e);return!(!r||!t(r))}(o)?e=a="{}":(e="({})",r(s,o)?(a=";({})",l="useLiteralAfterSemicolon"):a="({})"),i.report({node:o,messageId:"preferLiteral",suggest:[{messageId:l,data:{replacement:e},fix:e=>e.replaceText(o,a)}]})}}return{CallExpression:o,NewExpression:o}}},wI}function Yj(){if(II)return RI;II=1;const e=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return RI={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(t){const n=t.options[0]&&t.options[0].props,r=t.options[0]&&t.options[0].ignorePropertyModificationsFor||[],i=t.options[0]&&t.options[0].ignorePropertyModificationsForRegex||[],s=t.sourceCode;function o(s,o,a){const l=s.identifier;var c;!l||s.init||0!==o&&a[o-1].identifier===l||(s.isWrite()?t.report({node:l,messageId:"assignmentToFunctionParam",data:{name:l.name}}):n&&function(t){let n=t.identifier,r=n.parent;for(;r&&(!e.test(r.type)||"ForInStatement"===r.type||"ForOfStatement"===r.type);){switch(r.type){case"AssignmentExpression":case"ForInStatement":case"ForOfStatement":return r.left===n;case"UpdateExpression":return!0;case"UnaryExpression":if("delete"===r.operator)return!0;break;case"CallExpression":if(r.callee!==n)return!1;break;case"MemberExpression":if(r.property===n)return!1;break;case"Property":if(r.key===n)return!1;break;case"ConditionalExpression":if(r.test===n)return!1}n=r,r=n.parent}return!1}(s)&&(c=l.name,!r.includes(c)&&!i.some((e=>new RegExp(e,"u").test(c))))&&t.report({node:l,messageId:"assignmentToFunctionParamProp",data:{name:l.name}}))}function a(e){"Parameter"===e.defs[0].type&&e.references.forEach(o)}function l(e){s.getDeclaredVariables(e).forEach(a)}return{"FunctionDeclaration:exit":l,"FunctionExpression:exit":l,"ArrowFunctionExpression:exit":l}}},RI}function Hj(){if(jI)return MI;function e(t){const n=t.parent;return"SequenceExpression"===n.type?e(n):function(e){const t=e.parent;return"ForStatement"===t.type&&t.update===e}(t)}return jI=1,MI={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(t){const n=t.options[0];let r=!1;return"object"==typeof n&&(r=!0===n.allowForLoopAfterthoughts),{UpdateExpression(n){r&&e(n)||t.report({node:n,messageId:"unexpectedUnaryOp",data:{operator:n.operator}})}}}},MI}function Jj(){if(WI)return KI;WI=1;const{findVariable:e}=rS(),t=Pw(),n=new Set(["ArrowFunctionExpression","FunctionExpression"]);function r(t,n){const r=t.parent;return"NewExpression"===r.type&&r.arguments[0]===t&&"Identifier"===r.callee.type&&"Promise"===r.callee.name&&function(t,n){const r=e(n,t);return null!==r&&"global"===r.scope.type&&0===r.defs.length}(r.callee,function(e){const t=e.upper;return"function-expression-name"===t.type?t.upper:t}(n))}function i(e){return"UnaryExpression"===e.type&&"void"===e.operator}function s(e,n,r){const i=t.getPrecedence(n)"Keyword"===e.type&&"return"===e.value),o=e.getTokenAfter(s),a="return"===s.value&&s.range[1]===o.range[0];return[r.insertTextBefore(o,`${a?" ":""}void ${i?"(":""}`),r.insertTextAfter(n,i?")":"")]}return KI={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(e){let o=null;const a=e.sourceCode,{allowVoid:l=!1}=e.options[0]||{};return{onCodePathStart(c,u){if(o={upper:o,shouldCheck:n.has(u.type)&&r(u,a.getScope(u))},o.shouldCheck&&"ArrowFunctionExpression"===u.type&&u.expression&&(!l||!i(u.body))){const n=[];l&&n.push({messageId:"prependVoid",fix(e){return s(a,u.body,e)}}),("FunctionExpression"!==u.body.type||u.body.id)&&n.push({messageId:"wrapBraces",fix(e){return function(e,n,r){const i=e.getTokenBefore(n.body,t.isArrowToken),s=e.getTokenAfter(i),o=e.getLastToken(n);return[r.insertTextBefore(s,"{"),r.insertTextAfter(o,"}")]}(a,u,e)}}),e.report({node:u.body,messageId:"returnsValue",suggest:n})}},onCodePathEnd(){o=o.upper},ReturnStatement(t){o.shouldCheck&&t.argument&&(l?i(t.argument)||e.report({node:t,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(e){return s(a,t.argument,e)}}]}):e.report({node:t,messageId:"returnsValue"}))}}}},KI}function eN(){if(zI)return QI;zI=1;const e=Pw();function t(e){let n;if("MemberExpression"===e.type)n=e.object;else{if("CallExpression"!==e.type)return!1;n=e.callee}return!!e.optional||t(n)}return QI={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(n){const r=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);return{CallExpression:function(i){const s=e.skipChainExpression(i.callee);if("MemberExpression"!==s.type)return;const o=e.getStaticPropertyName(s);null!==o&&r.has(o)&&n.report({messageId:"prototypeBuildIn",loc:s.property.loc,data:{prop:o},node:i,suggest:[{messageId:"callObjectPrototype",data:{prop:o},fix(r){const a=n.sourceCode;if(t(i))return null;if("ChainExpression"===i.callee.type)return null;const l=e.getVariableByName(a.getScope(i),"Object");if(!l||"global"!==l.scope.type||l.defs.length>0)return null;let c=a.getText(s.object);e.getPrecedence(s.object)<=e.getPrecedence({type:"SequenceExpression"})&&(c=`(${c})`);const u=a.getTokenAfter(i.callee,e.isOpeningParenToken),p=0===i.arguments.length?"":", ";return[r.replaceText(s,`Object.prototype.${o}.call`),r.insertTextAfter(u,c+p)]}}]})}}}},QI}function tN(){if(rL)return nL;function e(e){return Array.isArray(e)?e:[e]}rL=1;const t=/^\s+$/,n=/(?:[^\\]|^)\\$/,r=/^\\!/,i=/^\\#/,s=/\r?\n/g,o=/^\.*\/|^\.+$/;let a="node-ignore";"undefined"!=typeof Symbol&&(a=Symbol.for("node-ignore"));const l=a,c=/([0-z])-([0-z])/g,u=()=>!1,p=[[/\\?\s+$/,e=>0===e.indexOf("\\")?" ":""],[/\\\s/g,()=>" "],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${i}`:"]"===i&&r.length%2==0?`[${(e=>e.replace(c,((e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:"")))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],d=Object.create(null),f=e=>"string"==typeof e;class h{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}}const m=(e,t)=>{const n=e;let s=!1;0===e.indexOf("!")&&(s=!0,e=e.substr(1));const o=((e,t)=>{let n=d[e];return n||(n=p.reduce(((t,n)=>t.replace(n[0],n[1].bind(e))),e),d[e]=n),t?new RegExp(n,"i"):new RegExp(n)})(e=e.replace(r,"!").replace(i,"#"),t);return new h(n,e,s,o)},g=(e,t)=>{throw new t(e)},y=(e,t,n)=>{if(!f(e))return n(`path must be a string, but got \`${t}\``,TypeError);if(!e)return n("path must not be empty",TypeError);if(y.isNotRelative(e)){return n(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},_=e=>o.test(e);y.isNotRelative=_,y.convert=e=>e;class b{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){var r,i,s;r=this,i=l,s=!0,Object.defineProperty(r,i,{value:s}),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[l])return this._rules=this._rules.concat(e._rules),void(this._added=!0);if((e=>e&&f(e)&&!t.test(e)&&!n.test(e)&&0!==e.indexOf("#"))(e)){const t=m(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(t){return this._added=!1,e(f(t)?(e=>e.split(s))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach((i=>{const{negative:s}=i;if(r===s&&n!==r||s&&!n&&!r&&!t)return;i.regex.test(e)&&(n=!s,r=s)})),{ignored:n,unignored:r}}_test(e,t,n,r){const i=e&&y.convert(e);return y(i,e,this._allowRelativePaths?u:g),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split("/")),r.pop(),!r.length)return t[e]=this._testOne(e,n);const i=this._t(r.join("/")+"/",t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(t){return e(t).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const v=e=>new b(e);if(v.isPathValid=e=>y(e&&y.convert(e),e,u),v.default=v,nL=v,void 0!==by&&({NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.IGNORE_TEST_WIN32||"win32"===by.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");y.convert=e;const t=/^[a-z]:\//i;y.isNotRelative=e=>t.test(e)||_(e)}return nL}function nN(){if(sL)return iL;sL=1;const e=Pw(),t=tN(),n={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return iL={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}"},schema:{anyOf:[n,{type:"array",items:[{type:"object",properties:{paths:n,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},importNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,required:["group"]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(n){const r=n.sourceCode,i=Array.isArray(n.options)?n.options:[],s="object"==typeof i[0]&&(Object.prototype.hasOwnProperty.call(i[0],"paths")||Object.prototype.hasOwnProperty.call(i[0],"patterns")),o=(s?i[0].paths:n.options)||[],a=o.reduce(((e,t)=>("string"==typeof t?e[t]={message:null}:e[t.name]={message:t.message,importNames:t.importNames},e)),{});let l=(s?i[0].patterns:[])||[];l.length>0&&"string"==typeof l[0]&&(l=[{group:l}]);const c=l.map((({group:e,message:n,caseSensitive:r,importNames:i,importNamePattern:s})=>({matcher:t({allowRelativePaths:!0,ignorecase:!r}).add(e),customMessage:n,importNames:i,importNamePattern:s})));if(0===Object.keys(o).length&&0===c.length)return{};function u(t){const i=t.source.value.trim(),s=new Map;if("ExportAllDeclaration"===t.type){const e=r.getFirstToken(t,1);s.set("*",[{loc:e.loc}])}else if(t.specifiers)for(const n of t.specifiers){let t;const r={loc:n.loc};"ImportDefaultSpecifier"===n.type?t="default":"ImportNamespaceSpecifier"===n.type?t="*":n.imported?t=e.getModuleExportName(n.imported):n.local&&(t=e.getModuleExportName(n.local)),"string"==typeof t&&(s.has(t)?s.get(t).push(r):s.set(t,[r]))}!function(e,t,r){if(!Object.prototype.hasOwnProperty.call(a,e))return;const i=a[e].message,s=a[e].importNames;if(s){if(t.has("*")){const o=t.get("*")[0];n.report({node:r,messageId:i?"everythingWithCustomMessage":"everything",loc:o.loc,data:{importSource:e,importNames:s,customMessage:i}})}s.forEach((s=>{t.has(s)&&t.get(s).forEach((t=>{n.report({node:r,messageId:i?"importNameWithCustomMessage":"importName",loc:t.loc,data:{importSource:e,customMessage:i,importName:s}})}))}))}else n.report({node:r,messageId:i?"pathWithCustomMessage":"path",data:{importSource:e,customMessage:i}})}(i,s,t),c.forEach((e=>{(function(e,t){return t.matcher.ignores(e)})(i,e)&&function(e,t,r){const i=e.source.value.trim(),s=t.customMessage,o=t.importNames,a=t.importNamePattern?new RegExp(t.importNamePattern,"u"):null;o||a?r.forEach(((t,r)=>{if("*"!==r)(o&&o.includes(r)||a&&a.test(r))&&t.forEach((t=>{n.report({node:e,messageId:s?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:t.loc,data:{importSource:i,customMessage:s,importName:r}})}));else{const[r]=t;o?n.report({node:e,messageId:s?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:r.loc,data:{importSource:i,importNames:o,customMessage:s}}):n.report({node:e,messageId:s?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:r.loc,data:{importSource:i,importNames:a,customMessage:s}})}})):n.report({node:e,messageId:s?"patternWithCustomMessage":"patterns",data:{importSource:i,customMessage:s}})}(t,e,s)}))}return{ImportDeclaration:u,ExportNamedDeclaration(e){e.source&&u(e)},ExportAllDeclaration:u}}},iL}function rN(){if(aL)return oL;aL=1;const e=Pw(),t=tN(),n={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return oL={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[n,{type:"array",items:{type:"object",properties:{paths:n,patterns:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(n){const r=Array.isArray(n.options)?n.options:[],i="object"==typeof r[0]&&(Object.prototype.hasOwnProperty.call(r[0],"paths")||Object.prototype.hasOwnProperty.call(r[0],"patterns")),s=(i?r[0].paths:n.options)||[],o=(i?r[0].patterns:[])||[],a=s.reduce(((e,t)=>("string"==typeof t?e[t]=null:e[t.name]=t.message,e)),{});if(0===Object.keys(s).length&&0===o.length)return{};const l=t({allowRelativePaths:!0}).add(o);return{CallExpression(t){if(function(e){return"Identifier"===e.callee.type&&"require"===e.callee.name}(t)&&t.arguments.length){const r=function(t){return function(e){return e&&"Literal"===e.type&&"string"==typeof e.value}(t)?t.value.trim():e.isStaticTemplateLiteral(t)?t.quasis[0].value.cooked.trim():null}(t.arguments[0]);r&&(function(e){return Object.prototype.hasOwnProperty.call(a,e)}(r)&&function(e,t){const r=a[t],i=r?"customMessage":"defaultMessage";n.report({node:e,messageId:i,data:{name:t,customMessage:r}})}(t,r),o.length>0&&l.ignores(r)&&n.report({node:t,messageId:"patternMessage",data:{name:r}}))}}}}},oL}function iN(){if(mL)return hL;mL=1;const e=Pw();return hL={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(t){function n(t){let n=t;for(;!e.isFunction(n)&&"Program"!==n.type;){if("TryStatement"===n.parent.type&&(n===n.parent.block||n===n.parent.handler&&n.parent.finalizer))return!0;n=n.parent}return!1}function r(e){return"ArrowFunctionExpression"===e.parent.type||("ReturnStatement"===e.parent.type?!n(e.parent):"ConditionalExpression"!==e.parent.type||e!==e.parent.consequent&&e!==e.parent.alternate?("LogicalExpression"===e.parent.type&&e===e.parent.right||"SequenceExpression"===e.parent.type&&e===e.parent.expressions[e.parent.expressions.length-1])&&r(e.parent):r(e.parent))}return{AwaitExpression(e){r(e)&&!n(e)&&function(e){t.report({node:t.sourceCode.getFirstToken(e),loc:e.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(n){const r=t.sourceCode,[i,s]=r.getFirstTokens(e,2);if(i.loc.start.line!==s.loc.start.line)return null;const[o,a]=i.range,l=[o,a+(" "===r.text[a]?1:0)];return n.removeRange(l)}}]})}(e)}}}},hL}function sN(){if(bL)return _L;bL=1;const e=Pw(),t=/\s+/gu;function n(t,r,i,s){if(t&&r)if("Identifier"===t.type&&"Identifier"===r.type&&t.name===r.name)s(r);else if("ArrayPattern"===t.type&&"ArrayExpression"===r.type){const e=Math.min(t.elements.length,r.elements.length);for(let o=0;o=1){let e=0;for(let t=r.properties.length-1;t>=0;--t){const n=r.properties[t].type;if("SpreadElement"===n||"ExperimentalSpreadProperty"===n){e=t+1;break}}for(let o=0;o","<",">=","<="]).has(n.operator)&&function(e,n){const r=t.getTokens(e),i=t.getTokens(n);return r.length===i.length&&r.every(((e,t)=>e.type===i[t].type&&e.value===i[t].value))}(n.left,n.right)&&e.report({node:n,messageId:"comparingToSelf"})}}}}),vL}function aN(){if(SL)return xL;SL=1;const e=Pw(),t={allowInParentheses:!0};return xL={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(n){const r=Object.assign({},t,n.options[0]),i=n.sourceCode,s={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function o(t){return e.isParenthesised(i,t)}return{SequenceExpression(t){if("ForStatement"===t.parent.type&&(t===t.parent.init||t===t.parent.update))return;if(r.allowInParentheses)if(function(e){return e.parent&&s[e.parent.type]&&e===e.parent[s[e.parent.type]]}(t)){if(function(t){const n=i.getTokenBefore(t,1),r=i.getTokenAfter(t,1);return o(t)&&n&&r&&e.isOpeningParenToken(n)&&n.range[1]<=t.range[0]&&e.isClosingParenToken(r)&&r.range[0]>=t.range[1]}(t))return}else if(o(t))return;const a=i.getTokenAfter(t.expressions[0],e.isCommaToken);n.report({node:t,loc:a.loc,messageId:"unexpectedCommaExpression"})}}}},xL}function lN(){if(TL)return OL;TL=1;const e=Pw(),{findVariable:t}=rS();function n(n,r,i,s,o){const a=n.parent;return"CallExpression"===a.type&&a.arguments[o]===n&&e.isSpecificMemberAccess(a.callee,i,s)&&function(e,n){const r=t(n,e);return null!==r&&"global"===r.scope.type&&0===r.defs.length}(e.skipChainExpression(a.callee).object,r)}function r(t,r){const i=t.parent;return("Property"===i.type||"MethodDefinition"===i.type)&&"set"===i.kind&&i.value===t||!("Property"!==i.type||i.value!==t||"set"!==e.getStaticPropertyName(i)||"ObjectExpression"!==i.parent.type||!function(e,t){if(n(e,t,"Object","defineProperty",2)||n(e,t,"Reflect","defineProperty",2))return!0;const r=e.parent;if("Property"===r.type&&r.value===e){const e=r.parent;if("ObjectExpression"===e.type&&(n(e,t,"Object","create",1)||n(e,t,"Object","defineProperties",1)))return!0}return!1}(i.parent,r))}return OL={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(e){let t=null;const n=e.sourceCode;function i(e){const i=function(e){const t=e.upper;return"function-expression-name"===t.type?t.upper:t}(n.getScope(e));t={upper:t,isSetter:r(e,i)}}function s(){t=t.upper}function o(t){e.report({node:t,messageId:"returnsValue"})}return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression(e){i(e),t.isSetter&&e.expression&&o(e.body)},"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s,ReturnStatement(e){t&&t.isSetter&&e.argument&&o(e)}}}},OL}function cN(){if(WL)return KL;WL=1;const e=Pw();return KL={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(t){let n=null,r=Object.create(null);function i(e){return!e.reachable||r[e.id].superCalled}function s(){return Boolean(n&&n.isConstructor&&n.hasExtends)}function o(){return s()&&!function(e){for(const t of e)if(!i(t))return!1;return!0}(n.currentSegments)}function a(e){const t=n.currentSegments;for(const n of t)n.reachable&&r[n.id].invalidNodes.push(e)}return{onCodePathStart(t,r){if(function(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}(r)){const i=r.parent.parent.parent;n={upper:n,isConstructor:!0,hasExtends:Boolean(i.superClass&&!e.isNullOrUndefined(i.superClass)),codePath:t,currentSegments:new Set}}else n={upper:n,isConstructor:!1,hasExtends:!1,codePath:t,currentSegments:new Set}},onCodePathEnd(e){const i=n.hasExtends;n=n.upper,i&&e.traverseSegments(((e,n)=>{const i=r[e.id];for(let e=0;e0&&e.prevSegments.every(i),invalidNodes:[]})},onUnreachableCodePathSegmentStart(e){n.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentLoop(e,t){s()&&n.codePath.traverseSegments({first:t,last:e},((e,t)=>{const n=r[e.id];n.superCalled?(n.invalidNodes=[],t.skip()):e.prevSegments.length>0&&e.prevSegments.every(i)&&(n.superCalled=!0,n.invalidNodes=[])}))},ThisExpression(e){o()&&a(e)},Super(t){!e.isCallee(t)&&o()&&a(t)},"CallExpression:exit"(e){"Super"===e.callee.type&&o()&&function(){const e=n.currentSegments;for(const t of e)t.reachable&&(r[t.id].superCalled=!0)}()},"Program:exit"(){r=Object.create(null)}}}},KL}function uN(){if(zL)return QL;zL=1;const e=Pw();return QL={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(t){const n=t.sourceCode,r="[ \t  -​ ]",i=`^${r}*$`,s=`${r}+$`,o=t.options[0]||{},a=o.skipBlankLines||!1,l=o.ignoreComments||!1;function c(e,n,r){t.report({node:e,loc:n,messageId:"trailingSpace",fix(e){return e.removeRange(r)}})}return{Program:function(t){const r=new RegExp(s,"u"),o=new RegExp(i,"u"),u=n.lines,p=n.getText().match(e.createGlobalLinebreakMatcher()),d=function(e){const t=new Set;return e.forEach((e=>{const n="Block"===e.type?e.loc.end.line-1:e.loc.end.line;for(let r=e.loc.start.line;r<=n;r++)t.add(r)})),t}(n.getAllComments());let f=0,h=[];for(let e=0,i=u.length;e_.parent.range[0]&&y<_.parent.range[1]){f+=m;continue}if(a&&o.test(u[e])){f+=m;continue}h=[p,y],l&&d.has(i)||c(t,r,h)}f+=m}}}}},QL}function pN(){return tB||(tB=1,eB={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(e){const t=e.options[0]||{},n=t.allow?t.allow:[],r=void 0!==t.allowAfterThis&&t.allowAfterThis,i=void 0!==t.allowAfterSuper&&t.allowAfterSuper,s=void 0!==t.allowAfterThisConstructor&&t.allowAfterThisConstructor,o=void 0!==t.enforceInMethodNames&&t.enforceInMethodNames,a=void 0!==t.enforceInClassFields&&t.enforceInClassFields,l=void 0===t.allowFunctionParams||t.allowFunctionParams,c=void 0===t.allowInArrayDestructuring||t.allowInArrayDestructuring,u=void 0===t.allowInObjectDestructuring||t.allowInObjectDestructuring,p=e.sourceCode;function d(e){return n.includes(e)}function f(e){const t=e.length;return"_"!==e&&("_"===e[0]||"_"===e[t-1])}function h(t){if("FunctionDeclaration"===t.type&&t.id){const n=t.id.name;void 0!==n&&f(n)&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:n}})}!function(t){l||t.params.forEach((t=>{const{type:n}=t;let r;if(r="RestElement"===n?t.argument:"AssignmentPattern"===n?t.left:t,"Identifier"===r.type){const n=r.name;f(n)&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:n}})}}))}(t)}function m(t){const n=t.key.name,r="MethodDefinition"===t.type||"Property"===t.type&&t.method;void 0!==n&&o&&r&&f(n)&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:"PrivateIdentifier"===t.key.type?`#${n}`:n}})}return{FunctionDeclaration:h,VariableDeclarator:function(t){p.getDeclaredVariables(t).forEach((n=>{const r=n.defs.find((e=>e.node===t)).name,i=r.name;let s=r.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(s.type);)s=s.parent;!f(i)||function(e){return"_"===e}(i)||d(i)||c&&"ArrayPattern"===s.type||u&&"ObjectPattern"===s.type||e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:i}})}))},MemberExpression:function(t){const n=t.property.name,o="ThisExpression"===t.object.type,a="Super"===t.object.type,l=function(e){return"MemberExpression"===e.object.type&&"constructor"===e.object.property.name&&"ThisExpression"===e.object.object.type}(t);void 0===n||!f(n)||o&&r||a&&i||l&&s||function(e){return"__proto__"===e}(n)||d(n)||e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:n}})},MethodDefinition:m,PropertyDefinition:function(t){const n=t.key.name;void 0!==n&&f(n)&&a&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:"PrivateIdentifier"===t.key.type?`#${n}`:n}})},Property:m,FunctionExpression:h,ArrowFunctionExpression:h}}}),eB}function dN(){if(sB)return iB;sB=1;const e=eS(),t=Pw(),n=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,r=/^(?:DoWhile|For|While)Statement$/u,i=/^(?:BinaryExpression|ConditionalExpression)$/u,s=/^(?:ArrowFunction|Class|Function)Expression$/u,o=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function a(e){if(e.init){const t=e.resolved&&e.resolved.defs[0];if(!t||"Variable"!==t.type||"var"!==t.parent.kind)return!1}return e.isWrite()}function l(e){return!e.modified}function c(e){return!(e.modified||e.group)}function u(e,t){const n=e.range,r=t.identifier.range;return n[0]<=r[0]&&r[1]<=n[1]}const p={WhileStatement:u,DoWhileStatement:u,ForStatement(e,t){return u(e,t)&&!(e.init&&u(e.init,t))}};function d(e){let t=e.identifier;for(;t;){if("FunctionDeclaration"===t.type)return t.id?t:null;t=t.parent}return null}return iB={meta:{type:"problem",docs:{description:"Disallow unmodified loop conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unmodified-loop-condition"},schema:[],messages:{loopConditionNotModified:"'{{name}}' is not modified in this loop."}},create(u){const f=u.sourceCode;let h=null;function m(e){const t=e.reference.identifier;u.report({node:t,messageId:"loopConditionNotModified",data:t})}function g(e){e.every(l)&&e.forEach(m)}function y(t){let n=!1;return e.traverse(t,{visitorKeys:f.visitorKeys,enter(e){o.test(e.type)?(n=!0,this.break()):s.test(e.type)&&this.skip()}}),n}function _(e){if(e.init)return null;let t=null,s=e.identifier,o=s.parent;for(;o;){if(n.test(o.type)){if(r.test(o.type)&&o.test===s)return{reference:e,group:t,isInLoop:p[o.type].bind(null,o),modified:!1};break}if(i.test(o.type)){if(y(o))break;t=o}s=o,o=o.parent}return null}function b(e){const n=e.references.map(_).filter(Boolean);if(0===n.length)return;!function(e){for(let t=0;t0&&function(e,n){for(let r=0;r",">=","<","<=","in","instanceof"]),n={"==":"!=","!=":"==","===":"!==","!==":"==="},r=e.getPrecedence({type:"LogicalExpression",operator:"||"});return oB={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(i){const s=!1!==(i.options[0]||{}).defaultAssignment,o=i.sourceCode;function a(e){return"Literal"===e.type&&"boolean"==typeof e.value}function l(t){if("BinaryExpression"===t.type&&Object.prototype.hasOwnProperty.call(n,t.operator)){const e=o.getFirstTokenBetween(t.left,t.right,(e=>e.value===t.operator)),r=o.getText();return r.slice(t.range[0],e.range[0])+n[t.operator]+r.slice(e.range[1],t.range[1])}return e.getPrecedence(t)u(e.name.parent))),n=e.references.some((e=>u(e.identifier.parent)));return t||n}return!1}function d(e,t){return e.range[0]>=t.range[0]&&e.range[1]<=t.range[1]}function f(e){const t=e.parent;if("ExpressionStatement"===t.type)return!0;if("SequenceExpression"===t.type){return!(t.expressions[t.expressions.length-1]===e)||f(t)}return!1}function h(t,n){const r=e.getUpperFunction(t);return r&&d(r,n)&&function(e,t){let n=e,r=e.parent;for(;r&&d(r,t);){switch(r.type){case"SequenceExpression":if(r.expressions[r.expressions.length-1]!==n)return!1;break;case"CallExpression":case"NewExpression":return r.callee!==n;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(l.test(r.type))return!0}n=r,r=r.parent}return!1}(r,n)}function m(t){const n=function(e){const t=[];return e.defs.forEach((e=>{const{type:n,node:r}=e;"FunctionName"===n&&t.push(r),"Variable"!==n||!r.init||"FunctionExpression"!==r.init.type&&"ArrowFunctionExpression"!==r.init.type||t.push(r.init)})),t}(t),r=n.length>0;let i=null;return t.references.some((t=>{if(function(e){let t=e.identifier.parent;return"VariableDeclarator"===t.type&&(t=t.parent.parent),("ForInStatement"===t.type||"ForOfStatement"===t.type)&&(t="BlockStatement"===t.body.type?t.body.body[0]:t.body,!!t&&"ReturnStatement"===t.type)}(t))return!0;const s=function(t,n){const r=t.identifier,i=r.parent;return t.isRead()&&("AssignmentExpression"===i.type&&i.left===r&&f(i)&&!e.isLogicalAssignmentOperator(i.operator)||"UpdateExpression"===i.type&&f(i)||n&&d(r,n)&&!h(r,n))}(t,i);return i=function(t,n){const r=t.identifier,i=r.parent,s=t.from.variableScope!==t.resolved.scope.variableScope||e.isInLoop(r);return n&&d(r,n)?n:"AssignmentExpression"===i.type&&f(i)&&r===i.left&&!s?i.right:null}(t,i),function(e){return e.isRead()}(t)&&!s&&!(r&&function(e,t){let n=e.from;for(;n;){if(t.includes(n.block))return!0;n=n.upper}return!1}(t,n))}))}function g(e){const t=e.defs[0],r=n.getDeclaredVariables(t.node);return!r.slice(r.indexOf(e)+1).some((e=>e.references.length>0||e.eslintUsed))}function y(t,n){const r=t.variables,s=t.childScopes;let o,a;if("global"!==t.type||"all"===i.vars)for(o=0,a=r.length;o"ArrayPattern"===e.identifier.parent.type));if(("ArrayPattern"===a.name.parent.type||n)&&i.destructuredArrayIgnorePattern&&i.destructuredArrayIgnorePattern.test(a.name.name))continue;if("CatchClause"===t){if("none"===i.caughtErrors)continue;if(i.caughtErrorsIgnorePattern&&i.caughtErrorsIgnorePattern.test(a.name.name))continue}if("Parameter"===t){if(("Property"===a.node.parent.type||"MethodDefinition"===a.node.parent.type)&&"set"===a.node.parent.kind)continue;if("none"===i.args)continue;if(i.argsIgnorePattern&&i.argsIgnorePattern.test(a.name.name))continue;if("after-used"===i.args&&e.isFunction(a.name.parent)&&!g(s))continue}else if(i.varsIgnorePattern&&i.varsIgnorePattern.test(a.name.name))continue}m(s)||c(s)||p(s)||n.push(s)}for(o=0,a=s.length;o0){const e=l.references.filter((e=>e.isWrite()&&e.from.variableScope===l.scope.variableScope));let n;e.length>0&&(n=e[e.length-1]),t.report({node:n?n.identifier:l.identifiers[0],messageId:"unusedVar",data:l.references.some((e=>e.isWrite()))?a(l):o(l)})}else if(l.eslintExplicitGlobalComments){const i=l.eslintExplicitGlobalComments[0];t.report({node:r,loc:e.getNameLocationInGlobalDirectiveComment(n,i,l.name),messageId:"unusedVar",data:o(l)})}}}}}},OB}function yN(){if(CB)return wB;CB=1;const e=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,t=/^For(?:In|Of)Statement$/u;function n(e,t){return e&&e.range[0]<=t&&t<=e.range[1]}function r(e){if("class-static-block"===e.type)return!0;if("class-field-initializer"===e.type){return e.block.parent.static}return!1}function i(e){const t=e.resolved;let n=e.from;for(;t.scope.variableScope!==n.variableScope;){if(!r(n.variableScope))return!0;n=n.variableScope.upper}return!1}function s(r){if(i(r))return!1;const s=r.identifier.range[1],o=r.resolved.defs[0];if("ClassName"===o.type){const e=o.node;return n(e,s)&&!function(e,t){return e.body.some((e=>"StaticBlock"===e.type&&n(e,t)||"PropertyDefinition"===e.type&&e.static&&e.value&&n(e.value,t)))}(e.body,s)}let a=o.name.parent;for(;a;){if("VariableDeclarator"===a.type){if(n(a.init,s))return!0;if(t.test(a.parent.parent.type)&&n(a.parent.parent.right,s))return!0;break}if("AssignmentPattern"===a.type){if(n(a.right,s))return!0}else if(e.test(a.type))break;a=a.parent}return!1}return wB={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(e){const t=function(e){let t=!0,n=!0,r=!0,i=!1;return"string"==typeof e?t="nofunc"!==e:"object"==typeof e&&null!==e&&(t=!1!==e.functions,n=!1!==e.classes,r=!1!==e.variables,i=!!e.allowNamedExports),{functions:t,classes:n,variables:r,allowNamedExports:i}}(e.options[0]),n=e.sourceCode;function r(e){if(e.init)return!1;const{identifier:n}=e;if(t.allowNamedExports&&"ExportSpecifier"===n.parent.type&&n.parent.local===n)return!1;const r=e.resolved;if(!r||0===r.defs.length)return!1;const s=r.defs[0].type;return!(!t.functions&&"FunctionName"===s)&&!((!t.variables&&"Variable"===s||!t.classes&&"ClassName"===s)&&i(e))}function o(t){t.references.filter(r).forEach((t=>{const n=t.resolved.defs[0].name;(t.identifier.range[1]=1||"apply"===n.property.name&&2===t.arguments.length&&"ArrayExpression"===t.arguments[1].type)}(r))return;const i=e.skipChainExpression(r.callee),s=e.skipChainExpression(i.object);(function(t,n,r){return t?e.equalTokens(t,n,r):e.isNullOrUndefined(n)})("MemberExpression"===s.type?s.object:null,r.arguments[0],n)&&t.report({node:r,messageId:"unnecessaryCall",data:{name:i.property.name}})}}}},kB}function bN(){if(BB)return LB;BB=1;const e=Pw();return LB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(t){const n=t.sourceCode,r=t.options[0]&&t.options[0].enforceForClassMembers;function i(r){if(function(e){if(!e.computed)return!1;const{key:t}=e;if("Literal"!==t.type)return!1;const{value:n}=t;if("number"!=typeof n&&"string"!=typeof n)return!1;switch(e.type){case"Property":return"__proto__"!==n;case"PropertyDefinition":return e.static?"constructor"!==n&&"prototype"!==n:"constructor"!==n;case"MethodDefinition":return e.static?"prototype"!==n:"constructor"!==n;default:throw new Error(`Unexpected node type: ${e.type}`)}}(r)){const{key:i}=r;t.report({node:r,messageId:"unnecessarilyComputedProperty",data:{property:n.getText(i)},fix(t){const r=n.getTokenBefore(i,e.isOpeningBracketToken),s=n.getTokenAfter(i,e.isClosingBracketToken);if(n.commentsExistBetween(r,s))return null;const o=n.getTokenBefore(r),a=(o.range[1]===r.range[0]&&!e.canTokensBeAdjacent(o,n.getFirstToken(i))?" ":"")+i.raw;return t.replaceTextRange([r.range[0],s.range[1]],a)}})}}function s(){}return{Property:i,MethodDefinition:r?i:s,PropertyDefinition:r?i:s}}},LB}function vN(){if(jB)return MB;jB=1;const e=Pw();function t(e){return"BinaryExpression"===e.type&&"+"===e.operator}function n(e){return"+"===e.value&&"Punctuator"===e.type}return MB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(r){const i=r.sourceCode;return{BinaryExpression(s){if("+"!==s.operator)return;const o=function(e){let n=e.left;for(;t(n);)n=n.right;return n}(s),a=function(e){let n=e.right;for(;t(n);)n=n.left;return n}(s);if(e.isStringLiteral(o)&&e.isStringLiteral(a)&&e.isTokenOnSameLine(o,a)){const e=i.getFirstTokenBetween(o,a,n);r.report({node:s,loc:e.loc,messageId:"unexpectedConcat"})}}}}},MB}function EN(){if(FB)return NB;function e(e){return"Identifier"===e.type||"RestElement"===e.type}function t(e,t){return"Identifier"===e.type&&"Identifier"===t.type&&e.name===t.name}function n(e,n){return t(e,n)||function(e,n){return"RestElement"===e.type&&"SpreadElement"===n.type&&t(e.argument,n.argument)}(e,n)}function r(t,r){return function(e){return 1===e.length&&"ExpressionStatement"===e[0].type&&"CallExpression"===e[0].expression.type&&"Super"===e[0].expression.callee.type}(t)&&r.every(e)&&(1===(i=t[0].expression.arguments).length&&"SpreadElement"===i[0].type&&"Identifier"===i[0].argument.type&&"arguments"===i[0].argument.name||function(e,t){if(e.length!==t.length)return!1;for(let r=0;r?@^`~");return UB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(r){const c=r.sourceCode,u=new t;function p(t,n,i,s){const o=t.range[0]+n,a=[o,o+1],l=c.getLocFromIndex(o);r.report({node:t,loc:{start:l,end:{line:l.line,column:l.column+1}},messageId:"unnecessaryEscape",data:{character:i},suggest:[{messageId:e.isDirective(t.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(e){return e.removeRange(a)}},...s?[]:[{messageId:"escapeBackslash",fix(e){return e.insertTextBeforeRange(a,"\\")}}]]})}function d(e,t){const n="TemplateElement"===e.type,r=t[0][1];let s,o=!i.has(r);n?(s="`"===r,"$"===r?o="{"!==t.input[t.index+2]:"{"===r&&(o="$"!==t.input[t.index-1])):s=r===e.raw[0],o&&!s&&p(e,t.index,t[0].slice(1))}function f(e){const t="TemplateElement"===e.type;if(!(t&&e.parent&&e.parent.parent&&"TaggedTemplateExpression"===e.parent.parent.type&&e.parent===e.parent.parent.quasi))if("string"==typeof e.value||t){if("JSXAttribute"===e.parent.type||"JSXElement"===e.parent.type||"JSXFragment"===e.parent.type)return;const n=t?c.getText(e):e.raw,r=/\\[^\d]/gu;let i;for(;i=r.exec(n);)d(e,i)}else e.regex&&function(e){const{pattern:t,flags:r}=e.regex;let i;const c=r.includes("u"),d=r.includes("v");try{i=u.parsePattern(t,0,t.length,{unicode:c,unicodeSets:d})}catch{return}const f=[];n(i,{onCharacterClassEnter:e=>f.unshift(e),onCharacterClassLeave:()=>f.shift(),onExpressionCharacterClassEnter:e=>f.unshift(e),onExpressionCharacterClassLeave:()=>f.shift(),onCharacterEnter(n){if(!n.raw.startsWith("\\"))return;const r=n.raw.slice(1);if(r!==String.fromCodePoint(n.value))return;let i;if(i=f.length?d?a:s:o,i.has(r))return;const c=n.start+1;let u=!1;if(f.length){const e=f[0];if("^"===r&&e.start+1===n.start)return;if(d){if(l.has(r)){if(t[n.end]===r)return;if(t[n.start-1]===r){if("^"!==r)return;if(!e.negate)return;if(e.start+1!t.has(e))).forEach((e=>c(e,t)));const n=i.get(e);n.uselessReturns=n.uselessReturns.filter((e=>{if(o.traversedTryBlockStatements&&o.traversedTryBlockStatements.length>0){const t=e.range[0],n=e.range[1];if(o.traversedTryBlockStatements.some((e=>{const r=e.range[0],i=e.range[1];return t>=r&&n<=i})))return!0}return function(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}(o.uselessReturns,e),!1}))}function u(){o.currentSegments.forEach((e=>c(e,new Set)))}return{onCodePathStart(e){o={upper:o,uselessReturns:[],traversedTryBlockStatements:[],codePath:e,currentSegments:new Set}},onCodePathEnd(){for(const e of o.uselessReturns)r.report({node:e,loc:e.loc,messageId:"unnecessaryReturn",fix(r){return n(e)&&!s.getCommentsInside(e).length?new t(r,s).retainEnclosingFunction(e).remove(e):null}});o=o.upper},onCodePathSegmentStart(e){o.currentSegments.add(e);const t={uselessReturns:l([],e.allPrevSegments),returned:!1};i.set(e,t)},onUnreachableCodePathSegmentStart(e){o.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){o.currentSegments.delete(e)},onCodePathSegmentEnd(e){o.currentSegments.delete(e)},ReturnStatement(t){if(t.argument&&u(),!(t.argument||e.isInLoop(t)||function(t){for(let n=t;n&&n.parent&&!e.isFunction(n);n=n.parent)if("TryStatement"===n.parent.type&&n.parent.finalizer===n)return!0;return!1}(t))&&function(e){for(const t of e)if(t.reachable)return!0;return!1}(o.currentSegments)){for(const e of o.currentSegments){const n=i.get(e);n&&(n.uselessReturns.push(t),n.returned=!0)}o.uselessReturns.push(t)}},"TryStatement > BlockStatement.block:exit"(e){o.traversedTryBlockStatements.push(e)},"TryStatement:exit"(){o.traversedTryBlockStatements.pop()},ClassDeclaration:u,ContinueStatement:u,DebuggerStatement:u,DoWhileStatement:u,EmptyStatement:u,ExpressionStatement:u,ForInStatement:u,ForOfStatement:u,ForStatement:u,IfStatement:u,ImportDeclaration:u,LabeledStatement:u,SwitchStatement:u,ThrowStatement:u,TryStatement:u,VariableDeclaration:u,WhileStatement:u,WithStatement:u,ExportNamedDeclaration:u,ExportDefaultDeclaration:u,ExportAllDeclaration:u}}},$B}function ON(){if(zB)return QB;zB=1;const e=Pw();function t(e){return Boolean(e.scope)&&"global"===e.scope.type}function n(e){let t=e;for(;"function"!==t.type&&"global"!==t.type;)t=t.upper;return t}function r(e){const t=n(e.scope);return e.references.some((e=>n(e.from)!==t))}function i(e){return("ForOfStatement"===e.parent.type||"ForInStatement"===e.parent.type)&&e===e.parent.left}const s=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function o(e){return e.defs.length>=2}function a(e){return"let"===e.name}return QB={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(n){const l=n.sourceCode;function c(t){if(!t.init)return!1;return l.getDeclaredVariables(t).some(function(t){const n=t.range[0],r=t.range[1];return i=>{const s=i.defs[0].name,o=s.range[0],a="AssignmentPattern"===s.parent.type?s.parent.right:null,l=a&&a.range[0],c=a&&a.range[1];return i.references.some((i=>{const s=i.identifier.range[0],u=i.identifier.range[1];return!i.init&&(s=l&&u<=c||!e.isFunction(t)&&s>=n&&u<=r)}))}}(t.init))}function u(n){const u=l.getDeclaredVariables(n),p=function(e){for(let t=e;t;t=t.parent)if(s.test(t.type))return t;return null}(n);if("SwitchCase"===n.parent.type||n.declarations.some(c)||u.some(t)||u.some(o)||u.some(function(e){function t(t){const n=e.range,r=t.identifier.range;return r[0]n[1]}return function(e){return e.references.some(t)}}(p))||u.some(a))return!1;if(e.isInLoop(n)){if(u.some(r))return!1;if(!i(n)&&!function(e){return e.declarations.every((e=>null!==e.init))}(n))return!1}return!!(i(n)||"ForStatement"===n.parent.type&&n.parent.init===n||e.STATEMENT_LIST_PARENTS.has(n.parent.type))}return{"VariableDeclaration:exit"(e){"var"===e.kind&&function(e){n.report({node:e,messageId:"unexpectedVar",fix(t){const n=l.getFirstToken(e,{filter:e=>"var"===e.value});return u(e)?t.replaceText(n,"let"):null}})}(e)}}}},QB}function TN(){if(YB)return ZB;YB=1;const e=YO(),t=Pw();return ZB={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(n){const r=n.sourceCode,i=n.options[0]||{},s=i.terms||["todo","fixme","xxx"],o=i.location||"start",a=[...i.decoration||[]].join(""),l=/\bno-warning-comments\b/u;const c=s.map((function(t){const n=e(t),r=e(a);let i="";"start"===o?i=`^[\\s${r}]*`:/^\w/u.test(t)&&(i="\\b");const s=/\w$/u.test(t)?"\\b":"";return new RegExp(`${i}${n}${s}`,"iu")}));function u(e){const r=e.value;if(t.isDirectiveComment(e)&&l.test(r))return;const i=function(e){const t=[];return c.forEach(((n,r)=>{n.test(e)&&t.push(s[r])})),t}(r);i.forEach((t=>{let i="",s=!1;for(const e of r.trim().split(/\s+/u)){const t=i?`${i} ${e}`:e;if(!(t.length<=40)){s=!0;break}i=t}n.report({node:e,messageId:"unexpectedComment",data:{matchedTerm:t,comment:`${i}${s?"...":""}`}})}))}return{Program(){r.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(u)}}}},ZB}function wN(){if(JB)return HB;JB=1;const e=Pw();return HB={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(t){const n=t.sourceCode;return{MemberExpression(r){let i,s;e.isTokenOnSameLine(r.object,r.property)&&(r.computed?(i=n.getTokenBefore(r.property,e.isOpeningBracketToken),s=n.getTokenBefore(i,r.optional?1:0)):(i=n.getFirstToken(r.property),s=n.getTokenBefore(i,1)),n.isSpaceBetweenTokens(s,i)&&function(r,i,s){t.report({node:r,messageId:"unexpectedWhitespace",data:{propName:n.getText(r.property)},fix(t){let o="";return r.computed||r.optional||!e.isDecimalInteger(r.object)?n.commentsExistBetween(i,s)?null:(r.optional?o="?.":r.computed||(o="."),t.replaceTextRange([i.range[1],s.range[0]],o)):null}})}(r,s,i))}}}},HB}function CN(){if(rM)return nM;rM=1;const e={enum:["beside","below","any"]};return nM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[e,{properties:{overrides:{properties:{if:e,else:e,while:e,do:e,for:e},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(e){const t=e.sourceCode;function n(n,r){const i=function(t){return e.options[1]&&e.options[1].overrides&&e.options[1].overrides[t]||e.options[0]||"beside"}(r);if("BlockStatement"===n.type||"any"===i)return;const s=t.getTokenBefore(n);s.loc.end.line===n.loc.start.line&&"below"===i?e.report({node:n,messageId:"expectLinebreak",fix:e=>e.insertTextBefore(n,"\n")}):s.loc.end.line!==n.loc.start.line&&"beside"===i&&e.report({node:n,messageId:"expectNoLinebreak",fix(e){return t.getText().slice(s.range[1],n.range[0]).trim()?null:e.replaceTextRange([s.range[1],n.range[0]]," ")}})}return{IfStatement(e){n(e.consequent,"if"),e.alternate&&"IfStatement"!==e.alternate.type&&n(e.alternate,"else")},WhileStatement:e=>n(e.body,"while"),DoWhileStatement:e=>n(e.body,"do"),ForStatement:e=>n(e.body,"for"),ForInStatement:e=>n(e.body,"for"),ForOfStatement:e=>n(e.body,"for")}}},nM}function AN(){if(sM)return iM;sM=1;const e=Pw(),t={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function n(e){let t=!1,n=Number.POSITIVE_INFINITY,r=!1;return e?"always"===e?n=0:"never"===e?n=Number.POSITIVE_INFINITY:(t=Boolean(e.multiline),n=e.minProperties||Number.POSITIVE_INFINITY,r=Boolean(e.consistent)):r=!0,{multiline:t,minProperties:n,consistent:r}}function r(e){return"object"==typeof e&&null!==e}function i(e){return r(e)||"string"==typeof e}return iM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[t,{type:"object",properties:{ObjectExpression:t,ObjectPattern:t,ImportDeclaration:t,ExportDeclaration:t},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(t){const s=t.sourceCode,o=function(e){if(r(e)&&Object.values(e).some(i))return{ObjectExpression:n(e.ObjectExpression),ObjectPattern:n(e.ObjectPattern),ImportDeclaration:n(e.ImportDeclaration),ExportNamedDeclaration:n(e.ExportDeclaration)};const t=n(e);return{ObjectExpression:t,ObjectPattern:t,ImportDeclaration:t,ExportNamedDeclaration:t}}(t.options[0]);function a(n){const r=o[n.type];if("ImportDeclaration"===n.type&&!n.specifiers.some((e=>"ImportSpecifier"===e.type))||"ExportNamedDeclaration"===n.type&&!n.specifiers.some((e=>"ExportSpecifier"===e.type)))return;const i=s.getFirstToken(n,(e=>"{"===e.value));let a;a=n.typeAnnotation?s.getTokenBefore(n.typeAnnotation):s.getLastToken(n,(e=>"}"===e.value));let l=s.getTokenAfter(i,{includeComments:!0}),c=s.getTokenBefore(a,{includeComments:!0});const u=function(e,t,n,r){let i;return i="ObjectExpression"===e.type||"ObjectPattern"===e.type?e.properties:e.specifiers.filter((e=>"ImportSpecifier"===e.type||"ExportSpecifier"===e.type)),i.length>=t.minProperties||t.multiline&&i.length>0&&n.loc.start.line!==r.loc.end.line}(n,r,l,c),p=e.isCommentToken(l),d=e.isCommentToken(c);if(l=s.getTokenAfter(i),c=s.getTokenBefore(a),u)e.isTokenOnSameLine(i,l)&&t.report({messageId:"expectedLinebreakAfterOpeningBrace",node:n,loc:i.loc,fix(e){return p?null:e.insertTextAfter(i,"\n")}}),e.isTokenOnSameLine(c,a)&&t.report({messageId:"expectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix(e){return d?null:e.insertTextBefore(a,"\n")}});else{const s=r.consistent,o=!e.isTokenOnSameLine(i,l),u=!e.isTokenOnSameLine(c,a);(!s&&o||s&&o&&!u)&&t.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:n,loc:i.loc,fix(e){return p?null:e.removeRange([i.range[1],l.range[0]])}}),(!s&&u||s&&!o&&u)&&t.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix(e){return d?null:e.removeRange([c.range[1],a.range[0]])}})}}return{ObjectExpression:a,ObjectPattern:a,ImportDeclaration:a,ExportNamedDeclaration:a}}},iM}function PN(){if(aM)return oM;aM=1;const e=Pw();return oM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(t){const n="always"===t.options[0],r=t.sourceCode;function i(e){return!!t.options[1]&&t.options[1][e]===!n}const s={spaced:n,arraysInObjectsException:i("arraysInObjects"),objectsInObjectsException:i("objectsInObjects")};function o(n,i,o,a,l){if(e.isTokenOnSameLine(i,o)){const e=r.isSpaceBetweenTokens(i,o);s.spaced&&!e&&function(e,n){t.report({node:e,loc:n.loc,messageId:"requireSpaceAfter",data:{token:n.value},fix(e){return e.insertTextAfter(n," ")}})}(n,i),!s.spaced&&e&&"Line"!==o.type&&function(e,n){const r=t.sourceCode.getTokenAfter(n,{includeComments:!0});t.report({node:e,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceAfter",data:{token:n.value},fix(e){return e.removeRange([n.range[1],r.range[0]])}})}(n,i)}if(e.isTokenOnSameLine(a,l)){const i=(s.arraysInObjectsException&&e.isClosingBracketToken(a)||s.objectsInObjectsException&&e.isClosingBraceToken(a))&&r.getNodeByRangeIndex(a.range[0]).type,o=s.arraysInObjectsException&&"ArrayExpression"===i||s.objectsInObjectsException&&("ObjectExpression"===i||"ObjectPattern"===i)?!s.spaced:s.spaced,c=r.isSpaceBetweenTokens(a,l);o&&!c&&function(e,n){t.report({node:e,loc:n.loc,messageId:"requireSpaceBefore",data:{token:n.value},fix(e){return e.insertTextBefore(n," ")}})}(n,l),!o&&c&&function(e,n){const r=t.sourceCode.getTokenBefore(n,{includeComments:!0});t.report({node:e,loc:{start:r.loc.end,end:n.loc.start},messageId:"unexpectedSpaceBefore",data:{token:n.value},fix(e){return e.removeRange([r.range[1],n.range[0]])}})}(n,l)}}function a(t){if(0===t.properties.length)return;const n=r.getFirstToken(t),i=function(t){const n=t.properties[t.properties.length-1];return r.getTokenAfter(n,e.isClosingBraceToken)}(t);o(t,n,r.getTokenAfter(n,{includeComments:!0}),r.getTokenBefore(i,{includeComments:!0}),i)}return{ObjectPattern:a,ObjectExpression:a,ImportDeclaration:function(t){if(0===t.specifiers.length)return;let n=t.specifiers[0];const i=t.specifiers[t.specifiers.length-1];if("ImportSpecifier"!==i.type)return;"ImportSpecifier"!==n.type&&(n=t.specifiers[1]);const s=r.getTokenBefore(n),a=r.getTokenAfter(i,e.isNotCommaToken);o(t,s,r.getTokenAfter(s,{includeComments:!0}),r.getTokenBefore(a,{includeComments:!0}),a)},ExportNamedDeclaration:function(t){if(0===t.specifiers.length)return;const n=t.specifiers[0],i=t.specifiers[t.specifiers.length-1],s=r.getTokenBefore(n),a=r.getTokenAfter(i,e.isNotCommaToken);o(t,s,r.getTokenAfter(s,{includeComments:!0}),r.getTokenBefore(a,{includeComments:!0}),a)}}}},oM}function kN(){if(pM)return uM;pM=1;const e="always",t="never",n="methods",r="properties",i="consistent",s="consistent-as-needed",o=Pw();return uM={meta:{type:"suggestion",docs:{description:"Require or disallow method and property shorthand syntax for object literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-shorthand"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["always","methods","properties","never","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","methods","properties"]},{type:"object",properties:{avoidQuotes:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always","methods"]},{type:"object",properties:{ignoreConstructors:{type:"boolean"},methodsIgnorePattern:{type:"string"},avoidQuotes:{type:"boolean"},avoidExplicitReturnArrows:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{expectedAllPropertiesShorthanded:"Expected shorthand for all properties.",expectedLiteralMethodLongform:"Expected longform method syntax for string literal keys.",expectedPropertyShorthand:"Expected property shorthand.",expectedPropertyLongform:"Expected longform property syntax.",expectedMethodShorthand:"Expected method shorthand.",expectedMethodLongform:"Expected longform method syntax.",unexpectedMix:"Unexpected mix of shorthand and non-shorthand properties."}},create(a){const l=a.options[0]||e,c=l===n||l===e,u=l===r||l===e,p=l===t,d=l===i,f=l===s,h=a.options[1]||{},m=h.ignoreConstructors,g=h.methodsIgnorePattern?new RegExp(h.methodsIgnorePattern,"u"):null,y=h.avoidQuotes,_=!!h.avoidExplicitReturnArrows,b=a.sourceCode,v=/[^_$0-9]/u;function E(e){return"set"!==e.kind&&"get"!==e.kind&&"SpreadElement"!==e.type&&"SpreadProperty"!==e.type&&"ExperimentalSpreadProperty"!==e.type}function x(e){return"Literal"===e.type&&"string"==typeof e.value}function S(e){return e.shorthand||e.method}function O(e){const t=e.value;return"FunctionExpression"===t.type?!t.id:"Identifier"===t.type&&o.getStaticPropertyName(e)===t.name}function T(e,t){const n=e.properties.filter(E);if(n.length>0){const r=n.filter(S);if(r.length!==n.length)if(r.length>0)a.report({node:e,messageId:"unexpectedMix"});else if(t){n.every(O)&&a.report({node:e,messageId:"expectedAllPropertiesShorthanded"})}}}const w=[],C=new WeakSet,A=new WeakSet;function P(e){w.unshift(new Set),b.getScope(e).variables.filter((e=>"arguments"===e.name)).forEach((e=>{e.references.map((e=>e.identifier)).forEach((e=>A.add(e)))}))}function k(){w.shift()}function D(){w[0].forEach((e=>C.add(e)))}return{Program:P,FunctionDeclaration:P,FunctionExpression:P,"Program:exit":k,"FunctionDeclaration:exit":k,"FunctionExpression:exit":k,ArrowFunctionExpression(e){w[0].add(e)},"ArrowFunctionExpression:exit"(e){w[0].delete(e)},ThisExpression:D,Super:D,MetaProperty(e){"new"===e.meta.name&&"target"===e.property.name&&D()},Identifier(e){A.has(e)&&D()},ObjectExpression(e){d?T(e,!1):f&&T(e,!0)},"Property:exit"(e){const t=e.method||e.shorthand;if("ObjectPattern"!==e.parent.type&&"get"!==e.kind&&"set"!==e.kind&&(!e.computed||"FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type))if(t)if(e.method&&(p||y&&x(e.key))){const t=p?"expectedMethodLongform":"expectedLiteralMethodLongform";a.report({node:e,messageId:t,fix:t=>function(e,t){const n=t.computed?b.getTokens(t).find((e=>"["===e.value)):b.getFirstToken(t.key),r=t.computed?b.getTokensBetween(t.key,t.value).find((e=>"]"===e.value)):b.getLastToken(t.key),i=b.text.slice(n.range[0],r.range[1]);let s="function";return t.value.async&&(s=`async ${s}`),t.value.generator&&(s=`${s}*`),e.replaceTextRange([t.range[0],r.range[1]],`${i}: ${s}`)}(t,e)})}else p&&a.report({node:e,messageId:"expectedPropertyLongform",fix:t=>t.insertTextAfter(e.key,`: ${e.key.name}`)});else if(!c||e.value.id||"FunctionExpression"!==e.value.type&&"ArrowFunctionExpression"!==e.value.type){if("Identifier"===e.value.type&&e.key.name===e.value.name&&u)a.report({node:e,messageId:"expectedPropertyShorthand",fix(t){return t.replaceText(e,e.value.name)}});else if("Identifier"===e.value.type&&"Literal"===e.key.type&&e.key.value===e.value.name&&u){if(y)return;a.report({node:e,messageId:"expectedPropertyShorthand",fix(t){return t.replaceText(e,e.value.name)}})}}else{if(m&&"Identifier"===e.key.type&&function(e){const t=v.exec(e);if(!t)return!1;const n=e.charAt(t.index);return n===n.toUpperCase()}(e.key.name))return;if(g){const t=o.getStaticPropertyName(e);if(null!==t&&g.test(t))return}if(y&&x(e.key))return;("FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type&&"BlockStatement"===e.value.body.type&&_&&!C.has(e.value))&&a.report({node:e,messageId:"expectedMethodShorthand",fix:t=>function(e,t){const n=t.computed?b.getFirstToken(t,o.isOpeningBracketToken):b.getFirstToken(t.key),r=t.computed?b.getFirstTokenBetween(t.key,t.value,o.isClosingBracketToken):b.getLastToken(t.key),i=b.text.slice(n.range[0],r.range[1]);let s="";if(b.commentsExistBetween(r,t.value))return null;t.value.async&&(s+="async "),t.value.generator&&(s+="*");const a=[n.range[0],t.range[1]],l=s+i;if("FunctionExpression"===t.value.type){const n=b.getTokens(t.value).find((e=>"Keyword"===e.type&&"function"===e.value)),r=t.value.generator?b.getTokenAfter(n):n;return e.replaceTextRange(a,l+b.text.slice(r.range[1],t.value.range[1]))}const c=b.getTokenBefore(t.value.body,o.isArrowToken),u=b.text.slice(c.range[1],t.value.range[1]);let p,d=!1;if(p=0===t.value.params.length?b.getFirstToken(t.value,o.isOpeningParenToken):b.getTokenBefore(t.value.params[0]),1===t.value.params.length){const e=o.isOpeningParenToken(p),n=p.range[0]0&&i.uninitialized===n&&s.uninitialized)&&(!(r.initialized>0&&i.initialized===n&&s.initialized&&!a)&&((!s.required||!a)&&(function(e,t,r){for(let i=0;ie.range[0]===t.parent.range[0])),i=n[r-1];return e=>{const n=a.getTokenBefore(t),r=a.getTokenBefore(n),s=[];return i&&i.kind===a.getText(n)&&(";"===r.value?s.push(e.replaceText(r,",")):s.push(e.insertTextAfter(r,",")),s.push(e.replaceText(n,""))),s}}function _(t){const{parent:n}=t;return function(t){return e.STATEMENT_LIST_PARENTS.has(t.parent.type)}("ExportNamedDeclaration"===n.type?n:t)?e=>t.declarations.map((n=>{const r=a.getTokenAfter(n);if(null===r)return null;const i=a.getTokenAfter(r,{includeComments:!0});if(","!==r.value)return null;const s="ExportNamedDeclaration"===t.parent.type?"export ":"";if(i.range[0]===r.range[1])return e.replaceText(r,`; ${s}${t.kind} `);if(i.loc.start.line>r.loc.end.line||"Line"===i.type||"Block"===i.type){let n=i;for(;"Line"===n.type||"Block"===n.type;)n=a.getTokenAfter(n,{includeComments:!0});return e.replaceTextRange([r.range[0],n.range[0]],`;${a.text.slice(r.range[1],n.range[0])}${s}${t.kind} `)}return e.replaceText(r,`; ${s}${t.kind}`)})).filter((e=>e)):null}return{Program:p,FunctionDeclaration:p,FunctionExpression:p,ArrowFunctionExpression:p,StaticBlock:p,BlockStatement:u,ForStatement:u,ForInStatement:u,ForOfStatement:u,SwitchStatement:u,VariableDeclaration:function(e){const s=e.parent,a=e.kind;if(!o[a])return;const l=e.declarations,c=m(l),u=l.some(h)&&!l.every(h);o[a].initialized===n&&o.separateRequires&&u&&t.report({node:e,messageId:"splitRequires"});const p=s.body&&s.body.length>0&&s.body.indexOf(e)||0;if(p>0){const n=s.body[p-1],r="VariableDeclaration"===n.type,u=l.concat(n.declarations||[]);if(r&&n.kind===a&&(!u.some(h)||u.every(h))){const r=m(n.declarations);o[a].initialized===i&&o[a].uninitialized===i?t.report({node:e,messageId:"combine",data:{type:a},fix:y(l)}):o[a].initialized===i&&c.initialized>0&&r.initialized>0?t.report({node:e,messageId:"combineInitialized",data:{type:a},fix:y(l)}):o[a].uninitialized===i&&c.uninitialized>0&&r.uninitialized>0&&t.report({node:e,messageId:"combineUninitialized",data:{type:a},fix:y(l)})}}if(!g(a,l))if(o[a].initialized===n&&o[a].uninitialized===n)t.report({node:e,messageId:"combine",data:{type:a},fix:y(l)});else if(o[a].initialized===n&&c.initialized>0&&t.report({node:e,messageId:"combineInitialized",data:{type:a},fix:y(l)}),o[a].uninitialized===n&&c.uninitialized>0){if(e.parent.left===e&&("ForInStatement"===e.parent.type||"ForOfStatement"===e.parent.type))return;t.report({node:e,messageId:"combineUninitialized",data:{type:a},fix:y(l)})}if("ForStatement"!==s.type||s.init!==e){c.uninitialized+c.initialized>1&&(o[a].initialized===r&&o[a].uninitialized===r?t.report({node:e,messageId:"split",data:{type:a},fix:_(e)}):o[a].initialized===r&&c.initialized>0?t.report({node:e,messageId:"splitInitialized",data:{type:a},fix:_(e)}):o[a].uninitialized===r&&c.uninitialized>0&&t.report({node:e,messageId:"splitUninitialized",data:{type:a},fix:_(e)}))}},"ForStatement:exit":d,"ForOfStatement:exit":d,"ForInStatement:exit":d,"SwitchStatement:exit":d,"BlockStatement:exit":d,"Program:exit":f,"FunctionDeclaration:exit":f,"FunctionExpression:exit":f,"ArrowFunctionExpression:exit":f,"StaticBlock:exit":f}}},dM}function RN(){if(bM)return _M;bM=1;const e=Pw();return _M={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(t){const n=!t.options[0],r=t.options[0]||"after",i=t.options[1]||{},s=i.overrides?Object.assign({},i.overrides):{};n&&!s["?"]&&(s["?"]="before"),n&&!s[":"]&&(s[":"]="before");const o=t.sourceCode;function a(n,i,a){const l=o.getTokenBefore(i,(e=>e.value===a)),c=o.getTokenBefore(l),u=o.getTokenAfter(l),p=s[a],d=p||r,f=function(t,n){return r=>{const i=o.getTokenBefore(t),s=o.getTokenAfter(t),a=o.text.slice(i.range[1],t.range[0]),l=o.text.slice(t.range[1],s.range[0]);let c,u;if(!e.isTokenOnSameLine(i,t)!=!e.isTokenOnSameLine(t,s)&&"none"!==n){if(o.getTokenBefore(t,{includeComments:!0})!==i&&o.getTokenAfter(t,{includeComments:!0})!==s)return null;c=l,u=a}else{const t=e.createGlobalLinebreakMatcher();if(c="before"===n||a.trim()?a:a.replace(t,""),u="after"===n||l.trim()?l:l.replace(t,""),c===a&&u===l)return null}return""===u&&"Punctuator"===s.type&&"+-".includes(t.value)&&s.value===t.value&&(u+=" "),r.replaceTextRange([i.range[1],s.range[0]],c+t.value+u)}}(l,d);e.isTokenOnSameLine(c,l)&&e.isTokenOnSameLine(l,u)||("ignore"===p||e.isTokenOnSameLine(c,l)||e.isTokenOnSameLine(l,u)?"before"===d&&e.isTokenOnSameLine(c,l)?t.report({node:n,loc:l.loc,messageId:"operatorAtBeginning",data:{operator:a},fix:f}):"after"===d&&e.isTokenOnSameLine(l,u)?t.report({node:n,loc:l.loc,messageId:"operatorAtEnd",data:{operator:a},fix:f}):"none"===d&&t.report({node:n,loc:l.loc,messageId:"noLinebreak",data:{operator:a},fix:f}):t.report({node:n,loc:l.loc,messageId:"badLinebreak",data:{operator:a},fix:f}))}function l(e){a(e,e.right,e.operator)}return{BinaryExpression:l,LogicalExpression:l,AssignmentExpression:l,VariableDeclarator(e){e.init&&a(e,e.init,"=")},PropertyDefinition(e){e.value&&a(e,e.value,"=")},ConditionalExpression(e){a(e,e.consequent,"?"),a(e,e.alternate,":")}}}},_M}function IN(){if(EM)return vM;EM=1;const e=Pw();return vM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(t){const n={},r=t.options[0]||"always",i=t.options[1]||{};if("string"==typeof r){const e="always"===r;n.blocks=e,n.switches=e,n.classes=e}else Object.prototype.hasOwnProperty.call(r,"blocks")&&(n.blocks="always"===r.blocks),Object.prototype.hasOwnProperty.call(r,"switches")&&(n.switches="always"===r.switches),Object.prototype.hasOwnProperty.call(r,"classes")&&(n.classes="always"===r.classes);Object.prototype.hasOwnProperty.call(i,"allowSingleLineBlocks")&&(n.allowSingleLineBlocks=!0===i.allowSingleLineBlocks);const s=t.sourceCode;function o(e){return"Line"===e.type||"Block"===e.type}function a(e,t){return t.loc.start.line-e.loc.end.line>=2}function l(r){const i=function(e){return"SwitchStatement"===e.type?s.getTokenBefore(e.cases[0]):"StaticBlock"===e.type?s.getFirstToken(e,{skip:1}):s.getFirstToken(e)}(r),l=function(e){let t,n=e;do{t=n,n=s.getTokenAfter(n,{includeComments:!0})}while(o(n)&&n.loc.start.line===t.loc.end.line);return n}(i),c=s.getTokenBefore(l,{includeComments:!0}),u=function(e){let t,n=e;do{t=n,n=s.getTokenBefore(n,{includeComments:!0})}while(o(n)&&n.loc.end.line===t.loc.start.line);return n}(s.getLastToken(r)),p=s.getTokenAfter(u,{includeComments:!0}),d=a(c,l),f=a(u,p);n.allowSingleLineBlocks&&e.isTokenOnSameLine(c,p)||(!function(e){switch(e.type){case"BlockStatement":case"StaticBlock":return n.blocks;case"SwitchStatement":return n.switches;case"ClassBody":return n.classes;default:throw new Error("unreachable")}}(r)?(d&&t.report({node:r,loc:{start:c.loc.start,end:l.loc.start},fix(e){return e.replaceTextRange([c.range[1],l.range[0]-l.loc.start.column],"\n")},messageId:"neverPadBlock"}),f&&t.report({node:r,loc:{end:p.loc.start,start:u.loc.end},messageId:"neverPadBlock",fix(e){return e.replaceTextRange([u.range[1],p.range[0]-p.loc.start.column],"\n")}})):(d||t.report({node:r,loc:{start:c.loc.start,end:l.loc.start},fix(e){return e.insertTextAfter(c,"\n")},messageId:"alwaysPadBlock"}),f||t.report({node:r,loc:{end:p.loc.start,start:u.loc.end},fix(e){return e.insertTextBefore(p,"\n")},messageId:"alwaysPadBlock"})))}const c={};return Object.prototype.hasOwnProperty.call(n,"switches")&&(c.SwitchStatement=function(e){0!==e.cases.length&&l(e)}),Object.prototype.hasOwnProperty.call(n,"blocks")&&(c.BlockStatement=function(e){0!==e.body.length&&l(e)},c.StaticBlock=c.BlockStatement),Object.prototype.hasOwnProperty.call(n,"classes")&&(c.ClassBody=function(e){0!==e.body.length&&l(e)}),c}},vM}function LN(){if(SM)return xM;SM=1;const e=Pw(),t=`[${Array.from(e.LINEBREAKS).join("")}]`,n=new RegExp(String.raw`^(\s*?${t})\s*${t}(\s*;?)$`,"u"),r=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,i=/^require\(/u;function s(e){return{test:(t,n)=>n.getFirstToken(t).value===e}}function o(e){return{test:(t,n)=>t.loc.start.line===t.loc.end.line&&n.getFirstToken(t).value===e}}function a(e){return{test:(t,n)=>t.loc.start.line!==t.loc.end.line&&n.getFirstToken(t).value===e}}function l(e){return{test:t=>t.type===e}}function c(t){if("ExpressionStatement"===t.type){let n=e.skipChainExpression(t.expression);return"UnaryExpression"===n.type&&(n=e.skipChainExpression(n.argument)),"CallExpression"===n.type&&e.isFunction(n.callee)}return!1}function u(t,n){if("DoWhileStatement"===n.type&&"BlockStatement"===n.body.type)return!0;if(c(n))return!0;const r=t.getLastToken(n,e.isNotSemicolonToken),i=r&&e.isClosingBraceToken(r)?t.getNodeByRangeIndex(r.range[0]):null;return Boolean(i)&&("BlockStatement"===i.type||"SwitchStatement"===i.type)}function p(t,n){const r=t.getLastToken(n),i=t.getTokenBefore(r),s=t.getTokenAfter(r);return Boolean(i&&s&&i.range[0]>=n.range[0]&&e.isSemicolonToken(r)&&r.loc.start.line!==i.loc.end.line&&r.loc.end.line===s.loc.start.line)?i:r}function d(e,t,n){return t+n}const f={any:{verify:function(){}},never:{verify:function(e,t,r,i){0!==i.length&&e.report({node:r,messageId:"unexpectedBlankLine",fix(t){if(i.length>=2)return null;const r=i[0][0],s=i[0][1],o=r.range[1],a=s.range[0],l=e.sourceCode.text.slice(o,a).replace(n,d);return t.replaceTextRange([o,a],l)}})}},always:{verify:function(t,n,r,i){i.length>0||t.report({node:r,messageId:"expectedBlankLine",fix(i){const s=t.sourceCode;let o=p(s,n);const a=s.getFirstTokenBetween(o,r,{includeComments:!0,filter(t){return!e.isTokenOnSameLine(o,t)||(o=t,!1)}})||r,l=e.isTokenOnSameLine(o,a)?"\n\n":"\n";return i.insertTextAfter(o,l)}})}}},h={"*":{test:()=>!0},"block-like":{test:(e,t)=>u(t,e)},"cjs-export":{test:(e,t)=>"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&r.test(t.getText(e.expression.left))},"cjs-import":{test:(e,t)=>"VariableDeclaration"===e.type&&e.declarations.length>0&&Boolean(e.declarations[0].init)&&i.test(t.getText(e.declarations[0].init))},directive:{test:e.isDirective},expression:{test:t=>"ExpressionStatement"===t.type&&!e.isDirective(t)},iife:{test:c},"multiline-block-like":{test:(e,t)=>e.loc.start.line!==e.loc.end.line&&u(t,e)},"multiline-expression":{test:t=>t.loc.start.line!==t.loc.end.line&&"ExpressionStatement"===t.type&&!e.isDirective(t)},"multiline-const":a("const"),"multiline-let":a("let"),"multiline-var":a("var"),"singleline-const":o("const"),"singleline-let":o("let"),"singleline-var":o("var"),block:l("BlockStatement"),empty:l("EmptyStatement"),function:l("FunctionDeclaration"),break:s("break"),case:s("case"),class:s("class"),const:s("const"),continue:s("continue"),debugger:s("debugger"),default:s("default"),do:s("do"),export:s("export"),for:s("for"),if:s("if"),import:s("import"),let:s("let"),return:s("return"),switch:s("switch"),throw:s("throw"),try:s("try"),var:s("var"),while:s("while"),with:s("with")};return xM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(f)},statementType:{anyOf:[{enum:Object.keys(h)},{type:"array",items:{enum:Object.keys(h)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(t){const n=t.sourceCode,r=t.options||[];let i=null;function s(){i={upper:i,prevNode:null}}function o(){i=i.upper}function a(e,t){let r=e;for(;"LabeledStatement"===r.type;)r=r.body;return Array.isArray(t)?t.some(a.bind(null,r)):h[t].test(r,n)}function l(s){const o=s.parent.type;if(!(e.STATEMENT_LIST_PARENTS.has(o)||"SwitchStatement"===o))return;const l=i.prevNode;if(l){const e=function(e,t){for(let n=r.length-1;n>=0;--n){const i=r[n];if(a(e,i.prev)&&a(t,i.next))return f[i.blankLine]}return f.any}(l,s),i=function(e,t){const r=[];let i=p(n,e);if(t.loc.start.line-i.loc.end.line>=2)do{const e=n.getTokenAfter(i,{includeComments:!0});e.loc.start.line-i.loc.end.line>=2&&r.push([i,e]),i=e}while(i.range[0]0)return;const c=function(e){const t=e.variables;for(let e=0;e0)return;const u=function(t){const n={isCallback:!1,isLexicalThis:!1};let r=t,i=t.parent,s=!1;for(;r;){switch(i.type){case"LogicalExpression":case"ChainExpression":case"ConditionalExpression":break;case"MemberExpression":if(i.object!==r||i.property.computed||"Identifier"!==i.property.type||"bind"!==i.property.name)return n;{const t="ChainExpression"===i.parent.type?i.parent:i;if(!e.isCallee(t))return n;s||(s=!0,n.isLexicalThis=1===t.parent.arguments.length&&"ThisExpression"===t.parent.arguments[0].type),i=t.parent}break;case"CallExpression":case"NewExpression":return i.callee!==r&&(n.isCallback=!0),n;default:return n}r=i,i=i.parent}throw new Error("unreachable")}(n);!u.isCallback||r&&o.this&&!u.isLexicalThis||o.super||o.meta||t.report({node:n,messageId:"preferArrowCallback",*fix(t){if(!u.isLexicalThis&&o.this||(r=n.params).every((e=>"Identifier"===e.type))&&r.length!==new Set(r.map((e=>e.name))).size)return;var r;if(u.isLexicalThis){const r=n.parent;if("MemberExpression"!==r.type)return;const i=r.parent,o=s.getTokenAfter(r.object,e.isNotClosingParenToken),a=s.getLastToken(i);if(e.isParenthesised(s,r))return;if(s.commentsExistBetween(o,a))return;yield t.removeRange([o.range[0],a.range[1]])}const i=s.getFirstToken(n,n.async?1:0),a=s.getTokenAfter(i,e.isOpeningParenToken),l=s.getTokenBefore(n.body);s.commentsExistBetween(i,a)?(yield t.remove(i),n.id&&(yield t.remove(n.id))):yield t.removeRange([i.range[0],a.range[0]]),yield t.insertTextAfter(l," =>");let c=u.isLexicalThis?n.parent.parent:n;"ChainExpression"===c.type&&(c=c.parent),"CallExpression"===c.parent.type||"ConditionalExpression"===c.parent.type||e.isParenthesised(s,c)||e.isParenthesised(s,n)||(yield t.insertTextBefore(c,"("),yield t.insertTextAfter(c,")"))}})}}}},OM}function MN(){if(CM)return wM;CM=1;const e=Aj(),t=Pw(),n=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,r=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,i=/^(?:VariableDeclarator|AssignmentExpression)$/u;function s(e,n){if(n.through.some((t=>t.resolved&&t.resolved.name===e)))return!0;const r=t.getVariableByName(n,e);return null!==r&&r.defs.some((e=>"Parameter"===e.type))}function o(e){if(!e.isWrite())return null;let t=e.identifier.parent;for(;n.test(t.type);)t=t.parent;return i.test(t.type)?t:null}function a(e){switch(e.type){case"ObjectPattern":return e.properties.some((e=>!!e&&a(e.argument||e.value)));case"ArrayPattern":return e.elements.some((e=>!!e&&a(e)));case"AssignmentPattern":return a(e.left);case"MemberExpression":return!0}return!1}function l(e,t){if(e.eslintUsed&&"global"===e.scope.type)return null;let i=null,l=!1;const c=e.references;for(let n=0;ne.value)).map((e=>e.value.name)).some((t=>s(t,e.scope))),i=a(n)}else if("ArrayPattern"===n.type){r=n.elements.map((e=>e&&e.name)).some((t=>s(t,e.scope))),i=a(n)}if(r||i)return null}i=r}else if(r.isRead()&&null===i){if(t)return null;l=!0}}const u=null!==i&&i.from===e.scope&&function(e){let t=e.parent;for(;n.test(t.type);)t=t.parent;return"VariableDeclarator"===t.type||"AssignmentExpression"===t.type&&"ExpressionStatement"===t.parent.type&&r.test(t.parent.parent.type)}(i.identifier);return u?l?e.defs[0].name:i.identifier:null}function c(e,t,n){return!e||n(e)?null:e.type===t?e:c(e.parent,t,n)}return wM={meta:{type:"suggestion",docs:{description:"Require `const` declarations for variables that are never reassigned after declared",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-const"},fixable:"code",schema:[{type:"object",properties:{destructuring:{enum:["any","all"],default:"any"},ignoreReadBeforeAssign:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"'{{name}}' is never reassigned. Use 'const' instead."}},create(t){const n=t.options[0]||{},r=t.sourceCode,i="all"!==n.destructuring,s=!0===n.ignoreReadBeforeAssign,a=[];let u=0,p=null,d="";function f(n){const s=n.filter(Boolean);if(n.length&&(i||s.length===n.length)){const i=c(n[0],"VariableDeclaration",(e=>e.type.endsWith("Statement"))),o=null===i;if(!o&&i.declarations.length>0){const e=i.declarations[0];if(e.init){const t=e.init.parent;"VariableDeclarator"===t.type&&(t.id.name!==d&&(d=t.id.name,u=0),"ObjectPattern"===t.id.type&&t.init.name!==d&&(d=t.init.name,u=0),t.id!==p&&(p=t.id,u=0))}}let a=i&&("ForInStatement"===i.parent.type||"ForOfStatement"===i.parent.type||i.declarations.every((e=>e.init)))&&s.length===n.length;if(!o&&i.declarations&&1!==i.declarations.length&&i&&i.declarations&&i.declarations.length>=1){u+=s.length;let e=0;i.declarations.forEach((t=>{"ObjectPattern"===t.id.type?e+=t.id.properties.length:"ArrayPattern"===t.id.type?e+=t.id.elements.length:e+=1})),a=a&&u===e}s.forEach((n=>{t.report({node:n,messageId:"useConst",data:n,fix:a?t=>{const n=r.getFirstToken(i,(e=>e.value===i.kind));return new e(t,r).retainRange(i.range).replaceTextRange(n.range,"const")}:null})}))}}return{"Program:exit"(){(function(e,t){const n=new Map;for(let r=0;rfunction(r,i){const s=i.init,o=n.sourceCode;if(o.getCommentsInside(i).length>o.getCommentsInside(s.object).length)return null;let a=o.getText(s.object);return e.getPrecedence(s.object)"SpreadElement"===e.type))||o.getCommentsInside(t).length>0)return null;const s=t.arguments[0],a=t.arguments[1],l=o.getText(s),c=o.getText(a),u=function(t){return e.getPrecedence(t)<=r||"AwaitExpression"===t.type||"UnaryExpression"===t.type}(s),p=function(t){return e.getPrecedence(t)=r)&&!("BinaryExpression"===i.type&&"**"===i.operator&&i.right===t)&&!(("CallExpression"===i.type||"NewExpression"===i.type)&&i.arguments.includes(t))&&!("MemberExpression"===i.type&&i.computed&&i.property===t)&&!("ArrayExpression"===i.type))&&!e.isParenthesised(n,t)}(t,o);let f="",h="";if(!d){if(!u){const n=o.getFirstToken(s),r=o.getTokenBefore(t);r&&r.range[1]===t.range[0]&&!e.canTokensBeAdjacent(r,n)&&(f=" ")}if(!p){const n=o.getLastToken(a),r=o.getTokenAfter(t);r&&t.range[1]===r.range[0]&&!e.canTokensBeAdjacent(n,r)&&(h=" ")}}const m=i(l,u),g=i(c,p),y=i(`${m}**${g}`,d);return n.replaceText(t,`${f}${y}${h}`)}})}return{Program(e){const r=o.getScope(e),i=new n(r),s={Math:{pow:{[t]:!0}}};for(const{node:e}of i.iterateGlobalReferences(s))a(e)}}}},kM}function FN(){if(IM)return RM;IM=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),i=Tj(),s=new i.RegExpParser;return RM={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(o){const a=o.sourceCode;function l(e,t,n,r){let l;try{l=s.parsePattern(e,0,e.length,{unicode:Boolean(r&&r.includes("u")),unicodeSets:Boolean(r&&r.includes("v"))})}catch{return}i.visitRegExpAST(l,{onCapturingGroupEnter(r){if(!r.name){const i=a.getText(n),s=function(e,t,n,r){switch(r.type){case"Literal":if("string"==typeof r.value&&n.includes("\\"))return null;break;case"TemplateLiteral":if(r.expressions.length||n.slice(1,-1)!==t)return null;break;default:return null}const i=r.range[0]+e+2;return[{fix(e){const n=(t.match(/temp\d+/gu)||[]).reduce(((e,t)=>Math.max(e,Number(t.slice("temp".length)))),0);return e.insertTextBeforeRange([i,i],`?`)},messageId:"addGroupName"},{fix(e){return e.insertTextBeforeRange([i,i],"?:")},messageId:"addNonCapture"}]}(r.start,e,i,n);o.report({node:t,messageId:"required",data:{group:r.raw},suggest:s})}}})}return{Literal(e){e.regex&&l(e.regex.pattern,e,e,e.regex.flags)},Program(i){const s=a.getScope(i),o=new n(s),c={RegExp:{[e]:!0,[t]:!0}};for(const{node:e}of o.iterateGlobalReferences(c)){const t=r(e.arguments[0]),n=r(e.arguments[1]);t&&l(t,e,e.arguments[0],n)}}}}},RM}function UN(){if(BM)return LM;BM=1;const e=Pw(),t=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);return LM={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(n){const r=n.sourceCode;return{"CallExpression[arguments.length=2]"(i){const[s,o]=i.arguments,a=e.getStaticStringValue(s),l=o.value;if(null!==a&&e.isStringLiteral(s)&&"Literal"===o.type&&"number"==typeof l&&t.has(l)&&(c=i.callee,e.isSpecificId(c,"parseInt")||e.isSpecificMemberAccess(c,"Number","parseInt"))){const{system:s,literalPrefix:o}=t.get(l);n.report({node:i,messageId:"useLiteral",data:{system:s,functionName:r.getText(i.callee)},fix(t){if(r.getCommentsInside(i).length)return null;const n=`${o}${a}`;if(+n!==parseInt(a,l))return null;const s=r.getTokenBefore(i),c=r.getTokenAfter(i);let u="",p="";return s&&s.range[1]===i.range[0]&&!e.canTokensBeAdjacent(s,n)&&(u=" "),c&&i.range[1]===c.range[0]&&!e.canTokensBeAdjacent(n,c)&&(p=" "),t.replaceText(i,`${u}${n}${p}`)}})}var c}}}},LM}function VN(){if(jM)return MM;jM=1;const e=Pw();return MM={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(t){const n=t.sourceCode;return{CallExpression(r){if("MemberExpression"!==r.callee.type||"MemberExpression"!==r.callee.object.type)return;const i=e.getStaticPropertyName(r.callee),s=e.getStaticPropertyName(r.callee.object),o=function(t){if("ObjectExpression"===t.object.type&&0===t.object.properties.length)return!0;const n="MemberExpression"===t.object.type&&"prototype"===e.getStaticPropertyName(t.object)?t.object.object:t.object;return"Identifier"===n.type&&"Object"===n.name}(r.callee.object),a=n.getScope(r),l=e.getVariableByName(a,"Object");"call"===i&&"hasOwnProperty"===s&&o&&l&&"global"===l.scope.type&&t.report({node:r,messageId:"useHasOwn",fix(t){if(n.getCommentsInside(r.callee).length>0)return null;const i=n.getTokenBefore(r.callee,{includeComments:!0});return i&&i.range[1]===r.callee.range[0]&&!e.canTokensBeAdjacent(i,"Object.hasOwn")?t.replaceText(r.callee," Object.hasOwn"):t.replaceText(r.callee,"Object.hasOwn")}})}}}},MM}function KN(){if(FM)return NM;FM=1;const{CALL:e,ReferenceTracker:t}=rS(),{isCommaToken:n,isOpeningParenToken:r,isClosingParenToken:i,isParenthesised:s}=Pw(),o=/\s/u;function a(e){return e.arguments.some((e=>"SpreadElement"===e.type))}function l(e){return"Property"===e.type&&("get"===e.kind||"set"===e.kind)}function c(e){return e.properties.some(l)}function u(e){return e.arguments.filter((e=>"ObjectExpression"===e.type)).some(c)}function p(e,t){switch(e.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!s(t,e);default:return!1}}function d(e,t,n){const s=[n.getFirstToken(e),n.getLastToken(e)];let o=n.getTokenBefore(e),a=n.getTokenAfter(e);for(;o&&a&&o.range[0]>t.range[0]&&r(o)&&i(a);)s.push(o,a),o=n.getTokenBefore(o),a=n.getTokenAfter(a);return s.sort(((e,t)=>e.range[0]-t.range[0]))}function f(e,t){const n=t.text;let r=e.range[0];{const n=t.getTokenBefore(e,{includeComments:!0});if(n&&"Line"===n.type)return r}for(;o.test(n[r-1]||"");)r-=1;return r}function h(e,t){const n=t.text;let r=e.range[1];for(;o.test(n[r]||"");)r+=1;return r}function m(e,t){return function*(i){const o=t.getTokenAfter(e.callee,r),a=t.getLastToken(e);yield i.removeRange([e.range[0],o.range[0]]),!function(e,t){const n=e.parent;switch(n.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return n.left===e&&!s(t,e);default:return!s(t,e)}}(e,t)?(yield i.replaceText(o,"{"),yield i.replaceText(a,"}")):(yield i.replaceText(o,"({"),yield i.replaceText(a,"})"));for(const r of e.arguments){const e=d(r,o,t),s=e.shift(),a=e.pop();if("ObjectExpression"===r.type){const o=t.getLastToken(r,1),l=t.getTokenAfter(a);for(const t of e)yield i.remove(t);const c=[s.range[0],h(s,t)],u=[Math.max(f(a,t),c[1]),a.range[1]];yield i.removeRange(c),yield i.removeRange(u),(0===r.properties.length||n(o))&&n(l)&&(yield i.remove(l))}else p(r,t)?(yield i.insertTextBefore(s,"...("),yield i.insertTextAfter(a,")")):yield i.insertTextBefore(s,"...")}}}return NM={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(n){const r=n.sourceCode;return{Program(i){const s=r.getScope(i),o=new t(s),l={Object:{assign:{[e]:!0}}};for(const{node:e}of o.iterateGlobalReferences(l))if(e.arguments.length>=1&&"ObjectExpression"===e.arguments[0].type&&!a(e)&&!(e.arguments.length>1&&u(e))){const t=1===e.arguments.length?"useLiteralMessage":"useSpreadMessage",i=m(e,r);n.report({node:e,messageId:t,fix:i})}}}}},NM}function WN(){if(VM)return UM;VM=1;const e=Pw();return UM={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(t){const n=t.options.length&&t.options[0].allowEmptyReject,r=t.sourceCode;function i(r){!r.arguments.length&&n||r.arguments.length&&e.couldBeError(r.arguments[0])&&("Identifier"!==r.arguments[0].type||"undefined"!==r.arguments[0].name)||t.report({node:r,messageId:"rejectAnError"})}return{CallExpression(t){(function(t){return e.isSpecificMemberAccess(t.callee,"Promise","reject")})(t)&&i(t)},"NewExpression:exit"(t){"Identifier"===t.callee.type&&"Promise"===t.callee.name&&t.arguments.length&&e.isFunction(t.arguments[0])&&t.arguments[0].params.length>1&&"Identifier"===t.arguments[0].params[1].type&&r.getDeclaredVariables(t.arguments[0]).find((e=>e.name===t.arguments[0].params[1].name)).references.filter((e=>e.isRead())).filter((e=>"CallExpression"===e.identifier.parent.type&&e.identifier===e.identifier.parent.callee)).forEach((e=>i(e.identifier.parent)))}}}},UM}function $N(){if(qM)return $M;qM=1;const e=Pw(),{CALL:t,CONSTRUCT:n,ReferenceTracker:r,findVariable:i}=rS(),{RegExpValidator:s,visitRegExpAST:o,RegExpParser:a}=Tj(),{canTokensBeAdjacent:l}=Pw(),{REGEXPP_LATEST_ECMA_VERSION:c}=zj();function u(e){return"Literal"===e.type&&"string"==typeof e.value}function p(e){return"Literal"===e.type&&Object.prototype.hasOwnProperty.call(e,"regex")}const d=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return $M={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:h=!1}={}]=f.options,m=f.sourceCode;function g(t){return"TaggedTemplateExpression"===t.type&&e.isSpecificMemberAccess(t.tag,"String","raw")&&function(e){const t=m.getScope(e),n=i(t,e);return null!==n&&"global"===n.scope.type&&0===n.defs.length}(e.skipChainExpression(t.tag).object)&&e.isStaticTemplateLiteral(t.quasi)}function y(t){return u(t)?t.value:e.isStaticTemplateLiteral(t)?t.quasis[0].value.cooked:g(t)?t.quasi.quasis[0].value.raw:null}function _(t){return u(t)||e.isStaticTemplateLiteral(t)||g(t)}function b(e){const t=e.arguments;return!(1!==t.length&&2!==t.length||!t.every(_))}function v(e){const t=e.arguments;return!(1!==t.length||!p(t[0]))||!(2!==t.length||!p(t[0])||!_(t[1]))}const E=(x=f.languageOptions.ecmaVersion)<=5?5:Math.min(x,c);var x;function S(e){switch(e){case"\n":case"\\\n":return"\\n";case"\r":case"\\\r":return"\\r";case"\t":case"\\\t":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function O(e,t){return[...e].sort().join("")===[...t].sort().join("")}function T(e,t,n){const r=m.getTokenBefore(e);return 0===m.getCommentsInside(e).length&&(!r||d.has(r.value))&&function(e,t){const n=new s({ecmaVersion:E});try{return n.validatePattern(e,0,e.length,{unicode:!!t&&t.includes("u"),unicodeSets:!!t&&t.includes("v")}),t&&n.validateFlags(t),!0}catch{return!1}}(t,n)}function w(e,t){const n=m.getTokenBefore(e),r=m.getTokenAfter(e);return(n&&!l(n,t)&&n.range[1]===e.range[0]?" ":"")+t+(r&&!l(t,r)&&e.range[1]===r.range[0]?" ":"")}return{Program(e){const i=m.getScope(e),s=new r(i),l={RegExp:{[t]:!0,[n]:!0}};for(const{node:e}of s.iterateGlobalReferences(l))if(h&&v(e)){const t=e.arguments[0];if(2===e.arguments.length){const n=[],r=y(e.arguments[1])||"";T(e,t.regex.pattern,r)&&n.push({messageId:"replaceWithLiteralAndFlags",pattern:t.regex.pattern,flags:r});const i=t.regex.flags||"",s=(c=i,u=r,[...new Set([...c,...u])].join(""));!O(s,r)&&T(e,t.regex.pattern,s)&&n.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:t.regex.pattern,flags:s}),f.report({node:e,messageId:"unexpectedRedundantRegExpWithFlags",suggest:n.map((({flags:t,pattern:n,messageId:r})=>({messageId:r,data:{flags:t},fix(r){return r.replaceText(e,w(e,`/${n}/${t}`))}})))})}else{const n=[];T(e,t.regex.pattern,t.regex.flags)&&n.push(m.getText(t)),f.report({node:e,messageId:"unexpectedRedundantRegExp",suggest:n.map((t=>({messageId:"replaceWithLiteral",fix(n){return n.replaceText(e,w(e,t))}})))})}}else if(b(e)){let t,n=y(e.arguments[0]),r=!1;if(e.arguments[1]&&(t=y(e.arguments[1])),T(e,n,t)||(r=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>e+r.slice(t.range[1],n[i+1].range[0])),"")}function p(e,n,r){if("Literal"===e.type&&"string"==typeof e.value)return`\`${e.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,(e=>e.lastIndexOf("\\")%2?`\\${e}`:e)).replace(new RegExp(`\\\\${e.raw[0]}`,"gu"),e.raw[0])}\``;if("TemplateLiteral"===e.type)return l.getText(e);if(t(e)&&i(e)){const t=l.getFirstTokenBetween(e.left,e.right,(e=>"+"===e.value)),i=u(e.left,t),s=u(t,e.right),a=function(e){return"BinaryExpression"===e.type?o(e.right):"TemplateLiteral"===e.type?e.expressions.length&&e.quasis.length&&e.quasis[e.quasis.length-1].range[0]===e.quasis[e.quasis.length-1].range[1]:"Literal"!==e.type||"string"!=typeof e.value}(e.left),c=o(e.right);return a?p(e.left,n,i+s).slice(0,-1)+p(e.right,null,r).slice(1):c?p(e.left,n,null).slice(0,-1)+p(e.right,i+s,r).slice(1):`${p(e.left,n,null)}${i}+${s}${p(e.right,r,null)}`}return`\`\${${n||""}${l.getText(e)}${r||""}}\``}function d(e,t){const i=n(t.parent);return r(i)?null:e.replaceText(i,p(i,null,null))}function f(r){if(!e.isStringLiteral(r)||!t(r.parent))return;const i=n(r.parent);c[i.range[0]]||(c[i.range[0]]=!0,s(i)&&a.report({node:i,messageId:"unexpectedStringConcatenation",fix:e=>d(e,r)}))}return{Program(){c=Object.create(null)},Literal:f,TemplateLiteral:f}}},ZM}function zN(){if(JM)return HM;JM=1;const e=bv(),t=Pw(),n=ok();return HM={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(r){const i=r.options[0],s=r.options[1]&&r.options[1].keywords,o=!r.options[1]||!1!==r.options[1].unnecessary,a=r.options[1]&&r.options[1].numbers,l=r.sourceCode;function c(e){return n.includes(e)}function u(e,t,n){return 1===t.length&&0===t[0].start&&t[0].end===e.length&&(["Identifier","Keyword","Null","Boolean"].includes(t[0].type)||"Numeric"===t[0].type&&!n&&String(+t[0].value)===t[0].value)}function p(e){return"Identifier"===e.type?e.name:e.value}function d(e){return"Literal"===e.type&&"string"==typeof e.value?l.getText(e):`"${"Identifier"===e.type?e.name:e.value}"`}function f(t,n){const i=[],o=[];let a=null,l=!1;t.properties.forEach((t=>{const r=t.key;if(r&&!t.method&&!t.computed&&!t.shorthand)if("Literal"===r.type&&"string"==typeof r.value){if(i.push(t),n){let t;try{t=e.tokenize(r.value)}catch{return void(l=!0)}l=l||!u(r.value,t)||s&&c(t[0].value)}}else s&&n&&"Identifier"===r.type&&c(r.name)?(o.push(t),l=!0,a=r.name):o.push(t)})),n&&i.length&&!l?i.forEach((e=>{r.report({node:e,messageId:"redundantQuoting",fix:t=>t.replaceText(e.key,p(e.key))})})):o.length&&a?o.forEach((e=>{r.report({node:e,messageId:"requireQuotesDueToReservedWord",data:{property:a},fix:t=>t.replaceText(e.key,d(e.key))})})):i.length&&o.length&&o.forEach((e=>{r.report({node:e,messageId:"inconsistentlyQuotedProperty",data:{key:e.key.name||e.key.value},fix:t=>t.replaceText(e.key,d(e.key))})}))}return{Property(n){"always"!==i&&i||function(e){const t=e.key;e.method||e.computed||e.shorthand||"Literal"===t.type&&"string"==typeof t.value||r.report({node:e,messageId:"unquotedPropertyFound",data:{property:t.name||t.value},fix:e=>e.replaceText(t,d(t))})}(n),"as-needed"===i&&function(n){const i=n.key;if(!(n.method||n.computed||n.shorthand))if("Literal"===i.type&&"string"==typeof i.value){let t;try{t=e.tokenize(i.value)}catch{return}if(1!==t.length)return;if(c(t[0].value)&&s)return;o&&u(i.value,t,a)&&r.report({node:n,messageId:"unnecessarilyQuotedProperty",data:{property:i.value},fix:e=>e.replaceText(i,p(i))})}else s&&"Identifier"===i.type&&c(i.name)?r.report({node:n,messageId:"unquotedReservedProperty",data:{property:i.name},fix:e=>e.replaceText(i,d(i))}):a&&"Literal"===i.type&&t.isNumericLiteral(i)&&r.report({node:n,messageId:"unquotedNumericProperty",data:{property:i.value},fix:e=>e.replaceText(i,d(i))})}(n)},ObjectExpression(e){"consistent"===i&&f(e,!1),"consistent-as-needed"===i&&f(e,!0)}}}},HM}function XN(){if(tj)return ej;tj=1;const e=Pw(),t={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},n=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(e.LINEBREAKS).join("")}]`,"u");t.double.convert=t.single.convert=t.backtick.convert=function(e){const t=this.quote,n=e[0];return t===n?e:t+e.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,((e,r,i)=>r===n||"`"===n&&"${"===r?r:e===t||"`"===t&&"${"===e?`\\${e}`:i&&"`"===n?"\\n":e))+t};return ej={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(r){const i=r.options[0],s=t[i||"double"],o=r.options[1],a=o&&!0===o.allowTemplateLiterals,l=r.sourceCode;let c=o&&!0===o.avoidEscape;function u(t){return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&!e.isParenthesised(l,t.expression)}function p(t){const n=t.parent;switch(n.type){case"ExpressionStatement":return!e.isParenthesised(l,t)&&function(t){if(!e.isTopLevelExpressionStatement(t.parent))return!1;const n=t.parent.parent;for(let e=0;e0||!!(e.quasis.length>=1&&n.test(e.quasis[0].value.raw)))}(t)||r.report({node:t,messageId:"wrongQuotes",data:{description:s.description},fix(n){return e.isTopLevelExpressionStatement(t.parent)&&!e.isParenthesised(l,t)?null:n.replaceText(t,s.convert(l.getText(t)))}})}}}},ej}function GN(){if(rj)return nj;rj=1;const e=Pw(),t="always",n=new Set(Array.from({length:35},((e,t)=>t+2)));function r(e){return e.defs.length>=1}return nj={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(i){const s=i.options[0]||t,o=i.sourceCode;function a(e){const r=e.arguments;switch(r.length){case 0:i.report({node:e,messageId:"missingParameters"});break;case 1:s===t&&i.report({node:e,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(t){const n=o.getTokens(e),r=n[n.length-1],i=n[n.length-2],s="Punctuator"===i.type&&","===i.value;return t.insertTextBefore(r,s?" 10,":", 10")}}]});break;default:"as-needed"===s&&function(e){return"Literal"===e.type&&10===e.value}(r[1])?i.report({node:e,messageId:"redundantRadix"}):function(e){return!("Literal"===e.type&&!n.has(e.value)||"Identifier"===e.type&&"undefined"===e.name)}(r[1])||i.report({node:e,messageId:"invalidRadix"})}}return{"Program:exit"(t){const n=o.getScope(t);let i;i=e.getVariableByName(n,"parseInt"),i&&!r(i)&&i.references.forEach((t=>{const n=t.identifier;e.isCallee(n)&&a(n.parent)})),i=e.getVariableByName(n,"Number"),i&&!r(i)&&i.references.forEach((t=>{const n=t.identifier.parent,r="ChainExpression"===n.parent.type?n.parent:n;(function(e){return"MemberExpression"===e.type&&!e.computed&&"Identifier"===e.property.type&&"parseInt"===e.property.name})(n)&&e.isCallee(r)&&a(r.parent)}))}}}},nj}function ZN(){return cj||(cj=1,lj={meta:{type:"suggestion",docs:{description:"Require JSDoc comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-jsdoc"},schema:[{type:"object",properties:{require:{type:"object",properties:{ClassDeclaration:{type:"boolean",default:!1},MethodDefinition:{type:"boolean",default:!1},FunctionDeclaration:{type:"boolean",default:!0},ArrowFunctionExpression:{type:"boolean",default:!1},FunctionExpression:{type:"boolean",default:!1}},additionalProperties:!1,default:{}}},additionalProperties:!1}],deprecated:!0,replacedBy:[],messages:{missingJSDocComment:"Missing JSDoc comment."}},create(e){const t=e.sourceCode,n=Object.assign({FunctionDeclaration:!0,MethodDefinition:!1,ClassDeclaration:!1,ArrowFunctionExpression:!1,FunctionExpression:!1},e.options[0]&&e.options[0].require);function r(n){t.getJSDocComment(n)||function(t){e.report({node:t,messageId:"missingJSDocComment"})}(n)}return{FunctionDeclaration(e){n.FunctionDeclaration&&r(e)},FunctionExpression(e){(n.MethodDefinition&&"MethodDefinition"===e.parent.type||n.FunctionExpression&&("VariableDeclarator"===e.parent.type||"Property"===e.parent.type&&e===e.parent.value))&&r(e)},ClassDeclaration(e){n.ClassDeclaration&&r(e)},ArrowFunctionExpression(e){n.ArrowFunctionExpression&&"VariableDeclarator"===e.parent.type&&r(e)}}}}),lj}function YN(){if(yj)return gj;yj=1;const e=Aj(),t=Pw();return gj={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(n){const r=/^[-[(/+`]/u,i=new Set(["get","set","static"]),s=new Set(["*","in","instanceof"]),o=n.options[1],a="never"===n.options[0],l=Boolean(o&&o.omitLastInOneLineBlock),c=Boolean(o&&o.omitLastInOneLineClassBody),u=o&&o.beforeStatementContinuationChars||"any",p=n.sourceCode;function d(r,i){const s=p.getLastToken(r);let o,a,l;i?(o="extraSemi",l=s.loc,a=function(t){return new e(t,p).retainSurroundingTokens(s).remove(s)}):(o="missingSemi",l={start:s.loc.end,end:t.getNextLocation(p,s.loc.end)},a=function(e){return e.insertTextAfter(s,";")}),n.report({node:r,loc:l,messageId:o,fix:a})}function f(e){const n=e.type;return"DoWhileStatement"!==n&&"BreakStatement"!==n&&"ContinueStatement"!==n&&"DebuggerStatement"!==n&&"ImportDeclaration"!==n&&"ExportAllDeclaration"!==n&&("ReturnStatement"===n?Boolean(e.argument):"ExportNamedDeclaration"===n?Boolean(e.declaration):!function(e){if(!t.isClosingBraceToken(e))return!1;const n=p.getNodeByRangeIndex(e.range[0]);return"BlockStatement"===n.type&&"ArrowFunctionExpression"===n.parent.type}(p.getLastToken(e,1)))}function h(e){return Boolean(e)&&r.test(e.value)&&"++"!==e.value&&"--"!==e.value}function m(e){return!!function(e){const n=p.getTokenAfter(e);return!n||t.isClosingBraceToken(n)||t.isSemicolonToken(n)}(p.getLastToken(e))||!function(e){if("PropertyDefinition"!==e.type)return!1;if(!e.computed&&"Identifier"===e.key.type&&i.has(e.key.name)&&!(e.static&&"static"===e.key.name||e.value))return!0;const t=p.getTokenAfter(e);return s.has(t.value)}(e)&&(!function(e){const n=p.getLastToken(e,1),r=p.getTokenAfter(e);return!!r&&t.isTokenOnSameLine(n,r)}(e)&&("PropertyDefinition"!==e.type&&"never"===u&&!f(e)||!h(p.getTokenAfter(e))))}function g(e){const n=t.isSemicolonToken(p.getLastToken(e));if(a)n&&m(e)?d(e,!0):!n&&"always"===u&&"PropertyDefinition"!==e.type&&h(p.getTokenAfter(e))&&d(e);else{const t=l&&function(e){const t=e.parent,n=p.getTokenAfter(e);if(!n||"}"!==n.value)return!1;if("BlockStatement"===t.type)return t.loc.start.line===t.loc.end.line;if("StaticBlock"===t.type)return p.getFirstToken(t,{skip:1}).loc.start.line===t.loc.end.line;return!1}(e),r=c&&function(e){const t=e.parent,n=p.getTokenAfter(e);return!(!n||"}"!==n.value)&&"ClassBody"===t.type&&t.loc.start.line===t.loc.end.line}(e),i=t||r;n&&i?d(e,!0):n||i||d(e)}}return{VariableDeclaration:function(e){const t=e.parent;"ForStatement"===t.type&&t.init===e||/^For(?:In|Of)Statement/u.test(t.type)&&t.left===e||g(e)},ExpressionStatement:g,ReturnStatement:g,ThrowStatement:g,DoWhileStatement:g,DebuggerStatement:g,BreakStatement:g,ContinueStatement:g,ImportDeclaration:g,ExportAllDeclaration:g,ExportNamedDeclaration(e){e.declaration||g(e)},ExportDefaultDeclaration(e){/(?:Class|Function)Declaration/u.test(e.declaration.type)||g(e)},PropertyDefinition:g}}},gj}function HN(){if(bj)return _j;bj=1;const e=Pw();return _j={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(t){const n=t.options[0],r=t.sourceCode;let i=!1,s=!0;function o(n,o){if(e.isSemicolonToken(n)){if(function(t){const n=r.getTokenBefore(t);return n&&e.isTokenOnSameLine(n,t)&&r.isSpaceBetweenTokens(n,t)}(n)){if(!i){const e=r.getTokenBefore(n),i={start:e.loc.end,end:n.loc.start};t.report({node:o,loc:i,messageId:"unexpectedWhitespaceBefore",fix(t){return t.removeRange([e.range[1],n.range[0]])}})}}else if(i){const e=n.loc;t.report({node:o,loc:e,messageId:"missingWhitespaceBefore",fix(e){return e.insertTextBefore(n," ")}})}if(!function(t){const n=r.getTokenBefore(t);return!(n&&e.isTokenOnSameLine(t,n))}(n)&&!function(t){const n=r.getTokenAfter(t);return!(n&&e.isTokenOnSameLine(t,n))}(n)&&!function(t){const n=r.getTokenAfter(t);return n&&e.isClosingBraceToken(n)||e.isClosingParenToken(n)}(n))if(function(t){const n=r.getTokenAfter(t);return n&&e.isTokenOnSameLine(t,n)&&r.isSpaceBetweenTokens(t,n)}(n)){if(!s){const e=r.getTokenAfter(n),i={start:n.loc.end,end:e.loc.start};t.report({node:o,loc:i,messageId:"unexpectedWhitespaceAfter",fix(t){return t.removeRange([n.range[1],e.range[0]])}})}}else if(s){const e=n.loc;t.report({node:o,loc:e,messageId:"missingWhitespaceAfter",fix(e){return e.insertTextAfter(n," ")}})}}}function a(e){o(r.getLastToken(e),e)}return"object"==typeof n&&(i=n.before,s=n.after),{VariableDeclaration:a,ExpressionStatement:a,BreakStatement:a,ContinueStatement:a,DebuggerStatement:a,DoWhileStatement:a,ReturnStatement:a,ThrowStatement:a,ImportDeclaration:a,ExportNamedDeclaration:a,ExportAllDeclaration:a,ExportDefaultDeclaration:a,ForStatement(e){e.init&&o(r.getTokenAfter(e.init),e),e.test&&o(r.getTokenAfter(e.test),e)},PropertyDefinition:a}}},_j}function JN(){return Sj||(Sj=1,xj={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(e){const t=e.options[0]||{},n=t.ignoreCase||!1,r=t.ignoreDeclarationSort||!1,i=t.ignoreMemberSort||!1,s=t.memberSyntaxSortOrder||["none","all","multiple","single"],o=t.allowSeparatedGroups||!1,a=e.sourceCode;let l=null;function c(e){return s.indexOf(function(e){return 0===e.specifiers.length?"none":"ImportNamespaceSpecifier"===e.specifiers[0].type?"all":1===e.specifiers.length?"single":"multiple"}(e))}function u(e){return e.specifiers[0]?e.specifiers[0].local.name:null}return{ImportDeclaration(t){if(!r){if(l&&o&&(p=l,d=t,Math.max(d.loc.start.line-p.loc.end.line-1,0)>0)&&(l=null),l){const r=c(t),i=c(l);let o=u(t),a=u(l);n&&(a=a&&a.toLowerCase(),o=o&&o.toLowerCase()),r!==i?r"ImportSpecifier"===e.type)),i=n?e=>e.local.name.toLowerCase():e=>e.local.name,s=r.map(i).findIndex(((e,t,n)=>n[t-1]>e));-1!==s&&e.report({node:r[s],messageId:"sortMembersAlphabetically",data:{memberName:r[s].local.name},fix(e){return r.some((e=>a.getCommentsBefore(e).length||a.getCommentsAfter(e).length))?null:e.replaceTextRange([r[0].range[0],r[r.length-1].range[1]],r.slice().sort(((e,t)=>i(e)>i(t)?1:-1)).reduce(((e,t,n)=>{const i=n===r.length-1?"":a.getText().slice(r[n].range[1],r[n+1].range[0]);return e+a.getText(t)+i}),""))}})}}}}}),xj}var eF,tF,nF,rF,iF,sF,oF,aF,lF,cF,uF,pF,dF,fF,hF,mF,gF,yF,_F,bF,vF,EF,xF,SF,OF,TF,wF,CF,AF,PF,kF,DF={exports:{}};function RF(){if(eF)return DF.exports;eF=1;var e=function(e,t){var n,r,i=1,s=0,o=0,a=String.alphabet;function l(e,t,r){if(r){for(n=t;(r=l(e,n))<76&&r>65;)++n;return+e.slice(t-1,n)}return(r=a&&a.indexOf(e.charAt(t)))>-1?r+76:(r=e.charCodeAt(t)||0)<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63}if((e+="")!=(t+=""))for(;i;)if(r=l(e,s++),i=l(t,o++),r<76&&i<76&&r>66&&i>66&&(r=l(e,s,s),i=l(t,o,s=n),o=n),r!=i)return r{const n=h[t-1];n&&e.loc.start.line-n.loc.end.line>1&&(m=!0)})),!m&&n.loc.start.line-h[h.length-1].loc.end.line>1&&(m=!0),!m&&h[0].loc.start.line-u.prevNode.loc.end.line>1&&(m=!0)),u.prevNode=n,null!==f&&(u.prevName=f),l&&m?u.prevBlankLine=null===f:null===i||null===f||d0?i.getTokenBefore(t[0]):i.getLastToken(e,1),p(n)}}}},sF}function BF(){if(lF)return aF;lF=1;const e=Pw();return aF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(t){const n=t.sourceCode,r="string"==typeof t.options[0]?t.options[0]:"always",i="object"==typeof t.options[0]?t.options[0]:{};function s(s){const o=function(t){if("ArrowFunctionExpression"===t.type){if(t.async&&e.isOpeningParenToken(n.getFirstToken(t,{skip:1})))return i.asyncArrow||r}else{if(function(e){if(e.id)return!0;const t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&("get"===t.kind||"set"===t.kind||t.method)}(t))return i.named||r;if(!t.generator)return i.anonymous||r}return"ignore"}(s);if("ignore"===o)return;const a=n.getFirstToken(s,e.isOpeningParenToken),l=n.getTokenBefore(a),c=n.isSpaceBetweenTokens(l,a);c&&"never"===o?t.report({node:s,loc:{start:l.loc.end,end:a.loc.start},messageId:"unexpectedSpace",fix(e){const t=n.getCommentsBefore(a);return t.some((e=>"Line"===e.type))?null:e.replaceTextRange([l.range[1],a.range[0]],t.reduce(((e,t)=>e+n.getText(t)),""))}}):c||"always"!==o||t.report({node:s,loc:a.loc,messageId:"missingSpace",fix:e=>e.insertTextAfter(l," ")})}return{ArrowFunctionExpression:s,FunctionDeclaration:s,FunctionExpression:s}}},aF}function MF(){if(uF)return cF;uF=1;const e=Pw();return cF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(t){const n="always"===t.options[0],r=t.options[1]&&t.options[1].exceptions||[],i={};let s;r.length&&(i.braceException=r.includes("{}"),i.bracketException=r.includes("[]"),i.parenException=r.includes("()"),i.empty=r.includes("empty"));const o=t.sourceCode;function a(e){return s.openers.includes(e.value)}function l(e){return s.closers.includes(e.value)}return{Program:function(r){s=function(){const e=[],t=[];return i.braceException&&(e.push("{"),t.push("}")),i.bracketException&&(e.push("["),t.push("]")),i.parenException&&(e.push("("),t.push(")")),i.empty&&(e.push(")"),t.push("(")),{openers:e,closers:t}}();const c=o.tokensAndComments;c.forEach(((s,u)=>{const p=c[u-1],d=c[u+1];var f,h,m,g;(e.isOpeningParenToken(s)||e.isClosingParenToken(s))&&("("!==s.value||(f=s,h=d,o.isSpaceBetweenTokens(f,h)||!i.empty&&e.isClosingParenToken(h)||(n?a(h):!a(h)))||t.report({node:r,loc:s.loc,messageId:"missingOpeningSpace",fix(e){return e.insertTextAfter(s," ")}}),"("===s.value&&function(t,r){return!!e.isTokenOnSameLine(t,r)&&"Line"!==r.type&&!!o.isSpaceBetweenTokens(t,r)&&(n?a(r):!a(r))}(s,d)&&t.report({node:r,loc:{start:s.loc.end,end:d.loc.start},messageId:"rejectedOpeningSpace",fix(e){return e.removeRange([s.range[1],d.range[0]])}}),")"!==s.value||(m=p,g=s,o.isSpaceBetweenTokens(m,g)||!i.empty&&e.isOpeningParenToken(m)||(n?l(m):!l(m)))||t.report({node:r,loc:s.loc,messageId:"missingClosingSpace",fix(e){return e.insertTextBefore(s," ")}}),")"===s.value&&function(t,r){return!!e.isTokenOnSameLine(t,r)&&!!o.isSpaceBetweenTokens(t,r)&&(n?l(t):!l(t))}(p,s)&&t.report({node:r,loc:{start:p.loc.end,end:s.loc.start},messageId:"rejectedClosingSpace",fix(e){return e.removeRange([p.range[1],s.range[0]])}}))}))}}}},cF}function jF(){if(_F)return yF;_F=1;const e=Pw();function t(e){const t=[];for(let n=0;nt.remove(e)}function u(e,t,r,i,s){e.slice(t,r).forEach((e=>{n.report({node:e,messageId:i,fix:s?c(e):null})}))}function p(e,t,n){u(e,0,e.length,t,n)}function d(e,t,n){u(e,1,e.length,t,n)}function f(){s.pop()}function h(i){const u="BlockStatement"===i.body.type?t(i.body.body):[];"function"===a?function(t,i){const a=o.length>0,l=0===s.length&&0===o.length,u=s.length>0&&s[s.length-1],p=i.length>0;p?(r(t.params)?u?n.report({node:i[0],messageId:"unnecessary",fix:c(i[0])}):a&&n.report({node:i[0],messageId:"unnecessaryInClasses",fix:c(i[0])}):n.report({node:i[0],messageId:"nonSimpleParameterList"}),d(i,"multiple",!0)):l&&(r(t.params)?n.report({node:t,messageId:"function"}):n.report({node:t,messageId:"wrap",data:{name:e.getFunctionNameWithKind(t)}})),s.push(u||p)}(i,u):u.length>0&&(r(i.params)?p(u,a,l(a)):(n.report({node:u[0],messageId:"nonSimpleParameterList"}),d(u,"multiple",!0)))}i.impliedStrict?a="implied":"safe"===a&&(a=i.globalReturn||"commonjs"===n.languageOptions.sourceType?"global":"function");const m={Program(e){const r=t(e.body);"module"===e.sourceType&&(a="module"),"global"===a?(e.body.length>0&&0===r.length&&n.report({node:e,messageId:"global"}),d(r,"multiple",!0)):p(r,a,l(a))},FunctionDeclaration:h,FunctionExpression:h,ArrowFunctionExpression:h};return"function"===a&&Object.assign(m,{ClassBody(){o.push(!0)},"ClassBody:exit"(){o.pop()},"FunctionDeclaration:exit":f,"FunctionExpression:exit":f,"ArrowFunctionExpression:exit":f}),m}},yF}function NF(){if(vF)return bF;vF=1;const e=Pw();return bF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=!0===r.before,s=!1!==r.after;function o(t,r,i){return e.isClosingBraceToken(r)||!e.isTokenOnSameLine(t,r)||n.isSpaceBetweenTokens(t,r)===i}function a(t,r,i,s){return function(t,r){return null!==n.getFirstTokenBetween(t,r,{includeComments:!0,filter:e.isCommentToken})}(r,i)?null:s?t.insertTextAfter(r," "):t.removeRange([r.range[1],i.range[0]])}return{SwitchCase(r){const l=e.getSwitchCaseColonToken(r,n),c=n.getTokenBefore(l),u=n.getTokenAfter(l);o(c,l,i)||t.report({node:r,loc:l.loc,messageId:i?"expectedBefore":"unexpectedBefore",fix:e=>a(e,c,l,i)}),o(l,u,s)||t.report({node:r,loc:l.loc,messageId:s?"expectedAfter":"unexpectedAfter",fix:e=>a(e,l,u,s)})}}}},bF}function FF(){if(xF)return EF;xF=1;const e=Pw();return EF={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(t){const n=t.sourceCode;return{"Program:exit"(r){const i=n.getScope(r),s=e.getVariableByName(i,"Symbol");s&&0===s.defs.length&&s.references.forEach((n=>{const r=n.identifier;e.isCallee(r)&&function(e){0===e.arguments.length&&t.report({node:e,messageId:"expected"})}(r.parent)}))}}}},EF}function UF(){if(OF)return SF;OF=1;const e=Pw();return SF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(t){const n=t.sourceCode,r="always"===t.options[0];return{TemplateElement(i){const s=n.getFirstToken(i);!function(i){if(!i.value.startsWith("}"))return;const s=n.getTokenBefore(i,{includeComments:!0}),o=n.isSpaceBetween(s,i);e.isTokenOnSameLine(s,i)&&(r&&!o&&t.report({loc:{start:i.loc.start,end:{line:i.loc.start.line,column:i.loc.start.column+1}},messageId:"expectedBefore",fix:e=>e.insertTextBefore(i," ")}),!r&&o&&t.report({loc:{start:s.loc.end,end:i.loc.start},messageId:"unexpectedBefore",fix:e=>e.removeRange([s.range[1],i.range[0]])}))}(s),function(i){if(!i.value.endsWith("${"))return;const s=n.getTokenAfter(i,{includeComments:!0}),o=n.isSpaceBetween(i,s);e.isTokenOnSameLine(i,s)&&(r&&!o&&t.report({loc:{start:{line:i.loc.end.line,column:i.loc.end.column-2},end:i.loc.end},messageId:"expectedAfter",fix:e=>e.insertTextAfter(i," ")}),!r&&o&&t.report({loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpectedAfter",fix:e=>e.removeRange([i.range[1],s.range[0]])}))}(s)}}}},SF}var VF,KF,WF,$F,qF,QF,zF,XF,GF,ZF,YF,HF,JF,eU,tU,nU,rU,iU,sU,oU,aU,lU,cU,uU,pU,dU,fU,hU={},mU={},gU={},yU="3.0.0";function _U(){return VF||(VF=1,function(){var e,t;function n(e){this.name="DoctrineError",this.message=e}e=yU,gU.VERSION=e,n.prototype=((t=function(){}).prototype=Error.prototype,new t),n.prototype.constructor=n,gU.DoctrineError=n,gU.throwError=function(e){throw new n(e)},gU.assert=Fb}()),gU}function bU(){return KF||(KF=1,function(){var e,t,n,r,i,s,o,a,l,c,u,p;function d(e){return-1==="><(){}[],:*|?!=".indexOf(String.fromCharCode(e))&&!l.code.isWhiteSpace(e)&&!l.code.isLineTerminator(e)}function f(e,t,n,r){this._previous=e,this._index=t,this._token=n,this._value=r}function h(e,t){return p&&(e.range=[t[0]+u,t[1]+u]),e}function m(){var e=n.charAt(i);return i+=1,e}function g(e){var t,s,o,a=0;for(s="u"===e?4:2,t=0;t=r)return o=t.EOF;switch(e=n.charCodeAt(i)){case 39:case 34:return o=function(){var e,s,o,u,p,d="";for(e=n.charAt(i),++i;i=0&&i=r)return t.ILLEGAL;if(60===n.charCodeAt(i+1))break}a+=m()}return t.NAME}())}}function b(e,t){c.assert(o===e,t||"consumed token not matched"),_()}function v(e,t){o!==e&&c.throwError(t||"unexpected token"),_()}function E(){var n,r=s;return n=function(){var e=a;return o===t.NAME||o===t.STRING?(_(),e):o===t.NUMBER?(b(t.NUMBER),String(e)):void c.throwError("unexpected token")}(),o===t.COLON?(b(t.COLON),h({type:e.FieldType,key:n,value:w()},[r,s])):h({type:e.FieldType,key:n,value:null},[r,s])}function x(){var n,r,l,c,u=i-a.length;return c=i-(l=a).length,v(t.NAME),o!==t.COLON||"module"!==l&&"external"!==l&&"event"!==l||(b(t.COLON),l+=":"+a,v(t.NAME)),n=h({type:e.NameExpression,name:l},[c,s]),o===t.DOT_LT||o===t.LT?(_(),r=function(){var e=[];for(e.push(C());o===t.COMMA;)b(t.COMMA),e.push(C());return e}(),v(t.GT),h({type:e.TypeApplication,expression:n,applications:r},[u,s])):n}function S(){for(var n,r,a,l=[],u=!1,p=!1,d=i-3;o!==t.RPAREN;)o===t.REST&&(b(t.REST),p=!0),r=s,(n=w()).type===e.NameExpression&&o===t.COLON&&(a=s-n.name.length,b(t.COLON),n=h({type:e.ParameterType,name:n.name,expression:w()},[a,s])),o===t.EQUAL?(b(t.EQUAL),n=h({type:e.OptionalType,expression:n},[r,s]),u=!0):u&&c.throwError("unexpected token"),p&&(n=h({type:e.RestType,expression:n},[d,s])),l.push(n),o!==t.RPAREN&&v(t.COMMA);return l}function O(){var n,r,l,u,p,d=i-a.length;return c.assert(o===t.NAME&&"function"===a,"FunctionType should start with 'function'"),b(t.NAME),v(t.LPAREN),n=!1,l=[],r=null,o!==t.RPAREN&&(o!==t.NAME||"this"!==a&&"new"!==a?l=S():(n="new"===a,b(t.NAME),v(t.COLON),r=x(),o===t.COMMA&&(b(t.COMMA),l=S()))),v(t.RPAREN),u=null,o===t.COLON&&(b(t.COLON,"ResultType should start with :"),u=o===t.NAME&&"void"===a?(b(t.NAME),{type:e.VoidLiteral}):w()),p=h({type:e.FunctionType,params:l,result:u},[d,s]),r&&(p.this=r,n&&(p.new=!0)),p}function T(){var n,r;switch(o){case t.STAR:return b(t.STAR),h({type:e.AllLiteral},[s-1,s]);case t.LPAREN:return function(){var n,r=i-1;if(b(t.LPAREN,"UnionType should start with ("),n=[],o!==t.RPAREN)for(;n.push(w()),o!==t.RPAREN;)v(t.PIPE);return b(t.RPAREN,"UnionType should end with )"),h({type:e.UnionType,elements:n},[r,s])}();case t.LBRACK:return function(){var n,r,a=i-1;for(b(t.LBRACK,"ArrayType should start with ["),n=[];o!==t.RBRACK;){if(o===t.REST){r=i-3,b(t.REST),n.push(h({type:e.RestType,expression:w()},[r,s]));break}n.push(w()),o!==t.RBRACK&&v(t.COMMA)}return v(t.RBRACK),h({type:e.ArrayType,elements:n},[a,s])}();case t.LBRACE:return function(){var n,r,s=i-1;if(b(t.LBRACE,"RecordType should start with {"),n=[],o===t.COMMA)b(t.COMMA);else for(;o!==t.RBRACE;)n.push(E()),o!==t.RBRACE&&v(t.COMMA);return r=i,v(t.RBRACE),h({type:e.RecordType,fields:n},[s,r])}();case t.NAME:if(r=i-a.length,"null"===a)return b(t.NAME),h({type:e.NullLiteral},[r,s]);if("undefined"===a)return b(t.NAME),h({type:e.UndefinedLiteral},[r,s]);if("true"===a||"false"===a)return b(t.NAME),h({type:e.BooleanLiteralType,value:"true"===a},[r,s]);if(n=f.save(),"function"===a)try{return O()}catch(e){n.restore()}return x();case t.STRING:return _(),h({type:e.StringLiteralType,value:a},[s-a.length-2,s]);case t.NUMBER:return _(),h({type:e.NumericLiteralType,value:a},[s-String(a).length,s]);default:c.throwError("unexpected token")}}function w(){var n,r;return o===t.QUESTION?(r=i-1,b(t.QUESTION),h(o===t.COMMA||o===t.EQUAL||o===t.RBRACE||o===t.RPAREN||o===t.PIPE||o===t.EOF||o===t.RBRACK||o===t.GT?{type:e.NullableLiteral}:{type:e.NullableType,expression:T(),prefix:!0},[r,s])):o===t.BANG?(r=i-1,b(t.BANG),h({type:e.NonNullableType,expression:T(),prefix:!0},[r,s])):(r=s,n=T(),o===t.BANG?(b(t.BANG),h({type:e.NonNullableType,expression:n,prefix:!1},[r,s])):o===t.QUESTION?(b(t.QUESTION),h({type:e.NullableType,expression:n,prefix:!1},[r,s])):o===t.LBRACK?(b(t.LBRACK),v(t.RBRACK,"expected an array-style type declaration ("+a+"[])"),h({type:e.TypeApplication,expression:h({type:e.NameExpression,name:"Array"},[r,s]),applications:[n]},[r,s])):n)}function C(){var n,r;if(n=w(),o!==t.PIPE)return n;for(r=[n],b(t.PIPE);r.push(w()),o===t.PIPE;)b(t.PIPE);return h({type:e.UnionType,elements:r},[0,i])}function A(t,n,r){var i,s,o;switch(t.type){case e.NullableLiteral:i="?";break;case e.AllLiteral:i="*";break;case e.NullLiteral:i="null";break;case e.UndefinedLiteral:i="undefined";break;case e.VoidLiteral:i="void";break;case e.UnionType:for(i=r?"":"(",s=0,o=t.elements.length;s=e)return null;if(91===_.charCodeAt(o)){if(!t)return null;r=!0,a=S()}if(a+=T(e),n)for(58!==_.charCodeAt(o)||"module"!==a&&"external"!==a&&"event"!==a||(a+=S(),a+=T(e)),91===_.charCodeAt(o)&&93===_.charCodeAt(o+1)&&(a+=S(),a+=S());46===_.charCodeAt(o)||47===_.charCodeAt(o)||35===_.charCodeAt(o)||45===_.charCodeAt(o)||126===_.charCodeAt(o);)a+=S(),a+=T(e);if(r){if(w(e),61===_.charCodeAt(o)){var l;a+=S(),w(e);for(var c=1;o=e||93!==_.charCodeAt(o))return null;a+=S()}return a}function A(e){return _===b?e:function(e,t){for(var n,r=e.replace(/^\/\*\*?/,""),i=0,s=new RegExp(m,"g");n=s.exec(r);)if(i+=n[1].length,n.index+n[0].length>t+i)return t+i+e.length-r.length;return e.replace(/\*\/$/,"").replace(/\s*$/,"").length}(b,e)}function P(e,t){this._options=e,this._title=t.toLowerCase(),this._tag={title:t,description:null},this._options.lineNumbers&&(this._tag.lineNumber=h),this._first=o-t.length-1,this._last=0,this._extra={}}function k(e){var t,r;if(!function(){for(;o=y||(n.assert(64===_.charCodeAt(o)),0))}())return null;for(r=(t=new P(e,function(){var e,t="";for(S();o=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57);)t+=S();return t}())).parse();o1&&(this._tag.default=e.slice(1).join("=")),this._tag.name=e[0],this._tag.type&&"OptionalType"!==this._tag.type.type&&(this._tag.type={type:"OptionalType",expression:this._tag.type}));else{if(!p(this._title))return!0;if(l(this._title)&&this._tag.type&&this._tag.type.name)this._extra.name=this._tag.type,this._tag.name=this._tag.type.name,this._tag.type=null;else if(!this.addError("Missing or invalid tag name"))return!1}return!0},P.prototype.parseDescription=function(){var e=a(_,o,this._last).trim();return e&&(/^-\s+/.test(e)&&(e=e.substring(2)),this._tag.description=e),!0},P.prototype.parseCaption=function(){var e=a(_,o,this._last).trim(),t="",n="",r=e.indexOf(t),i=e.indexOf(n);return r>=0&&i>=0?(this._tag.caption=e.substring(r+t.length,i).trim(),this._tag.description=e.substring(i+n.length).trim()):this._tag.description=e,!0},P.prototype.parseKind=function(){var e,t;return t={class:!0,constant:!0,event:!0,external:!0,file:!0,function:!0,member:!0,mixin:!0,module:!0,namespace:!0,typedef:!0},e=a(_,o,this._last).trim(),this._tag.kind=e,!(!s(t,e)&&!this.addError("Invalid kind name '%0'",e))},P.prototype.parseAccess=function(){var e;return e=a(_,o,this._last).trim(),this._tag.access=e,!("private"!==e&&"protected"!==e&&"public"!==e&&!this.addError("Invalid access name '%0'",e))},P.prototype.parseThis=function(){var e=a(_,o,this._last).trim();return e&&"{"===e.charAt(0)?this.parseType()&&"NameExpression"===this._tag.type.type||"UnionType"===this._tag.type.type?(this._tag.name=this._tag.type.name,!0):this.addError("Invalid name for this"):this.parseNamePath()},P.prototype.parseVariation=function(){var e,t;return t=a(_,o,this._last).trim(),e=parseFloat(t,10),this._tag.variation=e,!(isNaN(e)&&!this.addError("Invalid variation '%0'",t))},P.prototype.ensureEnd=function(){var e=a(_,o,this._last).trim();return!(e&&!this.addError("Unknown content '%0'",e))},P.prototype.epilogue=function(){var e;return e=this._tag.description,!(d(this._title)&&!this._tag.type&&e&&"["===e.charAt(0)&&(this._tag.type=this._extra.name,this._tag.name||(this._tag.name=void 0),!E&&!this.addError("Missing or invalid tag name")))},r={access:["parseAccess"],alias:["parseNamePath","ensureEnd"],augments:["parseType","parseNamePathOptional","ensureEnd"],constructor:["parseType","parseNamePathOptional","ensureEnd"],class:["parseType","parseNamePathOptional","ensureEnd"],extends:["parseType","parseNamePathOptional","ensureEnd"],example:["parseCaption"],deprecated:["parseDescription"],global:["ensureEnd"],inner:["ensureEnd"],instance:["ensureEnd"],kind:["parseKind"],mixes:["parseNamePath","ensureEnd"],mixin:["parseNamePathOptional","ensureEnd"],member:["parseType","parseNamePathOptional","ensureEnd"],method:["parseNamePathOptional","ensureEnd"],module:["parseType","parseNamePathOptional","ensureEnd"],func:["parseNamePathOptional","ensureEnd"],function:["parseNamePathOptional","ensureEnd"],var:["parseType","parseNamePathOptional","ensureEnd"],name:["parseNamePath","ensureEnd"],namespace:["parseType","parseNamePathOptional","ensureEnd"],private:["parseType","parseDescription"],protected:["parseType","parseDescription"],public:["parseType","parseDescription"],readonly:["ensureEnd"],requires:["parseNamePath","ensureEnd"],since:["parseDescription"],static:["ensureEnd"],summary:["parseDescription"],this:["parseThis","ensureEnd"],todo:["parseDescription"],typedef:["parseType","parseNamePathOptional"],variation:["parseVariation"],version:["parseDescription"]},P.prototype.parse=function(){var e,t,n;if(!this._title&&!this.addError("Missing or invalid title"))return null;for(this._last=function(){var e,t,n=o;for(t=!1;n{n.expectedTypeName&&n.expectedTypeName!==n.currentType.name&&t.report({node:e,messageId:"useType",loc:y(e,n.currentType),data:{currentTypeName:n.currentType.name,expectedTypeName:n.expectedTypeName},fix(t){return t.replaceTextRange(n.currentType.range.map((t=>e.range[0]+2+t)),n.expectedTypeName)}})}))}function b(u){const h=i.getJSDocComment(u),g=d.pop(),b=Object.create(null),v=[];let E,x=!1,S=!1,O=!1,T=!1,w=!1;if(h){let i;try{i=e.parse(h.value,{strict:!0,unwrap:!0,sloppy:!0,range:!0})}catch(e){return void(/braces/iu.test(e.message)?t.report({node:h,messageId:"missingBrace"}):t.report({node:h,messageId:"syntaxError"}))}i.tags.forEach((e=>{switch(e.title.toLowerCase()){case"param":case"arg":case"argument":v.push(e);break;case"return":case"returns":x=!0,E=e;break;case"constructor":case"class":S=!0;break;case"override":case"inheritdoc":T=!0;break;case"abstract":case"virtual":w=!0;break;case"interface":O=!0}if(Object.prototype.hasOwnProperty.call(r,e.title)&&e.title!==r[e.title]){const n=y(h,e);t.report({node:h,messageId:"use",loc:{start:n.start,end:{line:n.start.line,column:n.start.column+`@${e.title}`.length}},data:{name:r[e.title]},fix(t){return t.replaceTextRange([h.range[0]+e.range[0]+3,h.range[0]+e.range[0]+e.title.length+3],r[e.title])}})}p&&e.type&&_(h,e.type)})),v.forEach((e=>{c&&!e.type&&t.report({node:h,messageId:"missingParamType",loc:y(h,e),data:{name:e.name}}),!e.description&&o&&t.report({node:h,messageId:"missingParamDesc",loc:y(h,e),data:{name:e.name}}),b[e.name]?t.report({node:h,messageId:"duplicateParam",loc:y(h,e),data:{name:e.name}}):e.name.includes(".")||(b[e.name]=e)})),x&&(s||g.returnPresent||null!==E.type&&m(E)||w?(l&&!E.type&&t.report({node:h,messageId:"missingReturnType"}),m(E)||E.description||!a||t.report({node:h,messageId:"missingReturnDesc"})):t.report({node:h,messageId:"unexpectedTag",loc:y(h,E),data:{title:E.title}})),T||x||S||O||"get"===u.parent.kind||"constructor"===u.parent.kind||"set"===u.parent.kind||f(u)||(s||g.returnPresent&&!u.async)&&t.report({node:h,messageId:"missingReturn",data:{returns:r.returns||"returns"}});const d=Object.keys(b);if(u.params&&u.params.forEach(((e,n)=>{const r="AssignmentPattern"===e.type?e.left:e;if("Identifier"===r.type){const e=r.name;d[n]&&e!==d[n]?t.report({node:h,messageId:"expected",loc:y(h,b[d[n]]),data:{name:e,jsdocName:d[n]}}):b[e]||T||t.report({node:h,messageId:"missingParam",data:{name:e}})}})),n.matchDescription){new RegExp(n.matchDescription,"u").test(i.description)||t.report({node:h,messageId:"unsatisfiedDesc"})}}}return{ArrowFunctionExpression:h,FunctionExpression:h,FunctionDeclaration:h,ClassExpression:h,ClassDeclaration:h,"ArrowFunctionExpression:exit":b,"FunctionExpression:exit":b,"FunctionDeclaration:exit":b,"ClassExpression:exit":b,"ClassDeclaration:exit":b,ReturnStatement:function(e){const t=d[d.length-1];t&&null!==e.argument&&(t.returnPresent=!0)}}}},$F}function xU(){if(zF)return QF;zF=1;const e=Pw();return QF={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(t){const n=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),r=new Set(["==","===","!=","!=="]),i=t.sourceCode,s=t.options[0]&&t.options[0].requireStringLiterals;let o;function a(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}return{Program(e){o=i.getScope(e)},UnaryExpression(i){if(a(i)){const{parent:l}=i;if("BinaryExpression"===l.type&&r.has(l.operator)){const r=l.left===i?l.right:l.left;if("Literal"===r.type||e.isStaticTemplateLiteral(r)){const e="Literal"===r.type?r.value:r.quasis[0].value.cooked;n.has(e)||t.report({node:r,messageId:"invalidValue"})}else"Identifier"===r.type&&"undefined"===r.name&&function(e){const t=o.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(r)?t.report({node:r,messageId:s?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(e){return e.replaceText(r,'"undefined"')}}]}):s&&!a(r)&&t.report({node:r,messageId:"notString"})}}}}}},QF}function SU(){return GF||(GF=1,XF={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e){return"ImportDeclaration"===e.type||"ImportSpecifier"===e.type||"ImportDefaultSpecifier"===e.type||"ImportNamespaceSpecifier"===e.type}function r(e){return"VariableDeclaration"===e.type||"ExportNamedDeclaration"===e.type&&e.declaration&&"VariableDeclaration"===e.declaration.type}function i(e,i){const s=i.length;let o=0;if("StaticBlock"!==e.parent.type)for(;o",">":"<","<=":">=",">=":"<="};return{BinaryExpression(u){const p=s?u.left:u.right,d=s?u.right:u.left;"Literal"!==d.type&&!r(d)||"Literal"===p.type||r(p)||!function(e){return/^(==|===)$/u.test(e)}(u.operator)&&a||!function(e){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(e)}(u.operator)||o&&function(n){const r=n.left,s=n.right;return"LogicalExpression"===n.type&&"BinaryExpression"===r.type&&"BinaryExpression"===s.type&&t(r.operator)&&t(s.operator)&&(function(){if("&&"===n.operator&&e.isSameReference(r.right,s.left)){const e=i(r.left),t=i(s.right);if(null===e&&null===t)return!1;if(null===t||null===e)return!0;if(e.value<=t.value)return!0}return!1}()||function(){if("||"===n.operator&&e.isSameReference(r.left,s.right)){const e=i(r.right),t=i(s.left);if(null===e&&null===t)return!1;if(null===t||null===e)return!0;if(e.value<=t.value)return!0}return!1}())&&e.isParenthesised(l,n)}(u.parent)||n.report({node:u,messageId:"expected",data:{operator:u.operator,expectedSide:s?"left":"right"},fix:t=>t.replaceText(u,function(t){const n=l.getFirstTokenBetween(t.left,t.right,(e=>e.value===t.operator)),r=l.getTokenBefore(n),i=l.getTokenAfter(n),s=l.getText(),o=s.slice(t.range[0],r.range[1]),a=s.slice(r.range[1],n.range[0]),u=s.slice(n.range[1],i.range[0]),p=s.slice(i.range[0],t.range[1]),d=l.getTokenBefore(t),f=l.getTokenAfter(t);let h="",m="";return d&&d.range[1]===t.range[0]&&!e.canTokensBeAdjacent(d,i)&&(h=" "),f&&t.range[1]===f.range[0]&&!e.canTokensBeAdjacent(r,f)&&(m=" "),h+p+a+c[n.value]+u+o+m}(u))})}}}},nU}function wU(){if(sU)return iU;sU=1;const{LazyLoadingRuleMap:e}=function(){if(yT)return gT;yT=1;const e=Jx()("eslint:rules");class t extends Map{constructor(n){let r=n.length;super(e.enabled?n.map((([t,n])=>{let i=null;return[t,()=>(i||(e("Loading rule %o (remaining=%d)",t,--r),i=n()),i)]})):n),Object.defineProperty(t.prototype,"set",{configurable:!0,value:void 0})}get(e){const t=super.get(e);return t&&t()}*values(){for(const e of super.values())yield e()}*entries(){for(const[e,t]of super.entries())yield[e,t()]}forEach(e,t){for(const[n,r]of super.entries())e.call(t,r(),n,this)}}return Object.defineProperties(t.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:t.prototype.entries}}),gT={LazyLoadingRuleMap:t}}();return iU=new e(Object.entries({"accessor-pairs":()=>kw(),"array-bracket-newline":()=>Dw(),"array-bracket-spacing":()=>Rw(),"array-callback-return":()=>Iw(),"array-element-newline":()=>Lw(),"arrow-body-style":()=>Bw(),"arrow-parens":()=>Mw(),"arrow-spacing":()=>jw(),"block-scoped-var":()=>(ow||(ow=1,sw={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(e){let t=[];const n=e.sourceCode;function r(e){t.push(e.range)}function i(){t.pop()}function s(t,n){const r=t.identifier,i=n.name.loc.start;e.report({node:r,messageId:"outOfScope",data:{name:r.name,definitionLine:i.line,definitionColumn:i.column+1}})}return{Program(e){t=[e.range]},BlockStatement:r,"BlockStatement:exit":i,ForStatement:r,"ForStatement:exit":i,ForInStatement:r,"ForInStatement:exit":i,ForOfStatement:r,"ForOfStatement:exit":i,SwitchStatement:r,"SwitchStatement:exit":i,CatchClause:r,"CatchClause:exit":i,StaticBlock:r,"StaticBlock:exit":i,VariableDeclaration:function(e){if("var"!==e.kind)return;const r=t[t.length-1];function i(e){const t=e.identifier.range;return t[0]r[1]}const o=n.getDeclaredVariables(e);for(let t=0;ts(n,o[t].defs.find((t=>t.parent===e)))))}}}}),sw),"block-spacing":()=>Nw(),"brace-style":()=>function(){if(uw)return cw;uw=1;const e=Pw();return cw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(t){const n=t.options[0]||"1tbs",r=t.options[1]||{},i=t.sourceCode;function s(e,t){const n=[e.range[1],t.range[0]];return i.text.slice(n[0],n[1]).trim()?null:e=>e.replaceTextRange(n," ")}function o(o,a){const l=i.getTokenBefore(o),c=i.getTokenAfter(o),u=i.getTokenBefore(a),p=r.allowSingleLine&&e.isTokenOnSameLine(o,a);"allman"===n||e.isTokenOnSameLine(l,o)||t.report({node:o,messageId:"nextLineOpen",fix:s(l,o)}),"allman"===n&&e.isTokenOnSameLine(l,o)&&!p&&t.report({node:o,messageId:"sameLineOpen",fix:e=>e.insertTextBefore(o,"\n")}),e.isTokenOnSameLine(o,c)&&c!==a&&!p&&t.report({node:o,messageId:"blockSameLine",fix:e=>e.insertTextAfter(o,"\n")}),u!==o&&!p&&e.isTokenOnSameLine(u,a)&&t.report({node:a,messageId:"singleLineClose",fix:e=>e.insertTextBefore(a,"\n")})}function a(r){const o=i.getTokenAfter(r);"1tbs"!==n||e.isTokenOnSameLine(r,o)||t.report({node:r,messageId:"nextLineClose",fix:s(r,o)}),"1tbs"!==n&&e.isTokenOnSameLine(r,o)&&t.report({node:r,messageId:"sameLineClose",fix:e=>e.insertTextAfter(r,"\n")})}return{BlockStatement(t){e.STATEMENT_LIST_PARENTS.has(t.parent.type)||o(i.getFirstToken(t),i.getLastToken(t))},StaticBlock(e){o(i.getFirstToken(e,{skip:1}),i.getLastToken(e))},ClassBody(e){o(i.getFirstToken(e),i.getLastToken(e))},SwitchStatement(e){const t=i.getLastToken(e);o(i.getTokenBefore(e.cases.length?e.cases[0]:t),t)},IfStatement(e){"BlockStatement"===e.consequent.type&&e.alternate&&a(i.getLastToken(e.consequent))},TryStatement(e){a(i.getLastToken(e.block)),e.handler&&e.finalizer&&a(i.getLastToken(e.handler.body))}}}},cw}(),"callback-return":()=>Fw(),camelcase:()=>Uw(),"capitalized-comments":()=>Vw(),"class-methods-use-this":()=>Kw(),"comma-dangle":()=>Ww(),"comma-spacing":()=>function(){if(Ow)return Sw;Ow=1;const e=Pw();return Sw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(t){const n=t.sourceCode,r=n.tokensAndComments,i={before:!!t.options[0]&&t.options[0].before,after:!t.options[0]||t.options[0].after},s=[];function o(e,n,r){t.report({node:e,fix(t){if(i[n])return"before"===n?t.insertTextBefore(e," "):t.insertTextAfter(e," ");let s,o;return"before"===n?(s=r.range[1],o=e.range[0]):(s=e.range[1],o=r.range[0]),t.replaceTextRange([s,o],"")},messageId:i[n]?"missing":"unexpected",data:{loc:n}})}function a(t){let r=n.getFirstToken(t);t.elements.forEach((t=>{let i;null===t?(i=n.getTokenAfter(r),e.isCommaToken(i)&&s.push(i)):i=n.getTokenAfter(t),r=i}))}return{"Program:exit"(){r.forEach(((t,a)=>{if(!e.isCommaToken(t))return;const l=r[a-1],c=r[a+1];l&&!e.isCommaToken(l)&&!s.includes(t)&&e.isTokenOnSameLine(l,t)&&i.before!==n.isSpaceBetweenTokens(l,t)&&o(t,"before",l),!c||e.isCommaToken(c)||e.isClosingParenToken(c)||e.isClosingBracketToken(c)||e.isClosingBraceToken(c)||!i.after&&"Line"===c.type||!e.isTokenOnSameLine(t,c)||i.after===n.isSpaceBetweenTokens(t,c)||o(t,"after",c)}))},ArrayExpression:a,ArrayPattern:a}}},Sw}(),"comma-style":()=>$w(),complexity:()=>function(){if(iC)return rC;iC=1;const e=Pw(),{upperCaseFirst:t}=tk();return rC={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(n){const r=n.options[0];let i=20;"object"==typeof r&&(Object.prototype.hasOwnProperty.call(r,"maximum")||Object.prototype.hasOwnProperty.call(r,"max"))?i=r.maximum||r.max:"number"==typeof r&&(i=r);const s=[];function o(){s[s.length-1]++}return{onCodePathStart(){s.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,"SwitchCase[test]":o,AssignmentExpression(t){e.isLogicalAssignmentOperator(t.operator)&&o()},onCodePathEnd(r,o){const a=s.pop();if(("function"===r.origin||"class-field-initializer"===r.origin||"class-static-block"===r.origin)&&a>i){let s;s="class-field-initializer"===r.origin?"class field initializer":"class-static-block"===r.origin?"class static block":e.getFunctionNameWithKind(o),n.report({node:o,messageId:"complex",data:{name:t(s),complexity:a,max:i}})}}}}},rC}(),"computed-property-spacing":()=>nk(),"consistent-return":()=>function(){if(lC)return aC;lC=1;const e=Pw(),{upperCaseFirst:t}=tk();return aC={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(n){const r=!0===(n.options[0]||{}).treatUndefinedAsUnspecified;let i=null;function s(t){let r,s;!i.hasReturnValue||function(e){for(const t of e)if(t.reachable)return!1;return!0}(i.currentSegments)||e.isES5Constructor(t)||function(e){return"FunctionExpression"===e.type&&e.parent&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}(t)||("Program"===t.type?(r={line:1,column:0},s="program"):r="ArrowFunctionExpression"===t.type?n.sourceCode.getTokenBefore(t.body,e.isArrowToken).loc:"MethodDefinition"===t.parent.type||"Property"===t.parent.type&&t.parent.method?t.parent.key.loc:(t.id||n.sourceCode.getFirstToken(t)).loc,s||(s=e.getFunctionNameWithKind(t)),n.report({node:t,loc:r,messageId:"missingReturn",data:{name:s}}))}return{onCodePathStart(e,t){i={upper:i,codePath:e,hasReturn:!1,hasReturnValue:!1,messageId:"",node:t,currentSegments:new Set}},onCodePathEnd(){i=i.upper},onUnreachableCodePathSegmentStart(e){i.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){i.currentSegments.delete(e)},onCodePathSegmentStart(e){i.currentSegments.add(e)},onCodePathSegmentEnd(e){i.currentSegments.delete(e)},ReturnStatement(s){const o=s.argument;let a=Boolean(o);r&&a&&(a=!e.isSpecificId(o,"undefined")&&"void"!==o.operator),i.hasReturn?i.hasReturnValue!==a&&n.report({node:s,messageId:i.messageId,data:i.data}):(i.hasReturn=!0,i.hasReturnValue=a,i.messageId=a?"missingReturnValue":"unexpectedReturnValue",i.data={name:"Program"===i.node.type?"Program":t(e.getFunctionNameWithKind(i.node))})},"Program:exit":s,"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s}}},aC}(),"consistent-this":()=>rk(),"constructor-super":()=>function(){if(dC)return pC;function e(t){if(!t)return!1;switch(t.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return"undefined"!==t.name;case"AssignmentExpression":return["=","&&="].includes(t.operator)?e(t.right):!!["||=","??="].includes(t.operator)&&(e(t.left)||e(t.right));case"LogicalExpression":return"&&"===t.operator?e(t.right):e(t.left)||e(t.right);case"ConditionalExpression":return e(t.alternate)||e(t.consequent);case"SequenceExpression":return e(t.expressions[t.expressions.length-1]);default:return!1}}return dC=1,pC={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor.",unexpected:"Unexpected 'super()'."}},create(t){let n=null,r=Object.create(null);function i(e){return e.reachable&&r[e.id].calledInSomePaths}function s(e){return!(1!==e.nextSegments.length||!e.nextSegments[0].isLoopedPrevSegment(e))||e.reachable&&r[e.id].calledInEveryPaths}return{onCodePathStart(t,r){if(function(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}(r)){const i=r.parent.parent.parent.superClass;n={upper:n,isConstructor:!0,hasExtends:Boolean(i),superIsConstructor:e(i),codePath:t,currentSegments:new Set}}else n={upper:n,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:t,currentSegments:new Set}},onCodePathEnd(e,r){const o=n.hasExtends;if(n=n.upper,!o)return;const a=e.returnedSegments,l=a.every(s),c=a.some(i);l||t.report({messageId:c?"missingSome":"missingAll",node:r.parent})},onCodePathSegmentStart(e){if(n.currentSegments.add(e),!(n&&n.isConstructor&&n.hasExtends))return;const t=r[e.id]={calledInSomePaths:!1,calledInEveryPaths:!1,validNodes:[]},o=e.prevSegments;o.length>0&&(t.calledInSomePaths=o.some(i),t.calledInEveryPaths=o.every(s))},onUnreachableCodePathSegmentStart(e){n.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentLoop(e,o){if(!(n&&n.isConstructor&&n.hasExtends))return;const a=o.prevSegments.length>=2;n.codePath.traverseSegments({first:o,last:e},(e=>{const n=r[e.id],o=e.prevSegments;if(n.calledInSomePaths=o.some(i),n.calledInEveryPaths=o.every(s),n.calledInSomePaths||a){const e=n.validNodes;n.validNodes=[];for(let n=0;nik(),"default-case":()=>function(){if(gC)return mC;gC=1;const e=/^no default$/iu;return mC={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(t){const n=t.options[0]||{},r=n.commentPattern?new RegExp(n.commentPattern,"u"):e,i=t.sourceCode;function s(e){return e[e.length-1]}return{SwitchStatement(e){if(!e.cases.length)return;const n=e.cases.some((e=>null===e.test));if(!n){let n;const o=s(e.cases),a=i.getCommentsAfter(o);a.length&&(n=s(a)),n&&r.test(n.value.trim())||t.report({node:e,messageId:"missingDefaultCase"})}}}}},mC}(),"default-case-last":()=>(_C||(_C=1,yC={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(e){return{SwitchStatement(t){const n=t.cases,r=n.findIndex((e=>null===e.test));if(-1!==r&&r!==n.length-1){const t=n[r];e.report({node:t,messageId:"notLast"})}}}}}),yC),"default-param-last":()=>(vC||(vC=1,bC={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(e){function t(t){let n=!1;for(let r=t.params.length-1;r>=0;r-=1){const i=t.params[r];"AssignmentPattern"===i.type||"RestElement"===i.type?n&&"AssignmentPattern"===i.type&&e.report({node:i,messageId:"shouldBeLast"}):n=!0}}return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t}}}),bC),"dot-location":()=>sk(),"dot-notation":()=>function(){if(wC)return TC;wC=1;const e=Pw(),t=ok(),n=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,r=new Set(["string","boolean"]);return TC={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(i){const s=i.options[0]||{},o=void 0===s.allowKeywords||s.allowKeywords,a=i.sourceCode;let l;function c(r,s){if(n.test(s)&&(o||!t.includes(String(s)))&&(!l||!l.test(s))){const t="Literal"===r.property.type?JSON.stringify(s):`\`${s}\``;i.report({node:r.property,messageId:"useDot",data:{key:t},*fix(t){const n=a.getTokenAfter(r.object,e.isOpeningBracketToken),i=a.getLastToken(r),o=a.getTokenAfter(r);a.commentsExistBetween(n,i)||(r.optional||(yield t.insertTextBefore(n,e.isDecimalInteger(r.object)?" .":".")),yield t.replaceTextRange([n.range[0],i.range[1]],s),o&&i.range[1]===o.range[0]&&!e.canTokensBeAdjacent(String(s),o)&&(yield t.insertTextAfter(r," ")))}})}}return s.allowPattern&&(l=new RegExp(s.allowPattern,"u")),{MemberExpression(n){n.computed&&"Literal"===n.property.type&&(r.has(typeof n.property.value)||e.isNullLiteral(n.property))&&c(n,n.property.value),n.computed&&e.isStaticTemplateLiteral(n.property)&&c(n,n.property.quasis[0].value.cooked),o||n.computed||"Identifier"!==n.property.type||!t.includes(String(n.property.name))||i.report({node:n.property,messageId:"useBrackets",data:{key:n.property.name},*fix(e){const t=a.getTokenBefore(n.property);("Identifier"!==n.object.type||"let"!==n.object.name||n.optional)&&(a.commentsExistBetween(t,n.property)||(n.optional||(yield e.remove(t)),yield e.replaceText(n.property,`["${n.property.name}"]`)))}})}}}},TC}(),"eol-last":()=>(AC||(AC=1,CC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(e){return{Program:function(t){const n=e.sourceCode,r=n.getText(),i={column:n.lines[n.lines.length-1].length,line:n.lines.length},s=r.endsWith("\n");if(!r.length)return;let o=e.options[0]||"always",a=!1;if("unix"===o&&(o="always"),"windows"===o&&(o="always",a=!0),"always"!==o||s){if("never"===o&&s){const r=n.lines[n.lines.length-2];e.report({node:t,loc:{start:{line:n.lines.length-1,column:r.length},end:{line:n.lines.length,column:0}},messageId:"unexpected",fix(e){const t=/(?:\r?\n)+$/u.exec(n.text).index,r=n.text.length;return e.replaceTextRange([t,r],"")}})}}else e.report({node:t,loc:i,messageId:"missing",fix(e){return e.insertTextAfterRange([0,r.length],a?"\r\n":"\n")}})}}}}),CC),eqeqeq:()=>ak(),"for-direction":()=>function(){if(RC)return DC;RC=1;const{getStaticValue:e}=rS();return DC={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(t){const{sourceCode:n}=t;function r(e){t.report({node:e,messageId:"incorrectDirection"})}function i(t,r){const i=e(t.right,n.getScope(t));return i&&["bigint","boolean","number"].includes(typeof i.value)?r*(Math.sign(Number(i.value))||0):0}function s(e,t){if("Identifier"===e.argument.type&&e.argument.name===t){if("++"===e.operator)return 1;if("--"===e.operator)return-1}return 0}function o(e,t){if(e.left.name===t){if("+="===e.operator)return i(e,1);if("-="===e.operator)return i(e,-1)}return 0}return{ForStatement(e){if(e.test&&"BinaryExpression"===e.test.type&&e.update)for(const t of["left","right"]){if("Identifier"!==e.test[t].type)continue;const n=e.test[t].name,i=e.test.operator,a=e.update;let l;if("<"===i||"<="===i)l="left"===t?-1:1;else{if(">"!==i&&">="!==i)return;l="left"===t?1:-1}"UpdateExpression"===a.type?s(a,n)===l&&r(e):"AssignmentExpression"===a.type&&o(a,n)===l&&r(e)}}}}},DC}(),"func-call-spacing":()=>function(){if(LC)return IC;LC=1;const e=Pw();return IC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(t){const n="always"!==t.options[0],r=!n&&t.options[1]&&t.options[1].allowNewlines,i=t.sourceCode,s=i.getText();function o(o,a,l){const c=s.slice(a.range[1],l.range[0]).replace(/\/\*.*?\*\//gu,""),u=/\s/u.test(c),p=u&&e.LINEBREAK_MATCHER.test(c);n&&u?t.report({node:o,loc:{start:a.loc.end,end:{line:l.loc.start.line,column:l.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(e){return i.commentsExistBetween(a,l)?null:o.optional?e.replaceTextRange([a.range[1],l.range[0]],"?."):p?null:e.removeRange([a.range[1],l.range[0]])}}):n||u?n||r||!p||t.report({node:o,loc:{start:a.loc.end,end:l.loc.start},messageId:"unexpectedNewline",fix(e){if(!o.optional)return null;if(i.commentsExistBetween(a,l))return null;const t=[a.range[1],l.range[0]],n=i.getTokenAfter(a);return n.range[0]===a.range[1]?e.replaceTextRange(t,"?. "):n.range[1]===l.range[0]?e.replaceTextRange(t," ?."):e.replaceTextRange(t," ?. ")}}):t.report({node:o,loc:{start:{line:a.loc.end.line,column:a.loc.end.column-1},end:l.loc.start},messageId:"missing",fix(e){return o.optional?null:e.insertTextBefore(l," ")}})}return{"CallExpression, NewExpression"(t){const n=i.getLastToken(t),r=i.getLastToken(t.callee),s=i.getFirstTokenBetween(r,n,e.isOpeningParenToken),a=s&&i.getTokenBefore(s,e.isNotQuestionDotToken);s&&s.range[1]function(){if(MC)return BC;MC=1;const e=Pw(),t=Aw();function n(e,n){return n>=2015?t.keyword.isIdentifierES6(e):t.keyword.isIdentifierES5(e)}const r={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return BC={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[{enum:["always","never"]},r]},{type:"array",additionalItems:!1,items:[r]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(t){const r=("object"==typeof t.options[0]?t.options[0]:t.options[1])||{},i="string"==typeof t.options[0]?t.options[0]:"always",s=r.considerPropertyDescriptor,o=r.includeCommonJSModuleExports,a=t.languageOptions.ecmaVersion;function l(t,n,r){return!!r&&"CallExpression"===r.type&&e.isSpecificMemberAccess(r.callee,t,n)}function c(e,t){return"always"===i&&e!==t||"never"===i&&e===t}function u(e,n,r,s){let o;o="always"===i&&s?"matchProperty":"always"===i?"matchVariable":s?"notMatchProperty":"notMatchVariable",t.report({node:e,messageId:o,data:{name:n,funcName:r}})}function p(e){return"Literal"===e.type&&"string"==typeof e.value}return{VariableDeclarator(e){e.init&&"FunctionExpression"===e.init.type&&"Identifier"===e.id.type&&e.init.id&&c(e.id.name,e.init.id.name)&&u(e,e.id.name,e.init.id.name,!1)},AssignmentExpression(t){if("FunctionExpression"!==t.right.type||t.left.computed&&"Literal"!==t.left.property.type||!o&&function(e){if("MemberExpression"===e.type&&"Identifier"===e.object.type&&"module"===e.object.name){if("Identifier"===e.property.type&&"exports"===e.property.name)return!0;if("Literal"===e.property.type&&"exports"===e.property.value)return!0}return!1}(t.left)||"Identifier"!==t.left.type&&"MemberExpression"!==t.left.type)return;const r="MemberExpression"===t.left.type,i=r?e.getStaticPropertyName(t.left):t.left.name;t.right.id&&i&&n(i)&&c(i,t.right.id.name)&&u(t,i,t.right.id.name,r)},"Property, PropertyDefinition[value]"(e){if("FunctionExpression"===e.value.type&&e.value.id)if("Identifier"!==e.key.type||e.computed)p(e.key)&&n(e.key.value,a)&&c(e.key.value,e.value.id.name)&&u(e,e.key.value,e.value.id.name,!0);else{const t=e.value.id.name;let n=e.key.name;if(s&&"value"===n&&"ObjectExpression"===e.parent.type)if(l("Object","defineProperty",e.parent.parent)||l("Reflect","defineProperty",e.parent.parent)){const n=e.parent.parent.arguments[1];p(n)&&c(n.value,t)&&u(e,n.value,t,!0)}else l("Object","defineProperties",e.parent.parent.parent.parent)||l("Object","create",e.parent.parent.parent.parent)?(n=e.parent.parent.key.name,!e.parent.parent.computed&&c(n,t)&&u(e,n,t,!0)):c(n,t)&&u(e,n,t,!0);else c(n,t)&&u(e,n,t,!0)}}}}},BC}(),"func-names":()=>lk(),"func-style":()=>(UC||(UC=1,FC={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(e){const t=e.options[0],n=e.options[1]&&e.options[1].allowArrowFunctions,r="declaration"===t,i=[],s={FunctionDeclaration(t){i.push(!1),r||"ExportDefaultDeclaration"===t.parent.type||e.report({node:t,messageId:"expression"})},"FunctionDeclaration:exit"(){i.pop()},FunctionExpression(t){i.push(!1),r&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,messageId:"declaration"})},"FunctionExpression:exit"(){i.pop()},ThisExpression(){i.length>0&&(i[i.length-1]=!0)}};return n||(s.ArrowFunctionExpression=function(){i.push(!1)},s["ArrowFunctionExpression:exit"]=function(t){const n=i.pop();r&&!n&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,messageId:"declaration"})}),s}}),FC),"function-call-argument-newline":()=>(KC||(KC=1,VC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(e){const t=e.sourceCode,n={messageId:"unexpectedLineBreak",check:(e,t)=>e.loc.end.line!==t.loc.start.line,createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]]," ")},r={messageId:"missingLineBreak",check:(e,t)=>e.loc.end.line===t.loc.start.line,createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]],"\n")};function i(n,r){for(let i=1;ick(),"generator-star-spacing":()=>uk(),"getter-return":()=>function(){if(XC)return zC;XC=1;const e=Pw(),t=/^(?:Arrow)?FunctionExpression$/u;return zC={meta:{type:"problem",docs:{description:"Enforce `return` statements in getters",recommended:!0,url:"https://eslint.org/docs/latest/rules/getter-return"},fixable:null,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expected:"Expected to return a value in {{name}}.",expectedAlways:"Expected {{name}} to always return a value."}},create(n){const r=n.options[0]||{allowImplicit:!1},i=n.sourceCode;let s={upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null,currentSegments:[]};function o(t){s.shouldCheck&&function(e){for(const t of e)if(t.reachable)return!0;return!1}(s.currentSegments)&&n.report({node:t,loc:e.getFunctionHeadLoc(t,i),messageId:s.hasReturn?"expectedAlways":"expected",data:{name:e.getFunctionNameWithKind(s.node)}})}function a(n){const r=n.parent;if(t.test(n.type)&&"BlockStatement"===n.body.type){if("get"===r.kind)return!0;if("Property"===r.type&&"get"===e.getStaticPropertyName(r)&&"ObjectExpression"===r.parent.type){if("CallExpression"===r.parent.parent.type){const t=r.parent.parent.callee;if(e.isSpecificMemberAccess(t,"Object","defineProperty")||e.isSpecificMemberAccess(t,"Reflect","defineProperty"))return!0}if("Property"===r.parent.parent.type&&"ObjectExpression"===r.parent.parent.parent.type&&"CallExpression"===r.parent.parent.parent.parent.type){const t=r.parent.parent.parent.parent.callee;return e.isSpecificMemberAccess(t,"Object","defineProperties")||e.isSpecificMemberAccess(t,"Object","create")}}}return!1}return{onCodePathStart(e,t){s={upper:s,codePath:e,hasReturn:!1,shouldCheck:a(t),node:t,currentSegments:new Set}},onCodePathEnd(){s=s.upper},onUnreachableCodePathSegmentStart(e){s.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){s.currentSegments.delete(e)},onCodePathSegmentStart(e){s.currentSegments.add(e)},onCodePathSegmentEnd(e){s.currentSegments.delete(e)},ReturnStatement(t){s.shouldCheck&&(s.hasReturn=!0,r.allowImplicit||t.argument||n.report({node:t,messageId:"expected",data:{name:e.getFunctionNameWithKind(s.node)}}))},"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},zC}(),"global-require":()=>function(){if(ZC)return GC;ZC=1;const e=new Set(["AssignmentExpression","VariableDeclarator","MemberExpression","ExpressionStatement","CallExpression","ConditionalExpression","Program","VariableDeclaration","ChainExpression"]);return GC={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(t){const n=t.sourceCode;return{CallExpression(r){const i=n.getScope(r);"require"!==r.callee.name||function(e,t){const n=function(e,t){const n=e.references.filter((e=>e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]));return 1===n.length?n[0]:null}(e,t);return n&&n.resolved&&n.resolved.defs.length>0}(i,r.callee)||n.getAncestors(r).every((t=>e.has(t.type)))||t.report({node:r,messageId:"unexpected"})}}}},GC}(),"grouped-accessor-pairs":()=>function(){if(HC)return YC;HC=1;const e=Pw();function t(e){return"get"===e.kind||"set"===e.kind}return YC={meta:{type:"suggestion",docs:{description:"Require grouped accessor pairs in object literals and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/grouped-accessor-pairs"},schema:[{enum:["anyOrder","getBeforeSet","setBeforeGet"]}],messages:{notGrouped:"Accessor pair {{ formerName }} and {{ latterName }} should be grouped.",invalidOrder:"Expected {{ latterName }} to be before {{ formerName }}."}},create(n){const r=n.options[0]||"anyOrder",i=n.sourceCode;function s(t,r,s){n.report({node:s,messageId:t,loc:e.getFunctionHeadLoc(s.value,i),data:{formerName:e.getFunctionNameWithKind(r.value),latterName:e.getFunctionNameWithKind(s.value)}})}function o(n,o){const a=[];let l=!1;for(let r=0;r1?s("notGrouped",c,u):("getBeforeSet"===r&&a>l||"setBeforeGet"===r&&a"Property"===e.type))},ClassBody(e){o(e.body,(e=>"MethodDefinition"===e.type&&!e.static)),o(e.body,(e=>"MethodDefinition"===e.type&&e.static))}}}},YC}(),"guard-for-in":()=>(eA||(eA=1,JC={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(e){return{ForInStatement(t){const n=t.body;if("EmptyStatement"!==n.type&&"IfStatement"!==n.type&&!("BlockStatement"===n.type&&0===n.body.length||"BlockStatement"===n.type&&1===n.body.length&&"IfStatement"===n.body[0].type)){if("BlockStatement"===n.type&&n.body.length>=1&&"IfStatement"===n.body[0].type){const e=n.body[0];if("ContinueStatement"===e.consequent.type)return;if("BlockStatement"===e.consequent.type&&1===e.consequent.body.length&&"ContinueStatement"===e.consequent.body[0].type)return}e.report({node:t,messageId:"wrap"})}}}}}),JC),"handle-callback-err":()=>pk(),"id-blacklist":()=>dk(),"id-denylist":()=>fk(),"id-length":()=>hk(),"id-match":()=>mk(),"implicit-arrow-linebreak":()=>gk(),indent:()=>yk(),"indent-legacy":()=>_k(),"init-declarations":()=>function(){if(_A)return yA;function e(e){return"ForInStatement"===e.type||"ForOfStatement"===e.type||"ForStatement"===e.type}function t(t){const n=t.parent,r=n.parent;return e(r)?"ForStatement"===r.type?r.init===n:r.left===n:Boolean(t.init)}return _A=1,yA={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(n){const r="always",i=n.options[0]||r,s=n.options[1]||{};return{"VariableDeclaration:exit"(o){const a=o.kind,l=o.declarations;for(let c=0;cbk(),"key-spacing":()=>vk(),"keyword-spacing":()=>function(){if(OA)return SA;OA=1;const e=Pw(),t=ok(),n=/^[)\]}>]$/u,r=/^(?:[([{<~!]|\+\+?|--?)$/u,i=/^[)\]}>*]$/u,s=/^[{*]$/u,o=/\$\{$/u,a=/^\}/u,l=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,c=t.concat(["as","async","await","from","get","let","of","set","yield"]);function u(e){return"Template"===e.type&&o.test(e.value)}function p(e){return"Template"===e.type&&a.test(e.value)}return function(){c.sort();for(let e=1;e(e[t]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},e)),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(t){const o=t.sourceCode,a=new WeakSet;function d(n,r){const i=o.getTokenBefore(n);!i||!l.test(i.type)&&!r.test(i.value)||u(i)||a.has(i)||!e.isTokenOnSameLine(i,n)||o.isSpaceBetweenTokens(i,n)||t.report({loc:n.loc,messageId:"expectedBefore",data:n,fix(e){return e.insertTextBefore(n," ")}})}function f(n,r){const i=o.getTokenBefore(n);i&&(l.test(i.type)||r.test(i.value))&&!u(i)&&!a.has(i)&&e.isTokenOnSameLine(i,n)&&o.isSpaceBetweenTokens(i,n)&&t.report({loc:{start:i.loc.end,end:n.loc.start},messageId:"unexpectedBefore",data:n,fix(e){return e.removeRange([i.range[1],n.range[0]])}})}function h(n,r){const i=o.getTokenAfter(n);!i||!l.test(i.type)&&!r.test(i.value)||p(i)||a.has(i)||!e.isTokenOnSameLine(n,i)||o.isSpaceBetweenTokens(n,i)||t.report({loc:n.loc,messageId:"expectedAfter",data:n,fix(e){return e.insertTextAfter(n," ")}})}function m(n,r){const i=o.getTokenAfter(n);i&&(l.test(i.type)||r.test(i.value))&&!p(i)&&!a.has(i)&&e.isTokenOnSameLine(n,i)&&o.isSpaceBetweenTokens(n,i)&&t.report({loc:{start:n.loc.end,end:i.loc.start},messageId:"unexpectedAfter",data:n,fix(e){return e.removeRange([n.range[1],i.range[0]])}})}const g=function(e={}){const t=!1!==e.before,n=!1!==e.after,r={before:t?d:f,after:n?h:m},i=e&&e.overrides||{},s=Object.create(null);for(let e=0;e{switch(e.value){case"get":case"set":case"async":return!0;default:return!1}}));if(!t)throw new Error("Failed to find token get, set, or async beside method name");b(t)}}return{DebuggerStatement:v,WithStatement:v,BreakStatement:v,ContinueStatement:v,ReturnStatement:v,ThrowStatement:v,TryStatement:function(e){v(e),v(e.handler),x(e.finalizer)},IfStatement:function(e){v(e),x(e.alternate)},SwitchStatement:v,SwitchCase:v,DoWhileStatement:function(e){v(e),x(e.test)},ForInStatement:function(t){v(t);const n=o.getTokenBefore(t.right,e.isNotOpeningParenToken);"PrivateIdentifier"!==o.getTokenBefore(n).type&&y(n),_(n)},ForOfStatement:function(t){t.await?(y(o.getFirstToken(t,0)),_(o.getFirstToken(t,1))):v(t);const n=o.getTokenBefore(t.right,e.isNotOpeningParenToken);"PrivateIdentifier"!==o.getTokenBefore(n).type&&y(n),_(n)},ForStatement:v,WhileStatement:v,ClassDeclaration:O,ExportNamedDeclaration:T,ExportDefaultDeclaration:T,ExportAllDeclaration:T,FunctionDeclaration:S,ImportDeclaration:T,VariableDeclaration:v,ArrowFunctionExpression:S,AwaitExpression:function(e){y(o.getFirstToken(e))},ClassExpression:O,FunctionExpression:S,NewExpression:E,Super:E,ThisExpression:E,UnaryExpression:E,YieldExpression:E,ImportSpecifier:function(e){e.imported.range[0]!==e.local.range[0]&&y(o.getTokenBefore(e.local),i)},ExportSpecifier:function(e){if(e.local.range[0]!==e.exported.range[0]){const t=o.getTokenBefore(e.exported);y(t,i),_(t,s)}},ImportNamespaceSpecifier:function(e){y(o.getFirstToken(e,1),i)},MethodDefinition:w,PropertyDefinition:w,StaticBlock:v,Property:w,"BinaryExpression[operator='>']"(t){const n=o.getTokenBefore(t.right,e.isNotOpeningParenToken);a.add(n)}}}},SA}(),"line-comment-position":()=>function(){if(wA)return TA;wA=1;const e=Pw();return TA={meta:{type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(t){const n=t.options[0];let r,i,s=!0;n&&"string"!=typeof n?(r=!n.position||"above"===n.position,i=n.ignorePattern,s=Object.prototype.hasOwnProperty.call(n,"applyDefaultIgnorePatterns")?n.applyDefaultIgnorePatterns:!1!==n.applyDefaultPatterns):r=!n||"above"===n;const o=e.COMMENTS_IGNORE_PATTERN,a=/^\s*falls?\s?through/u,l=new RegExp(i,"u"),c=t.sourceCode;return{Program(){c.getAllComments().filter((e=>"Line"===e.type)).forEach((e=>{if(s&&(o.test(e.value)||a.test(e.value)))return;if(i&&l.test(e.value))return;const n=c.getTokenBefore(e,{includeComments:!0}),u=n&&n.loc.end.line===e.loc.start.line;r?u&&t.report({node:e,messageId:"above"}):u||t.report({node:e,messageId:"beside"})}))}}}},TA}(),"linebreak-style":()=>function(){if(AA)return CA;AA=1;const e=Pw();return CA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(t){const n=t.sourceCode;function r(e,t){return function(n){return n.replaceTextRange(e,t)}}return{Program:function(i){const s="unix"===(t.options[0]||"unix"),o=s?"\n":"\r\n",a=n.getText(),l=e.createGlobalLinebreakMatcher();let c,u=0;for(;null!==(c=l.exec(a));){if(u++,c[0]===o)continue;const e=c.index,a=[e,e+c[0].length];t.report({node:i,loc:{start:{line:u,column:n.lines[u-1].length},end:{line:u+1,column:0}},messageId:s?"expectedLF":"expectedCRLF",fix:r(a,o)})}}}}},CA}(),"lines-around-comment":()=>Ek(),"lines-around-directive":()=>function(){if(RA)return DA;RA=1;const e=Pw();return DA={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(t){const n=t.sourceCode,r=t.options[0]||"always",i="string"==typeof r?r:r.before,s="string"==typeof r?r:r.after;function o(e){const t=n.getTokenBefore(e,{includeComments:!0}),r=t?t.loc.end.line:0;return e.loc.start.line-r>=2}function a(t){const r=n.getLastToken(t),i=n.getTokenBefore(r);return e.isSemicolonToken(r)&&r.loc.start.line>i.loc.end.line?i:r}function l(e){const t=a(e);return n.getTokenAfter(t,{includeComments:!0}).loc.start.line-t.loc.end.line>=2}function c(e,n,r){t.report({node:e,messageId:r?"expected":"unexpected",data:{value:e.expression.value,location:n},fix(t){const i=a(e);return r?"before"===n?t.insertTextBefore(e,"\n"):t.insertTextAfter(i,"\n"):t.removeRange("before"===n?[e.range[0]-1,e.range[0]]:[i.range[1],i.range[1]+1])}})}function u(t){const r=e.getDirectivePrologue(t);if(!r.length)return;const a=r[0],u=n.getCommentsBefore(a);u.length?("always"!==i||o(a)||c(a,"before",!0),"never"===i&&o(a)&&c(a,"before",!1)):"Program"===t.type&&"never"===i&&!u.length&&o(a)&&c(a,"before",!1);const p=r[r.length-1],d="Program"===t.type?t.body:t.body.body;(p!==d[d.length-1]||p.trailingComments)&&("always"!==s||l(p)||c(p,"after",!0),"never"===s&&l(p)&&c(p,"after",!1))}return{Program:u,FunctionDeclaration:u,FunctionExpression:u,ArrowFunctionExpression:u}}},DA}(),"lines-between-class-members":()=>function(){if(LA)return IA;LA=1;const e=Pw(),t={"*":{test:()=>!0},field:{test:e=>"PropertyDefinition"===e.type},method:{test:e=>"MethodDefinition"===e.type}};return IA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(n){const r=[];r[0]=n.options[0]||"always",r[1]=n.options[1]||{exceptAfterSingleLine:!1};const i="object"==typeof r[0]?r[0].enforce:[{blankLine:r[0],prev:"*",next:"*"}],s=n.sourceCode;function o(t,n){const r=s.getLastToken(t),i=s.getTokenBefore(r),o=s.getFirstToken(n);return e.isSemicolonToken(r)&&!e.isTokenOnSameLine(i,r)&&e.isTokenOnSameLine(r,o)?{curLast:i,nextFirst:r}:{curLast:r,nextFirst:o}}function a(e,t,n){const r=s.getTokenAfter(e,{includeComments:!0});return r!==t&&r.loc.start.line-e.loc.end.line<=n?a(r,t,n):e}function l(e,t,n){const r=s.getTokenBefore(e,{includeComments:!0});return r!==t&&e.loc.start.line-r.loc.end.line<=n?l(r,t,n):e}function c(e,n){return t[n].test(e)}function u(e,t){for(let n=i.length-1;n>=0;--n){const r=i[n];if(c(e,r.prev)&&c(t,r.next))return r.blankLine}return null}return{ClassBody(t){const i=t.body;for(let t=0;t1,b=(c=g,p=y,0!==s.getTokensBetween(c,p,{includeComments:!0}).length),v=a(f,h,0),E=u(i[t],i[t+1]);"never"===E&&_?n.report({node:i[t+1],messageId:"never",fix(e){return b?null:e.replaceTextRange([g.range[1],y.range[0]],"\n")}}):"always"!==E||m||_||n.report({node:i[t+1],messageId:"always",fix(e){return b?null:e.insertTextAfter(v,"\n")}})}var c,p}}}},IA}(),"logical-assignment-operators":()=>xk(),"max-classes-per-file":()=>(NA||(NA=1,jA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(e){const[t={}]=e.options,[n,r]="number"==typeof t?[!1,t||1]:[t.ignoreExpressions,t.max||1];let i=0;return{Program(){i=0},"Program:exit"(t){i>r&&e.report({node:t,messageId:"maximumExceeded",data:{classCount:i,max:r}})},ClassDeclaration(){i++},ClassExpression(){n||i++}}}}),jA),"max-depth":()=>(UA||(UA=1,FA={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(e){const t=[],n=e.options[0];let r=4;function i(){t.push(0)}function s(){t.pop()}function o(n){const i=++t[t.length-1];i>r&&e.report({node:n,messageId:"tooDeeply",data:{depth:i,maxDepth:r}})}function a(){t[t.length-1]--}return"object"==typeof n&&(Object.prototype.hasOwnProperty.call(n,"maximum")||Object.prototype.hasOwnProperty.call(n,"max"))&&(r=n.maximum||n.max),"number"==typeof n&&(r=n),{Program:i,FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i,StaticBlock:i,IfStatement(e){"IfStatement"!==e.parent.type&&o(e)},SwitchStatement:o,TryStatement:o,DoWhileStatement:o,WhileStatement:o,WithStatement:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,"IfStatement:exit":a,"SwitchStatement:exit":a,"TryStatement:exit":a,"DoWhileStatement:exit":a,"WhileStatement:exit":a,"WithStatement:exit":a,"ForStatement:exit":a,"ForInStatement:exit":a,"ForOfStatement:exit":a,"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s,"StaticBlock:exit":s,"Program:exit":s}}}),FA),"max-len":()=>Sk(),"max-lines":()=>Ok(),"max-lines-per-function":()=>Tk(),"max-nested-callbacks":()=>(XA||(XA=1,zA={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(e){const t=e.options[0];let n=10;"object"==typeof t&&(Object.prototype.hasOwnProperty.call(t,"maximum")||Object.prototype.hasOwnProperty.call(t,"max"))?n=t.maximum||t.max:"number"==typeof t&&(n=t);const r=[];function i(t){if("CallExpression"===t.parent.type&&r.push(t),r.length>n){const i={num:r.length,max:n};e.report({node:t,messageId:"exceed",data:i})}}function s(){r.pop()}return{ArrowFunctionExpression:i,"ArrowFunctionExpression:exit":s,FunctionExpression:i,"FunctionExpression:exit":s}}}),zA),"max-params":()=>function(){if(ZA)return GA;ZA=1;const e=Pw(),{upperCaseFirst:t}=tk();return GA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(n){const r=n.sourceCode,i=n.options[0];let s=3;function o(i){i.params.length>s&&n.report({loc:e.getFunctionHeadLoc(i,r),node:i,messageId:"exceed",data:{name:t(e.getFunctionNameWithKind(i)),count:i.params.length,max:s}})}return"object"==typeof i&&(Object.prototype.hasOwnProperty.call(i,"maximum")||Object.prototype.hasOwnProperty.call(i,"max"))&&(s=i.maximum||i.max),"number"==typeof i&&(s=i),{FunctionDeclaration:o,ArrowFunctionExpression:o,FunctionExpression:o}}},GA}(),"max-statements":()=>function(){if(HA)return YA;HA=1;const e=Pw(),{upperCaseFirst:t}=tk();return YA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(n){const r=[],i=n.options[0],s=n.options[1]&&n.options[1].ignoreTopLevelFunctions||!1,o=[];let a=10;function l(r,i,s){if(i>s){const o=t(e.getFunctionNameWithKind(r));n.report({node:r,messageId:"exceed",data:{name:o,count:i,max:s}})}}function c(){r.push(0)}function u(e){const t=r.pop();"StaticBlock"!==e.type&&(s&&0===r.length?o.push({node:e,count:t}):l(e,t,a))}return"object"==typeof i&&(Object.prototype.hasOwnProperty.call(i,"maximum")||Object.prototype.hasOwnProperty.call(i,"max"))?a=i.maximum||i.max:"number"==typeof i&&(a=i),{FunctionDeclaration:c,FunctionExpression:c,ArrowFunctionExpression:c,StaticBlock:c,BlockStatement:function(e){r[r.length-1]+=e.body.length},"FunctionDeclaration:exit":u,"FunctionExpression:exit":u,"ArrowFunctionExpression:exit":u,"StaticBlock:exit":u,"Program:exit"(){1!==o.length&&o.forEach((e=>{const t=e.count;l(e.node,t,a)}))}}}},YA}(),"max-statements-per-line":()=>wk(),"multiline-comment-style":()=>Ck(),"multiline-ternary":()=>function(){if(iP)return rP;iP=1;const e=Pw();return rP={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(t){const n=t.sourceCode,r=t.options[0],i="never"!==r,s="always-multiline"===r;return{ConditionalExpression(r){const o=n.getTokenAfter(r.test,e.isNotClosingParenToken),a=n.getTokenAfter(r.consequent,e.isNotClosingParenToken),l=n.getFirstToken(r),c=n.getTokenBefore(o),u=n.getTokenAfter(o),p=n.getTokenBefore(a),d=n.getTokenAfter(a),f=e.isTokenOnSameLine(c,u),h=e.isTokenOnSameLine(p,d),m=!!n.getCommentsInside(r).length;if(i){if(s&&r.loc.start.line===r.loc.end.line)return;f&&t.report({node:r.test,loc:{start:l.loc.start,end:c.loc.end},messageId:"expectedTestCons",fix:e=>m?null:e.replaceTextRange([c.range[1],o.range[0]],"\n")}),h&&t.report({node:r.consequent,loc:{start:u.loc.start,end:p.loc.end},messageId:"expectedConsAlt",fix:e=>m?null:e.replaceTextRange([p.range[1],a.range[0]],"\n")})}else f||t.report({node:r.test,loc:{start:l.loc.start,end:c.loc.end},messageId:"unexpectedTestCons",fix(t){if(m)return null;const n=[],r=e.isTokenOnSameLine(c,o),i=e.isTokenOnSameLine(o,u);return r||n.push(t.removeRange([c.range[1],o.range[0]])),i||n.push(t.removeRange([o.range[1],u.range[0]])),n}}),h||t.report({node:r.consequent,loc:{start:u.loc.start,end:p.loc.end},messageId:"unexpectedConsAlt",fix(t){if(m)return null;const n=[],r=e.isTokenOnSameLine(p,a),i=e.isTokenOnSameLine(a,d);return r||n.push(t.removeRange([p.range[1],a.range[0]])),i||n.push(t.removeRange([a.range[1],d.range[0]])),n}})}}}},rP}(),"new-cap":()=>Ak(),"new-parens":()=>function(){if(lP)return aP;lP=1;const e=Pw();return aP={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(t){const n="never"!==t.options[0],r=t.sourceCode;return{NewExpression(i){if(0!==i.arguments.length)return;const s=r.getLastToken(i),o=s&&e.isClosingParenToken(s)&&e.isOpeningParenToken(r.getTokenBefore(s))&&i.callee.range[1]e.insertTextAfter(i,"()")}):o&&t.report({node:i,messageId:"unnecessary",fix:e=>[e.remove(r.getTokenBefore(s)),e.remove(s),e.insertTextBefore(i,"("),e.insertTextAfter(i,")")]})}}}},aP}(),"newline-after-var":()=>Pk(),"newline-before-return":()=>kk(),"newline-per-chained-call":()=>function(){if(hP)return fP;hP=1;const e=Pw();return fP={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(t){const n=(t.options[0]||{}).ignoreChainWithDepth||2,r=t.sourceCode;function i(t){const n=function(e){return e.computed?e.optional?"?.[":"[":e.optional?"?.":"."}(t),i=r.getText(t.property).split(e.LINEBREAK_MATCHER),s=t.computed&&1===i.length?"]":"";return n+i[0]+s}return{"CallExpression:exit"(s){const o=e.skipChainExpression(s.callee);if("MemberExpression"!==o.type)return;let a=e.skipChainExpression(o.object),l=1;for(;a&&a.callee;)l+=1,a=e.skipChainExpression(e.skipChainExpression(a.callee).object);if(l>n&&e.isTokenOnSameLine(o.object,o.property)){const n=r.getTokenAfter(o.object,e.isNotClosingParenToken);t.report({node:o.property,loc:{start:n.loc.start,end:o.loc.end},messageId:"expected",data:{callee:i(o)},fix(e){return e.insertTextBefore(n,"\n")}})}}}}},fP}(),"no-alert":()=>Dk(),"no-array-constructor":()=>Rk(),"no-async-promise-executor":()=>(vP||(vP=1,bP={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(e){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(t){e.report({node:e.sourceCode.getFirstToken(t.arguments[0],(e=>"async"===e.value)),messageId:"async"})}}}}),bP),"no-await-in-loop":()=>function(){if(xP)return EP;function e(e){const t=e.type;return"FunctionDeclaration"===t||"FunctionExpression"===t||"ArrowFunctionExpression"===t||"ForOfStatement"===t&&!0===e.await}function t(e,t){switch(t.type){case"ForStatement":return e===t.test||e===t.update||e===t.body;case"ForOfStatement":case"ForInStatement":return e===t.body;case"WhileStatement":case"DoWhileStatement":return e===t.test||e===t.body;default:return!1}}return xP=1,EP={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(n){function r(r){if("ForOfStatement"===r.type&&!r.await)return;let i=r,s=i.parent;for(;s&&!e(s);){if(t(i,s))return void n.report({node:r,messageId:"unexpectedAwait"});i=s,s=s.parent}}return{AwaitExpression:r,ForOfStatement:r}}},EP}(),"no-bitwise":()=>Ik(),"no-buffer-constructor":()=>(wP||(wP=1,TP={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(e){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(t){e.report({node:t,messageId:"deprecated",data:{expr:"CallExpression"===t.type?"Buffer()":"new Buffer()"}})}}}}),TP),"no-caller":()=>(AP||(AP=1,CP={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(e){return{MemberExpression(t){const n=t.object.name,r=t.property.name;"arguments"===n&&!t.computed&&r&&r.match(/^calle[er]$/u)&&e.report({node:t,messageId:"unexpected",data:{prop:r}})}}}}),CP),"no-case-declarations":()=>(kP||(kP=1,PP={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},schema:[],messages:{unexpected:"Unexpected lexical declaration in case block."}},create(e){function t(e){switch(e.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return"var"!==e.kind;default:return!1}}return{SwitchCase(n){for(let r=0;rLk(),"no-class-assign":()=>function(){if(LP)return IP;LP=1;const e=Pw();return IP={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(t){const n=t.sourceCode;function r(n){e.getModifyingReferences(n.references).forEach((e=>{t.report({node:e.identifier,messageId:"class",data:{name:e.identifier.name}})}))}function i(e){n.getDeclaredVariables(e).forEach(r)}return{ClassDeclaration:i,ClassExpression:i}}},IP}(),"no-compare-neg-zero":()=>(MP||(MP=1,BP={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(e){function t(e){return"UnaryExpression"===e.type&&"-"===e.operator&&"Literal"===e.argument.type&&0===e.argument.value}const n=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(r){n.has(r.operator)&&(t(r.left)||t(r.right))&&e.report({node:r,messageId:"unexpected",data:{operator:r.operator}})}}}}),BP),"no-cond-assign":()=>Bk(),"no-confusing-arrow":()=>function(){if(UP)return FP;UP=1;const e=Pw();return FP={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(t){const n=t.options[0]||{},r=n.allowParens||void 0===n.allowParens,i=n.onlyOneSimpleParam,s=t.sourceCode;return{ArrowFunctionExpression:function(n){const o=n.body;!function(e){return e&&"ConditionalExpression"===e.type}(o)||r&&e.isParenthesised(s,o)||i&&(1!==n.params.length||"Identifier"!==n.params[0].type)||t.report({node:n,messageId:"confusing",fix(e){return r&&e.replaceText(n.body,`(${s.getText(n.body)})`)}})}}}},FP}(),"no-console":()=>Mk(),"no-const-assign":()=>function(){if($P)return WP;$P=1;const e=Pw();return WP={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(t){const n=t.sourceCode;function r(n){e.getModifyingReferences(n.references).forEach((e=>{t.report({node:e.identifier,messageId:"const",data:{name:e.identifier.name}})}))}return{VariableDeclaration(e){"const"===e.kind&&n.getDeclaredVariables(e).forEach(r)}}}},WP}(),"no-constant-binary-expression":()=>jk(),"no-constant-condition":()=>Nk(),"no-constructor-return":()=>(ZP||(ZP=1,GP={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:{},fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(e){const t=[];return{onCodePathStart(e,n){t.push(n)},onCodePathEnd(){t.pop()},ReturnStatement(n){const r=t[t.length-1];r.parent&&("MethodDefinition"!==r.parent.type||"constructor"!==r.parent.kind||n.parent.parent!==r&&!n.argument||e.report({node:n,messageId:"unexpected"}))}}}}),GP),"no-continue":()=>(HP||(HP=1,YP={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(e){return{ContinueStatement(t){e.report({node:t,messageId:"unexpected"})}}}}),YP),"no-control-regex":()=>function(){if(Vk)return Uk;Vk=1;const e=Tj().RegExpValidator,t=new class{constructor(){this._source="",this._controlChars=[],this._validator=new e(this)}onPatternEnter(){this._controlChars=[]}onCharacter(e,t,n){n>=0&&n<=31&&(this._source.codePointAt(e)===n||this._source.slice(e,t).startsWith("\\x")||this._source.slice(e,t).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${n.toString(16)}`.slice(-2)}`)}collectControlChars(e,t){const n="string"==typeof t&&t.includes("u"),r="string"==typeof t&&t.includes("v");this._controlChars=[],this._source=e;try{this._validator.validatePattern(e,void 0,void 0,{unicode:n,unicodeSets:r})}catch{}return this._controlChars}};return Uk={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(e){return{Literal(n){const r=function(e){return e.regex?e.regex:"string"!=typeof e.value||"NewExpression"!==e.parent.type&&"CallExpression"!==e.parent.type||"Identifier"!==e.parent.callee.type||"RegExp"!==e.parent.callee.name||e.parent.arguments[0]!==e?null:{pattern:e.value,flags:e.parent.arguments.length>1&&"Literal"===e.parent.arguments[1].type&&"string"==typeof e.parent.arguments[1].value?e.parent.arguments[1].value:null}}(n);if(r){const{pattern:i,flags:s}=r,o=t.collectControlChars(i,s);o.length>0&&e.report({node:n,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},Uk}(),"no-debugger":()=>(Wk||(Wk=1,Kk={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(e){return{DebuggerStatement(t){e.report({node:t,messageId:"unexpected"})}}}}),Kk),"no-delete-var":()=>(qk||(qk=1,$k={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(e){return{UnaryExpression(t){"delete"===t.operator&&"Identifier"===t.argument.type&&e.report({node:t,messageId:"unexpected"})}}}}),$k),"no-div-regex":()=>(zk||(zk=1,Qk={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(e){const t=e.sourceCode;return{Literal(n){const r=t.getFirstToken(n);"RegularExpression"===r.type&&"="===r.value[1]&&e.report({node:n,messageId:"unexpected",fix(e){return e.replaceTextRange([r.range[0]+1,r.range[0]+2],"[=]")}})}}}}),Qk),"no-dupe-args":()=>(Gk||(Gk=1,Xk={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(e){const t=e.sourceCode;function n(e){return"Parameter"===e.type}function r(r){const i=t.getDeclaredVariables(r);for(let t=0;t=2&&e.report({node:r,messageId:"unexpected",data:{name:s.name}})}}return{FunctionDeclaration:r,FunctionExpression:r}}}),Xk),"no-dupe-class-members":()=>wj(),"no-dupe-else-if":()=>function(){if(Jk)return Hk;Jk=1;const e=Pw();function t(e,t,n){return t.every((t=>n.some((n=>e(t,n)))))}function n(e,t){return"LogicalExpression"===t.type&&t.operator===e?[...n(e,t.left),...n(e,t.right)]:[t]}const r=n.bind(null,"||"),i=n.bind(null,"&&");return Hk={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(n){const s=n.sourceCode,o=t.bind(null,(function t(n,r){return n.type===r.type&&("LogicalExpression"!==n.type||"||"!==n.operator&&"&&"!==n.operator||n.operator!==r.operator?e.equalTokens(n,r,s):t(n.left,r.left)&&t(n.right,r.right)||t(n.left,r.right)&&t(n.right,r.left))}));return{IfStatement(e){const t=e.test;let s=e,a=("LogicalExpression"===t.type&&"&&"===t.operator?[t,...i(t)]:[t]).map((e=>r(e).map(i)));for(;s.parent&&"IfStatement"===s.parent.type&&s.parent.alternate===s;){s=s.parent;const e=r(s.test).map(i);if(a=a.map((t=>t.filter((t=>!e.some((e=>o(e,t))))))),a.some((e=>0===e.length))){n.report({node:t,messageId:"unexpected"});break}}}}}},Hk}(),"no-dupe-keys":()=>function(){if(tD)return eD;tD=1;const e=Pw(),t=/^(?:init|get)$/u,n=/^(?:init|set)$/u;class r{constructor(e,t){this.upper=e,this.node=t,this.properties=new Map}getPropertyInfo(t){const n=e.getStaticPropertyName(t);return this.properties.has(n)||this.properties.set(n,{get:!1,set:!1}),this.properties.get(n)}isPropertyDefined(e){const r=this.getPropertyInfo(e);return t.test(e.kind)&&r.get||n.test(e.kind)&&r.set}defineProperty(e){const r=this.getPropertyInfo(e);t.test(e.kind)&&(r.get=!0),n.test(e.kind)&&(r.set=!0)}}return eD={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(t){let n=null;return{ObjectExpression(e){n=new r(n,e)},"ObjectExpression:exit"(){n=n.upper},Property(r){const i=e.getStaticPropertyName(r);"ObjectExpression"===r.parent.type&&null!==i&&(n.isPropertyDefined(r)&&t.report({node:n.node,loc:r.key.loc,messageId:"unexpected",data:{name:i}}),n.defineProperty(r))}}}},eD}(),"no-duplicate-case":()=>function(){if(rD)return nD;rD=1;const e=Pw();return nD={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(t){const n=t.sourceCode;function r(t,r){return t.type===r.type&&e.equalTokens(t,r,n)}return{SwitchStatement(e){const n=[];for(const i of e.cases)if(i.test){const e=i.test;n.some((t=>r(t,e)))?t.report({node:i,messageId:"unexpected"}):n.push(e)}}}}},nD}(),"no-duplicate-imports":()=>Cj(),"no-else-return":()=>Pj(),"no-empty":()=>function(){if(pD)return uD;pD=1;const e=Pw();return uD={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(t){const n=(t.options[0]||{}).allowEmptyCatch||!1,r=t.sourceCode;return{BlockStatement(i){0===i.body.length&&(e.isFunction(i.parent)||n&&"CatchClause"===i.parent.type||r.getCommentsInside(i).length>0||t.report({node:i,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(e){const t=[i.range[0]+1,i.range[1]-1];return e.replaceTextRange(t," /* empty */ ")}}]}))},SwitchStatement(e){void 0!==e.cases&&0!==e.cases.length||t.report({node:e,messageId:"unexpected",data:{type:"switch"}})}}}},uD}(),"no-empty-character-class":()=>function(){if(fD)return dD;fD=1;const{RegExpParser:e,visitRegExpAST:t}=Tj(),n=new e,r=/\[\]/u;return dD={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(e){return{"Literal[regex]"(i){const{pattern:s,flags:o}=i.regex;if(!r.test(s))return;let a;try{a=n.parsePattern(s,0,s.length,{unicode:o.includes("u"),unicodeSets:o.includes("v")})}catch{return}t(a,{onCharacterClassEnter(t){t.negate||0!==t.elements.length||e.report({node:i,messageId:"unexpected"})}})}}}},dD}(),"no-empty-function":()=>function(){if(mD)return hD;mD=1;const e=Pw(),t=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);return hD={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:t},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(t){const n=(t.options[0]||{}).allow||[],r=t.sourceCode;function i(i){const s=function(e){const t=e.parent;let n="";if("ArrowFunctionExpression"===e.type)return"arrowFunctions";if("Property"===t.type){if("get"===t.kind)return"getters";if("set"===t.kind)return"setters";n=t.method?"methods":"functions"}else if("MethodDefinition"===t.type){if("get"===t.kind)return"getters";if("set"===t.kind)return"setters";if("constructor"===t.kind)return"constructors";n="methods"}else n="functions";let r="";if(e.generator)r="generator";else{if(!e.async)return n;r="async"}return r+n[0].toUpperCase()+n.slice(1)}(i),o=e.getFunctionNameWithKind(i),a=r.getTokens(i.body,{includeComments:!0,filter:e.isCommentToken});n.includes(s)||"BlockStatement"!==i.body.type||0!==i.body.body.length||0!==a.length||t.report({node:i,loc:i.body.loc,messageId:"unexpected",data:{name:o}})}return{ArrowFunctionExpression:i,FunctionDeclaration:i,FunctionExpression:i}}},hD}(),"no-empty-pattern":()=>function(){if(yD)return gD;yD=1;const e=Pw();return gD={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(t){const n=(t.options[0]||{}).allowObjectPatternsAsParameters||!1;return{ObjectPattern(r){r.properties.length>0||n&&(e.isFunction(r.parent)||"AssignmentPattern"===r.parent.type&&e.isFunction(r.parent.parent)&&"ObjectExpression"===r.parent.right.type&&0===r.parent.right.properties.length)||t.report({node:r,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(e){0===e.elements.length&&t.report({node:e,messageId:"unexpected",data:{type:"array"}})}}}},gD}(),"no-empty-static-block":()=>(bD||(bD=1,_D={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(e){const t=e.sourceCode;return{StaticBlock(n){if(0===n.body.length){const r=t.getLastToken(n);0===t.getCommentsBefore(r).length&&e.report({node:n,messageId:"unexpected"})}}}}}),_D),"no-eq-null":()=>(ED||(ED=1,vD={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(e){return{BinaryExpression(t){const n="=="===t.operator||"!="===t.operator;("Literal"===t.right.type&&"null"===t.right.raw&&n||"Literal"===t.left.type&&"null"===t.left.raw&&n)&&e.report({node:t,messageId:"unexpected"})}}}}),vD),"no-eval":()=>kj(),"no-ex-assign":()=>function(){if(TD)return OD;TD=1;const e=Pw();return OD={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(t){const n=t.sourceCode;function r(n){e.getModifyingReferences(n.references).forEach((e=>{t.report({node:e.identifier,messageId:"unexpected"})}))}return{CatchClause(e){n.getDeclaredVariables(e).forEach(r)}}}},OD}(),"no-extend-native":()=>Dj(),"no-extra-bind":()=>Rj(),"no-extra-boolean-cast":()=>Ij(),"no-extra-label":()=>function(){if(ID)return RD;ID=1;const e=Pw();return RD={meta:{type:"suggestion",docs:{description:"Disallow unnecessary labels",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-label"},schema:[],fixable:"code",messages:{unexpected:"This label '{{name}}' is unnecessary."}},create(t){const n=t.sourceCode;let r=null;function i(e){r={label:"LabeledStatement"===e.parent.type?e.parent.label:null,breakable:!0,upper:r}}function s(){r=r.upper}function o(e){if(!e.label)return;const i=e.label;for(let s=r;null!==s;s=s.upper)if(s.breakable||s.label&&s.label.name===i.name)return void(s.breakable&&s.label&&s.label.name===i.name&&t.report({node:i,messageId:"unexpected",data:i,fix(t){const r=n.getFirstToken(e);return n.commentsExistBetween(r,i)?null:t.removeRange([r.range[1],i.range[1]])}}))}return{WhileStatement:i,"WhileStatement:exit":s,DoWhileStatement:i,"DoWhileStatement:exit":s,ForStatement:i,"ForStatement:exit":s,ForInStatement:i,"ForInStatement:exit":s,ForOfStatement:i,"ForOfStatement:exit":s,SwitchStatement:i,"SwitchStatement:exit":s,LabeledStatement:function(t){e.isBreakableStatement(t.body)||(r={label:t.label,breakable:!1,upper:r})},"LabeledStatement:exit":function(t){e.isBreakableStatement(t.body)||(r=r.upper)},BreakStatement:o,ContinueStatement:o}}},RD}(),"no-extra-parens":()=>Lj(),"no-extra-semi":()=>function(){if(jD)return MD;jD=1;const e=Aj(),t=Pw();return MD={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(n){const r=n.sourceCode;function i(e){const n=r.getTokenAfter(e);if(!n||"String"!==n.type)return!0;const i=r.getNodeByRangeIndex(n.range[0]);return!t.isTopLevelExpressionStatement(i.parent)}function s(t){n.report({node:t,messageId:"unexpected",fix:i(t)?r=>new e(r,n.sourceCode).retainSurroundingTokens(t).remove(t):null})}function o(e){for(let n=e;"Punctuator"===n.type&&!t.isClosingBraceToken(n);n=r.getTokenAfter(n))t.isSemicolonToken(n)&&s(n)}return{EmptyStatement(e){const t=e.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(t.type)||s(e)},ClassBody(e){o(r.getFirstToken(e,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(e){o(r.getTokenAfter(e))}}}},MD}(),"no-fallthrough":()=>Bj(),"no-floating-decimal":()=>function(){if(VD)return UD;VD=1;const e=Pw();return UD={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(t){const n=t.sourceCode;return{Literal(r){"number"==typeof r.value&&(r.raw.startsWith(".")&&t.report({node:r,messageId:"leading",fix(t){const i=n.getTokenBefore(r),s=i&&i.range[1]===r.range[0]&&!e.canTokensBeAdjacent(i,`0${r.raw}`);return t.insertTextBefore(r,s?" 0":"0")}}),r.raw.indexOf(".")===r.raw.length-1&&t.report({node:r,messageId:"trailing",fix:e=>e.insertTextAfter(r,"0")}))}}}},UD}(),"no-func-assign":()=>Mj(),"no-global-assign":()=>(qD||(qD=1,$D={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(e){const t=e.options[0],n=e.sourceCode,r=t&&t.exceptions||[];function i(t,n,r){const i=t.identifier;!1!==t.init||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,messageId:"globalShouldNotBeModified",data:{name:i.name}})}function s(e){!1!==e.writeable||r.includes(e.name)||e.references.forEach(i)}return{Program(e){n.getScope(e).variables.forEach(s)}}}}),$D),"no-implicit-coercion":()=>jj(),"no-implicit-globals":()=>(GD||(GD=1,XD={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(e){const t=e.options[0]&&!0===e.options[0].lexicalBindings,n=e.sourceCode;function r(t,n,r){e.report({node:t,messageId:n,data:{kind:r}})}return{Program(e){const i=n.getScope(e);i.variables.forEach((e=>{const n=!1===e.writeable;!0===e.writeable||e.eslintExported||e.defs.forEach((e=>{const i=e.node;("FunctionName"===e.type||"Variable"===e.type&&"var"===e.parent.kind)&&(n?r(i,"redeclarationOfReadonlyGlobal"):r(i,"globalNonLexicalBinding","FunctionName"===e.type?"function":`'${e.parent.kind}'`)),t&&("ClassName"!==e.type&&("Variable"!==e.type||"let"!==e.parent.kind&&"const"!==e.parent.kind)||(n?r(i,"redeclarationOfReadonlyGlobal"):r(i,"globalLexicalBinding","ClassName"===e.type?"class":`'${e.parent.kind}'`)))}))})),i.implicit.variables.forEach((e=>{const t=i.set.get(e.name);let n;if(t){if(t.writeable)return;n="assignmentToReadonlyGlobal"}else n="globalVariableLeak";e.defs.forEach((e=>{r(e.node,n)}))}))}}}}),XD),"no-implied-eval":()=>Nj(),"no-import-assign":()=>Fj(),"no-inline-comments":()=>function(){if(tR)return eR;tR=1;const e=Pw();return eR={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(t){const n=t.sourceCode,r=t.options[0];let i;function s(r){const s=String(n.lines[r.loc.start.line-1]),o=String(n.lines[r.loc.end.line-1]),a=s.slice(0,r.loc.start.column).trim(),l=o.slice(r.loc.end.column).trim(),c=!a,u=!l;if(!(c&&u||i&&i.test(r.value))){if((c||"{"===a)&&(u||"}"===l)){const e=n.getNodeByRangeIndex(r.range[0]);if(e&&"JSXEmptyExpression"===e.type)return}e.isDirectiveComment(r)||t.report({node:r,messageId:"unexpectedInlineComment"})}}return r&&r.ignorePattern&&(i=new RegExp(r.ignorePattern,"u")),{Program(){n.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(s)}}}},eR}(),"no-inner-declarations":()=>function(){if(rR)return nR;rR=1;const e=Pw(),t=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),n=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function r(t){let{parent:n}=t;for(;n;){if("StaticBlock"===n.type)return"class static block body";if(e.isFunction(n))return"function body";({parent:n}=n)}return"program"}return nR={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(e){function i(i){const s=i.parent;"BlockStatement"===s.type&&n.has(s.parent.type)||t.has(s.type)||e.report({node:i,messageId:"moveDeclToRoot",data:{type:"FunctionDeclaration"===i.type?"function":"variable",body:r(i)}})}return{FunctionDeclaration:i,VariableDeclaration(t){"both"===e.options[0]&&"var"===t.kind&&i(t)}}}},nR}(),"no-invalid-regexp":()=>Uj(),"no-invalid-this":()=>function(){if(aR)return oR;aR=1;const e=Pw();function t(e,t){return"function"===e.origin&&"ArrowFunctionExpression"===t.type}return oR={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(n){const r=!1!==(n.options[0]||{}).capIsConstructor,i=[],s=n.sourceCode;return i.getCurrent=function(){const t=this[this.length-1];return t.init||(t.init=!0,t.valid=!e.isDefaultThisBinding(t.node,s,{capIsConstructor:r})),t},{onCodePathStart(e,r){if(!t(e,r))if("program"!==e.origin)i.push({init:!s.getScope(r).isStrict,node:r,valid:!0});else{const e=s.getScope(r),t=n.languageOptions.parserOptions.ecmaFeatures||{};i.push({init:!0,node:r,valid:!("module"===r.sourceType||t.globalReturn&&e.childScopes[0].isStrict)})}},onCodePathEnd(e,n){t(e,n)||i.pop()},ThisExpression(e){const t=i.getCurrent();t&&!t.valid&&n.report({node:e,messageId:"unexpectedThis"})}}}},oR}(),"no-irregular-whitespace":()=>Vj(),"no-iterator":()=>function(){if(pR)return uR;pR=1;const{getStaticPropertyName:e}=Pw();return uR={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(t){return{MemberExpression(n){"__iterator__"===e(n)&&t.report({node:n,messageId:"noIterator"})}}}},uR}(),"no-label-var":()=>Kj(),"no-labels":()=>function(){if(mR)return hR;mR=1;const e=Pw();return hR={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(t){const n=t.options[0],r=n&&n.allowLoop,i=n&&n.allowSwitch;let s=null;function o(t){return e.isLoop(t)?"loop":"SwitchStatement"===t.type?"switch":"other"}function a(e){switch(e){case"loop":return r;case"switch":return i;default:return!1}}function l(e){let t=s;for(;t;){if(t.label===e)return t.kind;t=t.upper}return"other"}return{LabeledStatement(e){s={label:e.label.name,kind:o(e.body),upper:s}},"LabeledStatement:exit"(e){a(s.kind)||t.report({node:e,messageId:"unexpectedLabel"}),s=s.upper},BreakStatement(e){e.label&&!a(l(e.label.name))&&t.report({node:e,messageId:"unexpectedLabelInBreak"})},ContinueStatement(e){e.label&&!a(l(e.label.name))&&t.report({node:e,messageId:"unexpectedLabelInContinue"})}}}},hR}(),"no-lone-blocks":()=>(yR||(yR=1,gR={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(e){const t=[];let n;const r=e.sourceCode;function i(t){const n="BlockStatement"===t.parent.type||"StaticBlock"===t.parent.type?"redundantNestedBlock":"redundantBlock";e.report({node:t,messageId:n})}function s(e){return"BlockStatement"===e.parent.type||"StaticBlock"===e.parent.type||"Program"===e.parent.type||"SwitchCase"===e.parent.type&&!(e.parent.consequent[0]===e&&1===e.parent.consequent.length)}function o(e){if(0===t.length)return;const n=e.parent;t[t.length-1]===n&&t.pop()}return n={BlockStatement(e){s(e)&&i(e)}},e.languageOptions.ecmaVersion>=2015&&(n={BlockStatement(e){s(e)&&t.push(e)},"BlockStatement:exit"(e){t.length>0&&t[t.length-1]===e?(t.pop(),i(e)):"BlockStatement"!==e.parent.type&&"StaticBlock"!==e.parent.type||1!==e.parent.body.length||i(e)}},n.VariableDeclaration=function(e){"let"!==e.kind&&"const"!==e.kind||o(e)},n.FunctionDeclaration=function(e){r.getScope(e).isStrict&&o(e)},n.ClassDeclaration=o),n}}),gR),"no-lonely-if":()=>(bR||(bR=1,_R={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(e){const t=e.sourceCode;return{IfStatement(n){const r=n.parent,i=r.parent;r&&"BlockStatement"===r.type&&1===r.body.length&&i&&"IfStatement"===i.type&&r===i.alternate&&e.report({node:n,messageId:"unexpectedLonelyIf",fix(e){const i=t.getFirstToken(r),s=t.getLastToken(r),o=t.getTokenBefore(i),a=t.getTokenAfter(s),l=t.getLastToken(n.consequent),c=t.getText();return c.slice(i.range[1],n.range[0]).trim()||c.slice(n.range[1],s.range[0]).trim()||"BlockStatement"!==n.consequent.type&&";"!==l.value&&a&&(n.consequent.loc.end.line===a.loc.start.line||/^[([/+`-]/u.test(a.value)||"++"===l.value||"--"===l.value)?null:e.replaceTextRange([i.range[0],s.range[1]],(o.range[1]===i.range[0]?" ":"")+t.getText(n))}})}}}}),_R),"no-loop-func":()=>Wj(),"no-loss-of-precision":()=>$j(),"no-magic-numbers":()=>qj(),"no-misleading-character-class":()=>function(){if(FR)return NR;FR=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),{RegExpParser:i,visitRegExpAST:s}=Tj(),{isCombiningCharacter:o,isEmojiModifier:a,isRegionalIndicatorSymbol:l,isSurrogatePair:c}=Qj(),u=Pw(),{isValidWithUnicodeFlag:p}=zj();function d(e){return/^\\u\{[\da-f]+\}$/iu.test(e.raw)}const f={surrogatePairWithoutUFlag(e){return e.some(((t,n)=>{if(0===n)return!1;const r=e[n-1];return c(r.value,t.value)&&!d(r)&&!d(t)}))},surrogatePair(e){return e.some(((t,n)=>{if(0===n)return!1;const r=e[n-1];return c(r.value,t.value)&&(d(r)||d(t))}))},combiningClass(e){return e.some(((t,n)=>0!==n&&o(t.value)&&!o(e[n-1].value)))},emojiModifier(e){return e.some(((t,n)=>0!==n&&a(t.value)&&!a(e[n-1].value)))},regionalIndicatorSymbol(e){return e.some(((t,n)=>0!==n&&l(t.value)&&l(e[n-1].value)))},zwj(e){const t=e.length-1;return e.some(((n,r)=>0!==r&&r!==t&&8205===n.value&&8205!==e[r-1].value&&8205!==e[r+1].value))}},h=Object.keys(f);return NR={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(o){const a=o.sourceCode,l=new i;function c(e,t,n,r){let i;try{i=l.parsePattern(t,0,t.length,{unicode:n.includes("u"),unicodeSets:n.includes("v")})}catch{return}const a=new Set;s(i,{onCharacterClassEnter(e){for(const t of function*(e){let t=[];for(const n of e)switch(n.type){case"Character":t.push(n);break;case"CharacterClassRange":t.push(n.min),yield t,t=[n.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":t.length>0&&(yield t,t=[])}t.length>0&&(yield t)}(e.elements))for(const e of h)f[e](t)&&a.add(e)}});for(const t of a){let n;"surrogatePairWithoutUFlag"===t&&(n=[{messageId:"suggestUnicodeFlag",fix:r}]),o.report({node:e,messageId:t,suggest:n})}}return{"Literal[regex]"(e){c(e,e.regex.pattern,e.regex.flags,(t=>p(o.languageOptions.ecmaVersion,e.regex.pattern)?t.insertTextAfter(e,"u"):null))},Program(i){const s=a.getScope(i),l=new n(s);for(const{node:n}of l.iterateGlobalReferences({RegExp:{[e]:!0,[t]:!0}})){const[e,t]=n.arguments,i=r(e,s),l=r(t,s);"string"==typeof i&&c(n,i,l||"",(e=>{if(!p(o.languageOptions.ecmaVersion,i))return null;if(1===n.arguments.length){const t=a.getLastToken(n,{skip:1});return e.insertTextAfter(t,u.isCommaToken(t)?' "u",':', "u"')}if("Literal"===t.type&&"string"==typeof t.value||"TemplateLiteral"===t.type){const n=[t.range[0],t.range[1]-1];return e.insertTextAfterRange(n,"u")}return null}))}}}}},NR}(),"no-mixed-operators":()=>Xj(),"no-mixed-requires":()=>Gj(),"no-mixed-spaces-and-tabs":()=>(qR||(qR=1,$R={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(e){const t=e.sourceCode;let n;switch(e.options[0]){case!0:case"smart-tabs":n=!0;break;default:n=!1}return{"Program:exit"(r){const i=t.lines,s=t.getAllComments(),o=new Set;s.forEach((e=>{for(let t=e.loc.start.line+1;t<=e.loc.end.line;t++)o.add(t)}));let a=/^(?=( +|\t+))\1(?:\t| )/u;n&&(a=/^(?=(\t*))\1(?=( +))\2\t/u),i.forEach(((n,i)=>{const s=a.exec(n);if(s){const n=i+1,a={start:{line:n,column:s[0].length-2},end:{line:n,column:s[0].length}};if(!o.has(n)){const n=t.getNodeByRangeIndex(t.getIndexFromLoc(a.start));n&&["Literal","TemplateElement"].includes(n.type)||e.report({node:r,loc:a,messageId:"mixedSpacesAndTabs"})}}}))}}}}),$R),"no-multi-assign":()=>(zR||(zR=1,QR={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(e){const t=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return(e.options[0]||{ignoreNonDeclaration:!1}).ignoreNonDeclaration||t.push("AssignmentExpression > AssignmentExpression.right"),{[t](t){e.report({node:t,messageId:"unexpectedChain"})}}}}),QR),"no-multi-spaces":()=>function(){if(GR)return XR;GR=1;const e=Pw();return XR={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=r.ignoreEOLComments,s=Object.assign({Property:!0},r.exceptions),o=Object.keys(s).some((e=>s[e]));function a(e){const t=e.value.split("\n"),n=t[0],r=`${n.slice(0,12)}...`;return 1===t.length&&n.length<=12?n:r}return{Program(){n.tokensAndComments.forEach(((r,l,c)=>{if(l===c.length-1)return;const u=c[l+1];if(!n.text.slice(r.range[1],u.range[0]).includes(" ")||r.loc.end.linee.replaceTextRange([r.range[1],u.range[0]]," ")})}))}}}},XR}(),"no-multi-str":()=>function(){if(YR)return ZR;YR=1;const e=Pw();return ZR={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(t){return{Literal(n){e.LINEBREAK_MATCHER.test(n.raw)&&!function(e){return 0===e.type.indexOf("JSX")}(n.parent)&&t.report({node:n,messageId:"multilineString"})}}}},ZR}(),"no-multiple-empty-lines":()=>(JR||(JR=1,HR={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(e){let t=2,n=t,r=t;e.options.length&&(t=e.options[0].max,n=void 0!==e.options[0].maxEOF?e.options[0].maxEOF:t,r=void 0!==e.options[0].maxBOF?e.options[0].maxBOF:t);const i=e.sourceCode,s=""===i.lines[i.lines.length-1]?i.lines.slice(0,-1):i.lines,o=new Set;return{TemplateLiteral(e){e.quasis.forEach((e=>{for(let t=e.loc.start.line;t((t.trim()||o.has(n+1))&&e.push(n+1),e)),[]).concat(s.length+1).reduce(((o,l)=>{let c,u;return 0===o?(c="blankBeginningOfFile",u=r):l===s.length+1?(c="blankEndOfFile",u=n):(c="consecutiveBlank",u=t),l-o-1>u&&e.report({node:a,loc:{start:{line:o+u+1,column:0},end:{line:l,column:0}},messageId:c,data:{max:u,pluralizedLines:1===u?"line":"lines"},fix(e){const t=i.getIndexFromLoc({line:o+1,column:0}),n=l-u,r=n<=s.length?i.getIndexFromLoc({line:n,column:0}):i.text.length;return e.removeRange([t,r])}}),l}),0)}}}}),HR),"no-native-reassign":()=>(tI||(tI=1,eI={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(e){const t=e.options[0],n=t&&t.exceptions||[],r=e.sourceCode;function i(t,n,r){const i=t.identifier;!1!==t.init||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,messageId:"nativeReassign",data:i})}function s(e){!1!==e.writeable||n.includes(e.name)||e.references.forEach(i)}return{Program(e){r.getScope(e).variables.forEach(s)}}}}),eI),"no-negated-condition":()=>(rI||(rI=1,nI={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(e){function t(e){return"UnaryExpression"===(t=e.test).type&&"!"===t.operator||function(e){return"BinaryExpression"===e.type&&("!="===e.operator||"!=="===e.operator)}(e.test);var t}return{IfStatement(n){(function(e){return e.alternate&&"IfStatement"!==e.alternate.type})(n)&&t(n)&&e.report({node:n,messageId:"unexpectedNegated"})},ConditionalExpression(n){t(n)&&e.report({node:n,messageId:"unexpectedNegated"})}}}}),nI),"no-negated-in-lhs":()=>(sI||(sI=1,iI={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(e){return{BinaryExpression(t){"in"===t.operator&&"UnaryExpression"===t.left.type&&"!"===t.left.operator&&e.report({node:t,messageId:"negatedLHS"})}}}}),iI),"no-nested-ternary":()=>(aI||(aI=1,oI={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(e){return{ConditionalExpression(t){"ConditionalExpression"!==t.alternate.type&&"ConditionalExpression"!==t.consequent.type||e.report({node:t,messageId:"noNestedTernary"})}}}}),oI),"no-new":()=>(cI||(cI=1,lI={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(e){return{"ExpressionStatement > NewExpression"(t){e.report({node:t.parent,messageId:"noNewStatement"})}}}}),lI),"no-new-func":()=>function(){if(pI)return uI;pI=1;const e=Pw(),t=new Set(["apply","bind","call"]);return uI={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(n){const r=n.sourceCode;return{"Program:exit"(i){const s=r.getScope(i).set.get("Function");s&&0===s.defs.length&&s.references.forEach((r=>{const i=r.identifier,{parent:s}=i;let o;if(s)if(i!==s.callee||"NewExpression"!==s.type&&"CallExpression"!==s.type){if("MemberExpression"===s.type&&i===s.object&&t.has(e.getStaticPropertyName(s))){const e="ChainExpression"===s.parent.type?s.parent:s;"CallExpression"===e.parent.type&&e.parent.callee===e&&(o=e.parent)}}else o=s;o&&n.report({node:o,messageId:"noFunctionConstructor"})}))}}}},uI}(),"no-new-native-nonconstructor":()=>function(){if(fI)return dI;fI=1;const e=["Symbol","BigInt"];return dI={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(t){const n=t.sourceCode;return{"Program:exit"(r){const i=n.getScope(r);for(const n of e){const e=i.set.get(n);e&&0===e.defs.length&&e.references.forEach((e=>{const r=e.identifier,i=r.parent;i&&"NewExpression"===i.type&&i.callee===r&&t.report({node:r,messageId:"noNewNonconstructor",data:{name:n}})}))}}}}},dI}(),"no-new-object":()=>function(){if(mI)return hI;mI=1;const e=Pw();return hI={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(t){const n=t.sourceCode;return{NewExpression(r){const i=e.getVariableByName(n.getScope(r),r.callee.name);i&&i.identifiers.length>0||"Object"===r.callee.name&&t.report({node:r,messageId:"preferLiteral"})}}}},hI}(),"no-new-require":()=>(yI||(yI=1,gI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(e){return{NewExpression(t){"Identifier"===t.callee.type&&"require"===t.callee.name&&e.report({node:t,messageId:"noNewRequire"})}}}}),gI),"no-new-symbol":()=>(bI||(bI=1,_I={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(e){const t=e.sourceCode;return{"Program:exit"(n){const r=t.getScope(n).set.get("Symbol");r&&0===r.defs.length&&r.references.forEach((t=>{const n=t.identifier,r=n.parent;r&&"NewExpression"===r.type&&r.callee===n&&e.report({node:n,messageId:"noNewSymbol"})}))}}}}),_I),"no-new-wrappers":()=>function(){if(EI)return vI;EI=1;const{getVariableByName:e}=Pw();return vI={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(t){const{sourceCode:n}=t;return{NewExpression(r){const{name:i}=r.callee;if(["String","Number","Boolean"].includes(i)){const s=e(n.getScope(r),i);s&&0===s.identifiers.length&&t.report({node:r,messageId:"noConstructor",data:{fn:i}})}}}}},vI}(),"no-nonoctal-decimal-escape":()=>function(){if(SI)return xI;SI=1;const e=/\\[89]/u;function t(e){return`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`}return xI={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(n){const r=n.sourceCode;function i(e,t,n){return{messageId:e,data:{original:r.getText().slice(...t),replacement:n},fix(e){return e.replaceTextRange(t,n)}}}return{Literal(s){if("string"!=typeof s.value)return;if(!e.test(s.raw))return;const o=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let a;for(;a=o.exec(s.raw);){const{previousEscape:e,decimalEscape:o}=a.groups,l=s.range[0]+a.index+a[0].length,c=l-o.length,u=[c,l],p=[];"\\0"===e?p.push(i("refactor",[c-e.length,l],`${t("\0")}${o[1]}`),i("refactor",u,t(o[1]))):p.push(i("refactor",u,o[1])),p.push(i("escapeBackslash",u,`\\${o}`)),n.report({node:s,loc:{start:r.getLocFromIndex(c),end:r.getLocFromIndex(l)},messageId:"decimalEscape",data:{decimalEscape:o},suggest:p})}}}}},xI}(),"no-obj-calls":()=>function(){if(TI)return OI;TI=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n}=rS(),r=Pw().getStaticPropertyName,i=["Atomics","JSON","Math","Reflect","Intl"];function s(e){return"ChainExpression"===e.type?s(e.expression):"MemberExpression"===e.type?r(e):e.name}return OI={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(r){const o=r.sourceCode;return{Program(a){const l=o.getScope(a),c=new n(l),u={};for(const n of i)u[n]={[e]:!0,[t]:!0};for(const{node:e,path:t}of c.iterateGlobalReferences(u)){const n=s(e.callee),i=t[0],o=n===i?"unexpectedCall":"unexpectedRefCall";r.report({node:e,messageId:o,data:{name:n,ref:i}})}}}}},OI}(),"no-object-constructor":()=>Zj(),"no-octal":()=>(PI||(PI=1,AI={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(e){return{Literal(t){"number"==typeof t.value&&/^0[0-9]/u.test(t.raw)&&e.report({node:t,messageId:"noOctal"})}}}}),AI),"no-octal-escape":()=>(DI||(DI=1,kI={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(e){return{Literal(t){if("string"!=typeof t.value)return;const n=t.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);n&&e.report({node:t,messageId:"octalEscapeSequence",data:{sequence:n[1]}})}}}}),kI),"no-param-reassign":()=>Yj(),"no-path-concat":()=>(BI||(BI=1,LI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(e){const t=/^__(?:dir|file)name$/u;return{BinaryExpression(n){const r=n.left,i=n.right;"+"===n.operator&&("Identifier"===r.type&&t.test(r.name)||"Identifier"===i.type&&t.test(i.name))&&e.report({node:n,messageId:"usePathFunctions"})}}}}),LI),"no-plusplus":()=>Hj(),"no-process-env":()=>(FI||(FI=1,NI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of process.env."}},create(e){return{MemberExpression(t){const n=t.object.name,r=t.property.name;"process"===n&&!t.computed&&r&&"env"===r&&e.report({node:t,messageId:"unexpectedProcessEnv"})}}}}),NI),"no-process-exit":()=>(VI||(VI=1,UI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(e){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(t){e.report({node:t.parent,messageId:"noProcessExit"})}}}}),UI),"no-promise-executor-return":()=>Jj(),"no-proto":()=>function(){if(qI)return $I;qI=1;const{getStaticPropertyName:e}=Pw();return $I={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(t){return{MemberExpression(n){"__proto__"===e(n)&&t.report({node:n,messageId:"unexpectedProto"})}}}},$I}(),"no-prototype-builtins":()=>eN(),"no-redeclare":()=>function(){if(GI)return XI;GI=1;const e=Pw();return XI={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(t){const n=Boolean(0===t.options.length||t.options[0].builtinGlobals),r=t.sourceCode;function*i(t){!n||"readonly"!==t.eslintImplicitGlobalSetting&&"writable"!==t.eslintImplicitGlobalSetting||(yield{type:"builtin"});for(const e of t.identifiers)yield{type:"syntax",node:e,loc:e.loc};if(t.eslintExplicitGlobalComments)for(const n of t.eslintExplicitGlobalComments)yield{type:"comment",node:n,loc:e.getNameLocationInGlobalDirectiveComment(r,n,t.name)}}function s(e){for(const n of e.variables){const[e,...r]=i(n);if(0===r.length)continue;const s="builtin"===e.type?"redeclaredAsBuiltin":"redeclaredBySyntax",o={id:n.name};for(const{type:n,node:i,loc:a}of r){const r=n===e.type?"redeclared":s;t.report({node:i,loc:a,messageId:r,data:o})}}}function o(e){const t=r.getScope(e);t.block===e&&s(t)}return{Program(e){const t=r.getScope(e);s(t),"global"===t.type&&t.childScopes[0]&&t.block===t.childScopes[0].block&&s(t.childScopes[0])},FunctionDeclaration:o,FunctionExpression:o,ArrowFunctionExpression:o,StaticBlock:o,BlockStatement:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,SwitchStatement:o}}},XI}(),"no-regex-spaces":()=>function(){if(YI)return ZI;YI=1;const e=Pw(),t=Tj(),n=new t.RegExpParser,r=/ {2}/u;function i(e){return e&&"Literal"===e.type&&"string"==typeof e.value}return ZI={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(s){const o=s.sourceCode;function a(e,i,o,a,l){if(!r.test(o))return;const c=[];let u;try{u=n.parsePattern(i,0,i.length,{unicode:l.includes("u"),unicodeSets:l.includes("v")})}catch{return}t.visitRegExpAST(u,{onCharacterClassEnter(e){c.push(e)}});const p=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let d;for(;d=p.exec(i);){const{1:{length:t},index:n}=d;if(c.every((({start:e,end:t})=>n0,l=t.arguments[0];if("Identifier"===t.callee.type&&"RegExp"===t.callee.name&&i(l)&&!s){const e=l.value,n=l.raw.slice(1,-1),r=l.range[0]+1;let s;if(t.arguments.length<2)s="";else{const e=t.arguments[1];if(!i(e))return;s=e.value}a(t,e,n,r,s)}}return{Literal:function(e){if(e.regex){const t=e.regex.pattern,n=e.raw.slice(1,e.raw.lastIndexOf("/"));a(e,t,n,e.range[0]+1,e.regex.flags)}},CallExpression:l,NewExpression:l}}},ZI}(),"no-restricted-exports":()=>function(){if(JI)return HI;JI=1;const e=Pw();return HI={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(t){const n=new Set(t.options[0]&&t.options[0].restrictedNamedExports),r=t.options[0]&&t.options[0].restrictDefaultExports,i=t.sourceCode;function s(i){const s=e.getModuleExportName(i);if(n.has(s))t.report({node:i,messageId:"restrictedNamed",data:{name:s}});else if("default"===s)if("ExportAllDeclaration"===i.parent.type)r&&r.namespaceFrom&&t.report({node:i,messageId:"restrictedDefault"});else{const n=!!i.parent.parent.source,s=e.getModuleExportName(i.parent.local);if(!n&&r&&r.named)return void t.report({node:i,messageId:"restrictedDefault"});n&&r&&("default"===s&&r.defaultFrom||"default"!==s&&r.namedFrom)&&t.report({node:i,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(e){e.exported&&s(e.exported)},ExportDefaultDeclaration(e){r&&r.direct&&t.report({node:e,messageId:"restrictedDefault"})},ExportNamedDeclaration(e){const t=e.declaration;t?"FunctionDeclaration"===t.type||"ClassDeclaration"===t.type?s(t.id):"VariableDeclaration"===t.type&&i.getDeclaredVariables(t).map((e=>e.defs.find((e=>e.parent===t)))).map((e=>e.name)).forEach(s):e.specifiers.map((e=>e.exported)).forEach(s)}}}},HI}(),"no-restricted-globals":()=>(tL||(tL=1,eL={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(e){const t=e.sourceCode;if(0===e.options.length)return{};const n=e.options.reduce(((e,t)=>("string"==typeof t?e[t]=null:e[t.name]=t.message,e)),{});function r(t){const r=t.identifier.name,i=n[r],s=i?"customMessage":"defaultMessage";e.report({node:t.identifier,messageId:s,data:{name:r,customMessage:i}})}function i(e){return Object.prototype.hasOwnProperty.call(n,e)}return{Program(e){const n=t.getScope(e);n.variables.forEach((e=>{!e.defs.length&&i(e.name)&&e.references.forEach(r)})),n.through.forEach((e=>{i(e.identifier.name)&&r(e)}))}}}}),eL),"no-restricted-imports":()=>nN(),"no-restricted-modules":()=>rN(),"no-restricted-properties":()=>function(){if(cL)return lL;cL=1;const e=Pw();return lL={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(t){const n=t.options;if(0===n.length)return{};const r=new Map,i=new Map,s=new Map;function o(e,n,o){if(null===o)return;const a=r.get(n),l=a?a.get(o):i.get(n),c=s.get(o);if(l){const r=l.message?` ${l.message}`:"";t.report({node:e,messageId:"restrictedObjectProperty",data:{objectName:n,propertyName:o,message:r}})}else if(c){const n=c.message?` ${c.message}`:"";t.report({node:e,messageId:"restrictedProperty",data:{propertyName:o,message:n}})}}return n.forEach((e=>{const t=e.object,n=e.property;void 0===t?s.set(n,{message:e.message}):void 0===n?i.set(t,{message:e.message}):(r.has(t)||r.set(t,new Map),r.get(t).set(n,{message:e.message}))})),{MemberExpression(t){o(t,t.object&&t.object.name,e.getStaticPropertyName(t))},ObjectPattern(t){let n=null;"VariableDeclarator"===t.parent.type?t.parent.init&&"Identifier"===t.parent.init.type&&(n=t.parent.init.name):"AssignmentExpression"!==t.parent.type&&"AssignmentPattern"!==t.parent.type||"Identifier"===t.parent.right.type&&(n=t.parent.right.name),t.properties.forEach((r=>{o(t,n,e.getStaticPropertyName(r))}))}}}},lL}(),"no-restricted-syntax":()=>(pL||(pL=1,uL={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(e){return e.options.reduce(((t,n)=>{const r="string"==typeof n,i=!r&&Boolean(n.message),s=r?n:n.selector,o=i?n.message:`Using '${s}' is not allowed.`;return Object.assign(t,{[s](t){e.report({node:t,messageId:"restrictedSyntax",data:{message:o}})}})}),{})}}),uL),"no-return-assign":()=>function(){if(fL)return dL;fL=1;const e=Pw(),t=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return dL={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(n){const r="except-parens"!==(n.options[0]||"except-parens"),i=n.sourceCode;return{AssignmentExpression(s){if(!r&&e.isParenthesised(i,s))return;let o=s,a=o.parent;for(;a&&!t.test(a.type);)o=a,a=a.parent;a&&"ReturnStatement"===a.type?n.report({node:a,messageId:"returnAssignment"}):a&&"ArrowFunctionExpression"===a.type&&a.body===o&&n.report({node:a,messageId:"arrowAssignment"})}}}},dL}(),"no-return-await":()=>iN(),"no-script-url":()=>function(){if(yL)return gL;yL=1;const e=Pw();return gL={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(t){function n(n){const r=e.getStaticStringValue(n);"string"==typeof r&&0===r.toLowerCase().indexOf("javascript:")&&t.report({node:n,messageId:"unexpectedScriptURL"})}return{Literal(e){e.value&&"string"==typeof e.value&&n(e)},TemplateLiteral(e){e.parent&&"TaggedTemplateExpression"===e.parent.type||n(e)}}}},gL}(),"no-self-assign":()=>sN(),"no-self-compare":()=>oN(),"no-sequences":()=>aN(),"no-setter-return":()=>lN(),"no-shadow":()=>function(){if(CL)return wL;CL=1;const e=Pw(),t=new Set(["ArrowFunctionExpression","FunctionExpression"]),n=new Set(["CallExpression"]),r=/^For(?:In|Of)Statement$/u,i=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return wL={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(s){const o={builtinGlobals:s.options[0]&&s.options[0].builtinGlobals,hoist:s.options[0]&&s.options[0].hoist||"functions",allow:s.options[0]&&s.options[0].allow||[],ignoreOnInitialization:s.options[0]&&s.options[0].ignoreOnInitialization},a=s.sourceCode;function l(e,t){return e&&e.range[0]<=t&&t<=e.range[1]}function c(e,s){const o=s.defs[0];if(!o)return!1;const{variableScope:a}=e.scope;if(!t.has(a.block.type)||function(e){const t=e.upper;return"function-expression-name"===t.type?t.upper:t}(a)!==s.scope)return!1;const c=a.block,{parent:u}=c,p=function(e,t){let n=e;for(;n&&!t(n);)n=n.parent;return n}(u,(e=>n.has(e.type)));if(!p)return!1;let d=o.name;const f=p.range[1];for(;d;){if("VariableDeclarator"===d.type){if(l(d.init,f))return!0;if(r.test(d.parent.parent.type)&&l(d.parent.parent.right,f))return!0;break}if("AssignmentPattern"===d.type){if(l(d.right,f))return!0}else if(i.test(d.type))break;d=d.parent}return!1}function u(e){return o.allow.includes(e.name)}function p(e){const t=e.scope.block;return"ClassDeclaration"===t.type&&t.id===e.identifiers[0]}function d(e,t){const n=t.scope,r=t.defs[0],i=r&&r.parent&&r.parent.range,s=e.scope,o=e.defs[0],a=o&&o.name.range;return i&&a&&i[0]0||o.builtinGlobals&&"writeable"in a)&&!d(i,a)&&(!o.ignoreOnInitialization||!c(i,a))&&("all"===o.hoist||!m(i,a))){const e=h(a),t=e.global?"noShadowGlobal":"noShadow",n={name:i.name};e.global||(n.shadowedLine=e.line,n.shadowedColumn=e.column),s.report({node:i.identifiers[0],messageId:t,data:n})}}}return{"Program:exit"(e){const t=a.getScope(e).childScopes.slice();for(;t.length;){const e=t.pop();t.push(...e.childScopes),g(e)}}}}},wL}(),"no-shadow-restricted-names":()=>function(){if(PL)return AL;function e(e){return"undefined"===e.name&&e.references.every((e=>!e.isWrite()))&&e.defs.every((e=>"VariableDeclarator"===e.node.type&&null===e.node.init))}return PL=1,AL={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(t){const n=new Set(["undefined","NaN","Infinity","arguments","eval"]),r=t.sourceCode;return{"VariableDeclaration, :function, CatchClause"(i){for(const s of r.getDeclaredVariables(i))s.defs.length>0&&n.has(s.name)&&!e(s)&&t.report({node:s.defs[0].name,messageId:"shadowingRestrictedName",data:{name:s.name}})}}}},AL}(),"no-spaced-func":()=>(DL||(DL=1,kL={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(e){const t=e.sourceCode;function n(n){const r=t.getLastToken(n.callee);let i=r,s=t.getTokenAfter(r);for(;s&&s.range[1](IL||(IL=1,RL={meta:{type:"problem",docs:{description:"Disallow sparse arrays",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-sparse-arrays"},schema:[],messages:{unexpectedSparseArray:"Unexpected comma in middle of array."}},create(e){return{ArrayExpression(t){t.elements.includes(null)&&e.report({node:t,messageId:"unexpectedSparseArray"})}}}}),RL),"no-sync":()=>(BL||(BL=1,LL={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow synchronous methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sync"},schema:[{type:"object",properties:{allowAtRootLevel:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noSync:"Unexpected sync method: '{{propertyName}}'."}},create(e){return{[e.options[0]&&e.options[0].allowAtRootLevel?":function MemberExpression[property.name=/.*Sync$/]":"MemberExpression[property.name=/.*Sync$/]"](t){e.report({node:t,messageId:"noSync",data:{propertyName:t.property.name}})}}}}),LL),"no-tabs":()=>function(){if(jL)return ML;jL=1;const e=/\t+/gu,t=/\S/u;return ML={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow all tabs",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-tabs"},schema:[{type:"object",properties:{allowIndentationTabs:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedTab:"Unexpected tab character."}},create(n){const r=n.sourceCode,i=n.options&&n.options[0]&&n.options[0].allowIndentationTabs;return{Program(s){r.getLines().forEach(((r,o)=>{let a;for(;null!==(a=e.exec(r));)i&&!t.test(r.slice(0,a.index))||n.report({node:s,loc:{start:{line:o+1,column:a.index},end:{line:o+1,column:a.index+a[0].length}},messageId:"unexpectedTab"})}))}}}},ML}(),"no-template-curly-in-string":()=>(FL||(FL=1,NL={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(e){const t=/\$\{[^}]+\}/u;return{Literal(n){"string"==typeof n.value&&t.test(n.value)&&e.report({node:n,messageId:"unexpectedTemplateExpression"})}}}}),NL),"no-ternary":()=>(VL||(VL=1,UL={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(e){return{ConditionalExpression(t){e.report({node:t,messageId:"noTernaryOperator"})}}}}),UL),"no-this-before-super":()=>cN(),"no-throw-literal":()=>function(){if(qL)return $L;qL=1;const e=Pw();return $L={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(t){return{ThrowStatement(n){e.couldBeError(n.argument)?"Identifier"===n.argument.type&&"undefined"===n.argument.name&&t.report({node:n,messageId:"undef"}):t.report({node:n,messageId:"object"})}}}},$L}(),"no-trailing-spaces":()=>uN(),"no-undef":()=>(GL||(GL=1,XL={meta:{type:"problem",docs:{description:"Disallow the use of undeclared variables unless mentioned in `/*global */` comments",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-undef"},schema:[{type:"object",properties:{typeof:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{undef:"'{{name}}' is not defined."}},create(e){const t=e.options[0],n=t&&!0===t.typeof||!1,r=e.sourceCode;return{"Program:exit"(t){r.getScope(t).through.forEach((t=>{const r=t.identifier;!n&&function(e){const t=e.parent;return"UnaryExpression"===t.type&&"typeof"===t.operator}(r)||e.report({node:r,messageId:"undef",data:r})}))}}}}),XL),"no-undef-init":()=>function(){if(YL)return ZL;YL=1;const e=Pw();return ZL={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(t){const n=t.sourceCode;return{VariableDeclarator(r){const i=n.getText(r.id),s=r.init&&r.init.name,o=n.getScope(r),a=e.getVariableByName(o,"undefined"),l=a&&a.defs.length>0,c=n.getLastToken(r);"undefined"!==s||"const"===r.parent.kind||l||t.report({node:r,messageId:"unnecessaryUndefinedInit",data:{name:i},fix(e){return"var"===r.parent.kind||"ArrayPattern"===r.id.type||"ObjectPattern"===r.id.type||n.commentsExistBetween(r.id,c)?null:e.removeRange([r.id.range[1],r.range[1]])}})}}}},ZL}(),"no-undefined":()=>(JL||(JL=1,HL={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(e){const t=e.sourceCode;function n(t){e.report({node:t,messageId:"unexpectedUndefined"})}function r(e){const t=e.set.get("undefined");if(!t)return;const r=t.references,i=t.defs;r.filter((e=>!e.init)).forEach((e=>n(e.identifier))),i.forEach((e=>n(e.name)))}return{"Program:exit"(e){const n=[t.getScope(e)];for(;n.length;){const e=n.pop();n.push(...e.childScopes),r(e)}}}}}),HL),"no-underscore-dangle":()=>pN(),"no-unexpected-multiline":()=>function(){if(rB)return nB;rB=1;const e=Pw();return nB={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(t){const n=/^[gimsuy]+$/u,r=t.sourceCode;function i(n,i){const s=r.getTokenAfter(n,e.isNotClosingParenToken),o=r.getTokenBefore(s);s.loc.start.line!==o.loc.end.line&&t.report({node:n,loc:s.loc,messageId:i})}return{MemberExpression(e){e.computed&&!e.optional&&i(e.object,"property")},TaggedTemplateExpression(e){const{quasi:n}=e;r.getTokenBefore(n).loc.end.line!==n.loc.start.line&&t.report({node:e,loc:{start:n.loc.start,end:{line:n.loc.start.line,column:n.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(e){0===e.arguments.length||e.optional||i(e.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(e){const t=r.getTokenAfter(e,(e=>"/"===e.value)),s=r.getTokenAfter(t);"Identifier"===s.type&&n.test(s.value)&&t.range[1]===s.range[0]&&i(e.left,"division")}}}},nB}(),"no-unmodified-loop-condition":()=>dN(),"no-unneeded-ternary":()=>fN(),"no-unreachable":()=>function(){if(cB)return lB;function e(e){return Boolean(e.init)}cB=1;class t{constructor(e){this.sourceCode=e,this.startNode=null,this.endNode=null}get location(){return{start:this.startNode.loc.start,end:this.endNode.loc.end}}get isEmpty(){return!(this.startNode&&this.endNode)}contains(e){return e.range[0]>=this.startNode.range[0]&&e.range[1]<=this.endNode.range[1]}isConsecutive(e){return this.contains(this.sourceCode.getTokenBefore(e))}merge(e){this.endNode=e}reset(e){this.startNode=this.endNode=e}}return lB={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(n){let r=null;const i=new t(n.sourceCode),s=[];let o=new Set;function a(e){let t=null;if(e&&("PropertyDefinition"===e.type||function(e){for(const t of e)if(t.reachable)return!1;return!0}(o))){if(i.isEmpty)return void i.reset(e);if(i.contains(e))return;if(i.isConsecutive(e))return void i.merge(e);t=e}i.isEmpty||n.report({messageId:"unreachableCode",loc:i.location,node:i.startNode}),i.reset(t)}return{onCodePathStart(){s.push(o),o=new Set},onCodePathEnd(){o=s.pop()},onUnreachableCodePathSegmentStart(e){o.add(e)},onUnreachableCodePathSegmentEnd(e){o.delete(e)},onCodePathSegmentEnd(e){o.delete(e)},onCodePathSegmentStart(e){o.add(e)},BlockStatement:a,BreakStatement:a,ClassDeclaration:a,ContinueStatement:a,DebuggerStatement:a,DoWhileStatement:a,ExpressionStatement:a,ForInStatement:a,ForOfStatement:a,ForStatement:a,IfStatement:a,ImportDeclaration:a,LabeledStatement:a,ReturnStatement:a,SwitchStatement:a,ThrowStatement:a,TryStatement:a,VariableDeclaration(t){("var"!==t.kind||t.declarations.some(e))&&a(t)},WhileStatement:a,WithStatement:a,ExportNamedDeclaration:a,ExportDefaultDeclaration:a,ExportAllDeclaration:a,"Program:exit"(){a()},"MethodDefinition[kind='constructor']"(){r={upper:r,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(e){const{hasSuperCall:t}=r;if(r=r.upper,!e.value.body)return;const n=e.parent.parent;if(n.superClass&&!t)for(const e of n.body.body)"PropertyDefinition"!==e.type||e.static||a(e)},"CallExpression > Super.callee"(){r&&(r.hasSuperCall=!0)}}}},lB}(),"no-unreachable-loop":()=>function(){if(pB)return uB;pB=1;const e=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];return uB={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:e},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(t){const n=t.options[0]&&t.options[0].ignore||[],r=(a=n,e.filter((e=>!a.includes(e)))),i=r.join(","),s=new Map,o=new Set;var a;const l=[];let c=new Set;return{onCodePathStart(){l.push(c),c=new Set},onCodePathEnd(){c=l.pop()},onUnreachableCodePathSegmentStart(e){c.add(e)},onUnreachableCodePathSegmentEnd(e){c.delete(e)},onCodePathSegmentEnd(e){c.delete(e)},onCodePathSegmentStart(e,t){if(c.add(e),function(e){const t=e.parent;if(t)switch(t.type){case"WhileStatement":return e===t.test;case"DoWhileStatement":return e===t.body;case"ForStatement":return e===(t.update||t.test||t.body);case"ForInStatement":case"ForOfStatement":return e===t.left}return!1}(t)){const n=t.parent;s.set(e,n)}},onCodePathSegmentLoop(e,t,n){const r=s.get(t);n!==r&&"ContinueStatement"!==n.type||o.delete(r)},[i](e){(function(e){for(const t of e)if(t.reachable)return!0;return!1})(c)&&o.add(e)},"Program:exit"(){o.forEach((e=>t.report({node:e,messageId:"invalid"})))}}}},uB}(),"no-unsafe-finally":()=>hN(),"no-unsafe-negation":()=>function(){if(mB)return hB;mB=1;const e=Pw();return hB={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(t){const n=t.sourceCode,r=!0===(t.options[0]||{}).enforceForOrderingRelations;return{BinaryExpression(i){const s=i.operator,o=r&&("<"===(a=s)||">"===a||">="===a||"<="===a);var a;(function(e){return"in"===e||"instanceof"===e}(s)||o)&&function(e){return"UnaryExpression"===e.type&&"!"===e.operator}(i.left)&&!e.isParenthesised(n,i.left)&&t.report({node:i,loc:i.left.loc,messageId:"unexpected",data:{operator:s},suggest:[{messageId:"suggestNegatedExpression",data:{operator:s},fix(e){const t=[n.getFirstToken(i.left).range[1],i.range[1]],r=n.text.slice(t[0],t[1]);return e.replaceTextRange(t,`(${r})`)}},{messageId:"suggestParenthesisedNegation",fix(e){return e.replaceText(i.left,`(${n.getText(i.left)})`)}}]})}}}},hB}(),"no-unsafe-optional-chaining":()=>function(){if(yB)return gB;yB=1;const e=new Set(["+","-","/","*","%","**"]),t=new Set(["+=","-=","/=","*=","%=","**="]),n=new Set(["in","instanceof"]);function r(e){return"ObjectPattern"===e.type||"ArrayPattern"===e.type}return gB={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(i){const s=(i.options[0]||{}).disallowArithmeticOperators||!1;function o(e){i.report({messageId:"unsafeOptionalChain",node:e})}function a(e){i.report({messageId:"unsafeArithmetic",node:e})}function l(e,t){if(e)switch(e.type){case"LogicalExpression":"||"===e.operator||"??"===e.operator?l(e.right,t):"&&"===e.operator&&(l(e.left,t),l(e.right,t));break;case"SequenceExpression":l(e.expressions[e.expressions.length-1],t);break;case"ConditionalExpression":l(e.consequent,t),l(e.alternate,t);break;case"AwaitExpression":l(e.argument,t);break;case"ChainExpression":t(e)}}function c(e){l(e,o)}function u(e){l(e,a)}return{"AssignmentExpression, AssignmentPattern"(e){r(e.left)&&c(e.right)},"ClassDeclaration, ClassExpression"(e){c(e.superClass)},CallExpression(e){e.optional||c(e.callee)},NewExpression(e){c(e.callee)},VariableDeclarator(e){r(e.id)&&c(e.init)},MemberExpression(e){e.optional||c(e.object)},TaggedTemplateExpression(e){c(e.tag)},ForOfStatement(e){c(e.right)},SpreadElement(e){e.parent&&"ObjectExpression"!==e.parent.type&&c(e.argument)},BinaryExpression(t){n.has(t.operator)&&c(t.right),s&&e.has(t.operator)&&(u(t.right),u(t.left))},WithStatement(e){c(e.object)},UnaryExpression(t){s&&e.has(t.operator)&&u(t.argument)},AssignmentExpression(e){s&&t.has(e.operator)&&u(e.right)}}}},gB}(),"no-unused-expressions":()=>mN(),"no-unused-labels":()=>function(){if(EB)return vB;EB=1;const e=Pw();return vB={meta:{type:"suggestion",docs:{description:"Disallow unused labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-labels"},schema:[],fixable:"code",messages:{unused:"'{{name}}:' is defined but never used."}},create(t){const n=t.sourceCode;let r=null;function i(t){if(n.getTokenAfter(t.label,{includeComments:!0})!==n.getTokenBefore(t.body,{includeComments:!0}))return!1;let r=t.parent;for(;"LabeledStatement"===r.type;)r=r.parent;if("Program"===r.type||"BlockStatement"===r.type&&e.isFunction(r.parent)){const{body:n}=t;if("ExpressionStatement"===n.type&&("Literal"===n.expression.type&&"string"==typeof n.expression.value||e.isStaticTemplateLiteral(n.expression)))return!1}return!0}function s(e){if(!e.label)return;const t=e.label.name;let n=r;for(;n;){if(n.label===t){n.used=!0;break}n=n.upper}}return{LabeledStatement:function(e){r={label:e.label.name,used:!1,upper:r}},"LabeledStatement:exit":function(e){r.used||t.report({node:e.label,messageId:"unused",data:e.label,fix:i(e)?t=>t.removeRange([e.range[0],e.body.range[0]]):null}),r=r.upper},BreakStatement:s,ContinueStatement:s}}},vB}(),"no-unused-private-class-members":()=>SB?xB:(SB=1,xB={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(e){const t=[];return{ClassBody(e){const n=new Map;t.unshift(n);for(const t of e.body)"PropertyDefinition"!==t.type&&"MethodDefinition"!==t.type||"PrivateIdentifier"===t.key.type&&n.set(t.key.name,{declaredNode:t,isAccessor:"MethodDefinition"===t.type&&("set"===t.kind||"get"===t.kind)})},PrivateIdentifier(e){const n=t.find((t=>t.has(e.name)));if(!n)return;const r=n.get(e.name);if(r.isUsed)return;if("PropertyDefinition"===e.parent.type||"MethodDefinition"===e.parent.type)return;if(r.isAccessor)return void(r.isUsed=!0);if(function(e){const t=e.parent.parent,n="AssignmentExpression"===t.type;return!(!n&&"ForInStatement"!==t.type&&"ForOfStatement"!==t.type&&"AssignmentPattern"!==t.type||t.left!==e.parent||n&&"="!==t.operator&&"ExpressionStatement"!==t.parent.type)}(e))return;const i=e.parent.parent.type,s=e.parent.parent.parent.type;"UpdateExpression"===i&&"ExpressionStatement"===s||"Property"===i&&"ObjectPattern"===s&&e.parent.parent.value===e.parent||"RestElement"!==i&&"ArrayPattern"!==i&&(r.isUsed=!0)},"ClassBody:exit"(){const n=t.shift();for(const[t,{declaredNode:r,isUsed:i}]of n.entries())i||e.report({node:r,loc:r.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${t}`}})}}}}),"no-unused-vars":()=>gN(),"no-use-before-define":()=>yN(),"no-useless-backreference":()=>function(){if(PB)return AB;PB=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),{RegExpParser:i,visitRegExpAST:s}=Tj(),o=new i;function a(e){const t=[];let n=e;do{t.push(n),n=n.parent}while(n);return t}function l(e){return"Assertion"===e.type&&("lookahead"===e.kind||"lookbehind"===e.kind)}function c(e){return l(e)&&e.negate}return AB={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in a negative lookaround."}},create(i){const u=i.sourceCode;function p(e,t,n){let r;try{r=o.parsePattern(t,0,t.length,{unicode:n.includes("u"),unicodeSets:n.includes("v")})}catch{return}s(r,{onBackreferenceEnter(t){const n=t.resolved,r=a(t),s=a(n);let o=null;if(r.includes(n))o="nested";else{let e=r.length-1,i=s.length-1;do{e--,i--}while(r[e]===s[i]);const a=i+1,u=s.slice(0,a),p=s.slice(a).find(l),d=p&&"lookbehind"===p.kind;!d&&t.end<=n.start?o="forward":d&&n.end<=t.start?o="backward":"Alternative"===u[u.length-1].type?o="disjunctive":u.some(c)&&(o="intoNegativeLookaround")}o&&i.report({node:e,messageId:o,data:{bref:t.raw,group:n.raw}})}})}return{"Literal[regex]"(e){const{pattern:t,flags:n}=e.regex;p(e,t,n)},Program(i){const s=u.getScope(i),o=new n(s),a={RegExp:{[e]:!0,[t]:!0}};for(const{node:e}of o.iterateGlobalReferences(a)){const[t,n]=e.arguments,i=r(t,s),o=r(n,s);"string"==typeof i&&p(e,i,o||"")}}}}},AB}(),"no-useless-call":()=>_N(),"no-useless-catch":()=>(IB||(IB=1,RB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(e){return{CatchClause(t){t.param&&"Identifier"===t.param.type&&t.body.body.length&&"ThrowStatement"===t.body.body[0].type&&"Identifier"===t.body.body[0].argument.type&&t.body.body[0].argument.name===t.param.name&&(t.parent.finalizer?e.report({node:t,messageId:"unnecessaryCatchClause"}):e.report({node:t.parent,messageId:"unnecessaryCatch"}))}}}}),RB),"no-useless-computed-key":()=>bN(),"no-useless-concat":()=>vN(),"no-useless-constructor":()=>EN(),"no-useless-escape":()=>xN(),"no-useless-rename":()=>function(){if(WB)return KB;WB=1;const e=Pw();return KB={meta:{type:"suggestion",docs:{description:"Disallow renaming import, export, and destructured assignments to the same name",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-rename"},fixable:"code",schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImport:{type:"boolean",default:!1},ignoreExport:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unnecessarilyRenamed:"{{type}} {{name}} unnecessarily renamed."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=!0===r.ignoreDestructuring,s=!0===r.ignoreImport,o=!0===r.ignoreExport;function a(r,i,s){const o="Identifier"===i.type?i.name:i.value;return t.report({node:r,messageId:"unnecessarilyRenamed",data:{name:o,type:s},fix(t){const i="Property"===r.type?r.value:r.local;return n.getCommentsInside(r).length>n.getCommentsInside(i).length||"AssignmentPattern"===i.type&&e.isParenthesised(n,i.left)?null:t.replaceText(r,n.getText(i))}})}return{ObjectPattern:function(e){if(!i)for(const t of e.properties)"Property"!==t.type||t.shorthand||t.computed||("Identifier"===t.key.type&&t.key.name||"Literal"===t.key.type&&t.key.value)===("AssignmentPattern"===t.value.type?t.value.left.name:t.value.name)&&a(t,t.key,"Destructuring assignment")},ImportSpecifier:function(t){s||t.imported.range[0]!==t.local.range[0]&&e.getModuleExportName(t.imported)===t.local.name&&a(t,t.imported,"Import")},ExportSpecifier:function(t){o||t.local.range[0]!==t.exported.range[0]&&e.getModuleExportName(t.local)===e.getModuleExportName(t.exported)&&a(t,t.local,"Export")}}}},KB}(),"no-useless-return":()=>SN(),"no-var":()=>ON(),"no-void":()=>(GB||(GB=1,XB={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(e){const t=e.options[0]&&e.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(n){t&&n.parent&&"ExpressionStatement"===n.parent.type||e.report({node:n,messageId:"noVoid"})}}}}),XB),"no-warning-comments":()=>TN(),"no-whitespace-before-property":()=>wN(),"no-with":()=>(tM||(tM=1,eM={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(e){return{WithStatement(t){e.report({node:t,messageId:"unexpectedWith"})}}}}),eM),"nonblock-statement-body-position":()=>CN(),"object-curly-newline":()=>AN(),"object-curly-spacing":()=>PN(),"object-property-newline":()=>(cM||(cM=1,lM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(e){const t=e.options[0]&&(e.options[0].allowAllPropertiesOnSameLine||e.options[0].allowMultiplePropertiesPerLine),n=t?"propertiesOnNewlineAll":"propertiesOnNewline",r=e.sourceCode;return{ObjectExpression(i){if(t&&i.properties.length>1){const e=r.getFirstToken(i.properties[0]),t=r.getLastToken(i.properties[i.properties.length-1]);if(e.loc.end.line===t.loc.start.line)return}for(let t=1;tkN(),"one-var":()=>DN(),"one-var-declaration-per-line":()=>(mM||(mM=1,hM={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(e){const t="always"===e.options[0];return{VariableDeclaration:function(n){if(function(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}(n.parent.type))return;let r;n.declarations.forEach((i=>{r&&r.loc.end.line===i.loc.start.line&&(t||r.init||i.init)&&e.report({node:n,messageId:"expectVarOnNewline",loc:i.loc,fix:e=>e.insertTextBefore(i,"\n")}),r=i}))}}}}),hM),"operator-assignment":()=>function(){if(yM)return gM;yM=1;const e=Pw();function t(e){return["*","&","^","|"].includes(e)}function n(e){return"Identifier"===e.type||"MemberExpression"===e.type&&("Identifier"===e.object.type||"ThisExpression"===e.object.type)&&(!e.computed||"Literal"===e.property.type)}return gM={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(r){const i=r.sourceCode;function s(e){return i.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator))}return{AssignmentExpression:"never"!==r.options[0]?function(o){if("="!==o.operator||"BinaryExpression"!==o.right.type)return;const a=o.left,l=o.right,c=l.operator;if(t(c)||function(e){return["+","-","/","%","<<",">>",">>>","**"].includes(e)}(c)){const u=`${c}=`;e.isSameReference(a,l.left,!0)?r.report({node:o,messageId:"replaced",data:{operator:u},fix(e){if(n(a)&&n(l.left)){const t=s(o),n=s(l),r=i.getText().slice(o.range[0],t.range[0]),a=i.getText().slice(n.range[1],o.right.range[1]);return i.commentsExistBetween(t,n)?null:e.replaceText(o,`${r}${u}${a}`)}return null}}):e.isSameReference(a,l.right,!0)&&t(c)&&r.report({node:o,messageId:"replaced",data:{operator:u}})}}:function(t){"="===t.operator||e.isLogicalAssignmentOperator(t.operator)||r.report({node:t,messageId:"unexpected",data:{operator:t.operator},fix(r){if(n(t.left)){const n=i.getFirstToken(t),o=s(t),a=i.getText().slice(t.range[0],o.range[0]),l=t.operator.slice(0,-1);let c;if(i.commentsExistBetween(n,o))return null;if(e.getPrecedence(t.right)<=e.getPrecedence({type:"BinaryExpression",operator:l})&&!e.isParenthesised(i,t.right))c=`${i.text.slice(o.range[1],t.right.range[0])}(${i.getText(t.right)})`;else{const n=i.getTokenAfter(o,{includeComments:!0});let r="";o.range[1]!==n.range[0]||e.canTokensBeAdjacent({type:"Punctuator",value:l},n)||(r=" "),c=`${r}${i.text.slice(o.range[1],t.range[1])}`}return r.replaceText(t,`${a}= ${a}${l}${c}`)}return null}})}}}},gM}(),"operator-linebreak":()=>RN(),"padded-blocks":()=>IN(),"padding-line-between-statements":()=>LN(),"prefer-arrow-callback":()=>BN(),"prefer-const":()=>MN(),"prefer-destructuring":()=>jN(),"prefer-exponentiation-operator":()=>NN(),"prefer-named-capture-group":()=>FN(),"prefer-numeric-literals":()=>UN(),"prefer-object-has-own":()=>VN(),"prefer-object-spread":()=>KN(),"prefer-promise-reject-errors":()=>WN(),"prefer-reflect":()=>(WM||(WM=1,KM={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(e){const t={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},n={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},r=(e.options[0]||{}).exceptions||[];function i(t,n,r){e.report({node:t,messageId:"preferReflect",data:{existing:n,substitute:r}})}return{CallExpression(e){const s=(e.callee.property||{}).name,o="Reflect"===(e.callee.object||{}).name,a=Object.prototype.hasOwnProperty.call(n,s),l=r.includes(s);!a||o||l||i(e,t[s],n[s])},UnaryExpression(e){const t="delete"===e.operator,n="Identifier"===e.argument.type,s=r.includes("delete");!t||n||s||i(e,"the delete keyword","Reflect.deleteProperty")}}}}),KM),"prefer-regex-literals":()=>$N(),"prefer-rest-params":()=>function(){if(zM)return QM;function e(e){const t=e.identifier,n=t.parent;return!("MemberExpression"===n.type&&n.object===t&&!n.computed)}return zM=1,QM={meta:{type:"suggestion",docs:{description:"Require rest parameters instead of `arguments`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-rest-params"},schema:[],messages:{preferRestParams:"Use the rest parameters instead of 'arguments'."}},create(t){const n=t.sourceCode;function r(e){t.report({node:e.identifier,loc:e.identifier.loc,messageId:"preferRestParams"})}function i(t){const i=function(e){const t=e.variables;for(let e=0;eqN(),"prefer-template":()=>QN(),"quote-props":()=>zN(),quotes:()=>XN(),radix:()=>GN(),"require-atomic-updates":()=>function(){if(sj)return ij;function e(t,n=new Map){for(const e of t.references)null!==e.resolved&&n.set(e.identifier,e);for(const r of t.childScopes)"function"!==r.type&&e(r,n);return n}sj=1;class t{constructor(){this.info=new WeakMap}initialize(e){const t=new Set,n=new Set;for(const r of e.prevSegments){const e=this.info.get(r);e&&(e.outdatedReadVariables.forEach(Set.prototype.add,t),e.freshReadVariables.forEach(Set.prototype.add,n))}this.info.set(e,{outdatedReadVariables:t,freshReadVariables:n})}markAsRead(e,t){for(const n of e){const e=this.info.get(n);e&&(e.freshReadVariables.add(t),e.outdatedReadVariables.delete(t))}}makeOutdated(e){for(const t of e){const e=this.info.get(t);e&&(e.freshReadVariables.forEach(Set.prototype.add,e.outdatedReadVariables),e.freshReadVariables.clear())}}isOutdated(e,t){for(const n of e){const e=this.info.get(n);if(e&&e.outdatedReadVariables.has(t))return!0}return!1}}return ij={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(n){const r=!!n.options[0]&&n.options[0].allowProperties,i=n.sourceCode,s=new Map,o=new t;let a=null;return{onCodePathStart(t,n){const r=i.getScope(n),s="function"===r.type&&(r.block.async||r.block.generator);a={upper:a,codePath:t,referenceMap:s?e(r):null,currentSegments:new Set}},onCodePathEnd(){a=a.upper},onCodePathSegmentStart(e){o.initialize(e),a.currentSegments.add(e)},onUnreachableCodePathSegmentStart(e){a.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){a.currentSegments.delete(e)},onCodePathSegmentEnd(e){a.currentSegments.delete(e)},Identifier(e){const{referenceMap:t}=a,n=t&&t.get(e);if(!n)return;const r=n.resolved,i=function(e){if(e.writeExpr)return e.writeExpr;let t=e.identifier;for(;t;){const e=t.parent.type;if("AssignmentExpression"===e&&t.parent.left===t)return t.parent.right;if("MemberExpression"!==e||t.parent.object!==t)break;t=t.parent}return null}(n),l="MemberExpression"===n.identifier.parent.type;if(!n.isRead()||i&&"="===i.parent.operator||o.markAsRead(a.currentSegments,r),i&&i.parent.right===i&&!function(e,t){if(!e)return!1;if(t&&e.defs.some((e=>"Parameter"===e.type)))return!1;const n=e.scope.variableScope;return e.references.every((e=>e.from.variableScope===n))}(r,l)){let e=s.get(i);e||(e=[],s.set(i,e)),e.push(n)}},":expression:exit"(e){if(!a.referenceMap)return;"AwaitExpression"!==e.type&&"YieldExpression"!==e.type||o.makeOutdated(a.currentSegments);const t=s.get(e);if(t){s.delete(e);for(const s of t){const t=s.resolved;o.isOutdated(a.currentSegments,t)&&(e.parent.left===s.identifier?n.report({node:e.parent,messageId:"nonAtomicUpdate",data:{value:t.name}}):r||n.report({node:e.parent,messageId:"nonAtomicObjectUpdate",data:{value:i.getText(e.parent.left),object:t.name}}))}}}}}},ij}(),"require-await":()=>function(){if(aj)return oj;aj=1;const e=Pw();return oj={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression."}},create(t){const n=t.sourceCode;let r=null;function i(){r={upper:r,hasAwait:!1}}function s(i){var s;i.generator||!i.async||r.hasAwait||e.isEmptyFunction(i)||t.report({node:i,loc:e.getFunctionHeadLoc(i,n),messageId:"missingAwait",data:{name:(s=e.getFunctionNameWithKind(i),s[0].toUpperCase()+s.slice(1))}}),r=r.upper}return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i,"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s,AwaitExpression(){r&&(r.hasAwait=!0)},ForOfStatement(e){r&&e.await&&(r.hasAwait=!0)}}}},oj}(),"require-jsdoc":()=>ZN(),"require-unicode-regexp":()=>function(){if(pj)return uj;pj=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),i=Pw(),{isValidWithUnicodeFlag:s}=zj();return uj={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",requireUFlag:"Use the 'u' flag."},schema:[]},create(o){const a=o.sourceCode;return{"Literal[regex]"(e){const t=e.regex.flags||"";t.includes("u")||t.includes("v")||o.report({messageId:"requireUFlag",node:e,suggest:s(o.languageOptions.ecmaVersion,e.regex.pattern)?[{fix(t){return t.insertTextAfter(e,"u")},messageId:"addUFlag"}]:null})},Program(l){const c=a.getScope(l),u=new n(c),p={RegExp:{[e]:!0,[t]:!0}};for(const{node:e}of u.iterateGlobalReferences(p)){const[t,n]=e.arguments;if(t&&"SpreadElement"===t.type)continue;const l=r(t,c),u=r(n,c);n&&("string"!=typeof u||u.includes("u")||u.includes("v"))||o.report({messageId:"requireUFlag",node:e,suggest:"string"==typeof l&&s(o.languageOptions.ecmaVersion,l)?[{fix(t){if(n){if("Literal"===n.type&&"string"==typeof n.value||"TemplateLiteral"===n.type){const e=a.getText(n);return t.replaceText(n,[e.slice(0,e.length-1),e.slice(e.length-1)].join("u"))}return null}const r=a.getLastToken(e,{skip:1});return t.insertTextAfter(r,i.isCommaToken(r)?' "u",':', "u"')},messageId:"addUFlag"}]:null})}}}}},uj}(),"require-yield":()=>(fj||(fj=1,dj={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(e){const t=[];function n(e){e.generator&&t.push(0)}function r(n){n.generator&&0===t.pop()&&n.body.body.length>0&&e.report({node:n,messageId:"missingYield"})}return{FunctionDeclaration:n,"FunctionDeclaration:exit":r,FunctionExpression:n,"FunctionExpression:exit":r,YieldExpression(){t.length>0&&(t[t.length-1]+=1)}}}}),dj),"rest-spread-spacing":()=>(mj||(mj=1,hj={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(e){const t=e.sourceCode,n="always"===e.options[0];function r(r){const i=t.getFirstToken(r),s=t.getTokenAfter(i),o=t.isSpaceBetweenTokens(i,s);let a;switch(r.type){case"SpreadElement":a="spread","ObjectExpression"===r.parent.type&&(a+=" property");break;case"RestElement":a="rest","ObjectPattern"===r.parent.type&&(a+=" property");break;case"ExperimentalSpreadProperty":a="spread property";break;case"ExperimentalRestProperty":a="rest property";break;default:return}n&&!o?e.report({node:r,loc:i.loc,messageId:"expectedWhitespace",data:{type:a},fix(e){return e.replaceTextRange([i.range[1],s.range[0]]," ")}}):!n&&o&&e.report({node:r,loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpectedWhitespace",data:{type:a},fix(e){return e.removeRange([i.range[1],s.range[0]])}})}return{SpreadElement:r,RestElement:r,ExperimentalSpreadProperty:r,ExperimentalRestProperty:r}}}),hj),semi:()=>YN(),"semi-spacing":()=>HN(),"semi-style":()=>function(){if(Ej)return vj;Ej=1;const e=Pw(),t=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");return vj={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(n){const r=n.sourceCode,i=n.options[0]||"last";function s(t,i){const s=r.getTokenBefore(t),o=r.getTokenAfter(t),a=!s||e.isTokenOnSameLine(s,t),l=!o||e.isTokenOnSameLine(t,o);("last"===i&&!a||"first"===i&&!l)&&n.report({loc:t.loc,messageId:"expectedSemiColon",data:{pos:"last"===i?"the end of the previous line":"the beginning of the next line"},fix(e){if(s&&o&&r.commentsExistBetween(s,o))return null;const n=s?s.range[1]:t.range[0],a=o?o.range[0]:t.range[1],l="last"===i?";\n":"\n;";return e.replaceTextRange([n,a],l)}})}return{[t](t){if("first"===i&&function(e){const t=e.parent.type;if("IfStatement"===t&&e.parent.consequent===e&&e.parent.alternate)return!0;if("DoWhileStatement"===t)return!0;const n=function(e){const t=e.type;return"BlockStatement"===t||"StaticBlock"===t||"Program"===t||"ClassBody"===t?e.body:"SwitchCase"===t?e.consequent:null}(e.parent);return null!==n&&n[n.length-1]===e}(t))return;const n=r.getLastToken(t);e.isSemicolonToken(n)&&s(n,i)},ForStatement(t){const n=t.init&&r.getTokenAfter(t.init,e.isSemicolonToken),i=t.test&&r.getTokenAfter(t.test,e.isSemicolonToken);n&&s(n,"last"),i&&s(i,"last")}}}},vj}(),"sort-imports":()=>JN(),"sort-keys":()=>IF(),"sort-vars":()=>(iF||(iF=1,rF={meta:{type:"suggestion",docs:{description:"Require variables within the same declaration block to be sorted",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-vars"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortVars:"Variables within the same declaration block should be sorted alphabetically."}},create(e){const t=(e.options[0]||{}).ignoreCase||!1,n=e.sourceCode;return{VariableDeclaration(r){const i=r.declarations.filter((e=>"Identifier"===e.id.type)),s=t?e=>e.id.name.toLowerCase():e=>e.id.name,o=i.some((e=>null!==e.init&&"Literal"!==e.init.type));let a=!1;i.slice(1).reduce(((t,r)=>{const l=s(t);return s(r)s(e)>s(t)?1:-1)).reduce(((e,t,r)=>{const s=r===i.length-1?"":n.getText().slice(i[r].range[1],i[r+1].range[0]);return e+n.getText(t)+s}),""))}}),a=!0,t):r}),i[0])}}}}),rF),"space-before-blocks":()=>LF(),"space-before-function-paren":()=>BF(),"space-in-parens":()=>MF(),"space-infix-ops":()=>function(){if(dF)return pF;dF=1;const{isEqToken:e}=Pw();return pF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(t){const n=!!t.options[0]&&!0===t.options[0].int32Hint,r=t.sourceCode;function i(e,t,n){const i=r.getFirstTokenBetween(e,t,(e=>e.value===n)),s=r.getTokenBefore(i),o=r.getTokenAfter(i);return r.isSpaceBetweenTokens(s,i)&&r.isSpaceBetweenTokens(i,o)?null:i}function s(e,n){t.report({node:e,loc:n.loc,messageId:"missingSpace",data:{operator:n.value},fix(e){const t=r.getTokenBefore(n),i=r.getTokenAfter(n);let s="";return n.range[0]-t.range[1]==0&&(s=" "),s+=n.value,i.range[0]-n.range[1]==0&&(s+=" "),e.replaceText(n,s)}})}function o(e){const t=i(e.left.typeAnnotation?e.left.typeAnnotation:e.left,e.right,e.operator||"=");t&&(n&&r.getText(e).endsWith("|0")||s(e,t))}return{AssignmentExpression:o,AssignmentPattern:o,BinaryExpression:o,LogicalExpression:o,ConditionalExpression:function(e){const t=i(e.test,e.consequent,"?"),n=i(e.consequent,e.alternate,":");t&&s(e,t),n&&s(e,n)},VariableDeclarator:function(e){const t=e.id.typeAnnotation?e.id.typeAnnotation:e.id,n=e.init;if(n){const r=i(t,n,"=");r&&s(e,r)}},PropertyDefinition(t){if(!t.value)return;const n=r.getTokenBefore(t.value,e),i=r.getTokenBefore(n),o=r.getTokenAfter(n);r.isSpaceBetweenTokens(i,n)&&r.isSpaceBetweenTokens(n,o)||s(t,n)}}}},pF}(),"space-unary-ops":()=>function(){if(hF)return fF;hF=1;const e=Pw();return fF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(t){const n=t.options[0]||{words:!0,nonwords:!1},r=t.sourceCode;function i(e){return n.overrides&&Object.prototype.hasOwnProperty.call(n.overrides,e)}function s(e){return n.overrides[e]}function o(e,n,r,i){r.range[0]===n.range[1]&&t.report({node:e,messageId:"wordOperator",data:{word:i},fix(e){return e.insertTextAfter(n," ")}})}function a(n,r,i,s){e.canTokensBeAdjacent(r,i)&&i.range[0]>r.range[1]&&t.report({node:n,messageId:"unexpectedAfterWord",data:{word:s},fix(e){return e.removeRange([r.range[1],i.range[0]])}})}function l(e,t,r,l){i(l)?s(l)?o(e,t,r,l):a(e,t,r,l):n.words?o(e,t,r,l):a(e,t,r,l)}function c(e,n,r){if(e.prefix){if(function(e){return e&&"UnaryExpression"===e.type&&"!"===e.argument.operator&&e.argument&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}(e))return;n.range[1]===r.range[0]&&t.report({node:e,messageId:"operator",data:{operator:n.value},fix(e){return e.insertTextAfter(n," ")}})}else n.range[1]===r.range[0]&&t.report({node:e,messageId:"beforeUnaryExpressions",data:{token:r.value},fix(e){return e.insertTextBefore(r," ")}})}function u(n,r,i){n.prefix?i.range[0]>r.range[1]&&t.report({node:n,messageId:"unexpectedAfter",data:{operator:r.value},fix(t){return e.canTokensBeAdjacent(r,i)?t.removeRange([r.range[1],i.range[0]]):null}}):i.range[0]>r.range[1]&&t.report({node:n,messageId:"unexpectedBefore",data:{operator:i.value},fix(e){return e.removeRange([r.range[1],i.range[0]])}})}function p(e){const t="UpdateExpression"!==e.type||e.prefix?r.getFirstTokens(e,2):r.getLastTokens(e,2),o=t[0],a=t[1];if(("NewExpression"===e.type||e.prefix)&&"Keyword"===o.type)return void l(e,o,a,o.value);const p=e.prefix?t[0].value:t[1].value;i(p)?s(p)?c(e,o,a):u(e,o,a):n.nonwords?c(e,o,a):u(e,o,a)}return{UnaryExpression:p,UpdateExpression:p,NewExpression:p,YieldExpression:function(e){const t=r.getFirstTokens(e,3);e.argument&&!e.delegate&&l(e,t[0],t[1],"yield")},AwaitExpression:function(e){const t=r.getFirstTokens(e,3);l(e,t[0],t[1],"await")}}}},fF}(),"spaced-comment":()=>function(){if(gF)return mF;gF=1;const e=YO(),t=Pw();function n(t){return`(?:${e(t)})`}function r(e){return`${n(e)}+`}function i(e){let n="";return 0===e.length?n+="\\s":(n+="(?:\\s|",1===e.length?n+=r(e[0]):(n+="(?:",n+=e.map(r).join("|"),n+=")"),n+=`(?:$|[${Array.from(t.LINEBREAKS).join("")}]))`),n}function s(e,t){let r="^";return 1===e.length?r+=n(e[0]):(r+="(?:",r+=e.map(n).join("|"),r+=")"),r+="?",r+=i(t),new RegExp(r,"u")}function o(e){const t=`^(${e.map(n).join("|")})?[ \t]+`;return new RegExp(t,"u")}return mF={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(e){const t=e.sourceCode,r="never"!==e.options[0],a=e.options[1]||{},l=a.block&&a.block.balanced,c=["block","line"].reduce(((e,t)=>{const c=function(e){return e.includes("*")?e:e.concat("*")}(a[t]&&a[t].markers||a.markers||[]),u=a[t]&&a[t].exceptions||a.exceptions||[];return e[t]={beginRegex:r?s(c,u):o(c),endRegex:l&&r?new RegExp(`${i(u)}$`,"u"):new RegExp("[ \t]+$","u"),hasExceptions:u.length>0,captureMarker:new RegExp(`^(${c.map(n).join("|")})`,"u"),markers:new Set(c)},e}),{});function u(t,n,i,s){const o="block"===t.type.toLowerCase()?"/*":"//";e.report({node:t,fix(e){const n=t.range[0];let s=n+2;return r?(i&&(s+=i[0].length),e.insertTextAfterRange([n,s]," ")):(s+=i[0].length,e.replaceTextRange([n,s],o+(i[1]?i[1]:"")))},messageId:n,data:{refChar:s}})}function p(t,n,i){e.report({node:t,fix(e){if(r)return e.insertTextAfterRange([t.range[0],t.range[1]-2]," ");const n=t.range[1]-2,s=n-i[0].length;return e.replaceTextRange([s,n],"")},messageId:n})}function d(e){const t=e.type.toLowerCase(),n=c[t],i="block"===t?"/*":"//";if(0===e.value.length||n.markers.has(e.value))return;const s=n.beginRegex.exec(e.value),o=n.endRegex.exec(e.value);if(r){if(!s){const t=n.captureMarker.exec(e.value),r=t?i+t[0]:i;n.hasExceptions?u(e,"expectedExceptionAfter",t,r):u(e,"expectedSpaceAfter",t,r)}l&&"block"===t&&!o&&p(e,"expectedSpaceBefore")}else s&&(s[1]?u(e,"unexpectedSpaceAfterMarker",s,s[1]):u(e,"unexpectedSpaceAfter",s,i)),l&&"block"===t&&o&&p(e,"unexpectedSpaceBefore",o)}return{Program(){t.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(d)}}}},mF}(),strict:()=>jF(),"switch-colon-spacing":()=>NF(),"symbol-description":()=>FF(),"template-curly-spacing":()=>UF(),"template-tag-spacing":()=>(wF||(wF=1,TF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(e){const t="always"!==e.options[0],n=e.sourceCode;return{TaggedTemplateExpression:function(r){const i=n.getTokenBefore(r.quasi),s=n.getFirstToken(r.quasi),o=n.isSpaceBetweenTokens(i,s);t&&o?e.report({node:r,loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpected",fix(e){const t=n.getCommentsBefore(r.quasi);return t.some((e=>"Line"===e.type))?null:e.replaceTextRange([i.range[1],s.range[0]],t.reduce(((e,t)=>e+n.getText(t)),""))}}):t||o||e.report({node:r,loc:{start:r.loc.start,end:s.loc.start},messageId:"missing",fix(e){return e.insertTextAfter(i," ")}})}}}}),TF),"unicode-bom":()=>(AF||(AF=1,CF={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(e){return{Program:function(t){const n=e.sourceCode,r={column:0,line:1},i=e.options[0]||"never";n.hasBOM||"always"!==i?n.hasBOM&&"never"===i&&e.report({node:t,loc:r,messageId:"unexpected",fix(e){return e.removeRange([-1,0])}}):e.report({node:t,loc:r,messageId:"expected",fix(e){return e.insertTextBeforeRange([0,1],"\ufeff")}})}}}}),CF),"use-isnan":()=>function(){if(kF)return PF;kF=1;const e=Pw();function t(t){return Boolean(t)&&(e.isSpecificId(t,"NaN")||e.isSpecificMemberAccess(t,"Number","NaN"))}return PF={meta:{type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN."}},create(n){const r=!n.options[0]||n.options[0].enforceForSwitchCase,i=n.options[0]&&n.options[0].enforceForIndexOf,s={BinaryExpression:function(e){/^(?:[<>]|[!=]=)=?$/u.test(e.operator)&&(t(e.left)||t(e.right))&&n.report({node:e,messageId:"comparisonWithNaN"})}};return r&&(s.SwitchStatement=function(e){t(e.discriminant)&&n.report({node:e,messageId:"switchNaN"});for(const r of e.cases)t(r.test)&&n.report({node:r,messageId:"caseNaN"})}),i&&(s.CallExpression=function(r){const i=e.skipChainExpression(r.callee);if("MemberExpression"===i.type){const s=e.getStaticPropertyName(i);"indexOf"!==s&&"lastIndexOf"!==s||1!==r.arguments.length||!t(r.arguments[0])||n.report({node:r,messageId:"indexOfNaN",data:{methodName:s}})}}),s}},PF}(),"valid-jsdoc":()=>EU(),"valid-typeof":()=>xU(),"vars-on-top":()=>SU(),"wrap-iife":()=>OU(),"wrap-regex":()=>(JF||(JF=1,HF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parenthesis around regex literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/wrap-regex"},schema:[],fixable:"code",messages:{requireParens:"Wrap the regexp literal in parens to disambiguate the slash."}},create(e){const t=e.sourceCode;return{Literal(n){if("RegularExpression"===t.getFirstToken(n).type){const r=t.getTokenBefore(n),i=t.getTokenAfter(n),{parent:s}=n;"MemberExpression"!==s.type||s.object!==n||r&&"("===r.value&&i&&")"===i.value||e.report({node:n,messageId:"requireParens",fix:e=>e.replaceText(n,`(${t.getText(n)})`)})}}}}}),HF),"yield-star-spacing":()=>(tU||(tU=1,eU={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){const t=e.sourceCode,n=(r=e.options[0])&&"string"!=typeof r?r:{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[r||"after"];var r;function i(r,i,s){if(t.isSpaceBetweenTokens(i,s)!==n[r]){const t="*"===i.value,o=n[r],a=t?i:s;let l="";l=o?"before"===r?"missingBefore":"missingAfter":"before"===r?"unexpectedBefore":"unexpectedAfter",e.report({node:a,messageId:l,fix(e){return o?t?e.insertTextAfter(a," "):e.insertTextBefore(a," "):e.removeRange([i.range[1],s.range[0]])}})}}return{YieldExpression:function(e){if(!e.delegate)return;const n=t.getFirstTokens(e,3),r=n[0],s=n[1],o=n[2];i("before",r,s),i("after",s,o)}}}}),eU),yoda:()=>TU()})),iU}function CU(){if(aU)return oU;aU=1;const e=wU();class t{constructor(){this._rules=Object.create(null)}define(e,t){var n;this._rules[e]="function"==typeof(n=t)?Object.assign({create:n},n):n}get(t){return"string"==typeof this._rules[t]&&this.define(t,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(this._rules[t])),this._rules[t]?this._rules[t]:e.has(t)?e.get(t):null}*[Symbol.iterator](){yield*e;for(const e of Object.keys(this._rules))yield[e,this.get(e)]}}return oU=t}function AU(){if(fU)return dU;function e(e,t,n){return new Array(t-e.length+1).join(n||" ")+e}fU=1;const t=!!{NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING,n=["Rule","Time (ms)","Relative"],r=[function(e,t,n){return e+new Array(t-e.length+1).join(n||" ")},e,e];function i(){if("string"!=typeof{NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING)return 10;if("all"==={NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING.toLowerCase())return Number.POSITIVE_INFINITY;const e=Number.parseInt({NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING,10);return e>10?e:10}return dU=function(){const e=Object.create(null);return t&&by.on("exit",(()=>{!function(e){let t=0;const s=Object.keys(e).map((n=>{const r=e[n];return t+=r,[n,r]})).sort(((e,t)=>t[1]-e[1])).slice(0,i());s.forEach((e=>{e.push(`${(100*e[1]/t).toFixed(1)}%`),e[1]=e[1].toFixed(3)})),s.unshift(n);const o=[];s.forEach((e=>{const t=e.length;for(let n=0;no[n])&&(o[n]=t)}}));const a=s.map((e=>e.map(((e,t)=>r[t](e,o[t]))).join(" | ")));a.splice(1,0,o.map(((e,t)=>{const n=0!==t&&t!==o.length-1?2:1;return r[t](":",e+n,"-")})).join("|")),console.log(a.join("\n"))}(e)})),{time:function(t,n){return void 0===e[t]&&(e[t]=0),function(...r){let i=by.hrtime();const s=n(...r);return i=by.hrtime(i),e[t]+=1e3*i[0]+i[1]/1e6,s}},enabled:t,getListSize:i}}(),dU}var PU,kU,DU={rules:{"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]}};function RU(){if(kU)return PU;function e(e){let t,n;return e.includes("/")?(t=e.startsWith("@")?e.slice(0,e.lastIndexOf("/")):e.slice(0,e.indexOf("/")),n=e.slice(t.length+1)):(t="@",n=e),{pluginName:t,ruleName:n}}return kU=1,PU={parseRuleId:e,getRuleFromConfig:function(t,n){const{pluginName:r,ruleName:i}=e(t),s=n.plugins&&n.plugins[r];let o=s&&s.rules&&s.rules[i];return o&&"function"==typeof o&&(o={create:o}),o},getRuleOptionsSchema:function(e){if(!e)return null;const t=e.schema||e.meta&&e.meta.schema;return Array.isArray(t)?t.length?{type:"array",items:t,minItems:0,maxItems:t.length}:{type:"array",minItems:0,maxItems:0}:t||null}},PU}var IU,LU,BU,MU,jU,NU,FU,UU,VU={},KU={};function WU(){if(LU)return IU;LU=1,IU=function(t,n){for(var r=[],i=0;i=0&&c>0){for(r=[],s=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),c]:((i=r.pop())=0?l:c;r.length&&(a=[s,o])}return a}return MU=1,BU=e,e.range=n,BU}();jU=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return h(function(e){return e.split("\\\\").join(n).split("\\{").join(r).split("\\}").join(i).split("\\,").join(s).split("\\.").join(o)}(e),!0).map(l)};var n="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",o="\0PERIOD"+Math.random()+"\0";function a(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(n).join("\\").split(r).join("{").split(i).join("}").split(s).join(",").split(o).join(".")}function c(e){if(!e)return[""];var n=[],r=t("{","}",e);if(!r)return e.split(",");var i=r.pre,s=r.body,o=r.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var l=c(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),n.push.apply(n,a),n}function u(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function d(e,t){return e<=t}function f(e,t){return e>=t}function h(n,r){var s=[],o=t("{","}",n);if(!o||/\$$/.test(o.pre))return[n];var l,m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),y=m||g,_=o.body.indexOf(",")>=0;if(!y&&!_)return o.post.match(/,.*\}/)?h(n=o.pre+"{"+o.body+i+o.post):[n];if(y)l=o.body.split(/\.\./);else if(1===(l=c(o.body)).length&&1===(l=h(l[0],!1).map(u)).length)return(E=o.post.length?h(o.post,!1):[""]).map((function(e){return o.pre+l[0]+e}));var b,v=o.pre,E=o.post.length?h(o.post,!1):[""];if(y){var x=a(l[0]),S=a(l[1]),O=Math.max(l[0].length,l[1].length),T=3==l.length?Math.abs(a(l[2])):1,w=d;S0){var D=new Array(k+1).join("0");P=A<0?"-"+D+P.slice(1):D+P}}b.push(P)}}else b=e(l,(function(e){return h(e,!1)}));for(var R=0;Rnull==e||"object"!=typeof e)))throw new TypeError("All arguments must be objects.");return e.reduce(((e,t)=>{this.validate(t);for(const[r,i]of this[n])try{if(r in e||r in t){const n=i.merge.call(this,e[r],t[r]);void 0!==n&&(e[r]=n)}}catch(e){throw new l(r,e)}return e}),{})}validate(e){for(const t of Object.keys(e)){if(!this.hasKey(t))throw new s(t);const r=this[n].get(t);if(Array.isArray(r.requires)&&!r.requires.every((t=>t in e)))throw new a(t,r.requires);try{r.validate.call(r,e[t])}catch(e){throw new l(t,e)}}for(const[t]of this[r])if(!(t in e))throw new o(t)}}return zU.ObjectSchema=c,zU}().ObjectSchema,QU.MergeStrategy=GU().MergeStrategy,QU.ValidationStrategy=tV().ValidationStrategy),QU}function rV(){if(JU)return KU;JU=1;var e=Py,t=function(){if(UU)return FU;UU=1,FU=c,c.Minimatch=u;var e=function(){try{return Py}catch(e){}}()||{sep:"/"};c.sep=e.sep;var t=c.GLOBSTAR=u.GLOBSTAR={},n=$U(),r={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},i="[^/]",s=i+"*?",o="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),a=/\/+/;function l(e,t){t=t||{};var n={};return Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function c(e,t,n){return d(t),n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&new u(t,n).match(e)}function u(t,n){if(!(this instanceof u))return new u(t,n);d(t),n||(n={}),t=t.trim(),n.allowWindowsEscape||"/"===e.sep||(t=t.split(e.sep).join("/")),this.options=n,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.make()}function p(e,t){return t||(t=this instanceof u?this.options:{}),e=void 0===e?this.pattern:e,d(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:n(e)}c.filter=function(e,t){return t=t||{},function(n,r,i){return c(n,e,t)}},c.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return c;var t=c,n=function(n,r,i){return t(n,r,l(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,l(e,r))},n.Minimatch.defaults=function(n){return t.defaults(l(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,l(e,r))},n.defaults=function(n){return t.defaults(l(e,n))},n.makeRe=function(n,r){return t.makeRe(n,l(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,l(e,r))},n.match=function(n,r,i){return t.match(n,r,l(e,i))},n},u.defaults=function(e){return c.defaults(e).Minimatch},u.prototype.debug=function(){},u.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(a)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0},u.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r65536)throw new TypeError("pattern is too long")};u.prototype.parse=function(e,n){d(e);var a=this.options;if("**"===e){if(!a.noglobstar)return t;e="*"}if(""===e)return"";var l,c="",u=!!a.nocase,p=!1,h=[],m=[],g=!1,y=-1,_=-1,b="."===e.charAt(0)?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function E(){if(l){switch(l){case"*":c+=s,u=!0;break;case"?":c+=i,u=!0;break;default:c+="\\"+l}v.debug("clearStateChar %j %j",l,c),l=!1}}for(var x,S=0,O=e.length;S-1;D--){var R=m[D],I=c.slice(0,R.reStart),L=c.slice(R.reStart,R.reEnd-8),B=c.slice(R.reEnd-8,R.reEnd),M=c.slice(R.reEnd);B+=M;var j=I.split("(").length-1,N=M;for(S=0;S=0&&!(i=t[s]);s--);for(s=0;s>> no match, partial?",e,d,n,f),d!==a))}if("string"==typeof u?(c=p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(s===a&&o===l)return!0;if(s===a)return r;if(o===l)return s===a-1&&""===e[s];throw new Error("wtf?")},FU}(),n=Jx(),r=nV();const i={required:!1,merge(){},validate(){}},s=Object.freeze({name:{required:!1,merge(){},validate(e){if("string"!=typeof e)throw new TypeError("Property must be a string.")}},files:i,ignores:i});function o(e,t){if(function(e){if(!Array.isArray(e))throw new TypeError("Expected value to be an array.")}(e),e.some((e=>"string"!=typeof e&&"function"!=typeof e)))throw new TypeError("Expected array to only contain strings and functions.")}const a=Object.freeze({files:{required:!1,merge(){},validate(e){!function(e){if(!Array.isArray(e)||0===e.length)throw new TypeError("Expected value to be a non-empty array.")}(e),e.forEach((e=>{if(Array.isArray(e))o(e);else if("string"!=typeof e&&"function"!=typeof e)throw new TypeError("Items must be a string, a function, or an array of strings and functions.")}))}},ignores:{required:!1,merge(){},validate:o}}),l=t.Minimatch,c=new Map,u=new Map,p=n("@hwc/config-array"),d={dot:!0},f=new Set(["array","function"]),h=new r.ObjectSchema(a);function m(e){if(!e||"object"!=typeof e)return;const t={};"files"in e&&(t.files=e.files),"ignores"in e&&(t.ignores=e.ignores),h.validate(t)}function g(e,t,n={}){let r=c;n.flipNegate&&(r=u);let i=r.get(t);return i||(i=new l(t,Object.assign({},d,n)),r.set(t,i)),i.match(e)}function y(e,t,n){return!!n.startsWith("..")||e.reduce(((e,r)=>e?"string"==typeof r&&r.startsWith("!")?!g(n,r,{flipNegate:!0}):e:"function"==typeof r?r(t):!r.startsWith("!")&&g(n,r)),!1)}function _(t,n,r){const i=e.relative(n,t),s=e=>{if("string"==typeof e)return g(i,e);if("function"==typeof e)return e(t);throw new TypeError(`Unexpected matcher type ${e}.`)};let o=r.files.some((e=>Array.isArray(e)?e.every(s):s(e)));return o&&r.ignores&&(o=!y(r.ignores,t,i)),o}function b(e){if(!e.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}const v={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},E=new WeakMap;class x extends Array{constructor(e,{basePath:t="",normalized:n=!1,schema:i,extraConfigTypes:o=[]}={}){super(),this[v.isNormalized]=n,this[v.schema]=new r.ObjectSchema(Object.assign({},i,s)),this.basePath=t,function(e){if(e.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const t of e)if(!f.has(t))throw new TypeError(`Unexpected config type "${t}" found. Expected one of: "object", "array", "function".`)}(o),this.extraConfigTypes=Object.freeze([...o]),this[v.configCache]=new Map,E.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(e)?this.push(...e):this.push(e)}static get[Symbol.species](){return Array}get files(){b(this);const e=E.get(this);if(e.files)return e.files;const t=[];for(const e of this)e.files&&e.files.forEach((e=>{t.push(e)}));return e.files=t,E.set(this,e),t}get ignores(){b(this);const e=E.get(this);if(e.ignores)return e.ignores;const t=[];for(const e of this)e.ignores&&1===Object.keys(e).length&&t.push(...e.ignores);return e.ignores=t,E.set(this,e),t}isNormalized(){return this[v.isNormalized]}async normalize(e={}){if(!this.isNormalized()){const t=await async function(e,t,n){const r=n.includes("function"),i=n.includes("array"),s=await async function*e(n){for(let s of n){if("function"==typeof s){if(!r)throw new TypeError("Unexpected function.");s=s(t),s.then&&(s=await s)}if(Array.isArray(s)){if(!i)throw new TypeError("Unexpected array.");yield*e(s)}else{if("function"==typeof s)throw new TypeError("A config function can only return an object or array.");yield s}}}(e),o=[];for await(const e of s)o.push(e);return o}(this,e,this.extraConfigTypes);this.length=0,this.push(...t.map(this[v.preprocessConfig].bind(this))),this.forEach(m),this[v.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(e={}){if(!this.isNormalized()){const t=function(e,t,n){const r=n.includes("function"),i=n.includes("array");return[...function*e(n){for(let s of n){if("function"==typeof s){if(!r)throw new TypeError("Unexpected function.");if(s=s(t),s.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(s)){if(!i)throw new TypeError("Unexpected array.");yield*e(s)}else{if("function"==typeof s)throw new TypeError("A config function can only return an object or array.");yield s}}}(e)]}(this,e,this.extraConfigTypes);this.length=0,this.push(...t.map(this[v.preprocessConfig].bind(this))),this.forEach(m),this[v.isNormalized]=!0,Object.freeze(this)}return this}[v.finalizeConfig](e){return e}[v.preprocessConfig](e){return e}isExplicitMatch(t){b(this);const n=E.get(this);let r=n.explicitMatches.get(t);if("boolean"==typeof r)return r;const i=e.relative(this.basePath,t);if(y(this.ignores,t,i))return p(`Ignoring ${t}`),n.explicitMatches.set(t,!1),!1;for(const e of this)if(e.files&&_(t,this.basePath,e))return p(`Matching config found for ${t}`),n.explicitMatches.set(t,!0),!0;return!1}getConfig(t){b(this);const n=this[v.configCache];if(n.has(t))return n.get(t);let r;if(this.isDirectoryIgnored(e.dirname(t)))return p(`Ignoring ${t} based on directory pattern`),n.set(t,r),r;const i=e.relative(this.basePath,t);if(y(this.ignores,t,i))return p(`Ignoring ${t} based on file pattern`),n.set(t,r),r;const s=[];let o=!1;const a=/\/\*{1,2}$/;return this.forEach(((n,r)=>{if(!n.files)return n.ignores?function(t,n,r){const i=e.relative(n,t);return Object.keys(r).length>1&&!y(r.ignores,t,i)}(t,this.basePath,n)?(p(`Matching config found for ${t} (based on ignores: ${n.ignores})`),void s.push(r)):void p(`Skipped config found for ${t} (based on ignores: ${n.ignores})`):(p(`Anonymous universal config found for ${t}`),void s.push(r));const i=n.files.filter((e=>a.test(e)));if(i.length){p("Universal files patterns found. Checking carefully.");const e=n.files.filter((e=>!a.test(e)));return e.length&&_(t,this.basePath,{files:e,ignores:n.ignores})?(p(`Matching config found for ${t}`),s.push(r),void(o=!0)):i.length&&_(t,this.basePath,{files:i,ignores:n.ignores})?(p(`Matching config found for ${t}`),void s.push(r)):void 0}return _(t,this.basePath,n)?(p(`Matching config found for ${t}`),s.push(r),void(o=!0)):void 0})),o?(r=n.get(s.toString()),r?(n.set(t,r),r):(r=s.reduce(((e,t)=>this[v.schema].merge(e,this[t])),{},this),r=this[v.finalizeConfig](r),n.set(t,r),n.set(s.toString(),r),r)):(p(`No matching configs found for ${t}`),n.set(t,r),r)}isIgnored(e){return this.isFileIgnored(e)}isFileIgnored(e){return void 0===this.getConfig(e)}isDirectoryIgnored(t){b(this);const n=e.relative(this.basePath,t).replace(/\\/g,"/");if(n.startsWith(".."))return!0;const r=E.get(this).directoryMatches;if(r.has(n))return r.get(n);const i=n.split("/");let s="",o=!1;do{s+=i.shift()+"/",o=y(this.ignores,e.join(this.basePath,s),s),r.set(s,o)}while(!o&&i.length);return r.set(n,o),o}}return KU.ConfigArray=x,KU.ConfigArraySymbol=v,KU}var iV,sV,oV={},aV={},lV={};function cV(){if(iV)return lV;iV=1;lV.VOID=-1;lV.PRIMITIVE=0;lV.ARRAY=1;lV.OBJECT=2;lV.DATE=3;lV.REGEXP=4;lV.MAP=5;lV.SET=6;lV.ERROR=7;return lV.BIGINT=8,lV}function uV(){if(sV)return aV;sV=1;const{VOID:e,PRIMITIVE:t,ARRAY:n,OBJECT:r,DATE:i,REGEXP:s,MAP:o,SET:a,ERROR:l,BIGINT:c}=cV(),u="object"==typeof self?self:globalThis;return aV.deserialize=p=>((p,d)=>{const f=(e,t)=>(p.set(t,e),e),h=m=>{if(p.has(m))return p.get(m);const[g,y]=d[m];switch(g){case t:case e:return f(y,m);case n:{const e=f([],m);for(const t of y)e.push(h(t));return e}case r:{const e=f({},m);for(const[t,n]of y)e[h(t)]=h(n);return e}case i:return f(new Date(y),m);case s:{const{source:e,flags:t}=y;return f(new RegExp(e,t),m)}case o:{const e=f(new Map,m);for(const[t,n]of y)e.set(h(t),h(n));return e}case a:{const e=f(new Set,m);for(const t of y)e.add(h(t));return e}case l:{const{name:e,message:t}=y;return f(new u[e](t),m)}case c:return f(BigInt(y),m);case"BigInt":return f(Object(BigInt(y)),m)}return f(new u[g](y),m)};return h})(new Map,p)(0),aV}var pV,dV,fV,hV,mV,gV,yV={};function _V(){if(pV)return yV;pV=1;const{VOID:e,PRIMITIVE:t,ARRAY:n,OBJECT:r,DATE:i,REGEXP:s,MAP:o,SET:a,ERROR:l,BIGINT:c}=cV(),u="",{toString:p}={},{keys:d}=Object,f=e=>{const c=typeof e;if("object"!==c||!e)return[t,c];const d=p.call(e).slice(8,-1);switch(d){case"Array":return[n,u];case"Object":return[r,u];case"Date":return[i,u];case"RegExp":return[s,u];case"Map":return[o,u];case"Set":return[a,u]}return d.includes("Array")?[n,d]:d.includes("Error")?[l,d]:[r,d]},h=([e,n])=>e===t&&("function"===n||"symbol"===n);return yV.serialize=(l,{json:u,lossy:p}={})=>{const m=[];return((l,u,p,m)=>{const g=(e,t)=>{const n=m.push(e)-1;return p.set(t,n),n},y=m=>{if(p.has(m))return p.get(m);let[_,b]=f(m);switch(_){case t:{let t=m;switch(b){case"bigint":_=c,t=m.toString();break;case"function":case"symbol":if(l)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return g([e],m)}return g([_,t],m)}case n:{if(b)return g([b,[...m]],m);const e=[],t=g([_,e],m);for(const t of m)e.push(y(t));return t}case r:{if(b)switch(b){case"BigInt":return g([b,m.toString()],m);case"Boolean":case"Number":case"String":return g([b,m.valueOf()],m)}if(u&&"toJSON"in m)return y(m.toJSON());const e=[],t=g([_,e],m);for(const t of d(m))!l&&h(f(m[t]))||e.push([y(t),y(m[t])]);return t}case i:return g([_,m.toISOString()],m);case s:{const{source:e,flags:t}=m;return g([_,{source:e,flags:t}],m)}case o:{const e=[],t=g([_,e],m);for(const[t,n]of m)(l||!h(f(t))&&!h(f(n)))&&e.push([y(t),y(n)]);return t}case a:{const e=[],t=g([_,e],m);for(const t of m)!l&&h(f(t))||e.push(y(t));return t}}const{message:v}=m;return g([_,{name:b,message:v}],m)};return y})(!(u||p),!!u,new Map,m)(l),m},yV}function bV(){return dV||(dV=1,function(e){const{deserialize:t}=uV(),{serialize:n}=_V();Object.defineProperty(e,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,r)=>r&&("json"in r||"lossy"in r)?t(n(e,r)):structuredClone(e):(e,r)=>t(n(e,r)),e.deserialize=t,e.serialize=n}(oV)),oV}function vV(){if(hV)return fV;return hV=1,fV={normalizeSeverityToString:function(e){if([2,"2","error"].includes(e))return"error";if([1,"1","warn"].includes(e))return"warn";if([0,"0","off"].includes(e))return"off";throw new Error(`Invalid severity value: ${e}`)},normalizeSeverityToNumber:function(e){if([2,"2","error"].includes(e))return 2;if([1,"1","warn"].includes(e))return 1;if([0,"0","off"].includes(e))return 0;throw new Error(`Invalid severity value: ${e}`)}}}function EV(){if(gV)return mV;gV=1;const e=bV().default,{normalizeSeverityToNumber:t}=vV(),n=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]),r=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function i(e){return"object"==typeof e&&null!==e}function s(e){return i(e)&&!Array.isArray(e)}function o(e,t,n=new Map){let r=n.get(e);if(r){const e=r.get(t);if(e)return e}else r=new Map,n.set(e,r);const i={...e,...t};delete i.__proto__,r.set(t,i);for(const r of Object.keys(t)){if("__proto__"===r||!Object.prototype.propertyIsEnumerable.call(e,r))continue;const a=e[r],l=t[r];s(a)&&s(l)?i[r]=o(a,l,n):void 0===l&&(i[r]=a)}return i}function a(t){const r=Array.isArray(t)?t.slice(0):[t];return r[0]=n.get(r[0]),e(r)}class l extends Error{constructor(e,t){super(`Key "${e}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:e,value:t}}}function c(e,t){if("string"!=typeof t&&"number"!=typeof t&&!Array.isArray(t))throw new l(e,t)}class u extends Error{constructor(e,t){super(`Key "${e}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:e,value:t}}}function p(e,t){if(void 0===n.get(t))throw new u(e,t)}function d(e){if(!i(e))throw new TypeError("Expected an object.")}class f extends Error{constructor(e){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:e}}}class h extends Error{constructor(e){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:e}}}const m=new Set(["error","warn","off",2,1,0]),g={merge(e,n){const r=void 0===n?e:n;return"boolean"==typeof r?r?"warn":"off":t(r)},validate(e){if(!m.has(e)&&"boolean"!=typeof e)throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},y={merge(e={},t={}){return o(e,t)},validate:"object"},_={merge:"assign",validate(e){d(e);for(const t of Object.keys(e))if("__proto__"!==t){if(t!==t.trim())throw new TypeError(`Global "${t}" has leading or trailing whitespace.`);if(!r.has(e[t]))throw new TypeError(`Key "${t}": Expected "readonly", "writable", or "off".`)}}},b={merge:"replace",validate(e){if(!e||"object"!=typeof e||"function"!=typeof e.parse&&"function"!=typeof e.parseForESLint)throw new TypeError("Expected object with parse() or parseForESLint() method.")}},v={merge(e={},t={}){const n=new Set([...Object.keys(e),...Object.keys(t)]),r={};for(const i of n)if("__proto__"!==i){if(i in e&&i in t&&e[i]!==t[i])throw new TypeError(`Cannot redefine plugin "${i}".`);r[i]=t[i]||e[i]}return r},validate(e){if(null===e||"object"!=typeof e)throw new TypeError("Expected an object.");if(Array.isArray(e))throw new h(e);for(const t of Object.keys(e))if("__proto__"!==t&&(null===e[t]||"object"!=typeof e[t]))throw new TypeError(`Key "${t}": Expected an object.`)}},E={merge:"replace",validate(e){if("string"==typeof e)!function(e){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(e))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${e}".`)}(e);else{if(!e||"object"!=typeof e)throw new TypeError("Expected an object or a string.");if("function"!=typeof e.preprocess||"function"!=typeof e.postprocess)throw new TypeError("Object must have a preprocess() and a postprocess() method.")}}},x={merge(e={},t={}){const n={...e,...t};for(const r of Object.keys(n))try{if("__proto__"===r){delete n.__proto__;continue}if(n[r]=a(n[r]),!(r in e)||!(r in t))continue;const i=a(e[r]),s=a(t[r]);if(1===s.length){n[r]=[s[0],...i.slice(1)];continue}}catch(e){throw new Error(`Key "${r}": ${e.message}`,{cause:e})}return n},validate(e){d(e);for(const t of Object.keys(e)){if("__proto__"===t)continue;const n=e[t];c(t,n),Array.isArray(n)?p(t,n[0]):p(t,n)}}},S={merge:"replace",validate(e){if("number"!=typeof e&&"latest"!==e)throw new TypeError('Expected a number or "latest".')}},O={merge:"replace",validate(e){if("string"!=typeof e||!/^(?:script|module|commonjs)$/u.test(e))throw new TypeError('Expected "script", "module", or "commonjs".')}};function T(e){return{merge:"replace",validate(){throw new f(e)}}}const w={...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map((e=>[e,T(e)]))),settings:y,linterOptions:{schema:{noInlineConfig:{merge:"replace",validate:"boolean"},reportUnusedDisableDirectives:g}},languageOptions:{schema:{ecmaVersion:S,sourceType:O,globals:_,parser:b,parserOptions:y}},processor:E,plugins:v,rules:x};return mV={flatConfigSchema:w,assertIsRuleSeverity:p,assertIsRuleOptions:c}}var xV,SV,OV,TV={},wV={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};function CV(){if(SV)return xV;SV=1;const e=kx(),t=wV;return xV=(n={})=>{const r=new e({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...n});return r.addMetaSchema(t),r._opts.defaultMeta=t.id,r}}function AV(){if(OV)return TV;OV=1;const e=CV()(),{parseRuleId:t,getRuleFromConfig:n,getRuleOptionsSchema:r}=RU(),i=DU;function s({pluginName:e,ruleName:t},n){const r=`Key "rules": Key "${"@"===e?t:`${e}/${t}`}"`;let s=`${r}: Could not find plugin "${e}".`;if(n.plugins&&n.plugins[e]){const o=i.rules[t];if("@"===e&&o)s=`${r}: Rule "${t}" was removed and replaced by "${o}".`;else{s=`${r}: Could not find "${t}" in plugin "${e}".`;for(const[e,r]of Object.entries(n.plugins))if(r.rules&&r.rules[t]){s+=` Did you mean "${e}/${t}"?`;break}}}throw new TypeError(s)}return TV.RuleValidator=class{constructor(){this.validators=new WeakMap}validate(i){if(i.rules)for(const[o,a]of Object.entries(i.rules)){if("__proto__"===o)continue;if(0===a[0])continue;const l=n(o,i);if(l||s(t(o),i),!this.validators.has(l)){const t=r(l);t&&this.validators.set(l,e.compile(t))}const c=this.validators.get(l);if(c&&(c(a.slice(1)),c.errors))throw new Error(`Key "rules": Key "${o}": ${c.errors.map((e=>`\tValue ${JSON.stringify(e.data)} ${e.message}.\n`)).join("")}`)}}},TV}var PV,kV,DV,RV,IV,LV,BV,MV,jV,NV,FV={};function UV(){if(MV)return VU;MV=1;const{ConfigArray:e,ConfigArraySymbol:t}=rV(),{flatConfigSchema:n}=EV(),{RuleValidator:r}=AV(),{defaultConfig:i}=function(){if(PV)return FV;PV=1;const e=wU();return FV.defaultConfig=[{plugins:{"@":{rules:new Proxy({},{get(t,n){return e.get(n)},has(t,n){return e.has(n)}})}},languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:bv(),parserOptions:{}}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],FV}(),s=BV?LV:(BV=1,LV={configs:{all:DV?kV:(DV=1,kV=Object.freeze({rules:{"accessor-pairs":"error","array-callback-return":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"error","capitalized-comments":"error","class-methods-use-this":"error",complexity:"error","consistent-return":"error","consistent-this":"error","constructor-super":"error",curly:"error","default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","for-direction":"error","func-name-matching":"error","func-names":"error","func-style":"error","getter-return":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":"error","id-match":"error","init-declarations":"error","line-comment-position":"error","logical-assignment-operators":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"error","max-lines-per-function":"error","max-nested-callbacks":"error","max-params":"error","max-statements":"error","multiline-comment-style":"error","new-cap":"error","no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-console":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-continue":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-div-regex":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-else-return":"error","no-empty":"error","no-empty-character-class":"error","no-empty-function":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-import-assign":"error","no-inline-comments":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-invalid-this":"error","no-irregular-whitespace":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-loss-of-precision":"error","no-magic-numbers":"error","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-symbol":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-promise-executor-return":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-imports":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-setter-return":"error","no-shadow":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-ternary":"error","no-this-before-super":"error","no-throw-literal":"error","no-undef":"error","no-undef-init":"error","no-undefined":"error","no-underscore-dangle":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-expressions":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-use-before-define":"error","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"error","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"error","prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-atomic-updates":"error","require-await":"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"error","sort-keys":"error","sort-vars":"error",strict:"error","symbol-description":"error","unicode-bom":"error","use-isnan":"error","valid-typeof":"error","vars-on-top":"error",yoda:"error"}})),recommended:IV?RV:(IV=1,RV=Object.freeze({rules:Object.freeze({"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-extra-semi":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-mixed-spaces-and-tabs":"error","no-new-symbol":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"})}))}}),o=new r;function a(e){let t=e.name;if(!t){if(!e.meta)return null;if(t=e.meta.name,!t)return null}let n=e.version;return n||(n=e.meta&&e.meta.version),n?`${t}@${n}`:t}const l=Symbol("originalBaseConfig");class c extends e{constructor(e,{basePath:t,shouldIgnore:r=!0,baseConfig:s=i}={}){super(e,{basePath:t,schema:n}),s[Symbol.iterator]?this.unshift(...s):this.unshift(s),this[l]=s,Object.defineProperty(this,l,{writable:!1}),this.shouldIgnore=r,Object.defineProperty(this,"shouldIgnore",{writable:!1})}[t.preprocessConfig](e){if("eslint:recommended"===e)return void 0!==by&&by.emitWarning&&by.emitWarning("The 'eslint:recommended' string configuration is deprecated and will be replaced by the @eslint/js package's 'recommended' config."),s.configs.recommended;if("eslint:all"===e)return void 0!==by&&by.emitWarning&&by.emitWarning("The 'eslint:all' string configuration is deprecated and will be replaced by the @eslint/js package's 'all' config."),s.configs.all;if(!this.shouldIgnore&&!this[l].includes(e)&&e.ignores&&!e.files){const{ignores:t,...n}=e;return n}return e}[t.finalizeConfig](e){const{plugins:t,languageOptions:n,processor:r}=e;let i,s,l=!1,c=!1;if(n&&n.parser){const{parser:e}=n;"object"==typeof e?(i=a(e),i||(l=!0)):l=!0}if(r)if("string"==typeof r){const{pluginName:n,objectName:i}=function(e){const t=e.split("/");return{objectName:t.pop(),pluginName:t.join("/")}}(r);if(s=r,!(t&&t[n]&&t[n].processors&&t[n].processors[i]))throw new TypeError(`Key "processor": Could not find "${i}" in plugin "${n}".`);e.processor=t[n].processors[i]}else"object"==typeof r?(s=a(r),s||(c=!0)):c=!0;return o.validate(e),Object.defineProperty(e,"toJSON",{value:function(){if(l)throw new Error("Could not serialize parser object (missing 'meta' object).");if(c)throw new Error("Could not serialize processor object (missing 'meta' object).");return{...this,plugins:Object.entries(t).map((([e,t])=>{const n=a(t);return n?`${e}:${n}`:e})),languageOptions:{...n,parser:i},processor:s}}}),e}}return VU.FlatConfigArray=c,VU}function VV(){if(NV)return jV;NV=1;const e=Py,t=sv(),n=lv(),r=bv(),i=xv(),s=Cv,o=Av(),{directivesPattern:a}=Pv(),{Legacy:{ConfigOps:l,ConfigValidator:c,environments:u}}=Mx(),p=eS(),{SourceCode:d}=EO?vO:(EO=1,vO={SourceCode:qO()}),f=ZO(),h=HO(),m=$O(),g=kT(),y=RT(),_=CU(),b=cU?lU:(cU=1,lU=()=>{const e=Object.create(null);return Object.freeze({on(t,n){t in e?e[t].push(n):e[t]=[n]},emit(t,...n){t in e&&e[t].forEach((e=>e(...n)))},eventNames(){return Object.keys(e)}})}),v=function(){if(pU)return uU;pU=1;const e=Jx()("eslint:source-code-fixer");function t(e,t){return e.fix.range[0]-t.fix.range[0]||e.fix.range[1]-t.fix.range[1]}function n(e,t){return e.line-t.line||e.column-t.column}function r(){Object.freeze(this)}return r.applyFixes=function(r,i,s){if(e("Applying fixes"),!1===s)return e("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:i,output:r};const o=[],a=[],l=r.startsWith("\ufeff")?"\ufeff":"",c=l?r.slice(1):r;let u=Number.NEGATIVE_INFINITY,p=l;function d(e){const t=e.fix,n=t.range[0],r=t.range[1];return u>=n||n>r?(o.push(e),!1):((n<0&&r>=0||0===n&&t.text.startsWith("\ufeff"))&&(p=""),p+=c.slice(Math.max(0,u),Math.max(0,n)),p+=t.text,u=r,!0)}if(i.forEach((e=>{Object.prototype.hasOwnProperty.call(e,"fix")?a.push(e):o.push(e)})),a.length){e("Found fixes to apply");let r=!1;for(const e of a.sort(t))"function"!=typeof s||s(e)?(d(e),r=!0):o.push(e);return p+=c.slice(Math.max(0,u)),{fixed:r,messages:o.sort(n),output:p}}return e("No fixes to apply"),{fixed:!1,messages:i,output:l+c}},uU=r}(),E=AU(),x=DU,{getRuleFromConfig:S}=RU(),{FlatConfigArray:O}=UV(),{RuleValidator:T}=AV(),{assertIsRuleOptions:w,assertIsRuleSeverity:C}=EV(),{normalizeSeverityToString:A}=vV(),P=Jx()("eslint:linter"),k=new m,D={start:{line:1,column:0},end:{line:1,column:1}},R=Symbol.for("eslint.RuleTester.parser");function I(e){return!(e!==r&&e[R]!==r)}function L(e){return Object.prototype.hasOwnProperty.call(x.rules,e)?`Rule '${e}' was removed and replaced by: ${x.rules[e].join(", ")}`:`Definition for rule '${e}' was not found.`}function B(e){const{ruleId:t=null,loc:n=D,message:r=L(e.ruleId),severity:i=2}=e;return{ruleId:t,message:r,line:n.start.line,column:n.start.column+1,endLine:n.end.line,endColumn:n.end.column+1,severity:i,nodeType:null}}function M(e){const{commentToken:t,type:n,value:r,justification:i,ruleMapper:s}=e,o=Object.keys(k.parseListConfig(r)),a=o.length?o:[null],l={directives:[],directiveProblems:[]},c={commentToken:t,ruleIds:o};for(const e of a)null===e||s(e)?"disable-next-line"===n?l.directives.push({parentComment:c,type:n,line:t.loc.end.line,column:t.loc.end.column+1,ruleId:e,justification:i}):l.directives.push({parentComment:c,type:n,line:t.loc.start.line,column:t.loc.start.column+1,ruleId:e,justification:i}):l.directiveProblems.push(B({ruleId:e,loc:t.loc}));return l}function j(e){switch(e){case 3:return 3;case 5:case void 0:return 5;default:if("number"==typeof e)return e>=2015?e:e+2009}return r.latestEcmaVersion+2009}const N=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function F(t){const n=t.split(e.sep),r=n.lastIndexOf("");return-1===r?t:n.slice(r).join(e.sep)}function U(e,t){const n=t.linterOptions||t,r=!0===n.noInlineConfig,i=!1===e.allowInlineConfig,s=t.configNameOfNoInlineConfig?` (${t.configNameOfNoInlineConfig})`:"";let o=e.reportUnusedDisableDirectives;return"boolean"==typeof o&&(o=o?"error":"off"),"string"!=typeof o&&(o="boolean"==typeof n.reportUnusedDisableDirectives?n.reportUnusedDisableDirectives?"warn":"off":void 0===n.reportUnusedDisableDirectives?"off":A(n.reportUnusedDisableDirectives)),{filename:F(e.filename||""),allowInlineConfig:!i,warnInlineConfig:r&&!i?`your config${s}`:null,reportUnusedDisableDirectives:o,disableFixes:Boolean(e.disableFixes)}}function V(e,t,n){const s=n.filter((e=>e.parserOptions)).reduce(((e,t)=>i(e,t.parserOptions)),{}),o=i(s,t||{});return"module"===o.sourceType&&(o.ecmaFeatures=Object.assign({},o.ecmaFeatures,{globalReturn:!1})),o.ecmaVersion=function(e,t){return I(e)&&"latest"===t?r.latestEcmaVersion:t>=2015?t-2009:t}(e,o.ecmaVersion),o}function K(e,r,i){const s=r.parserOptions.ecmaFeatures||{},o=r.ecmaVersion||5;return t.analyze(e,{ignoreEval:!0,nodejsScope:s.globalReturn,impliedStrict:s.impliedStrict,ecmaVersion:"number"==typeof o?o:6,sourceType:r.sourceType||"script",childVisitorKeys:i||n.KEYS,fallback:p.getKeys})}function W(e,t,r){const i=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(e).replace(o.shebangPattern,((e,t)=>`//${t}`)),{ecmaVersion:s,sourceType:a,parser:l}=t,c=Object.assign({ecmaVersion:s,sourceType:a},t.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:r});try{P("Parsing:",r);const s="function"==typeof l.parseForESLint?l.parseForESLint(i,c):{ast:l.parse(i,c)};P("Parsing successful:",r);const o=s.ast,a=s.services||{},u=s.visitorKeys||n.KEYS;P("Scope analysis:",r);const p=s.scopeManager||K(o,t,u);return P("Scope analysis successful:",r),{success:!0,sourceCode:new d({text:e,ast:o,parserServices:a,scopeManager:p,visitorKeys:u})}}catch(e){const t=`Parsing error: ${e.message.replace(/^line \d+:/iu,"").trim()}`;return P("%s\n%s",t,e.stack),{success:!1,error:{ruleId:null,fatal:!0,severity:2,message:t,line:e.lineNumber,column:e.column,nodeType:null}}}}function $(e,t){try{return e.create(t)}catch(e){throw e.message=`Error while loading rule '${t.id}': ${e.message}`,e}}const q={getSource:"getText",getSourceLines:"getLines",getAllComments:"getAllComments",getNodeByRangeIndex:"getNodeByRangeIndex",getComments:"getComments",getCommentsBefore:"getCommentsBefore",getCommentsAfter:"getCommentsAfter",getCommentsInside:"getCommentsInside",getJSDocComment:"getJSDocComment",getFirstToken:"getFirstToken",getFirstTokens:"getFirstTokens",getLastToken:"getLastToken",getLastTokens:"getLastTokens",getTokenAfter:"getTokenAfter",getTokenBefore:"getTokenBefore",getTokenByRangeStart:"getTokenByRangeStart",getTokens:"getTokens",getTokensAfter:"getTokensAfter",getTokensBefore:"getTokensBefore",getTokensBetween:"getTokensBetween"},Q=Object.freeze(Object.keys(q).reduce(((e,t)=>Object.assign(e,{[t](...e){return this.sourceCode[q[t]](...e)}})),{}));function z(e,t,n,r,i,s,o,a,c,u){const d=b(),h=[];let m=e.ast;p.traverse(e.ast,{enter(e,t){e.parent=t,h.push({isEntering:!0,node:e})},leave(e){h.push({isEntering:!1,node:e})},visitorKeys:e.visitorKeys});const _=Object.freeze(Object.assign(Object.create(Q),{getAncestors:()=>e.getAncestors(m),getDeclaredVariables:t=>e.getDeclaredVariables(t),getCwd:()=>c,cwd:c,getFilename:()=>o,filename:o,getPhysicalFilename:()=>u||o,physicalFilename:u||o,getScope:()=>e.getScope(m),getSourceCode:()=>e,sourceCode:e,markVariableAsUsed:t=>e.markVariableAsUsed(t,m),parserOptions:{...i.parserOptions},parserPath:r,languageOptions:i,parserServices:e.parserServices,settings:s})),v=[];Object.keys(t).forEach((r=>{const i=l.getRuleSeverity(t[r]);if(0===i)return;const s=n(r);if(!s)return void v.push(B({ruleId:r}));const o=s.meta&&s.meta.messages;let c=null;const u=Object.freeze(Object.assign(Object.create(_),{id:r,options:(p=t[r],Array.isArray(p)?p.slice(1):[]),report(...t){null===c&&(c=y({ruleId:r,severity:i,sourceCode:e,messageIds:o,disableFixes:a}));const n=c(...t);if(n.fix&&(!s.meta||!s.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(n.suggestions&&(!s.meta||!0!==s.meta.hasSuggestions)){if(s.meta&&s.meta.docs&&void 0!==s.meta.docs.suggestion)throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint.");throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.")}v.push(n)}}));var p;const f=E.enabled?E.time(r,$)(s,u):$(s,u);if(null==f)throw new Error(`The create() function for rule '${r}' did not return an object.`);Object.keys(f).forEach((e=>{const t=E.enabled?E.time(r,f[e]):f[e];d.on(e,function(e){return function(...t){try{return e(...t)}catch(e){throw e.ruleId=r,e}}}(t))}))}));const x="Program"===h[0].node.type?new f(new g(d,{visitorKeys:e.visitorKeys,fallback:p.getKeys})):new g(d,{visitorKeys:e.visitorKeys,fallback:p.getKeys});return h.forEach((e=>{m=e.node;try{e.isEntering?x.enterNode(m):x.leaveNode(m)}catch(e){throw e.currentNode=m,e}})),v}function X(e){if("object"==typeof e){const{hasBOM:t,text:n}=e;return(t?"\ufeff":"")+n}return String(e)}function G(e,t){return e.lastConfigArray&&e.lastConfigArray.pluginRules.get(t)||e.ruleMap.get(t)}function Z(e){return e||("object"==typeof by?by.cwd():void 0)}const Y=new WeakMap;function H(e){const{configType:t}=Y.get(e);if("flat"===t)throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}return jV={Linter:class{constructor({cwd:e,configType:t}={}){Y.set(this,{cwd:Z(e),lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:t,parserMap:new Map([["espree",r]]),ruleMap:new _}),this.version=s.version}static get version(){return s.version}_verifyWithoutProcessors(e,n,i){const s=Y.get(this),o=n||{},p=U(i,o);let f;"string"==typeof e?(s.lastSourceCode=null,f=e):(s.lastSourceCode=e,f=e.text);let m="espree",g=r;if("object"==typeof o.parser&&null!==o.parser)m=o.parser.filePath,g=o.parser.definition;else if("string"==typeof o.parser){if(!s.parserMap.has(o.parser))return[{ruleId:null,fatal:!0,severity:2,message:`Configured parser '${o.parser}' was not found.`,line:0,column:0,nodeType:null}];m=o.parser,g=s.parserMap.get(o.parser)}const y=p.allowInlineConfig&&!p.warnInlineConfig?function(e){let t,n;for(N.lastIndex=0;null!==(t=N.exec(e));)t[0].endsWith("*/")&&(n=Object.assign(n||{},k.parseListConfig(k.extractDirectiveComment(t[1]).directivePart)));return n}(f):{},b=Object.assign({builtin:!0},o.env,y),v=Object.keys(b).filter((e=>b[e])).map((e=>function(e,t){return e.lastConfigArray&&e.lastConfigArray.pluginEnvironments.get(t)||u.get(t)||null}(s,e))).filter((e=>e)),E=V(g,o.parserOptions||{},v),x=(S=o.globals||{},O=v,Object.assign({},...O.filter((e=>e.globals)).map((e=>e.globals)),S));var S,O;const T=o.settings||{},w=function({globals:e,parser:t,parserOptions:n}){const{ecmaVersion:r,sourceType:i}=n;return{globals:e,ecmaVersion:j(r),sourceType:i,parser:t,parserOptions:n}}({globals:o.globals,parser:g,parserOptions:E});if(s.lastSourceCode)s.lastSourceCode.scopeManager||(s.lastSourceCode=new d({text:s.lastSourceCode.text,ast:s.lastSourceCode.ast,parserServices:s.lastSourceCode.parserServices,visitorKeys:s.lastSourceCode.visitorKeys,scopeManager:K(s.lastSourceCode.ast,w)}));else{const e=W(f,w,p.filename);if(!e.success)return[e.error];s.lastSourceCode=e.sourceCode}const C=s.lastSourceCode,A=p.allowInlineConfig?function(e,t,n){const r={},i=Object.create(null),s={},o=[],u=[],p=new c({builtInRules:_});return e.getInlineConfigNodes().filter((e=>"Shebang"!==e.type)).forEach((e=>{const{directivePart:c,justificationPart:d}=k.extractDirectiveComment(e.value),f=a.exec(c);if(!f)return;const h=f[1],m=/^eslint-disable-(next-)?line$/u.test(h);if("Line"===e.type&&!m)return;if(n){const t="Block"===e.type?`/*${h}*/`:`//${h}`;return void o.push(B({ruleId:null,message:`'${t}' has no effect because you have 'noInlineConfig' setting in ${n}.`,loc:e.loc,severity:1}))}if("eslint-disable-line"===h&&e.loc.start.line!==e.loc.end.line){const t=`${h} comment should not span multiple lines.`;return void o.push(B({ruleId:null,message:t,loc:e.loc}))}const g=c.slice(f.index+h.length);switch(h){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const n=h.slice("eslint-".length),r={commentToken:e,type:n,value:g,justification:d,ruleMapper:t},{directives:i,directiveProblems:s}=M(r);u.push(...i),o.push(...s);break}case"exported":Object.assign(s,k.parseStringConfig(g,e));break;case"globals":case"global":for(const[t,{value:n}]of Object.entries(k.parseStringConfig(g,e))){let r;try{r=l.normalizeConfigGlobal(n)}catch(t){o.push(B({ruleId:null,loc:e.loc,message:t.message}));continue}i[t]?(i[t].comments.push(e),i[t].value=r):i[t]={comments:[e],value:r}}break;case"eslint":{const n=k.parseJsonConfig(g,e.loc);n.success?Object.keys(n.config).forEach((i=>{const s=t(i),a=n.config[i];if(s){try{p.validateRuleOptions(s,i,a)}catch(t){return void o.push(B({ruleId:i,message:t.message,loc:e.loc}))}r[i]=a}else o.push(B({ruleId:i,loc:e.loc}))})):o.push(n.error);break}}})),{configuredRules:r,enabledGlobals:i,exportedVariables:s,problems:o,disableDirectives:u}}(C,(e=>G(s,e)),p.warnInlineConfig):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};!function(e,n,{exportedVariables:r,enabledGlobals:i}){for(const r of new Set([...Object.keys(n),...Object.keys(i)])){const s=void 0===n[r]?void 0:l.normalizeConfigGlobal(n[r]),o=i[r]&&i[r].value||s,a=i[r]&&i[r].comments;if("off"===o)continue;let c=e.set.get(r);c||(c=new t.Variable(r,e),e.variables.push(c),e.set.set(r,c)),c.eslintImplicitGlobalSetting=s,c.eslintExplicitGlobal=void 0!==a,c.eslintExplicitGlobalComments=a,c.writeable="writable"===o}Object.keys(r).forEach((t=>{const n=e.set.get(t);n&&(n.eslintUsed=!0,n.eslintExported=!0)})),e.through=e.through.filter((t=>{const n=t.identifier.name,r=e.set.get(n);return!r||(t.resolved=r,r.references.push(t),!1)}))}(C.scopeManager.scopes[0],x,{exportedVariables:A.exportedVariables,enabledGlobals:A.enabledGlobals});const D=Object.assign({},o.rules,A.configuredRules);let R;try{R=z(C,D,(e=>G(s,e)),m,w,T,p.filename,p.disableFixes,s.cwd,i.physicalFilename)}catch(e){if(e.message+=`\nOccurred while linting ${p.filename}`,P("An error occurred while traversing"),P("Filename:",p.filename),e.currentNode){const{line:t}=e.currentNode.loc.start;P("Line:",t),e.message+=`:${t}`}throw P("Parser Options:",E),P("Parser Path:",m),P("Settings:",T),e.ruleId&&(e.message+=`\nRule: "${e.ruleId}"`),e}return h({directives:A.disableDirectives,disableFixes:p.disableFixes,problems:R.concat(A.problems).sort(((e,t)=>e.line-t.line||e.column-t.column)),reportUnusedDisableDirectives:p.reportUnusedDisableDirectives})}verify(e,t,n){P("Verify");const{configType:r,cwd:i}=Y.get(this),s="string"==typeof n?{filename:n}:n||{};if(t){if("flat"===r){let n=t;return Array.isArray(t)&&"function"==typeof t.getConfig||(n=new O(t,{basePath:i}),n.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(e,n,s,!0))}if("function"==typeof t.extractConfig)return this._distinguishSuppressedMessages(this._verifyWithConfigArray(e,t,s))}return s.preprocess||s.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(e,t,s)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(e,t,s))}_verifyWithFlatConfigArrayAndProcessor(t,n,r,i){const s=r.filename||"",o=F(s),a=r.physicalFilename||o,l=X(t),c=r.preprocess||(e=>[e]),u=r.postprocess||(e=>e.flat()),p=r.filterCodeBlock||(e=>e.endsWith(".js")),d=e.extname(s);let f;try{f=c(l,o)}catch(e){const t=`Preprocessing error: ${e.message.replace(/^line \d+:/iu,"").trim()}`;return P("%s\n%s",t,e.stack),[{ruleId:null,fatal:!0,severity:2,message:t,line:e.lineNumber,column:e.column,nodeType:null}]}const h=f.map(((t,o)=>{if(P("A code block was found: %o",t.filename||"(unnamed)"),"string"==typeof t)return this._verifyWithFlatConfigArrayAndWithoutProcessors(t,n,r);const c=t.text,u=e.join(s,`${o}_${t.filename}`);return p(u,c)?!i||l===c&&e.extname(u)===d?this._verifyWithFlatConfigArrayAndWithoutProcessors(c,n,{...r,filename:u,physicalFilename:a}):(P("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(c,i,{...r,filename:u,physicalFilename:a})):(P("This code block was skipped."),[])}));return u(h,o)}_verifyWithFlatConfigArrayAndWithoutProcessors(e,t,n){const r=Y.get(this),i=t||{},s=U(n,i);let o;"string"==typeof e?(r.lastSourceCode=null,o=e):(r.lastSourceCode=e,o=e.text);const l=i.languageOptions;if(l.ecmaVersion=j(l.ecmaVersion),!l.parser)throw new TypeError(`No parser specified for ${s.filename}`);if(I(l.parser)){const e=l.parserOptions;l.sourceType&&(e.sourceType=l.sourceType,"module"===e.sourceType&&e.ecmaFeatures&&e.ecmaFeatures.globalReturn&&(e.ecmaFeatures.globalReturn=!1))}const c=i.settings||{};if(r.lastSourceCode)r.lastSourceCode.scopeManager||(r.lastSourceCode=new d({text:r.lastSourceCode.text,ast:r.lastSourceCode.ast,parserServices:r.lastSourceCode.parserServices,visitorKeys:r.lastSourceCode.visitorKeys,scopeManager:K(r.lastSourceCode.ast,l)}));else{const e=W(o,l,s.filename);if(!e.success)return[e.error];r.lastSourceCode=e.sourceCode}const u=r.lastSourceCode;u.applyLanguageOptions(l);const p={rules:{}},f=[];if(s.allowInlineConfig)if(s.warnInlineConfig)u.getInlineConfigNodes().forEach((e=>{f.push(B({ruleId:null,message:`'${u.text.slice(e.range[0],e.range[1])}' has no effect because you have 'noInlineConfig' setting in ${s.warnInlineConfig}.`,loc:e.loc,severity:1}))}));else{const e=u.applyInlineConfig();f.push(...e.problems.map(B).map((e=>(e.fatal=!0,e))));const t=new T;for(const{config:n,node:r}of e.configs)Object.keys(n.rules).forEach((e=>{const s=S(e,i),o=n.rules[e];if(s)try{const n=Array.isArray(o)?o:[o];w(e,o),C(e,n[0]),t.validate({plugins:i.plugins,rules:{[e]:n}}),p.rules[e]=o}catch(t){let n=t.message.slice(t.message.startsWith('Key "rules":')?t.message.indexOf(":",12)+1:t.message.indexOf(":")+1).trim();t.messageTemplate&&(n+=` You passed "${o}".`),f.push(B({ruleId:e,message:`Inline configuration for rule "${e}" is invalid:\n\t${n}\n`,loc:r.loc}))}else f.push(B({ruleId:e,loc:r.loc}))}))}const m=s.allowInlineConfig&&!s.warnInlineConfig?function(e,t){const n=[],r=[];return e.getInlineConfigNodes().filter((e=>"Shebang"!==e.type)).forEach((e=>{const{directivePart:i,justificationPart:s}=k.extractDirectiveComment(e.value),o=a.exec(i);if(!o)return;const l=o[1],c=/^eslint-disable-(next-)?line$/u.test(l);if("Line"===e.type&&!c)return;if("eslint-disable-line"===l&&e.loc.start.line!==e.loc.end.line){const t=`${l} comment should not span multiple lines.`;return void n.push(B({ruleId:null,message:t,loc:e.loc}))}const u=i.slice(o.index+l.length);switch(l){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const i={commentToken:e,type:l.slice("eslint-".length),value:u,justification:s,ruleMapper:t},{directives:o,directiveProblems:a}=M(i);r.push(...o),n.push(...a);break}}})),{problems:n,disableDirectives:r}}(u,(e=>S(e,i))):{problems:[],disableDirectives:[]},g=Object.assign({},i.rules,p.rules);let y;u.finalize();try{y=z(u,g,(e=>S(e,i)),void 0,l,c,s.filename,s.disableFixes,r.cwd,n.physicalFilename)}catch(e){if(e.message+=`\nOccurred while linting ${s.filename}`,P("An error occurred while traversing"),P("Filename:",s.filename),e.currentNode){const{line:t}=e.currentNode.loc.start;P("Line:",t),e.message+=`:${t}`}throw P("Parser Options:",l.parserOptions),P("Settings:",c),e.ruleId&&(e.message+=`\nRule: "${e.ruleId}"`),e}return h({directives:m.disableDirectives,disableFixes:s.disableFixes,problems:y.concat(m.problems).concat(f).sort(((e,t)=>e.line-t.line||e.column-t.column)),reportUnusedDisableDirectives:s.reportUnusedDisableDirectives})}_verifyWithConfigArray(e,t,n){P("With ConfigArray: %s",n.filename),Y.get(this).lastConfigArray=t;const r=t.extractConfig(n.filename),i=r.processor&&t.pluginProcessors.get(r.processor);if(i){P("Apply the processor: %o",r.processor);const{preprocess:s,postprocess:o,supportsAutofix:a}=i,l=n.disableFixes||!a;return this._verifyWithProcessor(e,r,{...n,disableFixes:l,postprocess:o,preprocess:s},t)}return this._verifyWithoutProcessors(e,r,n)}_verifyWithFlatConfigArray(e,t,n,r=!1){P("With flat config: %s",n.filename);const i=n.filename||"__placeholder__.js";Y.get(this).lastConfigArray=t;const s=t.getConfig(i);if(!s)return[{ruleId:null,severity:1,message:`No matching configuration found for ${i}.`,line:0,column:0,nodeType:null}];if(s.processor){P("Apply the processor: %o",s.processor);const{preprocess:r,postprocess:o,supportsAutofix:a}=s.processor,l=n.disableFixes||!a;return this._verifyWithFlatConfigArrayAndProcessor(e,s,{...n,filename:i,disableFixes:l,postprocess:o,preprocess:r},t)}return r&&(n.preprocess||n.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(e,s,n):this._verifyWithFlatConfigArrayAndWithoutProcessors(e,s,n)}_verifyWithProcessor(t,n,r,i){const s=r.filename||"",o=F(s),a=r.physicalFilename||o,l=X(t),c=r.preprocess||(e=>[e]),u=r.postprocess||(e=>e.flat()),p=r.filterCodeBlock||(e=>e.endsWith(".js")),d=e.extname(s);let f;try{f=c(l,o)}catch(e){const t=`Preprocessing error: ${e.message.replace(/^line \d+:/iu,"").trim()}`;return P("%s\n%s",t,e.stack),[{ruleId:null,fatal:!0,severity:2,message:t,line:e.lineNumber,column:e.column,nodeType:null}]}const h=f.map(((t,o)=>{if(P("A code block was found: %o",t.filename||"(unnamed)"),"string"==typeof t)return this._verifyWithoutProcessors(t,n,r);const c=t.text,u=e.join(s,`${o}_${t.filename}`);return p(u,c)?!i||l===c&&e.extname(u)===d?this._verifyWithoutProcessors(c,n,{...r,filename:u,physicalFilename:a}):(P("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(c,i,{...r,filename:u,physicalFilename:a})):(P("This code block was skipped."),[])}));return u(h,o)}_distinguishSuppressedMessages(e){const t=[],n=[],r=Y.get(this);for(const r of e)r.suppressions?n.push(r):t.push(r);return r.lastSuppressedMessages=n,t}getSourceCode(){return Y.get(this).lastSourceCode}getSuppressedMessages(){return Y.get(this).lastSuppressedMessages}defineRule(e,t){H(this),Y.get(this).ruleMap.define(e,t)}defineRules(e){H(this),Object.getOwnPropertyNames(e).forEach((t=>{this.defineRule(t,e[t])}))}getRules(){H(this);const{lastConfigArray:e,ruleMap:t}=Y.get(this);return new Map(function*(){yield*t,e&&(yield*e.pluginRules)}())}defineParser(e,t){H(this),Y.get(this).parserMap.set(e,t)}verifyAndFix(e,t,n){let r,i=[],s=!1,o=0,a=e;const l=n&&n.filename||`${e.slice(0,10)}...`,c=!n||void 0===n.fix||n.fix;do{if(o++,P(`Linting code for ${l} (pass ${o})`),i=this.verify(a,t,n),P(`Generating fixed text for ${l} (pass ${o})`),r=v.applyFixes(a,i,c),1===i.length&&i[0].fatal)break;s=s||r.fixed,a=r.output}while(r.fixed&&o<10);return r.fixed&&(r.messages=this.verify(a,t,n)),r.fixed=s,r.output=a,r}},getLinterInternalSlots(e){return Y.get(e)}},jV}void 0===by&&((()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==vy)return vy;throw new Error("Unable to locate global `this`")})().process=function(){if(Ey)return xy.exports;Ey=1;var e,t,n=xy.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:r}catch(t){e=r}try{t="function"==typeof clearTimeout?clearTimeout:i}catch(e){t=i}}();var o,a=[],l=!1,c=-1;function u(){l&&o&&(l=!1,o.length?a=o.concat(a):c=-1,a.length&&p())}function p(){if(!l){var e=s(u);l=!0;for(var n=a.length;n;){for(o=a,a=[];++c1)for(var n=1;n{n.push({label:e,type:"function"==typeof t?"function":"variable"})})),{from:e,options:n,validFor:/^[\w$]*$/}}function zV(e=window,t=[]){return function(n){var r;const i=Bc(n.state).resolveInner(n.pos,-1);if(WV.includes(i.name)&&"MemberExpression"===(null===(r=i.parent)||void 0===r?void 0:r.name)){const t=i.parent.getChild("Expression");if("VariableName"===(null==t?void 0:t.name)){const r=/\./.test(i.name)?i.to:i.from,s=n.state.sliceDoc(t.from,t.to);if("object"==typeof e[s])return QV(r,e[s])}else if("MemberExpression"===(null==t?void 0:t.name)){const r=i.to,s=n.state.sliceDoc(t.from,t.to);let o;if(o=s.startsWith("this.props")?(0,Ve.NA)(e,s.replace("this.props","__UNSAFE_TANGO_CURRENT_PAGE_RENDER_RUNTIME__")):(0,Ve.NA)(e,s),"object"==typeof o)return QV(r,o)}}else{if("VariableName"===i.name)return QV(i.from,e);if(n.explicit&&!$V.includes(i.name))return QV(n.pos,e);if(!n.explicit&&"{"===i.name)return{from:n.pos,options:t}}return null}}function XV(e){var{shape:t="solid",suffix:n,status:s,autoCompleteContext:o,autoCompleteOptions:a,showLineNumbers:l,showFoldGutter:u,enableESLint:p=!1}=e,d=V(e,["shape","suffix","status","autoCompleteContext","autoCompleteOptions","showLineNumbers","showFoldGutter","enableESLint"]);const f=(0,r.useMemo)((()=>{const e=a?a.map((e=>({label:e}))):[];return iy.data.of({autocomplete:zV(o,e)})}),[o,a]),h=[dy({jsx:!0}),f];p&&h.push(function(e={}){return[Bm.of(e),km,Pm,Im,Rm]}(),function(e,t={}){return[ym.of({source:e,config:t}),gm,Lm]}(function(e,t){return t||(t={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},e.getRules().forEach(((e,n)=>{e.meta.docs.recommended&&(t.rules[n]=2)}))),n=>{let{state:r}=n,i=[];for(let{from:n,to:s}of iy.findRegions(r)){let o=r.doc.lineAt(n),a={line:o.number-1,col:n-o.from,pos:n};for(let o of e.verify(r.sliceDoc(n,s),t))i.push(yy(o,r.doc,a))}return i}}(new KV,qV)));const{rootStyle:m,codeSetup:g}=function({shape:e,status:t,showLineNumbers:n,showFoldGutter:r}){let i,s,o;"solid"===e&&(i={border:"solid",borderColor:"error"===t?"error.60":"line.normal",borderRadius:"s"},s=!1,o=!1);return{rootStyle:i,codeSetup:{lineNumbers:null!=n?n:s,foldGutter:null!=r?r:o,searchKeymap:!1}}}({shape:t,status:s,showLineNumbers:l,showFoldGutter:u});return i().createElement(c.xu,Object.assign({className:"InputCode",display:"flex",alignItems:"center",overflow:"hidden"},m),i().createElement(c.xu,{flex:"1",overflow:"auto"},i().createElement(ag,Object.assign({extensions:h,basicSetup:g},d))),n)}var GV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ZV=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:GV}))};ZV.displayName="SearchOutlined";var YV=r.forwardRef(ZV);function HV(e){var{placeholder:t="请输入关键词",onChange:n,width:r,escapeValue:s=!0,style:o={}}=e,a=V(e,["placeholder","onChange","width","escapeValue","style"]);const l=Object.assign({width:r},o);return i().createElement(u.Input,Object.assign({placeholder:t,onChange:e=>{let t=e.target.value;s&&(t=t.replaceAll("\\","\\\\")),null==n||n(t)},suffix:i().createElement(c.xv,{color:"text.placeholder"},i().createElement(YV,null)),allowClear:!0,style:l},a))}var JV=n(55171),eK=n.n(JV);function tK(e){var{enableCopy:t,onCopy:n}=e,r=V(e,["enableCopy","onCopy"]);return i().createElement(eK(),Object.assign({name:!1,iconStyle:"square",quotesOnKeys:!1,displayDataTypes:!1,enableClipboard:!!t&&(e=>{const t=function(e){if(!Array.isArray(e))return;!1===e[0]&&(e=e.slice(1));return[...e].reduce(((e,t)=>e=nK.test(t)?`${e}[${t}]`:e?[e,t].join("?."):t),"")}(e.namespace),r=null==n?void 0:n(t,e);navigator.clipboard.writeText(r||t)})},r))}const nK=/^\d+$/;var rK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},iK=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:rK}))};iK.displayName="PlusOutlined";var sK=r.forwardRef(iK),oK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},aK=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:oK}))};aK.displayName="DeleteOutlined";var lK=r.forwardRef(aK);const cK={flex:1};function uK({value:e,onChange:t,onRemove:n,options:r}){return i().createElement(c.xu,{display:"flex",gap:"m"},i().createElement(u.Select,{placeholder:"请选择",options:r,value:e,onChange:e=>{null==t||t(e)},style:cK}),i().createElement(u.Tooltip,{title:"删除"},i().createElement(u.Button,{type:"text",icon:i().createElement(lK,null),onClick:n})))}function pK({title:e,children:t}){return i().createElement(c.xu,{className:"SettingGroup",mb:"l"},i().createElement(c.xu,{className:"SettingGroupTitle",fontSize:"14px",fontWeight:"bold",borderBottom:"solid",borderBottomColor:"#f0f0f0",px:"l",py:"s"},e),i().createElement(c.xu,{className:"SettingGroupChildren",px:"l"},t))}const dK={switch:e=>{var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(u.Switch,Object.assign({},r,{checked:t,onChange:n}))},input:e=>{var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(u.Input,Object.assign({},r,{value:t,onBlur:e=>n(e.target.value)}))},select:u.Select,selectList:function({value:e=[],onChange:t,options:n=[],isUniqueValue:s=!1}){const[o,a]=(0,r.useState)(!1);return s&&(n=n.filter((t=>e.indexOf(t.value)<0))),i().createElement(c.xu,null,!e.length&&!o&&i().createElement(c.xu,{color:"text.note"},"空"),i().createElement(c.xu,{display:"flex",flexDirection:"column",gap:"m"},e.map(((r,s)=>i().createElement(uK,{key:s,options:n,value:r,onChange:n=>{if(n===r)return;const i=[...e];i[s]=n,null==t||t(i)},onRemove:()=>{const n=[...e];n.splice(s,1),null==t||t(n)}}))),o&&i().createElement(uK,{options:n,onChange:n=>{n&&(null==t||t(e.concat([n])),a(!1))},onRemove:()=>{a(!1)}})),i().createElement(c.xu,{mt:"m"},i().createElement(u.Button,{icon:i().createElement(sK,null),onClick:()=>a(!0)},"新增")))}};function fK({title:e,description:t,children:n,layoutDirection:r="row",component:s,componentProps:o={},onChange:a,value:l}){let u=n;const p=dK[s];p&&(u=i().createElement(p,Object.assign({},o,{value:l,onChange:a})));const{rootStyle:d,leftStyle:f,rightStyle:h}=function(e){let t,n,r;"row"===e?(t={display:"flex",alignItems:"center"},n={width:"60%"},r={width:"40%",display:"flex",justifyContent:"flex-end"}):"column"===e&&(t={display:"flex",flexDirection:"column"});return{rootStyle:t,leftStyle:n,rightStyle:r}}(r);return i().createElement(c.xu,Object.assign({className:"SettingItem",py:"m",borderBottom:"solid",borderBottomColor:"#f0f0f0"},d),i().createElement(c.xu,Object.assign({className:"SettingItemLeft"},f),i().createElement(c.xu,{className:"SettingItemTitle",fontSize:"14px",fontWeight:"bold",mb:"s"},e),i().createElement(c.xu,{className:"SettingItemDescription",fontSize:"12px",color:"text.note"},t)),i().createElement(c.xu,Object.assign({className:"SettingItemRight"},h),u))}var hK=n(57316),mK=n.n(hK);const gK=mK()(u.Tabs)` +`;function qe(e){const{size:t="m",shape:n="outline",type:r="normal",disabled:s,selected:o,children:a,icon:l,tip:p,tooltip:d=p,tooltipPlacement:f="bottom",items:h,overlay:m,overlayStyle:g,onItemClick:y,dropdownProps:_={}}=e,b=V(e,["size","shape","type","disabled","selected","children","icon","tip","tooltip","tooltipPlacement","items","overlay","overlayStyle","onItemClick","dropdownProps"]),v=se()({[`size-${t}`]:t,[`shape-${n}`]:n,[`type-${r}`]:r,disabled:s,selected:o}),E=!!h||!!m;let x=i().createElement(c.zx,Object.assign({css:$e,className:v,type:"button"},b),i().createElement(c.xu,{as:"span"},l&&i().createElement(c.xu,{as:"span",className:"buttonIcon",mr:"s"},l),a),E?i().createElement(me,null):null);return d&&(x=i().createElement(u.Tooltip,{title:d,placement:f},x)),E&&(x=i().createElement(u.Dropdown,Object.assign({},_,{overlay:m,overlayStyle:g,menu:{items:h,onClick:y}}),x)),x}var Qe=n(87462),ze=n(63366);class Xe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=rt(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Ze.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=rt(this,e,t);let n=[];return this.decompose(e,t,n,0),Ze.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Je(this),i=new Je(e);for(let e=t,s=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(s+=r.value.length,r.done||s>=n)return!0}}iter(e=1){return new Je(this,e)}iterRange(e,t=this.length){return new et(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new tt(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Ge(e):Ze.from(Ge.split(e,[])):Xe.empty}}class Ge extends Xe{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.text[i],o=r+s.length;if((t?n:o)>=e)return new nt(r,o,n,s);r=o+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new Ge(Ye(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=He(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new Ge(t,e.length+i.length));else{let e=t.length>>1;n.push(new Ge(t.slice(0,e)),new Ge(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof Ge))return super.replace(e,t,n);[e,t]=rt(this,e,t);let r=He(this.text,He(n.text,Ye(this.text,0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new Ge(r,i):Ze.from(Ge.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){[e,t]=rt(this,e,t);let r="";for(let i=0,s=0;i<=t&&se&&s&&(r+=n),ei&&(r+=o.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new Ge(n,r)),n=[],r=-1);return r>-1&&t.push(new Ge(n,r)),t}}class Ze extends Xe{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.children[i],o=r+s.length,a=n+s.lines-1;if((t?a:o)>=e)return s.lineInner(e,t,n,r);r=o+1,n=a+1}}decompose(e,t,n,r){for(let i=0,s=0;s<=t&&i=s){let i=r&((s<=e?1:0)|(a>=t?2:0));s>=e&&a<=t&&!i?n.push(o):o.decompose(e-s,t-s,n,i)}s=a+1}}replace(e,t,n){if([e,t]=rt(this,e,t),n.lines=i&&t<=o){let a=s.replace(e-i,t-i,n),l=this.lines-s.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new Ze(i,this.length-(t-e)+n.length)}return super.replace(i,o,a)}i=o+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=rt(this,e,t);let r="";for(let i=0,s=0;ie&&i&&(r+=n),es&&(r+=o.sliceString(e-s,t-s,n)),s=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ze))return 0;let n=0,[r,i,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==s||i==o)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new Ge(n,t)}let r=Math.max(32,n>>5),i=r<<1,s=r>>1,o=[],a=0,l=-1,c=[];function u(e){let t;if(e.lines>i&&e instanceof Ze)for(let t of e.children)u(t);else e.lines>s&&(a>s||!a)?(p(),o.push(e)):e instanceof Ge&&a&&(t=c[c.length-1])instanceof Ge&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new Ge(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>r&&p(),a+=e.lines,l+=e.length+1,c.push(e))}function p(){0!=a&&(o.push(1==c.length?c[0]:Ze.from(c,l)),l=-1,a=c.length=0)}for(let t of e)u(t);return p(),1==o.length?o[0]:new Ze(o,t)}}function He(e,t,n=0,r=1e9){for(let i=0,s=0,o=!0;s=n&&(l>r&&(a=a.slice(0,r-i)),i0?1:(e instanceof Ge?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],s=i>>1,o=r instanceof Ge?r.text.length:r.children.length;if(s==(t>0?o:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof Ge){let i=r.text[s+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[s+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Ge?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class et{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Je(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class tt{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Xe.prototype[Symbol.iterator]=function(){return this.iter()},Je.prototype[Symbol.iterator]=et.prototype[Symbol.iterator]=tt.prototype[Symbol.iterator]=function(){return this});class nt{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function rt(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}let it="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;ee)return it[t-1]<=e;return!1}function ot(e){return e>=127462&&e<=127487}function at(e,t,n=!0,r=!0){return(n?lt:ct)(e,t,r)}function lt(e,t,n){if(t==e.length)return t;t&&ut(e.charCodeAt(t))&&pt(e.charCodeAt(t-1))&&t--;let r=dt(e,t);for(t+=ht(r);t=0&&ot(dt(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function ct(e,t,n){for(;t>0;){let r=lt(e,t-2,n);if(r=56320&&e<57344}function pt(e){return e>=55296&&e<56320}function dt(e,t){let n=e.charCodeAt(t);if(!pt(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ut(r)?r-56320+(n-55296<<10)+65536:n}function ft(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function ht(e){return e<65536?1:2}const mt=/\r\n?|\n/;var gt=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(gt||(gt={}));class yt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return i+(e-r);i+=o}else{if(n!=gt.Simple&&l>=e&&(n==gt.TrackDel&&re||n==gt.TrackBefore&&re))return null;if(l>e||l==e&&t<0&&!o)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&i>=e)return!(rt)||"cover";r=i}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new yt(e)}static create(e){return new yt(e)}}class _t extends yt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Et(this,((t,n,r,i,s)=>e=e.replace(r,r+(n-t),s)),!1),e}mapDesc(e,t=!1){return xt(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r=0){t[r]=o,t[r+1]=s;let a=r>>1;for(;n.length0&&vt(n,t,i.text),i.forward(e),o+=e}let l=e[s++];for(;o>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],s=0,o=null;function a(e=!1){if(!e&&!r.length)return;so||e<0||o>t)throw new RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let u=c?"string"==typeof c?Xe.of(c.split(n||mt)):c:Xe.empty,p=u.length;if(e==o&&0==p)return;es&&bt(r,e-s,-1),bt(r,o-e,p),vt(i,r,u),s=o}}(e),a(!o),o}static empty(e){return new _t(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)t.push(i[0],0);else{for(;n.length=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function vt(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(i,c,s,u,p),i=c,s=u}}}function xt(e,t,n,r=!1){let i=[],s=r?[]:null,o=new Ot(e),a=new Ot(t);for(let e=-1;;)if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);bt(i,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(a.len=0&&e=0)){if(o.done&&a.done)return s?_t.createSet(i,s):yt.create(i);throw new Error("Mismatched change set lengths")}{let t=0,n=o.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.lent||o.ins>=0&&o.len>t)&&(e||r.length>n),s.forward2(t),o.forward(t)}}else bt(r,0,o.ins,e),i&&vt(i,r,o.text),o.next()}}class Ot{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Xe.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Xe.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Tt{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new Tt(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return wt.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return wt.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return wt.range(e.anchor,e.head)}static create(e,t,n){return new Tt(e,t,n)}}class wt{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:wt.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new wt(e.ranges.map((e=>Tt.fromJSON(e))),e.main)}static single(e,t=e){return new wt([wt.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;re?8:0)|i)}static normalized(e,t=0){let n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;nr.head?wt.range(o,s):wt.range(s,o))}}return new wt(e,t)}}function Ct(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let At=0;class Pt{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=At++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new Pt(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:kt),!!e.static,e.enables)}of(e){return new Dt([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Dt(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Dt(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function kt(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class Dt{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=At++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,s=e[i]>>1,o=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:0==(1&(null!==(t=e[n.id])&&void 0!==t?t:1))&&c.push(e[n.id]);return{create(e){return e.values[s]=n(e),1},update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||It(e,c)){let t=n(e);if(o?!Rt(t,e.values[s],r):!r(t,e.values[s]))return e.values[s]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=Xt(t,l);if(this.dependencies.every((n=>n instanceof Pt?t.facet(n)===e.facet(n):!(n instanceof Mt)||t.field(n,!1)==e.field(n,!1)))||(o?Rt(a=n(e),i,r):r(a=n(e),i)))return e.values[s]=i,0}else a=n(e);return e.values[s]=a,1}}}}function Rt(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id])),i=n.map((e=>e.type)),s=r.filter((e=>!(1&e))),o=e[t.id]>>1;function a(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Bt).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Bt.of({field:this,create:e})]}get extension(){return this}}const jt=4,Nt=3,Ft=2,Ut=1;function Vt(e){return t=>new Wt(t,e)}const Kt={highest:Vt(0),high:Vt(Ut),default:Vt(Ft),low:Vt(Nt),lowest:Vt(jt)};class Wt{constructor(e,t){this.inner=e,this.prec=t}}class $t{of(e){return new qt(this,e)}reconfigure(e){return $t.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class qt{constructor(e,t){this.compartment=e,this.inner=t}}class Qt{constructor(e,t,n,r,i,s){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],i=Object.create(null),s=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],i=new Map;function s(e,o){let a=i.get(e);if(null!=a){if(a<=o)return;let t=r[a].indexOf(e);t>-1&&r[a].splice(t,1),e instanceof qt&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)s(t,o);else if(e instanceof qt){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),s(r,o)}else if(e instanceof Wt)s(e.inner,e.prec);else if(e instanceof Mt)r[o].push(e),e.provides&&s(e.provides,o);else if(e instanceof Dt)r[o].push(e),e.facet.extensions&&s(e.facet.extensions,Ft);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(t,o)}}return s(e,Ft),r.reduce(((e,t)=>e.concat(t)))}(e,t,s))n instanceof Mt?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let o=Object.create(null),a=[],l=[];for(let e of r)o[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,s=c&&c[e]||[];if(t.every((e=>0==e.type)))if(o[r.id]=a.length<<1|1,kt(s,t))a.push(n.facet(r));else{let e=r.combine(t.map((e=>e.value)));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(o[e.id]=a.length<<1|1,a.push(e.value)):(o[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));o[r.id]=l.length<<1,l.push((e=>Lt(e,r,t)))}}let u=l.map((e=>e(o)));return new Qt(e,s,u,o,a,i)}}function zt(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Xt(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const Gt=Pt.define(),Zt=Pt.define({combine:e=>e.some((e=>e)),static:!0}),Ht=Pt.define({combine:e=>e.length?e[0]:void 0,static:!0}),Yt=Pt.define(),Jt=Pt.define(),en=Pt.define(),tn=Pt.define({combine:e=>!!e.length&&e[0]});class nn{constructor(e,t){this.type=e,this.value=t}static define(){return new rn}}class rn{of(e){return new nn(this,e)}}class sn{constructor(e){this.map=e}of(e){return new on(this,e)}}class on{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new on(this.type,t)}is(e){return this.type==e}static define(e={}){return new sn(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}on.reconfigure=on.define(),on.appendConfig=on.define();class an{constructor(e,t,n,r,i,s){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,n&&Ct(n,t.newLength),i.some((e=>e.type==an.time))||(this.annotations=i.concat(an.time.of(Date.now())))}static create(e,t,n,r,i,s){return new an(e,t,n,r,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(an.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function ln(e,t){let n=[];for(let r=0,i=0;;){let s,o;if(r=e[r]))s=e[r++],o=e[r++];else{if(!(i=0;i--){let s=n[i](e);s&&Object.keys(s).length&&(r=cn(r,un(t,s,e.changes.newLength),!0))}return r==e?e:an.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(Yt)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:ln(n,t))}if(!0!==n){let r,i;if(!1===n)i=e.changes.invertedDesc,r=_t.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=an.create(t,r,e.selection&&e.selection.map(i),on.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Jt);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof an?i:Array.isArray(i)&&1==i.length&&i[0]instanceof an?i[0]:pn(t,fn(i),!1)}return e}(i):i)}an.time=nn.define(),an.userEvent=nn.define(),an.addToHistory=nn.define(),an.remote=nn.define();const dn=[];function fn(e){return null==e?dn:Array.isArray(e)?e:[e]}var hn=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(hn||(hn={}));const mn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let gn;try{gn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function yn(e){return t=>{if(!/\S/.test(t))return hn.Space;if(function(e){if(gn)return gn.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||mn.test(n)))return!0}return!1}(t))return hn.Word;for(let n=0;n-1)return hn.Word;return hn.Other}}class _n{constructor(e,t,n,r,i,s){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let e=0;ei.set(t,e))),n=null),i.set(t.value.compartment,t.value.extension)):t.is(on.reconfigure)?(n=null,r=t.value):t.is(on.appendConfig)&&(n=null,r=fn(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=Qt.resolve(r,i,this),t=new _n(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let s=e.startState.facet(Zt)?e.newSelection:e.newSelection.asSingle();new _n(n,e.newDoc,s,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:wt.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],s=fn(n.effects);for(let n=1;ni.spec.fromJSON(s,e))))}return _n.create({doc:e.doc,selection:wt.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Qt.resolve(e.extensions||[],new Map),n=e.doc instanceof Xe?e.doc:Xe.of((e.doc||"").split(t.staticFacet(_n.lineSeparator)||mt)),r=e.selection?e.selection instanceof wt?e.selection:wt.single(e.selection.anchor,e.selection.head):wt.single(0);return Ct(r,n.length),t.staticFacet(Zt)||(r=r.asSingle()),new _n(t,n,r,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(_n.tabSize)}get lineBreak(){return this.facet(_n.lineSeparator)||"\n"}get readOnly(){return this.facet(tn)}phrase(e,...t){for(let t of this.facet(_n.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]}))),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Gt))for(let s of i(this,t,n))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return yn(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),s=e-n,o=e-n;for(;s>0;){let e=at(t,s,!1);if(i(t.slice(e,s))!=hn.Word)break;s=e}for(;oe.length?e[0]:4}),_n.lineSeparator=Ht,_n.readOnly=tn,_n.phrases=Pt.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((n=>e[n]==t[n]))}}),_n.languageData=Gt,_n.changeFilter=Yt,_n.transactionFilter=Jt,_n.transactionExtender=en,$t.reconfigure=on.define();class vn{eq(e){return this==e}range(e,t=e){return En.create(e,t,this)}}vn.prototype.startSide=vn.prototype.endSide=0,vn.prototype.point=!1,vn.prototype.mapMode=gt.TrackDel;class En{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new En(e,t,n)}}function xn(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class Sn{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let s=r,o=i.length;;){if(s==o)return s;let r=s+o>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==s)return a>=0?s:o;a>=0?o=r:s=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),s=this.findIndex(n,1e9,!1,i);ic||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(s<0&&(s=l),u.point&&(o=Math.max(o,c-l)),n.push(u),r.push(l-s),i.push(c-s))}return{mapped:n.length?new Sn(r,i,n,o):null,pos:s}}}class On{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new On(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,s=e.filter;if(0==t.length&&!s)return this;if(n&&(t=t.slice().sort(xn)),this.isEmpty)return t.length?On.of(t):this;let o=new Cn(this,null,-1).goto(0),a=0,l=[],c=new Tn;for(;o.value||a=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||io.to||i=i&&e<=i+s.length&&!1===s.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return An.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return An.from(e).goto(t)}static compare(e,t,n,r,i=-1){let s=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i)),o=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i)),a=wn(s,o,n),l=new kn(s,a,i),c=new kn(o,a,i);n.iterGaps(((e,t,n)=>Dn(l,e,c,t,n,r))),n.empty&&0==n.length&&Dn(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(i.length!=s.length)return!1;if(!i.length)return!0;let o=wn(i,s),a=new kn(i,o,0).goto(n),l=new kn(s,o,0).goto(n);for(;;){if(a.to!=l.to||!Rn(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let s=new kn(e,null,i).goto(t),o=t,a=s.openStart;for(;;){let e=Math.min(s.to,n);if(s.point){let n=s.activeForPoint(s.to),i=s.pointFromo&&(r.span(o,e,s.active,a),a=s.openEnd(e));if(s.to>n)return a+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(e,t=!1){let n=new Tn;for(let r of e instanceof En?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(xn);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return On.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=On.empty;r=r.nextLayer)t=new On(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}On.empty=new On([],[],null,-1),On.empty.nextLayer=On.empty;class Tn{finishChunk(e){this.chunks.push(new Sn(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Tn)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(On.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=On.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function wn(e,t,n){let r=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new Cn(s,t,n,i));return 1==r.length?r[0]:new An(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)Pn(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)Pn(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Pn(this.heap,0)}}}function Pn(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let i=e[r];if(r+1=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}class kn{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=An.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){In(this.active,e),In(this.activeTo,e),In(this.activeRank,e),this.minActive=Bn(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t0;)t++;Ln(this.active,t,n),Ln(this.activeTo,t,r),Ln(this.activeRank,t,i),e&&Ln(e,t,this.cursor.from),this.minActive=Bn(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&In(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Dn(e,t,n,r,i,s){e.goto(t),n.goto(r);let o=r+i,a=r,l=r-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,r=t<0?e.to+l:n.to,i=Math.min(r,o);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Rn(e.activeForPoint(e.to),n.activeForPoint(n.to))||s.comparePoint(a,i,e.point,n.point):i>a&&!Rn(e.active,n.active)&&s.compareRange(a,i,e.active,n.active),r>o)break;a=r,t<=0&&e.next(),t>=0&&n.next()}}function Rn(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function Bn(e,t){let n=-1,r=1e9;for(let i=0;i=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=at(e,r)}return!0===r?-1:e.length}const Nn="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Fn="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Un="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Vn{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,s,o){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return s.push(e[0]+";");for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),o,s);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),o,a,c)}else null!=o&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+o+";")}(a.length||c)&&s.push((!n||l||o?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Un[Nn]||1;return Un[Nn]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[Fn],i=n&&n.nonce;r?i&&r.setNonce(i):r=new Wn(e,i),r.mount(Array.isArray(t)?t:[t],e)}}let Kn=new Map;class Wn{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Kn.get(n);if(t)return e[Fn]=t;this.sheet=new r.CSSStyleSheet,Kn.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Fn]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t-1&&(this.modules.splice(o,1),i--,o=-1),-1==o){if(this.modules.splice(i++,0,s),n)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Qn="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),zn="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xn=0;Xn<10;Xn++)$n[48+Xn]=$n[96+Xn]=String(Xn);for(Xn=1;Xn<=24;Xn++)$n[Xn+111]="F"+Xn;for(Xn=65;Xn<=90;Xn++)$n[Xn]=String.fromCharCode(Xn+32),qn[Xn]=String.fromCharCode(Xn);for(var Gn in $n)qn.hasOwnProperty(Gn)||(qn[Gn]=$n[Gn]);function Zn(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Hn(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Yn(e,t){if(!t.anchorNode)return!1;try{return Hn(e,t.anchorNode)}catch(e){return!1}}function Jn(e){return 3==e.nodeType?dr(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function er(e,t,n,r){return!!n&&(rr(e,t,n,r,-1)||rr(e,t,n,r,1))}function tr(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function nr(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function rr(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:ir(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=tr(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?ir(e):0}}}function ir(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function sr(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function or(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function ar(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class lr{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?ir(t):0),n,Math.min(e.focusOffset,n?ir(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let cr,ur=null;function pr(e){if(e.setActive)return e.setActive();if(ur)return e.focus(ur);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==ur?{get preventScroll(){return ur={preventScroll:!0},!0}}:void 0),!ur){ur=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function gr(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=ir(n)}else{if(!n.parentNode||nr(n))return null;r=tr(n),n=n.parentNode}}}function yr(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&rt)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){s=a,o=c;break}c=u,l=u+n.breakAfter}return{from:i,to:o<0?n+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=br){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Sr(e,t,n,r,i,s,o,a,l){let{children:c}=e,u=c.length?c[t]:null,p=s.length?s[s.length-1]:null,d=p?p.breakAfter:o;if(!(t==r&&u&&!o&&!d&&s.length<2&&u.merge(n,i,s.length?p:null,0==n,a,l))){if(r0&&(!o&&s.length&&u.merge(n,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(n2);var Mr={mac:Br||/Mac/.test(Tr.platform),windows:/Win/.test(Tr.platform),linux:/Linux|X11/.test(Tr.platform),ie:kr,ie_version:Ar?wr.documentMode||6:Pr?+Pr[1]:Cr?+Cr[1]:0,gecko:Dr,gecko_version:Dr?+(/Firefox\/(\d+)/.exec(Tr.userAgent)||[0,0])[1]:0,chrome:!!Rr,chrome_version:Rr?+Rr[1]:0,ios:Br,android:/Android\b/.test(Tr.userAgent),webkit:Ir,safari:Lr,webkit_version:Ir?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=wr.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class jr extends vr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof jr)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new jr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new _r(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,s=t,o=0;0==t&&n<0||t==r&&n>=0?Mr.chrome||Mr.gecko||(t?(i--,o=1):s=0)?0:a.length-1];Mr.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l);return o?sr(l,o<0):l||null}(this.dom,e,t)}}class Nr extends vr{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(hr(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,s){return(!n||!(!(n instanceof Nr&&n.mark.eq(this.mark))||e&&i<=0||te&&t.push(n=e&&(r=i),n=o,i++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Nr(this.mark,t,s)}domAtPos(e){return Vr(this,e)}coordsAt(e,t){return Wr(this,e,t)}}class Fr extends vr{static create(e,t,n){return new Fr(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Fr.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,r,i,s){return!(n&&(!(n instanceof Fr&&this.widget.compare(n.widget))||e>0&&i<=0||t0)?_r.before(this.dom):_r.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let t=s?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top0?_r.before(this.dom):_r.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Xe.empty}get isHidden(){return!0}}function Vr(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;ie&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e0&&t instanceof Nr&&i.length&&(r=i[i.length-1])instanceof Nr&&r.mark.eq(t.mark)?Kr(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function Wr(e,t,n){let r=null,i=-1,s=null,o=-1;!function e(t,a){for(let l=0,c=0;l=a&&(u.children.length?e(u,a-c):(!s||s.isHidden&&n>0)&&(p>a||c==p&&u.getSide()>0)?(s=u,o=a-c):(c-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let s of r)if(s!=n&&(-1==i.indexOf(s)||e[s]!==t[s]))return!1;return!0}function zr(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function Xr(e){let t=Object.create(null);for(let n=0;n0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Qr(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Kr(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=$r(t,this.attrs||{})),n&&(this.attrs=$r({class:n},this.attrs||{}))}domAtPos(e){return Vr(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(hr(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(zr(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&vr.get(r)instanceof Nr;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=vr.get(r))||void 0===n?void 0:n.isEditable)||Mr.ios&&this.children.some((e=>e instanceof jr))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof jr)||/[^ -~]/.test(n.text))return null;let r=Jn(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=Wr(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(i instanceof Gr)return i;if(s>t)break}r=s+i.breakAfter}return null}}class Zr extends vr{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,s){return!(n&&(!(n instanceof Zr&&this.widget.compare(n.widget))||e>0&&i<=0||t0)}}class Hr{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Yr=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Yr||(Yr={}));class Jr extends vn{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new ei(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new ni(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:s}=ri(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(s?r?2e8:1:-6e8)}return new ni(e,t,n,r,e.widget||null,!0)}static line(e){return new ti(e)}static set(e,t=!1){return On.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Jr.none=On.empty;class ei extends Jr{constructor(e){let{start:t,end:n}=ri(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof ei&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&Qr(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}ei.prototype.point=!1;class ti extends Jr{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ti&&this.spec.class==e.spec.class&&Qr(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ti.prototype.mapMode=gt.TrackBefore,ti.prototype.point=!0;class ni extends Jr{constructor(e,t,n,r,i,s){super(t,n,i,e),this.block=r,this.isReplace=s,this.mapMode=r?t<=0?gt.TrackBefore:gt.TrackAfter:gt.TrackDel}get type(){return this.startSide!=this.endSide?Yr.WidgetRange:this.startSide<=0?Yr.WidgetBefore:Yr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ni&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function ri(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function ii(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}ni.prototype.point=!0;class si{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Zr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Gr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(oi(new Ur(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Zr||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(oi(new jr(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,s){if(this.disallowBlockEffectsFor[s]&&n instanceof ni){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=t-e;if(n instanceof ni)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Zr(n.widget||ai.block,o,n));else{let s=Fr.create(n.widget||ai.inline,o,o?0:n.startSide),a=this.atCursorPos&&!s.isEditable&&i<=r.length&&(e0),l=!s.isEditable&&(er.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||s.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(oi(new Ur(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(oi(s,r),i),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let s=new si(e,t,n,i);return s.openEnd=On.spans(r,t,n,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function oi(e,t){for(let n of t)e=new Nr(n,[e],e.length);return e}class ai extends Hr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ai.inline=new ai("span"),ai.block=new ai("div");var li=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(li||(li={}));const ci=li.LTR,ui=li.RTL;function pi(e){let t=[];for(let n=0;n=t){if(o.level==n)return s;(i<0||(0!=r?r<0?o.fromt:e[i].level>o.level))&&(i=s)}}if(i<0)throw new RangeError("Index out of range");return i}}function bi(e,t){if(e.length!=t.length)return!1;for(let n=0;nl&&o.push(new _i(l,h.from,d)),xi(e,h.direction==ci!=!(d%2)?r+1:r,i,h.inner,h.from,h.to,o),l=h.to}f=h.to}else{if(f==n||(t?vi[f]!=a:vi[f]==a))break;f++}p?Ei(e,l,f,r+1,i,p,o):lt;){let n=!0,u=!1;if(!c||l>s[c-1].to){let e=vi[l-1];e!=a&&(n=!1,u=16==e)}let p=n||1!=a?null:[],d=n?r:r+1,f=l;e:for(;;)if(c&&f==s[c-1].to){if(u)break e;let h=s[--c];if(!n)for(let e=h.from,n=c;;){if(e==t)break e;if(!n||s[n-1].to!=e){if(vi[e-1]==a)break e;break}e=s[--n].from}if(p)p.push(h);else{h.to=0;e-=3)if(mi[e+1]==-n){let t=mi[e+2],n=2&t?i:4&t?1&t?s:i:0;n&&(vi[o]=vi[mi[e]]=n),a=e;break}}else{if(189==mi.length)break;mi[a++]=o,mi[a++]=t,mi[a++]=l}else if(2==(r=vi[o])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=mi[t+2];if(2&n)break;if(e)mi[t+2]|=2;else{if(4&n)break;mi[t+2]|=4}}}}}(e,i,s,r,a),function(e,t,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:e,a=il;)t==s&&(t=n[--r].from,s=r?n[r-1].to:e),vi[--t]=u;l=o}else s=o,l++}}}(i,s,r,a),Ei(e,i,s,t,n,r,o)}function Si(e,t,n){if(!e)return[new _i(0,0,t==ui?1:0)];if(t==ci&&!n.length&&!yi.test(e))return Oi(e.length);if(n.length)for(;e.length>vi.length;)vi[vi.length]=256;let r=[],i=t==ci?0:1;return xi(e,i,i,n,0,e.length,r),r}function Oi(e){return[new _i(0,e,0)]}let Ti="";function wi(e,t,n,r,i){var s;let o=r.head-e.from,a=_i.find(t,o,null!==(s=r.bidiLevel)&&void 0!==s?s:-1,r.assoc),l=t[a],c=l.side(i,n);if(o==c){let e=a+=i?1:-1;if(e<0||e>=t.length)return null;l=t[a=e],o=l.side(!i,n),c=l.side(i,n)}let u=at(e.text,o,l.forward(i,n));(ul.to)&&(u=c),Ti=e.text.slice(Math.min(o,u),Math.max(o,u));let p=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return p&&u==c&&p.level+(i?0:1)e.some((e=>e))}),Mi=Pt.define({combine:e=>e.some((e=>e))}),ji=Pt.define();class Ni{constructor(e,t="nearest",n="nearest",r=5,i=5,s=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=s}map(e){return e.empty?this:new Ni(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ni(wt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Fi=on.define({map:(e,t)=>e.map(t)});function Ui(e,t,n){let r=e.facet(Di);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Vi=Pt.define({combine:e=>!e.length||e[0]});let Ki=0;const Wi=Pt.define();class $i{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:s}=t||{};return new $i(Ki++,e,n,r,(e=>{let t=[Wi.of(e)];return s&&t.push(Xi.of((t=>{let n=t.plugin(e);return n?s(n):Jr.none}))),i&&t.push(i(e)),t}))}static fromClass(e,t){return $i.define((t=>new e(t)),t)}}class qi{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Ui(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ui(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Ui(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Qi=Pt.define(),zi=Pt.define(),Xi=Pt.define(),Gi=Pt.define(),Zi=Pt.define(),Hi=Pt.define();function Yi(e,t){let n=e.state.facet(Hi);if(!n.length)return n;let r=n.map((t=>t instanceof Function?t(e):t)),i=[];return On.spans(r,t.from,t.to,{point(){},span(e,n,r,s){let o=e-t.from,a=n-t.from,l=i;for(let e=r.length-1;e>=0;e--,s--){let n,i=r[e].spec.bidiIsolate;if(null==i&&(i=Ci(t.text,o,a)),s>0&&l.length&&(n=l[l.length-1]).to==o&&n.direction==i)n.to=a,l=n.inner;else{let e={from:o,to:a,direction:i,inner:[]};l.push(e),l=e.inner}}}}),i}const Ji=Pt.define();function es(e){let t=0,n=0,r=0,i=0;for(let s of e.state.facet(Ji)){let o=s(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(n=Math.max(n,o.right)),null!=o.top&&(r=Math.max(r,o.top)),null!=o.bottom&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}const ts=Pt.define();class ns{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new ns(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAc)break;i+=2}if(!a)return n;new ns(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),s=a.toA,o=a.toB}}}class rs{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=_t.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges(((e,t,n,i)=>r.push(new ns(e,t,n,i)))),this.changedRanges=r}static create(e,t,n){return new rs(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class is extends vr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.compositionBarrier=Jr.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Gr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ns(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:e,toA:t})=>tthis.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,r)=>{et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=as(e,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc,c=new ns(l.mapPos(s),l.mapPos(o),s,o),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=vr.get(t);if(n instanceof Nr)u.push({node:t,deco:n.mark});else{if(n instanceof Gr||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:i,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new ei({inclusive:!0,attributes:Xr(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new ns(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(Mr.ie||Mr.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=function(e,t,n){let r=new class{constructor(){this.changes=[]}compareRange(e,t){ii(e,t,this.changes)}comparePoint(e,t){ii(e,t,this.changes)}};return On.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=ns.extendWithRanges(n,s),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=Mr.chrome||Mr.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let i=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let s,o,a,l,{fromA:c,toA:u,fromB:p,toB:d}=t;if(n&&n.range.fromBp){let e=si.build(this.view.state.doc,p,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=si.build(this.view.state.doc,n.range.toB,d,this.decorations,this.dynamicDecorationMap);o=e.breakAtStart,a=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),s=e.content.concat(r).concat(t.content)}else({content:s,breakAtStart:o,openStart:a,openEnd:l}=si.build(this.view.state.doc,p,d,this.decorations,this.dynamicDecorationMap));let{i:f,off:h}=i.findPos(u,1),{i:m,off:g}=i.findPos(c,-1);Sr(this,m,g,f,h,s,o,a,l)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new jr(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new Nr(n,[t],t.length);let n=new Gr;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=vr.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&Yn(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let s=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(o.anchor)),l=o.empty?a:this.moveToLine(this.domAtPos(o.head));if(Mr.gecko&&o.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=l=new _r(e,0),s=!0}var c;let u=this.view.observer.selectionRange;!s&&u.focusNode&&(er(a.node,a.offset,u.anchorNode,u.anchorOffset)&&er(l.node,l.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,o))||(this.view.observer.ignore((()=>{Mr.android&&Mr.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Zn(this.view.root);if(e)if(o.empty){if(Mr.gecko){let e=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(to.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new _r(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new _r(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&!this.compositionBarrier.size&&er(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Zn(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let s=Gr.find(this,t.head);if(!s)return;let o=s.posAtStart;if(t.head==o||t.head==o+s.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=vr.get(n.childNodes[r]);e instanceof Gr&&(t=e.domAtPos(e.length))}return t?new _r(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=vr.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;s--){let o=this.children[s],a=i-o.breakAfter,l=a-o.length;if(ae||o.covers(1))&&(!n||o instanceof Gr&&!(n instanceof Gr&&t>=0))&&(n=o,r=l),i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Gr))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof jr))return null;let i=at(r.text,n);if(i==n)return null;let s=dr(r.dom,n,i).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==li.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),s){let t=c.dom.lastChild,r=t?Jn(t):[];if(r.length){let t=r[r.length-1],s=a?t.right-n.left:n.right-t.left;s>o&&(o=s,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?li.RTL:li.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Gr){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let i=Jn(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new xr(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],s=i?i.from-1:this.length;if(s>n){let r=(t.lineBlockAt(s).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Jr.replace({widget:new os(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,s))}if(!i)break;n=i.to+1}return Jr.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Xi).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,r=this.view.state.facet(Gi).map(((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e}));for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(On.join(r))),this.decorations=[this.compositionBarrier,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e{i.point?n=!1:i.endSide<0&&tn.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=es(this.view),s={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,r,i,s,o,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,p=!1;u&&!p;)if(1==u.nodeType){let e,d=u==l.body,f=1,h=1;if(d)e=or(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(p=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:f,scaleY:h}=ar(u,t)),e={left:t.left,right:t.left+u.clientWidth*f,top:t.top,bottom:t.top+u.clientHeight*h}}let m=0,g=0;if("nearest"==i)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+m+s)):t.right>e.right&&(m=t.right-e.right+s,n<0&&t.lefte?t.left-e:Math.max(0,e-t.right)}function cs(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function us(e,t){return e.topt.top+1}function ps(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function fs(e,t,n){let r,i,s,o,a,l,c,u,p=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=Jn(d);for(let f=0;fg||o==g&&s>m){r=d,i=h,s=m,o=g;let a=g?n0?f0)}0==m?n>h.bottom&&(!c||c.bottomh.top)&&(l=d,u=h):c&&us(c,h)?c=ds(c,h.bottom):u&&us(u,h)&&(u=ps(u,h.top))}}if(c&&c.bottom>=n?(r=a,i=c):u&&u.top<=n&&(r=l,i=u),!r)return{node:e,offset:0};let d=Math.max(i.left,Math.min(i.right,t));return 3==r.nodeType?hs(r,d,n):p&&"false"!=r.contentEditable?fs(r,d,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}}function hs(e,t,n){let r=e.nodeValue.length,i=-1,s=1e9,o=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u=(c.left+c.right)/2,r=n;if(Mr.chrome||Mr.gecko){dr(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),s=u}}}return{node:e,offset:i>-1?i:o>0?e.nodeValue.length:0}}function ms(e,t,n,r=-1){var i,s;let o,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:p}=t,d=p-l;if(d<0)return 0;if(d>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;o=e.elementAtHeight(d),o.type!=Yr.Text;)for(;d=r>0?o.bottom+t:o.top-t,!(d>=0&&d<=c);){if(i)return n?null:0;i=!0,r=-r}p=l+d;let f=o.from;if(fe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:gs(e,a,o,u,p);let h=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:h,g=m.elementFromPoint(u,p);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,p),g&&!e.contentDOM.contains(g)&&(g=null));let y,_=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(h.caretPositionFromPoint){let e=h.caretPositionFromPoint(u,p);e&&({offsetNode:y,offset:_}=e)}else if(h.caretRangeFromPoint){let t=h.caretRangeFromPoint(u,p);t&&(({startContainer:y,startOffset:_}=t),(!e.contentDOM.contains(y)||Mr.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return dr(e,r-1,r).getBoundingClientRect().left>n}(y,_,u)||Mr.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():dr(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(y,_,u))&&(y=void 0))}if(!y||!e.docView.dom.contains(y)){let t=Gr.find(e.docView,f);if(!t)return d>o.top+o.height/2?o.to:o.from;({node:y,offset:_}=fs(t.dom,u,p))}let b=e.docView.nearest(y);if(!b)return null;if(b.isWidget&&1==(null===(s=b.dom)||void 0===s?void 0:s.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;s+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+jn(o,s,e.state.tabSize)}function ys(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==Yr.Text))return e;return n}function _s(e,t,n,r){let i=e.state.doc.lineAt(t.head),s=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=wi(i,s,o,a,n),c=Ti;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),s=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function bs(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,((e,i,s)=>{if(t>e&&tt(e))),n.from,t.head>n.from?-1:1);return r==n.from?n:wt.cursor(r,rnull)),Mr.gecko&&function(e){Xs.has(e)||(Xs.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=vr.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Ss(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,s=n[e];s&&i!=!s.handlers.length&&(r.removeEventListener(e,this.handleEvent),s=null),s||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode)))&&!e.ctrlKey||Ts.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from0||!!(Mr.safari&&!Mr.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function xs(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Ui(n.state,e)}}}function Ss(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(xs(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(xs(t.value,i))}}for(let e in Ps)n(e).handlers.push(Ps[e]);for(let e in ks)n(e).observers.push(ks[e]);return t}const Os=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Ts="dthko",ws=[16,17,18,20,91,92,224,225];function Cs(e){return.7*Math.max(0,e)+8}class As{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM),this.atoms=e.state.facet(Zi).map((t=>t(e)));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(_n.allowMultipleSelections)&&function(e,t){let n=e.state.facet(Ai);return n.length?n[0](t):Mr.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Zn(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=Ks(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=es(this.view);e.clientX-s.left<=i.left+6?n=-Cs(i.left-e.clientX):e.clientX+s.right>=i.right-6&&(n=Cs(e.clientX-i.right)),e.clientY-s.top<=i.top+6?r=-Cs(i.top-e.clientY):e.clientY+s.bottom>=i.bottom-6&&(r=Cs(e.clientY-i.bottom)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;nthis.select(this.lastEvent)),20)}}const Ps=Object.create(null),ks=Object.create(null),Ds=Mr.ie&&Mr.ie_version<15||Mr.ios&&Mr.webkit_version<604;function Rs(e,t){let n,{state:r}=e,i=1,s=r.toText(t),o=s.lines==r.selection.ranges.length,a=null!=$s&&r.selection.ranges.every((e=>e.empty))&&$s==s.toString();if(a){let e=-1;n=r.changeByRange((n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((o?s.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:wt.cursor(n.from+l.length)}}))}else n=o?r.changeByRange((e=>{let t=s.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:wt.cursor(e.from+t.length)}})):r.replaceSelection(s);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function Is(e,t,n,r){if(1==r)return wt.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),s=t-i.from;if(0==i.length)return wt.cursor(t);0==s?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=at(i.text,s,!1):a=at(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let e=at(i.text,o,!1);if(r(i.text.slice(e,o))!=l)break;o=e}for(;a{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Ps.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),ks.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},ks.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},Ps.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(ki))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=js(e,t),r=Ks(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,s,o){let a,l=js(e,t),c=Is(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let t=Is(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),s=Math.max(t.to,c.to);c=i1&&(a=function(e,t){for(let n=0;n=t)return wt.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:o?i.addRange(c):wt.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new As(e,t,n,r)),r&&e.observer.ignore((()=>pr(e.contentDOM)));let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let Ls=(e,t)=>e>=t.top&&e<=t.bottom,Bs=(e,t,n)=>Ls(t,n)&&e>=n.left&&e<=n.right;function Ms(e,t,n,r){let i=Gr.find(e.docView,t);if(!i)return 1;let s=t-i.posAtStart;if(0==s)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&Bs(n,r,o))return-1;let a=i.coordsAt(s,1);return a&&Bs(n,r,a)?1:o&&Ls(r,o)?-1:1}function js(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:Ms(e,n,t.clientX,t.clientY)}}const Ns=Mr.ie&&Mr.ie_version<=11;let Fs=null,Us=0,Vs=0;function Ks(e){if(!Ns)return e.detail;let t=Fs,n=Vs;return Fs=e,Vs=Date.now(),Us=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Us+1)%3:1}function Ws(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:s}=e.inputState,o=r&&s&&function(e,t){let n=e.state.facet(Pi);return n.length?n[0](t):Mr.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=e.state.changes(o?[o,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Ps.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=wt.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},Ps.dragend=e=>(e.inputState.draggedContent=null,!1),Ps.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&Ws(e,t,r.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),s()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return Ws(e,t,n,!0),!0}return!1},Ps.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Ds?null:t.clipboardData;return n?(Rs(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),Rs(e,n.value)}),50)}(e),!1)};let $s=null;Ps.copy=Ps.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let s=e.doc.lineAt(r);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;$s=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Ds?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((()=>{r.remove(),e.focus()}),50)}(e,n),!1)};const qs=nn.define();function Qs(e,t){let n=[];for(let r of e.facet(Li)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:qs.of(!0)}):null}function zs(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Qs(e.state,t);n?e.dispatch(n):e.update([])}}),10)}ks.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),zs(e)},ks.blur=e=>{e.observer.clearSelectionRange(),zs(e)},ks.compositionstart=ks.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0,e.docView.maybeCreateCompositionBarrier()&&(e.update([]),e.docView.clearCompositionBarrier()))},ks.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Mr.chrome&&Mr.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},ks.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Ps.beforeinput=(e,t)=>{var n;let r;if(Mr.chrome&&Mr.android&&(r=Os.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return Mr.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),Mr.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>ks.compositionend(e,t)),20),!1};const Xs=new Set;const Gs=["pre-wrap","normal","pre-line","break-spaces"];class Zs{constructor(e){this.lineWrapping=e,this.doc=Xe.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Gs.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>eo&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return to.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,s=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:c,toB:u}=r[o],p=i.lineAt(a,Js.ByPosNoHeight,n.setDoc(t),0,0),d=p.to>=l?p:i.lineAt(l,Js.ByPosNoHeight,n,0,0);for(u+=d.to-l,l=d.to;o>0&&p.from<=r[o-1].toA;)a=r[o-1].fromA,c=r[o-1].fromB,o--,a2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r=i&&s(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ro extends no{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new Ys(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof ro||r instanceof io&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof io?r=new ro(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):to.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class io extends to{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*s);n=t/s,this.length>s+1&&(o=(this.height-t)/(this.length-s-1))}else n=this.height/s;return{firstLine:r,lastLine:i,perLine:n,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:s,perLine:o,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e0){let e=n[n.length-1];e instanceof io?n[n.length-1]=new io(e.length+r):n.push(null,new io(r-1))}if(e>0){let t=n[0];t instanceof io?n[0]=new io(e+t.length):n.unshift(new io(e-1),null)}return to.of(n)}decomposeLeft(e,t){t.push(new io(e-1),null)}decomposeRight(e,t){t.push(null,new io(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],s=Math.max(t,r.from),o=-1;for(r.from>t&&n.push(new io(r.from-t-1).updateHeight(e,t));s<=i&&r.more;){let t=e.doc.lineAt(s).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==o?o=i:Math.abs(i-o)>=eo&&(o=-2);let a=new ro(t,i);a.outdated=!1,n.push(a),s+=t+1}s<=i&&n.push(null,new io(i-s).updateHeight(e,s));let a=to.of(n);return(o<0||Math.abs(a.height-this.height)>=eo||Math.abs(o-this.heightMetrics(e,t).perLine)>=eo)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class so extends to{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return eo))return l;let c=t==Js.ByPosNoHeight?Js.ByPosNoHeight:Js.ByPos;return a?l.join(this.right.lineAt(o,c,n,s,o)):this.left.lineAt(o,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,s){let o=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,o,a,s);else{let l=this.lineAt(a,Js.ByPos,n,r,i);e=e&&l.from<=t&&s(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,o,a,s)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let s=i.length;for(let e of n)i.push(e);if(e>0&&oo(i,s-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?to.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:s}=this,o=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+s.length&&r.more?a=s=s.updateHeight(e,o,n,r):s.updateHeight(e,o,n),a?this.balanced(i,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function oo(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof io&&(r=e[t+1])instanceof io&&e.splice(t-1,3,new io(n.length+1+r.length))}class ao{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof ro?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new ro(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,i,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new ro(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new io(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ro)return e;let t=new ro(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof ro||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();s=Math.max(s,r.left),o=Math.min(o,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function uo(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class po{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new Zs(t),this.stateDeco=e.facet(Xi).filter((e=>"function"!=typeof e)),this.heightMap=to.empty().applyChanges(this.stateDeco,Xe.empty,this.heightOracle.setDoc(e.doc),[new ns(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Jr.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some((({from:e,to:t})=>r>=e&&r<=t))){let{from:t,to:n}=this.lineBlockAt(r);e.push(new mo(t,n))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?bo:new vo(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:Eo(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Xi).filter((e=>"function"!=typeof e));let r=e.changedRanges,i=ns.extendWithRanges(r,function(e,t,n){let r=new lo;return On.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:_t.empty(this.state.doc.length))),s=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=s&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Mi)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?li.RTL:li.LTR;let s=this.heightOracle.mustRefreshForWrapping(i),o=t.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let l=0,c=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=ar(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=8,s=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,p=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==p||(this.paddingTop=u,this.paddingBottom=p,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=mr(e.scrollDOM);let f=(this.printing?uo:co)(t,this.paddingTop),h=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let y=o.width;if(this.contentDOMWidth==y&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(s=!0),s||r.lineWrapping&&Math.abs(y-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:a}=e.docView.measureTextSize();s=n>0&&r.refresh(i,n,o,a,y/o,t),s&&(e.docView.minWidth=0,l|=8)}h>0&&m>0?c=Math.max(h,m):h<0&&m<0&&(c=Math.min(h,m)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(s?to.empty().applyChanges(this.stateDeco,Xe.empty,this.heightOracle,[new ns(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new Hs(n.from,i))}r.heightChanged&&(l|=2)}let _=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return _&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:s,visibleBottom:o}=this,a=new mo(r.lineAt(s-1e3*n,Js.ByHeight,i,0,0).from,r.lineAt(o+1e3*(1-n),Js.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let n,s=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=r.lineAt(e,Js.ByPos,i,0,0);n="center"==t.y?(o.top+o.bottom)/2-s/2:"start"==t.y||"nearest"==t.y&&e=o+Math.max(10,Math.min(n,250)))&&r>s-2e3&&i>1,s=r<<1;if(this.defaultTextDirection!=li.LTR&&!n)return[];let o=[],a=(r,s,l,c)=>{if(s-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt))));if(!d){if(se.from<=s&&e.to>=s))){let e=t.moveToLineBoundary(wt.cursor(s),!1,!0).head;e>r&&(s=e)}d=new po(r,s,this.gapSize(l,r,s,c))}o.push(d)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,i,e,t),oe.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];On.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,n)=>e.from!=t[n].from||e.to!=t[n].to));return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||Eo(this.heightMap.lineAt(e,Js.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Eo(this.heightMap.lineAt(this.scaler.fromDOM(e),Js.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Eo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class mo{constructor(e,t){this.from=e,this.to=t}}function go(e,t,n){let r=[],i=e,s=0;return On.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),s+=e-i),i=t}},20),i=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],s=i-n;if(r<=s)return n+r;r-=s}}function _o(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const bo={toDOM(e){return e},fromDOM(e){return e},scale:1};class vo{constructor(e,t,n){let r=0,i=0,s=0;this.viewports=n.map((({from:n,to:i})=>{let s=t.lineAt(n,Js.ByPos,e,0,0).top,o=t.lineAt(i,Js.ByPos,e,0,0).bottom;return r+=o-s,{from:n,to:i,top:s,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=s+(e.top-i)*this.scale,s=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=tEo(e,t))):e._content)}const xo=Pt.define({combine:e=>e.join(" ")}),So=Pt.define({combine:e=>e.indexOf(!0)>-1}),Oo=Vn.newName(),To=Vn.newName(),wo=Vn.newName(),Co={"&light":"."+To,"&dark":"."+wo};function Ao(e,t,n){return new Vn(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t}})}const Po=Ao("."+Oo,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Co),ko="￿";class Do{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(_n.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ko}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let s=vr.get(r),o=vr.get(i);(s&&o?s.breakAfter:(s?s.breakAfter:nr(r))||nr(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,s=-1,o=1;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(i=r.exec(t))&&(s=i.index,o=i[0].length),this.append(t.slice(n,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);n=s+o}}readNode(e){if(e.cmIgnore)return;let t=vr.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Ro(e,n.node,n.offset)?t:0))}}function Ro(e,t,n){for(;;){if(!t||n-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=e.observer.selectionRange;n&&(t.push(new Io(n,r)),i==n&&s==r||t.push(new Io(i,s)));return t}(e),n=new Do(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?wt.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!Hn(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=s&&s.node==t.anchorNode&&s.offset==t.anchorOffset||!Hn(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),o=e.viewport;if((Mr.ios||Mr.chrome)&&e.state.selection.main.empty&&n!=r&&(o.from>0||o.toDate.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:o}=t.bounds,a=i.from,l=null;(8===s||Mr.android&&t.text.length0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;if("end"==r){n-=o+Math.max(0,s-Math.min(o,a))-s}if(o=o?s-n:0,a=s+(a-o),o=s}else if(a=a?s-n:0,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}(e.state.doc.sliceString(r,o,ko),t.text,a-r,l);c&&(Mr.chrome&&13==s&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==ko+ko&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:Xe.of(t.text.slice(c.from,c.toB).split(ko))})}else r&&(!e.hasFocus&&e.state.facet(Vi)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(Mr.mac||Mr.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=wt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Xe.of([" "])}):Mr.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=wt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Xe.of([" "])}),n){if(Mr.ios&&e.inputState.flushIOSKey(n))return!0;if(Mr.android&&(n.to==i.to&&(n.from==i.from||n.from==i.from-1&&" "==e.state.sliceDoc(n.from,i.from))&&1==n.insert.length&&2==n.insert.lines&&fr(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==s&&n.insert.lengthi.head)&&fr(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&fr(e.contentDOM,"Delete",46)))return!0;let t,o=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>t||(t=function(e,t,n){let r,i=e.state,s=i.selection.main;if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=s.fromt.to?i.sliceDoc(t.to,s.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),a=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=s.to&&t.to>=s.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&as(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(s.head);let p=s.to-t.to,d=s.to-s.from;r=i.changeByRange((n=>{if(n.from==s.from&&n.to==s.to)return{changes:o,range:a||n.map(o)};let r=n.to-p,u=r-c.length;if(n.to-n.from!=d||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),h=n.to-s.to;return{changes:f,range:a?wt.range(Math.max(0,a.anchor+h),Math.max(0,a.head+h)):n.map(f)}}))}else r={changes:o,selection:a&&i.selection.replaceRange(a)}}let o="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,o+=".compose",e.inputState.compositionFirstChange&&(o+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:o,scrollIntoView:!0})}(e,n,r));return e.state.facet(Ii).some((t=>t(e,n.from,n.to,o,a)))||e.dispatch(a()),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const Mo={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},jo=Mr.ie&&Mr.ie_version<=11;class No{constructor(e){this.view=e,this.active=!1,this.selectionRange=new lr,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(Mr.ie&&Mr.ie_version<=11||Mr.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),jo&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(e){("change"!=e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Vi)?n.root.activeElement!=this.dom:!Yn(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(Mr.ie&&Mr.ie_version<=11||Mr.android&&Mr.chrome)&&!n.state.selection.main.empty&&r.focusNode&&er(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Mr.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,s=t.endContainer,o=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);er(a.node,a.offset,s,o)&&([r,i,s,o]=[s,o,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}}(this.view)||Zn(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=Yn(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&fr(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&Yn(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Lo(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=Bo(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=Fo(t,e.previousSibling||e.target.previousSibling,-1),r=Fo(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Fo(e,t,n){for(;t;){let r=vr.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class Uo{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach((e=>t(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new ho(e.state||_n.create(e)),e.scrollTo&&e.scrollTo.is(Fi)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Wi).map((e=>new qi(e)));for(let e of this.plugins)e.update(this);this.observer=new No(this),this.inputState=new Es(this),this.inputState.ensureHandlers(this.plugins),this.docView=new is(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=1==e.length&&e[0]instanceof an?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let s=this.hasFocus,o=0,a=null;e.some((e=>e.annotation(qs)))?(this.inputState.notifiedFocused=s,o=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=Qs(i,s),a||(o=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(_n.phrases)!=this.state.facet(_n.phrases))return this.setState(i);t=rs.create(this,i,e),t.flags|=o;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new Ni(e.empty?e:wt.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Fi)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=Wo.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(ts)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(xo)!=t.state.facet(xo)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(Ri))try{e(t)}catch(e){Ui(this.state,e,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Bo(this,c)&&l.force&&fr(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new ho(e),this.plugins=e.facet(Wi).map((e=>new qi(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new is(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Wi),n=e.state.facet(Wi);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new qi(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(s<0)if(mr(n))i=-1,s=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,s=e.top}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&o||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((e=>{try{return e.read(this)}catch(e){return Ui(this.state,e),Ko}})),c=rs.create(this,this.state,[]),u=!1;c.flags|=o,t?t.flags|=o:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c),u&&this.docViewUpdate());for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,s=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Ri))e(t)}get themeClasses(){return Oo+" "+(this.state.facet(So)?wo:To)+" "+this.state.facet(xo)}updateAttrs(){let e=$o(this,Qi,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Vi)?"true":"false",class:"cm-content",style:`${Mr.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),$o(this,zi,t);let n=this.observer.ignore((()=>{let n=zr(this.contentDOM,this.contentAttrs,t),r=zr(this.dom,this.editorAttrs,e);return n||r}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(Uo.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(ts);let e=this.state.facet(Uo.cspNonce);Vn.mount(this.root,this.styleModules.concat(Po).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return vs(this,e,_s(this,e,t,n))}moveByGroup(e,t){return vs(this,e,_s(this,e,t,(t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==hn.Space&&(i=t),i==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return wt.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=ys(e,t.head),s=r&&i.type==Yr.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==li.LTR)?t.right-1:t.left+1,y:(s.top+s.bottom)/2});if(null!=o)return wt.cursor(o,n?-1:1)}return wt.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return vs(this,e,function(e,t,n,r){let i=t.head,s=n?1:-1;if(i==(n?e.state.doc.length:0))return wt.cursor(i,t.assoc);let o,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),o=s<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),o=(s<0?t.top:t.bottom)+u}let p=l.left+a,d=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=o+(d+t)*s,r=ms(e,{x:p,y:n},!1,s);if(nl.bottom||(s<0?ri)){let t=e.docView.coordsForChar(r),i=!t||n0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Bi)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Vo)return Oi(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||bi(r.isolates,t=Yi(this,e))))return r.order;t||(t=Yi(this,e));let r=Si(e.text,n,t);return this.bidiCache.push(new Wo(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Mr.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{pr(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Fi.of(new Ni("number"==typeof e?wt.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Fi.of(new Ni(wt.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return $i.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return $i.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=Vn.newName(),r=[xo.of(n),ts.of(Ao(`.${n}`,e))];return t&&t.dark&&r.push(So.of(!0)),r}static baseTheme(e){return Kt.lowest(ts.of(Ao("."+Oo,e,Co)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&vr.get(n)||vr.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}Uo.styleModule=ts,Uo.inputHandler=Ii,Uo.scrollHandler=ji,Uo.focusChangeEffect=Li,Uo.perLineTextDirection=Bi,Uo.exceptionSink=Di,Uo.updateListener=Ri,Uo.editable=Vi,Uo.mouseSelectionStyle=ki,Uo.dragMovesSelection=Pi,Uo.clickAddsSelectionRange=Ai,Uo.decorations=Xi,Uo.outerDecorations=Gi,Uo.atomicRanges=Zi,Uo.bidiIsolatedRanges=Hi,Uo.scrollMargins=Ji,Uo.darkTheme=So,Uo.cspNonce=Pt.define({combine:e=>e.length?e[0]:""}),Uo.contentAttributes=zi,Uo.editorAttributes=Qi,Uo.lineWrapping=Uo.contentAttributes.of({class:"cm-lineWrapping"}),Uo.announce=on.define();const Vo=4096,Ko={};class Wo{constructor(e,t,n,r,i,s){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=s}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],r=e.length?e[e.length-1].dir:li.LTR;for(let i=Math.max(0,e.length-10);i=0;i--){let t=r[i],s="function"==typeof t?t(e):t;s&&$r(s,n)}return n}const qo=Mr.mac?"mac":Mr.windows?"win":Mr.linux?"linux":"key";function Qo(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const zo=Kt.default(Uo.domEventHandlers({keydown(e,t){return Yo(Zo(t.state),e,t,"editor")}})),Xo=Pt.define({enables:zo}),Go=new WeakMap;function Zo(e){let t=e.facet(Xo),n=Go.get(t);return n||Go.set(t,n=function(e,t=qo){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},s=(e,r,s,o,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),p=r.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,s,o,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e{let r=Ho={view:t,prefix:n,scope:e};return setTimeout((()=>{Ho==r&&(Ho=null)}),4e3),!0}]})}let d=p.join(" ");i(d,!1);let f=u[d]||(u[d]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});s&&f.run.push(s),o&&(f.preventDefault=!0),a&&(f.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)s(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&s(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}let Ho=null;function Yo(e,t,n,r){let i=function(e){var t=!(Qn&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||zn&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?qn:$n)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),s=ht(dt(i,0))==i.length&&" "!=i,o="",a=!1,l=!1,c=!1;Ho&&Ho.view==n&&Ho.scope==r&&(o=Ho.prefix+" ",ws.indexOf(t.keyCode)<0&&(l=!0,Ho=null));let u,p,d=new Set,f=e=>{if(e){for(let r of e.run)if(!d.has(r)&&(d.add(r),r(n,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},h=e[r];return h&&(f(h[o+Qo(i,t,!s)])?a=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Mr.windows&&t.ctrlKey&&t.altKey)&&(u=$n[t.keyCode])&&u!=i?(f(h[o+Qo(u,t,!0)])||t.shiftKey&&(p=qn[t.keyCode])!=i&&p!=u&&f(h[o+Qo(p,t,!1)]))&&(a=!0):s&&t.shiftKey&&f(h[o+Qo(i,t,!0)])&&(a=!0),!a&&f(h._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),a}class Jo{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=ea(e);return[new Jo(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),s=e.textDirection==li.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),l=ea(e),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),p=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),f=ys(e,r),h=ys(e,i),m=f.type==Yr.Text?f:null,g=h.type==Yr.Text?h:null;m&&(e.lineWrapping||f.widgetLineBreaks)&&(m=ta(e,r,m));g&&(e.lineWrapping||h.widgetLineBreaks)&&(g=ta(e,i,g));if(m&&g&&m.from==g.from)return _(b(n.from,n.to,m));{let t=m?b(n.from,null,m):v(f,!1),r=g?b(null,n.to,g):v(h,!0),i=[];return(m||f).to<(g||h).from-(m&&g?1:0)||f.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2c&&r.from=s)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,s),null==n&&a>=u,o.dir)}if(i=r.to+1,i>=s)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:i,bottom:o,horizontal:a}}function v(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function ea(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==li.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function ta(e,t,n){let r=wt.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:Yr.Text}}class na{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ra)!=e.state.facet(ra)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(ra);for(;t!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ra=Pt.define();function ia(e){return[$i.define((t=>new na(t,e))),ra.of(e)]}const sa=!Mr.ios,oa=Pt.define({combine(e){return bn(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function aa(e){return e.startState.facet(oa)!=e.state.facet(oa)}const la=ia({above:!0,markers(e){let{state:t}=e,n=t.facet(oa),r=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||sa:n.drawRangeCursor){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:wt.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Jo.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=aa(e);return n&&ca(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){ca(t.state,e)},class:"cm-cursorLayer"});function ca(e,t){t.style.animationDuration=e.facet(oa).cursorBlinkRate+"ms"}const ua=ia({above:!1,markers(e){return e.state.selection.ranges.map((t=>t.empty?[]:Jo.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t)))},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||aa(e)},class:"cm-selectionLayer"}),pa={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};sa&&(pa[".cm-line"].caretColor="transparent !important",pa[".cm-content"]={caretColor:"transparent !important"});const da=Kt.highest(Uo.theme(pa)),fa=on.define({map(e,t){return null==e?null:t.mapPos(e)}}),ha=Mt.define({create(){return null},update(e,t){return null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(fa)?t.value:e),e)}}),ma=$i.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(ha);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(ha)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(ha),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(ha)!=e&&this.view.dispatch({effects:fa.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function ga(e,t,n,r,i){t.lastIndex=0;for(let s,o=e.iterRange(n,r),a=n;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=t.exec(o.value);)i(a+s.index,s)}class ya{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:s=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let s=n(e,t,r);s&&i(r,r+e[0].length,s)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n)}this.boundary=i,this.maxLength=s}createDeco(e){let t=new Tn,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),s=Math.min(e.state.doc.lineAt(s).to,s+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}(e,this.maxLength))ga(e.state.doc,this.regexp,t,r,((t,r)=>this.addMatch(r,e,t,n)));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges(((t,i,s,o)=>{o>e.view.viewport.from&&s1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let s=Math.max(i.from,n),o=Math.min(i.to,r);if(o>s){let n=e.state.doc.lineAt(s),r=n.ton.from;s--)if(this.boundary.test(n.text[s-1-n.from])){a=s;break}for(;ou.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.indexthis.addMatch(n,e,t,p)));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>el,add:u})}}return t}}const _a=null!=/x/.unicode?"gu":"g",ba=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",_a),va={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ea=null;const xa=Pt.define({combine(e){let t=bn(e,{render:null,specialChars:ba,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==Ea&&"undefined"!=typeof document&&document.body){let t=document.body.style;Ea=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return Ea||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,_a)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,_a)),t}});let Sa=null;class Oa extends Hr{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(va[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement("span");return i.textContent=t,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class Ta extends Hr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const wa=Jr.line({class:"cm-activeLine"}),Ca=$i.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(wa.range(i.from)),t=i.from)}return Jr.set(n)}},{decorations:e=>e.decorations});class Aa extends Hr{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Jn(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=sr(t[0],"rtl"!=n.direction),i=parseInt(n.lineHeight);return r.bottom-r.top>1.5*i?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}const Pa=2e3;function ka(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,s=i>Pa?-1:i==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Mn(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function Da(e,t){let n=ka(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,s){let o=ka(e,t);if(!o)return r;let a=function(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),s=[];if(t.off>Pa||n.off>Pa||t.col<0||n.col<0){let o=Math.min(t.off,n.off),a=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=a&&s.push(wt.range(n.from+o,n.to+a))}}else{let o=Math.min(t.col,n.col),a=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=jn(n.text,o,e.tabSize,!0);if(r<0)s.push(wt.cursor(n.to));else{let t=jn(n.text,a,e.tabSize);s.push(wt.range(n.from+r,n.from+t))}}}return s}(e.state,n,o);return a.length?s?wt.create(a.concat(r.ranges)):wt.create(a):r}}:null}const Ra={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},Ia={style:"cursor: crosshair"};const La="-10000px";class Ba{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e));let i=null;this.tooltipViews=this.tooltips.map((e=>i=n(e,i)))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter((e=>e));if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],o=t?[]:null;for(let n=0;nt[n]=e)),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=s,!0}}function Ma(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const ja=Pt.define({combine:e=>{var t,n,r;return{position:Mr.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((e=>e.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find((e=>e.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||Ma}}}),Na=new WeakMap,Fa=$i.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(ja);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Ba(e,Ka,((e,t)=>this.createTooltip(e,t)),(e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()})),this.above=this.manager.tooltips.map((e=>!!e.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(ja);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.insertBefore(e,r)}return n.dom.style.position=this.position,n.dom.style.top=La,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect(),t=1,n=1,r=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Mr.gecko)r=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==La&&"0px"==e.style.left){let t=e.getBoundingClientRect();r=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(r||"absolute"==this.position)if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,n=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:n}=this.view.viewState);return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(ja).tooltipSpace(this.view),scaleX:t,scaleY:n,makeAbsolute:r}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:n,space:r,scaleX:i,scaleY:s}=e,o=[];for(let a=0;a=Math.min(n.bottom,r.bottom)||p.rightMath.min(n.right,r.right)+.1){u.style.top=La;continue}let f=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,h=f?7:0,m=d.right-d.left,g=null!==(t=Na.get(c))&&void 0!==t?t:d.bottom-d.top,y=c.offset||Va,_=this.view.textDirection==li.LTR,b=d.width>r.right-r.left?_?r.left:r.right-d.width:_?Math.min(p.left-(f?14:0)+y.x,r.right-m):Math.max(r.left,p.left-m+(f?14:0)-y.x),v=this.above[a];!l.strictSide&&(v?p.top-(d.bottom-d.top)-y.yr.bottom)&&v==r.bottom-p.bottom>p.top-r.top&&(v=this.above[a]=!v);let E=(v?p.top-r.top:r.bottom-p.bottom)-h;if(Eb&&e.topx&&(x=v?e.top-g-2-h:e.bottom+h+2);if("absolute"==this.position?(u.style.top=(x-e.parent.top)/s+"px",u.style.left=(b-e.parent.left)/i+"px"):(u.style.top=x/s+"px",u.style.left=b/i+"px"),f){let e=p.left+(_?y.x:-y.x)-(b+14-7);f.style.left=e/i+"px"}!0!==c.overlap&&o.push({left:b,top:x,right:S,bottom:x+g}),u.classList.toggle("cm-tooltip-above",v),u.classList.toggle("cm-tooltip-below",!v),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=La}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Ua=Uo.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Va={x:0,y:0},Ka=Pt.define({enables:[Fa,Ua]}),Wa=Pt.define({combine:e=>e.reduce(((e,t)=>e.concat(t)),[])});class $a{static create(e){return new $a(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Ba(e,Wa,((e,t)=>this.createHostedView(e,t)),(e=>e.dom.remove()))}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r)if(void 0===t)t=r;else if(t!==r)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const qa=Ka.compute([Wa],(e=>{let t=e.facet(Wa);return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:$a.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class Qa{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let s=e.bidiSpans(e.state.doc.lineAt(r)).find((e=>e.from<=r&&e.to>=r)),o=s&&s.dir==li.RTL?-1:1;i=t.x{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(t=>Ui(e.state,t,"hover tooltip")))}else!s||Array.isArray(s)&&!s.length||e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(Fa),t=e?e.manager.tooltips.findIndex((e=>e.create==$a.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(e,t){let n=e.getBoundingClientRect();return t.clientX>=n.left-4&&t.clientX<=n.right+4&&t.clientY>=n.top-4&&t.clientY<=n.bottom+4}(i.dom,e)||this.pending){let{pos:i}=r[0]||this.pending,s=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:i;(i==s?this.view.posAtCoords(this.lastMove)==i:function(e,t,n,r,i,s){let o=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>r||o.righti||Math.min(o.bottom,a)=t&&l<=n}(this.view,i,s,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function za(e,t={}){let n=on.define(),r=Mt.define({create(){return[]},update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter((e=>!t.hideOn(r,e)))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,gt.TrackDel);if(null!=e){let i=Object.assign(Object.create(null),n);i.pos=e,null!=i.end&&(i.end=r.changes.mapPos(i.end)),t.push(i)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(Ga)&&(e=[]);return e},provide:e=>Wa.from(e)});return[r,$i.define((i=>new Qa(i,e,r,n,t.hoverTime||300))),qa]}function Xa(e,t){let n=e.plugin(Fa);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const Ga=on.define();const Za=Pt.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function Ha(e,t){let n=e.plugin(Ya),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const Ya=$i.fromClass(class{constructor(e){this.input=e.state.facet(tl),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(Za);this.top=new Ja(e,!0,t.topContainer),this.bottom=new Ja(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(Za);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Ja(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ja(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(tl);if(n!=this.input){let t=n.filter((e=>e)),r=[],i=[],s=[],o=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),o.push(t)):(t=this.panels[a],t.update&&t.update(e)),r.push(t),(t.top?i:s).push(t)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(s);for(let e of o)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Uo.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class Ja{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=el(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=el(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function el(e){let t=e.nextSibling;return e.remove(),t}const tl=Pt.define({enables:Ya});class nl extends vn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}nl.prototype.elementClass="",nl.prototype.toDOM=void 0,nl.prototype.mapMode=gt.TrackBefore,nl.prototype.startSide=nl.prototype.endSide=-1,nl.prototype.point=!0;const rl=Pt.define(),il={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>On.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},sl=Pt.define();function ol(e){return[ll(),sl.of(Object.assign(Object.assign({},il),e))]}const al=Pt.define({combine:e=>e.some((e=>e))});function ll(e){let t=[cl];return e&&!1===e.fixed&&t.push(al.of(!0)),t}const cl=$i.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(sl).map((t=>new fl(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(al),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(al)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=On.iter(this.view.state.facet(rl),this.view.viewport.from),r=[],i=this.gutters.map((e=>new dl(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let s of e.type)if(s.type==Yr.Text&&t){pl(n,r,s.from);for(let e of i)e.line(this.view,s,r);t=!1}else if(s.widget)for(let e of i)e.widget(this.view,s)}else if(e.type==Yr.Text){pl(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(sl),n=e.state.facet(sl),r=e.docChanged||e.heightChanged||e.viewportChanged||!On.eq(e.startState.facet(rl),e.state.facet(rl),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new fl(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>Uo.scrollMargins.of((t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==li.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null}))});function ul(e){return Array.isArray(e)?e:[e]}function pl(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class dl{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=On.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,s=t.height/e.scaleY;if(this.i==r.elements.length){let t=new hl(e,s,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,s,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];pl(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let s=this.gutter;(0!=r.length||s.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class fl{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(r=>{let i,s=r.target;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let e=s.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=r.clientY;let o=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()}));this.markers=ul(t.markers(e)),t.initialSpacer&&(this.spacer=new hl(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=ul(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!On.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class hl{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;nr(e,t,n)||i(e,t,n):i}return n}})}});class yl extends nl{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function _l(e,t){return e.state.facet(gl).formatNumber(t,e.state)}const bl=sl.compute([gl],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(ml)},lineMarker(e,t,n){return n.some((e=>e.toDOM))?null:new yl(_l(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(gl)!=e.state.facet(gl),initialSpacer(e){return new yl(_l(e,vl(e.state.doc.lines)))},updateSpacer(e,t){let n=_l(t.view,vl(t.view.state.doc.lines));return n==e.number?e:new yl(n)},domEventHandlers:e.facet(gl).domEventHandlers})));function vl(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(El.range(i)))}return On.of(t)}));const Sl=1024;let Ol=0;class Tl{constructor(e,t){this.from=e,this.to=t}}class wl{constructor(e={}){this.id=Ol++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Pl.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}wl.closedBy=new wl({deserialize:e=>e.split(" ")}),wl.openedBy=new wl({deserialize:e=>e.split(" ")}),wl.group=new wl({deserialize:e=>e.split(" ")}),wl.isolate=new wl({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),wl.contextHash=new wl({perNode:!0}),wl.lookAhead=new wl({perNode:!0}),wl.mounted=new wl({perNode:!0});class Cl{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[wl.mounted.id]}}const Al=Object.create(null);class Pl{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Al,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new Pl(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(wl.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(wl.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}Pl.none=new Pl("",Object.create(null),0,8);class kl{constructor(e){this.types=e;for(let t=0;t=t){let o=new Ul(s.tree,s.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(Nl(o,t,n,!1))}}return i?ql(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,s=e.mode||0,o=(s&Il.IncludeAnonymous)>0;for(let e=this.cursor(s|Il.IncludeAnonymous);;){let s=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;s=!0}for(;s&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;s=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Hl(Pl.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new Ll(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new Ll(Pl.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=Sl,reused:s=[],minRepeatType:o=r.types.length}=e,a=Array.isArray(n)?new Bl(n,n.length):n,l=r.types,c=0,u=0;function p(e,t,n,_,b,v){let{id:E,start:x,end:S,size:O}=a,T=u;for(;O<0;){if(a.next(),-1==O){let t=s[E];return n.push(t),void _.push(x-e)}if(-3==O)return void(c=E);if(-4==O)return void(u=E);throw new RangeError(`Unrecognized record size: ${O}`)}let w,C,A=l[E],P=x-e;if(S-x<=i&&(C=g(a.pos-t,b))){let t=new Uint16Array(C.size-C.skip),n=a.pos-C.size,i=t.length;for(;a.pos>n;)i=y(C.start,t,i);w=new Ml(t,S-C.start,r),P=C.start-e}else{let e=a.pos-O;a.next();let t=[],n=[],r=E>=o?E:-1,s=0,l=S;for(;a.pos>e;)r>=0&&a.id==r&&a.size>=0?(a.end<=l-i&&(h(t,n,x,s,a.end,l,r,T),s=t.length,l=a.end),a.next()):v>2500?d(x,e,t,n):p(x,e,t,n,r,v+1);if(r>=0&&s>0&&s-1&&s>0){let e=f(A);w=Hl(A,t,n,0,t.length,0,S-x,e,e)}else w=m(A,t,n,S-x,T-S)}n.push(w),_.push(P)}function d(e,t,n,s){let o=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:r}=a;if(r>4)a.next();else{if(c>-1&&t=0;e-=3)t[n++]=o[e],t[n++]=o[e+1]-i,t[n++]=o[e+2]-i,t[n++]=n;n.push(new Ml(t,o[2]-i,r)),s.push(i-e)}}function f(e){return(t,n,r)=>{let i,s,o=0,a=t.length-1;if(a>=0&&(i=t[a])instanceof Ll){if(!a&&i.type==e&&i.length==r)return i;(s=i.prop(wl.lookAhead))&&(o=n[a]+i.length+s)}return m(e,t,n,r,o)}}function h(e,t,n,i,s,o,a,l){let c=[],u=[];for(;e.length>i;)c.push(e.pop()),u.push(t.pop()+n-s);e.push(m(r.types[a],c,u,o-s,l-o)),t.push(s-n)}function m(e,t,n,r,i=0,s){if(c){let e=[wl.contextHash,c];s=s?[e].concat(s):[e]}if(i>25){let e=[wl.lookAhead,i];s=s?[e].concat(s):[e]}return new Ll(e,t,n,r,s)}function g(e,t){let n=a.fork(),r=0,s=0,l=0,c=n.end-i,u={size:0,start:0,skip:0};e:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=s,u.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a=o?4:0,d=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break e;p+=4}else n.id>=o&&(p+=4);n.next()}s=d,r+=e,l+=p}return(t<0||r==e)&&(u.size=r,u.start=s,u.skip=l),u.size>4?u:void 0}function y(e,t,n){let{id:r,start:i,end:s,size:l}=a;if(a.next(),l>=0&&r4){let r=a.pos-(l-4);for(;a.pos>r;)n=y(e,t,n)}t[--n]=o,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else-3==l?c=r:-4==l&&(u=r);return n}let _=[],b=[];for(;a.pos>0;)p(e.start||0,e.bufferStart||0,_,b,-1,0);let v=null!==(t=e.length)&&void 0!==t?t:_.length?b[0]+_[0].length:0;return new Ll(l[e.topID],_.reverse(),b.reverse(),v)}(e)}}Ll.empty=new Ll(Pl.none,[],[],0);class Bl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Bl(this.buffer,this.index)}}class Ml{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pl.none}toString(){let e=[];for(let t=0;t0));a=s[a+3]);return o}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),s=0;for(let o=e,a=0;o=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Nl(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?o.length:-1;e!=l;e+=t){let l=o[e],c=a[e]+s.from;if(jl(r,n,c,c+l.length))if(l instanceof Ml){if(i&Il.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,t,n-c,r);if(o>-1)return new $l(new Wl(s,l,e,c),null,o)}else if(i&Il.IncludeAnonymous||!l.type.isAnonymous||Xl(l)){let o;if(!(i&Il.IgnoreMounts)&&(o=Cl.get(l))&&!o.overlay)return new Ul(o.tree,c,e,s);let a=new Ul(l,c,e,s);return i&Il.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(i&Il.IncludeAnonymous||!s.type.isAnonymous)return null;if(e=s.index>=0?s.index+t:t<0?-1:s._parent._tree.children.length,s=s._parent,!s)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&Il.IgnoreOverlays)&&(r=Cl.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e=n:i>n))return new Ul(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Vl(e,t,n,r){let i=e.cursor(),s=[];if(!i.firstChild())return s;if(null!=n)for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return s;for(;;){if(null!=r&&i.type.is(r))return s;if(i.type.is(t)&&s.push(i.node),!i.nextSibling())return null==r?s:[]}}function Kl(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class Wl{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class $l extends Fl{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new $l(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&Il.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new $l(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new $l(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new $l(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let s=n.buffer[this.index+1];e.push(n.slice(r,i,s)),t.push(0)}return new Ll(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ql(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||i.to0){if(this.index-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&Il.IncludeAnonymous||e instanceof Ml||!e.type.isAnonymous||Xl(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;t=s,n=i+1;break e}r=this.stack[--i]}for(let e=n;e=0;i--){if(i<0)return Kl(this.node,e,r);let s=n[t.buffer[this.stack[i]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function Xl(e){return e.children.some((e=>e instanceof Ml||!e.type.isAnonymous||Xl(e)))}const Gl=new WeakMap;function Zl(e,t){if(!e.isAnonymous||t instanceof Ml||t.type!=e)return 1;let n=Gl.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Ll)){n=1;break}n+=Zl(e,r)}Gl.set(t,n)}return n}function Hl(e,t,n,r,i,s,o,a,l){let c=0;for(let n=r;n=u)break;h+=t}if(c==i+1){if(h>u){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}p.push(n[i])}else{let t=r[c-1]+n[c-1].length-f;p.push(Hl(e,n,r,i,c,f,t,null,l))}d.push(f+a-s)}}(t,n,r,i,0),(a||l)(p,d,o)}class Yl{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof $l?this.setBuffer(e.context.buffer,e.index,t):e instanceof Ul&&this.map.set(e.tree,t)}get(e){return e instanceof $l?this.getBuffer(e.context.buffer,e.index):e instanceof Ul?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Jl{constructor(e,t,n,r,i=!1,s=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(s?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new Jl(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,s=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let c=o=n)for(;s&&s.from=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new Jl(e,n,t.tree,t.offset+l,o>0,!!c)}if(t&&r.push(t),s.to>u)break;s=inew Tl(e.from,e.to))):[new Tl(0,0)]:[new Tl(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class tc{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new wl({perNode:!0});let nc=0;class rc{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=nc++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new rc([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new sc;return t=>t.modified.indexOf(e)>-1?t:sc.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let ic=0;class sc{constructor(){this.instances=[],this.id=ic++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>n.base==e&&function(e,t){return e.length==t.length&&e.every(((e,n)=>e==t[n]))}(t,n.modified)));if(n)return n;let r=[],i=new rc(r,e,t);for(let e of t)e.instances.push(i);let s=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of s)r.push(sc.get(t,e));return i}}function oc(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){i=0;break}if("/"!=o)throw new RangeError("Invalid path: "+e);s=e.slice(t)}let o=n.length-1,a=n[o];if(!a)throw new RangeError("Invalid path: "+e);let l=new lc(r,i,o>0?n.slice(0,o):null);t[a]=l.sort(t[a])}}return ac.add(t)}const ac=new wl;class lc{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function uc(e,t,n,r=0,i=e.length){let s=new pc(r,Array.isArray(t)?t:[t],n);s.highlightRange(e.cursor(),r,i,"",s.highlighters),s.flush(i)}lc.empty=new lc([],2,null);class pc{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:s,from:o,to:a}=e;if(o>=n||a<=t)return;s.isTop&&(i=this.highlighters.filter((e=>!e.scope||e.scope(s))));let l=r,c=function(e){let t=e.type.prop(ac);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||lc.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(Math.max(t,o),l),c.opaque)return;let p=e.tree&&e.tree.prop(wl.mounted);if(p&&p.overlay){let s=e.node.enter(p.overlay[0].from+o,1),c=this.highlighters.filter((e=>!e.scope||e.scope(p.tree.type))),u=e.firstChild();for(let d=0,f=o;;d++){let h=d=m)&&e.nextSibling()););if(!h||m>n)break;f=h.to+o,f>t&&(this.highlightRange(s.cursor(),Math.max(t,h.from+o),Math.min(n,f),"",c),this.startSpan(Math.min(n,f),l))}u&&e.parent()}else if(e.firstChild()){p&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const dc=rc.define,fc=dc(),hc=dc(),mc=dc(hc),gc=dc(hc),yc=dc(),_c=dc(yc),bc=dc(yc),vc=dc(),Ec=dc(vc),xc=dc(),Sc=dc(),Oc=dc(),Tc=dc(Oc),wc=dc(),Cc={comment:fc,lineComment:dc(fc),blockComment:dc(fc),docComment:dc(fc),name:hc,variableName:dc(hc),typeName:mc,tagName:dc(mc),propertyName:gc,attributeName:dc(gc),className:dc(hc),labelName:dc(hc),namespace:dc(hc),macroName:dc(hc),literal:yc,string:_c,docString:dc(_c),character:dc(_c),attributeValue:dc(_c),number:bc,integer:dc(bc),float:dc(bc),bool:dc(yc),regexp:dc(yc),escape:dc(yc),color:dc(yc),url:dc(yc),keyword:xc,self:dc(xc),null:dc(xc),atom:dc(xc),unit:dc(xc),modifier:dc(xc),operatorKeyword:dc(xc),controlKeyword:dc(xc),definitionKeyword:dc(xc),moduleKeyword:dc(xc),operator:Sc,derefOperator:dc(Sc),arithmeticOperator:dc(Sc),logicOperator:dc(Sc),bitwiseOperator:dc(Sc),compareOperator:dc(Sc),updateOperator:dc(Sc),definitionOperator:dc(Sc),typeOperator:dc(Sc),controlOperator:dc(Sc),punctuation:Oc,separator:dc(Oc),bracket:Tc,angleBracket:dc(Tc),squareBracket:dc(Tc),paren:dc(Tc),brace:dc(Tc),content:vc,heading:Ec,heading1:dc(Ec),heading2:dc(Ec),heading3:dc(Ec),heading4:dc(Ec),heading5:dc(Ec),heading6:dc(Ec),contentSeparator:dc(vc),list:dc(vc),quote:dc(vc),emphasis:dc(vc),strong:dc(vc),link:dc(vc),monospace:dc(vc),strikethrough:dc(vc),inserted:dc(),deleted:dc(),changed:dc(),invalid:dc(),meta:wc,documentMeta:dc(wc),annotation:dc(wc),processingInstruction:dc(wc),definition:rc.defineModifier(),constant:rc.defineModifier(),function:rc.defineModifier(),standard:rc.defineModifier(),local:rc.defineModifier(),special:rc.defineModifier()};cc([{tag:Cc.link,class:"tok-link"},{tag:Cc.heading,class:"tok-heading"},{tag:Cc.emphasis,class:"tok-emphasis"},{tag:Cc.strong,class:"tok-strong"},{tag:Cc.keyword,class:"tok-keyword"},{tag:Cc.atom,class:"tok-atom"},{tag:Cc.bool,class:"tok-bool"},{tag:Cc.url,class:"tok-url"},{tag:Cc.labelName,class:"tok-labelName"},{tag:Cc.inserted,class:"tok-inserted"},{tag:Cc.deleted,class:"tok-deleted"},{tag:Cc.literal,class:"tok-literal"},{tag:Cc.string,class:"tok-string"},{tag:Cc.number,class:"tok-number"},{tag:[Cc.regexp,Cc.escape,Cc.special(Cc.string)],class:"tok-string2"},{tag:Cc.variableName,class:"tok-variableName"},{tag:Cc.local(Cc.variableName),class:"tok-variableName tok-local"},{tag:Cc.definition(Cc.variableName),class:"tok-variableName tok-definition"},{tag:Cc.special(Cc.variableName),class:"tok-variableName2"},{tag:Cc.definition(Cc.propertyName),class:"tok-propertyName tok-definition"},{tag:Cc.typeName,class:"tok-typeName"},{tag:Cc.namespace,class:"tok-namespace"},{tag:Cc.className,class:"tok-className"},{tag:Cc.macroName,class:"tok-macroName"},{tag:Cc.propertyName,class:"tok-propertyName"},{tag:Cc.operator,class:"tok-operator"},{tag:Cc.comment,class:"tok-comment"},{tag:Cc.meta,class:"tok-meta"},{tag:Cc.invalid,class:"tok-invalid"},{tag:Cc.punctuation,class:"tok-punctuation"}]);var Ac;const Pc=new wl;function kc(e){return Pt.define({combine:e?t=>t.concat(e):void 0})}const Dc=new wl;class Rc{constructor(e,t,n=[],r=""){this.data=e,this.name=r,_n.prototype.hasOwnProperty("tree")||Object.defineProperty(_n.prototype,"tree",{get(){return Bc(this)}}),this.parser=t,this.extension=[$c.of(this),_n.languageData.of(((e,t,n)=>{let r=Ic(e,t,n),i=r.type.prop(Pc);if(!i)return[];let s=e.facet(i),o=r.type.prop(Dc);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(s)}}return s}))].concat(n)}isActiveAt(e,t,n=-1){return Ic(e,t,n).type.prop(Pc)==this.data}findRegions(e){let t=e.facet($c);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(Pc)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(wl.mounted);if(i){if(i.tree.prop(Pc)==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(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0))]}),e.name)}configure(e,t){return new Lc(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Bc(e){let t=e.field(Rc.state,!1);return t?t.tree:Ll.empty}class Mc{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=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let jc=null;class Nc{constructor(e,t,n=[],r,i,s,o,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=s,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Nc(e,t,[],Ll.empty,0,n,[],null)}startParse(){return this.parser.startParse(new Mc(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ll.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.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(Jl.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=jc;jc=this;try{return e()}finally{jc=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Fc(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:s,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i}))),n=Jl.applyChanges(n,t),r=Ll.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=Fc(this.fragments,n,r),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 ec{createParse(t,n,r){let i=r[0].from,s=r[r.length-1].to,o={parsedPos:i,advance(){let t=jc;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new Ll(Pl.none,[],[],s-i)},stoppedAt:null,stopAt(){}};return o}}}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 jc}}function Fc(e,t,n){return Jl.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class Uc{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 Uc(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Nc.create(e.facet($c).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Uc(n)}}Rc.state=Mt.define({create:Uc.init,update(e,t){for(let e of t.effects)if(e.is(Rc.setState))return e.value;return t.startState.facet($c)!=t.state.facet($c)?Uc.init(t.state):e.apply(t)}});let Vc=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(Vc=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Kc="undefined"!=typeof navigator&&(null===(Ac=navigator.scheduling)||void 0===Ac?void 0:Ac.isInputPending)?()=>navigator.scheduling.isInputPending():null,Wc=$i.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(Rc.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Rc.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=Vc(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,a=i.context.work((()=>Kc&&Kc()||Date.now()>s),r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Rc.setState.of(new Uc(i.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>Ui(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()}}}),$c=Pt.define({combine(e){return e.length?e[0]:null},enables:e=>[Rc.state,Wc,Uo.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class qc{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Qc=Pt.define(),zc=Pt.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 Xc(e){let t=e.facet(zc);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Gc(e,t){let n="",r=e.tabSize,i=e.facet(zc)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(let e=0;e=t?function(e,t,n){let r=t.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t!=r.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Jc(r,e,n)}(e,n,t):null}class Hc{constructor(e,t={}){this.state=e,this.options=t,this.unit=Xc(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r-1&&(i+=s-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Mn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Yc=new wl;function Jc(e,t,n){for(let r=e;r;r=r.next){let e=eu(r.node);if(e)return e(nu.create(t,n,r))}return 0}function eu(e){let t=e.type.prop(Yc);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(wl.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>su(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?tu:null}function tu(){return 0}class nu extends Hc{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new nu(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(ru(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Jc(this.context.next,this.base,this.pos)}}function ru(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function iu({closing:e,align:t=!0,units:n=1}){return r=>su(r,t,n,e)}function su(e,t,n,r,i){let s=e.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==e.pos+o,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,s=e.state.doc.lineAt(n.from),o=null==i||i<=s.from?s.to:Math.min(s.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped)return i.from{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const au=Pt.define(),lu=new wl;function cu(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function uu(e,t,n){for(let r of e.facet(au)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=Bc(e);if(r.lengthn)continue;if(i&&o.from=t&&r.to>n&&(i=r)}}return i}(e,t,n)}function pu(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const du=on.define({map:pu}),fu=on.define({map:pu});function hu(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 mu=Mt.define({create(){return Jr.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(du)&&!yu(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(xu),i=r?Jr.replace({widget:new wu(r(t.state,n.value))}):Tu;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(fu)&&(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:r}=t.selection.main;e.between(r,r,((e,t)=>{er&&(n=!0)})),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>Uo.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{(!i||i.from>e)&&(i={from:e,to:t})})),i}function yu(e,t,n){let r=!1;return e.between(t,t,((e,i)=>{e==t&&i==n&&(r=!0)})),r}function _u(e,t){return e.field(mu,!1)?t:t.concat(on.appendConfig.of(Su()))}function bu(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return Uo.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}const vu=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of hu(e)){let n=uu(e.state,t.from,t.to);if(n)return e.dispatch({effects:_u(e.state,[du.of(n),bu(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(mu,!1))return!1;let t=[];for(let n of hu(e)){let r=gu(e.state,n.from,n.to);r&&t.push(fu.of(r),bu(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(mu,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(fu.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],Eu={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},xu=Pt.define({combine(e){return bn(e,Eu)}});function Su(e){let t=[mu,Pu];return e&&t.push(xu.of(e)),t}function Ou(e,t){let{state:n}=e,r=n.facet(xu),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=gu(e.state,n.from,n.to);r&&e.dispatch({effects:fu.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const Tu=Jr.replace({widget:new class extends Hr{toDOM(e){return Ou(e,null)}}});class wu extends Hr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ou(e,this.value)}}const Cu={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Au extends nl{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}}const Pu=Uo.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 ku{constructor(e,t){let n;function r(e){let t=Vn.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,s=t.scope;this.scope=s instanceof Rc?e=>e.prop(Pc)==s.data:s?e=>e==s:void 0,this.style=cc(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:i}).style,this.module=n?new Vn(n):null,this.themeType=t.themeType}static define(e,t){return new ku(e,t||{})}}const Du=Pt.define(),Ru=Pt.define({combine(e){return e.length?[e[0]]:null}});function Iu(e){let t=e.facet(Du);return t.length?t:e.facet(Ru)}function Lu(e,t){let n,r=[Mu];return e instanceof ku&&(e.module&&r.push(Uo.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(Ru.of(e)):n?r.push(Du.computeN([Uo.darkTheme],(t=>t.facet(Uo.darkTheme)==("dark"==n)?[e]:[]))):r.push(Du.of(e)),r}class Bu{constructor(e){this.markCache=Object.create(null),this.tree=Bc(e.state),this.decorations=this.buildDeco(e,Iu(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Bc(e.state),n=Iu(e.state),r=n!=Iu(e.startState),{viewport:i}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Jr.none;let n=new Tn;for(let{from:r,to:i}of e.visibleRanges)uc(this.tree,t,((e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=Jr.mark({class:r})))}),r,i);return n.finish()}}const Mu=Kt.high($i.fromClass(Bu,{decorations:e=>e.decorations})),ju=ku.define([{tag:Cc.meta,color:"#404740"},{tag:Cc.link,textDecoration:"underline"},{tag:Cc.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Cc.emphasis,fontStyle:"italic"},{tag:Cc.strong,fontWeight:"bold"},{tag:Cc.strikethrough,textDecoration:"line-through"},{tag:Cc.keyword,color:"#708"},{tag:[Cc.atom,Cc.bool,Cc.url,Cc.contentSeparator,Cc.labelName],color:"#219"},{tag:[Cc.literal,Cc.inserted],color:"#164"},{tag:[Cc.string,Cc.deleted],color:"#a11"},{tag:[Cc.regexp,Cc.escape,Cc.special(Cc.string)],color:"#e40"},{tag:Cc.definition(Cc.variableName),color:"#00f"},{tag:Cc.local(Cc.variableName),color:"#30a"},{tag:[Cc.typeName,Cc.namespace],color:"#085"},{tag:Cc.className,color:"#167"},{tag:[Cc.special(Cc.variableName),Cc.macroName],color:"#256"},{tag:Cc.definition(Cc.propertyName),color:"#00c"},{tag:Cc.comment,color:"#940"},{tag:Cc.invalid,color:"#f00"}]),Nu=Uo.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Fu="()[]{}",Uu=Pt.define({combine(e){return bn(e,{afterCursor:!0,brackets:Fu,maxScanDistance:1e4,renderMatch:Wu})}}),Vu=Jr.mark({class:"cm-matchingBracket"}),Ku=Jr.mark({class:"cm-nonmatchingBracket"});function Wu(e){let t=[],n=e.matched?Vu:Ku;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 $u=Mt.define({create(){return Jr.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(Uu);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=Gu(t.state,e.head,-1,r)||e.head>0&&Gu(t.state,e.head-1,1,r)||r.afterCursor&&(Gu(t.state,e.head,1,r)||e.headUo.decorations.from(e)}),qu=[$u,Nu];const Qu=new wl;function zu(e,t,n){let r=e.prop(t<0?wl.openedBy:wl.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function Xu(e){let t=e.type.prop(Qu);return t?t(e.node):e}function Gu(e,t,n,r={}){let i=r.maxScanDistance||1e4,s=r.brackets||Fu,o=Bc(e),a=o.resolveInner(t,n);for(let r=a;r;r=r.parent){let i=zu(r.type,n,s);if(i&&r.from0?t>=o.from&&to.from&&t<=o.to))return Zu(e,t,n,r,o,i,s)}}return function(e,t,n,r,i,s,o){let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%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),p=0;for(let e=0;!u.next().done&&e<=s;){let s=u.value;n<0&&(e+=s.length);let a=t+e*n;for(let e=n>0?0:s.length-1,t=n>0?s.length:-1;e!=t;e+=n){let t=o.indexOf(s[e]);if(!(t<0||r.resolveInner(a+e,1).type!=i))if(t%2==0==n>0)p++;else{if(1==p)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};p--}}n>0&&(e+=s.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,o,a.type,i,s)}function Zu(e,t,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&s.indexOf(u.type.name)>-1&&u.from-1||(Ju.push(e),console.warn(t))}function rp(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||Cc[n];r?"function"==typeof r?t.length?t=t.map(r):np(n,`Modifier ${n} used at start of tag`):t.length?np(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:np(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map((e=>e.id)),s=ep[i];if(s)return s.id;let o=ep[i]=Pl.define({id:Yu.length,name:r,props:[oc({[r]:n})]});return Yu.push(o),o.id}li.RTL,li.LTR;function ip(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}const sp=ip(up,0),op=ip(cp,0),ap=ip(((e,t)=>cp(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),s=t.length-1;s>=0&&t[s].to>r.from?t[s].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t))),0);function lp(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function cp(e,t,n=t.selection.ranges){let r=n.map((e=>lp(t,e.from).block));if(!r.every((e=>e)))return null;let i=n.map(((e,n)=>function(e,{open:t,close:n},r,i){let s,o,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,p=a.length-c;if(a.slice(p-t.length,p)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=100?s=o=e.sliceDoc(r,i):(s=e.sliceDoc(r,r+50),o=e.sliceDoc(i-50,i));let d=/^\s*/.exec(s)[0].length,f=/\s*$/.exec(o)[0].length,h=o.length-f-n.length;return s.slice(d,d+t.length)==t&&o.slice(h,h+n.length)==n?{open:{pos:r+d+t.length,margin:/\s/.test(s.charAt(d+t.length))?1:0},close:{pos:i-f-n.length,margin:/\s/.test(o.charAt(h-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!i.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&i.some((e=>e))){let e=[];for(let t,n=0;ni&&(e==s||s>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:i,empty:s,single:o}of r)!o&&s||e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,s=r+i.length;" "==t.text[s-t.from]&&s++,e.push({from:r,to:s})}return{changes:e}}return null}const pp=nn.define(),dp=nn.define(),fp=Pt.define(),hp=Pt.define({combine(e){return bn(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),mp=Mt.define({create(){return kp.empty},update(e,t){let n=t.state.facet(hp),r=t.annotation(pp);if(r){let i=Ep.fromTransaction(t,r.selection),s=r.side,o=0==s?e.undone:e.done;return o=i?xp(o,o.length,n.minDepth,i):Tp(o,t.startState.selection),new kp(0==s?r.rest:o,0==s?o:r.rest)}let i=t.annotation(dp);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(an.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=Ep.fromTransaction(t),o=t.annotation(an.time),a=t.annotation(an.userEvent);return s?e=e.addChanges(s,o,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,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 kp(e.done.map(Ep.fromJSON),e.undone.map(Ep.fromJSON))}});function gp(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(mp,!1);if(!i)return!1;let s=i.pop(e,n,t);return!!s&&(r(s),!0)}}const yp=gp(0,!1),_p=gp(1,!1),bp=gp(0,!0),vp=gp(1,!0);class Ep{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new Ep(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 Ep(e.changes&&_t.fromJSON(e.changes),[],e.mapped&&yt.fromJSON(e.mapped),e.startSelection&&wt.fromJSON(e.startSelection),e.selectionsAfter.map(wt.fromJSON))}static fromTransaction(e,t){let n=Op;for(let t of e.startState.facet(fp)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Ep(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Op)}static selection(e){return new Ep(void 0,Op,void 0,void 0,e)}}function xp(e,t,n,r){let i=t+1>n+20?t-n-1:0,s=e.slice(i,t);return s.push(r),s}function Sp(e,t){return e.length?t.length?e.concat(t):e:t}const Op=[];function Tp(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),xp(e,e.length-1,1e9,n.setSelAfter(r)))}return[Ep.selection([t])]}function wp(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 Cp(e,t){if(!e.length)return e;let n=e.length,r=Op;for(;n;){let i=Ap(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Ep.selection(r)]:Op}function Ap(e,t,n){let r=Sp(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Op,n);if(!e.changes)return Ep.selection(r);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(s):s;return new Ep(i,on.mapEffects(e.effects,t),o,e.startSelection.map(s),r)}const Pp=/^(input\.type|delete)($|\.)/;class kp{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new kp(this.done,this.undone):this}addChanges(e,t,n,r,i){let s=this.done,o=s[s.length-1];return s=o&&o.changes&&!o.changes.empty&&e.changes&&(!n||Pp.test(n))&&(!o.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,i,s)=>{for(let e=0;e=t&&i<=o&&(r=!0)}})),r}(o.changes,e.changes))||"input.type.compose"==n)?xp(s,s.length-1,r.minDepth,new Ep(e.changes.compose(o.changes),Sp(e.effects,o.effects),o.mapped,o.startSelection,Op)):xp(s,s.length,r.minDepth,e),new kp(s,Op,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Op;return i.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(i[i.length-1],e)?this:new kp(Tp(this.done,e),this.undone,t,n)}addMapping(e){return new kp(Cp(this.done,e),Cp(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],s=i.selectionsAfter[0]||t.selection;if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:pp.of({side:e,rest:wp(r),selection:s}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?Op:r.slice(0,r.length-1);return i.mapped&&(n=Cp(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:pp.of({side:e,rest:n,selection:s}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}kp.empty=new kp(Op,Op);const Dp=[{key:"Mod-z",run:yp,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:_p,preventDefault:!0},{linux:"Ctrl-Shift-z",run:_p,preventDefault:!0},{key:"Mod-u",run:bp,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:vp,preventDefault:!0}];function Rp(e,t){return wt.create(e.ranges.map(t),e.mainIndex)}function Ip(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Lp({state:e,dispatch:t},n){let r=Rp(e.selection,n);return!r.eq(e.selection,!0)&&(t(Ip(e,r)),!0)}function Bp(e,t){return wt.cursor(t?e.to:e.from)}function Mp(e,t){return Lp(e,(n=>n.empty?e.moveByChar(n,t):Bp(n,t)))}function jp(e){return e.textDirectionAt(e.state.selection.main.head)==li.LTR}const Np=e=>Mp(e,!jp(e)),Fp=e=>Mp(e,jp(e));function Up(e,t){return Lp(e,(n=>n.empty?e.moveByGroup(n,t):Bp(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function Vp(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Kp(e,t,n){let r,i,s=Bc(e).resolveInner(t.head),o=n?wl.closedBy:wl.openedBy;for(let r=t.head;;){let t=n?s.childAfter(r):s.childBefore(r);if(!t)break;Vp(e,t,o)?s=t:r=n?t.to:t.from}return i=s.type.prop(o)&&(r=n?Gu(e,s.from,1):Gu(e,s.to,-1))&&r.matched?n?r.end.to:r.end.from:n?s.to:s.from,wt.cursor(i,n?-1:1)}function Wp(e,t){return Lp(e,(n=>{if(!n.empty)return Bp(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const $p=e=>Wp(e,!1),qp=e=>Wp(e,!0);function Qp(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):Bp(n,t)));if(s.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+r.marginTop,l=o.bottom-r.marginBottom;t&&t.top>a&&t.bottomzp(e,!1),Gp=e=>zp(e,!0);function Zp(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=wt.cursor(r.from+n))}return i}function Hp(e,t,n){let r=!1,i=Rp(e.selection,(t=>{let i=Gu(e,t.head,-1)||Gu(e,t.head,1)||t.head>0&&Gu(e,t.head-1,1)||t.head{let n=t(e);return wt.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(Ip(e.state,n)),!0)}function Jp(e,t){return Yp(e,(n=>e.moveByChar(n,t)))}const ed=e=>Jp(e,!jp(e)),td=e=>Jp(e,jp(e));function nd(e,t){return Yp(e,(n=>e.moveByGroup(n,t)))}function rd(e,t){return Yp(e,(n=>e.moveVertically(n,t)))}const id=e=>rd(e,!1),sd=e=>rd(e,!0);function od(e,t){return Yp(e,(n=>e.moveVertically(n,t,Qp(e).height)))}const ad=e=>od(e,!1),ld=e=>od(e,!0),cd=({state:e,dispatch:t})=>(t(Ip(e,{anchor:0})),!0),ud=({state:e,dispatch:t})=>(t(Ip(e,{anchor:e.doc.length})),!0),pd=({state:e,dispatch:t})=>(t(Ip(e,{anchor:e.selection.main.anchor,head:0})),!0),dd=({state:e,dispatch:t})=>(t(Ip(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function fd(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange((r=>{let{from:i,to:s}=r;if(i==s){let o=t(r);oi&&(n="delete.forward",o=hd(e,o,!0)),i=Math.min(i,o),s=Math.max(s,o)}else i=hd(e,i,!1),s=hd(e,s,!0);return i==s?{range:r}:{changes:{from:i,to:s},range:wt.cursor(i,it(e))))r.between(t,t,((e,r)=>{et&&(t=n?r:e)}));return t}const md=(e,t)=>fd(e,(n=>{let r,i,s=n.from,{state:o}=e,a=o.doc.lineAt(s);if(!t&&s>a.from&&smd(e,!1),yd=e=>md(e,!0),_d=(e,t)=>fd(e,(n=>{let r=n.head,{state:i}=e,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?s.to:s.from)){r==n.head&&s.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=at(s.text,r-s.from,t)+s.from,l=s.text.slice(Math.min(r,a)-s.from,Math.max(r,a)-s.from),c=o(l);if(null!=e&&c!=e)break;" "==l&&r==n.head||(e=c),r=a}return r})),bd=e=>_d(e,!1);function vd(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),s=e.doc.lineAt(r.to);if(r.empty||r.to!=s.from||(s=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=s.to,e.ranges.push(r)}else t.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return t}function Ed(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of vd(e)){if(n?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(n?t.to+1:t.from-1),o=s.length+1;if(n){r.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak});for(let n of t.ranges)i.push(wt.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text});for(let e of t.ranges)i.push(wt.range(e.anchor-o,e.head-o))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:wt.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function xd(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of vd(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Sd=Od(!1);function Od(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange((n=>{let{from:r,to:i}=n,s=t.doc.lineAt(r),o=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=Bc(e).resolveInner(t),i=r.childBefore(t),s=r.childAfter(t);return i&&s&&i.to<=t&&s.from>=t&&(n=i.type.prop(wl.closedBy))&&n.indexOf(s.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(s.from).from&&!/\S/.test(e.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}(t,r);e&&(r=i=(i<=s.to?s:t.doc.lineAt(i)).to);let a=new Hc(t,{simulateBreak:r,simulateDoubleBreak:!!o}),l=Zc(a,r);for(null==l&&(l=Mn(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));is.from&&r{let i=[];for(let s=r.from;s<=r.to;){let o=e.doc.lineAt(s);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),s=o.to+1}let s=e.changes(i);return{changes:i,range:wt.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}}))}const wd=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Td(e,((t,n)=>{n.push({from:t.from,insert:e.facet(zc)})})),{userEvent:"input.indent"})),!0),Cd=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Td(e,((t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Mn(r,e.tabSize),s=0,o=Gc(e,Math.max(0,i-Xc(e)));for(;sLp(e,(t=>wt.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>Yp(e,(t=>wt.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>Lp(e,(t=>wt.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>Yp(e,(t=>wt.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:yd},{key:"Ctrl-h",run:gd},{key:"Ctrl-k",run:e=>fd(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:Xe.of(["",""])},range:wt.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,r=e.doc.lineAt(n),i=n==r.from?n-1:at(r.text,n-r.from,!1)+r.from,s=n==r.to?n+1:at(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(i,n))},range:wt.cursor(s)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Gp}],Pd=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Lp(e,(t=>Kp(e.state,t,!jp(e)))),shift:e=>Yp(e,(t=>Kp(e.state,t,!jp(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Lp(e,(t=>Kp(e.state,t,jp(e)))),shift:e=>Yp(e,(t=>Kp(e.state,t,jp(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Ed(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>xd(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Ed(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>xd(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=wt.create([n.main]):n.main.empty||(r=wt.create([wt.cursor(n.main.head)])),!!r&&(t(Ip(e,r)),!0)}},{key:"Mod-Enter",run:Od(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=vd(e).map((({from:t,to:n})=>wt.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:wt.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=Rp(e.selection,(t=>{var n;for(let r=Bc(e).resolveStack(t.from,1);r;r=r.next){let{node:e}=r;if((e.from=t.to||e.to>t.to&&e.from<=t.from)&&(null===(n=e.parent)||void 0===n?void 0:n.parent))return wt.range(e.to,e.from)}return t}));return t(Ip(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:Cd},{key:"Mod-]",run:wd},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Hc(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=Td(e,((t,i,s)=>{let o=Zc(r,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=Gc(e,o);(a!=l||s.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(vd(t).map((({from:e,to:n})=>(e>0?e--:ne.moveVertically(t,!0))).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>Hp(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=lp(e.state,n.from);return r.line?sp(e):!!r.block&&ap(e)}},{key:"Alt-A",run:op}].concat([{key:"ArrowLeft",run:Np,shift:ed,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>Up(e,!jp(e)),shift:e=>nd(e,!jp(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Lp(e,(t=>Zp(e,t,!jp(e)))),shift:e=>Yp(e,(t=>Zp(e,t,!jp(e)))),preventDefault:!0},{key:"ArrowRight",run:Fp,shift:td,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>Up(e,jp(e)),shift:e=>nd(e,jp(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Lp(e,(t=>Zp(e,t,jp(e)))),shift:e=>Yp(e,(t=>Zp(e,t,jp(e)))),preventDefault:!0},{key:"ArrowUp",run:$p,shift:id,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cd,shift:pd},{mac:"Ctrl-ArrowUp",run:Xp,shift:ad},{key:"ArrowDown",run:qp,shift:sd,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ud,shift:dd},{mac:"Ctrl-ArrowDown",run:Gp,shift:ld},{key:"PageUp",run:Xp,shift:ad},{key:"PageDown",run:Gp,shift:ld},{key:"Home",run:e=>Lp(e,(t=>Zp(e,t,!1))),shift:e=>Yp(e,(t=>Zp(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:cd,shift:pd},{key:"End",run:e=>Lp(e,(t=>Zp(e,t,!0))),shift:e=>Yp(e,(t=>Zp(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:ud,shift:dd},{key:"Enter",run:Sd},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:gd,shift:gd},{key:"Delete",run:yd},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bd},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>_d(e,!0)},{mac:"Mod-Backspace",run:e=>fd(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>fd(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head({mac:e.key,run:e.run,shift:e.shift}))))),kd={key:"Tab",run:wd,shift:Cd};function Dd(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;te.normalize("NFKD"):e=>e;class Ld{constructor(e,t,n=0,r=e.length,i,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(Id(e)):Id,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return dt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ft(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ht(e);let r=this.normalize(t);for(let e=0,i=n;;e++){let s=r.charCodeAt(e),o=this.match(s,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Vd(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new Fd(t,e.sliceString(t,n));return Nd.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:s}=r;return s>t&&(i=e.sliceString(t,s)+i,s=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=Vd(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Fd.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Vd(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function Kd(e){let t=Dd("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,s,o,a,l]=n,c=a?+a.slice(1):0,u=o?+o:i.number;if(o&&l){let e=u/100;s&&(e=e*("-"==s?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&s&&(u=u*("-"==s?-1:1)+i.number);let p=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),d=wt.cursor(p.from+Math.max(0,Math.min(c,p.length)));e.dispatch({effects:[Wd.of(!1),Uo.scrollIntoView(d.from,{y:"center"})],selection:d}),e.focus()}return{dom:Dd("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:Wd.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},Dd("label",e.state.phrase("Go to line"),": ",t)," ",Dd("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(jd.prototype[Symbol.iterator]=Ud.prototype[Symbol.iterator]=function(){return this});const Wd=on.define(),$d=Mt.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(Wd)&&(e=n.value);return e},provide:e=>tl.from(e,(e=>e?Kd:null))}),qd=Uo.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Qd={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zd=Pt.define({combine(e){return bn(e,Qd,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});const Xd=Jr.mark({class:"cm-selectionMatch"}),Gd=Jr.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Zd(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==hn.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==hn.Word)}const Hd=$i.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(zd),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Jr.none;let i,s=r.main,o=null;if(s.empty){if(!t.highlightWordAroundCursor)return Jr.none;let e=n.wordAt(s.head);if(!e)return Jr.none;o=n.charCategorizer(s.head),i=n.sliceDoc(e.from,e.to)}else{let e=s.to-s.from;if(e200)return Jr.none;if(t.wholeWords){if(i=n.sliceDoc(s.from,s.to),o=n.charCategorizer(s.head),!Zd(o,n,s.from,s.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==hn.Word&&e(t.sliceDoc(r-1,r))==hn.Word}(o,n,s.from,s.to))return Jr.none}else if(i=n.sliceDoc(s.from,s.to),!i)return Jr.none}let a=[];for(let r of e.visibleRanges){let e=new Ld(n.doc,i,r.from,r.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!o||Zd(o,n,r,i))&&(s.empty&&r<=s.from&&i>=s.to?a.push(Gd.range(r,i)):(r>=s.to||i<=s.from)&&a.push(Xd.range(r,i)),a.length>t.maxMatches))return Jr.none}}return Jr.set(a)}},{decorations:e=>e.decorations}),Yd=Uo.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const Jd=Pt.define({combine(e){return bn(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Pf(e),scrollToMatch:e=>Uo.scrollIntoView(e)})}});class ef{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,Md),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new lf(this):new rf(this)}getCursor(e,t=0,n){let r=e.doc?e:_n.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?sf(this,r,t,n):nf(this,r,t,n)}}class tf{constructor(e){this.spec=e}}function nf(e,t,n,r){return new Ld(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(n,r,i,s)=>((s>n||s+i.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=nf(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function sf(e,t,n,r){return new jd(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(of(n.input,n.index))!=hn.Word||i(af(n.input,n.index))!=hn.Word)&&(i(af(n.input,n.index+n[0].length))!=hn.Word||i(of(n.input,n.index+n[0].length))!=hn.Word)):void 0},n,r);var i}function of(e,t){return e.slice(at(e,t,!1),t)}function af(e,t){return e.slice(t,at(e,t))}class lf extends tf{nextMatch(e,t,n){let r=sf(this.spec,e,n,e.doc.length).next();return r.done&&(r=sf(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),s=sf(this.spec,e,i,n),o=null;for(;!s.next().done;)o=s.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=sf(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const cf=on.define(),uf=on.define(),pf=Mt.define({create(e){return new df(Sf(e).create(),null)},update(e,t){for(let n of t.effects)n.is(cf)?e=new df(n.value.create(),e.panel):n.is(uf)&&(e=new df(e.query,n.value?xf:null));return e},provide:e=>tl.from(e,(e=>e.panel))});class df{constructor(e,t){this.query=e,this.panel=t}}const ff=Jr.mark({class:"cm-searchMatch"}),hf=Jr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mf=$i.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(pf))}update(e){let t=e.state.field(pf);(t!=e.startState.field(pf)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Jr.none;let{view:n}=this,r=new Tn;for(let t=0,i=n.visibleRanges,s=i.length;ti[t+1].from-500;)a=i[++t].to;e.highlight(n.state,o,a,((e,t)=>{let i=n.state.selection.ranges.some((n=>n.from==e&&n.to==t));r.add(e,t,i?hf:ff)}))}return r.finish()}},{decorations:e=>e.decorations});function gf(e){return t=>{let n=t.state.field(pf,!1);return n&&n.query.spec.valid?e(t,n):wf(t)}}const yf=gf(((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=wt.single(r.from,r.to),s=e.state.facet(Jd);return e.dispatch({selection:i,effects:[Rf(e,r),s.scrollToMatch(i.main,e)],userEvent:"select.search"}),Tf(e),!0})),_f=gf(((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let s=wt.single(i.from,i.to),o=e.state.facet(Jd);return e.dispatch({selection:s,effects:[Rf(e,i),o.scrollToMatch(s.main,e)],userEvent:"select.search"}),Tf(e),!0})),bf=gf(((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:wt.create(n.map((e=>wt.range(e.from,e.to)))),userEvent:"select.search.matches"}),!0)})),vf=gf(((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=t.nextMatch(n,r,r);if(!s)return!1;let o,a,l=[],c=[];if(s.from==r&&s.to==i&&(a=n.toText(t.getReplacement(s)),l.push({from:s.from,to:s.to,insert:a}),s=t.nextMatch(n,s.from,s.to),c.push(Uo.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let t=0==l.length||l[0].from>=s.to?0:s.to-s.from-a.length;o=wt.single(s.from-t,s.to-t),c.push(Rf(e,s)),c.push(n.facet(Jd).scrollToMatch(o.main,e))}return e.dispatch({changes:l,selection:o,effects:c,userEvent:"input.replace"}),!0})),Ef=gf(((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map((e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}}));if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Uo.announce.of(r),userEvent:"input.replace.all"}),!0}));function xf(e){return e.state.facet(Jd).createPanel(e)}function Sf(e,t){var n,r,i,s,o;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(Jd);return new ef({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:c.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:c.literal,regexp:null!==(s=null==t?void 0:t.regexp)&&void 0!==s?s:c.regexp,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:c.wholeWord})}function Of(e){let t=Ha(e,xf);return t&&t.dom.querySelector("[main-field]")}function Tf(e){let t=Of(e);t&&t==e.root.activeElement&&t.select()}const wf=e=>{let t=e.state.field(pf,!1);if(t&&t.panel){let n=Of(e);if(n&&n!=e.root.activeElement){let r=Sf(e.state,t.query.spec);r.valid&&e.dispatch({effects:cf.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[uf.of(!0),t?cf.of(Sf(e.state,t.query.spec)):on.appendConfig.of(Lf)]});return!0},Cf=e=>{let t=e.state.field(pf,!1);if(!t||!t.panel)return!1;let n=Ha(e,xf);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:uf.of(!1)}),!0},Af=[{key:"Mod-f",run:wf,scope:"editor search-panel"},{key:"F3",run:yf,shift:_f,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:yf,shift:_f,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Cf,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let t=new Ld(e.doc,e.sliceDoc(r,i));!t.next().done;){if(s.length>1e3)return!1;t.value.from==r&&(o=s.length),s.push(wt.range(t.value.from,t.value.to))}return t(e.update({selection:wt.create(s,o),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=Ha(e,Kd);if(!t){let n=[Wd.of(!0)];null==e.state.field($d,!1)&&n.push(on.appendConfig.of([$d,qd])),e.dispatch({effects:n}),t=Ha(e,Kd)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=wt.create(n.ranges.map((t=>e.wordAt(t.head)||wt.cursor(t.head))),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=r)))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Ld(e.doc,t,r[r.length-1].to);;){if(i.next(),!i.done){if(n&&r.some((e=>e.from==i.value.from)))continue;if(s){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}if(n)return null;i=new Ld(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(wt.range(i.from,i.to),!1),effects:Uo.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class Pf{constructor(e){this.view=e;let t=this.query=e.state.field(pf).query.spec;function n(e,t,n){return Dd("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Dd("input",{value:t.search,placeholder:kf(e,"Find"),"aria-label":kf(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Dd("input",{value:t.replace,placeholder:kf(e,"Replace"),"aria-label":kf(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Dd("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Dd("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Dd("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Dd("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>yf(e)),[kf(e,"next")]),n("prev",(()=>_f(e)),[kf(e,"previous")]),n("select",(()=>bf(e)),[kf(e,"all")]),Dd("label",null,[this.caseField,kf(e,"match case")]),Dd("label",null,[this.reField,kf(e,"regexp")]),Dd("label",null,[this.wordField,kf(e,"by word")]),...e.state.readOnly?[]:[Dd("br"),this.replaceField,n("replace",(()=>vf(e)),[kf(e,"replace")]),n("replaceAll",(()=>Ef(e)),[kf(e,"replace all")])],Dd("button",{name:"close",onclick:()=>Cf(e),"aria-label":kf(e,"close"),type:"button"},["×"])])}commit(){let e=new ef({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cf.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",Yo(Zo(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?_f:yf)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),vf(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(cf)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Jd).top}}function kf(e,t){return e.state.phrase(t)}const Df=/[\s\.,:;?!]/;function Rf(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,s=Math.max(r.from,t-30),o=Math.min(i,n+30),a=e.state.sliceDoc(s,o);if(s!=r.from)for(let e=0;e<30;e++)if(!Df.test(a[e+1])&&Df.test(a[e])){a=a.slice(e);break}if(o!=i)for(let e=a.length-1;e>a.length-30;e--)if(!Df.test(a[e-1])&&Df.test(a[e])){a=a.slice(0,e);break}return Uo.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}const If=Uo.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Lf=[pf,Kt.low(mf),If];class Bf{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=Bc(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),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Uf(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function Mf(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 jf(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,r]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}class Nf{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function Ff(e){return e.selection.main.from}function Uf(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],s="$"!=r[r.length-1];return i||s?new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const Vf=nn.define();const Kf=new WeakMap;function Wf(e){if(!Array.isArray(e))return e;let t=Kf.get(e);return t||Kf.set(e,t=jf(e)),t}const $f=on.define(),qf=on.define();class Qf{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(_=ft(l))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!r||1==b&&m||0==y&&0!=b)&&(t[u]==l||n[u]==l&&(p=!0)?s[u++]=r:s.length&&(g=!1)),y=b,r+=ht(l)}return u==a&&0==s[0]&&g?this.result((p?-200:0)-100,s,e):d==a&&0==f?this.ret(-200-e.length+(h==e.length?0:-100),[0,h]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):d==a?this.ret(-900-e.length,[f,h]):u==a?this.result((p?-200:0)-100-700+(g?0:-1100),s,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?ht(dt(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class zf{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Zf,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Gf(e(n),t(n)),optionClass:(e,t)=>n=>Gf(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Gf(e,t){return e?t?e+" "+t:e:t}function Zf(e,t,n,r,i,s){let o,a,l=e.textDirection==li.RTL,c=l,u=!1,p="top",d=t.left-i.left,f=i.right-t.right,h=r.right-r.left,m=r.bottom-r.top;if(c&&d=m||e>t.top?o=n.bottom-t.top:(p="bottom",o=t.bottom-n.top)}return{style:`${p}: ${o/((t.bottom-t.top)/s.offsetHeight)}px; max-width: ${a/((t.right-t.left)/s.offsetWidth)}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":c?"left":"right")}}function Hf(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 r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class Yf{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:s}=r.open,o=e.state.facet(Xf);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,r){let i=document.createElement("span");i.className="cm-completionLabel";let s=e.displayLabel||e.label,o=0;for(let e=0;eo&&i.appendChild(document.createTextNode(s.slice(o,t)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(t,n))),a.className="cm-completionMatchedText",o=n}return oe.position-t.position)).map((e=>e.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Hf(i.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:r}=e.state.field(t).open;for(let t,i=n.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(t=/-(\d+)$/.exec(i.id))&&+t[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Xf).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:qf.of(null)})})),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:s,disabled:o}=n.open;r.open&&r.open.options==i||(this.range=Hf(i.length,s,e.state.facet(Xf).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),o!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}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.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Hf(t.options.length,t.selected,this.view.state.facet(Xf).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(n);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)})).catch((e=>Ui(this.view.state,e,"completion info"))):this.addInfoPane(i,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}(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(),r=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}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottomn.from||0==n.from))if(i=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+s,c.setAttribute("role","option");let u=this.optionClass(o);u&&(c.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tonew Yf(n,e,t)}function eh(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class th{constructor(e,t,n,r,i,s){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new th(this.options,ih(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i){let s=function(e,t){let n=[],r=null,i=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some((t=>t.name==e))||r.push("string"==typeof t?{name:e}:t)}},s=t.facet(Xf);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)i(new Nf(t,r.source,e?e(t):[],1e9-n.length));else{let n,o=t.sliceDoc(r.from,r.to),a=s.filterStrict?new zf(o):new Qf(o);for(let t of r.result.options)if(n=a.match(t.label)){let s=t.displayLabel?e?e(t,n.matched):[]:n.matched;i(new Nf(t,r.source,s,n.score+(t.boost||0)))}}}if(r){let e=Object.create(null),t=0,i=(e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.namet.score-e.score||l(e.completion,t.completion)))){let t=e.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?o.push(e):eh(e.completion)>eh(a)&&(o[o.length-1]=e),a=e.completion}return o}(e,t);if(!s.length)return r&&e.some((e=>1==e.state))?new th(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let o=t.facet(Xf).selectOnOpen?0:-1;if(r&&r.selected!=o&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:fh,above:i.aboveCursor},r?r.timestamp:Date.now(),o,!1)}map(e){return new th(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class nh{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new nh(sh,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Xf),r=(n.override||t.languageDataAt("autocomplete",Ff(t)).map(Wf)).map((t=>{let r=this.active.find((e=>e.source==t))||new ah(t,this.active.some((e=>0!=e.state))?1:0);return r.update(e,n)}));r.length==this.active.length&&r.every(((e,t)=>e==this.active[t]))&&(r=this.active);let i=this.open;i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n1==e.state))&&(i=null),!i&&r.every((e=>1!=e.state))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new ah(e.source,0):e)));for(let t of e.effects)t.is(uh)&&(i=i&&i.setSelected(t.value,this.id));return r==this.active&&i==this.open?this:new nh(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:rh}}const rh={"aria-autocomplete":"list"};function ih(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const sh=[];function oh(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class ah{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=oh(e),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new ah(r.source,0));for(let t of e.effects)if(t.is($f))r=new ah(r.source,1,t.value?Ff(e.state):-1);else if(t.is(qf))r=new ah(r.source,0);else if(t.is(ch))for(let e of t.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new ah(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(Ff(e.startState))?new ah(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ah(this.source,this.state,e.mapPos(this.explicitPos))}}class lh extends ah{constructor(e,t,n,r,i){super(e,2,t),this.result=n,this.from=r,this.to=i}hasResult(){return!0}handleUserEvent(e,t,n){var r;let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Ff(e.state);if((this.explicitPos<0?a<=s:ao||!i||"delete"==t&&Ff(e.startState)==this.from)return new ah(this.source,"input"==t&&n.activateOnTyping?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):Uf(e,!0).test(i)}(i.validFor,e.state,s,o)?new lh(this.source,l,i,s,o):i.update&&(i=i.update(i,s,o,new Bf(e.state,a,l>=0)))?new lh(this.source,l,i,i.from,null!==(r=i.to)&&void 0!==r?r:Ff(e.state)):new ah(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ah(this.source,0):this.map(e.changes)}map(e){if(e.empty)return this;return(this.result.map?this.result.map(this.result,e):this.result)?new lh(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ah(this.source,0)}}const ch=on.define({map(e,t){return e.map((e=>e.map(t)))}}),uh=on.define(),ph=Mt.define({create(){return nh.start()},update(e,t){return e.update(t)},provide:e=>[Ka.from(e,(e=>e.tooltip)),Uo.contentAttributes.from(e,(e=>e.attrs))]});function dh(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(ph).active.find((e=>e.source==t.source));return r instanceof lh&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,s=n-i.from,o=r-i.from;return Object.assign(Object.assign({},e.changeByRange((a=>a!=i&&n!=r&&e.sliceDoc(a.from+s,a.from+o)!=e.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:t},range:wt.cursor(a.from+s+t.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:Vf.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}const fh=Jf(ph,dh);function hh(e,t="option"){return n=>{let r=n.state.field(ph,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+s*(e?1:-1):e?0:o-1;return a<0?a="page"==t?0:o-1:a>=o&&(a="page"==t?o-1:0),n.dispatch({effects:uh.of(a)}),!0}}class mh{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const gh=$i.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(ph).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(ph);if(!e.selectionSet&&!e.docChanged&&e.startState.field(ph)==t)return;let n=e.transactions.some((e=>(e.selection||e.docChanged)&&!oh(e)));for(let t=0;t50&&Date.now()-r.time>1e3){for(let e of r.context.abortListeners)try{e()}catch(e){Ui(this.view.state,e)}r.context.abortListeners=null,this.running.splice(t--,1)}else r.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is($f)))))&&(this.pendingStart=!0);let r=this.pendingStart?50:e.state.facet(Xf).activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),r):-1,0!=this.composing)for(let t of e.transactions)"input"==oh(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(ph);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=Ff(t),r=new Bf(t,n,e.explicitPos==n),i=new mh(e,r);this.running.push(i),Promise.resolve(e.source(r)).then((e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:qf.of(null)}),Ui(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Xf).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Xf);for(let r=0;re.source==i.active.source));if(s&&1==s.state)if(null==i.done){let e=new ah(i.active.source,0);for(let t of i.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(s)}t.length&&this.view.dispatch({effects:ch.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(ph,!1);if(t&&t.tooltip&&this.view.state.facet(Xf).closeOnBlur){let n=t.open&&Xa(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:qf.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:$f.of(!1)})),20),this.composing=0}}}),yh="object"==typeof navigator&&/Win/.test(navigator.platform),_h=Kt.highest(Uo.domEventHandlers({keydown(e,t){let n=t.state.field(ph,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!yh||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find((e=>e.source==r.source)),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&dh(t,r),!1}})),bh=Uo.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, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&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"}}});class vh{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class Eh{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,gt.TrackDel),n=e.mapPos(this.to,1,gt.TrackDel);return null==t||null==n?null:new Eh(this.field,t,n)}}class xh{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),s=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=s,o=/^\t*/.exec(i)[0].length;for(let t=0;tnew Eh(e.field,r[e.line]+e.from,r[e.line]+e.to)));return{text:n,ranges:o}}static parse(e){let t,n=[],r=[],i=[];for(let s of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let e=t[1]?+t[1]:null,o=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}i.push(new vh(a,r.length,t.index,t.index+o.length)),s=s.slice(0,t.index)+o+s.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(s);){s=s.slice(0,e.index)+e[1]+s.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(s)}return new xh(r,i)}}let Sh=Jr.widget({widget:new class extends Hr{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),Oh=Jr.mark({class:"cm-snippetField"});class Th{constructor(e,t){this.ranges=e,this.active=t,this.deco=Jr.set(e.map((e=>(e.from==e.to?Sh:Oh).range(e.from,e.to))))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new Th(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const wh=on.define({map(e,t){return e&&e.map(t)}}),Ch=on.define(),Ah=Mt.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(wh))return n.value;if(n.is(Ch)&&e)return new Th(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Uo.decorations.from(e,(e=>e?e.deco:Jr.none))});function Ph(e,t){return wt.create(e.filter((e=>e.field==t)).map((e=>wt.range(e.from,e.to))))}function kh(e){let t=xh.parse(e);return(e,n,r,i)=>{let{text:s,ranges:o}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:Xe.of(s)},scrollIntoView:!0,annotations:n?[Vf.of(n),an.userEvent.of("input.complete")]:void 0};if(o.length&&(a.selection=Ph(o,0)),o.some((e=>e.field>0))){let t=new Th(o,0),n=a.effects=[wh.of(t)];void 0===e.state.field(Ah,!1)&&n.push(on.appendConfig.of([Ah,Lh,Mh,bh]))}e.dispatch(e.state.update(a))}}function Dh(e){return({state:t,dispatch:n})=>{let r=t.field(Ah,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,s=e>0&&!r.ranges.some((t=>t.field==i+e));return n(t.update({selection:Ph(r.ranges,i),effects:wh.of(s?null:new Th(r.ranges,i)),scrollIntoView:!0})),!0}}const Rh=[{key:"Tab",run:Dh(1),shift:Dh(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(Ah,!1)&&(t(e.update({effects:wh.of(null)})),!0)}],Ih=Pt.define({combine(e){return e.length?e[0]:Rh}}),Lh=Kt.highest(Xo.compute([Ih],(e=>e.facet(Ih))));function Bh(e,t){return Object.assign(Object.assign({},t),{apply:kh(e)})}const Mh=Uo.domEventHandlers({mousedown(e,t){let n,r=t.state.field(Ah,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find((e=>e.from<=n&&e.to>=n));return!(!i||i.field==r.active)&&(t.dispatch({selection:Ph(r.ranges,i.field),effects:wh.of(r.ranges.some((e=>e.field>i.field))?new Th(r.ranges,i.field):null),scrollIntoView:!0}),!0)}});const jh={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Nh=on.define({map(e,t){let n=t.mapPos(e,-1,gt.TrackAfter);return null==n?void 0:n}}),Fh=new class extends vn{};Fh.startSide=1,Fh.endSide=-1;const Uh=Mt.define({create(){return On.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Nh)&&(e=e.update({add:[Fh.range(n.value,n.value+1)]}));return e}});const Vh="()[]{}<>";function Kh(e){for(let t=0;t{if(($h?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==ht(dt(r,0))||t!=i.from||n!=i.to)return!1;let s=function(e,t){let n=Wh(e,e.selection.main.head),r=n.brackets||jh.brackets;for(let i of r){let s=Kh(dt(i,0));if(t==i)return s==i?Hh(e,i,r.indexOf(i+i+i)>-1,n):Gh(e,i,s,n.before||jh.before);if(t==s&&zh(e,e.selection.main.from))return Zh(e,i,s)}return null}(e.state,r);return!!s&&(e.dispatch(s),!0)})),Qh=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Wh(e,e.selection.main.head).brackets||jh.brackets,r=null,i=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return ht(dt(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&Xh(e.doc,t.head)==Kh(dt(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:wt.cursor(t.head-i.length)}}return{range:r=t}}));return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function zh(e,t){let n=!1;return e.field(Uh).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function Xh(e,t){let n=e.sliceString(t,t+2);return n.slice(0,ht(dt(n,0)))}function Gh(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:Nh.of(s.to+t.length),range:wt.range(s.anchor+t.length,s.head+t.length)};let o=Xh(e.doc,s.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:s.head},effects:Nh.of(s.head+t.length),range:wt.cursor(s.head+t.length)}:{range:i=s}}));return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Zh(e,t,n){let r=null,i=e.changeByRange((t=>t.empty&&Xh(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:wt.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Hh(e,t,n,r){let i=r.stringPrefixes||jh.stringPrefixes,s=null,o=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Nh.of(r.to+t.length),range:wt.range(r.anchor+t.length,r.head+t.length)};let o,a=r.head,l=Xh(e.doc,a);if(l==t){if(Yh(e,a))return{changes:{insert:t+t,from:a},effects:Nh.of(a+t.length),range:wt.cursor(a+t.length)};if(zh(e,a)){let r=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+r.length,insert:r},range:wt.cursor(a+r.length)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(o=Jh(e,a-2*t.length,i))>-1&&Yh(e,o))return{changes:{insert:t+t+t+t,from:a},effects:Nh.of(a+t.length),range:wt.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=hn.Word&&Jh(e,a,i)>-1&&!function(e,t,n,r){let i=Bc(e).resolveInner(t,-1),s=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),a=o.indexOf(n);if(!a||a>-1&&r.indexOf(o.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,a,t,i))return{changes:{insert:t+t,from:a},effects:Nh.of(a+t.length),range:wt.cursor(a+t.length)}}return{range:s=r}}));return s?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Yh(e,t){let n=Bc(e).resolveInner(t+1);return n.parent&&n.from==t}function Jh(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=hn.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))!=hn.Word)return n}return-1}const em=[{key:"Ctrl-Space",run:e=>!!e.state.field(ph,!1)&&(e.dispatch({effects:$f.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(ph,!1);return!(!t||!t.active.some((e=>0!=e.state)))&&(e.dispatch({effects:qf.of(null)}),!0)}},{key:"ArrowDown",run:hh(!0)},{key:"ArrowUp",run:hh(!1)},{key:"PageDown",run:hh(!0,"page")},{key:"PageUp",run:hh(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(ph,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(Xf).defaultKeymap?[em]:[])));class nm{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class rm{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(ym).markerFilter;i&&(r=i(r,n));let s=Jr.set(r.map((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?Jr.widget({widget:new vm(e),diagnostic:e}).range(e.from):Jr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e,inclusive:!0}).range(e.from,e.to))),!0);return new rm(s,t,im(s))}}function im(e,t=null,n=0){let r=null;return e.between(n,1e9,((e,n,{spec:i})=>{if(!t||i.diagnostic==t)return r=new nm(e,n,i.diagnostic),!1})),r}function sm(e,t){let n=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(am)))&&!e.changes.touchesRange(n.from,n.to))}function om(e,t){return e.field(um,!1)?t:t.concat(on.appendConfig.of(Lm))}const am=on.define(),lm=on.define(),cm=on.define(),um=Mt.define({create(){return new rm(Jr.none,null,null)},update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=im(n,e.selected.diagnostic,i)||im(n,null,i)}e=new rm(n,e.panel,r)}for(let n of t.effects)n.is(am)?e=rm.init(n.value,e.panel,t.state):n.is(lm)?e=new rm(e.diagnostics,n.value?xm.open:null,e.selected):n.is(cm)&&(e=new rm(e.diagnostics,e.panel,n.value));return e},provide:e=>[tl.from(e,(e=>e.panel)),Uo.decorations.from(e,(e=>e.diagnostics))]});const pm=Jr.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function dm(e,t,n){let{diagnostics:r}=e.state.field(um),i=[],s=2e8,o=0;r.between(t-(n<0?1:0),t+(n>0?1:0),((e,r,{spec:a})=>{t>=e&&t<=r&&(e==r||(t>e||n>0)&&(tbm(e,t,!1))))}const hm=e=>{let t=e.state.field(um,!1);return!(!t||!t.panel)&&(e.dispatch({effects:lm.of(!1)}),!0)},mm=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(um,!1);t&&t.panel||e.dispatch({effects:om(e.state,[lm.of(!0)])});let n=Ha(e,xm.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(um,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],gm=$i.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(ym);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let e=Date.now();if(ePromise.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:om(e,[am.of(t)])}}(this.view.state,n))}),(e=>{Ui(this.view.state,e)}))}}update(e){let t=e.state.facet(ym);(e.docChanged||t!=e.startState.facet(ym)||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)}}),ym=Pt.define({combine(e){return Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},bn(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}))}});function _m(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function bm(e,t,n){var r;let i=n?_m(t.actions):[];return Dd("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Dd("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map(((n,r)=>{let s=!1,o=r=>{if(r.preventDefault(),s)return;s=!0;let i=im(e.state.field(um).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),Dd("u",a.slice(l,l+1)),a.slice(l+1)];return Dd("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)})),t.source&&Dd("div",{class:"cm-diagnosticSource"},t.source))}class vm extends Hr{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Dd("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Em{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=bm(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class xm{constructor(e){this.view=e,this.items=[];this.list=Dd("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)hm(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],r=_m(n.actions);for(let i=0;i{for(let t=0;thm(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(um).selected;if(!e)return-1;for(let t=0;t{let a,l=-1;for(let e=n;en&&(this.items.splice(n,l-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}));n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&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=im(this.view.state.field(um).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:cm.of(t)})}static open(e){return new xm(e)}}function Sm(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function Om(e){return Sm(``,'width="6" height="3"')}const Tm=Uo.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-diagnostic-hint":{borderLeft:"5px solid #66d"},".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:Om("#d11")},".cm-lintRange-warning":{backgroundImage:Om("orange")},".cm-lintRange-info":{backgroundImage:Om("#999")},".cm-lintRange-hint":{backgroundImage:Om("#66d")},".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-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".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}}});function wm(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}class Cm extends nl{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce(((e,t)=>wm(e)function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:Dm.of({pos:r.from,above:!1,create(){return{dom:fm(e,n),getCoords:()=>t.getBoundingClientRect()}}})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let i=t.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientXi.top-10&&r.clientY{clearTimeout(s),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(s),s=setTimeout(r,i)}}(e,t,n)),t}}function Am(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new Cm(n[e]).range(+e));return On.of(r,!0)}const Pm=ol({class:"cm-gutter-lint",markers:e=>e.state.field(km)}),km=Mt.define({create(){return On.empty},update(e,t){e=e.map(t.changes);let n=t.state.facet(Bm).markerFilter;for(let r of t.effects)if(r.is(am)){let i=r.value;n&&(i=n(i||[],t.state)),e=Am(t.state.doc,i.slice(0))}return e}}),Dm=on.define(),Rm=Mt.define({create(){return null},update(e,t){return e&&t.docChanged&&(e=sm(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce(((e,t)=>t.is(Dm)?t.value:e),e)},provide:e=>Ka.from(e)}),Im=Uo.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Sm('')},".cm-lint-marker-warning":{content:Sm('')},".cm-lint-marker-error":{content:Sm('')}}),Lm=[um,Uo.decorations.compute([um],(e=>{let{selected:t,panel:n}=e.field(um);return t&&n&&t.from!=t.to?Jr.set([pm.range(t.from,t.to)]):Jr.none})),za(dm,{hideOn:sm}),Tm],Bm=Pt.define({combine(e){return bn(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});var Mm=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(Qh)),!1!==e.defaultKeymap&&(n=n.concat(Pd)),!1!==e.searchKeymap&&(n=n.concat(Af)),!1!==e.historyKeymap&&(n=n.concat(Dp)),!1!==e.foldKeymap&&(n=n.concat(vu)),!1!==e.completionKeymap&&(n=n.concat(em)),!1!==e.lintKeymap&&(n=n.concat(mm));var r=[];return!1!==e.lineNumbers&&r.push(function(e={}){return[gl.of(e),ll(),bl]}()),!1!==e.highlightActiveLineGutter&&r.push(xl),!1!==e.highlightSpecialChars&&r.push(function(e={}){return[xa.of(e),Sa||(Sa=$i.fromClass(class{constructor(e){this.view=e,this.decorations=Jr.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(xa)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new ya({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,s=dt(t[0],0);if(9==s){let e=i.lineAt(r),t=n.state.tabSize,s=Mn(e.text,t,r-e.from);return Jr.replace({widget:new Ta((t-s%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Jr.replace({widget:new Oa(e,s)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(xa);e.startState.facet(xa)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&r.push(function(e={}){return[mp,hp.of(e),Uo.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?yp:"historyRedo"==e.inputType?_p:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(e={}){let t=Object.assign(Object.assign({},Cu),e),n=new Au(t,!0),r=new Au(t,!1),i=$i.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet($c)!=e.state.facet($c)||e.startState.field(mu,!1)!=e.state.field(mu,!1)||Bc(e.startState)!=Bc(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new Tn;for(let i of e.viewportLineBlocks){let s=gu(e.state,i.from,i.to)?r:uu(e.state,i.from,i.to)?n:null;s&&t.add(i.from,i.from,s)}return t.finish()}}),{domEventHandlers:s}=t;return[i,ol({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||On.empty},initialSpacer(){return new Au(t,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(e,t,n)=>{if(s.click&&s.click(e,t,n))return!0;let r=gu(e.state,t.from,t.to);if(r)return e.dispatch({effects:fu.of(r)}),!0;let i=uu(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:du.of(i)}),!0)}})}),Su()]}()),!1!==e.drawSelection&&r.push(function(e={}){return[oa.of(e),la,ua,da,Mi.of(!0)]}()),!1!==e.dropCursor&&r.push([ha,ma]),!1!==e.allowMultipleSelections&&r.push(_n.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(_n.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:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let s=n.sliceString(i.from,r);if(!t.some((e=>e.test(s))))return e;let{state:o}=e,a=-1,l=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=Zc(o,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=Gc(o,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&r.push(Lu(ju,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(e={}){return[Uu.of(e),qu]}()),!1!==e.closeBrackets&&r.push([qh,Uh]),!1!==e.autocompletion&&r.push(function(e={}){return[_h,ph,Xf.of(e),gh,tm,bh]}()),!1!==e.rectangularSelection&&r.push(function(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return Uo.mouseSelectionStyle.of(((e,n)=>t(n)?Da(e,n):null))}()),!1!==t&&r.push(function(e={}){let[t,n]=Ra[e.key||"Alt"],r=$i.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,Uo.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?Ia:null}))]}()),!1!==e.highlightActiveLine&&r.push(Ca),!1!==e.highlightSelectionMatches&&r.push(function(e){let t=[Yd,Hd];return e&&t.push(zd.of(e)),t}()),e.tabSize&&"number"==typeof e.tabSize&&r.push(zc.of(" ".repeat(e.tabSize))),r.concat([Xo.of(n.flat())]).filter(Boolean)};const jm="#e5c07b",Nm="#e06c75",Fm="#56b6c2",Um="#ffffff",Vm="#abb2bf",Km="#7d8799",Wm="#61afef",$m="#98c379",qm="#d19a66",Qm="#c678dd",zm="#21252b",Xm="#2c313a",Gm="#282c34",Zm="#353a42",Hm="#3E4451",Ym="#528bff",Jm=[Uo.theme({"&":{color:Vm,backgroundColor:Gm},".cm-content":{caretColor:Ym},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ym},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Hm},".cm-panels":{backgroundColor:zm,color:Vm},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Gm,color:Km,border:"none"},".cm-activeLineGutter":{backgroundColor:Xm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Zm},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Zm,borderBottomColor:Zm},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Xm,color:Vm}}},{dark:!0}),Lu(ku.define([{tag:Cc.keyword,color:Qm},{tag:[Cc.name,Cc.deleted,Cc.character,Cc.propertyName,Cc.macroName],color:Nm},{tag:[Cc.function(Cc.variableName),Cc.labelName],color:Wm},{tag:[Cc.color,Cc.constant(Cc.name),Cc.standard(Cc.name)],color:qm},{tag:[Cc.definition(Cc.name),Cc.separator],color:Vm},{tag:[Cc.typeName,Cc.className,Cc.number,Cc.changed,Cc.annotation,Cc.modifier,Cc.self,Cc.namespace],color:jm},{tag:[Cc.operator,Cc.operatorKeyword,Cc.url,Cc.escape,Cc.regexp,Cc.link,Cc.special(Cc.string)],color:Fm},{tag:[Cc.meta,Cc.comment],color:Km},{tag:Cc.strong,fontWeight:"bold"},{tag:Cc.emphasis,fontStyle:"italic"},{tag:Cc.strikethrough,textDecoration:"line-through"},{tag:Cc.link,color:Km,textDecoration:"underline"},{tag:Cc.heading,fontWeight:"bold",color:Nm},{tag:[Cc.atom,Cc.bool,Cc.special(Cc.variableName)],color:qm},{tag:[Cc.processingInstruction,Cc.string,Cc.inserted],color:$m},{tag:Cc.invalid,color:Um}]))];var eg=Uo.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),tg=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:s="",basicSetup:o=!0}=e,a=[];switch(t&&a.unshift(Xo.of([kd])),o&&("boolean"==typeof o?a.unshift(Mm()):a.unshift(Mm(o))),s&&a.unshift(function(e){return $i.fromClass(class{constructor(t){this.view=t,this.placeholder=e?Jr.set([Jr.widget({widget:new Aa(e),side:1}).range(0)]):Jr.none}get decorations(){return this.view.state.doc.length?Jr.none:this.placeholder}},{decorations:e=>e.decorations})}(s)),i){case"light":a.push(eg);break;case"dark":a.push(Jm);break;case"none":break;default:a.push(i)}return!1===n&&a.push(Uo.editable.of(!1)),r&&a.push(_n.readOnly.of(!0)),[...a]},ng=nn.define(),rg=[];var ig=n(86074),sg=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],og=(0,r.forwardRef)(((e,t)=>{var{className:n,value:i="",selection:s,extensions:o=[],onChange:a,onStatistics:l,onCreateEditor:c,onUpdate:u,autoFocus:p,theme:d="light",height:f,minHeight:h,maxHeight:m,width:g,minWidth:y,maxWidth:_,basicSetup:b,placeholder:v,indentWithTab:E,editable:x,readOnly:S,root:O,initialState:T}=e,w=(0,ze.Z)(e,sg),C=(0,r.useRef)(null),{state:A,view:P,container:k}=function(e){var{value:t,selection:n,onChange:i,onStatistics:s,onCreateEditor:o,onUpdate:a,extensions:l=rg,autoFocus:c,theme:u="light",height:p=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:m=null,maxWidth:g=null,placeholder:y="",editable:_=!0,readOnly:b=!1,indentWithTab:v=!0,basicSetup:E=!0,root:x,initialState:S}=e,[O,T]=(0,r.useState)(),[w,C]=(0,r.useState)(),[A,P]=(0,r.useState)(),k=Uo.theme({"&":{height:p,minHeight:d,maxHeight:f,width:h,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),D=Uo.updateListener.of((e=>{if(e.docChanged&&"function"==typeof i&&!e.transactions.some((e=>e.annotation(ng)))){var t=e.state.doc.toString();i(t,e)}s&&s((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),R=[D,k,...tg({theme:u,editable:_,readOnly:b,placeholder:y,indentWithTab:v,basicSetup:E})];return a&&"function"==typeof a&&R.push(Uo.updateListener.of(a)),R=R.concat(l),(0,r.useEffect)((()=>{if(O&&!A){var e={doc:t,selection:n,extensions:R},r=S?_n.fromJSON(S.json,e,S.fields):_n.create(e);if(P(r),!w){var i=new Uo({state:r,parent:O,root:x});C(i),o&&o(i,r)}}return()=>{w&&(P(void 0),C(void 0))}}),[O,A]),(0,r.useEffect)((()=>T(e.container)),[e.container]),(0,r.useEffect)((()=>()=>{w&&(w.destroy(),C(void 0))}),[w]),(0,r.useEffect)((()=>{c&&w&&w.focus()}),[c,w]),(0,r.useEffect)((()=>{w&&w.dispatch({effects:on.reconfigure.of(R)})}),[u,l,p,d,f,h,m,g,y,_,b,v,E,i,a]),(0,r.useEffect)((()=>{if(void 0!==t){var e=w?w.state.doc.toString():"";w&&t!==e&&w.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[ng.of(!0)]})}}),[t,w]),{state:A,setState:P,view:w,setView:C,container:O,setContainer:T}}({container:C.current,root:O,value:i,autoFocus:p,theme:d,height:f,minHeight:h,maxHeight:m,width:g,minWidth:y,maxWidth:_,basicSetup:b,placeholder:v,indentWithTab:E,editable:x,readOnly:S,selection:s,onChange:a,onStatistics:l,onCreateEditor:c,onUpdate:u,extensions:o,initialState:T});if((0,r.useImperativeHandle)(t,(()=>({editor:C.current,state:A,view:P})),[C,k,A,P]),"string"!=typeof i)throw new Error("value must be typeof string but got "+typeof i);var D="string"==typeof d?"cm-theme-"+d:"cm-theme";return(0,ig.jsx)("div",(0,Qe.Z)({ref:C,className:D+(n?" "+n:"")},w))}));og.displayName="CodeMirror";var ag=og,lg=n(34155);class cg{constructor(e,t,n,r,i,s,o,a,l,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=s,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new cg(e,[],t,n,n,0,[],0,r?new ug(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,s=i.dynamicPrecedence(r);if(s&&(this.score+=s),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(r,a)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let i=e,{parser:s}=this.p;(r>this.pos||t<=s.maxNode)&&(this.pos=r,s.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,n),this.shiftContext(t,n),t<=s.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new cg(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new pg(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,i=0;i1&t&&e==r))||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ug{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class pg{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class dg{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new dg(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new dg(this.stack,this.pos,this.index)}}function fg(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),s+=i,n)break;s*=46}n?n[i++]=s:n=new t(s)}return n}class hg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const mg=new hg;class gg{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=mg,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=mg,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class yg{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;vg(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}yg.prototype.contextual=yg.prototype.fallback=yg.prototype.extend=!1;class _g{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?fg(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(vg(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(n||r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}_g.prototype.contextual=yg.prototype.fallback=yg.prototype.extend=!1;class bg{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function vg(e,t,n,r,i,s){let o=0,a=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||xg(n,t.token.value,i,s))){t.acceptToken(n);break}}let r=t.next,c=0,u=e[o+2];if(!(t.next<0&&u>c&&65535==e[n+3*u-3])){for(;c>1,s=n+i+(i<<1),a=e[s],l=e[s+1]||65536;if(r=l)){o=e[s+2],t.advance();continue e}c=i+1}}break}o=e[n+3*u-1]}}function Eg(e,t,n){for(let r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function xg(e,t,n,r){let i=Eg(n,r,t);return i<0||Eg(n,r,e)t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class wg{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Tg(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Tg(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(i instanceof Ll){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+i.length}}}class Cg{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new hg))}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,s=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let r=0;rc.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||(n=new hg,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new hg,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(i>>1)){0==(1&i)?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new wg(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sr)i.push(o);else{if(this.advanceStack(o,i,n))continue;{e||(e=[],t=[]),e.push(o);let n=this.tokens.getMainToken(o);t.push(n.value,n.end)}}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return Sg&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort(((e,t)=>t.score-e.score));i.length>e;)i.pop();i.some((e=>e.reducePos>r))&&this.recovering--}else if(i.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){i.splice(e--,1);continue e}i.splice(n--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(wl.contextHash)||0)==n))return e.useNode(o,r),Sg&&console.log(s+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof Ll)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof Ll&&0==o.positions[0]))break;o=a}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),Sg&&console.log(s+this.stackID(e)+` (via always-reduce ${i.getName(65535&o)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let o=0;or?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Pg(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let s=0;s ":"";if(o.deadEnd){if(i)continue;if(i=!0,o.restart(),Sg&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))continue}let u=o.split(),p=c;for(let e=0;u.forceReduce()&&e<10;e++){if(Sg&&console.log(p+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;Sg&&(p=this.stackID(u)+" -> ")}for(let e of o.recoverByInsert(a))Sg&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),Sg&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),Pg(o,n)):(!r||r.scoree;class Rg extends ec{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1])),r=[];for(let e=0;e=0)i(r,e,t[n++]);else{let s=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,s);n++}}}this.nodeSet=new kl(t.map(((t,i)=>Pl.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Sl;let s=fg(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new yg(s,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Ag(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],s=1&t,o=r[i++];if(s&&n)return o;for(let n=i+(t>>1);i0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=Ig(this.data,n+2)}r=t(Ig(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=Ig(this.data,n+2)}if(0==(1&this.data[n+2])){let e=this.data[n+1];t.some(((t,n)=>1&n&&t==e))||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(Rg.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let n=e.tokenizers.find((e=>e.from==t));return n?n.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((n,r)=>{let i=e.specializers.find((e=>e.from==n.external));if(!i)return n;let s=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=Lg(s),s}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map((()=>!1));if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee.external(n,r)<<1|t}return e.get}const Bg=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Mg=new class{constructor(e){this.start=e.start,this.shift=e.shift||Dg,this.reduce=e.reduce||Dg,this.reuse=e.reuse||Dg,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}({start:!1,shift(e,t){return 4==t||5==t||312==t?e:313==t},strict:!1}),jg=new bg(((e,t)=>{let{next:n}=e;(125==n||-1==n||t.context)&&e.acceptToken(310)}),{contextual:!0,fallback:!0}),Ng=new bg(((e,t)=>{let n,{next:r}=e;Bg.indexOf(r)>-1||(47!=r||47!=(n=e.peek(1))&&42!=n)&&(125==r||59==r||-1==r||t.context||e.acceptToken(309))}),{contextual:!0}),Fg=new bg(((e,t)=>{let{next:n}=e;if((43==n||45==n)&&(e.advance(),n==e.next)){e.advance();let n=!t.context&&t.canShift(1);e.acceptToken(n?1:2)}}),{contextual:!0});function Ug(e,t){return e>=65&&e<=90||e>=97&&e<=122||95==e||e>=192||!t&&e>=48&&e<=57}const Vg=new bg(((e,t)=>{if(60!=e.next||!t.dialectEnabled(0))return;if(e.advance(),47==e.next)return;let n=0;for(;Bg.indexOf(e.next)>-1;)e.advance(),n++;if(Ug(e.next,!0)){for(e.advance(),n++;Ug(e.next,!1);)e.advance(),n++;for(;Bg.indexOf(e.next)>-1;)e.advance(),n++;if(44==e.next)return;for(let t=0;;t++){if(7==t){if(!Ug(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),n++}}e.acceptToken(3,-n)})),Kg=oc({"get set async static":Cc.modifier,"for while do if else switch try catch finally return throw break continue default case":Cc.controlKeyword,"in of await yield void typeof delete instanceof":Cc.operatorKeyword,"let var const using function class extends":Cc.definitionKeyword,"import export from":Cc.moduleKeyword,"with debugger as new":Cc.keyword,TemplateString:Cc.special(Cc.string),super:Cc.atom,BooleanLiteral:Cc.bool,this:Cc.self,null:Cc.null,Star:Cc.modifier,VariableName:Cc.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Cc.function(Cc.variableName),VariableDefinition:Cc.definition(Cc.variableName),Label:Cc.labelName,PropertyName:Cc.propertyName,PrivatePropertyName:Cc.special(Cc.propertyName),"CallExpression/MemberExpression/PropertyName":Cc.function(Cc.propertyName),"FunctionDeclaration/VariableDefinition":Cc.function(Cc.definition(Cc.variableName)),"ClassDeclaration/VariableDefinition":Cc.definition(Cc.className),PropertyDefinition:Cc.definition(Cc.propertyName),PrivatePropertyDefinition:Cc.definition(Cc.special(Cc.propertyName)),UpdateOp:Cc.updateOperator,"LineComment Hashbang":Cc.lineComment,BlockComment:Cc.blockComment,Number:Cc.number,String:Cc.string,Escape:Cc.escape,ArithOp:Cc.arithmeticOperator,LogicOp:Cc.logicOperator,BitOp:Cc.bitwiseOperator,CompareOp:Cc.compareOperator,RegExp:Cc.regexp,Equals:Cc.definitionOperator,Arrow:Cc.function(Cc.punctuation),": Spread":Cc.punctuation,"( )":Cc.paren,"[ ]":Cc.squareBracket,"{ }":Cc.brace,"InterpolationStart InterpolationEnd":Cc.special(Cc.brace),".":Cc.derefOperator,", ;":Cc.separator,"@":Cc.meta,TypeName:Cc.typeName,TypeDefinition:Cc.definition(Cc.typeName),"type enum interface implements namespace module declare":Cc.definitionKeyword,"abstract global Privacy readonly override":Cc.modifier,"is keyof unique infer":Cc.operatorKeyword,JSXAttributeValue:Cc.attributeValue,JSXText:Cc.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Cc.angleBracket,"JSXIdentifier JSXNameSpacedName":Cc.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Cc.attributeName,"JSXBuiltin/JSXIdentifier":Cc.standard(Cc.tagName)}),Wg={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:152,yield:161,await:165,class:170,public:227,private:227,protected:227,readonly:229,instanceof:248,satisfies:251,in:252,const:254,import:286,keyof:339,unique:343,infer:349,is:385,abstract:405,implements:407,type:409,let:412,var:414,using:417,interface:423,enum:427,namespace:433,module:435,declare:439,global:443,for:462,of:471,while:474,with:478,do:482,if:486,else:488,switch:492,case:498,try:504,catch:508,finally:512,return:516,throw:520,break:524,continue:528,debugger:532},$g={__proto__:null,async:123,get:125,set:127,declare:187,public:189,private:189,protected:189,static:191,abstract:193,override:195,readonly:201,accessor:203,new:389},qg={__proto__:null,"<":143},Qg=Rg.deserialize({version:14,states:"$=WO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ08SO'#ChO+RO!bO'#CiO+aO#tO'#CiO+oO?MpO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DyO0fQ^O'#EROOQ07b'#EZ'#EZO1PQWO'#EWOOQO'#El'#ElOOQO'#Ie'#IeO1XQWO'#GmO1dQWO'#EkO1iQWO'#EkO3kQ08SO'#JiO6[Q08SO'#JjO6xQWO'#FZO6}Q&jO'#FqOOQ07b'#Fc'#FcO7YO,YO'#FcO7hQ7[O'#FxO9UQWO'#FwOOQ07b'#Jj'#JjOOQ07`'#Ji'#JiO9ZQWO'#GqOOQU'#KV'#KVO9fQWO'#IRO9kQ07hO'#ISOOQU'#JW'#JWOOQU'#IW'#IWQ`Q^OOO`Q^OOO%[Q^O'#DqO9sQ^O'#D}O9zQ^O'#EPO9aQWO'#GmO:RQ7[O'#CnO:aQWO'#EjO:lQWO'#EuO:qQ7[O'#FbO;`QWO'#GmOOQO'#KW'#KWO;eQWO'#KWO;sQWO'#GuO;sQWO'#GvO;sQWO'#GxO9aQWO'#G{ORQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOOQO'#Ib'#IbOBhQ`O'#EcOOQ07`'#Eb'#EbOOQ07`'#Jt'#JtOCdQ07pO'#EcOCnQ`O'#EVOOQO'#Jp'#JpODSQ`O'#JqOEaQ`O'#EVOCnQ`O'#EcPEnO!0LbO'#CaPOOO)CDu)CDuOOOO'#IX'#IXOEyO!bO,59TOOQ07b,59T,59TOOOO'#IY'#IYOFXO#tO,59TO%[Q^O'#D`OOOO'#I['#I[OFgO?MpO,59xOOQ07b,59x,59xOFuQ^O'#I]OGYQWO'#JkOI[QrO'#JkO+}Q^O'#JkOIcQWO,5:OOIyQWO'#ElOJWQWO'#JzOJcQWO'#JyOJcQWO'#JyOJkQWO,5;YOJpQWO'#JxOOQ07f,5:Z,5:ZOJwQ^O,5:ZOLxQ08SO,5:eOMiQWO,5:mONSQ07hO'#JwONZQWO'#JvO9ZQWO'#JvONoQWO'#JvONwQWO,5;XON|QWO'#JvO!#UQrO'#JjOOQ07b'#Ch'#ChO%[Q^O'#ERO!#tQpO,5:rOOQO'#Jr'#JrOOQO-EmOOQU'#J`'#J`OOQU,5>n,5>nOOQU-E_Q08SO,5:iO%[Q^O,5:iO!@xQ08SO,5:kOOQO,5@r,5@rO!AiQ7[O,5=XO!AwQ07hO'#JaO9UQWO'#JaO!BYQ07hO,59YO!BeQ`O,59YO!BmQ7[O,59YO:RQ7[O,59YO!BxQWO,5;VO!CQQWO'#HZO!CfQWO'#K[O%[Q^O,5;zO!9cQ`O,5;|O!CnQWO,5=tO!CsQWO,5=tO!CxQWO,5=tO9kQ07hO,5=tO;sQWO,5=dOOQO'#Cu'#CuO!DWQ`O,5=aO!D`Q7[O,5=bO!DkQWO,5=dO!DpQpO,5=gO!DxQWO'#KWO>pQWO'#HQO9aQWO'#HSO!D}QWO'#HSO:RQ7[O'#HUO!ESQWO'#HUOOQU,5=j,5=jO!EXQWO'#HVO!EjQWO'#CnO!EoQWO,59OO!EyQWO,59OO!HOQ^O,59OOOQU,59O,59OO!H`Q07hO,59OO%[Q^O,59OO!JkQ^O'#H^OOQU'#H_'#H_OOQU'#H`'#H`O`Q^O,5=vO!KRQWO,5=vO`Q^O,5=|O`Q^O,5>OO!KWQWO,5>QO`Q^O,5>SO!K]QWO,5>VO!KbQ^O,5>]OOQU,5>c,5>cO%[Q^O,5>cO9kQ07hO,5>eOOQU,5>g,5>gO# lQWO,5>gOOQU,5>i,5>iO# lQWO,5>iOOQU,5>k,5>kO#!YQ`O'#D[O%[Q^O'#JmO#!dQ`O'#JmO##RQ`O'#DjO##dQ`O'#DjO#%uQ^O'#DjO#%|QWO'#JlO#&UQWO,5:TO#&ZQWO'#EpO#&iQWO'#J{O#&qQWO,5;ZO#&vQ`O'#DjO#'TQ`O'#EUOOQ07b,5:n,5:nO%[Q^O,5:nO#'[QWO,5:nO>pQWO,5;UO!BeQ`O,5;UO!BmQ7[O,5;UO:RQ7[O,5;UO#'dQWO,5@XO#'iQ$ISO,5:rOOQO-E<`-E<`O#(oQ07pO,5:}OCnQ`O,5:qO#(yQ`O,5:qOCnQ`O,5:}O!BYQ07hO,5:qOOQ07`'#Ef'#EfOOQO,5:},5:}O%[Q^O,5:}O#)WQ07hO,5:}O#)cQ07hO,5:}O!BeQ`O,5:qOOQO,5;T,5;TO#)qQ07hO,5:}POOO'#IV'#IVP#*VO!0LbO,58{POOO,58{,58{OOOO-EwO+}Q^O,5>wOOQO,5>},5>}O#*qQ^O'#I]OOQO-EkQWO1G3lO$5qQ^O1G3nO$9uQ^O'#HmOOQU1G3q1G3qO$:SQWO'#HsO>pQWO'#HuOOQU1G3w1G3wO$:[Q^O1G3wO9kQ07hO1G3}OOQU1G4P1G4POOQ07`'#GY'#GYO9kQ07hO1G4RO9kQ07hO1G4TO$>cQWO,5@XO!*fQ^O,5;[O9ZQWO,5;[O>pQWO,5:UO!*fQ^O,5:UO!BeQ`O,5:UO$>hQ(CYO,5:UOOQO,5;[,5;[O$>rQ`O'#I^O$?YQWO,5@WOOQ07b1G/o1G/oO$?bQ`O'#IdO$?lQWO,5@gOOQ07`1G0u1G0uO##dQ`O,5:UOOQO'#Ia'#IaO$?tQ`O,5:pOOQ07f,5:p,5:pO#'_QWO1G0YOOQ07b1G0Y1G0YO%[Q^O1G0YOOQ07b1G0p1G0pO>pQWO1G0pO!BeQ`O1G0pO!BmQ7[O1G0pOOQ07`1G5s1G5sO!BYQ07hO1G0]OOQO1G0i1G0iO%[Q^O1G0iO$?{Q07hO1G0iO$@WQ07hO1G0iO!BeQ`O1G0]OCnQ`O1G0]O$@fQ07hO1G0iOOQO1G0]1G0]O$@zQ08SO1G0iPOOO-EwO$AhQWO1G5qO$ApQWO1G6PO$AxQrO1G6QO9ZQWO,5>}O$BSQ08SO1G5}O%[Q^O1G5}O$BdQ07hO1G5}O$BuQWO1G5|O$BuQWO1G5|O9ZQWO1G5|O$B}QWO,5?QO9ZQWO,5?QOOQO,5?Q,5?QO$CcQWO,5?QO$*hQWO,5?QOOQO-EXOOQU,5>X,5>XO%[Q^O'#HnO%;mQWO'#HpOOQU,5>_,5>_O9ZQWO,5>_OOQU,5>a,5>aOOQU7+)c7+)cOOQU7+)i7+)iOOQU7+)m7+)mOOQU7+)o7+)oO%;rQ`O1G5sO%pQWO1G/pO!*fQ^O'#DjOOQO,5>x,5>xOOQO-E<[-E<[OOQO,5?O,5?OOOQO-EpQWO7+&[O!BeQ`O7+&[OOQO7+%w7+%wO$@zQ08SO7+&TOOQO7+&T7+&TO%[Q^O7+&TO%YQWO<bQWO<mQ08SO,5?YO%@xQ08SO,5?[O%CTQ08SO1G2ZO%EfQ08SO1G2mO%GqQ08SO1G2oO%I|Q7[O,5>yOOQO-E<]-E<]O%JWQrO,5>zO%[Q^O,5>zOOQO-E<^-E<^O%JbQWO1G5uOOQ07b<YOOQU,5>[,5>[O&pQWO7+%[OOQ07b<pQWO<pQWO7+)eO'*rQWO<}AN>}O%[Q^OAN?ZOOQO<T#>Z#>a#>o#?U#@s#AR#AY#Bn#B|#Dh#Dv#D|#ES#EY#Ed#Ej#Ep#Ez#F^#FdPPPPPPPPPP#FjPPPPPPP#G_#Jf#Ku#K|#LUPPPP$#[$&S$,l$,o$,r$-_$-b$-e$-l$-tP$-zP$.h$.l$/d$0r$0w$1_PP$1d$1j$1nP$1q$1u$1y$2o$3W$3o$3s$3v$3y$4P$4S$4W$4[R!|RoqOXst!Z#d%k&n&p&q&s,k,p1}2QY!vQ'[-]1b5dQ%qvQ%yyQ&Q|Q&f!VS'S!e-TQ'b!iS'h!r!yU*f$}*W*kQ+i%zQ+v&SQ,[&`Q-Z'ZQ-e'cQ-m'iQ0S*mQ1l,]R;`:m%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#y#|$P$Q$R$S$T$U$V$W$X$Y$Z$b$f%k%q&O&g&j&n&p&q&s&w'P'^'n(O(Q(W(_(s(w({)z+R+V,h,k,p-a-i-w-}.o.v/g0b0g0w1e1u1v1x1z1}2Q2S2s2y3a5a5k5{5|6P6d7}8S8c8mS#q]:j!r)]$]$n'T)o,|-P/O2c3v5_6Z9^9o:i:l:m:p:q:r:s:t:u:v:w:x:y:z:{:|:};R;`;b;c;e;m;n;w;x < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:372,context:Mg,nodeProps:[["isolate",-8,4,5,13,33,35,48,50,52,""],["group",-26,8,16,18,65,201,205,209,210,212,215,218,228,230,236,238,240,242,245,251,257,259,261,263,265,267,268,"Statement",-32,12,13,28,31,32,38,48,51,52,54,59,67,75,79,81,83,84,106,107,116,117,134,137,139,140,141,142,144,145,164,165,167,"Expression",-23,27,29,33,37,39,41,168,170,172,173,175,176,177,179,180,181,183,184,185,195,197,199,200,"Type",-3,87,99,105,"ClassItem"],["openedBy",22,"<",34,"InterpolationStart",53,"[",57,"{",72,"(",157,"JSXStartCloseTag"],["closedBy",23,">",36,"InterpolationEnd",47,"]",58,"}",73,")",162,"JSXEndTag"]],propSources:[Kg],skippedNodes:[0,4,5,271],repeatNodeCount:37,tokenData:"$HR(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$.S!c!}Er!}#O$/^#O#P$0h#P#Q$6P#Q#R$7Z#R#SEr#S#T$8h#T#o$9r#o#p$>S#p#q$>x#q#r$@Y#r#s$Af#s$f%Z$f$g+g$g#BYEr#BY#BZ$Bp#BZ$ISEr$IS$I_$Bp$I_$I|Er$I|$I}$E{$I}$JO$E{$JO$JTEr$JT$JU$Bp$JU$KVEr$KV$KW$Bp$KW&FUEr&FU&FV$Bp&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$Bp?HUOEr(n%d_$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(OpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$f&j(Op(R!b't(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST(P#S$f&j'u(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$f&j(Op(R!b'u(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$f&j!o$Ip(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#t$Id$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/|3l_'}$(n$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$f&j(R!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$f&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$a`$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$a``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$a`$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(R!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$a`(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k#%|:hh$f&j(Op(R!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXVS$f&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSVSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWVS(R!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]VS$f&j(OpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWVS(OpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYVS(Op(R!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%lQ^$f&j!USOY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y&n!?Td$f&j!USO!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&cS!@hX!USOY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@cS!AYW!US#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!ATS!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!ArS!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!ArS!BnP;=`<%l!ArS!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@cS!CTP;=`<%l!@c&n!C][$f&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW&n!DWX$f&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW&n!DvP;=`<%l!CW&n!EOX$f&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y&n!EnP;=`<%l!=y(Q!Ezl$f&j(R!b!USOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GyZ(R!b!USOY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr!f!Hse(R!b!USOY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}!f!JZX(R!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU!f!JyP;=`<%l!JU!f!KPP;=`<%l!Gr(Q!KZ^$f&j(R!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>j_$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?rd$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#A]f$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#Bzc$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#Dbe$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#E|g$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#Gpi$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#Il_!d$b$f&j#|%PP;=`<%l$9r!5p$>]X![!3l(Op(R!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g&CO$?Ta(p&;`$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$,u#q;'S%Z;'S;=`+a<%lO%Z%#`$@g_!Z$I`r`$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(r$Aq_!pS$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS$CR|$f&j(Op(R!b't(;d$Y#t'{&;d([!LYOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$Bp#BZ$ISEr$IS$I_$Bp$I_$JTEr$JT$JU$Bp$JU$KVEr$KV$KW$Bp$KW&FUEr&FU&FV$Bp&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$Bp?HUOEr(CS$F^k$f&j(Op(R!b'u(;d$Y#t'{&;d([!LYOY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Ng,Fg,Vg,2,3,4,5,6,7,8,9,10,11,12,13,jg,new _g("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOt~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(Z~~",141,332),new _g("j~RQYZXz{^~^O'x~~aP!P!Qd~iO'y~~",25,315)],topRules:{Script:[0,6],SingleExpression:[1,269],SingleClassItem:[2,270]},dialects:{jsx:0,ts:14826},dynamicPrecedences:{69:1,79:1,81:1,165:1,193:1},specialized:[{term:319,get:e=>Wg[e]||-1},{term:334,get:e=>$g[e]||-1},{term:70,get:e=>qg[e]||-1}],tokenPrec:14850}),zg=[Bh("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Bh("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Bh("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Bh("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Bh("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Bh("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),Bh("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Bh("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),Bh("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Bh('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Bh('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Xg=zg.concat([Bh("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Bh("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Bh("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Gg=new Yl,Zg=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Hg(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}const Yg=["FunctionDeclaration"],Jg={FunctionDeclaration:Hg("function"),ClassDeclaration:Hg("class"),ClassExpression:()=>!0,EnumDeclaration:Hg("constant"),TypeAliasDeclaration:Hg("type"),NamespaceDeclaration:Hg("namespace"),VariableDefinition(e,t){e.matchContext(Yg)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function ey(e,t){let n=Gg.get(t);if(n)return n;let r=[],i=!0;function s(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Il.IncludeAnonymous).iterate((t=>{if(i)i=!1;else if(t.name){let e=Jg[t.name];if(e&&e(t,s)||Zg.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of ey(e,t.node))r.push(n);return!1}})),Gg.set(t,r),r}const ty=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ny=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function ry(e){let t=Bc(e.state).resolveInner(e.pos,-1);if(ny.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&ty.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)Zg.has(n.name)&&(r=r.concat(ey(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:ty}}const iy=Lc.define({name:"javascript",parser:Qg.configure({props:[Yc.add({IfStatement:ou({except:/^\s*({|else\b)/}),TryStatement:ou({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:iu({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":ou({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),lu.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.to/^JSX/.test(e.name),facet:kc({commentTokens:{block:{open:"{/*",close:"*/}"}}})},oy=iy.configure({dialect:"ts"},"typescript"),ay=iy.configure({dialect:"jsx",props:[Dc.add((e=>e.isTop?[sy]:void 0))]}),ly=iy.configure({dialect:"jsx ts",props:[Dc.add((e=>e.isTop?[sy]:void 0))]},"typescript");let cy=e=>({label:e,type:"keyword"});const uy="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(cy),py=uy.concat(["declare","implements","private","protected","public"].map(cy));function dy(e={}){let t=e.jsx?e.typescript?ly:ay:e.typescript?oy:iy,n=e.typescript?Xg.concat(py):zg.concat(uy);return new qc(t,[iy.data.of({autocomplete:(r=ny,i=jf(n),e=>{for(let t=Bc(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(r.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return i(e)})}),iy.data.of({autocomplete:ry}),e.jsx?my:[]]);var r,i}function fy(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}const hy="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),my=Uo.inputHandler.of(((e,t,n,r,i)=>{if((hy?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!iy.isActiveAt(e.state,t,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange((e=>{var t;let n,{head:i}=e,s=Bc(o).resolveInner(i-1,-1);if("JSXStartTag"==s.name&&(s=s.parent),o.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==s.name&&s.to>i);else{if(">"==r&&"JSXFragmentTag"==s.name)return{range:e,changes:{from:i,insert:""}};if("/"==r&&"JSXStartCloseTag"==s.name){let e=s.parent,r=e.parent;if(r&&e.from==i-2&&((n=fy(o.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(t=r.firstChild)||void 0===t?void 0:t.name))){let e=`${n}>`;return{range:wt.cursor(i+e.length,-1),changes:{from:i,insert:e}}}}else if(">"==r){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(s);if(t&&"JSXOpenTag"==t.name&&!/^\/?>|^<\//.test(o.doc.sliceString(i,i+2))&&(n=fy(o.doc,t,i)))return{range:e,changes:{from:i,insert:``}}}}return{range:e}}));return!a.changes.empty&&(e.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function gy(e,t,n,r){return n.line(e+r.line).from+t+(1==e?r.col-1:-1)}function yy(e,t,n){let r=gy(e.line,e.column,t,n),i={from:r,to:null!=e.endLine&&1!=e.endColumn?gy(e.endLine,e.endColumn,t,n):r,message:e.message,source:e.ruleId?"eslint:"+e.ruleId:"eslint",severity:1==e.severity?"warning":"error"};if(e.fix){let{range:t,text:s}=e.fix,o=t[0]+n.pos-r,a=t[1]+n.pos-r;i.actions=[{name:"fix",apply(e,t){e.dispatch({changes:{from:t+o,to:t+a,insert:s},scrollIntoView:!0})}}]}return i}var _y=n(48764).lW,by=n(34155);if(!vy)var vy=globalThis||window;var Ey,xy={exports:{}};function Sy(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var Oy=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Ty=function(e){return Oy.exec(e).slice(1)};function wy(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return e=Sy(ky(e.split("/"),(function(e){return!!e})),!t).join("/"),(t?"/":"")+e||"."}function Cy(e){var t=Ay(e),n="/"===Dy(e,-1);return e=Sy(ky(e.split("/"),(function(e){return!!e})),!t).join("/"),e||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function Ay(e){return"/"===e.charAt(0)}var Py={extname:function(e){return Ty(e)[3]},basename:function(e,t){var n=Ty(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},dirname:function(e){var t=Ty(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},sep:"/",delimiter:":",relative:function(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=wy(e).substr(1),t=wy(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),s=Math.min(r.length,i.length),o=s,a=0;a>18&63]+Iy[i>>12&63]+Iy[i>>6&63]+Iy[63&i]);return s.join("")}function Fy(e){var t;My||jy();for(var n=e.length,r=n%3,i="",s=[],o=16383,a=0,l=n-r;al?l:a+o));return 1===r?(t=e[n-1],i+=Iy[t>>2],i+=Iy[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=Iy[t>>10],i+=Iy[t>>4&63],i+=Iy[t<<2&63],i+="="),s.push(i),s.join("")}function Uy(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<>1,u=-7,p=n?i-1:0,d=n?-1:1,f=e[t+p];for(p+=d,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=256*s+e[t+p],p+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)}function Vy(e,t,n,r,i,s){var o,a,l,c=8*s-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+p>=1?d/l:d*Math.pow(2,1-p))*l>=2&&(o++,l/=2),o+p>=u?(a=0,o=u):o+p>=1?(a=(t*l-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=h,a/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=h,o/=256,c-=8);e[n+f-h]|=128*m}var Ky={}.toString,Wy=Array.isArray||function(e){return"[object Array]"==Ky.call(e)};function $y(){return Qy.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function qy(e,t){if($y()=$y())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$y().toString(16)+" bytes");return 0|e}function Yy(e){return!(null==e||!e._isBuffer)}function Jy(e,t){if(Yy(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return w_(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return C_(e).length;default:if(r)return w_(e).length;t=(""+t).toLowerCase(),r=!0}}function e_(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return m_(this,t,n);case"utf8":case"utf-8":return p_(this,t,n);case"ascii":return f_(this,t,n);case"latin1":case"binary":return h_(this,t,n);case"base64":return u_(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g_(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function t_(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n_(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=Qy.from(t,r)),Yy(t))return 0===t.length?-1:r_(e,t,n,r,i);if("number"==typeof t)return t&=255,Qy.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):r_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function r_(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=n;sa&&(n=a-l),s=n;s>=0;s--){for(var p=!0,d=0;di&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function u_(e,t,n){return 0===t&&n===e.length?Fy(e):Fy(e.slice(t,n))}function p_(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(u=c);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=p}return function(e){var t=e.length;if(t<=d_)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Qy.prototype.compare=function(e,t,n,r,i){if(!Yy(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),a=Math.min(s,o),l=this.slice(r,i),c=e.slice(t,n),u=0;ui)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return i_(this,e,t,n);case"utf8":case"utf-8":return s_(this,e,t,n);case"ascii":return o_(this,e,t,n);case"latin1":case"binary":return a_(this,e,t,n);case"base64":return l_(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c_(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},Qy.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var d_=4096;function f_(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function __(e,t,n,r,i,s){if(!Yy(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function b_(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function v_(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function E_(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x_(e,t,n,r,i){return i||E_(e,0,n,4),Vy(e,t,n,r,23,4),n+4}function S_(e,t,n,r,i){return i||E_(e,0,n,8),Vy(e,t,n,r,52,8),n+8}Qy.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},Qy.prototype.readUInt8=function(e,t){return t||y_(e,1,this.length),this[e]},Qy.prototype.readUInt16LE=function(e,t){return t||y_(e,2,this.length),this[e]|this[e+1]<<8},Qy.prototype.readUInt16BE=function(e,t){return t||y_(e,2,this.length),this[e]<<8|this[e+1]},Qy.prototype.readUInt32LE=function(e,t){return t||y_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Qy.prototype.readUInt32BE=function(e,t){return t||y_(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Qy.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||y_(e,t,this.length);for(var r=this[e],i=1,s=0;++s=(i*=128)&&(r-=Math.pow(2,8*t)),r},Qy.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||y_(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},Qy.prototype.readInt8=function(e,t){return t||y_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Qy.prototype.readInt16LE=function(e,t){t||y_(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Qy.prototype.readInt16BE=function(e,t){t||y_(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Qy.prototype.readInt32LE=function(e,t){return t||y_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Qy.prototype.readInt32BE=function(e,t){return t||y_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Qy.prototype.readFloatLE=function(e,t){return t||y_(e,4,this.length),Uy(this,e,!0,23,4)},Qy.prototype.readFloatBE=function(e,t){return t||y_(e,4,this.length),Uy(this,e,!1,23,4)},Qy.prototype.readDoubleLE=function(e,t){return t||y_(e,8,this.length),Uy(this,e,!0,52,8)},Qy.prototype.readDoubleBE=function(e,t){return t||y_(e,8,this.length),Uy(this,e,!1,52,8)},Qy.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||__(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+i]=e/s&255;return t+n},Qy.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,1,255,0),Qy.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Qy.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,65535,0),Qy.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):b_(this,e,t,!0),t+2},Qy.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,65535,0),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):b_(this,e,t,!1),t+2},Qy.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,4294967295,0),Qy.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):v_(this,e,t,!0),t+4},Qy.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,4294967295,0),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):v_(this,e,t,!1),t+4},Qy.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);__(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+n},Qy.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);__(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},Qy.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,1,127,-128),Qy.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Qy.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,32767,-32768),Qy.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):b_(this,e,t,!0),t+2},Qy.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,2,32767,-32768),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):b_(this,e,t,!1),t+2},Qy.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,2147483647,-2147483648),Qy.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):v_(this,e,t,!0),t+4},Qy.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||__(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Qy.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):v_(this,e,t,!1),t+4},Qy.prototype.writeFloatLE=function(e,t,n){return x_(this,e,t,!0,n)},Qy.prototype.writeFloatBE=function(e,t,n){return x_(this,e,t,!1,n)},Qy.prototype.writeDoubleLE=function(e,t,n){return S_(this,e,t,!0,n)},Qy.prototype.writeDoubleBE=function(e,t,n){return S_(this,e,t,!1,n)},Qy.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3||!Qy.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function C_(e){return function(e){var t,n,r,i,s,o;My||jy();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[a-2]?2:"="===e[a-1]?1:0,o=new By(3*a/4-s),r=s>0?a-4:a;var l=0;for(t=0,n=0;t>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===s?(i=Ly[e.charCodeAt(t)]<<2|Ly[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===s&&(i=Ly[e.charCodeAt(t)]<<10|Ly[e.charCodeAt(t+1)]<<4|Ly[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(O_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function A_(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function P_(e){return null!=e&&(!!e._isBuffer||k_(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&k_(e.slice(0,0))}(e))}function k_(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function D_(){throw new Error("setTimeout has not been defined")}function R_(){throw new Error("clearTimeout has not been defined")}var I_=D_,L_=R_;function B_(e){if(I_===setTimeout)return setTimeout(e,0);if((I_===D_||!I_)&&setTimeout)return I_=setTimeout,setTimeout(e,0);try{return I_(e,0)}catch(t){try{return I_.call(null,e,0)}catch(t){return I_.call(this,e,0)}}}"function"==typeof vy.setTimeout&&(I_=setTimeout),"function"==typeof vy.clearTimeout&&(L_=clearTimeout);var M_,j_=[],N_=!1,F_=-1;function U_(){N_&&M_&&(N_=!1,M_.length?j_=M_.concat(j_):F_=-1,j_.length&&V_())}function V_(){if(!N_){var e=B_(U_);N_=!0;for(var t=j_.length;t;){for(M_=j_,j_=[];++F_1)for(var n=1;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),o=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),fb(t)?n.showHidden=t:t&&Ab(n,t),yb(n.showHidden)&&(n.showHidden=!1),yb(n.depth)&&(n.depth=2),yb(n.colors)&&(n.colors=!1),yb(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ab),cb(n,e,n.depth)}function ab(e,t){var n=ob.styles[t];return n?"["+ob.colors[n][0]+"m"+e+"["+ob.colors[n][1]+"m":e}function lb(e,t){return e}function cb(e,t,n){if(e.customInspect&&t&&xb(t.inspect)&&t.inspect!==ob&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return gb(r)||(r=cb(e,r,n)),r}var i=function(e,t){if(yb(t))return e.stylize("undefined","undefined");if(gb(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(mb(t))return e.stylize(""+t,"number");if(fb(t))return e.stylize(""+t,"boolean");if(hb(t))return e.stylize("null","null")}(e,t);if(i)return i;var s=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),Eb(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return ub(t);if(0===s.length){if(xb(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(_b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(vb(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Eb(t))return ub(t)}var l,c="",u=!1,p=["{","}"];(db(t)&&(u=!0,p=["[","]"]),xb(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return _b(t)&&(c=" "+RegExp.prototype.toString.call(t)),vb(t)&&(c=" "+Date.prototype.toUTCString.call(t)),Eb(t)&&(c=" "+ub(t)),0!==s.length||u&&0!=t.length?n<0?_b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=u?function(e,t,n,r,i){for(var s=[],o=0,a=t.length;o60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(l,c,p)):p[0]+c+p[1]}function ub(e){return"["+Error.prototype.toString.call(e)+"]"}function pb(e,t,n,r,i,s){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),Pb(r,i)||(o="["+i+"]"),a||(e.seen.indexOf(l.value)<0?(a=hb(n)?cb(e,l.value,null):cb(e,l.value,n-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),yb(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function db(e){return Array.isArray(e)}function fb(e){return"boolean"==typeof e}function hb(e){return null===e}function mb(e){return"number"==typeof e}function gb(e){return"string"==typeof e}function yb(e){return void 0===e}function _b(e){return bb(e)&&"[object RegExp]"===Ob(e)}function bb(e){return"object"==typeof e&&null!==e}function vb(e){return bb(e)&&"[object Date]"===Ob(e)}function Eb(e){return bb(e)&&("[object Error]"===Ob(e)||e instanceof Error)}function xb(e){return"function"==typeof e}function Sb(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Ob(e){return Object.prototype.toString.call(e)}function Tb(e){return e<10?"0"+e.toString(10):e.toString(10)}ob.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ob.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var wb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cb(){var e=new Date,t=[Tb(e.getHours()),Tb(e.getMinutes()),Tb(e.getSeconds())].join(":");return[e.getDate(),wb[e.getMonth()],t].join(" ")}function Ab(e,t){if(!t||!bb(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function Pb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var kb={inherits:tb,_extend:Ab,log:function(){console.log("%s - %s",Cb(),rb.apply(null,arguments))},isBuffer:function(e){return _y.isBuffer(e)},isPrimitive:Sb,isFunction:xb,isError:Eb,isDate:vb,isObject:bb,isRegExp:_b,isUndefined:yb,isSymbol:function(e){return"symbol"==typeof e},isString:gb,isNumber:mb,isNullOrUndefined:function(e){return null==e},isNull:hb,isBoolean:fb,isArray:db,inspect:ob,deprecate:function e(t,n){if(yb(vy.process))return function(){return e(t,n).apply(this,arguments)};if(!0===eb.noDeprecation)return t;var r=!1;return function(){if(!r){if(eb.throwDeprecation)throw new Error(n);eb.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}},format:rb,debuglog:function(e){if(yb(ib)&&(ib=eb.env.NODE_DEBUG||""),e=e.toUpperCase(),!sb[e])if(new RegExp("\\b"+e+"\\b","i").test(ib)){sb[e]=function(){var t=rb.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else sb[e]=function(){};return sb[e]}};function Db(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i=0){var o=r.indexOf("\n",s+1);r=r.substring(o+1)}this.stack=r}}}function Wb(e,t){return"string"==typeof e?e.length=0;a--)if(l[a]!==c[a])return!1;for(a=l.length-1;a>=0;a--)if(!zb(e[o=l[a]],t[o],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function Xb(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function Gb(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function Zb(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&qb(i,n,"Missing expected exception"+r);var s="string"==typeof r,o=!e&&i&&!n;if((!e&&Eb(i)&&s&&Gb(i,n)||o)&&qb(i,n,"Got unwanted exception"+r),e&&i&&n&&!Gb(i,n)||!e&&i)throw i}Fb.AssertionError=Kb,tb(Kb,Error),Fb.fail=qb,Fb.ok=Qb,Fb.equal=function e(t,n,r){t!=n&&qb(t,n,r,"==",e)},Fb.notEqual=function e(t,n,r){t==n&&qb(t,n,r,"!=",e)},Fb.deepEqual=function e(t,n,r){zb(t,n,!1)||qb(t,n,r,"deepEqual",e)},Fb.deepStrictEqual=function e(t,n,r){zb(t,n,!0)||qb(t,n,r,"deepStrictEqual",e)},Fb.notDeepEqual=function e(t,n,r){zb(t,n,!1)&&qb(t,n,r,"notDeepEqual",e)},Fb.notDeepStrictEqual=function e(t,n,r){zb(t,n,!0)&&qb(t,n,r,"notDeepStrictEqual",e)},Fb.strictEqual=function e(t,n,r){t!==n&&qb(t,n,r,"===",e)},Fb.notStrictEqual=function e(t,n,r){t===n&&qb(t,n,r,"!==",e)},Fb.throws=function(e,t,n){Zb(!0,e,t,n)},Fb.doesNotThrow=function(e,t,n){Zb(!1,e,t,n)},Fb.ifError=function(e){if(e)throw e};var Hb,Yb={};function Jb(){return Hb||(Hb=1,function(e){!function e(t){var n,r,i,s,o,a;function l(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],r[t]="object"==typeof n&&null!==n?l(n):n);return r}function c(e,t){this.parent=e,this.key=t}function u(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function p(){}function d(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function f(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function h(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function m(e,t){return(new p).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,r,i,s;for(r=e.length,i=0;r;)t(e[s=i+(n=r>>>1)])?r=n:(i=s+1,r-=n+1);return i}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},i={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},r={Break:s={},Skip:o={},Remove:a={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){var e,t,n,r,i;function s(e,t){if(Array.isArray(t))for(n=0,r=t.length;n=0;)if(_=a[p=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]&&!h(r,_[g])){if(f(l,y[m]))i=new u(_[g],[p,g],"Property",null);else{if(!d(_[g]))continue;i=new u(_[g],[p,g],null,null)}n.push(i)}}else if(d(_)){if(h(r,_))continue;n.push(new u(_,p,null,null))}}}else if(i=r.pop(),c=this.__execute(t.leave,i),this.__state===s||c===s)return},p.prototype.replace=function(e,t){var n,r,i,l,p,h,m,g,y,_,b,v,E;function x(e){var t,r,i,s;if(e.ref.remove())for(r=e.ref.key,s=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===s){if(i.ref.key=0;)if(_=i[E=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]){if(f(l,y[m]))h=new u(_[g],[E,g],"Property",new c(_,g));else{if(!d(_[g]))continue;h=new u(_[g],[E,g],null,new c(_,g))}n.push(h)}}else d(_)&&n.push(new u(_,E,null,new c(i,E)))}}else if(h=r.pop(),void 0!==(p=this.__execute(t.leave,h))&&p!==s&&p!==o&&p!==a&&h.ref.replace(p),this.__state!==a&&p!==a||x(h),this.__state===s||p===s)return v.root;return v.root},t.Syntax=n,t.traverse=m,t.replace=function(e,t){return(new p).replace(e,t)},t.attachComments=function(e,t,n){var i,s,o,a,c=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,s=t.length;oe.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(a,1)):a+=1;return a===c.length?r.Break:c[a].extendedRange[0]>e.range[1]?r.Skip:void 0}}),a=0,m(e,{leave:function(e){for(var t;ae.range[1]?r.Skip:void 0}}),e},t.VisitorKeys=i,t.VisitorOption=r,t.Controller=p,t.cloneEnvironment=function(){return e({})},t}(e)}(Yb)),Yb}var ev,tv,nv={},rv="4.3.0";function iv(){return ev||(ev=1,function(){var e=Jb();function t(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function n(t,n){n=n||{},this.__visitor=t||this,this.__childVisitorKeys=n.childVisitorKeys?Object.assign({},e.VisitorKeys,n.childVisitorKeys):e.VisitorKeys,"iteration"===n.fallback?this.__fallback=Object.keys:"function"==typeof n.fallback&&(this.__fallback=n.fallback)}n.prototype.visitChildren=function(n){var r,i,s,o,a,l,c;if(null!=n){if(r=n.type||e.Syntax.Property,!(i=this.__childVisitorKeys[r])){if(!this.__fallback)throw new Error("Unknown node type "+r+".");i=this.__fallback(n)}for(s=0,o=i.length;s0&&n.every(d)}__staticCloseRef(e){this.__resolve(e)||this.__delegateToUpperScope(e)}__dynamicCloseRef(e){let t=this;do{t.through.push(e),t=t.upper}while(t)}__globalCloseRef(e){this.__shouldStaticallyCloseForGlobal(e)?this.__staticCloseRef(e):this.__dynamicCloseRef(e)}__close(e){let t;t=this.__shouldStaticallyClose(e)?this.__staticCloseRef:"global"!==this.type?this.__dynamicCloseRef:this.__globalCloseRef;for(let e=0,n=this.__left.length;ee.name.range[0]>=n)))}}class x extends f{constructor(e,t,n){super(e,"for",t,n,!1)}}class S extends f{constructor(e,t,n){super(e,"class",t,n,!1)}}class O extends f{constructor(e,t,n){super(e,"class-field-initializer",t,n,!0)}}class T extends f{constructor(e,t,n){super(e,"class-static-block",t,n,!0)}}class w{constructor(e){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=e,this.__declaredVariables=new WeakMap}__useDirective(){return this.__options.directive}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}isGlobalReturn(){return this.__options.nodejsScope||"commonjs"===this.__options.sourceType}isModule(){return"module"===this.__options.sourceType}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(e){return this.__nodeToScope.get(e)}getDeclaredVariables(e){return this.__declaredVariables.get(e)||[]}acquire(e,t){function n(e){return"function"!==e.type||!e.functionExpressionScope}const r=this.__get(e);if(!r||0===r.length)return null;if(1===r.length)return r[0];if(t)for(let e=r.length-1;e>=0;--e){const t=r[e];if(n(t))return t}else for(let e=0,t=r.length;e=6}}const{Syntax:C}=s.default;class A extends o.default.Visitor{static isPattern(e){const t=e.type;return t===C.Identifier||t===C.ObjectPattern||t===C.ArrayPattern||t===C.SpreadElement||t===C.RestElement||t===C.AssignmentPattern}constructor(e,t,n){super(null,e),this.rootPattern=t,this.callback=n,this.assignments=[],this.rightHandNodes=[],this.restElements=[]}Identifier(e){const t=(n=this.restElements)[n.length-1]||null;var n;this.callback(e,{topLevel:e===this.rootPattern,rest:null!=t&&t.argument===e,assignments:this.assignments})}Property(e){e.computed&&this.rightHandNodes.push(e.key),this.visit(e.value)}ArrayPattern(e){for(let t=0,n=e.elements.length;t{this.rightHandNodes.push(e)})),this.visit(e.callee)}}const{Syntax:P}=s.default;class k extends o.default.Visitor{constructor(e,t){super(null,t.options),this.declaration=e,this.referencer=t}visitImport(e,t){this.referencer.visitPattern(e,(e=>{this.referencer.currentScope().__define(e,new c(l.ImportBinding,e,t,this.declaration,null,null))}))}ImportNamespaceSpecifier(e){const t=e.local||e.id;t&&this.visitImport(t,e)}ImportDefaultSpecifier(e){const t=e.local||e.id;this.visitImport(t,e)}ImportSpecifier(e){const t=e.local||e.id;e.name?this.visitImport(e.name,e):this.visitImport(t,e)}}class D extends o.default.Visitor{constructor(e,t){super(null,e),this.options=e,this.scopeManager=t,this.parent=null,this.isInnerMethodDefinition=!1}currentScope(){return this.scopeManager.__currentScope}close(e){for(;this.currentScope()&&e===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}pushInnerMethodDefinition(e){const t=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=e,t}popInnerMethodDefinition(e){this.isInnerMethodDefinition=e}referencingDefaultValue(e,t,n,r){const i=this.currentScope();t.forEach((t=>{i.__referencing(e,a.WRITE,t.right,n,e!==t.left,r)}))}visitPattern(e,t,n){let r=t,i=n;"function"==typeof t&&(i=t,r={processRightHandNodes:!1}),function(e,t,n,r){const i=new A(e,t,r);i.visit(t),null!=n&&i.rightHandNodes.forEach(n.visit,n)}(this.options,e,r.processRightHandNodes?this:null,i)}visitFunction(e){let t,n;e.type===P.FunctionDeclaration&&this.currentScope().__define(e.id,new c(l.FunctionName,e.id,e,null,null,null)),e.type===P.FunctionExpression&&e.id&&this.scopeManager.__nestFunctionExpressionNameScope(e),this.scopeManager.__nestFunctionScope(e,this.isInnerMethodDefinition);const r=this;function i(n,i){r.currentScope().__define(n,new u(n,e,t,i.rest)),r.referencingDefaultValue(n,i.assignments,null,!0)}for(t=0,n=e.params.length;t{this.currentScope().__define(t,new u(t,e,e.params.length,!0))})),e.body&&(e.body.type===P.BlockStatement?this.visitChildren(e.body):this.visit(e.body)),this.close(e)}visitClass(e){e.type===P.ClassDeclaration&&this.currentScope().__define(e.id,new c(l.ClassName,e.id,e,null,null,null)),this.visit(e.superClass),this.scopeManager.__nestClassScope(e),e.id&&this.currentScope().__define(e.id,new c(l.ClassName,e.id,e)),this.visit(e.body),this.close(e)}visitProperty(e){let t;e.computed&&this.visit(e.key);const n=e.type===P.MethodDefinition;n&&(t=this.pushInnerMethodDefinition(!0)),this.visit(e.value),n&&this.popInnerMethodDefinition(t)}visitForIn(e){e.left.type===P.VariableDeclaration&&"var"!==e.left.kind&&this.scopeManager.__nestForScope(e),e.left.type===P.VariableDeclaration?(this.visit(e.left),this.visitPattern(e.left.declarations[0].id,(t=>{this.currentScope().__referencing(t,a.WRITE,e.right,null,!0,!0)}))):this.visitPattern(e.left,{processRightHandNodes:!0},((t,n)=>{let r=null;this.currentScope().isStrict||(r={pattern:t,node:e}),this.referencingDefaultValue(t,n.assignments,r,!1),this.currentScope().__referencing(t,a.WRITE,e.right,r,!0,!1)})),this.visit(e.right),this.visit(e.body),this.close(e)}visitVariableDeclaration(e,t,n,r){const i=n.declarations[r],s=i.init;this.visitPattern(i.id,{processRightHandNodes:!0},((o,l)=>{e.__define(o,new c(t,o,i,n,r,n.kind)),this.referencingDefaultValue(o,l.assignments,null,!0),s&&this.currentScope().__referencing(o,a.WRITE,s,null,!l.topLevel,!0)}))}AssignmentExpression(e){A.isPattern(e.left)?"="===e.operator?this.visitPattern(e.left,{processRightHandNodes:!0},((t,n)=>{let r=null;this.currentScope().isStrict||(r={pattern:t,node:e}),this.referencingDefaultValue(t,n.assignments,r,!1),this.currentScope().__referencing(t,a.WRITE,e.right,r,!n.topLevel,!1)})):this.currentScope().__referencing(e.left,a.RW,e.right):this.visit(e.left),this.visit(e.right)}CatchClause(e){this.scopeManager.__nestCatchScope(e),this.visitPattern(e.param,{processRightHandNodes:!0},((t,n)=>{this.currentScope().__define(t,new c(l.CatchClause,e.param,e,null,null,null)),this.referencingDefaultValue(t,n.assignments,null,!0)})),this.visit(e.body),this.close(e)}Program(e){this.scopeManager.__nestGlobalScope(e),this.scopeManager.isGlobalReturn()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(e,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(e),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(e),this.close(e)}Identifier(e){this.currentScope().__referencing(e)}PrivateIdentifier(){}UpdateExpression(e){A.isPattern(e.argument)?this.currentScope().__referencing(e.argument,a.RW,null):this.visitChildren(e)}MemberExpression(e){this.visit(e.object),e.computed&&this.visit(e.property)}Property(e){this.visitProperty(e)}PropertyDefinition(e){const{computed:t,key:n,value:r}=e;t&&this.visit(n),r&&(this.scopeManager.__nestClassFieldInitializerScope(r),this.visit(r),this.close(r))}StaticBlock(e){this.scopeManager.__nestClassStaticBlockScope(e),this.visitChildren(e),this.close(e)}MethodDefinition(e){this.visitProperty(e)}BreakStatement(){}ContinueStatement(){}LabeledStatement(e){this.visit(e.body)}ForStatement(e){e.init&&e.init.type===P.VariableDeclaration&&"var"!==e.init.kind&&this.scopeManager.__nestForScope(e),this.visitChildren(e),this.close(e)}ClassExpression(e){this.visitClass(e)}ClassDeclaration(e){this.visitClass(e)}CallExpression(e){this.scopeManager.__ignoreEval()||e.callee.type!==P.Identifier||"eval"!==e.callee.name||this.currentScope().variableScope.__detectEval(),this.visitChildren(e)}BlockStatement(e){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(e),this.visitChildren(e),this.close(e)}ThisExpression(){this.currentScope().variableScope.__detectThis()}WithStatement(e){this.visit(e.object),this.scopeManager.__nestWithScope(e),this.visit(e.body),this.close(e)}VariableDeclaration(e){const t="var"===e.kind?this.currentScope().variableScope:this.currentScope();for(let n=0,r=e.declarations.length;ne)return!1;if((n+=t[r+1])>=e)return!0}return!1}function d(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==t&&p(e,n)))}function f(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==r&&(p(e,n)||p(e,t)))))}var h=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new h(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},y={startsExpr:!0},_={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,_[e]=new h(e,t)}var v={num:new h("num",y),regexp:new h("regexp",y),string:new h("string",y),name:new h("name",y),privateId:new h("privateId",y),eof:new h("eof"),bracketL:new h("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new h("]"),braceL:new h("{",{beforeExpr:!0,startsExpr:!0}),braceR:new h("}"),parenL:new h("(",{beforeExpr:!0,startsExpr:!0}),parenR:new h(")"),comma:new h(",",g),semi:new h(";",g),colon:new h(":",g),dot:new h("."),question:new h("?",g),questionDot:new h("?."),arrow:new h("=>",g),template:new h("template"),invalidTemplate:new h("invalidTemplate"),ellipsis:new h("...",g),backQuote:new h("`",y),dollarBraceL:new h("${",{beforeExpr:!0,startsExpr:!0}),eq:new h("=",{beforeExpr:!0,isAssign:!0}),assign:new h("_=",{beforeExpr:!0,isAssign:!0}),incDec:new h("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new h("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=/===/!==",6),relational:m("/<=/>=",7),bitShift:m("<>/>>>",8),plusMin:new h("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new h("**",{beforeExpr:!0}),coalesce:m("??",1),_break:b("break"),_case:b("case",g),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",g),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",g),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",g),_switch:b("switch"),_throw:b("throw",g),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class",y),_extends:b("extends",g),_export:b("export"),_import:b("import",y),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,x=new RegExp(E.source,"g");function S(e){return 10===e||13===e||8232===e||8233===e}function O(e,t,n){void 0===n&&(n=e.length);for(var r=t;r>10),56320+(1023&e)))}var L=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,B=function(e,t){this.line=e,this.column=t};B.prototype.offset=function(e){return new B(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function j(e,t){for(var n=1,r=0;;){var i=O(e,r,t);if(i<0)return new B(n,t-r);++n,r=i}}var N={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},F=!1;function U(e){var t={};for(var n in N)t[n]=e&&k(e,n)?e[n]:N[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!F&&"object"==typeof console&&console.warn&&(F=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),D(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return D(t.onComment)&&(t.onComment=V(t,t.onComment)),t}function V(e,t){return function(n,r,i,s,o,a){var l={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(l.loc=new M(this,o,a)),e.ranges&&(l.range=[i,s]),t.push(l)}}var K=1,W=2,$=4,q=8,Q=16,z=32,X=64,G=128,Z=256,H=K|W|Z;function Y(e,t){return W|(e?$:0)|(t?q:0)}var J=0,ee=1,te=2,ne=3,re=4,ie=5,se=function(e,t,n){this.options=e=U(e),this.sourceFile=e.sourceFile,this.keywords=R(a[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=s[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=R(r);var i=(r?r+" ":"")+s.strict;this.reservedWordsStrict=R(i),this.reservedWordsStrictBind=R(i+" "+s.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(K),this.regexpState=null,this.privateNameStack=[]},oe={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};se.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},oe.inFunction.get=function(){return(this.currentVarScope().flags&W)>0},oe.inGenerator.get=function(){return(this.currentVarScope().flags&q)>0&&!this.currentVarScope().inClassFieldInit},oe.inAsync.get=function(){return(this.currentVarScope().flags&$)>0&&!this.currentVarScope().inClassFieldInit},oe.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Z)return!1;if(t.flags&W)return(t.flags&$)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},oe.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(t&X)>0||n||this.options.allowSuperOutsideMethod},oe.allowDirectSuper.get=function(){return(this.currentThisScope().flags&G)>0},oe.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},oe.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(t&(W|Z))>0||n},oe.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Z)>0},se.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,w.lastIndex=e,e+=w.exec(this.input)[0].length,";"===this.input[e]&&e++}},ae.eat=function(e){return this.type===e&&(this.next(),!0)},ae.isContextual=function(e){return this.type===v.name&&this.value===e&&!this.containsEsc},ae.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},ae.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ae.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},ae.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ae.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},ae.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ae.expect=function(e){this.eat(e)||this.unexpected()},ae.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var ce=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ae.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},ae.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},ae.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&r<56320)return!0;if(d(r,!0)){for(var i=n+1;f(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!l.test(s))return!0}return!1},ue.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;w.lastIndex=this.pos;var e,t=w.exec(this.input),n=this.pos+t[0].length;return!(E.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(f(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},ue.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=v._var,r="let"),i){case v._break:case v._continue:return this.parseBreakContinueStatement(s,i.keyword);case v._debugger:return this.parseDebuggerStatement(s);case v._do:return this.parseDoStatement(s);case v._for:return this.parseForStatement(s);case v._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case v._class:return e&&this.unexpected(),this.parseClass(s,!0);case v._if:return this.parseIfStatement(s);case v._return:return this.parseReturnStatement(s);case v._switch:return this.parseSwitchStatement(s);case v._throw:return this.parseThrowStatement(s);case v._try:return this.parseTryStatement(s);case v._const:case v._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case v._while:return this.parseWhileStatement(s);case v._with:return this.parseWithStatement(s);case v.braceL:return this.parseBlock(!0,s);case v.semi:return this.parseEmptyStatement(s);case v._export:case v._import:if(this.options.ecmaVersion>10&&i===v._import){w.lastIndex=this.pos;var o=w.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===v._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var c=this.value,u=this.parseExpression();return i===v.name&&"Identifier"===u.type&&this.eat(v.colon)?this.parseLabeledStatement(s,c,u,e):this.parseExpressionStatement(s,u)}},ue.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},ue.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(pe),this.enterScope(0),this.expect(v.parenL),this.type===v.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===v._var||this.type===v._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===r.declarations.length?(this.options.ecmaVersion>=9&&(this.type===v._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var s=this.isContextual("let"),o=!1,a=new ce,l=this.parseExpression(!(t>-1)||"await",a);return this.type===v._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===v._in?t>-1&&this.unexpected(t):e.await=t>-1),s&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,a),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},ue.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,he|(n?0:me),!1,t)},ue.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(v._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},ue.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},ue.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(de),this.enterScope(0);for(var n=!1;this.type!==v.braceR;)if(this.type===v._case||this.type===v._default){var r=this.type===v._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(v.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},ue.parseThrowStatement=function(e){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var fe=[];ue.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?z:0),this.checkLValPattern(e,t?re:te),this.expect(v.parenR),e},ue.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch){var t=this.startNode();this.next(),this.eat(v.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},ue.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},ue.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(pe),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},ue.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},ue.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},ue.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},ue.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},ue.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(v.braceL),e&&this.enterScope(0);this.type!==v.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},ue.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},ue.parseForIn=function(e,t){var n=this.type===v._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},ue.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(v.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===v._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(v.comma))break}return e},ue.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?ee:te,!1)};var he=1,me=2,ge=4;function ye(e,t){var n=t.key.name,r=e[n],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[n]="true",!1):!!r||(e[n]=i,!1)}function _e(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}ue.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===v.star&&t&me&&this.unexpected(),e.generator=this.eat(v.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&he&&(e.id=t&ge&&this.type!==v.name?null:this.parseIdent(),!e.id||t&me||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ee:te:ne));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Y(e.async,e.generator)),t&he||(e.id=this.type===v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&he?"FunctionDeclaration":"FunctionExpression")},ue.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ue.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(v.braceL);this.type!==v.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(i.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&ye(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},ue.parseClassElement=function(e){if(this.eat(v.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(v.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===v.star?a=!0:r="static"}if(n.static=a,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==v.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(t>=9||!s)&&this.eat(v.star)&&(i=!0),!r&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===v.parenL||"method"!==o||i||s){var c=!n.static&&_e(n,"constructor"),u=c&&e;c&&"method"!==o&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":o,this.parseClassMethod(n,i,s,u)}else this.parseClassField(n);return n},ue.isClassElementNameStart=function(){return this.type===v.name||this.type===v.privateId||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword},ue.parseClassElementName=function(e){this.type===v.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},ue.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&_e(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},ue.parseClassField=function(e){if(_e(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&_e(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(v.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},ue.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Z|X);this.type!==v.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},ue.parseClassId=function(e,t){this.type===v.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,te,!1)):(!0===t&&this.unexpected(),e.id=null)},ue.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts(null,!1):null},ue.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},ue.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,n=e.used,r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},ue.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.parseExportAllDeclaration(e,t);if(this.eat(v._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var n=0,r=e.specifiers;n=13&&this.type===v.string){var e=this.parseLiteral(this.value);return L.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},ue.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var be=se.prototype;be.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(v._function))return this.overrideContext(Ee.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(v.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===v.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(v.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[l],!0,t)}return l;case v.regexp:var c=this.value;return(r=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},r;case v.num:case v.string:return this.parseLiteral(this.value);case v._null:case v._true:case v._false:return(r=this.startNode()).value=this.type===v._null?null:this.type===v._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case v.parenL:var u=this.start,p=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),p;case v.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(v.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case v.braceL:return this.overrideContext(Ee.b_expr),this.parseObj(!1,e);case v._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case v._class:return this.parseClass(this.startNode(),!1);case v._new:return this.parseNew();case v.backQuote:return this.parseTemplate();case v._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Se.parseExprAtomDefault=function(){this.unexpected()},Se.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var n=this.parseIdent(!0);return this.type!==v.parenL||e?this.type===v.dot?(t.meta=n,this.parseImportMeta(t)):void this.unexpected():this.parseDynamicImport(t)},Se.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(v.parenR)){var t=this.start;this.eat(v.comma)&&this.eat(v.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Se.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Se.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Se.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},Se.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Se.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,l=this.startLoc,c=[],u=!0,p=!1,d=new ce,f=this.yieldPos,h=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==v.parenR;){if(u?u=!1:this.expect(v.comma),s&&this.afterTrailingComma(v.parenR,!0)){p=!0;break}if(this.type===v.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===v.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(v.parenR),e&&this.shouldParseArrow(c)&&this.eat(v.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(r,i,c,t);c.length&&!p||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,c.length>1?((n=this.startNodeAt(a,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",m,g)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,i);return y.expression=n,this.finishNode(y,"ParenthesizedExpression")}return n},Se.parseParenItem=function(e){return e},Se.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Te=[];Se.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(v.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(v.parenL)?e.arguments=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Te,this.finishNode(e,"NewExpression")},Se.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===v.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===v.backQuote,this.finishNode(n,"TemplateElement")},Se.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===v.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(v.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(v.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Se.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===v.name||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===v.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},Se.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(v.braceR);){if(r)r=!1;else if(this.expect(v.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(v.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Se.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(v.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===v.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===v.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(v.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(v.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},Se.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var n=e.value.start;"get"===e.kind?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Se.parsePropertyValue=function(e,t,n,r,i,s,o,a){(n||r)&&this.type===v.colon&&this.unexpected(),this.eat(v.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===v.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r)):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===v.comma||this.type===v.braceR||this.type===v.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===v.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},Se.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(v.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(v.bracketR),e.key;e.computed=!1}return e.key=this.type===v.num||this.type===v.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Se.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Se.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Y(t,r.generator)|X|(n?G:0)),this.expect(v.parenL),r.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},Se.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Y(n,!1)|Q),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Se.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==v.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ie),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Se.isSimpleParamList=function(e){for(var t=0,n=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&K&&delete this.undefinedExports[e]}else if(t===re)this.currentScope().lexical.push(e);else if(t===ne){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(a.flags&z&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&a.flags&K&&delete this.undefinedExports[e],a.flags&H)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Ce.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Ce.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ce.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&H)return t}},Ce.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&H&&!(t.flags&Q))return t}};var Pe=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ke=se.prototype;function De(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}ke.startNode=function(){return new Pe(this,this.start,this.startLoc)},ke.startNodeAt=function(e,t){return new Pe(this,e,t)},ke.finishNode=function(e,t){return De.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ke.finishNodeAt=function(e,t,n,r){return De.call(this,e,t,n,r)},ke.copyNode=function(e){var t=new Pe(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Re="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Ie=Re+" Extended_Pictographic",Le=Ie+" EBase EComp EMod EPres ExtPict",Be={9:Re,10:Ie,11:Ie,12:Le,13:Le,14:Le},Me={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},je="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ne="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Fe=Ne+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ue=Fe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ve=Ue+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ke=Ve+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",We={9:Ne,10:Fe,11:Ue,12:Ve,13:Ke,14:Ke+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},$e={};function qe(e){var t=$e[e]={binary:R(Be[e]+" "+je),binaryOfStrings:R(Me[e]),nonBinary:{General_Category:R(je),Script:R(We[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Qe=0,ze=[9,10,11,12,13,14];Qe=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=$e[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Ze(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function He(e){return d(e,!0)||36===e||95===e}function Ye(e){return f(e,!0)||36===e||95===e||8204===e||8205===e}function Je(e){return e>=65&&e<=90||e>=97&&e<=122}function et(e){return e>=0&&e<=1114111}Ge.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},Ge.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ge.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(i<<10)+s-56613888:i},Ge.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},Ge.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Ge.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ge.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ge.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Ge.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0,i=e;r-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},Xe.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Xe.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Xe.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Xe.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Xe.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Xe.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Xe.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Xe.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Ze(t)&&(e.lastIntValue=t,e.advance(),!0)},Xe.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Ze(n);)e.advance();return e.pos!==t},Xe.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Xe.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Xe.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Xe.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=I(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=I(e.lastIntValue);return!0}return!1},Xe.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),He(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Xe.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Ye(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Xe.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Xe.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Xe.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Xe.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Xe.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Xe.regexp_eatZero=function(e){return 48===e.current()&&!ut(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Xe.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Xe.regexp_eatControlLetter=function(e){var t=e.current();return!!Je(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Xe.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(i-55296)+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&et(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Xe.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Xe.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};var tt=0,nt=1,rt=2;function it(e){return 100===e||68===e||115===e||83===e||119===e||87===e}function st(e){return Je(e)||95===e}function ot(e){return st(e)||ut(e)}function at(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}function lt(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}function ct(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}function ut(e){return e>=48&&e<=57}function pt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function dt(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ft(e){return e>=48&&e<=55}Xe.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(it(t))return e.lastIntValue=-1,e.advance(),nt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===rt&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return tt},Xe.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),nt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return tt},Xe.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){k(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Xe.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?nt:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?rt:void e.raise("Invalid property name")},Xe.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";st(t=e.current());)e.lastStringValue+=I(t),e.advance();return""!==e.lastStringValue},Xe.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ot(t=e.current());)e.lastStringValue+=I(t),e.advance();return""!==e.lastStringValue},Xe.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Xe.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===rt&&e.raise("Negated character class may contain strings"),!0}return!1},Xe.regexp_classContents=function(e){return 93===e.current()?nt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),nt)},Xe.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Xe.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||ft(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Xe.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Xe.regexp_classSetExpression=function(e){var t,n=nt;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){t===rt&&(n=rt);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?t!==rt&&(n=nt):e.raise("Invalid character in character class");if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;t===rt&&(n=rt)}},Xe.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Xe.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?nt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Xe.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===rt&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Xe.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},Xe.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===rt&&(t=rt);return t},Xe.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?nt:rt},Xe.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var n=e.current();return!(n<0||n===e.lookahead()&&at(n)||lt(n)||(e.advance(),e.lastIntValue=n,0))},Xe.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!ct(t)&&(e.lastIntValue=t,e.advance(),!0)},Xe.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!ut(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Xe.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Xe.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;ut(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Xe.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;pt(n=e.current());)e.lastIntValue=16*e.lastIntValue+dt(n),e.advance();return e.pos!==t},Xe.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Xe.regexp_eatOctalDigit=function(e){var t=e.current();return ft(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Xe.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r=this.input.length?this.finishToken(v.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},mt.readToken=function(e){return d(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},mt.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},mt.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=O(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},mt.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&T.test(String.fromCharCode(e))))break e;++this.pos}}},mt.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},mt.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(v.ellipsis)):(++this.pos,this.finishToken(v.dot))},mt.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(v.assign,2):this.finishOp(v.slash,1)},mt.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?v.star:v.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=v.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(v.assign,n+1):this.finishOp(r,n)},mt.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(v.assign,3):this.finishOp(124===e?v.logicalOR:v.logicalAND,2):61===t?this.finishOp(v.assign,2):this.finishOp(124===e?v.bitwiseOR:v.bitwiseAND,1)},mt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(v.assign,2):this.finishOp(v.bitwiseXOR,1)},mt.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!E.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(v.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(v.assign,2):this.finishOp(v.plusMin,1)},mt.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(v.assign,n+1):this.finishOp(v.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(v.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},mt.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(v.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(v.arrow)):this.finishOp(61===e?v.eq:v.prefix,1)},mt.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(v.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(v.assign,3):this.finishOp(v.coalesce,2)}return this.finishOp(v.question,1)},mt.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,d(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(v.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+I(e)+"'")},mt.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(v.parenL);case 41:return++this.pos,this.finishToken(v.parenR);case 59:return++this.pos,this.finishToken(v.semi);case 44:return++this.pos,this.finishToken(v.comma);case 91:return++this.pos,this.finishToken(v.bracketL);case 93:return++this.pos,this.finishToken(v.bracketR);case 123:return++this.pos,this.finishToken(v.braceL);case 125:return++this.pos,this.finishToken(v.braceR);case 58:return++this.pos,this.finishToken(v.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(v.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(v.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+I(e)+"'")},mt.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},mt.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(E.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Ge(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(i,o)}catch(e){}return this.finishToken(v.regexp,{pattern:i,flags:o,value:l})},mt.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,l=0,c=null==t?1/0:t;l=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;a=u,o=o*e+p}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:o},mt.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=yt(this.input.slice(t,this.pos)),++this.pos):d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,n)},mt.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=yt(this.input.slice(t,this.pos));return++this.pos,d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=gt(this.input.slice(t,this.pos),n);return this.finishToken(v.num,s)},mt.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},mt.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(v.string,t)};var _t={};mt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==_t)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},mt.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw _t;this.raise(e,t)},mt.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==v.template&&this.type!==v.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(v.template,e)):36===n?(this.pos+=2,this.finishToken(v.dollarBraceL)):(++this.pos,this.finishToken(v.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(S(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},mt.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return S(t)?"":String.fromCharCode(t)}},mt.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},mt.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),n=/^[\da-fA-F]+$/,r=/^\d+$/,i=new WeakMap;function s(e){e=e.Parser.acorn||e;let t=i.get(e);if(!t){const n=e.tokTypes,r=e.TokContext,s=e.TokenType,o=new r("...",!0,!0),c={tc_oTag:o,tc_cTag:a,tc_expr:l},u={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};u.jsxTagStart.updateContext=function(){this.context.push(l),this.context.push(o),this.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===o&&e===n.slash||t===a?(this.context.pop(),this.exprAllowed=this.curContext()===l):this.exprAllowed=!0},t={tokContexts:c,tokTypes:u},i.set(e,t)}return t}function o(e){return e?"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?o(e.object)+"."+o(e.property):void 0:e}e.exports=function(e){return e=e||{},function(i){return function(e,i){const a=i.acorn||dv(),l=s(a),c=a.tokTypes,u=l.tokTypes,p=a.tokContexts,d=l.tokContexts.tc_oTag,f=l.tokContexts.tc_cTag,h=l.tokContexts.tc_expr,m=a.isNewLine,g=a.isIdentifierStart,y=a.isIdentifierChar;return class extends i{static get acornJsx(){return l}jsx_readToken(){let e="",t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:return this.pos===this.start?60===n&&this.exprAllowed?(++this.pos,this.finishToken(u.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.pos),this.finishToken(u.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===n?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t}jsx_readString(e){let t="",n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let r=this.input.charCodeAt(this.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):m(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(c.string,t)}jsx_readEntity(){let e,i="",s=0,o=this.input[this.pos];"&"!==o&&this.raise(this.pos,"Entity must start with an ampersand");let a=++this.pos;for(;this.pos")}let a=i.name?"Element":"Fragment";return n["opening"+a]=i,n["closing"+a]=s,n.children=r,this.type===c.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(n,"JSX"+a)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type="JSXText",e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===u.jsxText?this.jsx_parseText():this.type===u.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===h)return this.jsx_readToken();if(t===d||t===f){if(g(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(u.jsxTagEnd);if((34===e||39===e)&&t==d)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(u.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==c.braceL){var t=this.curContext();t==d?this.context.push(p.b_expr):t==h?this.context.push(p.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==c.slash||e!==u.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(f),this.exprAllowed=!1}}}}({allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},i)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(dv()).tokTypes},configurable:!0,enumerable:!0})}(yv)),yv.exports}function bv(){if(gv)return uv;gv=1,Object.defineProperty(uv,"__esModule",{value:!0});var e=dv(),t=_v(),n=lv();function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var s=i(e),o=r(t),a=i(n);const l="Boolean",c="Identifier",u="PrivateIdentifier",p="Keyword",d="Null",f="Numeric",h="Punctuator",m="String",g="RegularExpression",y="Template",_="JSXIdentifier",b="JSXText";function v(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}v.prototype={constructor:v,translate(e,t){const n=e.type,r=this._acornTokTypes;if(n===r.name)e.type=c,"static"===e.value&&(e.type=p),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=p);else if(n===r.privateId)e.type=u;else if(n===r.semi||n===r.comma||n===r.parenL||n===r.parenR||n===r.braceL||n===r.braceR||n===r.dot||n===r.bracketL||n===r.colon||n===r.question||n===r.bracketR||n===r.ellipsis||n===r.arrow||n===r.jsxTagStart||n===r.incDec||n===r.starstar||n===r.jsxTagEnd||n===r.prefix||n===r.questionDot||n.binop&&!n.keyword||n.isAssign)e.type=h,e.value=this._code.slice(e.start,e.end);else if(n===r.jsxName)e.type=_;else if("jsxText"===n.label||n===r.jsxAttrValueToken)e.type=b;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type=l:"null"===n.keyword?e.type=d:e.type=p;else if(n===r.num)e.type=f,e.value=this._code.slice(e.start,e.end);else if(n===r.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=b):e.type=m,e.value=this._code.slice(e.start,e.end);else if(n===r.regexp){e.type=g;const t=e.value;e.regex={flags:t.flags,pattern:t.pattern},e.value=`/${t.pattern}/${t.flags}`}return e},onToken(e,t){const n=this._acornTokTypes,r=t.tokens,i=this._tokens,s=()=>{r.push(function(e,t){const n=e[0],r=e[e.length-1],i={type:y,value:t.slice(n.start,r.end)};return n.loc&&(i.loc={start:n.loc.start,end:r.loc.end}),n.range&&(i.start=n.range[0],i.end=r.range[1],i.range=[i.start,i.end]),i}(this._tokens,this._code)),this._tokens=[]};if(e.type!==n.eof){if(e.type===n.backQuote)return this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),i.push(e),void(i.length>1&&s());if(e.type===n.dollarBraceL)return i.push(e),void s();if(e.type===n.braceR)return this._curlyBrace&&r.push(this.translate(this._curlyBrace,t)),void(this._curlyBrace=e);if(e.type===n.template||e.type===n.invalidTemplate)return this._curlyBrace&&(i.push(this._curlyBrace),this._curlyBrace=null),void i.push(e);this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(this.translate(e,t))}else this._curlyBrace&&r.push(this.translate(this._curlyBrace,t))}};const E=[3,5,6,7,8,9,10,11,12,13,14,15];function x(){return E[E.length-1]}function S(e){const t=function(e=5){let t="latest"===e?x():e;if("number"!=typeof t)throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!E.includes(t))throw new Error("Invalid ecmaVersion.");return t}(e.ecmaVersion),n=function(e="script"){if("script"===e||"module"===e)return e;if("commonjs"===e)return"script";throw new Error("Invalid sourceType.")}(e.sourceType),r=!0===e.range,i=!0===e.loc;if(3!==t&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(void 0!==e.allowReserved&&"boolean"!=typeof e.allowReserved)throw new Error("`allowReserved`, when present, must be `true` or `false`");const s=3===t&&(e.allowReserved||"never"),o=e.ecmaFeatures||{},a="commonjs"===e.sourceType||Boolean(o.globalReturn);if("module"===n&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:n,ranges:r,locations:i,allowReserved:s,allowReturnOutsideFunction:a})}const O=Symbol("espree's internal state"),T=Symbol("espree's esprimaFinishNode");var w=()=>e=>{const t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(e,n){"object"==typeof e&&null!==e||(e={}),"string"==typeof n||n instanceof String||(n=String(n));const r=e.sourceType,i=S(e),s=i.ecmaFeatures||{},o=!0===i.tokens?new v(t,n):null,a={originalSourceType:r||i.sourceType,tokens:o?[]:null,comments:!0===i.comment?[]:null,impliedStrict:!0===s.impliedStrict&&i.ecmaVersion>=5,ecmaVersion:i.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:i.ecmaVersion,sourceType:i.sourceType,ranges:i.ranges,locations:i.locations,allowReserved:i.allowReserved,allowReturnOutsideFunction:i.allowReturnOutsideFunction,onToken(e){o&&o.onToken(e,a),e.type!==t.eof&&(a.lastToken=e)},onComment(e,t,r,i,s,o){if(a.comments){const l=function(e,t,n,r,i,s,o){let a;a=e?"Block":"#!"===o.slice(n,n+2)?"Hashbang":"Line";const l={type:a,value:t};return"number"==typeof n&&(l.start=n,l.end=r,l.range=[n,r]),"object"==typeof i&&(l.loc={start:i,end:s}),l}(e,t,r,i,s,o,n);a.comments.push(l)}}},n),this[O]=a}tokenize(){do{this.next()}while(this.type!==t.eof);this.next();const e=this[O],n=e.tokens;return e.comments&&(n.comments=e.comments),n}finishNode(...e){const t=super.finishNode(...e);return this[T](t)}finishNodeAt(...e){const t=super.finishNodeAt(...e);return this[T](t)}parse(){const e=this[O],t=super.parse();if(t.sourceType=e.originalSourceType,e.comments&&(t.comments=e.comments),e.tokens&&(t.tokens=e.tokens),t.body.length){const[e]=t.body;t.range&&(t.range[0]=e.range[0]),t.loc&&(t.loc.start=e.loc.start),t.start=e.start}return e.lastToken&&(t.range&&(t.range[1]=e.lastToken.range[1]),t.loc&&(t.loc.end=e.lastToken.loc.end),t.end=e.lastToken.end),this[O].templateElements.forEach((e=>{const t=e.tail?1:2;e.start+=-1,e.end+=t,e.range&&(e.range[0]+=-1,e.range[1]+=t),e.loc&&(e.loc.start.column+=-1,e.loc.end.column+=t)})),t}parseTopLevel(e){return this[O].impliedStrict&&(this.strict=!0),super.parseTopLevel(e)}raise(t,n){const r=e.acorn.getLineInfo(this.input,t),i=new SyntaxError(n);throw i.index=t,i.lineNumber=r.line,i.column=r.column+1,i}raiseRecoverable(e,t){this.raise(e,t)}unexpected(e){let t="Unexpected token";if(null!=e){if(this.pos=e,this.options.locations)for(;this.posthis.start&&(t+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,t)}jsx_readString(e){const n=super.jsx_readString(e);return this.type===t.string&&(this[O].jsxAttrValueToken=!0),n}[T](e){return"TemplateElement"===e.type&&this[O].templateElements.push(e),e.type.includes("Function")&&!e.generator&&(e.generator=!1),e}}};const C={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=s.Parser.extend(w())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=s.Parser.extend(o.default(),w())),this._jsx},get(e){return Boolean(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};const A=a.KEYS,P=function(){let e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),A)Object.hasOwnProperty.call(A,e)&&(t[e]=e);return"function"==typeof Object.freeze&&Object.freeze(t),t}(),k=x(),D=[...E];return uv.Syntax=P,uv.VisitorKeys=A,uv.latestEcmaVersion=k,uv.name="espree",uv.parse=function(e,t){return new(C.get(t))(t,e).parse()},uv.supportedEcmaVersions=D,uv.tokenize=function(e,t){const n=C.get(t);return t&&!0===t.tokens||(t=Object.assign({},t,{tokens:!0})),new n(t,e).tokenize()},uv.version="9.6.1",uv}var vv,Ev={exports:{}};function xv(){return vv||(vv=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",s="[object Function]",o="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[s]=c["[object Map]"]=c["[object Number]"]=c[o]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof vy&&vy&&vy.Object===Object&&vy,p="object"==typeof self&&self&&self.Object===Object&&self,d=u||p||Function("return this")(),f=t&&!t.nodeType&&t,h=f&&e&&!e.nodeType&&e,m=h&&h.exports===f,g=m&&u.process,y=function(){try{var e=h&&h.require&&h.require("util").types;return e||g&&g.binding&&g.binding("util")}catch(e){}}(),_=y&&y.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var v,E,x,S=Array.prototype,O=Function.prototype,T=Object.prototype,w=d["__core-js_shared__"],C=O.toString,A=T.hasOwnProperty,P=(v=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",k=T.toString,D=C.call(Object),R=RegExp("^"+C.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=m?d.Buffer:void 0,L=d.Symbol,B=d.Uint8Array,M=I?I.allocUnsafe:void 0,j=(E=Object.getPrototypeOf,x=Object,function(e){return E(x(e))}),N=Object.create,F=T.propertyIsEnumerable,U=S.splice,V=L?L.toStringTag:void 0,K=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),W=I?I.isBuffer:void 0,$=Math.max,q=Date.now,Q=he(d,"Map"),z=he(Object,"create"),X=function(){function e(){}return function(t){if(!we(t))return{};if(N)return N(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Z.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},H.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(Q||Z),string:new G}},H.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return fe(this,e).get(e)},H.prototype.has=function(e){return fe(this,e).has(e)},H.prototype.set=function(e,t){var n=fe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Y.prototype.clear=function(){this.__data__=new Z,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(e,t),this.size=n.size,this};var ie,se=function(e,t,n){for(var r=-1,i=Object(e),s=n(e),o=s.length;o--;){var a=s[ie?o:++r];if(!1===t(i[a],a,i))break}return e};function oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?function(e){var t=A.call(e,V),n=e[V];try{e[V]=void 0;var r=!0}catch(e){}var i=k.call(e);r&&(t?e[V]=n:delete e[V]);return i}(e):function(e){return k.call(e)}(e)}function ae(e){return Ce(e)&&oe(e)==i}function le(e){return!(!we(e)||function(e){return!!P&&P in e}(e))&&(Oe(e)?R:a).test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ce(e){if(!we(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)("constructor"!=r||!t&&A.call(e,r))&&n.push(r);return n}function ue(e,t,n,r,i){e!==t&&se(t,(function(s,a){if(i||(i=new Y),we(s))!function(e,t,n,r,i,s,a){var l=ye(e,n),c=ye(t,n),u=a.get(c);if(u)return void ee(e,n,u);var p=s?s(l,c,n+"",e,t,a):void 0,d=void 0===p;if(d){var f=Ee(c),h=!f&&Se(c),m=!f&&!h&&Ae(c);p=c,f||h||m?Ee(l)?p=l:Ce(v=l)&&xe(v)?p=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(de);function be(e,t){return e===t||e!=e&&t!=t}var ve=ae(function(){return arguments}())?ae:function(e){return Ce(e)&&A.call(e,"callee")&&!F.call(e,"callee")},Ee=Array.isArray;function xe(e){return null!=e&&Te(e.length)&&!Oe(e)}var Se=W||function(){return!1};function Oe(e){if(!we(e))return!1;var t=oe(e);return t==s||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ce(e){return null!=e&&"object"==typeof e}var Ae=_?function(e){return function(t){return e(t)}}(_):function(e){return Ce(e)&&Te(e.length)&&!!c[oe(e)]};function Pe(e){return xe(e)?J(e,!0):ce(e)}var ke,De=(ke=function(e,t,n){ue(e,t,n)},pe((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(i=ke.length>3&&"function"==typeof i?(r--,i):void 0,s&&function(e,t,n){if(!we(n))return!1;var r=typeof t;return!!("number"==r?xe(n)&&me(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],s)&&(i=r<3?void 0:i,r=1),e=Object(e);++n",description:"An AST-based pattern checker for JavaScript.",bin:{eslint:"./bin/eslint.js"},main:"./lib/api.js",exports:{"./package.json":"./package.json",".":"./lib/api.js","./use-at-your-own-risk":"./lib/unsupported-api.js"},scripts:{"build:docs:update-links":"node tools/fetch-docs-links.js","build:site":"node Makefile.js gensite","build:webpack":"node Makefile.js webpack","build:readme":"node tools/update-readme.js",lint:"node Makefile.js lint","lint:docs:js":"node Makefile.js lintDocsJS","lint:docs:rule-examples":"node Makefile.js checkRuleExamples","lint:fix":"node Makefile.js lint -- fix","lint:fix:docs:js":"node Makefile.js lintDocsJS -- fix","release:generate:alpha":"node Makefile.js generatePrerelease -- alpha","release:generate:beta":"node Makefile.js generatePrerelease -- beta","release:generate:latest":"node Makefile.js generateRelease","release:generate:rc":"node Makefile.js generatePrerelease -- rc","release:publish":"node Makefile.js publishRelease",test:"node Makefile.js test","test:cli":"mocha","test:fuzz":"node Makefile.js fuzz","test:performance":"node Makefile.js perf"},gitHooks:{"pre-commit":"lint-staged"},"lint-staged":{"*.js":"eslint --fix","*.md":"markdownlint --fix","lib/rules/*.js":["node tools/update-eslint-all.js","git add packages/js/src/configs/eslint-all.js"],"docs/src/rules/*.md":["node tools/check-rule-examples.js","node tools/fetch-docs-links.js","git add docs/src/_data/further_reading_links.json"],"docs/**/*.svg":"npx svgo -r --multipass"},files:["LICENSE","README.md","bin","conf","lib","messages"],repository:"eslint/eslint",funding:"https://opencollective.com/eslint",homepage:"https://eslint.org",bugs:"https://github.com/eslint/eslint/issues/",dependencies:{"@eslint-community/eslint-utils":"^4.2.0","@eslint-community/regexpp":"^4.6.1","@eslint/eslintrc":"^2.1.4","@eslint/js":"8.57.0","@humanwhocodes/config-array":"^0.11.14","@humanwhocodes/module-importer":"^1.0.1","@nodelib/fs.walk":"^1.2.8","@ungap/structured-clone":"^1.2.0",ajv:"^6.12.4",chalk:"^4.0.0","cross-spawn":"^7.0.2",debug:"^4.3.2",doctrine:"^3.0.0","escape-string-regexp":"^4.0.0","eslint-scope":"^7.2.2","eslint-visitor-keys":"^3.4.3",espree:"^9.6.1",esquery:"^1.4.2",esutils:"^2.0.2","fast-deep-equal":"^3.1.3","file-entry-cache":"^6.0.1","find-up":"^5.0.0","glob-parent":"^6.0.2",globals:"^13.19.0",graphemer:"^1.4.0",ignore:"^5.2.0",imurmurhash:"^0.1.4","is-glob":"^4.0.0","is-path-inside":"^3.0.3","js-yaml":"^4.1.0","json-stable-stringify-without-jsonify":"^1.0.1",levn:"^0.4.1","lodash.merge":"^4.6.2",minimatch:"^3.1.2","natural-compare":"^1.4.0",optionator:"^0.9.3","strip-ansi":"^6.0.1","text-table":"^0.2.0"},devDependencies:{"@babel/core":"^7.4.3","@babel/preset-env":"^7.4.3","@wdio/browser-runner":"^8.14.6","@wdio/cli":"^8.14.6","@wdio/concise-reporter":"^8.14.0","@wdio/globals":"^8.14.6","@wdio/mocha-framework":"^8.14.0","babel-loader":"^8.0.5",c8:"^7.12.0",chai:"^4.0.1",cheerio:"^0.22.0","common-tags":"^1.8.0","core-js":"^3.1.3",ejs:"^3.0.2",eslint:"file:.","eslint-config-eslint":"file:packages/eslint-config-eslint","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-eslint-plugin":"^5.2.1","eslint-plugin-internal-rules":"file:tools/internal-rules","eslint-plugin-jsdoc":"^46.2.5","eslint-plugin-n":"^16.6.0","eslint-plugin-unicorn":"^49.0.0","eslint-release":"^3.2.0",eslump:"^3.0.0",esprima:"^4.0.1","fast-glob":"^3.2.11","fs-teardown":"^0.1.3",glob:"^7.1.6",got:"^11.8.3","gray-matter":"^4.0.3","lint-staged":"^11.0.0","load-perf":"^0.2.0","markdown-it":"^12.2.0","markdown-it-container":"^3.0.0",markdownlint:"^0.32.0","markdownlint-cli":"^0.37.0",marked:"^4.0.8",memfs:"^3.0.1",metascraper:"^5.25.7","metascraper-description":"^5.25.7","metascraper-image":"^5.29.3","metascraper-logo":"^5.25.7","metascraper-logo-favicon":"^5.25.7","metascraper-title":"^5.25.7",mocha:"^8.3.2","mocha-junit-reporter":"^2.0.0","node-polyfill-webpack-plugin":"^1.0.3","npm-license":"^0.3.3",pirates:"^4.0.5",progress:"^2.0.3",proxyquire:"^2.0.1",recast:"^0.23.0","regenerator-runtime":"^0.14.0","rollup-plugin-node-polyfills":"^0.2.1",semver:"^7.5.3",shelljs:"^0.8.2",sinon:"^11.0.0","vite-plugin-commonjs":"^0.10.0",webdriverio:"^8.14.6",webpack:"^5.23.0","webpack-cli":"^4.5.0",yorkie:"^2.0.0"},keywords:["ast","lint","javascript","ecmascript","espree"],license:"MIT",engines:{node:"^12.22.0 || ^14.17.0 || >=16.0.0"}};function Av(){if(Ov)return Sv;Ov=1;const e=/\r\n|[\r\n\u2028\u2029]/u;return Sv={breakableTypePattern:/^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/u,lineBreakPattern:e,createGlobalLinebreakMatcher:function(){return new RegExp(e.source,"gu")},shebangPattern:/^#!([^\r\n]+)/u}}function Pv(){if(wv)return Tv;wv=1;return Tv={directivesPattern:/^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u}}var kv,Dv,Rv,Iv,Lv,Bv,Mv,jv,Nv,Fv={},Uv={exports:{}};function Vv(){return kv||(kv=1,function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=f-h,w=Math.floor,C=String.fromCharCode;function A(e){throw new RangeError(O[e])}function P(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+P((e=e.replace(S,".")).split("."),t).join(".")}function D(e){for(var t=[],n=0,r=e.length;n=55296&&i<=56319&&n>1,e+=w(e/t);e>T*m>>1;r+=f)e=w(e/T);return w(r+(T+1)*e/(e+g))},M=function(e){var t=[],n=e.length,r=0,i=b,s=_,o=e.lastIndexOf(v);o<0&&(o=0);for(var a=0;a=128&&A("not-basic"),t.push(e.charCodeAt(a));for(var l=o>0?o+1:0;l=n&&A("invalid-input");var g=I(e.charCodeAt(l++));(g>=f||g>w((d-r)/u))&&A("overflow"),r+=g*u;var y=p<=s?h:p>=s+m?m:p-s;if(gw(d/E)&&A("overflow"),u*=E}var x=t.length+1;s=B(r-c,x,0==c),w(r/x)>d-i&&A("overflow"),i+=w(r/x),r%=x,t.splice(r++,0,i)}return String.fromCodePoint.apply(String,t)},j=function(e){var t=[],n=(e=D(e)).length,r=b,i=0,s=_,o=!0,a=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var p=c.value;p<128&&t.push(C(p))}}catch(e){a=!0,l=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw l}}var g=t.length,y=g;for(g&&t.push(v);y=r&&kw((d-i)/R)&&A("overflow"),i+=(E-r)*R,r=E;var I=!0,M=!1,j=void 0;try{for(var N,F=e[Symbol.iterator]();!(I=(N=F.next()).done);I=!0){var U=N.value;if(Ud&&A("overflow"),U==r){for(var V=i,K=f;;K+=f){var W=K<=s?h:K>=s+m?m:K-s;if(V>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function W(e){for(var t="",n=0,r=e.length;n=194&&i<224){if(r-n>=6){var s=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&s)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var o=parseInt(e.substr(n+4,2),16),a=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function $(e,t){function n(e){var n=W(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,K).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,K).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,K).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,K).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,K).replace(t.PCT_ENCODED,i)),e}function q(e){return e.replace(/^0*(.*)/,"$1")||"0"}function Q(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(q).join("."):e}function z(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),i=r[1],s=r[2];if(i){for(var o=i.toLowerCase().split("::").reverse(),a=u(o,2),l=a[0],c=a[1],p=c?c.split(":").map(q):[],d=l.split(":").map(q),f=t.IPV4ADDRESS.test(d[d.length-1]),h=f?7:8,m=d.length-h,g=Array(h),y=0;y1){var v=g.slice(0,_.index),E=g.slice(_.index+_.length);b=v.join(":")+"::"+E.join(":")}else b=g.join(":");return s&&(b+="%"+s),b}return e}var X=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?c:l;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(X);if(i){G?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=z(Q(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var s=V[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)$(n,r);else{if(n.host&&(t.domainHost||s&&s.domainHost))try{n.host=U.toASCII(n.host.replace(r.PCT_ENCODED,W).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}$(n,l)}s&&s.parse&&s.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function H(e,t){var n=!1!==t.iri?c:l,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(z(Q(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}var Y=/^\.\.?\//,J=/^\/\.(\/|$)/,ee=/^\/\.\.(\/|$)/,te=/^\/?(?:.|\n)*?(?=\/|$)/;function ne(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(J))e=e.replace(J,"/");else if(e.match(ee))e=e.replace(ee,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(te);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?c:l,r=[],i=V[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(n.PCT_ENCODED,W).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}$(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var s=H(e,t);if(void 0!==s&&("suffix"!==t.reference&&r.push("//"),r.push(s),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var o=e.path;t.absolutePath||i&&i.absolutePath||(o=ne(o)),void 0===s&&(o=o.replace(/^\/\//,"/%2F")),r.push(o)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=Z(re(e,n),n),t=Z(re(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=ne(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=ne(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function se(e,t,n){var r=o({scheme:"null"},n);return re(ie(Z(e,r),Z(t,r),r,!0),r)}function oe(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===r(e)&&(e=Z(re(e,t),t)),e}function ae(e,t,n){return"string"==typeof e?e=re(Z(e,n),n):"object"===r(e)&&(e=re(e,n)),"string"==typeof t?t=re(Z(t,n),n):"object"===r(t)&&(t=re(t,n)),e===t}function le(e,t){return e&&e.toString().replace(t&&t.iri?c.ESCAPE:l.ESCAPE,K)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?c.PCT_ENCODED:l.PCT_ENCODED,W)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},pe={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function de(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=de(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(de(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),i=r[0],s=r[1];e.path=i&&"/"!==i?i:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},me={},ge="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",_e=n(n("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+n("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+n("%"+ye+ye)),be="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ve=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Ee="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(ge,"g"),Se=new RegExp(_e,"g"),Oe=new RegExp(t("[^]",be,"[\\.]",'[\\"]',ve),"g"),Te=new RegExp(t("[^]",ge,Ee),"g"),we=Te;function Ce(e){var t=W(e);return t.match(xe)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,s={},o=n.query.split("&"),a=0,l=o.length;a=55296&&t<=56319&&i=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var u=o,p=i.split("/"),f=0;f=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function c(e,t,n){var r=u.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function u(e,t,n){for(var r=0;r",_=f?">":"<",b=void 0;if(!d&&"number"!=typeof a&&void 0!==a)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(h+" must be number or boolean");if(g){var v=e.util.getData(m.$data,o,e.dataPathArr),E="exclusive"+s,x="exclType"+s,S="exclIsNumber"+s,O="' + "+(C="op"+s)+" + '";i+=" var schemaExcl"+s+" = "+v+"; ",i+=" var "+E+"; var "+x+" = typeof "+(v="schemaExcl"+s)+"; if ("+x+" != 'boolean' && "+x+" != 'undefined' && "+x+" != 'number') { ";var T;b=h;(T=T||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var w=i;i=T.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+x+" == 'number' ? ( ("+E+" = "+r+" === undefined || "+v+" "+y+"= "+r+") ? "+p+" "+_+"= "+v+" : "+p+" "+_+" "+r+" ) : ( ("+E+" = "+v+" === true) ? "+p+" "+_+"= "+r+" : "+p+" "+_+" "+r+" ) || "+p+" !== "+p+") { var op"+s+" = "+E+" ? '"+y+"' : '"+y+"='; ",void 0===a&&(b=h,c=e.errSchemaPath+"/"+h,r=v,d=g)}else{O=y;if((S="number"==typeof m)&&d){var C="'"+O+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+m+" "+y+"= "+r+" ? "+p+" "+_+"= "+m+" : "+p+" "+_+" "+r+" ) || "+p+" !== "+p+") { "}else{S&&void 0===a?(E=!0,b=h,c=e.errSchemaPath+"/"+h,r=m,_+="="):(S&&(r=Math[f?"min":"max"](m,a)),m===(!S||r)?(E=!0,b=h,c=e.errSchemaPath+"/"+h,_+="="):(E=!1,O+="="));C="'"+O+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+p+" "+_+" "+r+" || "+p+" !== "+p+") { "}}b=b||t,(T=T||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+C+", limit: "+r+", exclusive: "+E+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+O+" ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";w=i;return i=T.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { "),i}),LE}function gx(){return jE||(jE=1,ME=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+p+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var f=t,h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),ME}function yx(){return FE||(FE=1,NE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");var f="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+p+".length ":i+=" ucs2length("+p+") ",i+=" "+f+" "+r+") { ";var h=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),NE}function _x(){return VE||(VE=1,UE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+p+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var f=t,h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),UE}function bx(){if(ax)return ox;ax=1;var e=(sx||(sx=1,ix={$ref:(fE||(fE=1,dE=function(e,t,n){var r,i,s=" ",o=e.level,a=e.dataLevel,l=e.schema[t],c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(a||""),d="valid"+o;if("#"==l||"#/"==l)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var f=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===f){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(_=_||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),s+=" } "):s+=" {} ";var m=s;s=_.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),u&&(s+=" if (true) { ")}}else if(f.inline){var g=e.util.copy(e);g.level++;var y="valid"+g.level;g.schema=f.schema,g.schemaPath="",g.errSchemaPath=l,s+=" "+e.validate(g).replace(/validate\.schema/g,f.code)+" ",u&&(s+=" if ("+y+") { ")}else r=!0===f.$async||e.async&&!1!==f.$async,i=f.code}if(i){var _;(_=_||[]).push(s),s="",e.opts.passContext?s+=" "+i+".call(this, ":s+=" "+i+"( ",s+=" "+p+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var b=s+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData) ";if(s=_.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(s+=" var "+d+"; "),s+=" try { await "+b+"; ",u&&(s+=" "+d+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(s+=" "+d+" = false; "),s+=" } ",u&&(s+=" if ("+d+") { ")}else s+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",u&&(s+=" else { ")}return s}),dE),allOf:(mE||(mE=1,hE=function(e,t,n){var r=" ",i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),o=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,p=l.baseId,d=!0,f=i;if(f)for(var h,m=-1,g=f.length-1;m0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(d=!1,l.schema=h,l.schemaPath=s+"["+m+"]",l.errSchemaPath=o+"/"+m,r+=" "+e.validate(l)+" ",l.baseId=p,a&&(r+=" if ("+u+") { ",c+="}"));return a&&(r+=d?" if (true) { ":" "+c.slice(0,-1)+" "),r}),hE),anyOf:(yE||(yE=1,gE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e),h="";f.level++;var m="valid"+f.level,g=o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var y=f.baseId;r+=" var "+d+" = errors; var "+p+" = false; ";var _=e.compositeRule;e.compositeRule=f.compositeRule=!0;var b=o;if(b)for(var v,E=-1,x=b.length-1;E0||!1===o:e.util.schemaHasRules(o,e.RULES.all);if(r+="var "+d+" = errors;var "+p+";",b){var v=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=o,f.schemaPath=a,f.errSchemaPath=l,r+=" var "+h+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var E=u+"["+m+"]";f.dataPathArr[g]=m;var x=e.validate(f);f.baseId=_,e.util.varOccurences(x,y)<2?r+=" "+e.util.varReplace(x,y,E)+" ":r+=" var "+y+" = "+E+"; "+x+" ",r+=" if ("+h+") break; } ",e.compositeRule=f.compositeRule=v,r+=" if (!"+h+") {"}else r+=" if ("+u+".length == 0) {";var S=S||[];S.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var O=r;return r=S.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+O+"]); ":r+=" validate.errors = ["+O+"]; return false; ":r+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",b&&(r+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r}),xE),dependencies:(TE||(TE=1,OE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e),f="";d.level++;var h="valid"+d.level,m={},g={},y=e.opts.ownProperties;for(E in o)if("__proto__"!=E){var _=o[E],b=Array.isArray(_)?g:m;b[E]=_}r+="var "+p+" = errors;";var v=e.errorPath;for(var E in r+="var missing"+i+";",g)if((b=g[E]).length){if(r+=" if ( "+u+e.util.getProperty(E)+" !== undefined ",y&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(E)+"') "),c){r+=" && ( ";var x=b;if(x)for(var S=-1,O=x.length-1;S0||!1===_:e.util.schemaHasRules(_,e.RULES.all))&&(r+=" "+h+" = true; if ( "+u+e.util.getProperty(E)+" !== undefined ",y&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(E)+"') "),r+=") { ",d.schema=_,d.schemaPath=a+e.util.getProperty(E),d.errSchemaPath=l+"/"+e.util.escapeFragment(E),r+=" "+e.validate(d)+" ",d.baseId=B,r+=" } ",c&&(r+=" if ("+h+") { ",f+="}"));return c&&(r+=" "+f+" if ("+p+" == errors) {"),r}),OE),enum:(CE||(CE=1,wE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d=e.opts.$data&&o&&o.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="i"+i,h="schema"+i;d||(r+=" var "+h+" = validate.schema"+a+";"),r+="var "+p+";",d&&(r+=" if (schema"+i+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+i+")) "+p+" = false; else {"),r+=p+" = false;for (var "+f+"=0; "+f+"<"+h+".length; "+f+"++) if (equal("+u+", "+h+"["+f+"])) { "+p+" = true; break; }",d&&(r+=" } "),r+=" if (!"+p+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var g=r;return r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}),wE),format:(PE||(PE=1,AE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||"");if(!1===e.opts.format)return c&&(r+=" if (true) { "),r;var p,d=e.opts.$data&&o&&o.$data;d?(r+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+i):p=o;var f=e.opts.unknownFormats,h=Array.isArray(f);if(d)r+=" var "+(m="format"+i)+" = formats["+p+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(y="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(r+=" var async"+i+" = "+m+".async; "),r+=" "+m+" = "+m+".validate; } if ( ",d&&(r+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),r+=" (","ignore"!=f&&(r+=" ("+p+" && !"+m+" ",h&&(r+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),r+=") || "),r+=" ("+m+" && "+y+" == '"+n+"' && !(typeof "+m+" == 'function' ? ",e.async?r+=" (async"+i+" ? await "+m+"("+u+") : "+m+"("+u+")) ":r+=" "+m+"("+u+") ",r+=" : "+m+".test("+u+"))))) {";else{var m;if(!(m=e.formats[o])){if("ignore"==f)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(r+=" if (true) { "),r;if(h&&f.indexOf(o)>=0)return c&&(r+=" if (true) { "),r;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,y=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var _=!0===m.async;m=m.validate}if(y!=n)return c&&(r+=" if (true) { "),r;if(_){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(b="formats"+e.util.getProperty(o)+".validate")+"("+u+"))) { "}else{r+=" if (! ";var b="formats"+e.util.getProperty(o);g&&(b+=".validate"),r+="function"==typeof m?" "+b+"("+u+") ":" "+b+".test("+u+") ",r+=") { "}}var v=v||[];v.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",r+=d?""+p:""+e.util.toQuotedString(o),r+=" } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=d?"' + "+p+" + '":""+e.util.escapeQuotes(o),r+="\"' "),e.opts.verbose&&(r+=" , schema: ",r+=d?"validate.schema"+a:""+e.util.toQuotedString(o),r+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var E=r;return r=v.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r}),AE),if:(DE||(DE=1,kE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e);f.level++;var h="valid"+f.level,m=e.schema.then,g=e.schema.else,y=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),_=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=f.baseId;if(y||_){var v;f.createErrors=!1,f.schema=o,f.schemaPath=a,f.errSchemaPath=l,r+=" var "+d+" = errors; var "+p+" = true; ";var E=e.compositeRule;e.compositeRule=f.compositeRule=!0,r+=" "+e.validate(f)+" ",f.baseId=b,f.createErrors=!0,r+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=f.compositeRule=E,y?(r+=" if ("+h+") { ",f.schema=e.schema.then,f.schemaPath=e.schemaPath+".then",f.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(f)+" ",f.baseId=b,r+=" "+p+" = "+h+"; ",y&&_?r+=" var "+(v="ifClause"+i)+" = 'then'; ":v="'then'",r+=" } ",_&&(r+=" else { ")):r+=" if (!"+h+") { ",_&&(f.schema=e.schema.else,f.schemaPath=e.schemaPath+".else",f.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(f)+" ",f.baseId=b,r+=" "+p+" = "+h+"; ",y&&_?r+=" var "+(v="ifClause"+i)+" = 'else'; ":v="'else'",r+=" } "),r+=" if (!"+p+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+v+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+v+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",c&&(r+=" else { ")}else c&&(r+=" if (true) { ");return r}),kE),items:(IE||(IE=1,RE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e),h="";f.level++;var m="valid"+f.level,g="i"+i,y=f.dataLevel=e.dataLevel+1,_="data"+y,b=e.baseId;if(r+="var "+d+" = errors;var "+p+";",Array.isArray(o)){var v=e.schema.additionalItems;if(!1===v){r+=" "+p+" = "+u+".length <= "+o.length+"; ";var E=l;l=e.errSchemaPath+"/additionalItems",r+=" if (!"+p+") { ";var x=x||[];x.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var S=r;r=x.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+S+"]); ":r+=" validate.errors = ["+S+"]; return false; ":r+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",l=E,c&&(h+="}",r+=" else { ")}var O=o;if(O)for(var T,w=-1,C=O.length-1;w0||!1===T:e.util.schemaHasRules(T,e.RULES.all)){r+=" "+m+" = true; if ("+u+".length > "+w+") { ";var A=u+"["+w+"]";f.schema=T,f.schemaPath=a+"["+w+"]",f.errSchemaPath=l+"/"+w,f.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0),f.dataPathArr[y]=w;var P=e.validate(f);f.baseId=b,e.util.varOccurences(P,_)<2?r+=" "+e.util.varReplace(P,_,A)+" ":r+=" var "+_+" = "+A+"; "+P+" ",r+=" } ",c&&(r+=" if ("+m+") { ",h+="}")}"object"==typeof v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all))&&(f.schema=v,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+m+" = true; if ("+u+".length > "+o.length+") { for (var "+g+" = "+o.length+"; "+g+" < "+u+".length; "+g+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0),A=u+"["+g+"]",f.dataPathArr[y]=g,P=e.validate(f),f.baseId=b,e.util.varOccurences(P,_)<2?r+=" "+e.util.varReplace(P,_,A)+" ":r+=" var "+_+" = "+A+"; "+P+" ",c&&(r+=" if (!"+m+") break; "),r+=" } } ",c&&(r+=" if ("+m+") { ",h+="}"))}else(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all))&&(f.schema=o,f.schemaPath=a,f.errSchemaPath=l,r+=" for (var "+g+" = 0; "+g+" < "+u+".length; "+g+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0),A=u+"["+g+"]",f.dataPathArr[y]=g,P=e.validate(f),f.baseId=b,e.util.varOccurences(P,_)<2?r+=" "+e.util.varReplace(P,_,A)+" ":r+=" var "+_+" = "+A+"; "+P+" ",c&&(r+=" if (!"+m+") break; "),r+=" }");return c&&(r+=" "+h+" if ("+d+" == errors) {"),r}),RE),maximum:mx(),minimum:mx(),maxItems:gx(),minItems:gx(),maxLength:yx(),minLength:yx(),maxProperties:_x(),minProperties:_x(),multipleOf:(WE||(WE=1,KE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;if(d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,!d&&"number"!=typeof a)throw new Error(t+" must be number");i+="var division"+s+";if (",d&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+s+" = "+p+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+s+" !== parseInt(division"+s+") ",i+=" ) ",d&&(i+=" ) "),i+=" ) { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var h=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),KE),not:(qE||(qE=1,$E=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=a,d.errSchemaPath=l,r+=" var "+p+" = errors; ";var h,m=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(h=d.opts.allErrors,d.opts.allErrors=!1),r+=" "+e.validate(d)+" ",d.createErrors=!0,h&&(d.opts.allErrors=h),e.compositeRule=d.compositeRule=m,r+=" if ("+f+") { ";var g=g||[];g.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var y=r;r=g.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+y+"]); ":r+=" validate.errors = ["+y+"]; return false; ":r+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}),$E),oneOf:(zE||(zE=1,QE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+i,d="errs__"+i,f=e.util.copy(e),h="";f.level++;var m="valid"+f.level,g=f.baseId,y="prevValid"+i,_="passingSchemas"+i;r+="var "+d+" = errors , "+y+" = false , "+p+" = false , "+_+" = null; ";var b=e.compositeRule;e.compositeRule=f.compositeRule=!0;var v=o;if(v)for(var E,x=-1,S=v.length-1;x0||!1===E:e.util.schemaHasRules(E,e.RULES.all))?(f.schema=E,f.schemaPath=a+"["+x+"]",f.errSchemaPath=l+"/"+x,r+=" "+e.validate(f)+" ",f.baseId=g):r+=" var "+m+" = true; ",x&&(r+=" if ("+m+" && "+y+") { "+p+" = false; "+_+" = ["+_+", "+x+"]; } else { ",h+="}"),r+=" if ("+m+") { "+p+" = "+y+" = true; "+_+" = "+x+"; }";return e.compositeRule=f.compositeRule=b,r+=h+"if (!"+p+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+_+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r}),QE),pattern:(GE||(GE=1,XE=function(e,t,n){var r,i=" ",s=e.level,o=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+s+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",r="schema"+s):r=a,i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(d?"(new RegExp("+r+"))":e.usePattern(a))+".test("+p+") ) { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",i+=d?""+r:""+e.util.toQuotedString(a),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=d?"' + "+r+" + '":""+e.util.escapeQuotes(a),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var h=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}),XE),properties:(HE||(HE=1,ZE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e),f="";d.level++;var h="valid"+d.level,m="key"+i,g="idx"+i,y=d.dataLevel=e.dataLevel+1,_="data"+y,b="dataProperties"+i,v=Object.keys(o||{}).filter(I),E=e.schema.patternProperties||{},x=Object.keys(E).filter(I),S=e.schema.additionalProperties,O=v.length||x.length,T=!1===S,w="object"==typeof S&&Object.keys(S).length,C=e.opts.removeAdditional,A=T||w||C,P=e.opts.ownProperties,k=e.baseId,D=e.schema.required;if(D&&(!e.opts.$data||!D.$data)&&D.length8)r+=" || validate.schema"+a+".hasOwnProperty("+m+") ";else{var L=v;if(L)for(var B=-1,M=L.length-1;B0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var J=e.util.getProperty(G),ee=(q=u+J,z&&void 0!==Y.default);if(d.schema=Y,d.schemaPath=a+J,d.errSchemaPath=l+"/"+e.util.escapeFragment(G),d.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),d.dataPathArr[y]=e.util.toQuotedString(G),Q=e.validate(d),d.baseId=k,e.util.varOccurences(Q,_)<2){Q=e.util.varReplace(Q,_,q);var te=q}else te=_,r+=" var "+_+" = "+q+"; ";if(ee)r+=" "+Q+" ";else{if(R&&R[G]){r+=" if ( "+te+" === undefined ",P&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),r+=") { "+h+" = false; ",U=e.errorPath,K=l;var ne,re=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(U,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(ne=ne||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+re+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+re+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",W=r,r=ne.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+W+"]); ":r+=" validate.errors = ["+W+"]; return false; ":r+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=K,e.errorPath=U,r+=" } else { "}else c?(r+=" if ( "+te+" === undefined ",P&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),r+=") { "+h+" = true; } else { "):(r+=" if ("+te+" !== undefined ",P&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),r+=" ) { ");r+=" "+Q+" } "}}c&&(r+=" if ("+h+") { ",f+="}")}}if(x.length){var ie=x;if(ie)for(var se,oe=-1,ae=ie.length-1;oe0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all))&&(d.schema=Y,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(se),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(se),r+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+u+") { ",r+=" if ("+e.usePattern(se)+".test("+m+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers),q=u+"["+m+"]",d.dataPathArr[y]=m,Q=e.validate(d),d.baseId=k,e.util.varOccurences(Q,_)<2?r+=" "+e.util.varReplace(Q,_,q)+" ":r+=" var "+_+" = "+q+"; "+Q+" ",c&&(r+=" if (!"+h+") break; "),r+=" } ",c&&(r+=" else "+h+" = true; "),r+=" } ",c&&(r+=" if ("+h+") { ",f+="}"))}return c&&(r+=" "+f+" if ("+p+" == errors) {"),r}),ZE),propertyNames:(JE||(JE=1,YE=function(e,t,n){var r=" ",i=e.level,s=e.dataLevel,o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+i,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(r+="var "+p+" = errors;",e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=a,d.errSchemaPath=l;var h="key"+i,m="idx"+i,g="i"+i,y="' + "+h+" + '",_="data"+(d.dataLevel=e.dataLevel+1),b="dataProperties"+i,v=e.opts.ownProperties,E=e.baseId;v&&(r+=" var "+b+" = undefined; "),r+=v?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+h+" = "+b+"["+m+"]; ":" for (var "+h+" in "+u+") { ",r+=" var startErrs"+i+" = errors; ";var x=h,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var O=e.validate(d);d.baseId=E,e.util.varOccurences(O,_)<2?r+=" "+e.util.varReplace(O,_,x)+" ":r+=" var "+_+" = "+x+"; "+O+" ",e.compositeRule=d.compositeRule=S,r+=" if (!"+f+") { for (var "+g+"=startErrs"+i+"; "+g+"0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=g)}}else h=o;if(d||h.length){var v=e.errorPath,E=d||h.length>=e.opts.loopRequired,x=e.opts.ownProperties;if(c)if(r+=" var missing"+i+"; ",E){d||(r+=" var "+f+" = validate.schema"+a+"; ");var S="' + "+(P="schema"+i+"["+(C="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(v,P,e.opts.jsonPointers)),r+=" var "+p+" = true; ",d&&(r+=" if (schema"+i+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+i+")) "+p+" = false; else {"),r+=" for (var "+C+" = 0; "+C+" < "+f+".length; "+C+"++) { "+p+" = "+u+"["+f+"["+C+"]] !== undefined ",x&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+C+"]) "),r+="; if (!"+p+") break; } ",d&&(r+=" } "),r+=" if (!"+p+") { ",(T=T||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+S+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var O=r;r=T.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+O+"]); ":r+=" validate.errors = ["+O+"]; return false; ":r+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var T,w=h;if(w)for(var C=-1,A=w.length-1;C 1) { ";var h=e.schema.items&&e.schema.items.type,m=Array.isArray(h);if(!h||"object"==h||"array"==h||m&&(h.indexOf("object")>=0||h.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+d+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](h,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",f&&(i+=" } "),i+=" if (!"+d+") { ";var y=y||[];y.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var _=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { ")}else u&&(i+=" if (true) { ");return i}),nx),validate:aE()}),ix),t=Wv().toHash;return ox=function(){var n=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],r=["type","$comment"];return n.all=t(r),n.types=t(["number","integer","string","array","object","boolean","null"]),n.forEach((function(t){t.rules=t.rules.map((function(t){var i;if("object"==typeof t){var s=Object.keys(t)[0];i=t[s],t=s,i.forEach((function(e){r.push(e),n.all[e]=!0}))}return r.push(t),n.all[t]={keyword:t,code:e[t],implements:i}})),n.all.$comment={keyword:"$comment",code:e.$comment},t.type&&(n.types[t.type]=t)})),n.keywords=t(r.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),n.custom={},n},ox}function vx(){if(px)return ux;px=1;var e=sE().MissingRef;return ux=function t(n,r,i){var s=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(i=r,r=void 0);var o=a(n).then((function(){var e=s._addSchema(n,void 0,r);return e.validate||l(e)}));i&&o.then((function(e){i(null,e)}),i);return o;function a(e){var n=e.$schema;return n&&!s.getSchema(n)?t.call(s,{$ref:n},!0):Promise.resolve()}function l(t){try{return s._compile(t)}catch(n){if(n instanceof e)return function(e){var n=e.missingSchema;if(c(n))throw new Error("Schema "+n+" is loaded but "+e.missingRef+" cannot be resolved");var i=s._loadingSchemas[n];i||(i=s._loadingSchemas[n]=s._opts.loadSchema(n)).then(o,o);return i.then((function(e){if(!c(n))return a(e).then((function(){c(n)||s.addSchema(e,n,void 0,r)}))})).then((function(){return l(t)}));function o(){delete s._loadingSchemas[n]}function c(e){return s._refs[e]||s._schemas[e]}}(n);throw n}}},ux}var Ex,xx,Sx,Ox,Tx={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};function wx(){if(Ox)return Sx;Ox=1;var e=/^[a-z_$][a-z0-9_$-]*$/i,t=(fx||(fx=1,dx=function(e,t,n){var r,i,s=" ",o=e.level,a=e.dataLevel,l=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,d="data"+(a||""),f="valid"+o,h="errs__"+o,m=e.opts.$data&&l&&l.$data;m?(s+=" var schema"+o+" = "+e.util.getData(l.$data,a,e.dataPathArr)+"; ",i="schema"+o):i=l;var g,y,_,b,v,E=this,x="definition"+o,S=E.definition,O="";if(m&&S.$data){v="keywordValidate"+o;var T=S.validateSchema;s+=" var "+x+" = RULES.custom['"+t+"'].definition; var "+v+" = "+x+".validate;"}else{if(!(b=e.useCustomRule(E,l,e.schema,e)))return;i="validate.schema"+c,v=b.code,g=S.compile,y=S.inline,_=S.macro}var w=v+".errors",C="i"+o,A="ruleErr"+o,P=S.async;if(P&&!e.async)throw new Error("async keyword in sync schema");if(y||_||(s+=w+" = null;"),s+="var "+h+" = errors;var "+f+";",m&&S.$data&&(O+="}",s+=" if ("+i+" === undefined) { "+f+" = true; } else { ",T&&(O+="}",s+=" "+f+" = "+x+".validateSchema("+i+"); if ("+f+") { ")),y)S.statements?s+=" "+b.validate+" ":s+=" "+f+" = "+b.validate+"; ";else if(_){var k=e.util.copy(e);O="",k.level++;var D="valid"+k.level;k.schema=b.validate,k.schemaPath="";var R=e.compositeRule;e.compositeRule=k.compositeRule=!0;var I=e.validate(k).replace(/validate\.schema/g,v);e.compositeRule=k.compositeRule=R,s+=" "+I}else{(j=j||[]).push(s),s="",s+=" "+v+".call( ",e.opts.passContext?s+="this":s+="self",g||!1===S.schema?s+=" , "+d+" ":s+=" , "+i+" , "+d+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var L=a?"data"+(a-1||""):"parentData",B=a?e.dataPathArr[a]:"parentDataProperty",M=s+=" , "+L+" , "+B+" , rootData ) ";s=j.pop(),!1===S.errors?(s+=" "+f+" = ",P&&(s+="await "),s+=M+"; "):s+=P?" var "+(w="customErrors"+o)+" = null; try { "+f+" = await "+M+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+w+" = e.errors; else throw e; } ":" "+w+" = null; "+f+" = "+M+"; "}if(S.modifying&&(s+=" if ("+L+") "+d+" = "+L+"["+B+"];"),s+=""+O,S.valid)p&&(s+=" if (true) { ");else{var j;s+=" if ( ",void 0===S.valid?(s+=" !",s+=_?""+D:""+f):s+=" "+!S.valid+" ",s+=") { ",r=E.keyword,(j=j||[]).push(s),s="",(j=j||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),s+=" } "):s+=" {} ";var N=s;s=j.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+N+"]); ":s+=" validate.errors = ["+N+"]; return false; ":s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var F=s;s=j.pop(),y?S.errors?"full"!=S.errors&&(s+=" for (var "+C+"="+h+"; "+C+"%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,a=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,l=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,c=/^(?:\/(?:[^~/]|~0|~1)*)*$/,u=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function d(t){return t="full"==t?"full":"fast",e.copy(d[t])}function f(e){var r=e.match(t);if(!r)return!1;var i=+r[1],s=+r[2],o=+r[3];return s>=1&&s<=12&&o>=1&&o<=(2==s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(i)?29:n[s])}function h(e,t){var n=e.match(r);if(!n)return!1;var i=n[1],s=n[2],o=n[3],a=n[5];return(i<=23&&s<=59&&o<=59||23==i&&59==s&&60==o)&&(!t||a)}uE=d,d.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":o,url:a,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:_,uuid:l,"json-pointer":c,"json-pointer-uri-fragment":u,"relative-json-pointer":p},d.full={date:f,time:h,"date-time":function(e){var t=e.split(m);return 2==t.length&&f(t[0])&&h(t[1],!0)},uri:function(e){return g.test(e)&&s.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":o,url:a,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:_,uuid:l,"json-pointer":c,"json-pointer-uri-fragment":u,"relative-json-pointer":p};var m=/t|\s/i,g=/\/|:/,y=/[^\\]\\Z/;function _(e){if(y.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}return uE}(),o=bx(),a=function(){if(cx)return lx;cx=1;var e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return lx=function(t,n){for(var r=0;r(e[t]=n,e)),{}),p=[0,1,2,"off","warn","error"];function d(e){const t=Array.isArray(e)?e[0]:e;return 0===t||1===t||2===t?t:"string"==typeof t&&u[t.toLowerCase()]||0}function f(e){let t=Array.isArray(e)?e[0]:e;return"string"==typeof t&&(t=t.toLowerCase()),-1!==p.indexOf(t)}function h(e){switch(e){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${e}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}var m={__proto__:null,getRuleSeverity:d,normalizeToStrings:function(e){e.rules&&Object.keys(e.rules).forEach((t=>{const n=e.rules[t];"number"==typeof n?e.rules[t]=c[n]||c[0]:Array.isArray(n)&&"number"==typeof n[0]&&(n[0]=c[n[0]]||c[0])}))},isErrorSeverity:function(e){return 2===d(e)},isValidSeverity:f,isEverySeverityValid:function(e){return Object.keys(e).every((t=>f(e[t])))},normalizeConfigGlobal:h};const g={ESLINT_LEGACY_ECMAFEATURES:"The 'ecmaFeatures' config file property is deprecated and has no effect.",ESLINT_PERSONAL_CONFIG_LOAD:"'~/.eslintrc.*' config files have been deprecated. Please use a config file per project or the '--config' option.",ESLINT_PERSONAL_CONFIG_SUPPRESS:"'~/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '~/.eslintrc.*' accidentally."},y=new Set;const _={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};const b={$schema:{type:"string"},env:{type:"object"},extends:{$ref:"#/definitions/stringOrStrings"},globals:{type:"object"},overrides:{type:"array",items:{$ref:"#/definitions/overrideConfig"},additionalItems:!1},parser:{type:["string","null"]},parserOptions:{type:"object"},plugins:{type:"array"},processor:{type:"string"},rules:{type:"object"},settings:{type:"object"},noInlineConfig:{type:"boolean"},reportUnusedDisableDirectives:{type:"boolean"},ecmaFeatures:{type:"object"}},v={definitions:{stringOrStrings:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1}]},stringOrStringsRequired:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},additionalItems:!1,minItems:1}]},objectConfig:{type:"object",properties:{root:{type:"boolean"},ignorePatterns:{$ref:"#/definitions/stringOrStrings"},...b},additionalProperties:!1},overrideConfig:{type:"object",properties:{excludedFiles:{$ref:"#/definitions/stringOrStrings"},files:{$ref:"#/definitions/stringOrStringsRequired"},...b},required:["files"],additionalProperties:!1}},$ref:"#/definitions/objectConfig"};const E=function(e,t){const n={};for(const[r,i]of Object.entries(e))Object.hasOwnProperty.call(t,r)||(n[r]=i);return n}(l.default.es2015,l.default.es5),x={Atomics:!1,SharedArrayBuffer:!1},S={BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,globalThis:!1},O={AggregateError:!1,FinalizationRegistry:!1,WeakRef:!1};var T=new Map(Object.entries({builtin:{globals:l.default.es5},es6:{globals:E,parserOptions:{ecmaVersion:6}},es2015:{globals:E,parserOptions:{ecmaVersion:6}},es2016:{globals:E,parserOptions:{ecmaVersion:7}},es2017:{globals:{...E,...x},parserOptions:{ecmaVersion:8}},es2018:{globals:{...E,...x},parserOptions:{ecmaVersion:9}},es2019:{globals:{...E,...x},parserOptions:{ecmaVersion:10}},es2020:{globals:{...E,...x,...S},parserOptions:{ecmaVersion:11}},es2021:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:12}},es2022:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:13}},es2023:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:14}},es2024:{globals:{...E,...x,...S,...O},parserOptions:{ecmaVersion:15}},browser:{globals:l.default.browser},node:{globals:l.default.node,parserOptions:{ecmaFeatures:{globalReturn:!0}}},"shared-node-browser":{globals:l.default["shared-node-browser"]},worker:{globals:l.default.worker},serviceworker:{globals:l.default.serviceworker},commonjs:{globals:l.default.commonjs,parserOptions:{ecmaFeatures:{globalReturn:!0}}},amd:{globals:l.default.amd},mocha:{globals:l.default.mocha},jasmine:{globals:l.default.jasmine},jest:{globals:l.default.jest},phantomjs:{globals:l.default.phantomjs},jquery:{globals:l.default.jquery},qunit:{globals:l.default.qunit},prototypejs:{globals:l.default.prototypejs},shelljs:{globals:l.default.shelljs},meteor:{globals:l.default.meteor},mongo:{globals:l.default.mongo},protractor:{globals:l.default.protractor},applescript:{globals:l.default.applescript},nashorn:{globals:l.default.nashorn},atomtest:{globals:l.default.atomtest},embertest:{globals:l.default.embertest},webextensions:{globals:l.default.webextensions},greasemonkey:{globals:l.default.greasemonkey}}));const w=((e={})=>{const t=new a.default({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...e});return t.addMetaSchema(_),t._opts.defaultMeta=_.id,t})(),C=new WeakMap,A=Function.prototype;let P;const k={error:2,warn:1,off:0},D=new WeakSet;const R=/^@.*\//iu;var I={__proto__:null,normalizePackageName:function(e,t){let n=e;if(n.includes("\\")&&(n=n.replace(/\\/gu,"/")),"@"===n.charAt(0)){const e=new RegExp(`^(@[^/]+)(?:/(?:${t})?)?$`,"u"),r=new RegExp(`^${t}(-|$)`,"u");e.test(n)?n=n.replace(e,`$1/${t}`):r.test(n.split("/")[1])||(n=n.replace(/^@([^/]+)\/(.*)$/u,`@$1/${t}-$2`))}else n.startsWith(`${t}-`)||(n=`${t}-${n}`);return n},getShorthandName:function(e,t){if("@"===e[0]){let n=new RegExp(`^(@[^/]+)/${t}$`,"u").exec(e);if(n)return n[1];if(n=new RegExp(`^(@[^/]+)/${t}-(.+)$`,"u").exec(e),n)return`${n[1]}/${n[2]}`}else if(e.startsWith(`${t}-`))return e.slice(t.length+1);return e},getNamespaceFromTerm:function(e){const t=e.match(R);return t?t[0]:""}};const L={environments:T,ConfigOps:m,ConfigValidator:class{constructor({builtInRules:e=new Map}={}){this.builtInRules=e}getRuleOptionsSchema(e){if(!e)return null;const t=e.schema||e.meta&&e.meta.schema;return Array.isArray(t)?t.length?{type:"array",items:t,minItems:0,maxItems:t.length}:{type:"array",minItems:0,maxItems:0}:t||null}validateRuleSeverity(e){const t=Array.isArray(e)?e[0]:e,n="string"==typeof t?k[t.toLowerCase()]:t;if(0===n||1===n||2===n)return n;throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${s.default.inspect(t).replace(/'/gu,'"').replace(/\n/gu,"")}').\n`)}validateRuleSchema(e,t){if(!C.has(e)){const t=this.getRuleOptionsSchema(e);t&&C.set(e,w.compile(t))}const n=C.get(e);if(n&&(n(t),n.errors))throw new Error(n.errors.map((e=>`\tValue ${JSON.stringify(e.data)} ${e.message}.\n`)).join(""))}validateRuleOptions(e,t,n,r=null){try{0!==this.validateRuleSeverity(n)&&this.validateRuleSchema(e,Array.isArray(n)?n.slice(1):[])}catch(e){const n=`Configuration for rule "${t}" is invalid:\n${e.message}`;throw"string"==typeof r?new Error(`${r}:\n\t${n}`):new Error(n)}}validateEnvironment(e,t,n=A){e&&Object.keys(e).forEach((e=>{if(!(n(e)||T.get(e)||null)){throw new Error(`${t}:\n\tEnvironment key "${e}" is unknown\n`)}}))}validateRules(e,t,n=A){e&&Object.keys(e).forEach((r=>{const i=n(r)||this.builtInRules.get(r)||null;this.validateRuleOptions(i,r,e[r],t)}))}validateGlobals(e,t=null){e&&Object.entries(e).forEach((([e,n])=>{try{h(n)}catch(n){throw new Error(`ESLint configuration of global '${e}' in ${t} is invalid:\n${n.message}`)}}))}validateProcessor(e,t,n){if(e&&!n(e))throw new Error(`ESLint configuration of processor in '${t}' is invalid: '${e}' was not found.`)}formatErrors(e){return e.map((e=>{if("additionalProperties"===e.keyword){return`Unexpected top-level property "${e.dataPath.length?`${e.dataPath.slice(1)}.${e.params.additionalProperty}`:e.params.additionalProperty}"`}if("type"===e.keyword){return`Property "${e.dataPath.slice(1)}" is the wrong type (expected ${Array.isArray(e.schema)?e.schema.join("/"):e.schema} but got \`${JSON.stringify(e.data)}\`)`}return`"${"."===e.dataPath[0]?e.dataPath.slice(1):e.dataPath}" ${e.message}. Value: ${JSON.stringify(e.data)}`})).map((e=>`\t- ${e}.\n`)).join("")}validateConfigSchema(e,t=null){if(P=P||w.compile(v),!P(e))throw new Error(`ESLint configuration in ${t} is invalid:\n${this.formatErrors(P.errors)}`);Object.hasOwnProperty.call(e,"ecmaFeatures")&&function(e,t){const n=JSON.stringify({source:e,errorCode:t});if(y.has(n))return;y.add(n);const r=o.default.relative(by.cwd(),e),i=g[t];by.emitWarning(`${i} (found in "${r}")`,"DeprecationWarning",t)}(t,"ESLINT_LEGACY_ECMAFEATURES")}validate(e,t,n,r){this.validateConfigSchema(e,t),this.validateRules(e.rules,t,n),this.validateEnvironment(e.env,t,r),this.validateGlobals(e.globals,t);for(const i of e.overrides||[])this.validateRules(i.rules,t,n),this.validateEnvironment(i.env,t,r),this.validateGlobals(e.globals,t)}validateConfigArray(e){const t=Map.prototype.get.bind(e.pluginEnvironments),n=Map.prototype.get.bind(e.pluginProcessors),r=Map.prototype.get.bind(e.pluginRules);for(const i of e)D.has(i)||(D.add(i),this.validateEnvironment(i.env,i.name,t),this.validateGlobals(i.globals,i.name),this.validateProcessor(i.processor,i.name,n),this.validateRules(i.rules,i.name,r))}},naming:I};return Fv.Legacy=L,Fv}var jx,Nx,Fx,Ux,Vx,Kx={exports:{}},Wx={exports:{}};function $x(){if(Nx)return jx;Nx=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,s=365.25*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return jx=function(a,l){l=l||{};var c=typeof a;if("string"===c&&a.length>0)return function(o){if((o=String(o)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!a)return;var l=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(a);if("number"===c&&isFinite(a))return l.long?function(i){var s=Math.abs(i);if(s>=r)return o(i,s,r,"day");if(s>=n)return o(i,s,n,"hour");if(s>=t)return o(i,s,t,"minute");if(s>=e)return o(i,s,e,"second");return i+" ms"}(a):function(i){var s=Math.abs(i);if(s>=r)return Math.round(i/r)+"d";if(s>=n)return Math.round(i/n)+"h";if(s>=t)return Math.round(i/t)+"m";if(s>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},jx}function qx(){if(Ux)return Fx;return Ux=1,Fx=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(43683);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys({NODE_ENV:"production",PUBLIC_PATH:"/designer/"}).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r={NODE_ENV:"production",PUBLIC_PATH:"/designer/"}[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=qx()(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(Qx,Qx.exports)),Qx.exports}function Jx(){return Xx||(Xx=1,void 0===by||"renderer"===by.type||!0===by.browser||by.__nwjs?Kx.exports=(Vx||(Vx=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==by&&"env"in by&&(e={NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=qx()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Wx,Wx.exports)),Wx.exports):Kx.exports=Yx()),Kx.exports}function eS(){if(Zx)return Gx;Zx=1;const e=lv(),t=Jx()("eslint:traverser");function n(){}class r{constructor(){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=null,this._enter=null,this._leave=null}current(){return this._current}parents(){return this._parents.slice(0)}break(){this._broken=!0}skip(){this._skipped=!0}traverse(t,r){this._current=null,this._parents=[],this._skipped=!1,this._broken=!1,this._visitorKeys=r.visitorKeys||e.KEYS,this._enter=r.enter||n,this._leave=r.leave||n,this._traverse(t,null)}_traverse(n,r){if(function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}(n)){if(this._current=n,this._skipped=!1,this._enter(n,r),!this._skipped&&!this._broken){const r=function(n,r){let i=n[r.type];return i||(i=e.getKeys(r),t('Unknown node type "%s": Estimated visitor keys %j',r.type,i)),i}(this._visitorKeys,n);if(r.length>=1){this._parents.push(n);for(let e=0;e")}function l(e){return o(e,",")}function c(e){return o(e,";")}function u(e){return o(e,":")}function p(e){return o(e,"(")}function d(e){return o(e,")")}function f(e){return o(e,"[")}function h(e){return o(e,"]")}function m(e){return o(e,"{")}function g(e){return o(e,"}")}function y(e){return["Block","Line","Shebang"].includes(e.type)}const _=s(a),b=s(l),v=s(c),E=s(u),x=s(p),S=s(d),O=s(f),T=s(h),w=s(m),C=s(g),A=s(y);function P(e,t){return e.id?t.getTokenAfter(e.id,p):t.getFirstToken(e,p)}function k(e,t){const n=e.parent;let r=null,i=null;if("ArrowFunctionExpression"===e.type){const n=t.getTokenBefore(e.body,a);r=n.loc.start,i=n.loc.end}else"Property"===n.type||"MethodDefinition"===n.type||"PropertyDefinition"===n.type?(r=n.loc.start,i=P(e,t).loc.start):(r=e.loc.start,i=P(e,t).loc.start);return{start:{...r},end:{...i}}}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==vy?vy:{},R=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),I=new Set([Array.isArray,"function"==typeof BigInt?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,...Object.getOwnPropertyNames(Math).map((e=>Math[e])).filter((e=>"function"==typeof e)),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,String,String.fromCharCode,String.fromCodePoint,String.raw,Symbol.for,Symbol.keyFor,unescape].filter((e=>"function"==typeof e))),L=new Set([Object.freeze,Object.preventExtensions,Object.seal]);function B(e,t){const n=function(e,t){let n=e;for(;("object"==typeof n||"function"==typeof n)&&null!==n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}return null}(e,t);return null!=n&&null!=n.get}function M(e,t){const n=[];for(let r=0;r":return{value:n.value>r.value};case">=":return{value:n.value>=r.value};case"<<":return{value:n.value<>":return{value:n.value>>r.value};case">>>":return{value:n.value>>>r.value};case"+":return{value:n.value+r.value};case"-":return{value:n.value-r.value};case"*":return{value:n.value*r.value};case"/":return{value:n.value/r.value};case"%":return{value:n.value%r.value};case"**":return{value:n.value**r.value};case"|":return{value:n.value|r.value};case"^":return{value:n.value^r.value};case"&":return{value:n.value&r.value}}return null},CallExpression(e,t){const n=e.callee,r=M(e.arguments,t);if(null!=r)if("MemberExpression"===n.type){if("PrivateIdentifier"===n.property.type)return null;const i=N(n.object,t);if(null!=i){if(null==i.value&&(i.optional||e.optional))return{value:void 0,optional:!0};const s=F(n,t);if(null!=s){const e=i.value,t=s.value;if(I.has(e[t]))return{value:e[t](...r)};if(L.has(e[t]))return{value:r[0]}}}}else{const i=N(n,t);if(null!=i){if(null==i.value&&e.optional)return{value:void 0,optional:!0};const t=i.value;if(I.has(t))return{value:t(...r)};if(L.has(t))return{value:r[0]}}}return null},ConditionalExpression(e,t){const n=N(e.test,t);return null!=n?n.value?N(e.consequent,t):N(e.alternate,t):null},ExpressionStatement(e,t){return N(e.expression,t)},Identifier(e,t){if(null!=t){const n=r(t,e);if(null!=n&&0===n.defs.length&&R.has(n.name)&&n.name in D)return{value:D[n.name]};if(null!=n&&1===n.defs.length){const e=n.defs[0];if(e.parent&&"const"===e.parent.kind&&"Identifier"===e.node.id.type)return N(e.node.init,t)}}return null},Literal(e){return null==e.regex&&null==e.bigint||null!=e.value?{value:e.value}:null},LogicalExpression(e,t){const n=N(e.left,t);if(null!=n){if("||"===e.operator&&!0===Boolean(n.value)||"&&"===e.operator&&!1===Boolean(n.value)||"??"===e.operator&&null!=n.value)return n;const r=N(e.right,t);if(null!=r)return r}return null},MemberExpression(e,t){if("PrivateIdentifier"===e.property.type)return null;const n=N(e.object,t);if(null!=n){if(null==n.value&&(n.optional||e.optional))return{value:void 0,optional:!0};const r=F(e,t);if(null!=r&&!B(n.value,r.value))return{value:n.value[r.value]}}return null},ChainExpression(e,t){const n=N(e.expression,t);return null!=n?{value:n.value}:null},NewExpression(e,t){const n=N(e.callee,t),r=M(e.arguments,t);if(null!=n&&null!=r){const e=n.value;if(I.has(e))return{value:new e(...r)}}return null},ObjectExpression(e,t){const n={};for(const r of e.properties)if("Property"===r.type){if("init"!==r.kind)return null;const e=F(r,t),i=N(r.value,t);if(null==e||null==i)return null;n[e.value]=i.value}else{if("SpreadElement"!==r.type&&"ExperimentalSpreadProperty"!==r.type)return null;{const e=N(r.argument,t);if(null==e)return null;Object.assign(n,e.value)}}return{value:n}},SequenceExpression(e,t){return N(e.expressions[e.expressions.length-1],t)},TaggedTemplateExpression(e,t){const n=N(e.tag,t),r=M(e.quasi.expressions,t);if(null!=n&&null!=r){const t=n.value,i=e.quasi.quasis.map((e=>e.value.cooked));if(i.raw=e.quasi.quasis.map((e=>e.value.raw)),t===String.raw)return{value:t(i,...r)}}return null},TemplateLiteral(e,t){const n=M(e.expressions,t);if(null!=n){let t=e.quasis[0].value.cooked;for(let r=0;r",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),q=Object.freeze(new Set(["-","+","!","~"]));function Q(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}const z=Object.freeze(Object.assign(Object.create(null),{$visit(e,t,n){const{type:r}=e;return"function"==typeof this[r]?this[r](e,t,n):this.$visitChildren(e,t,n)},$visitChildren(e,n,r){const{type:i}=e;for(const s of r[i]||t.getKeys(e)){const t=e[s];if(Array.isArray(t)){for(const e of t)if(Q(e)&&this.$visit(e,n,r))return!0}else if(Q(t)&&this.$visit(t,n,r))return!0}return!1},ArrowFunctionExpression(){return!1},AssignmentExpression(){return!0},AwaitExpression(){return!0},BinaryExpression(e,t,n){return!(!t.considerImplicitTypeConversion||!$.has(e.operator)||"Literal"===e.left.type&&"Literal"===e.right.type)||this.$visitChildren(e,t,n)},CallExpression(){return!0},FunctionExpression(){return!1},ImportExpression(){return!0},MemberExpression(e,t,n){return!!t.considerGetters||(!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.property.type)||this.$visitChildren(e,t,n))},MethodDefinition(e,t,n){return!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.key.type)||this.$visitChildren(e,t,n)},NewExpression(){return!0},Property(e,t,n){return!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.key.type)||this.$visitChildren(e,t,n)},PropertyDefinition(e,t,n){return!(!t.considerImplicitTypeConversion||!e.computed||"Literal"===e.key.type)||this.$visitChildren(e,t,n)},UnaryExpression(e,t,n){return"delete"===e.operator||(!(!t.considerImplicitTypeConversion||!q.has(e.operator)||"Literal"===e.argument.type)||this.$visitChildren(e,t,n))},UpdateExpression(){return!0},YieldExpression(){return!0}}));function X(e,n,{considerGetters:r=!1,considerImplicitTypeConversion:i=!1}={}){return z.$visit(e,{considerGetters:r,considerImplicitTypeConversion:i},n.visitorKeys||t.KEYS)}function G(e,t){const n=e.parent;switch(n.type){case"CallExpression":case"NewExpression":return 1===n.arguments.length&&n.arguments[0]===e?t.getTokenAfter(n.callee,p):null;case"DoWhileStatement":return n.test===e?t.getTokenAfter(n.body,p):null;case"IfStatement":case"WhileStatement":return n.test===e?t.getFirstToken(n,1):null;case"ImportExpression":return n.source===e?t.getFirstToken(n,1):null;case"SwitchStatement":return n.discriminant===e?t.getFirstToken(n,1):null;case"WithStatement":return n.object===e?t.getFirstToken(n,1):null;default:return null}}function Z(e,t,n){let r,i,s,o,a;if("number"==typeof e){if(r=0|e,i=t,s=n,!(r>=1))throw new TypeError("'times' should be a positive integer.")}else r=1,i=e,s=t;if(null==i||null==i.parent||"CatchClause"===i.parent.type&&i.parent.param===i)return!1;o=a=i;do{o=s.getTokenBefore(o),a=s.getTokenAfter(a)}while(null!=o&&null!=a&&p(o)&&d(a)&&o!==G(i,s)&&--r>0);return 0===r}const H=/\$(?:[$&`']|[1-9][0-9]?)/gu,Y=new WeakMap;function J(e,t){let n=!1;for(let r=t-1;r>=0&&92===e.charCodeAt(r);--r)n=!n;return n}class ee{constructor(e,{escaped:t=!1}={}){if(!(e instanceof RegExp))throw new TypeError("'pattern' should be a RegExp instance.");if(!e.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");Y.set(this,{pattern:new RegExp(e.source,e.flags),escaped:Boolean(t)})}*execAll(e){const{pattern:t,escaped:n}=Y.get(this);let r=null,i=0;for(t.lastIndex=0;null!=(r=t.exec(e));)!n&&J(e,r.index)||(i=t.lastIndex,yield r,t.lastIndex=i)}test(e){return!this.execAll(e).next().done}[Symbol.replace](e,t){return"function"==typeof t?function(e,t,n){const r=[];let i=0;for(const s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(String(n(...s,s.index,s.input))),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),t):function(e,t,n){const r=[];let i=0,s=null;function o(e){switch(e){case"$$":return"$";case"$&":return s[0];case"$`":return t.slice(0,s.index);case"$'":return t.slice(s.index+s[0].length);default:{const t=e.slice(1);return t in s?s[t]:e}}}for(s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(n.replace(H,o)),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),String(t))}}const te=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,ne=Function.call.bind(Object.hasOwnProperty),re=Symbol("read"),ie=Symbol("call"),se=Symbol("construct"),oe=Symbol("esm"),ae={require:{[ie]:!0}};function le(e){return null==e||0!==e.defs.length||e.references.some((e=>e.isWrite()))}function ce(e){const t=e.parent;switch(t&&t.type){case"ConditionalExpression":return t.consequent===e||t.alternate===e;case"LogicalExpression":case"ChainExpression":return!0;case"SequenceExpression":return t.expressions[t.expressions.length-1]===e;default:return!1}}class ue{constructor(e,{mode:t="strict",globalObjectNames:n=["global","globalThis","self","window"]}={}){this.variableStack=[],this.globalScope=e,this.mode=t,this.globalObjectNames=n.slice(0)}*iterateGlobalReferences(e){for(const t of Object.keys(e)){const n=e[t],r=[t],i=this.globalScope.set.get(t);le(i)||(yield*this._iterateVariableReferences(i,r,n,!0))}for(const t of this.globalObjectNames){const n=[],r=this.globalScope.set.get(t);le(r)||(yield*this._iterateVariableReferences(r,n,e,!1))}}*iterateCjsReferences(e){for(const{node:t}of this.iterateGlobalReferences(ae)){const n=V(t.arguments[0]);if(null==n||!ne(e,n))continue;const r=e[n],i=[n];r[re]&&(yield{node:t,path:i,type:re,info:r[re]}),yield*this._iteratePropertyReferences(t,i,r)}}*iterateEsmReferences(e){const t=this.globalScope.block;for(const n of t.body){if(!te.test(n.type)||null==n.source)continue;const t=n.source.value;if(!ne(e,t))continue;const r=e[t],i=[t];if(r[re]&&(yield{node:n,path:i,type:re,info:r[re]}),"ExportAllDeclaration"===n.type)for(const e of Object.keys(r)){const t=r[e];t[re]&&(yield{node:n,path:i.concat(e),type:re,info:t[re]})}else for(const e of n.specifiers){const t=ne(r,oe),n=this._iterateImportReferences(e,i,t?r:"legacy"===this.mode?{default:r,...r}:{default:r});if(t)yield*n;else for(const e of n)e.path=e.path.filter(pe),(e.path.length>=2||e.type!==re)&&(yield e)}}}*_iterateVariableReferences(e,t,n,r){if(!this.variableStack.includes(e)){this.variableStack.push(e);try{for(const i of e.references){if(!i.isRead())continue;const e=i.identifier;r&&n[re]&&(yield{node:e,path:t,type:re,info:n[re]}),yield*this._iteratePropertyReferences(e,t,n)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(e,t,n){let r=e;for(;ce(r);)r=r.parent;const i=r.parent;if("MemberExpression"!==i.type)"CallExpression"!==i.type?"NewExpression"!==i.type?"AssignmentExpression"!==i.type?"AssignmentPattern"!==i.type?"VariableDeclarator"===i.type&&i.init===r&&(yield*this._iterateLhsReferences(i.id,t,n)):i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n)):i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n),yield*this._iteratePropertyReferences(i,t,n)):i.callee===r&&n[se]&&(yield{node:i,path:t,type:se,info:n[se]}):i.callee===r&&n[ie]&&(yield{node:i,path:t,type:ie,info:n[ie]});else if(i.object===r){const e=K(i);if(null==e||!ne(n,e))return;t=t.concat(e);const r=n[e];r[re]&&(yield{node:i,path:t,type:re,info:r[re]}),yield*this._iteratePropertyReferences(i,t,r)}}*_iterateLhsReferences(e,t,n){if("Identifier"!==e.type)if("ObjectPattern"!==e.type)"AssignmentPattern"===e.type&&(yield*this._iterateLhsReferences(e.left,t,n));else for(const r of e.properties){const e=K(r);if(null==e||!ne(n,e))continue;const i=t.concat(e),s=n[e];s[re]&&(yield{node:r,path:i,type:re,info:s[re]}),yield*this._iterateLhsReferences(r.value,i,s)}else{const i=r(this.globalScope,e);null!=i&&(yield*this._iterateVariableReferences(i,t,n,!1))}}*_iterateImportReferences(e,t,n){const i=e.type;if("ImportSpecifier"===i||"ImportDefaultSpecifier"===i){const s="ImportDefaultSpecifier"===i?"default":e.imported.name;if(!ne(n,s))return;t=t.concat(s);const o=n[s];return o[re]&&(yield{node:e,path:t,type:re,info:o[re]}),void(yield*this._iterateVariableReferences(r(this.globalScope,e.local),t,o,!1))}if("ImportNamespaceSpecifier"!==i){if("ExportSpecifier"===i){const r=e.local.name;if(!ne(n,r))return;t=t.concat(r);const i=n[r];i[re]&&(yield{node:e,path:t,type:re,info:i[re]})}}else yield*this._iterateVariableReferences(r(this.globalScope,e.local),t,n,!1)}}function pe(e,t){return!(1===t&&"default"===e)}ue.READ=re,ue.CALL=ie,ue.CONSTRUCT=se,ue.ESM=oe;var de={CALL:ie,CONSTRUCT:se,ESM:oe,findVariable:r,getFunctionHeadLocation:k,getFunctionNameWithKind:W,getInnermostScope:n,getPropertyName:K,getStaticValue:U,getStringIfConstant:V,hasSideEffect:X,isArrowToken:a,isClosingBraceToken:g,isClosingBracketToken:h,isClosingParenToken:d,isColonToken:u,isCommaToken:l,isCommentToken:y,isNotArrowToken:_,isNotClosingBraceToken:C,isNotClosingBracketToken:T,isNotClosingParenToken:S,isNotColonToken:E,isNotCommaToken:b,isNotCommentToken:A,isNotOpeningBraceToken:w,isNotOpeningBracketToken:O,isNotOpeningParenToken:x,isNotSemicolonToken:v,isOpeningBraceToken:m,isOpeningBracketToken:f,isOpeningParenToken:p,isParenthesized:Z,isSemicolonToken:c,PatternMatcher:ee,READ:re,ReferenceTracker:ue};e.CALL=ie,e.CONSTRUCT=se,e.ESM=oe,e.PatternMatcher=ee,e.READ=re,e.ReferenceTracker=ue,e.default=de,e.findVariable=r,e.getFunctionHeadLocation=k,e.getFunctionNameWithKind=W,e.getInnermostScope=n,e.getPropertyName=K,e.getStaticValue=U,e.getStringIfConstant=V,e.hasSideEffect=X,e.isArrowToken=a,e.isClosingBraceToken=g,e.isClosingBracketToken=h,e.isClosingParenToken=d,e.isColonToken=u,e.isCommaToken=l,e.isCommentToken=y,e.isNotArrowToken=_,e.isNotClosingBraceToken=C,e.isNotClosingBracketToken=T,e.isNotClosingParenToken=S,e.isNotColonToken=E,e.isNotCommaToken=b,e.isNotCommentToken=A,e.isNotOpeningBraceToken=w,e.isNotOpeningBracketToken=O,e.isNotOpeningParenToken=x,e.isNotSemicolonToken=v,e.isOpeningBraceToken=m,e.isOpeningBracketToken=f,e.isOpeningParenToken=p,e.isParenthesized=Z,e.isSemicolonToken=c}(nS)),nS}var iS,sS,oS={};function aS(){return sS?iS:(sS=1,iS=class{constructor(){this.current=null}getOneToken(){return this.moveNext()?this.current:null}getAllTokens(){const e=[];for(;this.moveNext();)e.push(this.current);return e}moveNext(){throw new Error("Not implemented.")}})}var lS,cS,uS,pS,dS,fS,hS,mS,gS,yS,_S,bS,vS,ES,xS,SS,OS,TS,wS,CS,AS,PS,kS,DS,RS={};function IS(){return lS||(lS=1,RS.search=function(e,t){for(let n=0,r=e.length-1;n<=r;){const i=(n+r)/2|0;if(t<=e[i].range[0]){if(i===n)return i;r=i}else n=i+1}return e.length},RS.getFirstIndex=function(e,t,n){if(n in t)return t[n];if(n-1 in t){const r=t[n-1],i=e[r];return i?i.range[0]>=n?r:r+1:e.length}return 0},RS.getLastIndex=function(e,t,n){if(n in t)return t[n]-1;if(n-1 in t){const r=t[n-1],i=e[r];return i?i.range[1]>n?r-1:r:e.length-1}return e.length-1}),RS}function LS(){if(hS)return fS;hS=1;const e=aS();return fS=class extends e{constructor(e){super(),this.cursor=e}moveNext(){const e=this.cursor.moveNext();return this.current=this.cursor.current,e}},fS}function BS(){if(vS)return bS;vS=1;const e=aS(),t=IS();return bS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.index=t.getFirstIndex(e,r,i),this.indexEnd=t.getLastIndex(e,r,s)}moveNext(){return this.index<=this.indexEnd&&(this.current=this.tokens[this.index],this.index+=1,!0)}getOneToken(){return this.index<=this.indexEnd?this.tokens[this.index]:null}getAllTokens(){return this.tokens.slice(this.index,this.indexEnd+1)}}}function MS(){if(TS)return oS;TS=1;const e=function(){if(uS)return cS;uS=1;const e=aS(),t=IS();return cS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.comments=n,this.tokenIndex=t.getLastIndex(e,r,s),this.commentIndex=t.search(n,s)-1,this.border=i}moveNext(){const e=this.tokenIndex>=0?this.tokens[this.tokenIndex]:null,t=this.commentIndex>=0?this.comments[this.commentIndex]:null;return e&&(!t||e.range[1]>t.range[1])?(this.current=e,this.tokenIndex-=1):t?(this.current=t,this.commentIndex-=1):this.current=null,Boolean(this.current)&&(-1===this.border||this.current.range[0]>=this.border)}},cS}(),t=function(){if(dS)return pS;dS=1;const e=aS(),t=IS();return pS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.index=t.getLastIndex(e,r,s),this.indexEnd=t.getFirstIndex(e,r,i)}moveNext(){return this.index>=this.indexEnd&&(this.current=this.tokens[this.index],this.index-=1,!0)}getOneToken(){return this.index>=this.indexEnd?this.tokens[this.index]:null}}}(),n=function(){if(gS)return mS;gS=1;const e=LS();return mS=class extends e{constructor(e,t){super(e),this.predicate=t}moveNext(){const e=this.predicate;for(;super.moveNext();)if(e(this.current))return!0;return!1}},mS}(),r=function(){if(_S)return yS;_S=1;const e=aS(),t=IS();return yS=class extends e{constructor(e,n,r,i,s){super(),this.tokens=e,this.comments=n,this.tokenIndex=t.getFirstIndex(e,r,i),this.commentIndex=t.search(n,i),this.border=s}moveNext(){const e=this.tokenIndex0&&(this.count-=1,super.moveNext())}},ES}(),o=function(){if(OS)return SS;OS=1;const e=LS();return SS=class extends e{constructor(e,t){super(e),this.count=t}moveNext(){for(;this.count>0;)if(this.count-=1,!super.moveNext())return!1;return super.moveNext()}},SS}();class a{constructor(e,t){this.TokenCursor=e,this.TokenCommentCursor=t}createBaseCursor(e,t,n,r,i,s){return new(s?this.TokenCommentCursor:this.TokenCursor)(e,t,n,r,i)}createCursor(e,t,r,i,a,l,c,u,p){let d=this.createBaseCursor(e,t,r,i,a,l);return c&&(d=new n(d,c)),u>=1&&(d=new o(d,u)),p>=0&&(d=new s(d,p)),d}}return oS.forward=new a(i,r),oS.backward=new a(t,e),oS}function jS(){if(PS)return AS;PS=1;const e=Fb,{isCommentToken:t}=rS(),n=MS(),r=BS(),i=function(){if(CS)return wS;CS=1;const e=BS();return wS=class extends e{constructor(e,t,n,r,i,s,o){super(e,t,n,r,i),this.index=Math.max(0,this.index-s),this.indexEnd=Math.min(e.length-1,this.indexEnd+o)}}}(),s=IS(),o=Symbol("tokens"),a=Symbol("comments"),l=Symbol("indexMap");function c(t,n,r,i,s,o,a){let l=!1,c=0,u=null;return"number"==typeof a?c=0|a:"function"==typeof a?u=a:a&&(l=!!a.includeComments,c=0|a.skip,u=a.filter||null),e(c>=0,"options.skip should be zero or a positive integer."),e(!u||"function"==typeof u,"options.filter should be a function."),t.createCursor(n,r,i,s,o,l,u,c,-1)}function u(t,n,r,i,s,o,a){let l=!1,c=0,u=!1,p=null;return"number"==typeof a?(c=0|a,u=!0):"function"==typeof a?p=a:a&&(l=!!a.includeComments,c=0|a.count,u="number"==typeof a.count,p=a.filter||null),e(c>=0,"options.count should be zero or a positive integer."),e(!p||"function"==typeof p,"options.filter should be a function."),t.createCursor(n,r,i,s,o,l,p,0,u?c:-1)}function p(e,t,s,o,a,l,c){return void 0===l&&void 0===c?new r(e,t,s,o,a):"number"==typeof l||void 0===l?new i(e,t,s,o,a,0|l,0|c):u(n.forward,e,t,s,o,a,l)}function d(e){const n=[];let r=e.getOneToken();for(;r&&t(r);)n.push(r),r=e.getOneToken();return n}return AS=class{constructor(e,t){this[o]=e,this[a]=t,this[l]=function(e,t){const n=Object.create(null);let r=0,i=0,s=0,o=null;for(;r1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)>>0;++n=0;--r)t=e(n[r],t);return t})),x=ye((function(e,t){return E(e,t[t.length-1],t.slice(0,-1))})),S=ye((function(e,t){var n,r,i;for(n=[],r=t;null!=(i=e(r));)n.push(i[0]),r=i[1];return n})),O=function(e){return[].concat.apply([],e)},T=ye((function(e,t){var n;return[].concat.apply([],function(){var r,i,s,o=[];for(r=0,s=(i=t).length;rt?1:ee(n)?1:e(t)t&&(t=s);return t},$=function(e){var t,n,r,i,s;for(t=e[0],n=0,i=(r=e.slice(1)).length;ne(n)&&(n=o);return n})),Q=ye((function(e,t){var n,r,i,s,o;for(n=t[0],r=0,s=(i=t.slice(1)).length;r1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)1?n:n.toLowerCase())})).replace(/^([A-Z]+)/,(function(e,t){return t.length>1?t+"-":t.toLowerCase()}))}}}function iO(){if(XS)return zS;var e,t,n,r,i,s,o,a,l,c,u,p,d,f,h,m,g,y,_,b,v,E,x,S,O,T,w,C,A,P,k,D;function R(e,t){var n,r=function(i){return e.length>1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)t?e:t})),t=R((function(e,t){return e0?1:0},s=R((function(e,t){return~~(e/t)})),o=R((function(e,t){return e%t})),a=R((function(e,t){return Math.floor(e/t)})),l=R((function(e,t){var n;return(e%(n=t)+n)%n})),c=function(e){return 1/e},p=2*(u=Math.PI),d=Math.exp,f=Math.sqrt,h=Math.log,m=R((function(e,t){return Math.pow(e,t)})),g=Math.sin,y=Math.tan,_=Math.cos,b=Math.asin,v=Math.acos,E=Math.atan,x=R((function(e,t){return Math.atan2(e,t)})),S=function(e){return~~e},O=Math.round,T=Math.ceil,w=Math.floor,C=function(e){return e!=e},A=function(e){return e%2==0},P=function(e){return e%2!=0},k=R((function(e,t){var n;for(e=Math.abs(e),t=Math.abs(t);0!==t;)n=e%t,e=t,t=n;return e})),D=R((function(e,t){return Math.abs(Math.floor(e/k(e,t)*t))})),zS={max:e,min:t,negate:n,abs:r,signum:i,quot:s,rem:o,div:a,mod:l,recip:c,pi:u,tau:p,exp:d,sqrt:f,ln:h,pow:m,sin:g,tan:y,cos:_,acos:v,asin:b,atan:E,atan2:x,truncate:S,round:O,ceiling:T,floor:w,isItNaN:C,even:A,odd:P,gcd:k,lcm:D}}function sO(){if(ZS)return GS;ZS=1;var e,t,n,r,i,s,o,a,l,c={}.toString;function u(e,t){var n,r=function(i){return e.length>1?function(){var s=i?i.concat():[];return n=t&&n||this,s.push.apply(s,arguments)|"+e.source+"|\\S","g"),uO.exports=function(e){var n;if(!e.length)throw new Error("No type specified.");if(function(e,t){var n=-1,r=t.length>>>0;for(;++n",n=e.match(t)||[]))throw new Error("Function types are not supported. To validate that something is a function, you may use 'Function'.");try{return c(n)}catch(t){throw new Error(t.message+" - Remaining tokens: "+JSON.stringify(n)+" - Initial input: '"+e+"'")}}}.call(this)),uO.exports}var dO,fO,hO,mO,gO,yO,_O,bO,vO,EO,xO,SO,OO,TO,wO,CO,AO,PO,kO,DO,RO,IO,LO,BO,MO,jO,NO,FO,UO={exports:{}};function VO(){return dO||(dO=1,function(){var e,t,n,r,i,s,o={}.toString;function a(e,t,r){if(!(e instanceof Object))return!1;switch(t.structure){case"fields":return function(e,t,n){var r,i,s,o,a,l,u;for(s in r={},i=0,e)r[s]=!0,i++;for(a in o=0,l=t.of){if(u=l[a],!c(e[a],u,n))return!1;r[a]&&o++}return t.subset||i===o}(e,t,r);case"array":return function(e,t,r){return n((function(e){return c(e,t.of,r)}),e)}(e,t,r);case"tuple":return function(e,t,n){var r,i,s,o,a;for(r=0,i=0,o=(s=t.of).length;i{if(!e)return;const[r,i=null]=e.split(":");n[r]={value:i,comment:t}})),n}parseJsonConfig(n,i){r("Parsing JSON config");let s={};try{if(s=e.parse("Object",n)||{},t.isEverySeverityValid(s))return{success:!0,config:s}}catch{r("Levn parsing failed; falling back to manual parsing.")}s={};const o=n.replace(/([-a-zA-Z0-9/]+):/gu,'"$1":').replace(/(\]|[0-9])\s+(?=")/u,"$1,");try{s=JSON.parse(`{${o}}`)}catch(e){return r("Manual parsing failed."),{success:!1,error:{ruleId:null,fatal:!0,severity:2,message:`Failed to parse JSON from '${o}': ${e.message}`,line:i.start.line,column:i.start.column+1,nodeType:null}}}return{success:!0,config:s}}parseListConfig(e){r("Parsing list config");const t={};return e.split(",").forEach((e=>{const n=e.trim().replace(/^(?['"]?)(?.*)\k$/su,"$");n&&(t[n]=!0)})),t}extractDirectiveComment(e){const t=/\s-{2,}\s/u.exec(e);if(!t)return{directivePart:e.trim(),justificationPart:""};return{directivePart:e.slice(0,t.index).trim(),justificationPart:e.slice(t.index+t[0].length).trim()}}parseDirective(e){const{directivePart:t}=this.extractDirectiveComment(e.value),r=n.exec(t),i=r[1];return{directiveText:i,directiveValue:t.slice(r.index+i.length)}}},gO}function qO(){if(bO)return _O;bO=1;const{isCommentToken:e}=rS(),t=jS(),n=Av(),r=eS(),i=NS(),{directivesPattern:s}=Pv(),o=$O(),a=sv(),l=new o;function c(e){switch(e){case"off":return"off";case!0:case"true":case"writeable":case"writable":return"writable";case null:case!1:case"false":case"readable":case"readonly":return"readonly";default:throw new Error(`'${e}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`)}}function u(e,t,n,r){if(function(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[0]||t.range[0]<=e.range[0]&&t.range[1]>=e.range[0]}(t,n))return!1;const[i,s]=t.range[1]<=n.range[0]?[t,n]:[n,t],o=e.getLastToken(i)||i,a=e.getFirstToken(s)||s;let l=o;for(;l!==a;){const t=e.getTokenAfter(l,{includeComments:!0});if(l.range[1]!==t.range[0]||r&&t!==a&&"JSXText"===t.type&&/\s/u.test(t.value))return!0;l=t}return!1}const p=Symbol("caches");return _O=class extends t{constructor(e,t){let i,s,o,a,l;"string"==typeof e?(i=e,s=t):"object"==typeof e&&null!==e&&(i=e.text,s=e.ast,o=e.parserServices,a=e.scopeManager,l=e.visitorKeys),function(e){if(!e.tokens)throw new Error("AST is missing the tokens array.");if(!e.comments)throw new Error("AST is missing the comments array.");if(!e.loc)throw new Error("AST is missing location information.");if(!e.range)throw new Error("AST is missing range information")}(s),super(s.tokens,s.comments),this[p]=new Map([["scopes",new WeakMap],["vars",new Map],["configNodes",void 0]]),this.hasBOM=65279===i.charCodeAt(0),this.text=this.hasBOM?i.slice(1):i,this.ast=s,this.parserServices=o||{},this.scopeManager=a||null,this.visitorKeys=l||r.DEFAULT_VISITOR_KEYS;const c=this.text.match(n.shebangPattern);c&&s.comments.length&&s.comments[0].value===c[1]&&(s.comments[0].type="Shebang"),this.tokensAndComments=function(e,t){const n=[];let r=0,i=0;for(;r=t.length||rt.parent.end);)n.trailing.push(r),r=this.getTokenAfter(r,{includeComments:!0})}return this._commentCache.set(t,n),n}getJSDocComment(t){const n=t=>{const n=this.getTokenBefore(t,{includeComments:!0});return n&&e(n)&&"Block"===n.type&&"*"===n.value.charAt(0)&&t.loc.start.line-n.loc.end.line<=1?n:null};let r=t.parent;switch(t.type){case"ClassDeclaration":case"FunctionDeclaration":return n("ExportDefaultDeclaration"===(i=r).type||"ExportNamedDeclaration"===i.type||"ExportAllDeclaration"===i.type||"ExportSpecifier"===i.type?r:t);case"ClassExpression":return n(r.parent);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==r.type&&"NewExpression"!==r.type){for(;!this.getCommentsBefore(r).length&&!/Function/u.test(r.type)&&"MethodDefinition"!==r.type&&"Property"!==r.type&&(r=r.parent,r););if(r&&"FunctionDeclaration"!==r.type&&"Program"!==r.type)return n(r)}return n(t);default:return null}var i}getNodeByRangeIndex(e){let t=null;return r.traverse(this.ast,{visitorKeys:this.visitorKeys,enter(n){n.range[0]<=e&&ethis.text.length)throw new RangeError(`Index out of range (requested index ${e}, but source text has length ${this.text.length}).`);if(e===this.text.length)return{line:this.lines.length,column:this.lines[this.lines.length-1].length};const t=e>=this.lineStartIndices[this.lineStartIndices.length-1]?this.lineStartIndices.length:this.lineStartIndices.findIndex((t=>ethis.lineStartIndices.length)throw new RangeError(`Line number out of range (line ${e.line} requested, but only ${this.lineStartIndices.length} lines present).`);const t=this.lineStartIndices[e.line-1],n=e.line===this.lineStartIndices.length?this.text.length:this.lineStartIndices[e.line],r=t+e.column;if(e.line===this.lineStartIndices.length&&r>n||e.line=n)throw new RangeError(`Column number out of range (column ${e.column} requested, but the length of line ${e.line} is ${n-t}).`);return r}getScope(e){if(!e)throw new TypeError("Missing required argument: node.");const t=this[p].get("scopes"),n=t.get(e);if(n)return n;const r="Program"!==e.type;for(let n=e;n;n=n.parent){const i=this.scopeManager.acquire(n,r);if(i)return"function-expression-name"===i.type?(t.set(e,i.childScopes[0]),i.childScopes[0]):(t.set(e,i),i)}return t.set(e,this.scopeManager.scopes[0]),this.scopeManager.scopes[0]}getDeclaredVariables(e){return this.scopeManager.getDeclaredVariables(e)}getAncestors(e){if(!e)throw new TypeError("Missing required argument: node.");const t=[];for(let n=e.parent;n;n=n.parent)t.push(n);return t.reverse()}markVariableAsUsed(e,t=this.ast){const n=this.getScope(t);let r=n;"global"===n.type&&n.childScopes.length>0&&n.childScopes[0].block===this.ast&&(r=n.childScopes[0]);for(let t=r;t;t=t.upper){const n=t.variables.find((t=>t.name===e));if(n)return n.eslintUsed=!0,!0}return!1}getInlineConfigNodes(){let e=this[p].get("configNodes");return e||(e=this.ast.comments.filter((e=>{if("Shebang"===e.type)return!1;const{directivePart:t}=l.extractDirectiveComment(e.value),n=s.exec(t);return!!n&&("Line"!==e.type||!!/^eslint-disable-(next-)?line$/u.test(n[1]))})),this[p].set("configNodes",e),e)}applyLanguageOptions(e){const t=Object.assign({},function(e){switch(e){case 3:return i.es3;case 5:return i.es5;default:return e<2015?i[`es${e+2009}`]:i[`es${e}`]}}(e.ecmaVersion),"commonjs"===e.sourceType?i.commonjs:void 0,e.globals);this[p].get("vars").set("configGlobals",t)}applyInlineConfig(){const e=[],t=[],n={},r=Object.create(null);this.getInlineConfigNodes().forEach((i=>{const{directiveText:s,directiveValue:o}=l.parseDirective(i);switch(s){case"exported":Object.assign(n,l.parseStringConfig(o,i));break;case"globals":case"global":for(const[t,{value:n}]of Object.entries(l.parseStringConfig(o,i))){let s;try{s=c(n)}catch(t){e.push({ruleId:null,loc:i.loc,message:t.message});continue}r[t]?(r[t].comments.push(i),r[t].value=s):r[t]={comments:[i],value:s}}break;case"eslint":{const n=l.parseJsonConfig(o,i.loc);n.success?t.push({config:{rules:n.config},node:i}):e.push(n.error);break}}}));const i=this[p].get("vars");return i.set("inlineGlobals",r),i.set("exportedVariables",n),{configs:t,problems:e}}finalize(){const e=this[p].get("vars"),t=this.scopeManager.scopes[0],n=e.get("configGlobals"),r=e.get("inlineGlobals"),i=e.get("exportedVariables");!function(e,t={},n={}){for(const r of new Set([...Object.keys(t),...Object.keys(n)])){const i=void 0===t[r]?void 0:c(t[r]),s=n[r]&&n[r].value||i,o=n[r]&&n[r].comments;if("off"===s)continue;let l=e.set.get(r);l||(l=new a.Variable(r,e),e.variables.push(l),e.set.set(r,l)),l.eslintImplicitGlobalSetting=i,l.eslintExplicitGlobal=void 0!==o,l.eslintExplicitGlobalComments=o,l.writeable="writable"===s}e.through=e.through.filter((t=>{const n=t.identifier.name,r=e.set.get(n);return!r||(t.resolved=r,r.references.push(t),!1)}))}(t,n,r),i&&function(e,t){Object.keys(t).forEach((t=>{const n=e.set.get(t);n&&(n.eslintUsed=!0,n.eslintExported=!0)}))}(t,i)}},_O}function QO(){if(SO)return xO;SO=1;const e=Jx()("eslint:code-path");function t(e){return e.id+(e.reachable?"":"!")}function n(e,t){const n=t?`:${t}`:"";switch(e.type){case"Identifier":return`${e.type}${n} (${e.name})`;case"Literal":return`${e.type}${n} (${e.value})`;default:return`${e.type}${n}`}}return xO={enabled:e.enabled,dump:e,dumpState:e.enabled?function(r,i,s){for(let e=0;e=0&&t.nodes[e]===n(r,"enter")?t.nodes[e]=n(r,void 0):t.nodes.push(n(r,"exit"))}else t.nodes.push(n(r,"enter"))}e([`${i.currentSegments.map(t).join(",")})`,`${r.type}${s?":exit":""}`].join(" "))}:e,dumpDot:e.enabled?function(t){let n='\ndigraph {\nnode[shape=box,style="rounded,filled",fillcolor=white];\ninitial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n';t.returnedSegments.length>0&&(n+='final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n'),t.thrownSegments.length>0&&(n+='thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];\n');const r=Object.create(null),i=this.makeDotArrows(t,r);for(const e in r){const t=r[e];n+=`${e}[`,t.reachable?n+='label="':n+='style="rounded,dashed,filled",fillcolor="#FF9800",label="<>\\n',t.internal.nodes.length>0?n+=t.internal.nodes.join("\\n"):n+="????",n+='"];\n'}n+=`${i}\n`,n+="}",e("DOT",n)}:e,makeDotArrows(e,t){const n=[[e.initialSegment,0]],r=t||Object.create(null);let i=e.initialSegment.id,s=`initial->${e.initialSegment.id}`;for(;n.length>0;){const e=n.pop(),t=e[0],o=e[1];if(r[t.id]&&0===o)continue;r[t.id]=t;const a=t.allNextSegments[o];a&&(i===t.id?s+=`->${a.id}`:s+=`;\n${t.id}->${a.id}`,i=a.id,n.unshift([t,1+o]),n.push([a,0]))}return e.returnedSegments.forEach((e=>{i===e.id?s+="->final":s+=`;\n${e.id}->final`,i=null})),e.thrownSegments.forEach((e=>{i===e.id?s+="->thrown":s+=`;\n${e.id}->thrown`,i=null})),`${s};`}},xO}function zO(){if(TO)return OO;TO=1;const e=QO();function t(e){return e.reachable}class n{constructor(n,r,i){this.id=n,this.nextSegments=[],this.prevSegments=r.filter(t),this.allNextSegments=[],this.allPrevSegments=r,this.reachable=i,Object.defineProperty(this,"internal",{value:{used:!1,loopedPrevSegments:[]}}),e.enabled&&(this.internal.nodes=[])}isLoopedPrevSegment(e){return this.internal.loopedPrevSegments.includes(e)}static newRoot(e){return new n(e,[],!0)}static newNext(e,r){return new n(e,n.flattenUnusedSegments(r),r.some(t))}static newUnreachable(e,t){const r=new n(e,n.flattenUnusedSegments(t),!1);return n.markUsed(r),r}static newDisconnected(e,r){return new n(e,[],r.some(t))}static markUsed(e){if(e.internal.used)return;let t;if(e.internal.used=!0,e.reachable)for(t=0;t=0?t:i.length+t,o=n>=0?n:i.length+n,a=[];for(let t=0;te.count;){const n=[];for(let i=0,s=Math.floor(r.length/2);i0&&e.some(n)}makeNext(e,n){return r(this,e,n,t.newNext)}makeUnreachable(e,n){return r(this,e,n,t.newUnreachable)}makeDisconnected(e,n){return r(this,e,n,t.newDisconnected)}add(t){e(t.length>=this.count,`${t.length} >= ${this.count}`),this.segmentsList.push(i(this,t))}replaceHead(t){e(t.length>=this.count,`${t.length} >= ${this.count}`),this.segmentsList.splice(-1,1,i(this,t))}addAll(t){e(t.count===this.count),this.segmentsList.push(...t.segmentsList)}clear(){this.segmentsList=[]}static newRoot(e){const n=new s(e,null,1);return n.add([t.newRoot(e.next())]),n}static newEmpty(e,t){return new s(e.idGenerator,e,(t?2:1)*e.count)}}return wO=s}();class n{constructor(e,n,r,i){this.upper=e,this.breakable=n,this.label=r,this.brokenForkContext=t.newEmpty(i)}}class r{constructor(e){this.upper=e,this.choiceContextCount=0}}class i{constructor(e,n,r,i){this.upper=e,this.kind=n,this.isForkingAsResult=r,this.trueForkContext=t.newEmpty(i),this.falseForkContext=t.newEmpty(i),this.nullishForkContext=t.newEmpty(i),this.processed=!1}}class s{constructor(e,t,n,r){this.upper=e,this.type=t,this.label=n,this.brokenForkContext=r.brokenForkContext}}class o extends s{constructor(e,t,n){super(e,"WhileStatement",t,n),this.test=void 0,this.continueDestSegments=null}}class a extends s{constructor(e,n,r,i){super(e,"DoWhileStatement",n,r),this.test=void 0,this.entrySegments=null,this.continueForkContext=t.newEmpty(i)}}class l extends s{constructor(e,t,n){super(e,"ForStatement",t,n),this.test=void 0,this.endOfInitSegments=null,this.testSegments=null,this.endOfTestSegments=null,this.updateSegments=null,this.endOfUpdateSegments=null,this.continueDestSegments=null}}class c extends s{constructor(e,t,n){super(e,"ForInStatement",t,n),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class u extends s{constructor(e,t,n){super(e,"ForOfStatement",t,n),this.prevSegments=null,this.leftSegments=null,this.endOfLeftSegments=null,this.continueDestSegments=null}}class p{constructor(e,t){this.upper=e,this.hasCase=t,this.defaultSegments=null,this.defaultBodySegments=null,this.foundEmptyDefault=!1,this.lastIsDefault=!1,this.forkCount=0}}class d{constructor(e,n,r){this.upper=e,this.hasFinalizer=n,this.position="try",this.returnedForkContext=n?t.newEmpty(r):null,this.thrownForkContext=t.newEmpty(r),this.lastOfTryIsReachable=!1,this.lastOfCatchIsReachable=!1}}function f(e,t,n,r){for(let i=0;i=2&&e.markPrevSegmentAsLooped(o,r),t.notifyLooped(r,o)}}function _(e,t,n){t.processed||(t.trueForkContext.add(n),t.falseForkContext.add(n),t.nullishForkContext.add(n)),!0!==e.test&&e.brokenForkContext.addAll(t.falseForkContext),e.endOfTestSegments=t.trueForkContext.makeNext(0,-1)}return AO=class{constructor(e,n){this.idGenerator=e,this.notifyLooped=n,this.forkContext=t.newRoot(e),this.choiceContext=null,this.switchContext=null,this.tryContext=null,this.loopContext=null,this.breakContext=null,this.chainContext=null,this.currentSegments=[],this.initialSegment=this.forkContext.head[0],this.finalSegments=[],this.returnedForkContext=[],this.thrownForkContext=[];const r=this.finalSegments,i=this.returnedForkContext,s=this.thrownForkContext;i.add=f.bind(null,i,s,r),s.add=f.bind(null,s,i,r)}get headSegments(){return this.forkContext.head}get parentForkContext(){const e=this.forkContext;return e&&e.upper}pushForkContext(e){return this.forkContext=t.newEmpty(this.forkContext,e),this.forkContext}popForkContext(){const e=this.forkContext;return this.forkContext=e.upper,this.forkContext.replaceHead(e.makeNext(0,-1)),e}forkPath(){this.forkContext.add(this.parentForkContext.makeNext(-1,-1))}forkBypassPath(){this.forkContext.add(this.parentForkContext.head)}pushChoiceContext(e,t){this.choiceContext=new i(this.choiceContext,e,t,this.forkContext)}popChoiceContext(){const e=this.choiceContext,t=this.forkContext,n=t.head;switch(this.choiceContext=e.upper,e.kind){case"&&":case"||":case"??":if(e.processed||(e.trueForkContext.add(n),e.falseForkContext.add(n),e.nullishForkContext.add(n)),e.isForkingAsResult){const t=this.choiceContext;return t.trueForkContext.addAll(e.trueForkContext),t.falseForkContext.addAll(e.falseForkContext),t.nullishForkContext.addAll(e.nullishForkContext),t.processed=!0,e}break;case"test":e.processed?(e.falseForkContext.clear(),e.falseForkContext.add(n)):(e.trueForkContext.clear(),e.trueForkContext.add(n));break;case"loop":return e;default:throw new Error("unreachable")}const r=e.trueForkContext;return r.addAll(e.falseForkContext),t.replaceHead(r.makeNext(0,-1)),e}makeLogicalRight(){const e=this.choiceContext,t=this.forkContext;if(e.processed){let n;switch(e.kind){case"&&":n=e.trueForkContext;break;case"||":n=e.falseForkContext;break;case"??":n=e.nullishForkContext;break;default:throw new Error("unreachable")}t.replaceHead(n.makeNext(0,-1)),n.clear(),e.processed=!1}else{switch(e.kind){case"&&":e.falseForkContext.add(t.head),e.nullishForkContext.add(t.head);break;case"||":e.trueForkContext.add(t.head);break;case"??":e.trueForkContext.add(t.head),e.falseForkContext.add(t.head);break;default:throw new Error("unreachable")}t.replaceHead(t.makeNext(-1,-1))}}makeIfConsequent(){const e=this.choiceContext,t=this.forkContext;e.processed||(e.trueForkContext.add(t.head),e.falseForkContext.add(t.head),e.nullishForkContext.add(t.head)),e.processed=!1,t.replaceHead(e.trueForkContext.makeNext(0,-1))}makeIfAlternate(){const e=this.choiceContext,t=this.forkContext;e.trueForkContext.clear(),e.trueForkContext.add(t.head),e.processed=!0,t.replaceHead(e.falseForkContext.makeNext(0,-1))}pushChainContext(){this.chainContext=new r(this.chainContext)}popChainContext(){const e=this.chainContext;this.chainContext=e.upper;for(let t=e.choiceContextCount;t>0;--t)this.popChoiceContext()}makeOptionalNode(){this.chainContext&&(this.chainContext.choiceContextCount+=1,this.pushChoiceContext("??",!1))}makeOptionalRight(){this.chainContext&&this.makeLogicalRight()}pushSwitchContext(e,t){this.switchContext=new p(this.switchContext,e),this.pushBreakContext(!0,t)}popSwitchContext(){const e=this.switchContext;this.switchContext=e.upper;const t=this.forkContext,n=this.popBreakContext().brokenForkContext;if(0===e.forkCount)return void(n.empty||(n.add(t.makeNext(-1,-1)),t.replaceHead(n.makeNext(0,-1))));const r=t.head;this.forkBypassPath();const i=t.head;n.add(r),e.lastIsDefault||(e.defaultBodySegments?(!function(e,t){for(let n=0;n0&&e[0].reachable&&this.returnedForkContext.add(e)}},AO}function GO(){if(DO)return kO;DO=1;return kO=class{constructor(e){this.prefix=String(e),this.n=0}next(){return this.n=1+this.n|0,this.n<0&&(this.n=1),this.prefix+this.n}}}function ZO(){if(BO)return LO;BO=1;const e=Fb,{breakableTypePattern:t}=Av(),n=function(){if(IO)return RO;IO=1;const e=XO(),t=GO();return RO=class{constructor({id:n,origin:r,upper:i,onLooped:s}){this.id=n,this.origin=r,this.upper=i,this.childCodePaths=[],Object.defineProperty(this,"internal",{value:new e(new t(`${n}_`),s)}),i&&i.childCodePaths.push(this)}static getState(e){return e.internal}get initialSegment(){return this.internal.initialSegment}get finalSegments(){return this.internal.finalSegments}get returnedSegments(){return this.internal.returnedForkContext}get thrownSegments(){return this.internal.thrownForkContext}get currentSegments(){return this.internal.currentSegments}traverseSegments(e,t){let n,r;"function"==typeof e?(r=e,n={}):(n=e||{},r=t);const i=n.first||this.internal.initialSegment,s=n.last;let o=null,a=0,l=0,c=null;const u=new Set,p=[[i,0]];let d=null,f=!1;const h={skip(){p.length<=1?f=!0:d=p[p.length-2][0]},break(){f=!0}};function m(e){return u.has(e)||c.isLoopedPrevSegment(e)}for(;p.length>0;){if(o=p[p.length-1],c=o[0],a=o[1],0===a){if(u.has(c)){p.pop();continue}if(c!==i&&c.prevSegments.length>0&&!c.prevSegments.every(m)){p.pop();continue}if(d&&c.prevSegments.includes(d)&&(d=null),u.add(c),!d&&(r.call(this,c,h),c===s&&h.skip(),f))break}l=c.nextSegments.length-1,a=1&&o.arguments[0]===r&&s.makeOptionalRight();break;case"MemberExpression":!0===o.optional&&o.property===r&&s.makeOptionalRight();break;case"LogicalExpression":o.right===r&&l(o.operator)&&s.makeLogicalRight();break;case"AssignmentExpression":o.right===r&&c(o.operator)&&s.makeLogicalRight();break;case"ConditionalExpression":case"IfStatement":o.consequent===r?s.makeIfConsequent():o.alternate===r&&s.makeIfAlternate();break;case"SwitchCase":o.consequent[0]===r&&s.makeSwitchCaseBody(!1,!o.test);break;case"TryStatement":o.handler===r?s.makeCatchBlock():o.finalizer===r&&s.makeFinallyBlock();break;case"WhileStatement":o.test===r?s.makeWhileTest(d(r)):(e(o.body===r),s.makeWhileBody());break;case"DoWhileStatement":o.body===r?s.makeDoWhileBody():(e(o.test===r),s.makeDoWhileTest(d(r)));break;case"ForStatement":o.test===r?s.makeForTest(d(r)):o.update===r?s.makeForUpdate():o.body===r&&s.makeForBody();break;case"ForInStatement":case"ForOfStatement":o.left===r?s.makeForInOfLeft():o.right===r?s.makeForInOfRight():(e(o.body===r),s.makeForInOfBody());break;case"AssignmentPattern":o.right===r&&(s.pushForkContext(),s.forkBypassPath(),s.forkPath())}}(this,r),function(e,r){let i=e.codePath,d=i&&n.getState(i);const h=r.parent;function m(t){i&&(f(e,r),s.dumpState(r,d,!1)),i=e.codePath=new n({id:e.idGenerator.next(),origin:t,upper:i,onLooped:e.onLooped}),d=n.getState(i),s.dump(`onCodePathStart ${i.id}`),e.emitter.emit("onCodePathStart",i,r)}switch(a(r)&&m("class-field-initializer"),r.type){case"Program":m("program");break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":m("function");break;case"StaticBlock":m("class-static-block");break;case"ChainExpression":d.pushChainContext();break;case"CallExpression":case"MemberExpression":!0===r.optional&&d.makeOptionalNode();break;case"LogicalExpression":l(r.operator)&&d.pushChoiceContext(r.operator,p(r));break;case"AssignmentExpression":c(r.operator)&&d.pushChoiceContext(r.operator.slice(0,-1),p(r));break;case"ConditionalExpression":case"IfStatement":d.pushChoiceContext("test",!1);break;case"SwitchStatement":d.pushSwitchContext(r.cases.some(o),u(r));break;case"TryStatement":d.pushTryContext(Boolean(r.finalizer));break;case"SwitchCase":h.discriminant!==r&&h.cases[0]!==r&&d.forkPath();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":d.pushLoopContext(r.type,u(r));break;case"LabeledStatement":t.test(r.body.type)||d.pushBreakContext(!1,r.label.name)}f(e,r),s.dumpState(r,d,!1)}(this,r),this.original.enterNode(r),this.currentNode=null}leaveNode(e){this.currentNode=e,function(e,r){const i=e.codePath,o=n.getState(i);let a=!1;switch(r.type){case"ChainExpression":o.popChainContext();break;case"IfStatement":case"ConditionalExpression":o.popChoiceContext();break;case"LogicalExpression":l(r.operator)&&o.popChoiceContext();break;case"AssignmentExpression":c(r.operator)&&o.popChoiceContext();break;case"SwitchStatement":o.popSwitchContext();break;case"SwitchCase":0===r.consequent.length&&o.makeSwitchCaseBody(!0,!r.test),o.forkContext.reachable&&(a=!0);break;case"TryStatement":o.popTryContext();break;case"BreakStatement":f(e,r),o.makeBreak(r.label&&r.label.name),a=!0;break;case"ContinueStatement":f(e,r),o.makeContinue(r.label&&r.label.name),a=!0;break;case"ReturnStatement":f(e,r),o.makeReturn(),a=!0;break;case"ThrowStatement":f(e,r),o.makeThrow(),a=!0;break;case"Identifier":(function(e){const t=e.parent;switch(t.type){case"LabeledStatement":case"BreakStatement":case"ContinueStatement":case"ArrayPattern":case"RestElement":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"CatchClause":return!1;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ClassDeclaration":case"ClassExpression":case"VariableDeclarator":return t.id!==e;case"Property":case"PropertyDefinition":case"MethodDefinition":return t.key!==e||t.computed||t.shorthand;case"AssignmentPattern":return t.key!==e;default:return!0}})(r)&&(o.makeFirstThrowablePathInTryBlock(),a=!0);break;case"CallExpression":case"ImportExpression":case"MemberExpression":case"NewExpression":case"YieldExpression":o.makeFirstThrowablePathInTryBlock();break;case"WhileStatement":case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":o.popLoopContext();break;case"AssignmentPattern":o.popForkContext();break;case"LabeledStatement":t.test(r.body.type)||o.popBreakContext()}a||f(e,r),s.dumpState(r,o,!0)}(this,e),this.original.leaveNode(e),h(this,e),this.currentNode=null}onLooped(e,t){e.reachable&&t.reachable&&(s.dump(`onCodePathSegmentLoop ${e.id} -> ${t.id}`),this.emitter.emit("onCodePathSegmentLoop",e,t,this.currentNode))}},LO}function HO(){return jO||(jO=1,MO=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),MO}function YO(){if(FO)return NO;FO=1;const e=HO();function t(e,t){return e.line-t.line||e.column-t.column}function n(e,t){const{range:n}=t,r=e.filter((e=>e.ruleId)).map((e=>`'${e.ruleId}'`));return{description:r.length<=2?r.join(" or "):`${r.slice(0,r.length-1).join(", ")}, or ${r[r.length-1]}`,fix:{range:n,text:" "},unprocessedDirective:e[0].unprocessedDirective}}function r(t){const r=function(e){const t=new Map;for(const n of e){const{unprocessedDirective:{parentComment:e}}=n;t.has(e)?t.get(e).push(n):t.set(e,[n])}return[...t.values()]}(t);return r.flatMap((t=>{const{parentComment:r}=t[0].unprocessedDirective,i=new Set(r.ruleIds);for(const e of t)i.delete(e.ruleId);return i.size?function(t,n){const r=n.range[0]+"//".length,i=/^\s*\S+\s+/u.exec(n.value)[0].length,s=n.value.slice(i).split(/\s-{2,}\s/u)[0].trimEnd();return t.map((t=>{const{ruleId:n}=t,o=new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${e(n)}\k(?:\s*,\s*|$)`,"u").exec(s),a=o[0],l=i+o.index,c=l+a.length,u=a.indexOf(","),p=a.lastIndexOf(",");let d,f;return u!==p?(d=l+u,f=l+p):(d=l,f=c),{description:`'${n}'`,fix:{range:[r+d,r+f],text:""},unprocessedDirective:t.unprocessedDirective}}))}(t,r.commentToken):[n(t,r.commentToken)]}))}function i(e){const n=[],i=new Set;for(const r of e.problems){let s=[],o=0;for(;o0){const e=s.map((e=>({kind:"directive",justification:e.unprocessedDirective.justification})));r.suppressions?r.suppressions=r.suppressions.concat(e):(r.suppressions=e,i.add(s[s.length-1]))}n.push(r)}const s=e.directives.filter((e=>"disable"===e.type&&!i.has(e))),o=new Set(e.directives.filter((e=>"enable"===e.unprocessedDirective.type)));if(o.size>0)for(const t of function(e){const t=new Map,n=new Set;for(let r=e.length-1;r>=0;r--){const i=e[r];if("disable"===i.type){if(0===t.size)continue;if(null===i.ruleId){for(const e of t.values())n.add(e);t.clear()}else{const e=t.get(i.ruleId);if(e)n.add(e);else{const e=t.get(null);e&&n.add(e)}}}else"enable"===i.type&&(null===i.ruleId?(t.clear(),t.set(null,i)):t.set(i.ruleId,i))}return n}(e.directives))o.delete(t);const a=r(s).concat(r(o)).map((({description:t,fix:n,unprocessedDirective:r})=>{const{parentComment:i,type:s,line:o,column:a}=r;let l;return l="enable"===s?t?`Unused eslint-enable directive (no matching eslint-disable directives were found for ${t}).`:"Unused eslint-enable directive (no matching eslint-disable directives were found).":t?`Unused eslint-disable directive (no problems were reported from ${t}).`:"Unused eslint-disable directive (no problems were reported).",{ruleId:null,message:l,line:"disable-next-line"===s?i.commentToken.loc.start.line:o,column:"disable-next-line"===s?i.commentToken.loc.start.column+1:a,severity:"warn"===e.reportUnusedDisableDirectives?1:2,nodeType:null,...e.disableFixes?{}:{fix:n}}}));return{problems:n,unusedDirectives:a}}return NO=({directives:e,disableFixes:n,problems:r,reportUnusedDisableDirectives:s="off"})=>{const o=e.filter((e=>"disable"===e.type||"enable"===e.type)).map((e=>Object.assign({},e,{unprocessedDirective:e}))).sort(t),a=e.flatMap((e=>{switch(e.type){case"disable":case"enable":return[];case"disable-line":return[{type:"disable",line:e.line,column:1,ruleId:e.ruleId,unprocessedDirective:e},{type:"enable",line:e.line+1,column:0,ruleId:e.ruleId,unprocessedDirective:e}];case"disable-next-line":return[{type:"disable",line:e.line+1,column:1,ruleId:e.ruleId,unprocessedDirective:e},{type:"enable",line:e.line+2,column:0,ruleId:e.ruleId,unprocessedDirective:e}];default:throw new TypeError(`Unrecognized directive type '${e.type}'`)}})).sort(t),l=i({problems:r,directives:o,disableFixes:n,reportUnusedDisableDirectives:s}),c=i({problems:l.problems,directives:a,disableFixes:n,reportUnusedDisableDirectives:s});return"off"!==s?c.problems.concat(l.unusedDirectives).concat(c.unusedDirectives).sort(t):c.problems},NO}function JO(e){return(JO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(e,t)||nT(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tT(e){return function(e){if(Array.isArray(e))return rT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nT(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nT(e,t){if(e){if("string"==typeof e)return rT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rT(e,t):void 0}}function rT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--n)if(e[n].node===t)return!0;return!1}function m(e,t){return(new p).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,r,i,s;for(r=e.length,i=0;r;)t(e[s=i+(n=r>>>1)])?r=n:(i=s+1,r-=n+1);return i}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},i={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},r={Break:s={},Skip:o={},Remove:a={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){var e,t,n,r,i;function s(e,t){if(Array.isArray(t))for(n=0,r=t.length;n=0;)if(_=a[p=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]&&!h(r,_[g])){if(f(l,y[m]))i=new u(_[g],[p,g],"Property",null);else{if(!d(_[g]))continue;i=new u(_[g],[p,g],null,null)}n.push(i)}}else if(d(_)){if(h(r,_))continue;n.push(new u(_,p,null,null))}}}else if(i=r.pop(),c=this.__execute(t.leave,i),this.__state===s||c===s)return},p.prototype.replace=function(e,t){var n,r,i,l,p,h,m,g,y,_,b,v,E;function x(e){var t,r,i,s;if(e.ref.remove())for(r=e.ref.key,s=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===s){if(i.ref.key=0;)if(_=i[E=y[m]])if(Array.isArray(_)){for(g=_.length;(g-=1)>=0;)if(_[g]){if(f(l,y[m]))h=new u(_[g],[E,g],"Property",new c(_,g));else{if(!d(_[g]))continue;h=new u(_[g],[E,g],null,new c(_,g))}n.push(h)}}else d(_)&&n.push(new u(_,E,null,new c(i,E)))}}else if(h=r.pop(),void 0!==(p=this.__execute(t.leave,h))&&p!==s&&p!==o&&p!==a&&h.ref.replace(p),this.__state!==a&&p!==a||x(h),this.__state===s||p===s)return v.root;return v.root},t.Syntax=n,t.traverse=m,t.replace=function(e,t){return(new p).replace(e,t)},t.attachComments=function(e,t,n){var i,s,o,a,c=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,s=t.length;oe.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(a,1)):a+=1;return a===c.length?r.Break:c[a].extendedRange[0]>e.range[1]?r.Skip:void 0}}),a=0,m(e,{leave:function(e){for(var t;ae.range[1]?r.Skip:void 0}}),e},t.VisitorKeys=i,t.VisitorOption=r,t.Controller=p,t.cloneEnvironment=function(){return e({})},t}(t)})),oT=iT((function(e){e.exports&&(e.exports=function(){function e(t,n,r,i){this.message=t,this.expected=n,this.found=r,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),e.buildMessage=function(e,t){var n={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,n="";for(t=0;t0){for(t=1,r=1;t<~+.]/,d=ge([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),f=me(">",!1),h=me("~",!1),m=me("+",!1),g=me(",",!1),y=me("!",!1),_=me("*",!1),b=me("#",!1),v=me("[",!1),E=me("]",!1),x=/^[>","<","!"],!1,!1),O=me("=",!1),T=function(e){return(e||"")+"="},w=/^[><]/,C=ge([">","<"],!1,!1),A=me(".",!1),P=function(e,t,n){return{type:"attribute",name:e,operator:t,value:n}},k=me('"',!1),D=/^[^\\"]/,R=ge(["\\",'"'],!0,!1),I=me("\\",!1),L={type:"any"},B=function(e,t){return e+t},M=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},j=me("'",!1),N=/^[^\\']/,F=ge(["\\","'"],!0,!1),U=/^[0-9]/,V=ge([["0","9"]],!1,!1),K=me("type(",!1),W=/^[^ )]/,$=ge([" ",")"],!0,!1),q=me(")",!1),Q=/^[imsu]/,z=ge(["i","m","s","u"],!1,!1),X=me("/",!1),G=/^[^\/]/,Z=ge(["/"],!0,!1),H=me(":not(",!1),Y=me(":matches(",!1),J=me(":has(",!1),ee=me(":first-child",!1),te=me(":last-child",!1),ne=me(":nth-child(",!1),re=me(":nth-last-child(",!1),ie=me(":",!1),se=me("statement",!0),oe=me("expression",!0),ae=me("declaration",!0),le=me("function",!0),ce=me("pattern",!0),ue=0,pe=[{line:1,column:1}],de=0,fe=[],he={};if("startRule"in n){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');c=l[n.startRule]}function me(e,t){return{type:"literal",text:e,ignoreCase:t}}function ge(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function ye(e){var n,r=pe[e];if(r)return r;for(n=e-1;!pe[n];)n--;for(r={line:(r=pe[n]).line,column:r.column};nde&&(de=ue,fe=[]),fe.push(e))}function ve(){var e,t,n,r,i=30*ue+0,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,(t=Ee())!==a&&(n=Oe())!==a&&Ee()!==a?e=t=1===(r=n).length?r[0]:{type:"matches",selectors:r}:(ue=e,e=a),e===a&&(e=ue,(t=Ee())!==a&&(t=void 0),e=t),he[i]={nextPos:ue,result:e},e)}function Ee(){var e,n,r=30*ue+1,i=he[r];if(i)return ue=i.nextPos,i.result;for(e=[],32===t.charCodeAt(ue)?(n=" ",ue++):(n=a,be(u));n!==a;)e.push(n),32===t.charCodeAt(ue)?(n=" ",ue++):(n=a,be(u));return he[r]={nextPos:ue,result:e},e}function xe(){var e,n,r,i=30*ue+2,s=he[i];if(s)return ue=s.nextPos,s.result;if(n=[],p.test(t.charAt(ue))?(r=t.charAt(ue),ue++):(r=a,be(d)),r!==a)for(;r!==a;)n.push(r),p.test(t.charAt(ue))?(r=t.charAt(ue),ue++):(r=a,be(d));else n=a;return n!==a&&(n=n.join("")),e=n,he[i]={nextPos:ue,result:e},e}function Se(){var e,n,r,i=30*ue+3,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,(n=Ee())!==a?(62===t.charCodeAt(ue)?(r=">",ue++):(r=a,be(f)),r!==a&&Ee()!==a?e=n="child":(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ee())!==a?(126===t.charCodeAt(ue)?(r="~",ue++):(r=a,be(h)),r!==a&&Ee()!==a?e=n="sibling":(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ee())!==a?(43===t.charCodeAt(ue)?(r="+",ue++):(r=a,be(m)),r!==a&&Ee()!==a?e=n="adjacent":(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,32===t.charCodeAt(ue)?(n=" ",ue++):(n=a,be(u)),n!==a&&(r=Ee())!==a?e=n="descendant":(ue=e,e=a)))),he[i]={nextPos:ue,result:e},e)}function Oe(){var e,n,r,i,s,o,l,c,u=30*ue+4,p=he[u];if(p)return ue=p.nextPos,p.result;if(e=ue,(n=Te())!==a){for(r=[],i=ue,(s=Ee())!==a?(44===t.charCodeAt(ue)?(o=",",ue++):(o=a,be(g)),o!==a&&(l=Ee())!==a&&(c=Te())!==a?i=s=[s,o,l,c]:(ue=i,i=a)):(ue=i,i=a);i!==a;)r.push(i),i=ue,(s=Ee())!==a?(44===t.charCodeAt(ue)?(o=",",ue++):(o=a,be(g)),o!==a&&(l=Ee())!==a&&(c=Te())!==a?i=s=[s,o,l,c]:(ue=i,i=a)):(ue=i,i=a);r!==a?e=n=[n].concat(r.map((function(e){return e[3]}))):(ue=e,e=a)}else ue=e,e=a;return he[u]={nextPos:ue,result:e},e}function Te(){var e,t,n,r,i,s,o,l=30*ue+5,c=he[l];if(c)return ue=c.nextPos,c.result;if(e=ue,(t=we())!==a){for(n=[],r=ue,(i=Se())!==a&&(s=we())!==a?r=i=[i,s]:(ue=r,r=a);r!==a;)n.push(r),r=ue,(i=Se())!==a&&(s=we())!==a?r=i=[i,s]:(ue=r,r=a);n!==a?(o=t,e=t=n.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),o)):(ue=e,e=a)}else ue=e,e=a;return he[l]={nextPos:ue,result:e},e}function we(){var e,n,r,i,s,o,l,c=30*ue+6,u=he[c];if(u)return ue=u.nextPos,u.result;if(e=ue,33===t.charCodeAt(ue)?(n="!",ue++):(n=a,be(y)),n===a&&(n=null),n!==a){if(r=[],(i=Ce())!==a)for(;i!==a;)r.push(i),i=Ce();else r=a;r!==a?(s=n,l=1===(o=r).length?o[0]:{type:"compound",selectors:o},s&&(l.subject=!0),e=n=l):(ue=e,e=a)}else ue=e,e=a;return he[c]={nextPos:ue,result:e},e}function Ce(){var e,n=30*ue+7,r=he[n];return r?(ue=r.nextPos,r.result):((e=function(){var e,n,r=30*ue+8,i=he[r];return i?(ue=i.nextPos,i.result):(42===t.charCodeAt(ue)?(n="*",ue++):(n=a,be(_)),n!==a&&(n={type:"wildcard",value:n}),e=n,he[r]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i=30*ue+9,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,35===t.charCodeAt(ue)?(n="#",ue++):(n=a,be(b)),n===a&&(n=null),n!==a&&(r=xe())!==a?e=n={type:"identifier",value:r}:(ue=e,e=a),he[i]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s=30*ue+10,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,91===t.charCodeAt(ue)?(n="[",ue++):(n=a,be(v)),n!==a&&Ee()!==a&&(r=function(){var e,n,r,i,s=30*ue+14,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,(n=Ae())!==a&&Ee()!==a&&(r=function(){var e,n,r,i=30*ue+12,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,33===t.charCodeAt(ue)?(n="!",ue++):(n=a,be(y)),n===a&&(n=null),n!==a?(61===t.charCodeAt(ue)?(r="=",ue++):(r=a,be(O)),r!==a?e=n=T(n):(ue=e,e=a)):(ue=e,e=a),he[i]={nextPos:ue,result:e},e)}())!==a&&Ee()!==a?((i=function(){var e,n,r,i,s,o=30*ue+18,l=he[o];if(l)return ue=l.nextPos,l.result;if(e=ue,"type("===t.substr(ue,5)?(n="type(",ue+=5):(n=a,be(K)),n!==a)if(Ee()!==a){if(r=[],W.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be($)),i!==a)for(;i!==a;)r.push(i),W.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be($));else r=a;r!==a&&(i=Ee())!==a?(41===t.charCodeAt(ue)?(s=")",ue++):(s=a,be(q)),s!==a?e=n={type:"type",value:r.join("")}:(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[o]={nextPos:ue,result:e},e}())===a&&(i=function(){var e,n,r,i,s,o,l=30*ue+20,c=he[l];if(c)return ue=c.nextPos,c.result;if(e=ue,47===t.charCodeAt(ue)?(n="/",ue++):(n=a,be(X)),n!==a){if(r=[],G.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(Z)),i!==a)for(;i!==a;)r.push(i),G.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(Z));else r=a;r!==a?(47===t.charCodeAt(ue)?(i="/",ue++):(i=a,be(X)),i!==a?((s=function(){var e,n,r=30*ue+19,i=he[r];if(i)return ue=i.nextPos,i.result;if(e=[],Q.test(t.charAt(ue))?(n=t.charAt(ue),ue++):(n=a,be(z)),n!==a)for(;n!==a;)e.push(n),Q.test(t.charAt(ue))?(n=t.charAt(ue),ue++):(n=a,be(z));else e=a;return he[r]={nextPos:ue,result:e},e}())===a&&(s=null),s!==a?(o=s,e=n={type:"regexp",value:new RegExp(r.join(""),o?o.join(""):"")}):(ue=e,e=a)):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;return he[l]={nextPos:ue,result:e},e}()),i!==a?e=n=P(n,r,i):(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ae())!==a&&Ee()!==a&&(r=function(){var e,n,r,i=30*ue+11,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,x.test(t.charAt(ue))?(n=t.charAt(ue),ue++):(n=a,be(S)),n===a&&(n=null),n!==a?(61===t.charCodeAt(ue)?(r="=",ue++):(r=a,be(O)),r!==a?e=n=T(n):(ue=e,e=a)):(ue=e,e=a),e===a&&(w.test(t.charAt(ue))?(e=t.charAt(ue),ue++):(e=a,be(C))),he[i]={nextPos:ue,result:e},e)}())!==a&&Ee()!==a?((i=function(){var e,n,r,i,s,o,l=30*ue+15,c=he[l];if(c)return ue=c.nextPos,c.result;if(e=ue,34===t.charCodeAt(ue)?(n='"',ue++):(n=a,be(k)),n!==a){for(r=[],D.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(R)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));i!==a;)r.push(i),D.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(R)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));r!==a?(34===t.charCodeAt(ue)?(i='"',ue++):(i=a,be(k)),i!==a?e=n=M(r):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;if(e===a)if(e=ue,39===t.charCodeAt(ue)?(n="'",ue++):(n=a,be(j)),n!==a){for(r=[],N.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(F)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));i!==a;)r.push(i),N.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(F)),i===a&&(i=ue,92===t.charCodeAt(ue)?(s="\\",ue++):(s=a,be(I)),s!==a?(t.length>ue?(o=t.charAt(ue),ue++):(o=a,be(L)),o!==a?i=s=B(s,o):(ue=i,i=a)):(ue=i,i=a));r!==a?(39===t.charCodeAt(ue)?(i="'",ue++):(i=a,be(j)),i!==a?e=n=M(r):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;return he[l]={nextPos:ue,result:e},e}())===a&&(i=function(){var e,n,r,i,s,o,l,c=30*ue+16,u=he[c];if(u)return ue=u.nextPos,u.result;for(e=ue,n=ue,r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));if(r!==a?(46===t.charCodeAt(ue)?(i=".",ue++):(i=a,be(A)),i!==a?n=r=[r,i]:(ue=n,n=a)):(ue=n,n=a),n===a&&(n=null),n!==a){if(r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V)),i!==a)for(;i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));else r=a;r!==a?(o=r,l=(s=n)?[].concat.apply([],s).join(""):"",e=n={type:"literal",value:parseFloat(l+o.join(""))}):(ue=e,e=a)}else ue=e,e=a;return he[c]={nextPos:ue,result:e},e}())===a&&(i=function(){var e,t,n=30*ue+17,r=he[n];return r?(ue=r.nextPos,r.result):((t=xe())!==a&&(t={type:"literal",value:t}),e=t,he[n]={nextPos:ue,result:e},e)}()),i!==a?e=n=P(n,r,i):(ue=e,e=a)):(ue=e,e=a),e===a&&(e=ue,(n=Ae())!==a&&(n={type:"attribute",name:n}),e=n)),he[s]={nextPos:ue,result:e},e)}())!==a&&Ee()!==a?(93===t.charCodeAt(ue)?(i="]",ue++):(i=a,be(E)),i!==a?e=n=r:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s,o,l,c,u=30*ue+21,p=he[u];if(p)return ue=p.nextPos,p.result;if(e=ue,46===t.charCodeAt(ue)?(n=".",ue++):(n=a,be(A)),n!==a)if((r=xe())!==a){for(i=[],s=ue,46===t.charCodeAt(ue)?(o=".",ue++):(o=a,be(A)),o!==a&&(l=xe())!==a?s=o=[o,l]:(ue=s,s=a);s!==a;)i.push(s),s=ue,46===t.charCodeAt(ue)?(o=".",ue++):(o=a,be(A)),o!==a&&(l=xe())!==a?s=o=[o,l]:(ue=s,s=a);i!==a?(c=r,n={type:"field",name:i.reduce((function(e,t){return e+t[0]+t[1]}),c)},e=n):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[u]={nextPos:ue,result:e},e}())===a&&(e=function(){var e,n,r,i,s=30*ue+22,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,":not("===t.substr(ue,5)?(n=":not(",ue+=5):(n=a,be(H)),n!==a&&Ee()!==a&&(r=Oe())!==a&&Ee()!==a?(41===t.charCodeAt(ue)?(i=")",ue++):(i=a,be(q)),i!==a?e=n={type:"not",selectors:r}:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s=30*ue+23,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,":matches("===t.substr(ue,9)?(n=":matches(",ue+=9):(n=a,be(Y)),n!==a&&Ee()!==a&&(r=Oe())!==a&&Ee()!==a?(41===t.charCodeAt(ue)?(i=")",ue++):(i=a,be(q)),i!==a?e=n={type:"matches",selectors:r}:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s=30*ue+24,o=he[s];return o?(ue=o.nextPos,o.result):(e=ue,":has("===t.substr(ue,5)?(n=":has(",ue+=5):(n=a,be(J)),n!==a&&Ee()!==a&&(r=Oe())!==a&&Ee()!==a?(41===t.charCodeAt(ue)?(i=")",ue++):(i=a,be(q)),i!==a?e=n={type:"has",selectors:r}:(ue=e,e=a)):(ue=e,e=a),he[s]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r=30*ue+25,i=he[r];return i?(ue=i.nextPos,i.result):(":first-child"===t.substr(ue,12)?(n=":first-child",ue+=12):(n=a,be(ee)),n!==a&&(n=Pe(1)),e=n,he[r]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r=30*ue+26,i=he[r];return i?(ue=i.nextPos,i.result):(":last-child"===t.substr(ue,11)?(n=":last-child",ue+=11):(n=a,be(te)),n!==a&&(n=ke(1)),e=n,he[r]={nextPos:ue,result:e},e)}())===a&&(e=function(){var e,n,r,i,s,o=30*ue+27,l=he[o];if(l)return ue=l.nextPos,l.result;if(e=ue,":nth-child("===t.substr(ue,11)?(n=":nth-child(",ue+=11):(n=a,be(ne)),n!==a)if(Ee()!==a){if(r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V)),i!==a)for(;i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));else r=a;r!==a&&(i=Ee())!==a?(41===t.charCodeAt(ue)?(s=")",ue++):(s=a,be(q)),s!==a?e=n=Pe(parseInt(r.join(""),10)):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[o]={nextPos:ue,result:e},e}())===a&&(e=function(){var e,n,r,i,s,o=30*ue+28,l=he[o];if(l)return ue=l.nextPos,l.result;if(e=ue,":nth-last-child("===t.substr(ue,16)?(n=":nth-last-child(",ue+=16):(n=a,be(re)),n!==a)if(Ee()!==a){if(r=[],U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V)),i!==a)for(;i!==a;)r.push(i),U.test(t.charAt(ue))?(i=t.charAt(ue),ue++):(i=a,be(V));else r=a;r!==a&&(i=Ee())!==a?(41===t.charCodeAt(ue)?(s=")",ue++):(s=a,be(q)),s!==a?e=n=ke(parseInt(r.join(""),10)):(ue=e,e=a)):(ue=e,e=a)}else ue=e,e=a;else ue=e,e=a;return he[o]={nextPos:ue,result:e},e}())===a&&(e=function(){var e,n,r,i=30*ue+29,s=he[i];return s?(ue=s.nextPos,s.result):(e=ue,58===t.charCodeAt(ue)?(n=":",ue++):(n=a,be(ie)),n!==a?("statement"===t.substr(ue,9).toLowerCase()?(r=t.substr(ue,9),ue+=9):(r=a,be(se)),r===a&&("expression"===t.substr(ue,10).toLowerCase()?(r=t.substr(ue,10),ue+=10):(r=a,be(oe)),r===a&&("declaration"===t.substr(ue,11).toLowerCase()?(r=t.substr(ue,11),ue+=11):(r=a,be(ae)),r===a&&("function"===t.substr(ue,8).toLowerCase()?(r=t.substr(ue,8),ue+=8):(r=a,be(le)),r===a&&("pattern"===t.substr(ue,7).toLowerCase()?(r=t.substr(ue,7),ue+=7):(r=a,be(ce)))))),r!==a?e=n={type:"class",name:r}:(ue=e,e=a)):(ue=e,e=a),he[i]={nextPos:ue,result:e},e)}()),he[n]={nextPos:ue,result:e},e)}function Ae(){var e,n,r,i,s,o,l,c,u=30*ue+13,p=he[u];if(p)return ue=p.nextPos,p.result;if(e=ue,(n=xe())!==a){for(r=[],i=ue,46===t.charCodeAt(ue)?(s=".",ue++):(s=a,be(A)),s!==a&&(o=xe())!==a?i=s=[s,o]:(ue=i,i=a);i!==a;)r.push(i),i=ue,46===t.charCodeAt(ue)?(s=".",ue++):(s=a,be(A)),s!==a&&(o=xe())!==a?i=s=[s,o]:(ue=i,i=a);r!==a?(l=n,c=r,e=n=[].concat.apply([l],c).join("")):(ue=e,e=a)}else ue=e,e=a;return he[u]={nextPos:ue,result:e},e}function Pe(e){return{type:"nth-child",index:{type:"literal",value:e}}}function ke(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((r=c())!==a&&ue===t.length)return r;throw r!==a&&ue0&&l(e,t,n))&&a(t[0],t.slice(1),n)};case"descendant":var c=bT(e.left),u=bT(e.right);return function(e,t,n){if(u(e,t,n))for(var r=0,i=t.length;r":return function(t){return aT(t,p)>e.value.value};case">=":return function(t){return aT(t,p)>=e.value.value}}throw new Error("Unknown operator: ".concat(e.operator));case"sibling":var h=bT(e.left),m=bT(e.right);return function(t,n,r){return m(t,n,r)&&ST(t,h,n,"LEFT_SIDE",r)||e.left.subject&&h(t,n,r)&&ST(t,m,n,"RIGHT_SIDE",r)};case"adjacent":var g=bT(e.left),y=bT(e.right);return function(t,n,r){return y(t,n,r)&&OT(t,g,n,"LEFT_SIDE",r)||e.right.subject&&g(t,n,r)&&OT(t,y,n,"RIGHT_SIDE",r)};case"nth-child":var _=e.index.value,b=bT(e.right);return function(e,t,n){return b(e,t,n)&&TT(e,t,_,n)};case"nth-last-child":var v=-e.index.value,E=bT(e.right);return function(e,t,n){return E(e,t,n)&&TT(e,t,v,n)};case"class":var x=e.name.toLowerCase();return function(t,n){switch(x){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===n.length||"MetaProperty"!==n[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(e.name))}}throw new Error("Unknown selector type: ".concat(e.type))}function ET(e,t){var n=e.type;return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:sT.VisitorKeys[n]?sT.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return"type"!==e}))}function xT(e){return null!==e&&"object"===JO(e)&&"string"==typeof e.type}function ST(e,t,n,r,i){var s=eT(n,1)[0];if(!s)return!1;for(var o=ET(s,i),a=0;a0&&xT(l[c-1])&&t(l[c-1],n,i))return!0;if("RIGHT_SIDE"===r&&c=0&&le));return n.length?function(...e){if(0===e.length)return[];let t=[...new Set(e[0])];for(const n of e.slice(1))t=t.filter((e=>n.includes(e)));return t}(...n):null}case"child":case"descendant":case"sibling":case"adjacent":return t(e.right);case"class":return"function"===e.name?["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]:null;default:return null}}function n(e){switch(e.type){case"child":case"descendant":case"sibling":case"adjacent":return n(e.left)+n(e.right);case"compound":case"not":case"matches":return e.selectors.reduce(((e,t)=>e+n(t)),0);case"attribute":case"field":case"nth-child":case"nth-last-child":return 1;default:return 0}}function r(e){switch(e.type){case"child":case"descendant":case"sibling":case"adjacent":return r(e.left)+r(e.right);case"compound":case"not":case"matches":return e.selectors.reduce(((e,t)=>e+r(t)),0);case"identifier":return 1;default:return 0}}function i(e,t){return e.attributeCount-t.attributeCount||e.identifierCount-t.identifierCount||(e.rawSelector<=t.rawSelector?-1:1)}const s=new Map;function o(i){if(s.has(i))return s.get(i);const o=function(t){try{return e.parse(t.replace(/:exit$/u,""))}catch(e){if(e.location&&e.location.start&&"number"==typeof e.location.start.offset)throw new SyntaxError(`Syntax error in selector "${t}" at position ${e.location.start.offset}: ${e.message}`);throw e}}(i),a={rawSelector:i,isExit:i.endsWith(":exit"),parsedSelector:o,listenerTypes:t(o),attributeCount:n(o),identifierCount:r(o)};return s.set(i,a),a}return lT=class{constructor(e,t){this.emitter=e,this.esqueryOptions=t,this.currentAncestry=[],this.enterSelectorsByNodeType=new Map,this.exitSelectorsByNodeType=new Map,this.anyTypeEnterSelectors=[],this.anyTypeExitSelectors=[],e.eventNames().forEach((e=>{const t=o(e);if(t.listenerTypes){const e=t.isExit?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType;return void t.listenerTypes.forEach((n=>{e.has(n)||e.set(n,[]),e.get(n).push(t)}))}(t.isExit?this.anyTypeExitSelectors:this.anyTypeEnterSelectors).push(t)})),this.anyTypeEnterSelectors.sort(i),this.anyTypeExitSelectors.sort(i),this.enterSelectorsByNodeType.forEach((e=>e.sort(i))),this.exitSelectorsByNodeType.forEach((e=>e.sort(i)))}applySelector(t,n){e.matches(t,n.parsedSelector,this.currentAncestry,this.esqueryOptions)&&this.emitter.emit(n.rawSelector,t)}applySelectors(e,t){const n=(t?this.exitSelectorsByNodeType:this.enterSelectorsByNodeType).get(e.type)||[],r=t?this.anyTypeExitSelectors:this.anyTypeEnterSelectors;let s=0,o=0;for(;s=n.length||ot?e.replace(/\{\{([^{}]+?)\}\}/gu,((e,n)=>{const r=n.trim();return r in t?t[r]:e})):e),dT}function RT(){if(mT)return hT;mT=1;const e=Fb,t=function(){if(pT)return uT;function e(e,t){return{range:[e,e],text:t}}pT=1;const t=Object.freeze({insertTextAfter(e,t){return this.insertTextAfterRange(e.range,t)},insertTextAfterRange(t,n){return e(t[1],n)},insertTextBefore(e,t){return this.insertTextBeforeRange(e.range,t)},insertTextBeforeRange(t,n){return e(t[0],n)},replaceText(e,t){return this.replaceTextRange(e.range,t)},replaceTextRange(e,t){return{range:e,text:t}},remove(e){return this.removeRange(e.range)},removeRange(e){return{range:e,text:""}}});return uT=t}(),n=DT();function r(e){return e.loc?e.loc.start?e.loc:{start:e.loc,end:null}:e.node.loc}function i(e){return e?{range:[e.range[0],e.range[1]],text:e.text}:null}function s(t){t&&e(t.range&&"number"==typeof t.range[0]&&"number"==typeof t.range[1],`Fix has invalid range: ${JSON.stringify(t,null,2)}`)}function o(e,t){return e.range[0]-t.range[0]||e.range[1]-t.range[1]}function a(n,r){if("function"!=typeof n.fix)return null;const a=n.fix(t);return a&&Symbol.iterator in a?function(t,n){for(const e of t)s(e);if(0===t.length)return null;if(1===t.length)return i(t[0]);t.sort(o);const r=n.text,a=t[0].range[0],l=t[t.length-1].range[1];let c="",u=Number.MIN_SAFE_INTEGER;for(const n of t)e(n.range[0]>=u,"Fix objects must not be overlapped in a report."),n.range[0]>=0&&(c+=r.slice(Math.max(0,a,u),n.range[0])),c+=n.text,u=n.range[1];return c+=r.slice(Math.max(0,a,u),l),{range:[a,l],text:c}}(Array.from(a),r):(s(a),i(a))}function l(e,t,r){return e.suggest&&Array.isArray(e.suggest)?e.suggest.map((e=>{const i=e.desc||r[e.messageId];return{...e,desc:n(i,e.data),fix:a(e,t)}})).filter((({fix:e})=>e)):[]}return hT=function(t){return(...i)=>{const s=function(...e){return 1===e.length?Object.assign({},e[0]):"string"==typeof e[1]?{node:e[0],message:e[1],data:e[2],fix:e[3]}:{node:e[0],loc:e[1],message:e[2],data:e[3],fix:e[4]}}(...i),o=t.messageIds;let c;if(function(t){t.node?e("object"==typeof t.node,"Node must be an object"):e(t.loc,"Node must be provided when reporting error if location is not provided")}(s),s.messageId){if(!o)throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata.");const e=s.messageId;if(s.message)throw new TypeError("context.report() called with a message and a messageId. Please only pass one.");if(!o||!Object.prototype.hasOwnProperty.call(o,e))throw new TypeError(`context.report() called with a messageId of '${e}' which is not present in the 'messages' config: ${JSON.stringify(o,null,2)}`);c=o[e]}else{if(!s.message)throw new TypeError("Missing `message` property in report() call; add a message that describes the linting problem.");c=s.message}return function(e,t){e&&Array.isArray(e)&&e.forEach((e=>{if(e.messageId){const{messageId:n}=e;if(!t)throw new TypeError(`context.report() called with a suggest option with a messageId '${n}', but no messages were present in the rule metadata.`);if(!t[n])throw new TypeError(`context.report() called with a suggest option with a messageId '${n}' which is not present in the 'messages' config: ${JSON.stringify(t,null,2)}`);if(e.desc)throw new TypeError("context.report() called with a suggest option that defines both a 'messageId' and an 'desc'. Please only pass one.")}else if(!e.desc)throw new TypeError("context.report() called with a suggest option that doesn't have either a `desc` or `messageId`");if("function"!=typeof e.fix)throw new TypeError(`context.report() called with a suggest option without a fix function. See: ${e}`)}))}(s.suggest,o),function(e){const t={ruleId:e.ruleId,severity:e.severity,message:e.message,line:e.loc.start.line,column:e.loc.start.column+1,nodeType:e.node&&e.node.type||null};return e.messageId&&(t.messageId=e.messageId),e.loc.end&&(t.endLine=e.loc.end.line,t.endColumn=e.loc.end.column+1),e.fix&&(t.fix=e.fix),e.suggestions&&e.suggestions.length>0&&(t.suggestions=e.suggestions),t}({ruleId:t.ruleId,severity:t.severity,node:s.node,message:n(c,s.data),messageId:s.messageId,loc:r(s),fix:t.disableFixes?null:a(s,t.sourceCode),suggestions:t.disableFixes?[]:l(s,t.sourceCode,o)})}},hT}PT.parse=AT,PT.match=CT,PT.traverse=wT,PT.matches=function(e,t,n,r){return!t||!!e&&(n||(n=[]),bT(t)(e,n,r))},PT.query=PT;var IT,LT={exports:{}},BT={},MT={exports:{}};var jT,NT={exports:{}};function FT(){return jT||(jT=1,function(){var e,t,n,r,i,s;function o(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},e={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},n=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],r=new Array(128),s=0;s<128;++s)r[s]=s>=97&&s<=122||s>=65&&s<=90||36===s||95===s;for(i=new Array(128),s=0;s<128;++s)i[s]=s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||36===s||95===s;NT.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&n.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?r[e]:t.NonAsciiIdentifierStart.test(o(e))},isIdentifierPartES5:function(e){return e<128?i[e]:t.NonAsciiIdentifierPart.test(o(e))},isIdentifierStartES6:function(t){return t<128?r[t]:e.NonAsciiIdentifierStart.test(o(t))},isIdentifierPartES6:function(t){return t<128?i[t]:e.NonAsciiIdentifierPart.test(o(t))}}}()),NT.exports}var UT,VT,KT,WT,$T,qT,QT,zT,XT,GT,ZT,HT,YT,JT,ew,tw,nw,rw,iw,sw,ow,aw,lw,cw,uw,pw,dw,fw,hw,mw,gw,yw,_w,bw,vw,Ew,xw,Sw,Ow,Tw,ww,Cw={exports:{}};function Aw(){return VT||(VT=1,BT.ast=(IT||(IT=1,function(){function e(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function t(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}MT.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:e,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(t){return e(t)||null!=t&&"FunctionDeclaration"===t.type},isProblematicIfStatement:function(e){var n;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;n=e.consequent;do{if("IfStatement"===n.type&&null==n.alternate)return!0;n=t(n)}while(n);return!1},trailingStatement:t}}()),MT.exports),BT.code=FT(),BT.keyword=(UT||(UT=1,function(){var e=FT();function t(e,t){return!(!t&&"yield"===e)&&n(e,t)}function n(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function r(e,n){return"null"===e||"true"===e||"false"===e||t(e,n)}function i(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function s(t){var n,r,i;if(0===t.length)return!1;if(i=t.charCodeAt(0),!e.isIdentifierStartES5(i))return!1;for(n=1,r=t.length;n=r)return!1;if(!(56320<=(s=t.charCodeAt(n))&&s<=57343))return!1;i=1024*(i-55296)+(s-56320)+65536}if(!o(i))return!1;o=e.isIdentifierPartES6}return!0}Cw.exports={isKeywordES5:t,isKeywordES6:n,isReservedWordES5:r,isReservedWordES6:i,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:s,isIdentifierNameES6:o,isIdentifierES5:function(e,t){return s(e)&&!r(e,t)},isIdentifierES6:function(e,t){return o(e)&&!i(e,t)}}}()),Cw.exports)),BT}function Pw(){return KT||(KT=1,function(e){const{KEYS:t}=lv(),n=Aw(),r=bv(),i=HO(),{breakableTypePattern:s,createGlobalLinebreakMatcher:o,lineBreakPattern:a,shebangPattern:l}=Av(),c=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,u=/^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u,p=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u,d=/Array$/u,f=/^(?:bind|call|apply)$/u,h=/^[\s*]*@this/mu,m=/^(?:eslint[- ]|(?:globals?|exported) )/u,g=new Set(["\r\n","\r","\n","\u2028","\u2029"]),y=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),_=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,b=/^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su,v=new Set(["&&=","||=","??="]);function E(e,t,n){const r=e.identifier,i=0===t||n[t-1].identifier!==r;return r&&!1===e.init&&e.isWrite()&&i}function x(e){return e[0]!==e[0].toLocaleLowerCase()}function S(e){return e.id&&x(e.id.name)}function O(e){for(let t=e;t;t=t.parent)if(c.test(t.type))return t;return null}function T(e){return Boolean(e&&c.test(e.type))}function w(e){return Boolean(e&&u.test(e.type))}function C(e){return"Literal"===e.type&&null===e.value&&!e.regex&&!e.bigint}function A(e){return C(e)||"Identifier"===e.type&&"undefined"===e.name||"UnaryExpression"===e.type&&"void"===e.operator}function P(e){return"CallExpression"===e.parent.type&&e.parent.callee===e}function k(e){switch(e.type){case"Literal":if(null!==e.value)return String(e.value);if(C(e))return String(e.value);if(e.regex)return`/${e.regex.pattern}/${e.regex.flags}`;if(e.bigint)return e.bigint;break;case"TemplateLiteral":if(0===e.expressions.length&&1===e.quasis.length)return e.quasis[0].value.cooked}return null}function D(e){let t;switch(e&&e.type){case"ChainExpression":return D(e.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":t=e.key;break;case"MemberExpression":t=e.property}return t?"Identifier"!==t.type||e.computed?k(t):t.name:null}function R(e){return e&&"ChainExpression"===e.type?e.expression:e}function I(e,t){return"string"==typeof t?e===t:t.test(e)}function L(e,t){return"Identifier"===e.type&&I(e.name,t)}function B(e,t,n){const r=R(e);if("MemberExpression"!==r.type)return!1;if(t&&!L(r.object,t))return!1;if(n){const e=D(r);if("string"!=typeof e||!I(e,n))return!1}return!0}function M(e,t){return e.regex||t.regex?Boolean(e.regex&&t.regex&&e.regex.pattern===t.regex.pattern&&e.regex.flags===t.regex.flags):e.bigint||t.bigint?e.bigint===t.bigint:e.value===t.value}function j(e){return B(e,"Reflect","apply")}function N(e){return B(e,d,"from")}function F(e){return B(e,null,p)}function U(e){return t=>!e(t)}function V(e){return"=>"===e.value&&"Punctuator"===e.type}function K(e){return","===e.value&&"Punctuator"===e.type}function W(e){return"."===e.value&&"Punctuator"===e.type}function $(e){return"?."===e.value&&"Punctuator"===e.type}function q(e){return";"===e.value&&"Punctuator"===e.type}function Q(e){return":"===e.value&&"Punctuator"===e.type}function z(e){return"("===e.value&&"Punctuator"===e.type}function X(e){return")"===e.value&&"Punctuator"===e.type}function G(e){return"["===e.value&&"Punctuator"===e.type}function Z(e){return"]"===e.value&&"Punctuator"===e.type}function H(e){return"{"===e.value&&"Punctuator"===e.type}function Y(e){return"}"===e.value&&"Punctuator"===e.type}function J(e,t){if("ArrowFunctionExpression"===e.type&&1===e.params.length){const n=t.getFirstToken(e.params[0]),r=t.getTokenBefore(n);return z(r)?r:n}return e.id?t.getTokenAfter(e.id,z):t.getFirstToken(e,z)}function ee(e){return"LogicalExpression"===e.type&&("&&"===e.operator||"||"===e.operator)}function te(e){return"LogicalExpression"===e.type&&"??"===e.operator}function ne(e){return null===e.value?"null"!==e.raw&&("object"==typeof e.regex||null):!!e.value}function re(e,t){switch(e.type){case"Literal":return"||"===t&&!0===ne(e)||"&&"===t&&!1===ne(e);case"UnaryExpression":return"&&"===t&&"void"===e.operator;case"LogicalExpression":return t===e.operator&&(re(e.left,t)||re(e.right,t));case"AssignmentExpression":return["||=","&&="].includes(e.operator)&&t===e.operator.slice(0,-1)&&re(e.right,t)}return!1}function ie(e,t){const n=e.references.find((e=>e.identifier===t));return Boolean(n&&n.resolved&&"global"===n.resolved.scope.type&&0===n.resolved.defs.length)}let se;{const e=new Set(["BreakStatement","ContinueStatement"]),t=new Set(["ExportAllDeclaration","ExportNamedDeclaration","ImportDeclaration"]),n=new Set(["Identifier","Keyword"]),r={__proto__:null,break:"BreakStatement",continue:"ContinueStatement",debugger:"DebuggerStatement",do:"DoWhileStatement",else:"IfStatement",return:"ReturnStatement",yield:"YieldExpression"},i=new Set([":",";","{","=>","++","--"]),s=new Set(["DoWhileStatement","ForInStatement","ForOfStatement","ForStatement","IfStatement","WhileStatement","WithStatement"]);se=function(o,a){const l=o.getTokenBefore(a);if(!l||"Punctuator"===l.type&&i.has(l.value))return!1;const c=o.getNodeByRangeIndex(l.range[0]);if(X(l))return!s.has(c.type);if(Y(l))return"BlockStatement"===c.type&&"FunctionExpression"===c.parent.type||"ClassBody"===c.type&&"ClassExpression"===c.parent.type||"ObjectExpression"===c.type;if(n.has(l.type)){if(e.has(c.parent.type))return!1;const t=l.value,n=r[t];return c.type!==n}return"String"!==l.type||!t.has(c.parent.type)}}e.exports={COMMENTS_IGNORE_PATTERN:/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,LINEBREAKS:g,LINEBREAK_MATCHER:a,SHEBANG_MATCHER:l,STATEMENT_LIST_PARENTS:y,isTokenOnSameLine(e,t){return e.loc.end.line===t.loc.start.line},isNullOrUndefined:A,isCallee:P,isES5Constructor:S,getUpperFunction:O,isFunction:T,isLoop:w,isInLoop:function(e){for(let t=e;t&&!T(t);t=t.parent)if(w(t))return!0;return!1},isArrayFromMethod:N,isParenthesised:function(e,t){const n=e.getTokenBefore(t),r=e.getTokenAfter(t);return Boolean(n&&r)&&"("===n.value&&n.range[1]<=t.range[0]&&")"===r.value&&r.range[0]>=t.range[1]},createGlobalLinebreakMatcher:o,equalTokens:function(e,t,n){const r=n.getTokens(e),i=n.getTokens(t);if(r.length!==i.length)return!1;for(let e=0;eh.test(e.value)))}(e,t))return!1;const r=null===e.id;let i=e;for(;i;){const e=i.parent;switch(e.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":i=e;break;case"ReturnStatement":{const t=O(e);if(null===t||!P(t))return!0;i=t.parent;break}case"ArrowFunctionExpression":if(i!==e.body||!P(e))return!0;i=e.parent;break;case"Property":case"PropertyDefinition":case"MethodDefinition":return e.value!==i;case"AssignmentExpression":case"AssignmentPattern":return"MemberExpression"!==e.left.type&&!(n&&r&&"Identifier"===e.left.type&&x(e.left.name));case"VariableDeclarator":return!(n&&r&&e.init===i&&"Identifier"===e.id.type&&x(e.id.name));case"MemberExpression":if(e.object===i&&B(e,null,f)){const t="ChainExpression"===e.parent.type?e.parent:e;return!(P(t)&&t.parent.arguments.length>=1&&!A(t.parent.arguments[0]))}return!0;case"CallExpression":return j(e.callee)?3!==e.arguments.length||e.arguments[0]!==i||A(e.arguments[1]):N(e.callee)?3!==e.arguments.length||e.arguments[1]!==i||A(e.arguments[2]):!F(e.callee)||(2!==e.arguments.length||e.arguments[0]!==i||A(e.arguments[1]));default:return!0}}return!0},getPrecedence(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":return 3;case"LogicalExpression":switch(e.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;default:return e.type in t?20:-1}},isEmptyBlock(e){return Boolean(e&&"BlockStatement"===e.type&&0===e.body.length)},isEmptyFunction(t){return T(t)&&e.exports.isEmptyBlock(t.body)},getDirectivePrologue(e){const t=[];if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type){const n="Program"===e.type?e.body:e.body.body;for(const e of n){if("ExpressionStatement"!==e.type||"Literal"!==e.expression.type)break;t.push(e)}}return t},isDecimalInteger(e){return"Literal"===e.type&&"number"==typeof e.value&&_.test(e.raw)},isDecimalIntegerNumericToken(e){return"Numeric"===e.type&&_.test(e.value)},getFunctionNameWithKind(e){const t=e.parent,n=[];if("MethodDefinition"!==t.type&&"PropertyDefinition"!==t.type||(t.static&&n.push("static"),t.computed||"PrivateIdentifier"!==t.key.type||n.push("private")),e.async&&n.push("async"),e.generator&&n.push("generator"),"Property"===t.type||"MethodDefinition"===t.type){if("constructor"===t.kind)return"constructor";"get"===t.kind?n.push("getter"):"set"===t.kind?n.push("setter"):n.push("method")}else"PropertyDefinition"===t.type?n.push("method"):("ArrowFunctionExpression"===e.type&&n.push("arrow"),n.push("function"));if("Property"===t.type||"MethodDefinition"===t.type||"PropertyDefinition"===t.type)if(t.computed||"PrivateIdentifier"!==t.key.type){const r=D(t);null!==r?n.push(`'${r}'`):e.id&&n.push(`'${e.id.name}'`)}else n.push(`#${t.key.name}`);else e.id&&n.push(`'${e.id.name}'`);return n.join(" ")},getFunctionHeadLoc(e,t){const n=e.parent;let r=null,i=null;if("Property"===n.type||"MethodDefinition"===n.type||"PropertyDefinition"===n.type)r=n.loc.start,i=J(e,t).loc.start;else if("ArrowFunctionExpression"===e.type){const n=t.getTokenBefore(e.body,V);r=n.loc.start,i=n.loc.end}else r=e.loc.start,i=J(e,t).loc.start;return{start:Object.assign({},r),end:Object.assign({},i)}},getNextLocation(e,{line:t,column:n}){return ni.range[0])&&(i=e)}}else i=e;if("Shebang"===i.type||"Hashbang"===i.type)return!1;if("string"==typeof t){let e;try{e=r.tokenize(t,n)}catch{return!1}const i=e.comments;if(s=e[0],i.length){const e=i[0];(!s||e.range[0]e.value.cooked.length))||n.expressions.every((n=>e(t,n,!1)));case"ArrayExpression":return!!r||n.elements.every((n=>e(t,n,!1)));case"UnaryExpression":return!!("void"===n.operator||"typeof"===n.operator&&r)||("!"===n.operator?e(t,n.argument,!0):e(t,n.argument,!1));case"BinaryExpression":return e(t,n.left,!1)&&e(t,n.right,!1)&&"in"!==n.operator;case"LogicalExpression":{const i=e(t,n.left,r),s=e(t,n.right,r),o=i&&re(n.left,n.operator),a=r&&s&&re(n.right,n.operator);return i&&s||o||a}case"NewExpression":return r;case"AssignmentExpression":return"="===n.operator?e(t,n.right,r):!(!["||=","&&="].includes(n.operator)||!r)&&re(n.right,n.operator.slice(0,-1));case"SequenceExpression":return e(t,n.expressions[n.expressions.length-1],r);case"SpreadElement":return e(t,n.argument,r);case"CallExpression":return!("Identifier"!==n.callee.type||"Boolean"!==n.callee.name||0!==n.arguments.length&&!e(t,n.arguments[0],!0))&&ie(t,n.callee);case"Identifier":return"undefined"===n.name&&ie(t,n)}return!1},isTopLevelExpressionStatement:function(e){if("ExpressionStatement"!==e.type)return!1;const t=e.parent;return"Program"===t.type||"BlockStatement"===t.type&&T(t.parent)},isDirective:function(e){return"ExpressionStatement"===e.type&&"string"==typeof e.directive},isStartOfExpressionStatement:function(e){const t=e.range[0];let n=e;for(;(n=n.parent)&&n.range[0]===t;)if("ExpressionStatement"===n.type)return!0;return!1},needsPrecedingSemicolon:se}}(LT)),LT.exports}function kw(){if($T)return WT;$T=1;const e=Pw();function t(e){return"get"===e.kind||"set"===e.kind}function n(t,n,r,i){const s=t.parent;return"CallExpression"===s.type&&e.isSpecificMemberAccess(s.callee,r,i)&&s.arguments[n]===t}return WT={meta:{type:"suggestion",docs:{description:"Enforce getter and setter pairs in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/accessor-pairs"},schema:[{type:"object",properties:{getWithoutSet:{type:"boolean",default:!1},setWithoutGet:{type:"boolean",default:!0},enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingGetterInPropertyDescriptor:"Getter is not present in property descriptor.",missingSetterInPropertyDescriptor:"Setter is not present in property descriptor.",missingGetterInObjectLiteral:"Getter is not present for {{ name }}.",missingSetterInObjectLiteral:"Setter is not present for {{ name }}.",missingGetterInClass:"Getter is not present for class {{ name }}.",missingSetterInClass:"Setter is not present for class {{ name }}."}},create(r){const i=r.options[0]||{},s=!0===i.getWithoutSet,o=!1!==i.setWithoutGet,a=!1!==i.enforceForClassMembers,l=r.sourceCode;function c(t,n){"Property"===t.type?r.report({node:t,messageId:`${n}InObjectLiteral`,loc:e.getFunctionHeadLoc(t.value,l),data:{name:e.getFunctionNameWithKind(t.value)}}):"MethodDefinition"===t.type?r.report({node:t,messageId:`${n}InClass`,loc:e.getFunctionHeadLoc(t.value,l),data:{name:e.getFunctionNameWithKind(t.value)}}):r.report({node:t,messageId:`${n}InPropertyDescriptor`})}function u(e,t){for(const n of e)c(n,t)}function p(n){const r=[];let i=!1;for(let s=0;s"Property"===e.type)))}(e),function(e){if(n(e,2,"Object","defineProperty")||n(e,2,"Reflect","defineProperty"))return!0;const t=e.parent.parent;return"ObjectExpression"===t.type&&(n(t,1,"Object","create")||n(t,1,"Object","defineProperties"))}(e)&&function(e){const t=new Set(e.properties.filter((e=>"Property"===e.type&&"init"===e.kind&&!e.computed)).map((({key:e})=>e.name))),n=t.has("get"),r=t.has("set");o&&r&&!n&&c(e,"missingGetter"),s&&n&&!r&&c(e,"missingSetter")}(e)},a&&(d.ClassBody=function(e){const t=e.body.filter((e=>"MethodDefinition"===e.type));p(t.filter((e=>e.static))),p(t.filter((e=>!e.static)))})),d}},WT}function Dw(){if(QT)return qT;QT=1;const e=Pw();return qT={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(t){const n=t.sourceCode;function r(e){const t=function(e){let t=!1,n=!1,r=0;return e?"consistent"===e?(t=!0,r=Number.POSITIVE_INFINITY):"always"===e||0===e.minItems?r=0:"never"===e?r=Number.POSITIVE_INFINITY:(n=Boolean(e.multiline),r=e.minItems||Number.POSITIVE_INFINITY):(t=!1,n=!0,r=Number.POSITIVE_INFINITY),{consistent:t,multiline:n,minItems:r}}(e);return{ArrayExpression:t,ArrayPattern:t}}function i(i){const s=i.elements,o=r(t.options[0])[i.type],a=n.getFirstToken(i),l=n.getLastToken(i),c=n.getTokenAfter(a,{includeComments:!0}),u=n.getTokenBefore(l,{includeComments:!0}),p=n.getTokenAfter(a),d=n.getTokenBefore(l);s.length>=o.minItems||o.multiline&&s.length>0&&c.loc.start.line!==u.loc.end.line||0===s.length&&"Block"===c.type&&c.loc.start.line!==u.loc.end.line&&c===u||o.consistent&&a.loc.end.line!==p.loc.start.line?(e.isTokenOnSameLine(a,p)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingOpeningLinebreak",fix(e){return e.insertTextAfter(n,"\n")}})}(i,a),e.isTokenOnSameLine(d,l)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingClosingLinebreak",fix(e){return e.insertTextBefore(n,"\n")}})}(i,l)):(e.isTokenOnSameLine(a,p)||function(r,i){t.report({node:r,loc:i.loc,messageId:"unexpectedOpeningLinebreak",fix(t){const r=n.getTokenAfter(i,{includeComments:!0});return e.isCommentToken(r)?null:t.removeRange([i.range[1],r.range[0]])}})}(i,a),e.isTokenOnSameLine(d,l)||function(r,i){t.report({node:r,loc:i.loc,messageId:"unexpectedClosingLinebreak",fix(t){const r=n.getTokenBefore(i,{includeComments:!0});return e.isCommentToken(r)?null:t.removeRange([r.range[1],i.range[0]])}})}(i,l))}return{ArrayPattern:i,ArrayExpression:i}}},qT}function Rw(){if(XT)return zT;XT=1;const e=Pw();return zT={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside array brackets",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-bracket-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(t){const n="always"===t.options[0],r=t.sourceCode;function i(e){return!!t.options[1]&&t.options[1][e]===!n}const s={spaced:n,singleElementException:i("singleValue"),objectsInArraysException:i("objectsInArrays"),arraysInArraysException:i("arraysInArrays")};function o(e){return e&&("ObjectExpression"===e.type||"ObjectPattern"===e.type)}function a(e){return e&&("ArrayExpression"===e.type||"ArrayPattern"===e.type)}function l(n){if(s.spaced&&0===n.elements.length)return;const i=r.getFirstToken(n),l=r.getFirstToken(n,1),c=n.typeAnnotation?r.getTokenBefore(n.typeAnnotation):r.getLastToken(n),u=r.getTokenBefore(c),p=n.elements[0],d=n.elements[n.elements.length-1],f=s.objectsInArraysException&&o(p)||s.arraysInArraysException&&a(p)||s.singleElementException&&1===n.elements.length?!s.spaced:s.spaced,h=s.objectsInArraysException&&o(d)||s.arraysInArraysException&&a(d)||s.singleElementException&&1===n.elements.length?!s.spaced:s.spaced;e.isTokenOnSameLine(i,l)&&(f&&!r.isSpaceBetweenTokens(i,l)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingSpaceAfter",data:{tokenValue:n.value},fix(e){return e.insertTextAfter(n," ")}})}(n,i),!f&&r.isSpaceBetweenTokens(i,l)&&function(e,n){const i=r.getTokenAfter(n);t.report({node:e,loc:{start:n.loc.end,end:i.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:n.value},fix(e){return e.removeRange([n.range[1],i.range[0]])}})}(n,i)),i!==u&&e.isTokenOnSameLine(u,c)&&(h&&!r.isSpaceBetweenTokens(u,c)&&function(e,n){t.report({node:e,loc:n.loc,messageId:"missingSpaceBefore",data:{tokenValue:n.value},fix(e){return e.insertTextBefore(n," ")}})}(n,c),!h&&r.isSpaceBetweenTokens(u,c)&&function(e,n){const i=r.getTokenBefore(n);t.report({node:e,loc:{start:i.loc.end,end:n.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:n.value},fix(e){return e.removeRange([i.range[1],n.range[0]])}})}(n,c))}return{ArrayPattern:l,ArrayExpression:l}}},zT}function Iw(){if(ZT)return GT;ZT=1;const e=Pw(),t=/^(?:Arrow)?FunctionExpression$/u,n=/^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u;function r(t){return e.isSpecificMemberAccess(t,null,n)}function i(e){return["from","of","isArray"].includes(e)?"Array.".concat(e):"Array.prototype.".concat(e)}function s(e){return"UnaryExpression"===e.type&&"void"===e.operator}function o(t,n,r){const i=e.getPrecedence(n)"Keyword"===e.type&&"return"===e.value),o=t.getTokenAfter(s),a="return"===s.value&&s.range[1]===o.range[0];return[r.insertTextBefore(o,`${a?" ":""}void ${i?"(":""}`),r.insertTextAfter(n,i?")":"")]}function a(t,n,r){const i=t.getTokenBefore(n.body,e.isArrowToken),s=t.getTokenAfter(i),o=t.getLastToken(n);return[r.insertTextBefore(s,"{"),r.insertTextAfter(o,"}")]}return GT={meta:{type:"problem",docs:{description:"Enforce `return` statements in callbacks of array methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-callback-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1},checkForEach:{type:"boolean",default:!1},allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedAtEnd:"{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.",expectedInside:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedReturnValue:"{{arrayMethodName}}() expects a return value from {{name}}.",expectedNoReturnValue:"{{arrayMethodName}}() expects no useless return value from {{name}}.",wrapBraces:"Wrap the expression in `{}`.",prependVoid:"Prepend `void` to the expression."}},create(n){const l=n.options[0]||{allowImplicit:!1,checkForEach:!1,allowVoid:!1},c=n.sourceCode;let u={arrayMethodName:null,upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null};function p(t){if(!u.shouldCheck)return;const r={messageId:"",suggest:[]};if("forEach"===u.arrayMethodName){if(l.checkForEach&&"ArrowFunctionExpression"===t.type&&t.expression)if(l.allowVoid){if(s(t.body))return;r.messageId="expectedNoReturnValue",r.suggest=[{messageId:"wrapBraces",fix(e){return a(c,t,e)}},{messageId:"prependVoid",fix(e){return o(c,t.body,e)}}]}else r.messageId="expectedNoReturnValue",r.suggest=[{messageId:"wrapBraces",fix(e){return a(c,t,e)}}]}else"BlockStatement"===t.body.type&&function(e){for(const t of e)if(t.reachable)return!0;return!1}(u.currentSegments)&&(r.messageId=u.hasReturn?"expectedAtEnd":"expectedInside");if(r.messageId){const s=e.getFunctionNameWithKind(t);n.report({node:t,loc:e.getFunctionHeadLoc(t,c),messageId:r.messageId,data:{name:s,arrayMethodName:i(u.arrayMethodName)},suggest:0!==r.suggest.length?r.suggest:null})}}return{onCodePathStart(n,i){let s=null;t.test(i.type)&&(s=function(t){let n=t;for(;n;){const t=n.parent;switch(t.type){case"LogicalExpression":case"ConditionalExpression":case"ChainExpression":n=t;break;case"ReturnStatement":{const r=e.getUpperFunction(t);if(null===r||!e.isCallee(r))return null;n=r.parent;break}case"CallExpression":return e.isArrayFromMethod(t.callee)&&t.arguments.length>=2&&t.arguments[1]===n?"from":r(t.callee)&&t.arguments.length>=1&&t.arguments[0]===n?e.getStaticPropertyName(t.callee):null;default:return null}}return null}(i)),u={arrayMethodName:s,upper:u,codePath:n,hasReturn:!1,shouldCheck:s&&!i.async&&!i.generator,node:i,currentSegments:new Set}},onCodePathEnd(){u=u.upper},onUnreachableCodePathSegmentStart(e){u.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){u.currentSegments.delete(e)},onCodePathSegmentStart(e){u.currentSegments.add(e)},onCodePathSegmentEnd(e){u.currentSegments.delete(e)},ReturnStatement(t){if(!u.shouldCheck)return;u.hasReturn=!0;const r={messageId:"",suggest:[]};if("forEach"===u.arrayMethodName){if(l.checkForEach&&t.argument)if(l.allowVoid){if(s(t.argument))return;r.messageId="expectedNoReturnValue",r.suggest=[{messageId:"prependVoid",fix(e){return o(c,t.argument,e)}}]}else r.messageId="expectedNoReturnValue"}else l.allowImplicit||t.argument||(r.messageId="expectedReturnValue");r.messageId&&n.report({node:t,messageId:r.messageId,data:{name:e.getFunctionNameWithKind(u.node),arrayMethodName:i(u.arrayMethodName)},suggest:0!==r.suggest.length?r.suggest:null})},"FunctionExpression:exit":p,"ArrowFunctionExpression:exit":p}}},GT}function Lw(){if(YT)return HT;YT=1;const e=Pw();return HT={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks after each array element",recommended:!1,url:"https://eslint.org/docs/latest/rules/array-element-newline"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(t){const n=t.sourceCode;function r(e){let t,n=!1,r=!1;const i=e||"always";return i&&"always"!==i&&0!==i.minItems?"never"===i?t=Number.POSITIVE_INFINITY:"consistent"===i?(n=!0,t=Number.POSITIVE_INFINITY):(r=Boolean(i.multiline),t=i.minItems||Number.POSITIVE_INFINITY):t=0,{consistent:n,multiline:r,minItems:t}}function i(i){const s=i.elements,o=function(e){if(e&&(e.ArrayExpression||e.ArrayPattern)){let t,n;return e.ArrayExpression&&(t=r(e.ArrayExpression)),e.ArrayPattern&&(n=r(e.ArrayPattern)),{ArrayExpression:t,ArrayPattern:n}}const t=r(e);return{ArrayExpression:t,ArrayPattern:t}}(t.options[0]),a=o[i.type];if(!a)return;let l=!1;a.multiline&&(l=s.filter((e=>null!==e)).some((e=>e.loc.start.line!==e.loc.end.line)));let c=0;for(let t=0;t=a.minItems||a.multiline&&l||a.consistent&&c>0&&c{const o=s[i-1];if(0===i||null===r||null===o)return;const a=n.getFirstTokenBetween(o,r,e.isCommaToken),l=n.getTokenBefore(a),c=n.getTokenAfter(a);u?e.isTokenOnSameLine(l,c)&&function(e){const r=n.getTokenBefore(e,{includeComments:!0});t.report({loc:{start:r.loc.end,end:e.loc.start},messageId:"missingLineBreak",fix(t){return t.replaceTextRange([r.range[1],e.range[0]],"\n")}})}(c):e.isTokenOnSameLine(l,c)||function(r){const i=n.getTokenBefore(r,{includeComments:!0});t.report({loc:{start:i.loc.end,end:r.loc.start},messageId:"unexpectedLineBreak",fix(t){if(e.isCommentToken(i))return null;if(!e.isTokenOnSameLine(i,r))return t.replaceTextRange([i.range[1],r.range[0]]," ");const s=n.getTokenBefore(i,{includeComments:!0});return e.isCommentToken(s)?null:t.replaceTextRange([s.range[1],i.range[0]],"")}})}(c)}))}return{ArrayPattern:i,ArrayExpression:i}}},HT}function Bw(){if(ew)return JT;ew=1;const e=Pw();return JT={meta:{type:"suggestion",docs:{description:"Require braces around arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-body-style"},schema:{anyOf:[{type:"array",items:[{enum:["always","never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["as-needed"]},{type:"object",properties:{requireReturnForObjectLiteral:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{unexpectedOtherBlock:"Unexpected block statement surrounding arrow body.",unexpectedEmptyBlock:"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.",unexpectedObjectBlock:"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.",unexpectedSingleBlock:"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.",expectedBlock:"Expected block statement surrounding arrow body."}},create(t){const n=t.options,r="always"===n[0],i=!n[0]||"as-needed"===n[0],s="never"===n[0],o=n[1]&&n[1].requireReturnForObjectLiteral,a=t.sourceCode;let l=null;function c(e){return!(!e||!e.parent)&&("ForStatement"===e.parent.type&&e.parent.init===e||c(e.parent))}function u(n){const u=n.body;if("BlockStatement"===u.type){const r=u.body;if(1!==r.length&&!s)return;if(i&&o&&"ReturnStatement"===r[0].type&&r[0].argument&&"ObjectExpression"===r[0].argument.type)return;if(s||i&&"ReturnStatement"===r[0].type){let i;i=0===r.length?"unexpectedEmptyBlock":r.length>1?"unexpectedOtherBlock":null===r[0].argument?"unexpectedSingleBlock":e.isOpeningBraceToken(a.getFirstToken(r[0],{skip:1}))?"unexpectedObjectBlock":"unexpectedSingleBlock",t.report({node:n,loc:u.loc,messageId:i,fix(t){const i=[];if(1!==r.length||"ReturnStatement"!==r[0].type||!r[0].argument||(s=a.getTokenAfter(u))&&"Punctuator"===s.type&&/^[([/`+-]/u.test(s.value))return i;var s;const o=a.getFirstToken(u),p=a.getLastToken(u),d=a.getFirstToken(r[0],1),f=a.getLastToken(r[0]);return a.commentsExistBetween(o,d)||a.commentsExistBetween(f,p)?i.push(t.remove(o),t.remove(p),t.remove(a.getTokenAfter(o))):i.push(t.removeRange([o.range[0],d.range[0]]),t.removeRange([f.range[1],p.range[1]])),(e.isOpeningBraceToken(d)||"SequenceExpression"===r[0].argument.type||l.hasInOperator&&c(n))&&(e.isParenthesised(a,r[0].argument)||i.push(t.insertTextBefore(d,"("),t.insertTextAfter(f,")"))),e.isSemicolonToken(f)&&i.push(t.remove(f)),i}})}}else(r||i&&o&&"ObjectExpression"===u.type)&&t.report({node:n,loc:u.loc,messageId:"expectedBlock",fix(t){const r=[],i=a.getTokenBefore(u,e.isArrowToken),[s,o]=a.getTokensAfter(i,{count:2}),l=a.getLastToken(n);let c=null;if(e.isOpeningParenToken(s)&&e.isOpeningBraceToken(o)){const e=a.getNodeByRangeIndex(o.range[0]);"ObjectExpression"===e.type&&(c=e)}if(c){const n=s,i=o;e.isTokenOnSameLine(n,i)?r.push(t.replaceText(n,"{return ")):r.push(t.replaceText(n,"{"),t.insertTextBefore(i,"return ")),r.push(t.remove(function(t){let n=t;for(;!e.isParenthesised(a,n);)n=n.parent;return a.getTokenAfter(n)}(c))),r.push(t.insertTextAfter(l,"}"))}else r.push(t.insertTextBefore(s,"{return ")),r.push(t.insertTextAfter(l,"}"));return r}})}return{"BinaryExpression[operator='in']"(){let e=l;for(;e;)e.hasInOperator=!0,e=e.upper},ArrowFunctionExpression(){l={upper:l,hasInOperator:!1}},"ArrowFunctionExpression:exit"(e){u(e),l=l.upper}}}},JT}function Mw(){if(nw)return tw;nw=1;const e=Pw();return tw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parentheses around arrow function arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-parens"},fixable:"code",schema:[{enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(t){const n="as-needed"===t.options[0],r=n&&t.options[1]&&!0===t.options[1].requireForBlockBody,i=t.sourceCode;function s(t){return i.getTokenAfter(t.params[0],e.isClosingParenToken)}return{"ArrowFunctionExpression[params.length=1]"(o){const a=!n||r&&function(e){return"BlockStatement"===e.body.type}(o),l=function(t){const n=i.getTokenBefore(t.params[0]);return n&&e.isOpeningParenToken(n)&&t.range[0]<=n.range[0]?n:null}(o),c=null!==l,[u]=o.params;a&&!c&&t.report({node:o,messageId:r?"expectedParensBlock":"expectedParens",loc:u.loc,*fix(e){yield e.insertTextBefore(u,"("),yield e.insertTextAfter(u,")")}}),a||!c||"Identifier"!==u.type||u.typeAnnotation||o.returnType||function(e,t){return i.commentsExistBetween(t,s(e))}(o,l)||function(e,t){const n=e.async?1:0;return i.getFirstToken(e,{skip:n})!==t}(o,l)||t.report({node:o,messageId:r?"unexpectedParensInline":"unexpectedParens",loc:u.loc,*fix(t){const n=i.getTokenBefore(l),r=s(o);n&&n.range[1]===l.range[0]&&!e.canTokensBeAdjacent(n,i.getFirstToken(u))&&(yield t.insertTextBefore(l," ")),yield t.removeRange([l.range[0],u.range[0]]),yield t.removeRange([u.range[1],r.range[1]])}})}}}},tw}function jw(){if(iw)return rw;iw=1;const e=Pw();return rw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/arrow-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(t){const n=Object.assign({},t.options[0]);n.before=!1!==n.before,n.after=!1!==n.after;const r=t.sourceCode;return{ArrowFunctionExpression:function(i){const s=function(t){const n=r.getTokenBefore(t.body,e.isArrowToken);return{before:r.getTokenBefore(n),arrow:n,after:r.getTokenAfter(n)}}(i),o=function(e){return{before:e.arrow.range[0]-e.before.range[1],after:e.after.range[0]-e.arrow.range[1]}}(s);n.before?0===o.before&&t.report({node:s.before,messageId:"expectedBefore",fix(e){return e.insertTextBefore(s.arrow," ")}}):o.before>0&&t.report({node:s.before,messageId:"unexpectedBefore",fix(e){return e.removeRange([s.before.range[1],s.arrow.range[0]])}}),n.after?0===o.after&&t.report({node:s.after,messageId:"expectedAfter",fix(e){return e.insertTextAfter(s.arrow," ")}}):o.after>0&&t.report({node:s.after,messageId:"unexpectedAfter",fix(e){return e.removeRange([s.arrow.range[1],s.after.range[0]])}})}}}},rw}function Nw(){if(lw)return aw;lw=1;const e=Pw();return aw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},create(t){const n="never"!==t.options[0],r=n?"missing":"extra",i=t.sourceCode;function s(t,r){return!e.isTokenOnSameLine(t,r)||i.isSpaceBetweenTokens(t,r)===n}function o(e){const o=function(e){return"SwitchStatement"===e.type?e.cases.length>0?i.getTokenBefore(e.cases[0]):i.getLastToken(e,1):"StaticBlock"===e.type?i.getFirstToken(e,{skip:1}):i.getFirstToken(e)}(e),a=i.getLastToken(e),l=i.getTokenAfter(o,{includeComments:!0}),c=i.getTokenBefore(a,{includeComments:!0});if("Punctuator"===o.type&&"{"===o.value&&"Punctuator"===a.type&&"}"===a.value&&l!==a&&(n||"Line"!==l.type)){if(!s(o,l)){let i=o.loc;"extra"===r&&(i={start:o.loc.end,end:l.loc.start}),t.report({node:e,loc:i,messageId:r,data:{location:"after",token:o.value},fix(e){return n?e.insertTextBefore(l," "):e.removeRange([o.range[1],l.range[0]])}})}if(!s(c,a)){let i=a.loc;"extra"===r&&(i={start:c.loc.end,end:a.loc.start}),t.report({node:e,loc:i,messageId:r,data:{location:"before",token:a.value},fix(e){return n?e.insertTextAfter(c," "):e.removeRange([c.range[1],a.range[0]])}})}}}return{BlockStatement:o,StaticBlock:o,SwitchStatement:o}}},aw}function Fw(){return dw||(dw=1,pw={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `return` statements after callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/callback-return"},schema:[{type:"array",items:{type:"string"}}],messages:{missingReturn:"Expected return with your callback function."}},create(e){const t=e.options[0]||["callback","cb","next"],n=e.sourceCode;function r(e,t){return e.parent?t.includes(e.parent.type)?e.parent:r(e.parent,t):null}function i(e){if("Identifier"===e.type)return!0;if("MemberExpression"===e.type){if("Identifier"===e.object.type)return!0;if("MemberExpression"===e.object.type)return i(e.object)}return!1}function s(e){return i(e.callee)&&t.includes(n.getText(e.callee))}function o(e,t){return!(!t||"ExpressionStatement"!==t.type)&&(t.expression===e||("BinaryExpression"===t.expression.type||"LogicalExpression"===t.expression.type)&&t.expression.right===e)}return{CallExpression(t){if(!s(t))return;const n=r(t,["BlockStatement","ReturnStatement","ArrowFunctionExpression"])||{};if("ReturnStatement"!==n.type&&"ArrowFunctionExpression"!==n.type){if("BlockStatement"===n.type){const e=n.body[n.body.length-1];if(o(t,e)){const e=n.parent.type;if("FunctionExpression"===e||"FunctionDeclaration"===e||"ArrowFunctionExpression"===e)return}if("ReturnStatement"===e.type&&o(t,n.body[n.body.length-2]))return}r(t,["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"])&&e.report({node:t,messageId:"missingReturn"})}}}}}),pw}function Uw(){if(hw)return fw;hw=1;const e=Pw();return fw={meta:{type:"suggestion",docs:{description:"Enforce camelcase naming convention",recommended:!1,url:"https://eslint.org/docs/latest/rules/camelcase"},schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImports:{type:"boolean",default:!1},ignoreGlobals:{type:"boolean",default:!1},properties:{enum:["always","never"]},allow:{type:"array",items:[{type:"string"}],minItems:0,uniqueItems:!0}},additionalProperties:!1}],messages:{notCamelCase:"Identifier '{{name}}' is not in camel case.",notCamelCasePrivate:"#{{name}} is not in camel case."}},create(t){const n=t.options[0]||{},r="never"===n.properties?"never":"always",i=n.ignoreDestructuring,s=n.ignoreImports,o=n.ignoreGlobals,a=n.allow||[],l=t.sourceCode,c=new Set;function u(e){return!function(e){const t=e.replace(/^_+|_+$/gu,"");return t.includes("_")&&t!==t.toUpperCase()}(e)||function(e){return a.some((t=>e===t||e.match(new RegExp(t,"u"))))}(e)}function p(t){const n=t.name,r="AssignmentPattern"===t.parent.type?t.parent:t,i=r.parent;switch(i.type){case"Property":return("ObjectPattern"===i.parent.type||"ObjectExpression"===i.parent.type)&&i.value===r&&!i.computed&&"Identifier"===i.key.type&&i.key.name===n;case"ImportSpecifier":return i.local===t&&e.getModuleExportName(i.imported)===n;default:return!1}}function d(e){c.has(e.range[0])||(c.add(e.range[0]),t.report({node:e,messageId:"PrivateIdentifier"===e.type?"notCamelCasePrivate":"notCamelCase",data:{name:e.name}}))}function f(e){"CallExpression"!==e.parent.type&&"NewExpression"!==e.parent.type&&("AssignmentPattern"===e.parent.type&&e.parent.right===e||i&&p(e)||d(e))}return{Program(e){const t=l.getScope(e);if(!o)for(const e of t.variables)if(!(e.identifiers.length>0||u(e.name)))for(const t of e.references)f(t.identifier);for(const e of t.through){const t=e.identifier;u(t.name)||f(t)}},[["VariableDeclaration","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","ClassDeclaration","ClassExpression","CatchClause"]](e){for(const t of l.getDeclaredVariables(e)){if(u(t.name))continue;const e=t.identifiers[0];i&&p(e)||d(e);for(const e of t.references)e.init||f(e.identifier)}},[["ObjectExpression > Property[computed!=true] > Identifier.key","MethodDefinition[computed!=true] > Identifier.key","PropertyDefinition[computed!=true] > Identifier.key","MethodDefinition > PrivateIdentifier.key","PropertyDefinition > PrivateIdentifier.key"]](e){"never"===r||u(e.name)||d(e)},"MemberExpression[computed!=true] > Identifier.property"(e){"never"!==r&&function(e){const t=e.parent;switch(t.type){case"AssignmentExpression":case"AssignmentPattern":return t.left===e;case"Property":return"ObjectPattern"===t.parent.type&&t.value===e;case"ArrayPattern":case"RestElement":return!0;default:return!1}}(e.parent)&&!u(e.name)&&d(e)},ImportDeclaration(e){for(const t of l.getDeclaredVariables(e)){if(u(t.name))continue;const e=t.identifiers[0];s&&p(e)||d(e);for(const e of t.references)f(e.identifier)}},[["ExportAllDeclaration > Identifier.exported","ExportSpecifier > Identifier.exported"]](e){u(e.name)||d(e)},[["LabeledStatement > Identifier.label","BreakStatement > Identifier.label","ContinueStatement > Identifier.label"]](e){u(e.name)||d(e)}}}},fw}function Vw(){if(_w)return yw;_w=1;const e=gw?mw:(gw=1,mw=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/u),t=Pw().COMMENTS_IGNORE_PATTERN,n=/\s/gu,r=/^\s*[^:/?#\s]+:\/\/[^?#]/u,i={type:"object",properties:{ignorePattern:{type:"string"},ignoreInlineComments:{type:"boolean"},ignoreConsecutiveComments:{type:"boolean"}},additionalProperties:!1},s={ignorePattern:"",ignoreInlineComments:!1,ignoreConsecutiveComments:!1};function o(e,t){return Object.assign({},s,e[t]||e)}return yw={meta:{type:"suggestion",docs:{description:"Enforce or disallow capitalization of the first letter of a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/capitalized-comments"},fixable:"code",schema:[{enum:["always","never"]},{oneOf:[i,{type:"object",properties:{line:i,block:i},additionalProperties:!1}]}],messages:{unexpectedLowercaseComment:"Comments should not begin with a lowercase character.",unexpectedUppercaseComment:"Comments should not begin with an uppercase character."}},create(i){const s=i.options[0]||"always",a=function(e={}){return{Line:o(e,"line"),Block:o(e,"block")}}(i.options[1]),l=i.sourceCode;function c(i,o){if(t.test(i.value))return!0;const a=i.value.replace(/\*/gu,"");if(o.ignorePatternRegExp&&o.ignorePatternRegExp.test(a))return!0;if(o.ignoreInlineComments&&function(e){const t=l.getTokenBefore(e,{includeComments:!0}),n=l.getTokenAfter(e,{includeComments:!0});return Boolean(t&&n&&e.loc.start.line===t.loc.end.line&&e.loc.end.line===n.loc.start.line)}(i))return!0;if(o.ignoreConsecutiveComments&&function(e){const t=l.getTokenBefore(e,{includeComments:!0});return Boolean(t&&["Block","Line"].includes(t.type))}(i))return!0;if(r.test(a))return!0;const c=a.replace(n,"");if(0===c.length)return!0;const u=c[0];if(!e.test(u))return!0;const p=u!==u.toLocaleLowerCase(),d=u!==u.toLocaleUpperCase();return("always"!==s||!d)&&("never"!==s||!p)}function u(t){const n=a[t.type];if(!c(t,n)){const n="always"===s?"unexpectedLowercaseComment":"unexpectedUppercaseComment";i.report({node:null,loc:t.loc,messageId:n,fix(n){const r=t.value.match(e);return n.replaceTextRange([t.range[0]+r.index+2,t.range[0]+r.index+3],"always"===s?r[0].toLocaleUpperCase():r[0].toLocaleLowerCase())}})}}return function(e){Object.keys(e).forEach((t=>{const n=e[t].ignorePattern;if(n){const r=RegExp(`^\\s*(?:${n})`,"u");e[t].ignorePatternRegExp=r}}))}(a),{Program(){l.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(u)}}}},yw}function Kw(){if(vw)return bw;vw=1;const e=Pw();return bw={meta:{type:"suggestion",docs:{description:"Enforce that class methods utilize `this`",recommended:!1,url:"https://eslint.org/docs/latest/rules/class-methods-use-this"},schema:[{type:"object",properties:{exceptMethods:{type:"array",items:{type:"string"}},enforceForClassFields:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missingThis:"Expected 'this' to be used by class {{name}}."}},create(t){const n=Object.assign({},t.options[0]),r=!1!==n.enforceForClassFields,i=new Set(n.exceptMethods||[]),s=[];function o(){s.push(!1)}function a(){return s.pop()}function l(){o()}function c(t){if(function(e){switch(e.type){case"MethodDefinition":return!e.static&&"constructor"!==e.kind;case"PropertyDefinition":return!e.static&&r;default:return!1}}(t)){if(t.computed)return!0;const n="PrivateIdentifier"===t.key.type?"#":"",r="Literal"===t.key.type?e.getStaticStringValue(t.key):t.key.name||"";return!i.has(n+r)}return!1}function u(n){const r=a();c(n.parent)&&!r&&t.report({node:n,loc:e.getFunctionHeadLoc(n,t.sourceCode),messageId:"missingThis",data:{name:e.getFunctionNameWithKind(n)}})}function p(){s.length&&(s[s.length-1]=!0)}return{FunctionDeclaration:l,"FunctionDeclaration:exit":u,FunctionExpression:l,"FunctionExpression:exit":u,"PropertyDefinition > *.key:exit":o,"PropertyDefinition:exit":a,StaticBlock:o,"StaticBlock:exit":a,ThisExpression:p,Super:p,...r&&{"PropertyDefinition > ArrowFunctionExpression.value":l,"PropertyDefinition > ArrowFunctionExpression.value:exit":u}}}},bw}function Ww(){if(xw)return Ew;xw=1;const e=Pw(),t=Object.freeze({arrays:"never",objects:"never",imports:"never",exports:"never",functions:"never"});return Ew={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow trailing commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-dangle"},fixable:"code",schema:{definitions:{value:{enum:["always-multiline","always","never","only-multiline"]},valueWithIgnore:{enum:["always-multiline","always","ignore","never","only-multiline"]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/value"},{type:"object",properties:{arrays:{$ref:"#/definitions/valueWithIgnore"},objects:{$ref:"#/definitions/valueWithIgnore"},imports:{$ref:"#/definitions/valueWithIgnore"},exports:{$ref:"#/definitions/valueWithIgnore"},functions:{$ref:"#/definitions/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},create(n){const r=(i=n.options[0],s=n.languageOptions.ecmaVersion,"string"==typeof i?{arrays:i,objects:i,imports:i,exports:i,functions:s<2017?"ignore":i}:"object"==typeof i&&null!==i?{arrays:i.arrays||t.arrays,objects:i.objects||t.objects,imports:i.imports||t.imports,exports:i.exports||t.exports,functions:i.functions||t.functions}:t);var i,s;const o=n.sourceCode;function a(e){function t(e){return e[e.length-1]}switch(e.type){case"ObjectExpression":case"ObjectPattern":return t(e.properties);case"ArrayExpression":case"ArrayPattern":return t(e.elements);case"ImportDeclaration":case"ExportNamedDeclaration":return t(e.specifiers);case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return t(e.params);case"CallExpression":case"NewExpression":return t(e.arguments);default:return null}}function l(t,n){switch(t.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":return o.getLastToken(t,1);default:{const t=o.getTokenAfter(n);return e.isCommaToken(t)?t:o.getLastToken(n)}}}function c(e){const t=a(e);if(!t)return!1;const n=l(e,t);return o.getTokenAfter(n).loc.end.line!==n.loc.end.line}function u(t){const r=a(t);if(!r||"ImportDeclaration"===t.type&&"ImportSpecifier"!==r.type)return;const i=l(t,r);e.isCommaToken(i)&&n.report({node:r,loc:i.loc,messageId:"unexpected",*fix(e){yield e.remove(i),yield e.insertTextBefore(o.getTokenBefore(i),""),yield e.insertTextAfter(o.getTokenAfter(i),"")}})}function p(t){const r=a(t);if(!r||"ImportDeclaration"===t.type&&"ImportSpecifier"!==r.type)return;if(!function(e){return!("RestElement"===e.type||"RestProperty"===e.type||"ExperimentalRestProperty"===e.type)}(r))return void u(t);const i=l(t,r);","!==i.value&&n.report({node:r,loc:{start:i.loc.end,end:e.getNextLocation(o,i.loc.end)},messageId:"missing",*fix(e){yield e.insertTextAfter(i,","),yield e.insertTextBefore(i,""),yield e.insertTextAfter(o.getTokenAfter(i),"")}})}const d={always:p,"always-multiline":function(e){c(e)?p(e):u(e)},"only-multiline":function(e){c(e)||u(e)},never:u,ignore(){}};return{ObjectExpression:d[r.objects],ObjectPattern:d[r.objects],ArrayExpression:d[r.arrays],ArrayPattern:d[r.arrays],ImportDeclaration:d[r.imports],ExportNamedDeclaration:d[r.exports],FunctionDeclaration:d[r.functions],FunctionExpression:d[r.functions],ArrowFunctionExpression:d[r.functions],CallExpression:d[r.functions],NewExpression:d[r.functions]}}},Ew}function $w(){if(ww)return Tw;ww=1;const e=Pw();return Tw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent comma style",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-style"},fixable:"code",schema:[{enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(t){const n=t.options[0]||"last",r=t.sourceCode,i={ArrayPattern:!0,ArrowFunctionExpression:!0,CallExpression:!0,FunctionDeclaration:!0,FunctionExpression:!0,ImportDeclaration:!0,ObjectPattern:!0,NewExpression:!0};if(2===t.options.length&&Object.prototype.hasOwnProperty.call(t.options[1],"exceptions")){const e=Object.keys(t.options[1].exceptions);for(let n=0;n1||s){let n=r.getFirstToken(t);if(i.forEach((t=>{const i=t?r.getTokenBefore(t):n,s=t?r.getFirstToken(t):r.getTokenAfter(i),a=t||s;if(e.isCommaToken(i)&&o(n,i,s,a),t){const i=r.getTokenAfter(t,e.isNotClosingParenToken);n=i?r.getTokenBefore(i):r.ast.tokens[r.ast.tokens.length-1]}else n=s})),s){const n=r.getLastToken(t),i=r.getTokenBefore(n);e.isCommaToken(i)&&o(r.getTokenBefore(i),i,n,n)}}}const l={};return i.VariableDeclaration||(l.VariableDeclaration=function(e){a(e,"declarations")}),i.ObjectExpression||(l.ObjectExpression=function(e){a(e,"properties")}),i.ObjectPattern||(l.ObjectPattern=function(e){a(e,"properties")}),i.ArrayExpression||(l.ArrayExpression=function(e){a(e,"elements")}),i.ArrayPattern||(l.ArrayPattern=function(e){a(e,"elements")}),i.FunctionDeclaration||(l.FunctionDeclaration=function(e){a(e,"params")}),i.FunctionExpression||(l.FunctionExpression=function(e){a(e,"params")}),i.ArrowFunctionExpression||(l.ArrowFunctionExpression=function(e){a(e,"params")}),i.CallExpression||(l.CallExpression=function(e){a(e,"arguments")}),i.ImportDeclaration||(l.ImportDeclaration=function(e){a(e,"specifiers")}),i.NewExpression||(l.NewExpression=function(e){a(e,"arguments")}),l}},Tw}var qw,Qw={},zw={},Xw={};function Gw(){return qw||(qw=1,function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENDED_PICTOGRAPHIC=e.CLUSTER_BREAK=void 0,(t=e.CLUSTER_BREAK||(e.CLUSTER_BREAK={}))[t.CR=0]="CR",t[t.LF=1]="LF",t[t.CONTROL=2]="CONTROL",t[t.EXTEND=3]="EXTEND",t[t.REGIONAL_INDICATOR=4]="REGIONAL_INDICATOR",t[t.SPACINGMARK=5]="SPACINGMARK",t[t.L=6]="L",t[t.V=7]="V",t[t.T=8]="T",t[t.LV=9]="LV",t[t.LVT=10]="LVT",t[t.OTHER=11]="OTHER",t[t.PREPEND=12]="PREPEND",t[t.E_BASE=13]="E_BASE",t[t.E_MODIFIER=14]="E_MODIFIER",t[t.ZWJ=15]="ZWJ",t[t.GLUE_AFTER_ZWJ=16]="GLUE_AFTER_ZWJ",t[t.E_BASE_GAZ=17]="E_BASE_GAZ",e.EXTENDED_PICTOGRAPHIC=101}(Xw)),Xw}var Zw,Hw={};var Yw,Jw,eC,tC,nC,rC,iC,sC,oC,aC,lC,cC,uC,pC,dC,fC,hC,mC,gC,yC,_C,bC,vC,EC,xC,SC,OC,TC,wC,CC,AC,PC,kC,DC,RC,IC,LC,BC,MC,jC,NC,FC,UC,VC,KC,WC,$C,qC,QC,zC,XC,GC,ZC,HC,YC,JC,eA,tA,nA,rA,iA,sA,oA,aA,lA,cA,uA,pA,dA,fA,hA,mA,gA,yA,_A,bA,vA,EA,xA,SA,OA,TA,wA,CA,AA,PA,kA,DA,RA,IA,LA,BA,MA,jA,NA,FA,UA,VA,KA,WA,$A,qA,QA,zA,XA,GA,ZA,HA,YA,JA,eP,tP,nP,rP,iP,sP,oP,aP,lP,cP,uP,pP,dP,fP,hP,mP,gP,yP,_P,bP,vP,EP,xP,SP,OP,TP,wP,CP,AP,PP,kP,DP,RP,IP,LP,BP,MP,jP,NP,FP,UP,VP,KP,WP,$P,qP,QP,zP,XP,GP,ZP,HP,YP,JP={};function ek(){if(Jw)return zw;Jw=1;var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zw,"__esModule",{value:!0});const t=Gw(),n=e(function(){if(Zw)return Hw;Zw=1,Object.defineProperty(Hw,"__esModule",{value:!0});const e=Gw();return Hw.default=class{static isSurrogate(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}static codePointAt(e,t){void 0===t&&(t=0);const n=e.charCodeAt(t);if(55296<=n&&n<=56319&&t=1){const r=e.charCodeAt(t-1);return 55296<=r&&r<=56319?1024*(r-55296)+(n-56320)+65536:n}return n}static shouldBreak(t,n,r,i,s,o){const a=[t].concat(n).concat([r]),l=[i].concat(s).concat([o]),c=a[a.length-2],u=r,p=o,d=a.lastIndexOf(e.CLUSTER_BREAK.REGIONAL_INDICATOR);if(d>0&&a.slice(1,d).every((function(t){return t===e.CLUSTER_BREAK.REGIONAL_INDICATOR}))&&-1===[e.CLUSTER_BREAK.PREPEND,e.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(c))return a.filter((function(t){return t===e.CLUSTER_BREAK.REGIONAL_INDICATOR})).length%2==1?3:4;if(c===e.CLUSTER_BREAK.CR&&u===e.CLUSTER_BREAK.LF)return 0;if(c===e.CLUSTER_BREAK.CONTROL||c===e.CLUSTER_BREAK.CR||c===e.CLUSTER_BREAK.LF)return 1;if(u===e.CLUSTER_BREAK.CONTROL||u===e.CLUSTER_BREAK.CR||u===e.CLUSTER_BREAK.LF)return 1;if(c===e.CLUSTER_BREAK.L&&(u===e.CLUSTER_BREAK.L||u===e.CLUSTER_BREAK.V||u===e.CLUSTER_BREAK.LV||u===e.CLUSTER_BREAK.LVT))return 0;if(!(c!==e.CLUSTER_BREAK.LV&&c!==e.CLUSTER_BREAK.V||u!==e.CLUSTER_BREAK.V&&u!==e.CLUSTER_BREAK.T))return 0;if((c===e.CLUSTER_BREAK.LVT||c===e.CLUSTER_BREAK.T)&&u===e.CLUSTER_BREAK.T)return 0;if(u===e.CLUSTER_BREAK.EXTEND||u===e.CLUSTER_BREAK.ZWJ)return 0;if(u===e.CLUSTER_BREAK.SPACINGMARK)return 0;if(c===e.CLUSTER_BREAK.PREPEND)return 0;const f=l.slice(0,-1).lastIndexOf(e.EXTENDED_PICTOGRAPHIC);return-1!==f&&l[f]===e.EXTENDED_PICTOGRAPHIC&&a.slice(f+1,-2).every((function(t){return t===e.CLUSTER_BREAK.EXTEND}))&&c===e.CLUSTER_BREAK.ZWJ&&p===e.EXTENDED_PICTOGRAPHIC?0:-1!==n.indexOf(e.CLUSTER_BREAK.REGIONAL_INDICATOR)?2:c===e.CLUSTER_BREAK.REGIONAL_INDICATOR&&u===e.CLUSTER_BREAK.REGIONAL_INDICATOR?0:1}},Hw}()),r=e(function(){if(Yw)return JP;Yw=1,Object.defineProperty(JP,"__esModule",{value:!0});let e=class{constructor(e,t){this._index=0,this._str=e,this._nextBreak=t}[Symbol.iterator](){return this}next(){let e;if((e=this._nextBreak(this._str,this._index))=t.length-1)return t.length;const i=n.default.codePointAt(t,r),s=e.getGraphemeBreakProperty(i),o=e.getEmojiProperty(i),a=[],l=[];for(let i=r+1;i{!function(e,t){const n=t.set.get(e);n&&(n.defs.some((e=>"VariableDeclarator"===e.node.type&&null!==e.node.init))||n.references.some((e=>{const n=e.writeExpr;return e.from===t&&n&&"ThisExpression"===n.type&&"="===n.parent.operator}))||n.defs.map((e=>e.node)).forEach((t=>{r(t,e)})))}(e,i)}))}return 0===e.options.length?t.push("that"):t=e.options,{"Program:exit":s,"FunctionExpression:exit":s,"FunctionDeclaration:exit":s,VariableDeclarator(e){const t=e.id,n="ArrayPattern"===t.type||"ObjectPattern"===t.type;null===e.init||n||i(e,t.name,e.init)},AssignmentExpression(e){"Identifier"===e.left.type&&i(e,e.left.name,e.right)}}}}),cC}function ik(){if(hC)return fC;hC=1;const e=Pw();return fC={meta:{type:"suggestion",docs:{description:"Enforce consistent brace style for all control statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/curly"},schema:{anyOf:[{type:"array",items:[{enum:["all"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["multi","multi-line","multi-or-nest"]},{enum:["consistent"]}],minItems:0,maxItems:2}]},fixable:"code",messages:{missingCurlyAfter:"Expected { after '{{name}}'.",missingCurlyAfterCondition:"Expected { after '{{name}}' condition.",unexpectedCurlyAfter:"Unnecessary { after '{{name}}'.",unexpectedCurlyAfterCondition:"Unnecessary { after '{{name}}' condition."}},create(t){const n="multi"===t.options[0],r="multi-line"===t.options[0],i="multi-or-nest"===t.options[0],s="consistent"===t.options[1],o=t.sourceCode;function a(t){if("EmptyStatement"===t.type)return!0;const n=o.getFirstToken(t),r=o.getLastToken(t),i=e.isSemicolonToken(r)?o.getTokenBefore(r):r;return n.loc.start.line===i.loc.end.line}function l(e){switch(e.type){case"IfStatement":return!e.alternate||l(e.alternate);case"ForStatement":case"ForInStatement":case"ForOfStatement":case"LabeledStatement":case"WithStatement":case"WhileStatement":return l(e.body);default:return!1}}function c(e){const t=e.body[0];return function(e){return"VariableDeclaration"===e.type?"const"===e.kind||"let"===e.kind:"FunctionDeclaration"===e.type||"ClassDeclaration"===e.type}(t)||l(t)&&function(e){const t=o.getTokenAfter(e);return Boolean(t)&&"else"===(n=t).value&&"Keyword"===n.type;var n}(e)}function u(s,l,u,p){const d="BlockStatement"===l.type;let f=null;if(d&&(1!==l.body.length||c(l)))f=!0;else if(n)f=!1;else if(r)(function(t){const n=o.getTokenBefore(t),r=o.getLastToken(t),i=e.isSemicolonToken(r)?o.getTokenBefore(r):r;return n.loc.start.line===i.loc.end.line})(l)||(f=!0);else if(i)if(d){const e=l.body[0],t=o.getCommentsBefore(e);f=!a(e)||t.length>0}else f=!a(l);else f=!0;return{actual:d,expected:f,check(){null!==this.expected&&this.expected!==this.actual&&(this.expected?t.report({node:s,loc:l.loc,messageId:p&&p.condition?"missingCurlyAfterCondition":"missingCurlyAfter",data:{name:u},fix:e=>e.replaceText(l,`{${o.getText(l)}}`)}):t.report({node:s,loc:l.loc,messageId:p&&p.condition?"unexpectedCurlyAfterCondition":"unexpectedCurlyAfter",data:{name:u},fix(t){const n="DoWhileStatement"===s.type&&o.getTokenBefore(l).range[1]===l.range[0]&&!e.canTokensBeAdjacent("do",o.getFirstToken(l,{skip:1})),r=o.getFirstToken(l),i=o.getLastToken(l),a=o.getTokenBefore(i);if(function(t){const n=o.getTokenBefore(t),r=o.getTokenAfter(t),i=o.getNodeByRangeIndex(n.range[0]);return!(e.isSemicolonToken(n)||!r||"BlockStatement"===i.type&&"FunctionExpression"!==i.parent.type&&"ArrowFunctionExpression"!==i.parent.type||n.loc.end.line!==r.loc.start.line&&!/^[([/`+-]/u.test(r.value)&&("Punctuator"!==n.type||"++"!==n.value&&"--"!==n.value))}(i))return null;const c=o.getText().slice(r.range[1],a.range[0])+o.getText(a)+o.getText().slice(a.range[1],i.range[0]);return t.replaceText(l,(n?" ":"")+c)}}))}}}return{IfStatement(e){const t=e.parent;"IfStatement"===t.type&&t.alternate===e||function(e){const t=[];for(let n=e;n;n=n.alternate)if(t.push(u(n,n.consequent,"if",{condition:!0})),n.alternate&&"IfStatement"!==n.alternate.type){t.push(u(n,n.alternate,"else"));break}if(s){const e=t.some((e=>null!==e.expected?e.expected:e.actual));t.forEach((t=>{t.expected=e}))}return t}(e).forEach((e=>{e.check()}))},WhileStatement(e){u(e,e.body,"while",{condition:!0}).check()},DoWhileStatement(e){u(e,e.body,"do").check()},ForStatement(e){u(e,e.body,"for",{condition:!0}).check()},ForInStatement(e){u(e,e.body,"for-in").check()},ForOfStatement(e){u(e,e.body,"for-of").check()}}}},fC}function sk(){if(xC)return EC;xC=1;const e=Pw();return EC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent newlines before and after dots",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-location"},schema:[{enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(t){const n=t.options[0],r="object"===n||!n,i=t.sourceCode;return{MemberExpression:function(n){n.computed||function(n){const s=n.property,o=i.getTokenBefore(s);if(r){const r=i.getTokenBefore(o);e.isTokenOnSameLine(r,o)||t.report({node:n,loc:o.loc,messageId:"expectedDotAfterObject",*fix(t){o.value.startsWith(".")&&e.isDecimalIntegerNumericToken(r)?yield t.insertTextAfter(r,` ${o.value}`):yield t.insertTextAfter(r,o.value),yield t.remove(o)}})}else e.isTokenOnSameLine(o,s)||t.report({node:n,loc:o.loc,messageId:"expectedDotBeforeProperty",*fix(e){yield e.remove(o),yield e.insertTextBefore(s,o.value)}})}(n)}}}},EC}function ok(){return OC?SC:(OC=1,SC=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"])}function ak(){if(kC)return PC;kC=1;const e=Pw();return PC={meta:{type:"suggestion",docs:{description:"Require the use of `===` and `!==`",recommended:!1,url:"https://eslint.org/docs/latest/rules/eqeqeq"},schema:{anyOf:[{type:"array",items:[{enum:["always"]},{type:"object",properties:{null:{enum:["always","never","ignore"]}},additionalProperties:!1}],additionalItems:!1},{type:"array",items:[{enum:["smart","allow-null"]}],additionalItems:!1}]},fixable:"code",messages:{unexpected:"Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'."}},create(t){const n=t.options[0]||"always",r=t.options[1]||{},i=t.sourceCode,s="always"===n?r.null||"always":"ignore",o="always"===s,a="never"===s;function l(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}function c(e){return l(e.left)||l(e.right)}function u(e){return"Literal"===e.left.type&&"Literal"===e.right.type&&typeof e.left.value==typeof e.right.value}function p(e,n){const r=i.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator));t.report({node:e,loc:r.loc,messageId:"unexpected",data:{expectedOperator:n,actualOperator:e.operator},fix(t){return c(e)||u(e)?t.replaceText(r,n):null}})}return{BinaryExpression(t){const r=function(t){return e.isNullLiteral(t.right)||e.isNullLiteral(t.left)}(t);"=="===t.operator||"!="===t.operator?"smart"===n&&(c(t)||u(t)||r)||!o&&r||p(t,`${t.operator}=`):a&&r&&p(t,t.operator.slice(0,-1))}}}},PC}function lk(){if(NC)return jC;NC=1;const e=Pw();return jC={meta:{type:"suggestion",docs:{description:"Require or disallow named `function` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-names"},schema:{definitions:{value:{enum:["always","as-needed","never"]}},items:[{$ref:"#/definitions/value"},{type:"object",properties:{generators:{$ref:"#/definitions/value"}},additionalProperties:!1}]},messages:{unnamed:"Unexpected unnamed {{name}}.",named:"Unexpected named {{name}}."}},create(t){const n=t.sourceCode;function r(e){const t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&(t.method||"get"===t.kind||"set"===t.kind)}function i(r){t.report({node:r,messageId:"unnamed",loc:e.getFunctionHeadLoc(r,n),data:{name:e.getFunctionNameWithKind(r)}})}function s(s){const o=n.getDeclaredVariables(s)[0];if((a=o)&&"FunctionName"===a.defs[0].type&&o.references.length>0)return;var a;const l=Boolean(s.id&&s.id.name),c=function(e){return e.generator&&t.options.length>1&&t.options[1].generators?t.options[1].generators:t.options[0]||"always"}(s);"never"===c?l&&"FunctionDeclaration"!==s.type&&function(r){t.report({node:r,messageId:"named",loc:e.getFunctionHeadLoc(r,n),data:{name:e.getFunctionNameWithKind(r)}})}(s):"as-needed"===c?l||function(e){const t=e.parent;return r(e)||"VariableDeclarator"===t.type&&"Identifier"===t.id.type&&t.init===e||"Property"===t.type&&t.value===e||"PropertyDefinition"===t.type&&t.value===e||"AssignmentExpression"===t.type&&"Identifier"===t.left.type&&t.right===e||"AssignmentPattern"===t.type&&"Identifier"===t.left.type&&t.right===e}(s)||i(s):l||r(s)||i(s)}return{"FunctionExpression:exit":s,"ExportDefaultDeclaration > FunctionDeclaration":s}}},jC}function ck(){if($C)return WC;$C=1;const e=Pw();return WC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks inside function parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-paren-newline"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never","consistent","multiline","multiline-arguments"]},{type:"object",properties:{minItems:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{expectedBefore:"Expected newline before ')'.",expectedAfter:"Expected newline after '('.",expectedBetween:"Expected newline between arguments/params.",unexpectedBefore:"Unexpected newline before ')'.",unexpectedAfter:"Unexpected newline after '('."}},create(t){const n=t.sourceCode,r=t.options[0]||"multiline",i="multiline"===r,s="multiline-arguments"===r,o="consistent"===r;let a;function l(e,t){return s&&1===e.length?t:i||s?e.some(((t,n)=>n!==e.length-1&&t.loc.end.line!==e[n+1].loc.start.line)):o?t:e.length>=a}return a="object"==typeof r?r.minItems:"always"===r?0:"never"===r?1/0:null,{[["ArrowFunctionExpression","CallExpression","FunctionDeclaration","FunctionExpression","ImportExpression","NewExpression"]](r){const i=function(t){switch(t.type){case"NewExpression":if(!(t.arguments.length||e.isOpeningParenToken(n.getLastToken(t,{skip:1}))&&e.isClosingParenToken(n.getLastToken(t))&&t.callee.range[1]e.insertTextAfter(s,"\n")}),p&&!d?t.report({node:o,messageId:"unexpectedBefore",fix(e){return n.getText().slice(c.range[1],o.range[0]).trim()?null:e.removeRange([c.range[1],o.range[0]])}}):!p&&d&&t.report({node:o,messageId:"expectedBefore",fix:e=>e.insertTextBefore(o,"\n")})}(i,o),s&&function(r,i){const s=r.leftParen,o=n.getTokenAfter(s),a=l(i,!e.isTokenOnSameLine(s,o));for(let e=0;e<=i.length-2;e++){const n=i[e],r=i[e+1];n.loc.end.line===r.loc.start.line&&a&&t.report({node:n,messageId:"expectedBetween",fix:e=>e.insertTextBefore(r,"\n")})}}(i,o))}}}},WC}function uk(){if(QC)return qC;QC=1;const e={oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]};return qC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing around `*` operators in generator functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/generator-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"},named:e,anonymous:e,method:e},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){const t={before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}};function n(e,n){return e?"string"==typeof e?t[e]:Object.assign({},n,e):n}const r=function(e){const r=n(e,t.before);return{named:n(e.named,r),anonymous:n(e.anonymous,r),method:n(e.method,r)}}(e.options[0]||{}),i=e.sourceCode;function s(e){return"*"===e.value&&"Punctuator"===e.type}function o(t,n,i,s){if(!!(s.range[0]-i.range[1])!==r[t][n]){const a="*"===i.value,l=r[t][n],c=a?i:s,u=`${l?"missing":"unexpected"}${o=n,o[0].toUpperCase()+o.slice(1)}`;e.report({node:c,messageId:u,fix(e){return l?a?e.insertTextAfter(c," "):e.insertTextBefore(c," "):e.removeRange([i.range[1],s.range[0]])}})}var o}function a(e){if(!e.generator)return;const t=function(e){return i.getFirstToken(e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,s)}(e),n=i.getTokenBefore(t),r=i.getTokenAfter(t);let a="named";"MethodDefinition"===e.parent.type||"Property"===e.parent.type&&e.parent.method?a="method":e.id||(a="anonymous"),"method"===a&&t===i.getFirstToken(e.parent)||o(a,"before",n,t),o(a,"after",t,r)}return{FunctionDeclaration:a,FunctionExpression:a}}},qC}function pk(){return nA||(nA=1,tA={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require error handling in callbacks",recommended:!1,url:"https://eslint.org/docs/latest/rules/handle-callback-err"},schema:[{type:"string"}],messages:{expected:"Expected error to be handled."}},create(e){const t=e.options[0]||"err",n=e.sourceCode;function r(r){const i=function(e){return e.variables.filter((e=>e.defs[0]&&"Parameter"===e.defs[0].type))}(n.getScope(r)),s=i[0];s&&function(e){if("^"===t[0])return new RegExp(t,"u").test(e);return e===t}(s.name)&&0===s.references.length&&e.report({node:r,messageId:"expected"})}return{FunctionDeclaration:r,FunctionExpression:r,ArrowFunctionExpression:r}}}),tA}function dk(){if(iA)return rA;return iA=1,rA={meta:{deprecated:!0,replacedBy:["id-denylist"],type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-blacklist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted."}},create(e){const t=new Set(e.options),n=new Set,r=e.sourceCode;let i;function s(e){const t=e.parent;return"MemberExpression"!==t.type||t.property!==e||t.computed?!("CallExpression"===t.type||"NewExpression"===t.type||function(e){const t=e.parent;return"ImportSpecifier"===t.type&&t.imported!==t.local&&t.imported===e||"ExportSpecifier"===t.type&&t.parent.source&&t.local!==t.exported&&t.local===e}(e)||function(e){const t=e.parent;return!t.computed&&"Property"===t.type&&"ObjectPattern"===t.parent.type&&t.value!==e&&t.key===e}(e)||function(e){const t=i.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(e)&&!function(e){const t=e.parent;return"Property"===t.type&&"ObjectExpression"===t.parent.type&&t.shorthand}(e)):function(e){const t=e.parent;return"AssignmentExpression"===t.type&&t.left===e||"ArrayPattern"===t.type||"RestElement"===t.type||"Property"===t.type&&t.value===e&&"ObjectPattern"===t.parent.type||"AssignmentPattern"===t.type&&t.left===e}(t)}return{Program(e){i=r.getScope(e)},Identifier(r){var i;i=r.name,t.has(i)&&s(r)&&function(t){n.has(t.range.toString())||(e.report({node:t,messageId:"restricted",data:{name:t.name}}),n.add(t.range.toString()))}(r)}}}},rA}function fk(){if(oA)return sA;return oA=1,sA={meta:{type:"suggestion",docs:{description:"Disallow specified identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-denylist"},schema:{type:"array",items:{type:"string"},uniqueItems:!0},messages:{restricted:"Identifier '{{name}}' is restricted.",restrictedPrivate:"Identifier '#{{name}}' is restricted."}},create(e){const t=new Set(e.options),n=new Set,r=e.sourceCode;let i;function s(e){const t=e.parent;return"MemberExpression"!==t.type||t.property!==e||t.computed?"CallExpression"!==t.type&&"NewExpression"!==t.type&&!function(e){const t=e.parent;return"ImportSpecifier"===t.type&&t.imported!==t.local&&t.imported===e||"ExportSpecifier"===t.type&&t.parent.source&&t.local!==t.exported&&t.local===e}(e)&&!function(e){const t=e.parent;return!t.computed&&"Property"===t.type&&"ObjectPattern"===t.parent.type&&t.key===e}(e)&&!function(e){const t=i.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(e):function(e){const t=e.parent;return"AssignmentExpression"===t.type&&t.left===e||"ArrayPattern"===t.type||"RestElement"===t.type||"Property"===t.type&&t.value===e&&"ObjectPattern"===t.parent.type||"AssignmentPattern"===t.type&&t.left===e}(t)}return{Program(e){i=r.getScope(e)},[["Identifier","PrivateIdentifier"]](r){var i;i=r.name,t.has(i)&&s(r)&&function(t){if(!n.has(t.range.toString())){const r="PrivateIdentifier"===t.type;e.report({node:t,messageId:r?"restrictedPrivate":"restricted",data:{name:t.name}}),n.add(t.range.toString())}}(r)}}}},sA}function hk(){if(lA)return aA;lA=1;const{getGraphemeCount:e}=tk();return aA={meta:{type:"suggestion",docs:{description:"Enforce minimum and maximum identifier lengths",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-length"},schema:[{type:"object",properties:{min:{type:"integer",default:2},max:{type:"integer"},exceptions:{type:"array",uniqueItems:!0,items:{type:"string"}},exceptionPatterns:{type:"array",uniqueItems:!0,items:{type:"string"}},properties:{enum:["always","never"]}},additionalProperties:!1}],messages:{tooShort:"Identifier name '{{name}}' is too short (< {{min}}).",tooShortPrivate:"Identifier name '#{{name}}' is too short (< {{min}}).",tooLong:"Identifier name '{{name}}' is too long (> {{max}}).",tooLongPrivate:"Identifier name #'{{name}}' is too long (> {{max}})."}},create(t){const n=t.options[0]||{},r=void 0!==n.min?n.min:2,i=void 0!==n.max?n.max:1/0,s="never"!==n.properties,o=new Set(n.exceptions),a=(n.exceptionPatterns||[]).map((e=>new RegExp(e,"u"))),l=new Set;const c={MemberExpression:s&&function(e){return!e.computed&&(e.parent.left===e&&"AssignmentExpression"===e.parent.type||"Property"===e.parent.type&&e.parent.value===e&&"ObjectPattern"===e.parent.parent.type&&e.parent.parent.parent.left===e.parent.parent)},AssignmentPattern(e,t){return e.left===t},VariableDeclarator(e,t){return e.id===t},Property(e,t){if("ObjectPattern"===e.parent.type){const n=e.value.name===e.key.name;return!n&&e.value===t||n&&e.key===t&&s}return s&&!e.computed&&e.key.name===t.name},ImportDefaultSpecifier:!0,RestElement:!0,FunctionExpression:!0,ArrowFunctionExpression:!0,ClassDeclaration:!0,FunctionDeclaration:!0,MethodDefinition:!0,PropertyDefinition:!0,CatchClause:!0,ArrayPattern:!0};return{[["Identifier","PrivateIdentifier"]](n){const s=n.name,u=n.parent,p=e(s),d=pi)||o.has(s)||function(e){return a.some((t=>t.test(e)))}(s))return;const f=c[u.type];if(f&&!l.has(n.range.toString())&&(!0===f||f(u,n))){l.add(n.range.toString());let e=d?"tooShort":"tooLong";"PrivateIdentifier"===n.type&&(e+="Private"),t.report({node:n,messageId:e,data:{name:s,min:r,max:i}})}}}}},aA}function mk(){return uA||(uA=1,cA={meta:{type:"suggestion",docs:{description:"Require identifiers to match a specified regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/id-match"},schema:[{type:"string"},{type:"object",properties:{properties:{type:"boolean",default:!1},classFields:{type:"boolean",default:!1},onlyDeclarations:{type:"boolean",default:!1},ignoreDestructuring:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{notMatch:"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",notMatchPrivate:"Identifier '#{{name}}' does not match the pattern '{{pattern}}'."}},create(e){const t=e.options[0]||"^.+$",n=new RegExp(t,"u"),r=e.options[1]||{},i=!!r.properties,s=!!r.classFields,o=!!r.onlyDeclarations,a=!!r.ignoreDestructuring,l=e.sourceCode;let c;const u=new Set,p=new Set(["CallExpression","NewExpression"]),d=new Set(["FunctionDeclaration","VariableDeclarator"]),f=new Set(["ImportSpecifier","ImportNamespaceSpecifier","ImportDefaultSpecifier"]);function h(e){return!n.test(e)}function m(e,t){return(!o||d.has(e.type))&&!p.has(e.type)&&h(t)}function g(n){if(!u.has(n.range.toString())){const r="PrivateIdentifier"===n.type?"notMatchPrivate":"notMatch";e.report({node:n,messageId:r,data:{name:n.name,pattern:t}}),u.add(n.range.toString())}}return{Program(e){c=l.getScope(e)},Identifier(e){const t=e.name,n=e.parent,r="MemberExpression"===n.type?n.parent:n;if(!function(e){const t=c.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(e))if("MemberExpression"===n.type){if(!i)return;"Identifier"===n.object.type&&n.object.name===t||"AssignmentExpression"===r.type&&"MemberExpression"===r.left.type&&r.left.property.name===e.name?h(t)&&g(e):"AssignmentExpression"===r.type&&"MemberExpression"!==r.right.type&&h(t)&&g(e)}else if("Property"!==n.type||"ObjectExpression"!==n.parent.type||n.key!==e||n.computed)if("Property"===n.type||"AssignmentPattern"===n.type){if(n.parent&&"ObjectPattern"===n.parent.type){!a&&n.shorthand&&n.value.left&&h(t)&&g(e);const r=n.key.name===n.value.name;if(!r&&n.key===e)return;!(n.value.name&&h(t))||r&&a||g(e)}if(!i&&!n.computed||a&&function(e){let{parent:t}=e;for(;t;){if("ObjectPattern"===t.type)return!0;t=t.parent}return!1}(e))return;n.right!==e&&m(r,t)&&g(e)}else f.has(n.type)?n.local&&n.local.name===e.name&&h(t)&&g(e):"PropertyDefinition"===n.type?s&&h(t)&&g(e):m(r,t)&&g(e);else i&&h(t)&&g(e)},PrivateIdentifier(e){"PropertyDefinition"===e.parent.type&&!s||h(e.name)&&g(e)}}}}),cA}function gk(){if(dA)return pA;dA=1;const{isCommentToken:e,isNotOpeningParenToken:t}=Pw();return pA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of arrow function bodies",recommended:!1,url:"https://eslint.org/docs/latest/rules/implicit-arrow-linebreak"},fixable:"whitespace",schema:[{enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(n){const r=n.sourceCode,i=n.options[0]||"beside";return{ArrowFunctionExpression:s=>function(s){if("BlockStatement"===s.body.type)return;const o=r.getTokenBefore(s.body,t),a=r.getTokenAfter(o);o.loc.end.line===a.loc.start.line&&"below"===i?n.report({node:a,messageId:"expected",fix:e=>e.insertTextBefore(a,"\n")}):o.loc.end.line!==a.loc.start.line&&"beside"===i&&n.report({node:a,messageId:"unexpected",fix(t){return r.getFirstTokenBetween(o,a,{includeComments:!0,filter:e})?null:t.replaceTextRange([o.range[1],a.range[0]]," ")}})}(s)}}},pA}function yk(){if(hA)return fA;hA=1;const e=Pw(),t=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExperimentalRestProperty","ExperimentalSpreadProperty","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression"]);class n{constructor(e){this._values=Array(e+1)}insert(e,t){this._values[e]=t}findLastNotAfter(e){const t=this._values;for(let n=e;n>=0;n--){const e=t[n];if(e)return e}}deleteRange(e,t){this._values.fill(void 0,e,t)}}class r{constructor(e){this.sourceCode=e,this.firstTokensByLineNumber=new Map;const t=e.tokensAndComments;for(let n=0;n=e[0]&&t.range[1]<=e[1],a=o&&this._getOffsetDescriptor(t);this._indexMap.deleteRange(e[0]+1,e[1]),this._indexMap.insert(e[0],i),o&&(this._indexMap.insert(t.range[0],a),this._indexMap.insert(t.range[1],i)),this._indexMap.insert(e[1],s)}getDesiredIndent(e){if(!this._desiredIndentCache.has(e))if(this._ignoredTokens.has(e))this._desiredIndentCache.set(e,this._tokenInfo.getTokenIndent(e));else if(this._lockedFirstTokens.has(e)){const t=this._lockedFirstTokens.get(e);this._desiredIndentCache.set(e,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(t))+this._indentType.repeat(t.loc.start.column-this._tokenInfo.getFirstTokenOfLine(t).loc.start.column))}else{const t=this._getOffsetDescriptor(e),n=!t.from||t.from.loc.start.line!==e.loc.start.line||/^\s*?\n/u.test(e.value)||t.force?t.offset*this._indentSize:0;this._desiredIndentCache.set(e,(t.from?this.getDesiredIndent(t.from):"")+this._indentType.repeat(n))}return this._desiredIndentCache.get(e)}ignoreToken(e){this._tokenInfo.isFirstTokenOfLine(e)&&this._ignoredTokens.add(e)}getFirstDependency(e){return this._getOffsetDescriptor(e).from}}const s={oneOf:[{type:"integer",minimum:0},{enum:["first","off"]}]};return fA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent indentation",recommended:!1,url:"https://eslint.org/docs/latest/rules/indent"},fixable:"whitespace",schema:[{oneOf:[{enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[s,{type:"object",properties:{var:s,let:s,const:s},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:s,body:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:s,body:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:s},additionalProperties:!1},ArrayExpression:s,ObjectExpression:s,ImportDeclaration:s,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},create(n){let s="space",o=4;const a={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1};n.options.length&&("tab"===n.options[0]?(o=1,s="tab"):(o=n.options[0],s="space"),n.options[1]&&(Object.assign(a,n.options[1]),"number"!=typeof a.VariableDeclarator&&"first"!==a.VariableDeclarator||(a.VariableDeclarator={var:a.VariableDeclarator,let:a.VariableDeclarator,const:a.VariableDeclarator})));const l=n.sourceCode,c=new r(l),u=new i(c,o,"space"===s?" ":"\t",l.text.length),p=new WeakSet;function d(e,t,n){let r;return r=t>0?"space"===s?t:`${t} ${"space"+(1===t?"":"s")}`:n>0?"tab"===s?n:`${n} ${"tab"+(1===n?"":"s")}`:"0",{expected:`${e} ${s}${1===e?"":"s"}`,actual:r}}function f(e,t){const r=Array.from(c.getTokenIndent(e)),i=r.filter((e=>" "===e)).length,s=r.filter((e=>"\t"===e)).length;n.report({node:e,messageId:"wrongIndentation",data:d(t.length,i,s),loc:{start:{line:e.loc.start.line,column:0},end:{line:e.loc.start.line,column:e.loc.start.column}},fix(n){const r=[e.range[0]-e.loc.start.column,e.range[0]],i=t;return n.replaceTextRange(r,i)}})}function h(e,t){const n=c.getTokenIndent(e);return n===t||n.includes(" ")&&n.includes("\t")}function m(t,n,r,i){function s(t){let r=l.getTokenBefore(t);for(;e.isOpeningParenToken(r)&&r!==n;)r=l.getTokenBefore(r);return l.getTokenAfter(r)}u.setDesiredOffsets([n.range[1],r.range[0]],n,"number"==typeof i?i:1),u.setDesiredOffset(r,n,0),"first"===i&&t.length&&!t[0]||t.forEach(((r,o)=>{if(r&&("off"===i&&u.ignoreToken(s(r)),0!==o))if("first"===i&&c.isFirstTokenOfLine(s(r)))u.matchOffsetOf(s(t[0]),s(r));else{const i=t[o-1],a=i&&s(i),c=i&&l.getLastToken(i);i&&c.loc.end.line-function(t){const n=t.match(/\s*$/u)[0].match(e.createGlobalLinebreakMatcher());return null===n?0:n.length}(c.value)>n.loc.end.line&&u.setDesiredOffsets([i.range[1],r.range[1]],a,0)}}))}function g(t){if("BlockStatement"!==t.type){const n=l.getTokenBefore(t,e.isNotOpeningParenToken);let r=l.getFirstToken(t),i=l.getLastToken(t);for(;e.isOpeningParenToken(l.getTokenBefore(r))&&e.isClosingParenToken(l.getTokenAfter(i));)r=l.getTokenBefore(r),i=l.getTokenAfter(i);u.setDesiredOffsets([r.range[0],i.range[1]],n,1)}}function y(t){let n;n=t.arguments.length?l.getFirstTokenBetween(t.callee,t.arguments[0],e.isOpeningParenToken):l.getLastToken(t,1);const r=l.getLastToken(t);if(p.add(n),p.add(r),t.optional){const r=l.getTokenAfter(t.callee,e.isQuestionDotToken),i=l.getTokensBetween(t.callee,r,{filter:e.isClosingParenToken}).length,s=i?l.getTokenBefore(t.callee,{skip:i-1}):l.getFirstToken(t.callee),o=l.getTokenBefore(r),a=o.loc.end.line===n.loc.start.line?o:s;u.setDesiredOffset(r,a,1)}const i="TaggedTemplateExpression"===t.callee.type?l.getFirstToken(t.callee.quasi):n,s=l.getTokenBefore(i);u.setDesiredOffset(n,s,0),m(t.arguments,n,r,a.CallExpression.arguments)}function _(e){const t=new Set(l.getTokens(e,{includeComments:!0}));t.forEach((e=>{if(!t.has(u.getFirstDependency(e))){const t=c.getFirstTokenOfLine(e);e===t?u.ignoreToken(e):u.setDesiredOffset(e,t,0)}}))}function b(e,t){const n=e.loc.end.line,r=t.loc.start.line;if(n===r||n===r-1)return!1;for(let e=n+1;ee))||n,e.isClosingBracketToken);m(t.elements,n,r,a.ArrayExpression)},"ObjectExpression, ObjectPattern"(t){const n=l.getFirstToken(t),r=l.getTokenAfter(t.properties.length?t.properties[t.properties.length-1]:n,e.isClosingBraceToken);m(t.properties,n,r,a.ObjectExpression)},ArrowFunctionExpression(t){const n=l.getFirstToken(t,{skip:t.async?1:0});if(e.isOpeningParenToken(n)){const r=n,i=l.getTokenBefore(t.body,e.isClosingParenToken);p.add(r),p.add(i),m(t.params,r,i,a.FunctionExpression.parameters)}g(t.body)},AssignmentExpression(e){const t=l.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator));u.setDesiredOffsets([t.range[0],e.range[1]],l.getLastToken(e.left),1),u.ignoreToken(t),u.ignoreToken(l.getTokenAfter(t))},"BinaryExpression, LogicalExpression"(e){const t=l.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator)),n=l.getTokenAfter(t);u.ignoreToken(t),u.ignoreToken(n),u.setDesiredOffset(n,t,0)},"BlockStatement, ClassBody"(t){let n;n=t.parent&&function(e){if(!e.parent||"CallExpression"!==e.parent.type||e.parent.callee!==e)return!1;let t=e.parent&&e.parent.parent;for(;"UnaryExpression"===t.type&&["!","~","+","-"].includes(t.operator)||"AssignmentExpression"===t.type||"LogicalExpression"===t.type||"SequenceExpression"===t.type||"VariableDeclarator"===t.type;)t=t.parent;return("ExpressionStatement"===t.type||"VariableDeclaration"===t.type)&&"Program"===t.parent.type}(t.parent)?a.outerIIFEBody:!t.parent||"FunctionExpression"!==t.parent.type&&"ArrowFunctionExpression"!==t.parent.type?t.parent&&"FunctionDeclaration"===t.parent.type?a.FunctionDeclaration.body:1:a.FunctionExpression.body,e.STATEMENT_LIST_PARENTS.has(t.parent.type)||u.setDesiredOffset(l.getFirstToken(t),l.getFirstToken(t.parent),0),m(t.body,l.getFirstToken(t),l.getLastToken(t),n)},CallExpression:y,"ClassDeclaration[superClass], ClassExpression[superClass]"(t){const n=l.getFirstToken(t),r=l.getTokenBefore(t.superClass,e.isNotOpeningParenToken);u.setDesiredOffsets([r.range[0],t.body.range[0]],n,1)},ConditionalExpression(t){const n=l.getFirstToken(t);if(!a.flatTernaryExpressions||!e.isTokenOnSameLine(t.test,t.consequent)||function(e,t){let n=t;for(;n.parent&&!n.parent.type.endsWith("Statement")&&!n.parent.type.endsWith("Declaration");)n=n.parent;return n=n.parent,!n||n.loc.start.line===e.loc.start.line}(n,t)){const e=l.getFirstTokenBetween(t.test,t.consequent,(e=>"Punctuator"===e.type&&"?"===e.value)),r=l.getFirstTokenBetween(t.consequent,t.alternate,(e=>"Punctuator"===e.type&&":"===e.value)),i=l.getTokenAfter(e),s=l.getTokenBefore(r),o=l.getTokenAfter(r);u.setDesiredOffset(e,n,1),u.setDesiredOffset(r,n,1),u.setDesiredOffset(i,n,"Punctuator"===i.type&&a.offsetTernaryExpressions?2:1),s.loc.end.line===o.loc.start.line?u.setDesiredOffset(o,i,0):u.setDesiredOffset(o,n,"Punctuator"===o.type&&a.offsetTernaryExpressions?2:1)}},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":e=>g(e.body),ExportNamedDeclaration(t){if(null===t.declaration){const n=l.getLastToken(t,e.isClosingBraceToken);m(t.specifiers,l.getFirstToken(t,{skip:1}),n,1),t.source&&u.setDesiredOffsets([n.range[1],t.range[1]],l.getFirstToken(t),1)}},ForStatement(e){const t=l.getFirstToken(e,1);e.init&&u.setDesiredOffsets(e.init.range,t,1),e.test&&u.setDesiredOffsets(e.test.range,t,1),e.update&&u.setDesiredOffsets(e.update.range,t,1),g(e.body)},"FunctionDeclaration, FunctionExpression"(e){const t=l.getTokenBefore(e.body),n=l.getTokenBefore(e.params.length?e.params[0]:t);p.add(n),p.add(t),m(e.params,n,t,a[e.type].parameters)},IfStatement(e){g(e.consequent),e.alternate&&g(e.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(t){let n;"IfStatement"===t.type?(n=[t.consequent],t.alternate&&n.push(t.alternate)):n=[t.body];for(const r of n){const n=l.getLastToken(r);if(e.isSemicolonToken(n)){const r=l.getTokenBefore(n),i=l.getTokenAfter(n);!e.isTokenOnSameLine(r,n)&&i&&e.isTokenOnSameLine(n,i)&&u.setDesiredOffset(n,l.getFirstToken(t),0)}}},ImportDeclaration(t){if(t.specifiers.some((e=>"ImportSpecifier"===e.type))){const n=l.getFirstToken(t,e.isOpeningBraceToken),r=l.getLastToken(t,e.isClosingBraceToken);m(t.specifiers.filter((e=>"ImportSpecifier"===e.type)),n,r,a.ImportDeclaration)}const n=l.getLastToken(t,(e=>"Identifier"===e.type&&"from"===e.value)),r=l.getLastToken(t,(e=>"String"===e.type)),i=l.getLastToken(t,(e=>"Punctuator"===e.type&&";"===e.value));if(n){const e=i&&i.range[1]===r.range[1]?t.range[1]:r.range[1];u.setDesiredOffsets([n.range[0],e],l.getFirstToken(t),1)}},ImportExpression(e){const t=l.getFirstToken(e,1),n=l.getLastToken(e);p.add(t),p.add(n),u.setDesiredOffset(t,l.getTokenBefore(t),0),m([e.source],t,n,a.CallExpression.arguments)},"MemberExpression, JSXMemberExpression, MetaProperty"(t){const n="MetaProperty"===t.type?t.meta:t.object,r=l.getFirstTokenBetween(n,t.property,e.isNotClosingParenToken),i=l.getTokenAfter(r),s=l.getTokensBetween(n,t.property,{filter:e.isClosingParenToken}).length,o=s?l.getTokenBefore(n,{skip:s-1}):l.getFirstToken(n),c=l.getTokenBefore(r),p=t.computed?r:i;t.computed&&(u.setDesiredOffset(l.getLastToken(t),r,0),u.setDesiredOffsets(t.property.range,r,1));const d=c.loc.end.line===p.loc.start.line?c:o;"number"==typeof a.MemberExpression?(u.setDesiredOffset(r,d,a.MemberExpression),u.setDesiredOffset(i,t.computed?r:d,a.MemberExpression)):(u.ignoreToken(r),u.ignoreToken(i),u.setDesiredOffset(r,d,0),u.setDesiredOffset(i,r,0))},NewExpression(t){(t.arguments.length>0||e.isClosingParenToken(l.getLastToken(t))&&e.isOpeningParenToken(l.getLastToken(t,1)))&&y(t)},Property(t){if(!t.shorthand&&!t.method&&"init"===t.kind){const n=l.getFirstTokenBetween(t.key,t.value,e.isColonToken);u.ignoreToken(l.getTokenAfter(n))}},PropertyDefinition(t){const n=l.getFirstToken(t),r=l.getLastToken(t);let i=null;if(t.computed){const r=l.getTokenBefore(t.key,e.isOpeningBracketToken),s=i=l.getTokenAfter(t.key,e.isClosingBracketToken),o=[r.range[1],s.range[0]];r!==n&&u.setDesiredOffset(r,n,0),u.setDesiredOffsets(o,r,1),u.setDesiredOffset(s,r,0)}else{const e=i=l.getFirstToken(t.key);e!==n&&u.setDesiredOffset(e,n,1)}if(t.value){const n=l.getTokenBefore(t.value,e.isEqToken),s=l.getTokenAfter(n);u.setDesiredOffset(n,i,1),u.setDesiredOffset(s,n,1),e.isSemicolonToken(r)&&u.setDesiredOffset(r,n,1)}else e.isSemicolonToken(r)&&u.setDesiredOffset(r,i,1)},StaticBlock(e){const t=l.getFirstToken(e,{skip:1}),n=l.getLastToken(e);m(e.body,t,n,a.StaticBlock.body)},SwitchStatement(t){const n=l.getTokenAfter(t.discriminant,e.isOpeningBraceToken),r=l.getLastToken(t);u.setDesiredOffsets([n.range[1],r.range[0]],n,a.SwitchCase),t.cases.length&&l.getTokensBetween(t.cases[t.cases.length-1],r,{includeComments:!0,filter:e.isCommentToken}).forEach((e=>u.ignoreToken(e)))},SwitchCase(e){if(1!==e.consequent.length||"BlockStatement"!==e.consequent[0].type){const t=l.getFirstToken(e),n=l.getTokenAfter(e);u.setDesiredOffsets([t.range[1],n.range[0]],t,1)}},TemplateLiteral(e){e.expressions.forEach(((t,n)=>{const r=e.quasis[n],i=e.quasis[n+1],s=r.loc.start.line===r.loc.end.line?l.getFirstToken(r):null;u.setDesiredOffsets([r.range[1],i.range[0]],s,1),u.setDesiredOffset(l.getFirstToken(i),s,0)}))},VariableDeclaration(t){let n=Object.prototype.hasOwnProperty.call(a.VariableDeclarator,t.kind)?a.VariableDeclarator[t.kind]:1;const r=l.getFirstToken(t),i=l.getLastToken(t);if("first"===a.VariableDeclarator[t.kind]){if(t.declarations.length>1)return void m(t.declarations,r,i,"first");n=1}t.declarations[t.declarations.length-1].loc.start.line>t.loc.start.line?u.setDesiredOffsets(t.range,r,n,!0):u.setDesiredOffsets(t.range,r,n),e.isSemicolonToken(i)&&u.ignoreToken(i)},VariableDeclarator(t){if(t.init){const n=l.getTokenBefore(t.init,e.isNotOpeningParenToken),r=l.getTokenAfter(n);u.ignoreToken(n),u.ignoreToken(r),u.setDesiredOffsets([r.range[0],t.range[1]],n,1),u.setDesiredOffset(n,l.getLastToken(t.id),0)}},"JSXAttribute[value]"(e){const t=l.getFirstTokenBetween(e.name,e.value,(e=>"Punctuator"===e.type&&"="===e.value));u.setDesiredOffsets([t.range[0],e.value.range[1]],l.getFirstToken(e.name),1)},JSXElement(e){e.closingElement&&m(e.children,l.getFirstToken(e.openingElement),l.getFirstToken(e.closingElement),1)},JSXOpeningElement(e){const t=l.getFirstToken(e);let n;e.selfClosing?(n=l.getLastToken(e,{skip:1}),u.setDesiredOffset(l.getLastToken(e),n,0)):n=l.getLastToken(e),u.setDesiredOffsets(e.name.range,l.getFirstToken(e)),m(e.attributes,t,n,1)},JSXClosingElement(e){const t=l.getFirstToken(e);u.setDesiredOffsets(e.name.range,t,1)},JSXFragment(e){const t=l.getFirstToken(e.openingFragment),n=l.getFirstToken(e.closingFragment);m(e.children,t,n,1)},JSXOpeningFragment(e){const t=l.getFirstToken(e),n=l.getLastToken(e);u.setDesiredOffsets(e.range,t,1),u.matchOffsetOf(t,n)},JSXClosingFragment(t){const n=l.getFirstToken(t),r=l.getLastToken(t,{skip:1}),i=l.getLastToken(t),s=e.isTokenOnSameLine(r,i)?r:i;u.setDesiredOffsets(t.range,n,1),u.matchOffsetOf(n,s)},JSXExpressionContainer(e){const t=l.getFirstToken(e),n=l.getLastToken(e);u.setDesiredOffsets([t.range[1],n.range[0]],t,1)},JSXSpreadAttribute(e){const t=l.getFirstToken(e),n=l.getLastToken(e);u.setDesiredOffsets([t.range[1],n.range[0]],t,1)},"*"(e){const t=l.getFirstToken(e);t&&!v.has(t)&&u.setDesiredOffsets(e.range,t,0)}},x=[],S={};for(const[e,t]of Object.entries(E))S[e]=e=>x.push({listener:t,node:e});const O=new Set;function T(e){O.add(e),v.add(l.getFirstToken(e))}const w=a.ignoredNodes.reduce(((e,t)=>Object.assign(e,{[t]:T})),{});return Object.assign(S,w,{"*:exit"(e){t.has(e.type)||T(e)},"Program:exit"(){a.ignoreComments&&l.getAllComments().forEach((e=>u.ignoreToken(e)));for(let e=0;e=0;e--){const t=r[e].left,n=r[e].right;if(!p.has(t)&&!p.has(n)){const e=new Set(l.getTokensBetween(t,n));e.forEach((n=>{e.has(u.getFirstDependency(n))||u.setDesiredOffset(n,t,1)}))}u.setDesiredOffset(n,t,0)}}(l.ast.tokens);const t=new WeakMap;for(let e=0;e0&&n>0?`${t} ${i} and ${n} ${s}`:t>0?"space"===r?t:`${t} ${i}`:n>0?"tab"===r?n:`${n} ${s}`:"0",{expected:`${e} ${r}${1===e?"":"s"}`,actual:o}}function c(e,n,i,s,o,a){if(i&&s)return;const c=("space"===r?" ":"\t").repeat(n),u=a?[e.range[1]-e.loc.end.column,e.range[1]-e.loc.end.column+i+s]:[e.range[0]-e.loc.start.column,e.range[0]-e.loc.start.column+i+s];t.report({node:e,loc:o,messageId:"expected",data:l(n,i,s),fix:e=>e.replaceTextRange(u,c)})}function u(e,t){const n=t?o.getLastToken(e):o.getFirstToken(e),i=o.getText(n,n.loc.start.column).split(""),s=i.slice(0,i.findIndex((e=>" "!==e&&"\t"!==e))),a=s.filter((e=>" "===e)).length,l=s.filter((e=>"\t"===e)).length;return{space:a,tab:l,goodChar:"space"===r?a:l,badChar:"space"===r?l:a}}function p(e,t){const n=!0===t?o.getLastToken(e,1):o.getTokenBefore(e);return(!0===t?e.loc.end.line:e.loc.start.line)!==(n?n.loc.end.line:-1)}function d(e,t){const n=u(e,!1);if("ArrayExpression"===e.type||"ObjectExpression"===e.type||n.goodChar===t&&0===n.badChar||!p(e)||c(e,t,n.space,n.tab),"IfStatement"===e.type&&e.alternate){d(o.getTokenBefore(e.alternate),t),p(e.alternate)||d(e.alternate,t)}if("TryStatement"===e.type&&e.handler){d(o.getFirstToken(e.handler),t)}if("TryStatement"===e.type&&e.finalizer){d(o.getTokenBefore(e.finalizer),t)}if("DoWhileStatement"===e.type){d(o.getTokenAfter(e.body),t)}}function f(e,t){e.forEach((e=>d(e,t)))}function h(e,t){const n=o.getLastToken(e),r=u(n,!0);r.goodChar===t&&0===r.badChar||!p(e,!0)||c(e,t,r.space,r.tab,{line:n.loc.start.line,column:n.loc.start.column},!0)}function m(e,t,n){let r=e.parent;const i=new Set(n||["Program"]);for(;r.type!==t&&!i.has(r.type)&&"Program"!==r.type;)r=r.parent;return r.type===t?r:null}function g(e){return m(e,"VariableDeclarator")}function y(e,t){return t&&t.parent.loc.start.line===e.loc.start.line&&t.parent.declarations.length>1}function _(e){const t=o.getLastToken(e);return e.loc.start.line===t.loc.end.line}function b(e){if(_(e))return;let t,n,r="ArrayExpression"===e.type?e.elements:e.properties;r=r.filter((e=>null!==e));const o=g(e);if(p(e)){const n=e.parent;if(t=u(n).goodChar,!(o&&o.loc.start.line===e.loc.start.line||"VariableDeclarator"===n.type&&o!==o.parent.declarations[0]))if("VariableDeclarator"===n.type&&o.loc.start.line===n.loc.start.line)t+=i*s.VariableDeclarator[o.parent.kind];else if("ObjectExpression"===n.type||"ArrayExpression"===n.type){const r="ObjectExpression"===e.parent.type?e.parent.properties:e.parent.elements;r[0]&&r[0].loc.start.line===n.loc.start.line&&r[0].loc.end.line!==n.loc.start.line||("number"==typeof s[n.type]?t+=s[n.type]*i:t=r[0].loc.start.column)}else"CallExpression"===n.type||"NewExpression"===n.type?"number"==typeof s.CallExpression.arguments?t+=s.CallExpression.arguments*i:"first"===s.CallExpression.arguments?n.arguments.includes(e)&&(t=n.arguments[0].loc.start.column):t+=i:"LogicalExpression"!==n.type&&"ArrowFunctionExpression"!==n.type||(t+=i);!function(e,t){const n=u(e,!1);n.goodChar===t&&0===n.badChar||!p(e)||c(e,t,n.space,n.tab,{line:e.loc.start.line,column:e.loc.start.column})}(e,t)}else t=u(e).goodChar;n="first"===s[e.type]?r.length?r[0].loc.start.column:0:t+i*s[e.type],y(e,o)&&(n+=i*s.VariableDeclarator[o.parent.kind]),f(r,n),r.length>0&&r[r.length-1].loc.end.line===e.loc.end.line||h(e,t+(y(e,o)?s.VariableDeclarator[o.parent.kind]*i:0))}function v(e){if(_(e))return;if(e.parent&&("FunctionExpression"===e.parent.type||"FunctionDeclaration"===e.parent.type||"ArrowFunctionExpression"===e.parent.type))return void function(e){const t=e.parent;let n;if(n=!t.parent||"Property"!==t.parent.type&&"ArrayExpression"!==t.parent.type?u(t).goodChar:u(t,!1).goodChar,"CallExpression"===t.parent.type){const r=t.parent;"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type?r&&r.loc.start.line=2&&t.arguments[1]===e&&t.arguments[0].loc.end.line>t.arguments[0].loc.start.line}(t)&&r.callee.loc.start.line===r.callee.loc.end.line&&!p(t)&&(n=u(r).goodChar)}let r=i;null!==s.outerIIFEBody&&function(e){const t=e.parent;let n=t.parent;if("CallExpression"!==t.type||t.callee!==e)return!1;for(;"UnaryExpression"===n.type&&("!"===n.operator||"~"===n.operator||"+"===n.operator||"-"===n.operator)||"AssignmentExpression"===n.type||"LogicalExpression"===n.type||"SequenceExpression"===n.type||"VariableDeclarator"===n.type;)n=n.parent;return("ExpressionStatement"===n.type||"VariableDeclaration"===n.type)&&n.parent&&"Program"===n.parent.type}(t)?r=s.outerIIFEBody*i:"FunctionExpression"===t.type?r=s.FunctionExpression.body*i:"FunctionDeclaration"===t.type&&(r=s.FunctionDeclaration.body*i),n+=r;const o=g(e);o&&y(e,o)&&(n+=i*s.VariableDeclarator[o.parent.kind]),e.body.length>0&&f(e.body,n),h(e,n-r)}(e);let t,n=[];t=e.parent&&["IfStatement","WhileStatement","ForStatement","ForInStatement","ForOfStatement","DoWhileStatement","ClassDeclaration","TryStatement"].includes(e.parent.type)&&function(e){return"BlockStatement"===e.type||"ClassBody"===e.type||e.body&&"BlockStatement"===e.body.type||e.consequent&&"BlockStatement"===e.consequent.type}(e)?u(e.parent).goodChar:e.parent&&"CatchClause"===e.parent.type?u(e.parent.parent).goodChar:u(e).goodChar,n="IfStatement"===e.type&&"BlockStatement"!==e.consequent.type?[e.consequent]:Array.isArray(e.body)?e.body:[e.body],n.length>0&&f(n,t+i),"BlockStatement"===e.type&&h(e,t)}function E(e){"BlockStatement"!==e.body.type&&v(e)}function x(e,t){const n="SwitchStatement"===e.type?e:e.parent,r=void 0===t?u(n).goodChar:t;let o;return a[n.loc.start.line]?a[n.loc.start.line]:(o=n.cases.length>0&&0===s.SwitchCase?r:r+i*s.SwitchCase,a[n.loc.start.line]=o,o)}return{Program(e){e.body.length>0&&f(e.body,u(e).goodChar)},ClassBody:v,BlockStatement:v,WhileStatement:E,ForStatement:E,ForInStatement:E,ForOfStatement:E,DoWhileStatement:E,IfStatement(e){"BlockStatement"!==e.consequent.type&&e.consequent.loc.start.line>e.loc.start.line&&v(e)},VariableDeclaration(e){e.declarations[e.declarations.length-1].loc.start.line>e.declarations[0].loc.start.line&&function(e){const t=function(e){return e.declarations.reduce(((t,n)=>{const r=t[t.length-1];return(n.loc.start.line!==e.loc.start.line&&!r||r&&r.loc.start.line!==n.loc.start.line)&&t.push(n),t}),[])}(e),n=u(e).goodChar,r=t[t.length-1],a=n+i*s.VariableDeclarator[e.kind];if(f(t,a),o.getLastToken(e).loc.end.line<=r.loc.end.line)return;const l=o.getTokenBefore(r);","===l.value?h(e,u(l).goodChar):h(e,a-i)}(e)},ObjectExpression(e){b(e)},ArrayExpression(e){b(e)},MemberExpression(e){if(void 0===s.MemberExpression)return;if(_(e))return;if(m(e,"VariableDeclarator",["FunctionExpression","ArrowFunctionExpression"]))return;if(m(e,"AssignmentExpression",["FunctionExpression"]))return;const t=u(e).goodChar+i*s.MemberExpression,n=[e.property],r=o.getTokenBefore(e.property);"Punctuator"===r.type&&"."===r.value&&n.push(r),f(n,t)},SwitchStatement(e){const t=u(e).goodChar,n=x(e,t);f(e.cases,n),h(e,t)},SwitchCase(e){if(_(e))return;const t=x(e);f(e.consequent,t+i)},FunctionDeclaration(e){_(e)||("first"===s.FunctionDeclaration.parameters&&e.params.length?f(e.params.slice(1),e.params[0].loc.start.column):null!==s.FunctionDeclaration.parameters&&f(e.params,u(e).goodChar+i*s.FunctionDeclaration.parameters))},FunctionExpression(e){_(e)||("first"===s.FunctionExpression.parameters&&e.params.length?f(e.params.slice(1),e.params[0].loc.start.column):null!==s.FunctionExpression.parameters&&f(e.params,u(e).goodChar+i*s.FunctionExpression.parameters))},ReturnStatement(t){if(_(t))return;const n=u(t).goodChar;!function(e){const t=o.getText(e).replace(o.getText(e.argument),"");return/^return\s*?\(\s*?\);*?/u.test(t)}(t)?d(t,n):function(t,n){const r=o.getLastToken(t,e.isClosingParenToken);if(o.getText(r,r.loc.start.column).slice(0,-1).trim())return;const i=u(r,!0);i.goodChar!==n&&c(t,n,i.space,i.tab,{line:r.loc.start.line,column:r.loc.start.column},!0)}(t,n)},CallExpression(e){_(e)||("first"===s.CallExpression.arguments&&e.arguments.length?f(e.arguments.slice(1),e.arguments[0].loc.start.column):null!==s.CallExpression.arguments&&f(e.arguments,u(e).goodChar+i*s.CallExpression.arguments))}}}},mA}function bk(){if(vA)return bA;vA=1;const e=Pw(),t={"prefer-double":{quote:'"',description:"singlequote",convert(e){return e.replace(/'/gu,'"')}},"prefer-single":{quote:"'",description:"doublequote",convert(e){return e.replace(/"/gu,"'")}}};return bA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either double or single quotes in JSX attributes",recommended:!1,url:"https://eslint.org/docs/latest/rules/jsx-quotes"},fixable:"whitespace",schema:[{enum:["prefer-single","prefer-double"]}],messages:{unexpected:"Unexpected usage of {{description}}."}},create(n){const r=n.options[0]||"prefer-double",i=t[r];return{JSXAttribute(t){const r=t.value;r&&e.isStringLiteral(r)&&!function(t){return t.value.includes(i.quote)||e.isSurroundedBy(t.raw,i.quote)}(r)&&n.report({node:r,messageId:"unexpected",data:{description:i.description},fix(e){return e.replaceText(r,i.convert(r.raw))}})}}}},bA}function vk(){if(xA)return EA;xA=1;const e=Pw(),{getGraphemeCount:t}=tk();function n(e){return e[e.length-1]}function r(e){return e.loc.end.line===e.loc.start.line}function i(e,t){return e.mode=t.mode||"strict",void 0!==t.beforeColon?e.beforeColon=+t.beforeColon:e.beforeColon=0,void 0!==t.afterColon?e.afterColon=+t.afterColon:e.afterColon=1,void 0!==t.align&&("object"==typeof t.align?e.align=t.align:e.align={on:t.align,mode:e.mode,beforeColon:e.beforeColon,afterColon:e.afterColon}),e}return EA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing between keys and values in object literal properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/key-spacing"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{align:{anyOf:[{enum:["colon","value"]},{type:"object",properties:{mode:{enum:["strict","minimum"]},on:{enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{align:{anyOf:[{enum:["colon","value"]},{type:"object",properties:{mode:{enum:["strict","minimum"]},on:{enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{mode:{enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},align:{type:"object",properties:{mode:{enum:["strict","minimum"]},on:{enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{extraKey:"Extra space after {{computed}}key '{{key}}'.",extraValue:"Extra space before value for {{computed}}key '{{key}}'.",missingKey:"Missing space after {{computed}}key '{{key}}'.",missingValue:"Missing space before value for {{computed}}key '{{key}}'."}},create(s){const o=s.options[0]||{},a=(p={},"object"==typeof(d=o).align?(p.align=i({},d.align),p.align.on=d.align.on||"colon",p.align.mode=d.align.mode||"strict",p.multiLine=i({},d.multiLine||d),p.singleLine=i({},d.singleLine||d)):(p.multiLine=i({},d.multiLine||d),p.singleLine=i({},d.singleLine||d),p.multiLine.align&&(p.align={on:p.multiLine.align.on,mode:p.multiLine.align.mode||p.multiLine.mode,beforeColon:p.multiLine.align.beforeColon,afterColon:p.multiLine.align.afterColon})),p),l=a.multiLine,c=a.singleLine,u=a.align||null;var p,d;const f=s.sourceCode;function h(e){return!(e.method||e.shorthand||"init"!==e.kind||"Property"!==e.type)}function m(t){return f.getTokenAfter(t,e.isColonToken)}function g(e,t){const r=e.loc.start.line,i=(h(t)?function(e){const t=m(e);return f.getTokenAfter(t)}(t.key):t).loc.start.line;if(i-r<=1)return!0;const s=f.getCommentsBefore(t);if(s.length&&s[0].loc.start.line-r<=1&&i-n(s).loc.end.line<=1){for(let e=1;e1)return!1;return!0}return!1}function y(t){const n=t.key;return t.computed?f.getText().slice(n.range[0],n.range[1]):e.getStaticPropertyName(t)}function _(t,n,r,i,o){const a=r.length-i;if((a&&"strict"===o||a<0&&"minimum"===o||a>0&&!i&&"minimum"===o)&&(!i||(l=r,!e.LINEBREAK_MATCHER.test(l)))){const e=m(t.key),r=f.getTokenBefore(e,{includeComments:!0}),i=f.getTokenAfter(e,{includeComments:!0}),o="key"===n,l=a>0,c=Math.abs(a),u=Array(c+1).join(" "),p=o?r.loc.end:e.loc.start,d=o?e.loc.start:i.loc.start,h=o?r.loc:i.loc,g=l?{start:p,end:d}:h;let _;if(l){let e;e=o?[r.range[1],r.range[1]+c]:[i.range[0]-c,i.range[0]],_=function(t){return t.removeRange(e)}}else _=o?function(e){return e.insertTextAfter(r,u)}:function(e){return e.insertTextBefore(i,u)};let b="";b=l?"key"===n?"extraKey":"extraValue":"key"===n?"missingKey":"missingValue",s.report({node:t[n],loc:g,messageId:b,data:{computed:t.computed?"computed ":"",key:y(t)},fix:_})}var l}function b(e){const n=f.getFirstToken(e),r=function(e){const t=m(e);return f.getTokenBefore(t)}(e.key);return t(f.getText().slice(n.range[0],r.range[1]))}function v(e){const t=/(\s*):(\s*)/u.exec(f.getText().slice(e.key.range[1],e.value.range[0]));return t?{beforeColon:t[1],afterColon:t[2]}:null}function E(e,t){const n=v(e);n&&(_(e,"key",n.beforeColon,t.beforeColon,t.mode),_(e,"value",n.afterColon,t.afterColon,t.mode))}function x(e,t){const n=e.length;for(let r=0;r{const r=n(e),i=n(r);return!i||g(i,t)?r.push(t):e.push([t]),e}),[[]])})(e).forEach((e=>{const t=e.filter(h);t.length>0&&function(e){const[t]=e,r=n(e);return t.loc.start.line===r.loc.end.line}(t)?x(t,l):function(e){const t=e.length,n=e.map(b),r=u.on;let i,s,o,a=Math.max(...n);u&&t>1?(i=u.beforeColon,s=u.afterColon,o=u.mode):(i=l.beforeColon,s=l.afterColon,o=u.mode),a+="colon"===r?i:s;for(let l=0;l{const n=e.loc.start.line,r=e.loc.end.line;t.push(n,r)})),t}(u),d=function(e){const t=e.map(((e,t)=>({code:e.trim(),num:t+1}))).filter((e=>!e.code)).map((e=>e.num));return t}(l),f=new Set(p.concat(d));function h(e,t){return e.type===t||e.body&&e.body.type===t||e.consequent&&e.consequent.type===t}function m(e){const t=a.getNodeByRangeIndex(e.range[0]);if(t&&"StaticBlock"===t.type){const n=a.getFirstToken(t,{skip:1});return e.range[0]>=n.range[0]?t:null}return t}function g(t,n){const r=m(t);if(r&&h(r,n)){let n=r;return"StaticBlock"===r.type?n=a.getFirstToken(r,{skip:1}):"SwitchStatement"===r.type&&(n=a.getTokenAfter(r.discriminant,{filter:e.isOpeningBraceToken})),t.loc.start.line-n.loc.start.line==1}return!1}function y(e,t){const n=m(e);return!!n&&h(n,t)&&n.loc.end.line-e.loc.end.line==1}function _(e){return g(e,"ClassBody")}function b(e){return y(e,"ClassBody")}function v(l,u){if(o&&i.test(l.value))return;if(r&&s.test(l.value))return;let p=u.after,d=u.before;const h=l.loc.start.line-1,m=l.loc.end.line+1,v=function(t){let n=t;do{n=a.getTokenBefore(n,{includeComments:!0})}while(n&&e.isCommentToken(n));if(n&&e.isTokenOnSameLine(n,t))return!0;n=t;do{n=a.getTokenAfter(n,{includeComments:!0})}while(n&&e.isCommentToken(n));return!(!n||!e.isTokenOnSameLine(t,n))}(l),E=n.allowBlockStart&&function(e){return g(e,"ClassBody")||g(e,"BlockStatement")||g(e,"StaticBlock")||g(e,"SwitchCase")||g(e,"SwitchStatement")}(l)&&!(!1===n.allowClassStart&&_(l)),x=n.allowBlockEnd&&function(e){return y(e,"ClassBody")||y(e,"BlockStatement")||y(e,"StaticBlock")||y(e,"SwitchCase")||y(e,"SwitchStatement")}(l)&&!(!1===n.allowClassEnd&&b(l)),S=n.allowClassStart&&_(l),O=n.allowClassEnd&&b(l),T=n.allowObjectStart&&function(e){return g(e,"ObjectExpression")||g(e,"ObjectPattern")}(l),w=n.allowObjectEnd&&function(e){return y(e,"ObjectExpression")||y(e,"ObjectPattern")}(l),C=n.allowArrayStart&&function(e){return g(e,"ArrayExpression")||g(e,"ArrayPattern")}(l),A=n.allowArrayEnd&&function(e){return y(e,"ArrayExpression")||y(e,"ArrayPattern")}(l),P=E||S||T||C,k=x||O||w||A;if(h<1&&(d=!1),m>=c&&(p=!1),v)return;const D=a.getTokenBefore(l,{includeComments:!0}),R=a.getTokenAfter(l,{includeComments:!0});if(!P&&d&&!f.has(h)&&(!e.isCommentToken(D)||!e.isTokenOnSameLine(D,l))){const e=l.range[0]-l.loc.start.column,n=[e,e];t.report({node:l,messageId:"before",fix(e){return e.insertTextBeforeRange(n,"\n")}})}k||!p||f.has(m)||e.isCommentToken(R)&&e.isTokenOnSameLine(l,R)||t.report({node:l,messageId:"after",fix(e){return e.insertTextAfter(l,"\n")}})}return{Program(){u.forEach((e=>{"Line"===e.type?(n.beforeLineComment||n.afterLineComment)&&v(e,{after:n.afterLineComment,before:n.beforeLineComment}):"Block"===e.type?(n.beforeBlockComment||n.afterBlockComment)&&v(e,{after:n.afterBlockComment,before:n.beforeBlockComment}):"Shebang"===e.type&&n.afterHashbangComment&&v(e,{after:n.afterHashbangComment,before:!1})}))}}}},PA}function xk(){if(MA)return BA;MA=1;const e=Pw(),t=new Set(["Identifier","Super","ThisExpression"]);function n(t,n){return"Identifier"===t.type&&"undefined"===t.name?e.isReferenceToGlobalVariable(n,t):"UnaryExpression"===t.type&&"void"===t.operator&&"Literal"===t.argument.type&&0===t.argument.value}function r(e){return"Identifier"===e.type&&"undefined"!==e.name||"MemberExpression"===e.type}function i(t,i){const s="UnaryExpression"===t.type&&"!"===t.operator,o=s?t.argument:t;switch(!0){case r(o):return{reference:o,operator:s?"||":"&&"};case"UnaryExpression"===o.type&&"!"===o.operator&&r(o.argument):return{reference:o.argument,operator:"&&"};case function(t,n){return"CallExpression"===t.type&&"Boolean"===t.callee.name&&1===t.arguments.length&&e.isReferenceToGlobalVariable(n,t.callee)}(o,i)&&r(o.arguments[0]):return{reference:o.arguments[0],operator:s?"||":"&&"};case function(t,i){if("BinaryExpression"!==t.type||"=="!==t.operator)return!1;const s=r(t.left)?"left":"right",o="left"===s?"right":"left";return r(t[s])&&(e.isNullLiteral(t[o])||n(t[o],i))}(t,i):return{reference:r(t.left)?t.left:t.right,operator:"??"};case function(t,i){if(!function(e){return"LogicalExpression"===e.type&&"||"===e.operator&&"BinaryExpression"===e.left.type&&"==="===e.left.operator&&"BinaryExpression"===e.right.type&&"==="===e.right.operator}(t))return!1;const s=r(t.left.left)?"left":"right",o="left"===s?"right":"left",a=r(t.right.left)?"left":"right",l="left"===a?"right":"left";return e.isSameReference(t.left[s],t.right[a])&&(e.isNullLiteral(t.left[o])&&n(t.right[l],i)||n(t.left[o],i)&&e.isNullLiteral(t.right[l]))}(t,i):return{reference:r(t.left.left)?t.left.left:t.left.right,operator:"??"};default:return null}}function s(e){return"Program"!==e.type&&("WithStatement"===e.parent.type&&e.parent.body===e||s(e.parent))}return BA={meta:{type:"suggestion",docs:{description:"Require or disallow logical assignment operator shorthand",recommended:!1,url:"https://eslint.org/docs/latest/rules/logical-assignment-operators"},schema:{type:"array",oneOf:[{items:[{const:"always"},{type:"object",properties:{enforceForIfStatements:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{items:[{const:"never"}],minItems:1,maxItems:1}]},fixable:"code",hasSuggestions:!0,messages:{assignment:"Assignment (=) can be replaced with operator assignment ({{operator}}).",useLogicalOperator:"Convert this assignment to use the operator {{ operator }}.",logical:"Logical expression can be replaced with an assignment ({{ operator }}).",convertLogical:"Replace this logical expression with an assignment with the operator {{ operator }}.",if:"'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.",convertIf:"Replace this 'if' statement with a logical assignment with operator {{ operator }}.",unexpected:"Unexpected logical operator assignment ({{operator}}) shorthand.",separate:"Separate the logical assignment into an assignment with a logical operator."}},create(n){const o="never"===n.options[0]?"never":"always",a="always"===o&&n.options.length>1&&n.options[1].enforceForIfStatements,l=n.sourceCode,c=l.getScope(l.ast).isStrict;function u(e){return"Identifier"===e.type&&(c||!s(e))}function p(e){return!c&&s(e)?"Identifier"===e.type:"MemberExpression"===e.type&&t.has(e.object.type)&&(!e.computed||"MemberExpression"!==e.property.type&&"ChainExpression"!==e.property.type)}function d(e,t,n){return n?{...e,fix:t.fix}:{...e,suggest:[t]}}function f(e){return l.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator))}return"never"===o?{AssignmentExpression(t){if(!e.isLogicalAssignmentOperator(t.operator))return;const r={messageId:"unexpected",node:t,data:{operator:t.operator}},i={messageId:"separate",*fix(n){if(l.getCommentsInside(t).length>0)return;const r=f(t);yield n.replaceText(r,"=");const i=l.getText(t.left),s=t.operator.slice(0,-1);yield n.insertTextAfter(r,` ${i} ${s}`);const o=e.getPrecedence(t.right)<=e.getPrecedence({type:"LogicalExpression",operator:s}),a="??="===t.operator&&e.isLogicalExpression(t.right);e.isParenthesised(l,t.right)||!o&&!a||(yield n.insertTextBefore(t.right,"("),yield n.insertTextAfter(t.right,")"))}};n.report(d(r,i,u(t.left)))}}:{"AssignmentExpression[operator='='][right.type='LogicalExpression']"(t){const r=function(t,n){let r=n.left;for(;"LogicalExpression"===r.type&&r.operator===n.operator;){if(e.isParenthesised(t,r))return r;r=r.left}return r}(l,t.right);if(!e.isSameReference(t.left,r))return;const i={messageId:"assignment",node:t,data:{operator:`${t.right.operator}=`}},s={messageId:"useLogicalOperator",data:{operator:`${t.right.operator}=`},*fix(e){if(l.getCommentsInside(t).length>0)return;const n=f(t);yield e.insertTextBefore(n,t.right.operator);const i=f(r.parent),s=l.getTokenAfter(i);yield e.removeRange([r.parent.range[0],s.range[0]])}};n.report(d(i,s,u(t.left)))},'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(t){if(r(t.left)&&e.isSameReference(t.left,t.right.left)){const r={messageId:"logical",node:t,data:{operator:`${t.operator}=`}},i={messageId:"convertLogical",data:{operator:`${t.operator}=`},*fix(n){if(l.getCommentsInside(t).length>0)return;const r=e.getPrecedence(t.parent),i="ExpressionStatement"!==t.parent.type&&(-1===r||e.getPrecedence({type:"AssignmentExpression"})0)return;const n=l.getFirstToken(s),i=l.getTokenBefore(t);if(null!==i&&";"!==i.value&&"{"!==i.value&&"Identifier"!==n.type&&"Keyword"!==n.type)return;const o=f(s.expression);yield e.insertTextBefore(o,c.operator),yield e.removeRange([t.range[0],s.range[0]]),yield e.removeRange([s.range[1],t.range[1]]);const a=l.getTokenAfter(s.expression);r&&null!==a&&";"!==a.value&&(yield e.insertTextAfter(t,";"))}},o=u(c.reference)||"LogicalExpression"!==t.test.type&&p(c.reference);n.report(d(e,i,o))}}}}},BA}function Sk(){if(KA)return VA;KA=1;const e={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},t={anyOf:[e,{type:"integer",minimum:0}]};return VA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum line length",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-len"},schema:[t,t,e],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(e){const t=/[^:/?#]:\/\/[^?#]/u,n=e.sourceCode;const r=Object.assign({},e.options[e.options.length-1]);"number"==typeof e.options[0]&&(r.code=e.options[0]),"number"==typeof e.options[1]&&(r.tabWidth=e.options[1]);const i="number"==typeof r.code?r.code:80,s="number"==typeof r.tabWidth?r.tabWidth:4,o=!!r.ignoreComments,a=!!r.ignoreStrings,l=!!r.ignoreTemplateLiterals,c=!!r.ignoreRegExpLiterals,u=!!r.ignoreTrailingComments||!!r.ignoreComments,p=!!r.ignoreUrls,d=r.comments;let f=r.ignorePattern||null;function h(e,t,n){return n&&n.loc.start.line===t&&t<=n.loc.end.line&&(n.loc.end.line>t||n.loc.end.column===e.length)}function m(e,t){return e.slice(0,t.loc.start.column).replace(/\s+$/u,"")}function g(e){const t={};for(let s=0;s{const r=n.getNodeByRangeIndex(t.range[0]);!function(e){if(!e||!e.parent||"JSXEmptyExpression"!==e.type||"JSXExpressionContainer"!==e.parent.type)return!1;const t=e.parent;return t.loc.start.line===t.loc.end.line}(r)?e.push(t):e[e.length-1]!==r.parent&&e.push(r.parent)})),e}():[];let b=0;const v=g(n.ast.tokens.filter((e=>"String"===e.type||"JSXText"===e.type&&"JSXAttribute"===n.getNodeByRangeIndex(e.range[0]-1).type))),E=g(n.ast.tokens.filter((e=>"Template"===e.type))),x=g(n.ast.tokens.filter((e=>"RegularExpression"===e.type)));y.forEach(((n,g)=>{const y=g+1;let S,O=!1;if(b<_.length){let e=null;do{e=_[++b]}while(e&&e.loc.start.line<=y);if(e=_[--b],function(e,t,n){const r=n.loc.start,i=n.loc.end,s=!e.slice(0,n.loc.start.column).trim();return n&&(r.linet||i.line===t&&i.column===e.length)}(n,y,e))O=!0,S=n;else if(u&&h(n,y,e)){S=m(n,e);let t=b;for(;h(S,y,_[--t]);)S=m(S,_[t])}else S=n}else S=n;if(f&&f.test(S)||p&&t.test(S)||a&&v[y]||l&&E[y]||c&&x[y])return;const T=function(e,t){let n=0;return e.replace(/\t/gu,((e,r)=>{n+=t-(t?(r+n)%t:0)-1})),Array.from(e).length+n}(S,s),w=O&&d;if(O&&o)return;const C={start:{line:y,column:0},end:{line:y,column:S.length}};w?T>d&&e.report({node:r,loc:C,messageId:"maxComment",data:{lineLength:T,maxCommentLength:d}}):T>i&&e.report({node:r,loc:C,messageId:"max",data:{lineLength:T,maxLength:i}})}))}}}},VA}function Ok(){if($A)return WA;$A=1;const e=Pw();return WA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"}},additionalProperties:!1}]}],messages:{exceed:"File has too many lines ({{actual}}). Maximum allowed is {{max}}."}},create(t){const n=t.options[0];let r=300;"object"==typeof n&&Object.prototype.hasOwnProperty.call(n,"max")?r=n.max:"number"==typeof n&&(r=n);const i=n&&n.skipComments,s=n&&n.skipBlankLines,o=t.sourceCode;function a(e){return e&&("Block"===e.type||"Line"===e.type)}function l(t){let n,r=t.loc.start.line,i=t.loc.end.line;n=t;do{n=o.getTokenBefore(n,{includeComments:!0})}while(a(n));n&&e.isTokenOnSameLine(n,t)&&(r+=1),n=t;do{n=o.getTokenAfter(n,{includeComments:!0})}while(a(n));return n&&e.isTokenOnSameLine(t,n)&&(i-=1),r<=i?function(e,t){return[...Array(t-e).keys()].map((t=>t+e))}(r,i+1):[]}return{"Program:exit"(){let e=o.lines.map(((e,t)=>({lineNumber:t+1,text:e})));if(e.length>1&&""===e[e.length-1].text&&e.pop(),s&&(e=e.filter((e=>""!==e.text.trim()))),i){const t=o.getAllComments(),n=new Set(t.flatMap(l));e=e.filter((e=>!n.has(e.lineNumber)))}if(e.length>r){const n={start:{line:e[r].lineNumber,column:0},end:{line:o.lines.length,column:o.lines[o.lines.length-1].length}};t.report({loc:n,messageId:"exceed",data:{max:r,actual:e.length}})}}}}},WA}function Tk(){if(QA)return qA;QA=1;const e=Pw(),{upperCaseFirst:t}=tk();return qA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of lines of code in a function",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-lines-per-function"},schema:[{oneOf:[{type:"object",properties:{max:{type:"integer",minimum:0},skipComments:{type:"boolean"},skipBlankLines:{type:"boolean"},IIFEs:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:1}]}],messages:{exceed:"{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}."}},create(n){const r=n.sourceCode,i=r.lines,s=n.options[0];let o=50,a=!1,l=!1,c=!1;"object"==typeof s?(o="number"==typeof s.max?s.max:50,a=!!s.skipComments,l=!!s.skipBlankLines,c=!!s.IIFEs):"number"==typeof s&&(o=s);const u=function(e){const t=new Map;return e.forEach((e=>{for(let n=e.loc.start.line;n<=e.loc.end.line;n++)t.set(n,e)})),t}(r.getAllComments());function p(e,t,n){const r=n.loc.start,i=n.loc.end,s=r.line===t&&!e.slice(0,r.column).trim(),o=i.line===t&&!e.slice(i.column).trim();return n&&(r.linet||o)}function d(r){const s=function(e){return!!e.parent&&e===e.parent.value&&("MethodDefinition"===e.parent.type||"Property"===e.parent.type&&(!0===e.parent.method||"get"===e.parent.kind||"set"===e.parent.kind))}(r)?r.parent:r;if(!c&&function(e){return("FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)&&e.parent&&"CallExpression"===e.parent.type&&e.parent.callee===e}(s))return;let d=0;for(let e=s.loc.start.line-1;eo){const i=t(e.getFunctionNameWithKind(r));n.report({node:s,messageId:"exceed",data:{name:i,lineCount:d,maxLines:o}})}}return{FunctionDeclaration:d,FunctionExpression:d,ArrowFunctionExpression:d}}},qA}function wk(){if(eP)return JA;eP=1;const e=Pw();return JA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements-per-line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=void 0!==r.max?r.max:1;let s,o=0,a=0;const l=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function c(){s&&t.report({node:s,messageId:"exceed",data:{numberOfStatementsOnThisLine:a,maxStatementsPerLine:i,statements:1===a?"statement":"statements"}}),s=null}function u(e){const t=e.loc.start.line;l.test(e.parent.type)&&e.parent.alternate!==e||(t===o?a+=1:(c(),a=1,o=t),a===i+1&&(s=s||e))}function p(t){const r=function(t){return n.getLastToken(t,e.isNotSemicolonToken)}(t).loc.end.line;r!==o&&(c(),a=1,o=r)}return{BreakStatement:u,ClassDeclaration:u,ContinueStatement:u,DebuggerStatement:u,DoWhileStatement:u,ExpressionStatement:u,ForInStatement:u,ForOfStatement:u,ForStatement:u,FunctionDeclaration:u,IfStatement:u,ImportDeclaration:u,LabeledStatement:u,ReturnStatement:u,SwitchStatement:u,ThrowStatement:u,TryStatement:u,VariableDeclaration:u,WhileStatement:u,WithStatement:u,ExportNamedDeclaration:u,ExportDefaultDeclaration:u,ExportAllDeclaration:u,"BreakStatement:exit":p,"ClassDeclaration:exit":p,"ContinueStatement:exit":p,"DebuggerStatement:exit":p,"DoWhileStatement:exit":p,"ExpressionStatement:exit":p,"ForInStatement:exit":p,"ForOfStatement:exit":p,"ForStatement:exit":p,"FunctionDeclaration:exit":p,"IfStatement:exit":p,"ImportDeclaration:exit":p,"LabeledStatement:exit":p,"ReturnStatement:exit":p,"SwitchStatement:exit":p,"ThrowStatement:exit":p,"TryStatement:exit":p,"VariableDeclaration:exit":p,"WhileStatement:exit":p,"WithStatement:exit":p,"ExportNamedDeclaration:exit":p,"ExportDefaultDeclaration:exit":p,"ExportAllDeclaration:exit":p,"Program:exit":c}}},JA}function Ck(){if(nP)return tP;nP=1;const e=Pw();return tP={meta:{type:"suggestion",docs:{description:"Enforce a particular style for multiline comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-comment-style"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"]}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"]},{type:"object",properties:{checkJSDoc:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(t){const n=t.sourceCode,r=t.options[0]||"starred-block",i=!!(t.options[1]||{}).checkJSDoc;function s([t]){if("Block"!==t.type)return!1;const n=t.value.split(e.LINEBREAK_MATCHER);return n.length>0&&n.every(((e,t)=>(0===t||t===n.length-1?/^\s*$/u:/^\s*\*/u).test(e)))}function o([t]){if("Block"!==t.type)return!1;const n=t.value.split(e.LINEBREAK_MATCHER);return/^\*\s*$/u.test(n[0])&&n.slice(1,-1).every((e=>/^\s* /u.test(e)))&&/^\s*$/u.test(n[n.length-1])}function a(t){const[r]=t;return"Line"===r.type?function(e){const t=e.map((({value:e})=>e)).filter((e=>e.trim().length)).every((e=>e.startsWith(" ")));return e.map((({value:e})=>t?e.replace(/^ /u,""):e))}(t):s(t)?function(t){const n=t.value.split(e.LINEBREAK_MATCHER).filter(((e,t,n)=>!(0===t||t===n.length-1))).map((e=>e.replace(/^\s*$/u,""))),r=n.map((e=>e.replace(/\s*\*/u,""))).filter((e=>e.trim().length)).every((e=>e.startsWith(" ")));return n.map((e=>e.replace(r?/\s*\* ?/u:/\s*\*/u,"")))}(r):function(t){const r=t.value.split(e.LINEBREAK_MATCHER).map((e=>e.replace(/^\s*$/u,""))),i=`${n.text.slice(t.range[0]-t.loc.start.column,t.range[0])} `;let s="";for(const[e,t]of r.entries()){if(!t.trim().length||0===e)continue;const[,n]=t.match(/^(\s*\*?\s*)/u);if(n.lengths.length&&(s=e)}}return r.map((e=>{const t=e.match(/^(\s*\*?\s*)(.*)/u),[,n,r]=t;return n.length>i.length?`${n.slice(i.length-(s.length+n.length))}${r}`:n.lengthe.includes("*/"))))if(r.length>1)t.report({loc:{start:i.loc.start,end:r[r.length-1].loc.end},messageId:"expectedBlock",fix(e){const t=[i.range[0],r[r.length-1].range[1]];return s.some((e=>e.startsWith("/")))?null:e.replaceTextRange(t,function(e,t){const n=l(e);return`/*\n${t.map((e=>`${n} * ${e}`)).join("\n")}\n${n} */`}(i,s))}});else{const r=i.value.split(e.LINEBREAK_MATCHER),s=`${l(i)} *`;if(!/^\*?\s*$/u.test(r[0])){const e=i.value.startsWith("*")?i.range[0]+1:i.range[0];t.report({loc:{start:i.loc.start,end:{line:i.loc.start.line,column:i.loc.start.column+2}},messageId:"startNewline",fix:t=>t.insertTextAfterRange([e,e+2],`\n${s}`)})}/^\s*$/u.test(r[r.length-1])||t.report({loc:{start:{line:i.loc.end.line,column:i.loc.end.column-2},end:i.loc.end},messageId:"endNewline",fix:e=>e.replaceTextRange([i.range[1]-2,i.range[1]],`\n${s}/`)});for(let e=i.loc.start.line+1;e<=i.loc.end.line;e++){const o=n.lines[e-1],a=/^\s*\*/u.test(o)?"alignment":"missingStar";o.startsWith(s)||t.report({loc:{start:{line:e,column:0},end:{line:e,column:o.length}},messageId:a,fix(t){const l=n.getIndexFromLoc({line:e,column:0});if("alignment"===a){const[,e=""]=o.match(/^(\s*\*)/u)||[],n=l+e.length;return t.replaceTextRange([l,n],s)}const[,c=""]=o.match(/^(\s*)/u)||[],u=l+c.length;let p;for(const[e,t]of r.entries()){if(!/\S+/u.test(t))continue;const r=n.lines[i.loc.start.line-1+e],[,s="",a=""]=r.match(/^(\s*(?:\/?\*)?(\s*))/u)||[];p=`${c.slice(s.length)}${a}`,/^\s*\//u.test(o)&&0===p.length&&(p+=" ");break}return t.replaceTextRange([l,u],`${s}${p}`)}})}}},"separate-lines"(e){const[r]=e,s=o(e);if("Block"!==r.type||!i&&s)return;let c=a(e);s&&(c=c.slice(1,c.length-1));const u=n.getTokenAfter(r,{includeComments:!0});u&&r.loc.end.line===u.loc.start.line||t.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+2}},messageId:"expectedLines",fix(e){return e.replaceText(r,function(e,t){return t.map((e=>`// ${e}`)).join(`\n${l(e)}`)}(r,c))}})},"bare-block"(e){if(o(e))return;const[n]=e,r=a(e);"Line"===n.type&&r.length>1&&!r.some((e=>e.includes("*/")))&&t.report({loc:{start:n.loc.start,end:e[e.length-1].loc.end},messageId:"expectedBlock",fix(t){return t.replaceTextRange([n.range[0],e[e.length-1].range[1]],c(n,r))}}),s(e)&&t.report({loc:{start:n.loc.start,end:{line:n.loc.start.line,column:n.loc.start.column+2}},messageId:"expectedBareBlock",fix(e){return e.replaceText(n,c(n,r))}})}};return{Program(){return n.getAllComments().filter((e=>"Shebang"!==e.type)).filter((t=>!e.COMMENTS_IGNORE_PATTERN.test(t.value))).filter((e=>{const t=n.getTokenBefore(e,{includeComments:!0});return!t||t.loc.end.line{const s=n.getTokenBefore(t,{includeComments:!0});return"Line"===t.type&&r&&"Line"===i[r-1].type&&s&&s.loc.end.line===t.loc.start.line-1&&s===i[r-1]?e[e.length-1].push(t):e.push([t]),e}),[]).filter((e=>!(1===e.length&&e[0].loc.start.line===e[0].loc.end.line))).forEach(u[r])}}}},tP}function Ak(){if(oP)return sP;oP=1;const e=Pw(),t=["Array","Boolean","Date","Error","Function","Number","Object","RegExp","String","Symbol","BigInt"];function n(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)&&!Array.isArray(e[t]))throw new TypeError(`${t}, if provided, must be an Array`);return e[t]||n}function r(e,t){return e[t]=!0,e}return sP={meta:{type:"suggestion",docs:{description:"Require constructor names to begin with a capital letter",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-cap"},schema:[{type:"object",properties:{newIsCap:{type:"boolean",default:!0},capIsNew:{type:"boolean",default:!0},newIsCapExceptions:{type:"array",items:{type:"string"}},newIsCapExceptionPattern:{type:"string"},capIsNewExceptions:{type:"array",items:{type:"string"}},capIsNewExceptionPattern:{type:"string"},properties:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{upper:"A function with a name starting with an uppercase letter should only be used as a constructor.",lower:"A constructor name should not start with a lowercase letter."}},create(i){const s=Object.assign({},i.options[0]);s.newIsCap=!1!==s.newIsCap,s.capIsNew=!1!==s.capIsNew;const o=!1===s.properties,a=n(s,"newIsCapExceptions",[]).reduce(r,{}),l=s.newIsCapExceptionPattern?new RegExp(s.newIsCapExceptionPattern,"u"):null,c=function(e){let i=n(e,"capIsNewExceptions",t);return i!==t&&(i=i.concat(t)),i.reduce(r,{})}(s),u=s.capIsNewExceptionPattern?new RegExp(s.capIsNewExceptionPattern,"u"):null,p={},d=i.sourceCode;function f(t){return"Identifier"===t.callee.type?t.callee.name:e.getStaticPropertyName(t.callee)||""}function h(e){const t=e.charAt(0),n=t.toLowerCase();return n===t.toUpperCase()?"non-alpha":t===n?"lower":"upper"}function m(t,n,r,i){const s=d.getText(n.callee);if(t[r]||t[s])return!0;if(i&&i.test(s))return!0;const a=e.skipChainExpression(n.callee);return"UTC"===r&&"MemberExpression"===a.type?"Identifier"===a.object.type&&"Date"===a.object.name:o&&"MemberExpression"===a.type}function g(t,n){let r=e.skipChainExpression(t.callee);"MemberExpression"===r.type&&(r=r.property),i.report({node:t,loc:r.loc,messageId:n})}return s.newIsCap&&(p.NewExpression=function(e){const t=f(e);if(t){"lower"!==h(t)||m(a,e,t,l)||g(e,"lower")}}),s.capIsNew&&(p.CallExpression=function(e){const t=f(e);if(t){"upper"!==h(t)||m(c,e,t,u)||g(e,"upper")}}),p}},sP}function Pk(){if(uP)return cP;uP=1;const e=Pw();return cP={meta:{type:"layout",docs:{description:"Require or disallow an empty line after variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-after-var"},schema:[{enum:["never","always"]}],fixable:"whitespace",messages:{expected:"Expected blank line after variable declarations.",unexpected:"Unexpected blank line after variable declarations."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(t){const n=t.sourceCode,r="never"===t.options[0]?"never":"always",i=n.getAllComments().reduce(((e,t)=>(e[t.loc.start.line]=t.loc.end.line,e)),{});function s(e){const t=i[e];return i[t+1]?s(t+1):t}return{VariableDeclaration:function(o){const a=function(e){const t=n.getLastToken(e);if("Punctuator"===t.type&&";"===t.value){const e=n.getTokenBefore(t);if(e.loc.end.line!==t.loc.start.line)return e}return t}(o),l=a===n.getLastToken(o)?n.getTokenAfter(o):n.getLastToken(o),c=a.loc.end.line+1;if(!l)return;if(function(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}(o.parent.type))return;if("ExportNamedDeclaration"===(u=o.parent.type)||"ExportSpecifier"===u||"ExportDefaultDeclaration"===u||"ExportAllDeclaration"===u)return;var u;if("Keyword"===l.type&&function(e){return"var"===e||"let"===e||"const"===e}(l.value))return;if(function(e){const t=n.getTokenAfter(e);return!t||"Punctuator"===t.type&&"}"===t.value}(o))return;const p=l.loc.start.line>c,d=void 0!==i[c];var f;"never"===r&&p&&!d&&t.report({node:o,messageId:"unexpected",fix(t){const r=n.getText().slice(a.range[1],l.range[0]).split(e.LINEBREAK_MATCHER);return t.replaceTextRange([a.range[1],l.range[0]],`${r.slice(0,-1).join("")}\n${r[r.length-1]}`)}}),"always"!==r||p&&(!d||(f=c,l.loc.start.line>s(f)+1))||t.report({node:o,messageId:"expected",fix(e){return(p?s(c):a.loc.end.line)===l.loc.start.line?e.insertTextBefore(l,"\n\n"):e.insertTextBeforeRange([l.range[0]-l.loc.start.column,l.range[1]],"\n")}})}}}},cP}function kk(){return dP||(dP=1,pP={meta:{type:"layout",docs:{description:"Require an empty line before `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-before-return"},fixable:"whitespace",schema:[],messages:{expected:"Expected newline before return statement."},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(e){const t=e.sourceCode;function n(e,n){const r=t.getTokenBefore(e);return n.includes(r.value)}function r(e){const n=e.loc.start.line,r=function(e){const n=t.getTokenBefore(e);let r;return r=n?n.loc.end.line:0,r}(e),i=function(e,n){const r=t.getCommentsBefore(e);let i=0;return r.length?(r.forEach((t=>{i++,"Block"===t.type&&(i+=t.loc.end.line-t.loc.start.line),t.loc.start.line===n&&i--,t.loc.end.line===e.loc.start.line&&i--})),i):i}(e,r);return n-r-i>1}return{ReturnStatement(i){(function(e){const t=e.parent.type;return e.parent.body?Array.isArray(e.parent.body)?e.parent.body[0]===e:e.parent.body===e:n(e,"IfStatement"===t?["else",")"]:"DoWhileStatement"===t?["do"]:"SwitchCase"===t?[":"]:[")"])})(i)||r(i)||e.report({node:i,messageId:"expected",fix(e){if(function(e){const n=t.getCommentsBefore(e),r=n[n.length-1],i=t.getTokenBefore(e);return 0===n.length||r.loc.end.line===i.loc.end.line&&r.loc.end.line!==e.loc.start.line}(i)){const n=t.getTokenBefore(i),r=i.loc.start.line===n.loc.end.line?"\n\n":"\n";return e.insertTextBefore(i,r)}return null}})}}}}),pP}function Dk(){if(gP)return mP;gP=1;const{getStaticPropertyName:e,getVariableByName:t,skipChainExpression:n}=Pw();function r(e){return/^(alert|confirm|prompt)$/u.test(e)}function i(e,t){const n=function(e,t){const n=e.references.filter((e=>e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]));return 1===n.length?n[0]:null}(e,t);return n&&n.resolved&&n.resolved.defs.length>0}return mP={meta:{type:"suggestion",docs:{description:"Disallow the use of `alert`, `confirm`, and `prompt`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-alert"},schema:[],messages:{unexpected:"Unexpected {{name}}."}},create(s){const o=s.sourceCode;return{CallExpression(a){const l=n(a.callee),c=o.getScope(a);if("Identifier"===l.type){const e=l.name;!i(c,l)&&r(l.name)&&s.report({node:a,messageId:"unexpected",data:{name:e}})}else if("MemberExpression"===l.type&&function(e,n){return"global"===e.type&&"ThisExpression"===n.type||!("Identifier"!==n.type||!("window"===n.name||"globalThis"===n.name&&t(e,"globalThis")))&&!i(e,n)}(c,l.object)){const t=e(l);r(t)&&s.report({node:a,messageId:"unexpected",data:{name:t}})}}}}},mP}function Rk(){if(_P)return yP;_P=1;const{getVariableByName:e,isClosingParenToken:t,isOpeningParenToken:n,isStartOfExpressionStatement:r,needsPrecedingSemicolon:i}=Pw();return yP={meta:{type:"suggestion",docs:{description:"Disallow `Array` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-array-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The array literal notation [] is preferable.",useLiteral:"Replace with an array literal.",useLiteralAfterSemicolon:"Replace with an array literal, add preceding semicolon."}},create(s){const o=s.sourceCode;function a(a){if("Identifier"!==a.callee.type||"Array"!==a.callee.name||1===a.arguments.length&&"SpreadElement"!==a.arguments[0].type)return;const l=e(o.getScope(a),"Array");if(l&&0===l.identifiers.length){const e=function(e){const r=o.getLastToken(e);if(!t(r))return"";let i=e.callee;do{if(i=o.getTokenAfter(i),!i||i===r)return""}while(!n(i));return o.text.slice(i.range[1],r.range[0])}(a);let l,c;r(a)&&i(o,a)?(l=`;[${e}]`,c="useLiteralAfterSemicolon"):(l=`[${e}]`,c="useLiteral"),s.report({node:a,messageId:"preferLiteral",suggest:[{messageId:c,fix:e=>e.replaceText(a,l)}]})}}return{CallExpression:a,NewExpression:a}}},yP}function Ik(){if(OP)return SP;OP=1;const e=["^","|","&","<<",">>",">>>","^=","|=","&=","<<=",">>=",">>>=","~"];return SP={meta:{type:"suggestion",docs:{description:"Disallow bitwise operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-bitwise"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:e},uniqueItems:!0},int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected use of '{{operator}}'."}},create(t){const n=t.options[0]||{},r=n.allow||[],i=!0===n.int32Hint;function s(n){!function(t){return e.includes(t.operator)}(n)||function(e){return r.includes(e.operator)}(n)||function(e){return i&&"|"===e.operator&&e.right&&"Literal"===e.right.type&&0===e.right.value}(n)||function(e){t.report({node:e,messageId:"unexpected",data:{operator:e.operator}})}(n)}return{AssignmentExpression:s,BinaryExpression:s,UnaryExpression:s}}},SP}function Lk(){if(RP)return DP;RP=1;const e=Pw();return DP={meta:{type:"suggestion",docs:{description:"Disallow `catch` clause parameters from shadowing variables in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-catch-shadow"},replacedBy:["no-shadow"],deprecated:!0,schema:[],messages:{mutable:"Value of '{{name}}' may be overwritten in IE 8 and earlier."}},create(t){const n=t.sourceCode;return{"CatchClause[param!=null]"(r){let i=n.getScope(r);i.block===r&&(i=i.upper),function(t,n){return null!==e.getVariableByName(t,n)}(i,r.param.name)&&t.report({node:r,messageId:"mutable",data:{name:r.param.name}})}}}},DP}function Bk(){if(NP)return jP;NP=1;const e=Pw(),t=new Set(["IfStatement","WhileStatement","DoWhileStatement","ForStatement","ConditionalExpression"]),n={DoWhileStatement:"a 'do...while' statement",ForStatement:"a 'for' statement",IfStatement:"an 'if' statement",WhileStatement:"a 'while' statement"};return jP={meta:{type:"problem",docs:{description:"Disallow assignment operators in conditional expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-cond-assign"},schema:[{enum:["except-parens","always"]}],messages:{unexpected:"Unexpected assignment within {{type}}.",missing:"Expected a conditional expression and instead saw an assignment."}},create(r){const i=r.options[0]||"except-parens",s=r.sourceCode;function o(e){return e.parent&&t.has(e.parent.type)&&e===e.parent.test}function a(t){!t.test||"AssignmentExpression"!==t.test.type||("ForStatement"===t.type?e.isParenthesised(s,t.test):function(t){const n=s.getTokenBefore(t,1),r=s.getTokenAfter(t,1);return e.isParenthesised(s,t)&&n&&e.isOpeningParenToken(n)&&n.range[1]<=t.range[0]&&e.isClosingParenToken(r)&&r.range[0]>=t.range[1]}(t.test))||r.report({node:t.test,messageId:"missing"})}return"always"===i?{AssignmentExpression:function(t){const i=function(t){let n=t;do{if(o(n))return n.parent}while((n=n.parent)&&!e.isFunction(n));return null}(t);i&&r.report({node:t,messageId:"unexpected",data:{type:n[i.type]||i.type}})}}:{DoWhileStatement:a,ForStatement:a,IfStatement:a,WhileStatement:a,ConditionalExpression:a}}},jP}function Mk(){if(KP)return VP;KP=1;const e=Pw();return VP={meta:{type:"suggestion",docs:{description:"Disallow the use of `console`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-console"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],hasSuggestions:!0,messages:{unexpected:"Unexpected console statement.",removeConsole:"Remove the console.{{ propertyName }}()."}},create(t){const n=(t.options[0]||{}).allow||[],r=t.sourceCode;function i(e){const t=e.identifier;return t&&"console"===t.name}function s(t){const r=t.identifier,i=r.parent;return"MemberExpression"===i.type&&i.object===r&&!function(t){const r=e.getStaticPropertyName(t);return r&&n.includes(r)}(i)}function o(t){return"CallExpression"===t.parent.type&&t.parent.callee===t&&"ExpressionStatement"===t.parent.parent.type&&e.STATEMENT_LIST_PARENTS.has(t.parent.parent.parent.type)&&!function(e){const t=r.getTokenBefore(e),n=r.getTokenAfter(e);return Boolean(n)&&/^[-[(/+`]/u.test(n.value)&&"++"!==n.value&&"--"!==n.value&&Boolean(t)&&!/^[:;{]$/u.test(t.value)}(t.parent.parent)}function a(n){const r=n.identifier.parent,i=e.getStaticPropertyName(r);t.report({node:r,loc:r.loc,messageId:"unexpected",suggest:o(r)?[{messageId:"removeConsole",data:{propertyName:i},fix(e){return e.remove(r.parent.parent)}}]:[]})}return{"Program:exit"(t){const n=r.getScope(t),o=e.getVariableByName(n,"console"),l=o&&o.defs.length>0,c=o?o.references:n.through.filter(i);l||c.filter(s).forEach(a)}}}},VP}function jk(){if(QP)return qP;QP=1;const e=Bx(),{isNullLiteral:t,isConstant:n,isReferenceToGlobalVariable:r,isLogicalAssignmentOperator:i}=Pw(),s=new Set(["+","-","*","/","%","|","^","&","**","<<",">>",">>>"]);function o(e,n){return t(n)||"Identifier"===n.type&&"undefined"===n.name&&r(e,n)||"UnaryExpression"===n.type&&"void"===n.operator}function a(e,t,n){if(n&&o(e,t))return!1;switch(t.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"Literal":case"TemplateLiteral":case"UpdateExpression":case"BinaryExpression":case"UnaryExpression":return!0;case"CallExpression":{if("Identifier"!==t.callee.type)return!1;const n=t.callee.name;return("Boolean"===n||"String"===n||"Number"===n)&&r(e,t.callee)}case"LogicalExpression":return"??"===t.operator&&a(e,t.right,!0);case"AssignmentExpression":return"="===t.operator?a(e,t.right,n):!i(t.operator);case"SequenceExpression":return a(e,t.expressions[t.expressions.length-1],n);case"Identifier":return"undefined"===t.name&&r(e,t);default:return!1}}function l(e,t){switch(t.type){case"Literal":return"boolean"==typeof t.value;case"CallExpression":return"Identifier"===t.callee.type&&"Boolean"===t.callee.name&&r(e,t.callee)&&(0===t.arguments.length||n(e,t.arguments[0],!0));case"UnaryExpression":return"!"===t.operator&&n(e,t.argument,!0);default:return!1}}function c(e,t){switch(t.type){case"ObjectExpression":case"ClassExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"Literal":return!0;case"ArrayExpression":{const e=t.elements.filter((e=>null!==e&&"SpreadElement"!==e.type));return 0===t.elements.length||e.length>1}case"UnaryExpression":return"void"===t.operator||"typeof"===t.operator||"!"===t.operator&&n(e,t.argument,!0);case"NewExpression":case"JSXElement":case"JSXFragment":default:return!1;case"CallExpression":return!("Identifier"!==t.callee.type||"Boolean"!==t.callee.name||!r(e,t.callee))&&(0===t.arguments.length||n(e,t.arguments[0],!0));case"Identifier":return"undefined"===t.name&&r(e,t);case"TemplateLiteral":return 0===t.expressions.length;case"AssignmentExpression":return"="===t.operator&&c(e,t.right);case"SequenceExpression":return c(e,t.expressions[t.expressions.length-1])}}function u(e,t){switch(t.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":case"TemplateLiteral":case"Literal":case"UpdateExpression":return!0;case"BinaryExpression":return s.has(t.operator);case"UnaryExpression":return"delete"!==t.operator&&("!"!==t.operator||n(e,t.argument,!0));case"SequenceExpression":return u(e,t.expressions[t.expressions.length-1]);case"Identifier":return"undefined"===t.name&&r(e,t);case"AssignmentExpression":return"="===t.operator?u(e,t.right):!i(t.operator);case"CallExpression":{if("Identifier"!==t.callee.type)return!1;const i=t.callee.name;return!("String"!==i&&"Number"!==i||!r(e,t.callee))||!("Boolean"!==i||!r(e,t.callee))&&(0===t.arguments.length||n(e,t.arguments[0],!0))}default:return!1}}function p(t,n){switch(n.type){case"ObjectExpression":case"ArrayExpression":case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":return!0;case"NewExpression":return"Identifier"===n.callee.type&&(Object.hasOwnProperty.call(e.builtin,n.callee.name)&&r(t,n.callee));case"Literal":return"object"==typeof n.regex;case"SequenceExpression":return p(t,n.expressions[n.expressions.length-1]);case"AssignmentExpression":return"="===n.operator&&p(t,n.right);case"ConditionalExpression":return p(t,n.consequent)&&p(t,n.alternate);default:return!1}}function d(e,t,n,r){if("=="===r||"!="===r){if(o(e,t)&&a(e,n,!1)||l(e,t)&&c(e,n))return n}else if(("==="===r||"!=="===r)&&(o(e,t)&&a(e,n,!1)||l(e,t)&&u(e,n)))return n;return null}return qP={meta:{type:"problem",docs:{description:"Disallow expressions where the operation doesn't affect the value",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constant-binary-expression"},schema:[],messages:{constantBinaryOperand:"Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.",constantShortCircuit:"Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.",alwaysNew:"Unexpected comparison to newly constructed object. These two values can never be equal.",bothAlwaysNew:"Unexpected comparison of two newly constructed objects. These two values can never be equal."}},create(e){const t=e.sourceCode;return{LogicalExpression(r){const{operator:i,left:s}=r,o=t.getScope(r);"&&"!==i&&"||"!==i||!n(o,s,!0)?"??"===i&&a(o,s,!1)&&e.report({node:s,messageId:"constantShortCircuit",data:{property:"nullishness",operator:i}}):e.report({node:s,messageId:"constantShortCircuit",data:{property:"truthiness",operator:i}})},BinaryExpression(n){const r=t.getScope(n),{right:i,left:s,operator:o}=n,a=d(r,s,i,o),l=d(r,i,s,o);a?e.report({node:a,messageId:"constantBinaryOperand",data:{operator:o,otherSide:"left"}}):l?e.report({node:l,messageId:"constantBinaryOperand",data:{operator:o,otherSide:"right"}}):"==="===o||"!=="===o?p(r,s)?e.report({node:s,messageId:"alwaysNew"}):p(r,i)&&e.report({node:i,messageId:"alwaysNew"}):"=="!==o&&"!="!==o||p(r,s)&&p(r,i)&&e.report({node:s,messageId:"bothAlwaysNew"})}}}},qP}function Nk(){if(XP)return zP;XP=1;const{isConstant:e}=Pw();return zP={meta:{type:"problem",docs:{description:"Disallow constant expressions in conditions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-constant-condition"},schema:[{type:"object",properties:{checkLoops:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected constant condition."}},create(t){const n=!1!==(t.options[0]||{}).checkLoops,r=[],i=t.sourceCode;let s=new Set;function o(e){s.has(e)&&(s.delete(e),t.report({node:e.test,messageId:"unexpected"}))}function a(n){n.test&&e(i.getScope(n),n.test,!0)&&t.report({node:n.test,messageId:"unexpected"})}function l(){r.push(s),s=new Set}function c(){s=r.pop()}function u(t){n&&function(t){t.test&&e(i.getScope(t),t.test,!0)&&s.add(t)}(t)}return{ConditionalExpression:a,IfStatement:a,WhileStatement:u,"WhileStatement:exit":o,DoWhileStatement:u,"DoWhileStatement:exit":o,ForStatement:u,"ForStatement > .test":e=>u(e.parent),"ForStatement:exit":o,FunctionDeclaration:l,"FunctionDeclaration:exit":c,FunctionExpression:l,"FunctionExpression:exit":c,YieldExpression:()=>s.clear()}}},zP}var Fk,Uk,Vk,Kk,Wk,$k,qk,Qk,zk,Xk,Gk,Zk,Hk,Yk,Jk,eD,tD,nD,rD,iD,sD,oD,aD,lD,cD,uD,pD,dD,fD,hD,mD,gD,yD,_D,bD,vD,ED,xD,SD,OD,TD,wD,CD,AD,PD,kD,DD,RD,ID,LD,BD,MD,jD,ND,FD,UD,VD,KD,WD,$D,qD,QD,zD,XD,GD,ZD,HD,YD,JD,eR,tR,nR,rR,iR,sR,oR,aR,lR,cR,uR,pR,dR,fR,hR,mR,gR,yR,_R,bR,vR,ER,xR,SR,OR,TR,wR,CR,AR,PR,kR,DR,RR,IR,LR,BR,MR,jR,NR,FR,UR,VR,KR,WR,$R,qR,QR,zR,XR,GR,ZR,HR,YR,JR,eI,tI,nI,rI,iI,sI,oI,aI,lI,cI,uI,pI,dI,fI,hI,mI,gI,yI,_I,bI,vI,EI,xI,SI,OI,TI,wI,CI,AI,PI,kI,DI,RI,II,LI,BI,MI,jI,NI,FI,UI,VI,KI,WI,$I,qI,QI,zI,XI,GI,ZI,HI,YI,JI,eL,tL,nL,rL,iL,sL,oL,aL,lL,cL,uL,pL,dL,fL,hL,mL,gL,yL,_L,bL,vL,EL,xL,SL,OL,TL,wL,CL,AL,PL,kL,DL,RL,IL,LL,BL,ML,jL,NL,FL,UL,VL,KL,WL,$L,qL,QL,zL,XL,GL,ZL,HL,YL,JL,eB,tB,nB,rB,iB,sB,oB,aB,lB,cB,uB,pB,dB,fB,hB,mB,gB,yB,_B,bB,vB,EB,xB,SB,OB,TB,wB,CB,AB,PB,kB,DB,RB,IB,LB,BB,MB,jB,NB,FB,UB,VB,KB,WB,$B,qB,QB,zB,XB,GB,ZB,HB,YB,JB,eM,tM,nM,rM,iM,sM,oM,aM,lM,cM,uM,pM,dM,fM,hM,mM,gM,yM,_M,bM,vM,EM,xM,SM,OM,TM,wM,CM,AM,PM,kM,DM,RM,IM,LM,BM,MM,jM,NM,FM,UM,VM,KM,WM,$M,qM,QM,zM,XM,GM,ZM,HM,YM,JM,ej,tj,nj,rj,ij,sj,oj,aj,lj,cj,uj,pj,dj,fj,hj,mj,gj,yj,_j,bj,vj,Ej,xj,Sj,Oj={};function Tj(){if(Fk)return Oj;Fk=1,Object.defineProperty(Oj,"__esModule",{value:!0});var e=Object.freeze({__proto__:null});let t,n;function r(e){return!(e<48)&&(e<58||!(e<65)&&(e<91||(95===e||!(e<97)&&(e<123||(i(e)||function(e){return s(e,null!=n?n:n=o("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r g0 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 n7q 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 ji 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n"))}(e))))))}function i(e){return s(e,null!=t?t:t=o("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk 2e8 f1 15v 3t6 6 38f"))}function s(e,t){let n=0,r=t.length/2|0,i=0,s=0,o=0;for(;no))return!0;n=i+1}return!1}function o(e){let t=0;return e.split(" ").map((e=>t+=0|parseInt(e,36)))}class a{constructor(e,t,n,r,i,s,o){this._raw2018=e,this._raw2019=t,this._raw2020=n,this._raw2021=r,this._raw2022=i,this._raw2023=s,this._raw2024=o}get es2018(){var e;return null!==(e=this._set2018)&&void 0!==e?e:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var e;return null!==(e=this._set2019)&&void 0!==e?e:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var e;return null!==(e=this._set2020)&&void 0!==e?e:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var e;return null!==(e=this._set2021)&&void 0!==e?e:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var e;return null!==(e=this._set2022)&&void 0!==e?e:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var e;return null!==(e=this._set2023)&&void 0!==e?e:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var e;return null!==(e=this._set2024)&&void 0!==e?e:this._set2024=new Set(this._raw2024.split(" "))}}const l=new Set(["General_Category","gc"]),c=new Set(["Script","Script_Extensions","sc","scx"]),u=new a("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","",""),p=new a("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",""),d=new a("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","");function f(e,t,n){return l.has(t)?e>=2018&&u.es2018.has(n):!!c.has(t)&&(e>=2018&&p.es2018.has(n)||e>=2019&&p.es2019.has(n)||e>=2020&&p.es2020.has(n)||e>=2021&&p.es2021.has(n)||e>=2022&&p.es2022.has(n)||e>=2023&&p.es2023.has(n))}const h=36,m=38,g=40,y=41,_=45,b=48,v=63,E=99,x=91,S=92,O=93,T=94,w=123,C=124,A=125;function P(e){return e>=65&&e<=90||e>=97&&e<=122}function k(e){return e>=b&&e<=57}function D(e){return e>=b&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function R(e){return 10===e||13===e||8232===e||8233===e}function I(e){return e>=97&&e<=102?e-97+10:e>=65&&e<=70?e-65+10:e-b}function L(e){return e>=55296&&e<=56319}function B(e){return e>=56320&&e<=57343}function M(e,t){return 1024*(e-55296)+(t-56320)+65536}const j={at(e,t,n){return n65535?2:1}};class F{constructor(){this._impl=j,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(e,t,n,r){this._impl=r?N:j,this._s=e,this._end=n,this.rewind(t)}rewind(e){const t=this._impl;this._i=e,this._cp1=t.at(this._s,this._end,e),this._w1=t.width(this._cp1),this._cp2=t.at(this._s,this._end,e+this._w1),this._w2=t.width(this._cp2),this._cp3=t.at(this._s,this._end,e+this._w1+this._w2),this._w3=t.width(this._cp3),this._cp4=t.at(this._s,this._end,e+this._w1+this._w2+this._w3)}advance(){if(-1!==this._cp1){const e=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=e.width(this._cp2),this._cp3=this._cp4,this._w3=e.width(this._cp3),this._cp4=e.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(e){return this._cp1===e&&(this.advance(),!0)}eat2(e,t){return this._cp1===e&&this._cp2===t&&(this.advance(),this.advance(),!0)}eat3(e,t,n){return this._cp1===e&&this._cp2===t&&this._cp3===n&&(this.advance(),this.advance(),this.advance(),!0)}}class U extends SyntaxError{constructor(e,t,n,r){let i="";if("literal"===e.kind){const t=e.source.slice(e.start,e.end);t&&(i=`: ${t}`)}else if("pattern"===e.kind){i=`: /${e.source.slice(e.start,e.end)}/${`${t.unicode?"u":""}${t.unicodeSets?"v":""}`}`}super(`Invalid regular expression${i}: ${r}`),this.index=n}}const V=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]);const K=new Set([T,h,S,46,42,43,v,g,y,x,O,w,A,C]),W=new Set([m,33,35,h,37,42,43,44,46,58,59,60,61,62,v,64,T,96,126]),$=new Set([g,y,x,O,w,A,47,_,S,C]),q=new Set([m,_,33,35,37,44,58,59,60,61,62,64,96,126]);function Q(e){return K.has(e)}function z(e){return W.has(e)}function X(e){return function(e){return!(e<65)&&(e<91||!(e<97)&&(e<123||i(e)))}(e)||e===h||95===e}function G(e){return P(e)||95===e}class Z{constructor(e){this._reader=new F,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._groupNames=new Set,this._backreferenceNames=new Set,this._srcCtx=null,this._options=null!=e?e:{}}validateLiteral(e,t=0,n=e.length){if(this._srcCtx={source:e,start:t,end:n,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(e,t,n),this.onLiteralEnter(t),this.eat(47)&&this.eatRegExpBody()&&this.eat(47)){const r=this.index,i=e.includes("u",r),s=e.includes("v",r);this.validateFlagsInternal(e,r,n),this.validatePatternInternal(e,t+1,r-1,{unicode:i,unicodeSets:s})}else if(t>=n)this.raise("Empty");else{const e=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${e}'`)}this.onLiteralLeave(t,n)}validateFlags(e,t=0,n=e.length){this._srcCtx={source:e,start:t,end:n,kind:"flags"},this.validateFlagsInternal(e,t,n)}validatePattern(e,t=0,n=e.length,r){this._srcCtx={source:e,start:t,end:n,kind:"pattern"},this.validatePatternInternal(e,t,n,r)}validatePatternInternal(e,t=0,n=e.length,r){const i=this._parseFlagsOptionToMode(r,n);this._unicodeMode=i.unicodeMode,this._nFlag=i.nFlag,this._unicodeSetsMode=i.unicodeSetsMode,this.reset(e,t,n),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&this._groupNames.size>0&&(this._nFlag=!0,this.rewind(t),this.consumePattern())}validateFlagsInternal(e,t,n){const r=new Set;let i=!1,s=!1,o=!1,a=!1,l=!1,c=!1,u=!1,p=!1;for(let d=t;d=2015?l=!0:121===n&&this.ecmaVersion>=2015?a=!0:115===n&&this.ecmaVersion>=2018?c=!0:100===n&&this.ecmaVersion>=2022?u=!0:118===n&&this.ecmaVersion>=2024?p=!0:this.raise(`Invalid flag '${e[d]}'`,{index:t})}this.onRegExpFlags(t,n,{global:i,ignoreCase:s,multiline:o,unicode:l,sticky:a,dotAll:c,hasIndices:u,unicodeSets:p})}_parseFlagsOptionToMode(e,t){let n=!1,r=!1;e&&this.ecmaVersion>=2015&&("object"==typeof e?(n=Boolean(e.unicode),this.ecmaVersion>=2024&&(r=Boolean(e.unicodeSets))):n=e),n&&r&&this.raise("Invalid regular expression flags",{index:t+1,unicode:n,unicodeSets:r});return{unicodeMode:n||r,nFlag:n&&this.ecmaVersion>=2018||r||Boolean(this._options.strict&&this.ecmaVersion>=2023),unicodeSetsMode:r}}get strict(){return Boolean(this._options.strict)||this._unicodeMode}get ecmaVersion(){var e;return null!==(e=this._options.ecmaVersion)&&void 0!==e?e:2024}onLiteralEnter(e){this._options.onLiteralEnter&&this._options.onLiteralEnter(e)}onLiteralLeave(e,t){this._options.onLiteralLeave&&this._options.onLiteralLeave(e,t)}onRegExpFlags(e,t,n){this._options.onRegExpFlags&&this._options.onRegExpFlags(e,t,n),this._options.onFlags&&this._options.onFlags(e,t,n.global,n.ignoreCase,n.multiline,n.unicode,n.sticky,n.dotAll,n.hasIndices)}onPatternEnter(e){this._options.onPatternEnter&&this._options.onPatternEnter(e)}onPatternLeave(e,t){this._options.onPatternLeave&&this._options.onPatternLeave(e,t)}onDisjunctionEnter(e){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(e)}onDisjunctionLeave(e,t){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(e,t)}onAlternativeEnter(e,t){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(e,t)}onAlternativeLeave(e,t,n){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(e,t,n)}onGroupEnter(e){this._options.onGroupEnter&&this._options.onGroupEnter(e)}onGroupLeave(e,t){this._options.onGroupLeave&&this._options.onGroupLeave(e,t)}onCapturingGroupEnter(e,t){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(e,t)}onCapturingGroupLeave(e,t,n){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(e,t,n)}onQuantifier(e,t,n,r,i){this._options.onQuantifier&&this._options.onQuantifier(e,t,n,r,i)}onLookaroundAssertionEnter(e,t,n){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(e,t,n)}onLookaroundAssertionLeave(e,t,n,r){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(e,t,n,r)}onEdgeAssertion(e,t,n){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(e,t,n)}onWordBoundaryAssertion(e,t,n,r){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(e,t,n,r)}onAnyCharacterSet(e,t,n){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(e,t,n)}onEscapeCharacterSet(e,t,n,r){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(e,t,n,r)}onUnicodePropertyCharacterSet(e,t,n,r,i,s,o){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(e,t,n,r,i,s,o)}onCharacter(e,t,n){this._options.onCharacter&&this._options.onCharacter(e,t,n)}onBackreference(e,t,n){this._options.onBackreference&&this._options.onBackreference(e,t,n)}onCharacterClassEnter(e,t,n){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(e,t,n)}onCharacterClassLeave(e,t,n){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(e,t,n)}onCharacterClassRange(e,t,n,r){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(e,t,n,r)}onClassIntersection(e,t){this._options.onClassIntersection&&this._options.onClassIntersection(e,t)}onClassSubtraction(e,t){this._options.onClassSubtraction&&this._options.onClassSubtraction(e,t)}onClassStringDisjunctionEnter(e){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(e)}onClassStringDisjunctionLeave(e,t){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(e,t)}onStringAlternativeEnter(e,t){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(e,t)}onStringAlternativeLeave(e,t,n){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(e,t,n)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(e,t,n){this._reader.reset(e,t,n,this._unicodeMode)}rewind(e){this._reader.rewind(e)}advance(){this._reader.advance()}eat(e){return this._reader.eat(e)}eat2(e,t){return this._reader.eat2(e,t)}eat3(e,t,n){return this._reader.eat3(e,t,n)}raise(e,t){var n,r,i;throw new U(this._srcCtx,{unicode:null!==(n=null==t?void 0:t.unicode)&&void 0!==n?n:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:null!==(r=null==t?void 0:t.unicodeSets)&&void 0!==r?r:this._unicodeSetsMode},null!==(i=null==t?void 0:t.index)&&void 0!==i?i:this.index,e)}eatRegExpBody(){const e=this.index;let t=!1,n=!1;for(;;){const r=this.currentCodePoint;if(-1===r||R(r)){const e=t?"character class":"regular expression";this.raise(`Unterminated ${e}`)}if(n)n=!1;else if(r===S)n=!0;else if(r===x)t=!0;else if(r===O)t=!1;else if(47===r&&!t||42===r&&this.index===e)break;this.advance()}return this.index!==e}consumePattern(){const e=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupNames.clear(),this._backreferenceNames.clear(),this.onPatternEnter(e),this.consumeDisjunction();const t=this.currentCodePoint;if(-1!==this.currentCodePoint){t===y&&this.raise("Unmatched ')'"),t===S&&this.raise("\\ at end of pattern"),t!==O&&t!==A||this.raise("Lone quantifier brackets");const e=String.fromCodePoint(t);this.raise(`Unexpected character '${e}'`)}for(const e of this._backreferenceNames)this._groupNames.has(e)||this.raise("Invalid named capture referenced");this.onPatternLeave(e,this.index)}countCapturingParens(){const e=this.index;let t=!1,n=!1,r=0,i=0;for(;-1!==(i=this.currentCodePoint);)n?n=!1:i===S?n=!0:i===x?t=!0:i===O?t=!1:i!==g||t||this.nextCodePoint===v&&(60!==this.nextCodePoint2||61===this.nextCodePoint3||33===this.nextCodePoint3)||(r+=1),this.advance();return this.rewind(e),r}consumeDisjunction(){const e=this.index;let t=0;this.onDisjunctionEnter(e);do{this.consumeAlternative(t++)}while(this.eat(C));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(w)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(e,this.index)}consumeAlternative(e){const t=this.index;for(this.onAlternativeEnter(t,e);-1!==this.currentCodePoint&&this.consumeTerm(););this.onAlternativeLeave(t,this.index,e)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const e=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat(T))return this.onEdgeAssertion(e,this.index,"start"),!0;if(this.eat(h))return this.onEdgeAssertion(e,this.index,"end"),!0;if(this.eat2(S,66))return this.onWordBoundaryAssertion(e,this.index,"word",!0),!0;if(this.eat2(S,98))return this.onWordBoundaryAssertion(e,this.index,"word",!1),!0;if(this.eat2(g,v)){const t=this.ecmaVersion>=2018&&this.eat(60);let n=!1;if(this.eat(61)||(n=this.eat(33))){const r=t?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(e,r,n),this.consumeDisjunction(),this.eat(y)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!t&&!this.strict,this.onLookaroundAssertionLeave(e,this.index,r,n),!0}this.rewind(e)}return!1}consumeQuantifier(e=!1){const t=this.index;let n=0,r=0,i=!1;if(this.eat(42))n=0,r=Number.POSITIVE_INFINITY;else if(this.eat(43))n=1,r=Number.POSITIVE_INFINITY;else if(this.eat(v))n=0,r=1;else{if(!this.eatBracedQuantifier(e))return!1;({min:n,max:r}=this._lastRange)}return i=!this.eat(v),e||this.onQuantifier(t,this.index,n,r,i),!0}eatBracedQuantifier(e){const t=this.index;if(this.eat(w)){if(this.eatDecimalDigits()){const t=this._lastIntValue;let n=t;if(this.eat(44)&&(n=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(A))return!e&&n=2018?this.consumeGroupSpecifier()&&(t=this._lastStrValue):this.currentCodePoint===v&&this.raise("Invalid group"),this.onCapturingGroupEnter(e,t),this.consumeDisjunction(),this.eat(y)||this.raise("Unterminated group"),this.onCapturingGroupLeave(e,this.index,t),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||Boolean(this.consumeCharacterClass())||this.consumeUncapturingGroup()||this.consumeCapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const e=this.index;return this.currentCodePoint===S&&this.nextCodePoint===E&&(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(e,this.index,S),!0)}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const e=this.index,t=this.currentCodePoint;return-1!==t&&!Q(t)&&(this.advance(),this.onCharacter(e,this.index,t),!0)}consumeExtendedPatternCharacter(){const e=this.index,t=this.currentCodePoint;return-1!==t&&t!==T&&t!==h&&t!==S&&46!==t&&42!==t&&43!==t&&t!==v&&t!==g&&t!==y&&t!==x&&t!==C&&(this.advance(),this.onCharacter(e,this.index,t),!0)}consumeGroupSpecifier(){if(this.eat(v)){if(this.eatGroupName()){if(!this._groupNames.has(this._lastStrValue))return this._groupNames.add(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.raise("Invalid group")}return!1}consumeAtomEscape(){return!!(this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName())||((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const e=this.index;if(this.eatDecimalEscape()){const t=this._lastIntValue;if(t<=this._numCapturingParens)return this.onBackreference(e-1,this.index,t),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(e)}return!1}consumeCharacterClassEscape(){var e;const t=this.index;if(this.eat(100))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"digit",!1),{};if(this.eat(68))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"digit",!0),{};if(this.eat(115))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"space",!1),{};if(this.eat(83))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"space",!0),{};if(this.eat(119))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"word",!1),{};if(this.eat(87))return this._lastIntValue=-1,this.onEscapeCharacterSet(t-1,this.index,"word",!0),{};let n=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(112)||(n=this.eat(80)))){this._lastIntValue=-1;let r=null;if(this.eat(w)&&(r=this.eatUnicodePropertyValueExpression())&&this.eat(A))return n&&r.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(t-1,this.index,"property",r.key,r.value,n,null!==(e=r.strings)&&void 0!==e&&e),{mayContainStrings:r.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const e=this.index;return!!(this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape())&&(this.onCharacter(e-1,this.index,this._lastIntValue),!0)}consumeKGroupName(){const e=this.index;if(this.eat(107)){if(this.eatGroupName()){const t=this._lastStrValue;return this._backreferenceNames.add(t),this.onBackreference(e-1,this.index,t),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const e=this.index;if(this.eat(x)){const t=this.eat(T);this.onCharacterClassEnter(e,t,this._unicodeSetsMode);const n=this.consumeClassContents();return this.eat(O)||(-1===this.currentCodePoint&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),t&&n.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(e,this.index,t),n}return null}consumeClassContents(){if(this._unicodeSetsMode){if(this.currentCodePoint===O)return{};return this.consumeClassSetExpression()}const e=this.strict||this._unicodeMode;for(;;){const t=this.index;if(!this.consumeClassAtom())break;const n=this._lastIntValue;if(!this.eat(_))continue;if(this.onCharacter(this.index-1,this.index,_),!this.consumeClassAtom())break;const r=this._lastIntValue;-1!==n&&-1!==r?(n>r&&this.raise("Range out of order in character class"),this.onCharacterClassRange(t,this.index,n,r)):e&&this.raise("Invalid character class")}return{}}consumeClassAtom(){const e=this.index,t=this.currentCodePoint;if(-1!==t&&t!==S&&t!==O)return this.advance(),this._lastIntValue=t,this.onCharacter(e,this.index,this._lastIntValue),!0;if(this.eat(S)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===E)return this._lastIntValue=S,this.onCharacter(e,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(e)}return!1}consumeClassEscape(){const e=this.index;if(this.eat(98))return this._lastIntValue=8,this.onCharacter(e-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(_))return this._lastIntValue=_,this.onCharacter(e-1,this.index,this._lastIntValue),!0;let t=0;return this.strict||this._unicodeMode||this.currentCodePoint!==E||!k(t=this.nextCodePoint)&&95!==t?Boolean(this.consumeCharacterClassEscape())||this.consumeCharacterEscape():(this.advance(),this.advance(),this._lastIntValue=t%32,this.onCharacter(e-1,this.index,this._lastIntValue),!0)}consumeClassSetExpression(){const e=this.index;let t=!1,n=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(e))return this.consumeClassUnionRight({}),{};t=!1}else if(n=this.consumeClassSetOperand())t=n.mayContainStrings;else{const e=this.currentCodePoint;e===S&&(this.advance(),this.raise("Invalid escape")),e===this.nextCodePoint&&z(e)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(m,m)){for(;this.currentCodePoint!==m&&(n=this.consumeClassSetOperand());)if(this.onClassIntersection(e,this.index),n.mayContainStrings||(t=!1),!this.eat2(m,m))return{mayContainStrings:t};this.raise("Invalid character in character class")}if(this.eat2(_,_)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(e,this.index),!this.eat2(_,_))return{mayContainStrings:t};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:t})}consumeClassUnionRight(e){let t=e.mayContainStrings;for(;;){const e=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(e);continue}const n=this.consumeClassSetOperand();if(!n)break;n.mayContainStrings&&(t=!0)}return{mayContainStrings:t}}consumeClassSetRangeFromOperator(e){const t=this.index,n=this._lastIntValue;if(this.eat(_)){if(this.consumeClassSetCharacter()){const t=this._lastIntValue;return-1!==n&&-1!==t||this.raise("Invalid character class"),n>t&&this.raise("Range out of order in character class"),this.onCharacterClassRange(e,this.index,n,t),!0}this.rewind(t)}return!1}consumeClassSetOperand(){let e=null;return(e=this.consumeNestedClass())||(e=this.consumeClassStringDisjunction())?e:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const e=this.index;if(this.eat(x)){const t=this.eat(T);this.onCharacterClassEnter(e,t,!0);const n=this.consumeClassContents();return this.eat(O)||this.raise("Unterminated character class"),t&&n.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(e,this.index,t),n}if(this.eat(S)){const t=this.consumeCharacterClassEscape();if(t)return t;this.rewind(e)}return null}consumeClassStringDisjunction(){const e=this.index;if(this.eat3(S,113,w)){this.onClassStringDisjunctionEnter(e);let t=0,n=!1;do{this.consumeClassString(t++).mayContainStrings&&(n=!0)}while(this.eat(C));if(this.eat(A))return this.onClassStringDisjunctionLeave(e,this.index),{mayContainStrings:n};this.raise("Unterminated class string disjunction")}return null}consumeClassString(e){const t=this.index;let n=0;for(this.onStringAlternativeEnter(t,e);-1!==this.currentCodePoint&&this.consumeClassSetCharacter();)n++;return this.onStringAlternativeLeave(t,this.index,e),{mayContainStrings:1!==n}}consumeClassSetCharacter(){const e=this.index,t=this.currentCodePoint;if(!(t===this.nextCodePoint&&z(t)||-1===t||function(e){return $.has(e)}(t)))return this._lastIntValue=t,this.advance(),this.onCharacter(e,this.index,this._lastIntValue),!0;if(this.eat(S)){if(this.consumeCharacterEscape())return!0;if(function(e){return q.has(e)}(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(e,this.index,this._lastIntValue),!0;if(this.eat(98))return this._lastIntValue=8,this.onCharacter(e,this.index,this._lastIntValue),!0;this.rewind(e)}return!1}eatGroupName(){if(this.eat(60)){if(this.eatRegExpIdentifierName()&&this.eat(62))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const e=this.index,t=!this._unicodeMode&&this.ecmaVersion>=2020;let n=this.currentCodePoint;return this.advance(),n===S&&this.eatRegExpUnicodeEscapeSequence(t)?n=this._lastIntValue:t&&L(n)&&B(this.currentCodePoint)&&(n=M(n,this.currentCodePoint),this.advance()),X(n)?(this._lastIntValue=n,!0):(this.index!==e&&this.rewind(e),!1)}eatRegExpIdentifierPart(){const e=this.index,t=!this._unicodeMode&&this.ecmaVersion>=2020;let n=this.currentCodePoint;return this.advance(),n===S&&this.eatRegExpUnicodeEscapeSequence(t)?n=this._lastIntValue:t&&L(n)&&B(this.currentCodePoint)&&(n=M(n,this.currentCodePoint),this.advance()),function(e){return r(e)||e===h||8204===e||8205===e}(n)?(this._lastIntValue=n,!0):(this.index!==e&&this.rewind(e),!1)}eatCControlLetter(){const e=this.index;if(this.eat(E)){if(this.eatControlLetter())return!0;this.rewind(e)}return!1}eatZero(){return this.currentCodePoint===b&&!k(this.nextCodePoint)&&(this._lastIntValue=0,this.advance(),!0)}eatControlEscape(){return this.eat(102)?(this._lastIntValue=12,!0):this.eat(110)?(this._lastIntValue=10,!0):this.eat(114)?(this._lastIntValue=13,!0):this.eat(116)?(this._lastIntValue=9,!0):!!this.eat(118)&&(this._lastIntValue=11,!0)}eatControlLetter(){const e=this.currentCodePoint;return!!P(e)&&(this.advance(),this._lastIntValue=e%32,!0)}eatRegExpUnicodeEscapeSequence(e=!1){const t=this.index,n=e||this._unicodeMode;if(this.eat(117)){if(n&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||n&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||n)&&this.raise("Invalid unicode escape"),this.rewind(t)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const e=this.index;if(this.eatFixedHexDigits(4)){const t=this._lastIntValue;if(L(t)&&this.eat(S)&&this.eat(117)&&this.eatFixedHexDigits(4)){const e=this._lastIntValue;if(B(e))return this._lastIntValue=M(t,e),!0}this.rewind(e)}return!1}eatRegExpUnicodeCodePointEscape(){const e=this.index;return!!(this.eat(w)&&this.eatHexDigits()&&this.eat(A)&&function(e){return e>=0&&e<=1114111}(this._lastIntValue))||(this.rewind(e),!1)}eatIdentityEscape(){const e=this.currentCodePoint;return!!this.isValidIdentityEscape(e)&&(this._lastIntValue=e,this.advance(),!0)}isValidIdentityEscape(e){return-1!==e&&(this._unicodeMode?Q(e)||47===e:this.strict?!r(e):this._nFlag?!(e===E||107===e):e!==E)}eatDecimalEscape(){this._lastIntValue=0;let e=this.currentCodePoint;if(e>=49&&e<=57){do{this._lastIntValue=10*this._lastIntValue+(e-b),this.advance()}while((e=this.currentCodePoint)>=b&&e<=57);return!0}return!1}eatUnicodePropertyValueExpression(){const e=this.index;if(this.eatUnicodePropertyName()&&this.eat(61)){const e=this._lastStrValue;if(this.eatUnicodePropertyValue()){const t=this._lastStrValue;if(f(this.ecmaVersion,e,t))return{key:e,value:t||null};this.raise("Invalid property name")}}if(this.rewind(e),this.eatLoneUnicodePropertyNameOrValue()){const e=this._lastStrValue;if(f(this.ecmaVersion,"General_Category",e))return{key:"General_Category",value:e||null};if(function(e,t){return e>=2018&&d.es2018.has(t)||e>=2019&&d.es2019.has(t)||e>=2021&&d.es2021.has(t)}(this.ecmaVersion,e))return{key:e,value:null};if(this._unicodeSetsMode&&function(e,t){return e>=2024&&V.has(t)}(this.ecmaVersion,e))return{key:e,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";G(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return""!==this._lastStrValue}eatUnicodePropertyValue(){for(this._lastStrValue="";G(e=this.currentCodePoint)||k(e);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();var e;return""!==this._lastStrValue}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const e=this.index;if(this.eat(120)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(e)}return!1}eatDecimalDigits(){const e=this.index;for(this._lastIntValue=0;k(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+I(this.currentCodePoint),this.advance();return this.index!==e}eatHexDigits(){const e=this.index;for(this._lastIntValue=0;D(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+I(this.currentCodePoint),this.advance();return this.index!==e}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const e=this._lastIntValue;if(this.eatOctalDigit()){const t=this._lastIntValue;e<=3&&this.eatOctalDigit()?this._lastIntValue=64*e+8*t+this._lastIntValue:this._lastIntValue=8*e+t}else this._lastIntValue=e;return!0}return!1}eatOctalDigit(){const e=this.currentCodePoint;return function(e){return e>=b&&e<=55}(e)?(this.advance(),this._lastIntValue=e-b,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(e){const t=this.index;this._lastIntValue=0;for(let n=0;ne.name===t));e.resolved=n,n.references.push(e)}}onAlternativeEnter(e){const t=this._node;if("Assertion"!==t.type&&"CapturingGroup"!==t.type&&"Group"!==t.type&&"Pattern"!==t.type)throw new Error("UnknownError");this._node={type:"Alternative",parent:t,start:e,end:e,raw:"",elements:[]},t.alternatives.push(this._node)}onAlternativeLeave(e,t){const n=this._node;if("Alternative"!==n.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onGroupEnter(e){const t=this._node;if("Alternative"!==t.type)throw new Error("UnknownError");this._node={type:"Group",parent:t,start:e,end:e,raw:"",alternatives:[]},t.elements.push(this._node)}onGroupLeave(e,t){const n=this._node;if("Group"!==n.type||"Alternative"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onCapturingGroupEnter(e,t){const n=this._node;if("Alternative"!==n.type)throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:n,start:e,end:e,raw:"",name:t,alternatives:[],references:[]},n.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(e,t){const n=this._node;if("CapturingGroup"!==n.type||"Alternative"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onQuantifier(e,t,n,r,i){const s=this._node;if("Alternative"!==s.type)throw new Error("UnknownError");const o=s.elements.pop();if(null==o||"Quantifier"===o.type||"Assertion"===o.type&&"lookahead"!==o.kind)throw new Error("UnknownError");const a={type:"Quantifier",parent:s,start:o.start,end:t,raw:this.source.slice(o.start,t),min:n,max:r,greedy:i,element:o};s.elements.push(a),o.parent=a}onLookaroundAssertionEnter(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");const i=this._node={type:"Assertion",parent:r,start:e,end:e,raw:"",kind:t,negate:n,alternatives:[]};r.elements.push(i)}onLookaroundAssertionLeave(e,t){const n=this._node;if("Assertion"!==n.type||"Alternative"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onEdgeAssertion(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");r.elements.push({type:"Assertion",parent:r,start:e,end:t,raw:this.source.slice(e,t),kind:n})}onWordBoundaryAssertion(e,t,n,r){const i=this._node;if("Alternative"!==i.type)throw new Error("UnknownError");i.elements.push({type:"Assertion",parent:i,start:e,end:t,raw:this.source.slice(e,t),kind:n,negate:r})}onAnyCharacterSet(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");r.elements.push({type:"CharacterSet",parent:r,start:e,end:t,raw:this.source.slice(e,t),kind:n})}onEscapeCharacterSet(e,t,n,r){const i=this._node;if("Alternative"!==i.type&&"CharacterClass"!==i.type)throw new Error("UnknownError");i.elements.push({type:"CharacterSet",parent:i,start:e,end:t,raw:this.source.slice(e,t),kind:n,negate:r})}onUnicodePropertyCharacterSet(e,t,n,r,i,s,o){const a=this._node;if("Alternative"!==a.type&&"CharacterClass"!==a.type||o&&(s||i))throw new Error("UnknownError");const l={type:"CharacterSet",parent:a,start:e,end:t,raw:this.source.slice(e,t),kind:n,strings:o,key:r},c=o?Object.assign(Object.assign({},l),{value:null,negate:!1,strings:!0}):Object.assign(Object.assign({},l),{value:i,negate:s,strings:!1});a.elements.push(c)}onCharacter(e,t,n){const r=this._node;if("Alternative"!==r.type&&"CharacterClass"!==r.type&&"StringAlternative"!==r.type)throw new Error("UnknownError");r.elements.push({type:"Character",parent:r,start:e,end:t,raw:this.source.slice(e,t),value:n})}onBackreference(e,t,n){const r=this._node;if("Alternative"!==r.type)throw new Error("UnknownError");const i={type:"Backreference",parent:r,start:e,end:t,raw:this.source.slice(e,t),ref:n,resolved:J};r.elements.push(i),this._backreferences.push(i)}onCharacterClassEnter(e,t,n){const r=this._node,i={type:"CharacterClass",parent:r,start:e,end:e,raw:"",unicodeSets:n,negate:t,elements:[]};if("Alternative"===r.type){const e=Object.assign(Object.assign({},i),{parent:r});this._node=e,r.elements.push(e)}else{if("CharacterClass"!==r.type||!r.unicodeSets||!n)throw new Error("UnknownError");{const e=Object.assign(Object.assign({},i),{parent:r,unicodeSets:n});this._node=e,r.elements.push(e)}}}onCharacterClassLeave(e,t){const n=this._node;if("CharacterClass"!==n.type||"Alternative"!==n.parent.type&&"CharacterClass"!==n.parent.type||this._expressionBuffer&&n.elements.length>0)throw new Error("UnknownError");const r=n.parent;n.end=t,n.raw=this.source.slice(e,t),this._node=r;const i=this._expressionBuffer;if(this._expressionBuffer=null,!i)return;const s={type:"ExpressionCharacterClass",parent:r,start:n.start,end:n.end,raw:n.raw,negate:n.negate,expression:i};if(i.parent=s,n!==r.elements.pop())throw new Error("UnknownError");r.elements.push(s)}onCharacterClassRange(e,t){const n=this._node;if("CharacterClass"!==n.type)throw new Error("UnknownError");const r=n.elements,i=r.pop();if(!i||"Character"!==i.type)throw new Error("UnknownError");if(!n.unicodeSets){const e=r.pop();if(!e||"Character"!==e.type||e.value!==_)throw new Error("UnknownError")}const s=r.pop();if(!s||"Character"!==s.type)throw new Error("UnknownError");const o={type:"CharacterClassRange",parent:n,start:e,end:t,raw:this.source.slice(e,t),min:s,max:i};s.parent=o,i.parent=o,r.push(o)}onClassIntersection(e,t){var n;const r=this._node;if("CharacterClass"!==r.type||!r.unicodeSets)throw new Error("UnknownError");const i=r.elements.pop(),s=null!==(n=this._expressionBuffer)&&void 0!==n?n:r.elements.pop();if(!s||!i||"ClassSubtraction"===s.type||"ClassIntersection"!==s.type&&!ee(s)||!ee(i))throw new Error("UnknownError");const o={type:"ClassIntersection",parent:r,start:e,end:t,raw:this.source.slice(e,t),left:s,right:i};s.parent=o,i.parent=o,this._expressionBuffer=o}onClassSubtraction(e,t){var n;const r=this._node;if("CharacterClass"!==r.type||!r.unicodeSets)throw new Error("UnknownError");const i=r.elements.pop(),s=null!==(n=this._expressionBuffer)&&void 0!==n?n:r.elements.pop();if(!s||!i||"ClassIntersection"===s.type||"ClassSubtraction"!==s.type&&!ee(s)||!ee(i))throw new Error("UnknownError");const o={type:"ClassSubtraction",parent:r,start:e,end:t,raw:this.source.slice(e,t),left:s,right:i};s.parent=o,i.parent=o,this._expressionBuffer=o}onClassStringDisjunctionEnter(e){const t=this._node;if("CharacterClass"!==t.type||!t.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:t,start:e,end:e,raw:"",alternatives:[]},t.elements.push(this._node)}onClassStringDisjunctionLeave(e,t){const n=this._node;if("ClassStringDisjunction"!==n.type||"CharacterClass"!==n.parent.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}onStringAlternativeEnter(e){const t=this._node;if("ClassStringDisjunction"!==t.type)throw new Error("UnknownError");this._node={type:"StringAlternative",parent:t,start:e,end:e,raw:"",elements:[]},t.alternatives.push(this._node)}onStringAlternativeLeave(e,t){const n=this._node;if("StringAlternative"!==n.type)throw new Error("UnknownError");n.end=t,n.raw=this.source.slice(e,t),this._node=n.parent}}class ne{constructor(e){this._state=new te(e),this._validator=new Z(this._state)}parseLiteral(e,t=0,n=e.length){this._state.source=e,this._validator.validateLiteral(e,t,n);const r=this._state.pattern,i=this._state.flags,s={type:"RegExpLiteral",parent:null,start:t,end:n,raw:e,pattern:r,flags:i};return r.parent=s,i.parent=s,s}parseFlags(e,t=0,n=e.length){return this._state.source=e,this._validator.validateFlags(e,t,n),this._state.flags}parsePattern(e,t=0,n=e.length,r){return this._state.source=e,this._validator.validatePattern(e,t,n,r),this._state.pattern}}class re{constructor(e){this._handlers=e}visit(e){switch(e.type){case"Alternative":this.visitAlternative(e);break;case"Assertion":this.visitAssertion(e);break;case"Backreference":this.visitBackreference(e);break;case"CapturingGroup":this.visitCapturingGroup(e);break;case"Character":this.visitCharacter(e);break;case"CharacterClass":this.visitCharacterClass(e);break;case"CharacterClassRange":this.visitCharacterClassRange(e);break;case"CharacterSet":this.visitCharacterSet(e);break;case"ClassIntersection":this.visitClassIntersection(e);break;case"ClassStringDisjunction":this.visitClassStringDisjunction(e);break;case"ClassSubtraction":this.visitClassSubtraction(e);break;case"ExpressionCharacterClass":this.visitExpressionCharacterClass(e);break;case"Flags":this.visitFlags(e);break;case"Group":this.visitGroup(e);break;case"Pattern":this.visitPattern(e);break;case"Quantifier":this.visitQuantifier(e);break;case"RegExpLiteral":this.visitRegExpLiteral(e);break;case"StringAlternative":this.visitStringAlternative(e);break;default:throw new Error(`Unknown type: ${e.type}`)}}visitAlternative(e){this._handlers.onAlternativeEnter&&this._handlers.onAlternativeEnter(e),e.elements.forEach(this.visit,this),this._handlers.onAlternativeLeave&&this._handlers.onAlternativeLeave(e)}visitAssertion(e){this._handlers.onAssertionEnter&&this._handlers.onAssertionEnter(e),"lookahead"!==e.kind&&"lookbehind"!==e.kind||e.alternatives.forEach(this.visit,this),this._handlers.onAssertionLeave&&this._handlers.onAssertionLeave(e)}visitBackreference(e){this._handlers.onBackreferenceEnter&&this._handlers.onBackreferenceEnter(e),this._handlers.onBackreferenceLeave&&this._handlers.onBackreferenceLeave(e)}visitCapturingGroup(e){this._handlers.onCapturingGroupEnter&&this._handlers.onCapturingGroupEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onCapturingGroupLeave&&this._handlers.onCapturingGroupLeave(e)}visitCharacter(e){this._handlers.onCharacterEnter&&this._handlers.onCharacterEnter(e),this._handlers.onCharacterLeave&&this._handlers.onCharacterLeave(e)}visitCharacterClass(e){this._handlers.onCharacterClassEnter&&this._handlers.onCharacterClassEnter(e),e.elements.forEach(this.visit,this),this._handlers.onCharacterClassLeave&&this._handlers.onCharacterClassLeave(e)}visitCharacterClassRange(e){this._handlers.onCharacterClassRangeEnter&&this._handlers.onCharacterClassRangeEnter(e),this.visitCharacter(e.min),this.visitCharacter(e.max),this._handlers.onCharacterClassRangeLeave&&this._handlers.onCharacterClassRangeLeave(e)}visitCharacterSet(e){this._handlers.onCharacterSetEnter&&this._handlers.onCharacterSetEnter(e),this._handlers.onCharacterSetLeave&&this._handlers.onCharacterSetLeave(e)}visitClassIntersection(e){this._handlers.onClassIntersectionEnter&&this._handlers.onClassIntersectionEnter(e),this.visit(e.left),this.visit(e.right),this._handlers.onClassIntersectionLeave&&this._handlers.onClassIntersectionLeave(e)}visitClassStringDisjunction(e){this._handlers.onClassStringDisjunctionEnter&&this._handlers.onClassStringDisjunctionEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onClassStringDisjunctionLeave&&this._handlers.onClassStringDisjunctionLeave(e)}visitClassSubtraction(e){this._handlers.onClassSubtractionEnter&&this._handlers.onClassSubtractionEnter(e),this.visit(e.left),this.visit(e.right),this._handlers.onClassSubtractionLeave&&this._handlers.onClassSubtractionLeave(e)}visitExpressionCharacterClass(e){this._handlers.onExpressionCharacterClassEnter&&this._handlers.onExpressionCharacterClassEnter(e),this.visit(e.expression),this._handlers.onExpressionCharacterClassLeave&&this._handlers.onExpressionCharacterClassLeave(e)}visitFlags(e){this._handlers.onFlagsEnter&&this._handlers.onFlagsEnter(e),this._handlers.onFlagsLeave&&this._handlers.onFlagsLeave(e)}visitGroup(e){this._handlers.onGroupEnter&&this._handlers.onGroupEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onGroupLeave&&this._handlers.onGroupLeave(e)}visitPattern(e){this._handlers.onPatternEnter&&this._handlers.onPatternEnter(e),e.alternatives.forEach(this.visit,this),this._handlers.onPatternLeave&&this._handlers.onPatternLeave(e)}visitQuantifier(e){this._handlers.onQuantifierEnter&&this._handlers.onQuantifierEnter(e),this.visit(e.element),this._handlers.onQuantifierLeave&&this._handlers.onQuantifierLeave(e)}visitRegExpLiteral(e){this._handlers.onRegExpLiteralEnter&&this._handlers.onRegExpLiteralEnter(e),this.visitPattern(e.pattern),this.visitFlags(e.flags),this._handlers.onRegExpLiteralLeave&&this._handlers.onRegExpLiteralLeave(e)}visitStringAlternative(e){this._handlers.onStringAlternativeEnter&&this._handlers.onStringAlternativeEnter(e),e.elements.forEach(this.visit,this),this._handlers.onStringAlternativeLeave&&this._handlers.onStringAlternativeLeave(e)}}return Oj.AST=e,Oj.RegExpParser=ne,Oj.RegExpValidator=Z,Oj.parseRegExpLiteral=function(e,t){return new ne(t).parseLiteral(String(e))},Oj.validateRegExpLiteral=function(e,t){new Z(t).validateLiteral(e)},Oj.visitRegExpAST=function(e,t){new re(t).visit(e)},Oj}function wj(){if(Hk)return Zk;Hk=1;const e=Pw();return Zk={meta:{type:"problem",docs:{description:"Disallow duplicate class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-class-members"},schema:[],messages:{unexpected:"Duplicate name '{{name}}'."}},create(t){let n=[];return{Program(){n=[]},ClassBody(){n.push(Object.create(null))},"ClassBody:exit"(){n.pop()},"MethodDefinition, PropertyDefinition"(r){const i=e.getStaticPropertyName(r),s="MethodDefinition"===r.type?r.kind:"field";if(null===i||"constructor"===s)return;const o=function(e,t){const r=n[n.length-1],i=`$${e}`;return r[i]||(r[i]={nonStatic:{init:!1,get:!1,set:!1},static:{init:!1,get:!1,set:!1}}),r[i][t?"static":"nonStatic"]}(i,r.static);let a=!1;"get"===s?(a=o.init||o.get,o.get=!0):"set"===s?(a=o.init||o.set,o.set=!0):(a=o.init||o.get||o.set,o.init=!0),a&&t.report({node:r,messageId:"unexpected",data:{name:i}})}}}},Zk}function Cj(){if(sD)return iD;sD=1;const e=["ImportSpecifier","ExportSpecifier"],t=["ImportNamespaceSpecifier","ExportNamespaceSpecifier"];function n(n,r){return("named"===r?e:t).includes(n)}function r(e){if(e.specifiers&&e.specifiers.length>0){const t=e.specifiers,r=t.findIndex((({type:e})=>n(e,"named")||n(e,"namespace")));return t[r>-1?r:0].type}return"ExportAllDeclaration"===e.type?e.exported?"ExportNamespaceSpecifier":"ExportAll":"SideEffectImport"}function i(e,t){const i=r(e),s=r(t);return!("ExportAll"===i&&"ExportAll"!==s&&"SideEffectImport"!==s||"ExportAll"!==i&&"SideEffectImport"!==i&&"ExportAll"===s)&&!(n(i,"namespace")&&n(s,"named")||n(s,"namespace")&&n(i,"named"))}function s(e,t){let n=0;for(;ne===t)).map((({node:e})=>e))}function a(e){return e&&e.source&&e.source.value?e.source.value.trim():""}function l(e,t,n,r){return function(i){const l=a(i);if(l){!function(e,t,n,r,i){const l=a(t);if(n.has(l)){const a=n.get(l),c=[],u=o(a,"import");let p;i&&(p=o(a,"export")),"import"===r?(s(t,u)&&c.push("import"),i&&s(t,p)&&c.push("importAs")):"export"===r&&(s(t,p)&&c.push("export"),s(t,u)&&c.push("exportAs")),c.forEach((n=>e.report({node:t,messageId:n,data:{module:l}})))}}(e,i,t,n,r);const c={node:i,declarationType:n};let u=[c];if(t.has(l)){u=[...t.get(l),c]}t.set(l,u)}}}return iD={meta:{type:"problem",docs:{description:"Disallow duplicate module imports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-duplicate-imports"},schema:[{type:"object",properties:{includeExports:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{import:"'{{module}}' import is duplicated.",importAs:"'{{module}}' import is duplicated as export.",export:"'{{module}}' export is duplicated.",exportAs:"'{{module}}' export is duplicated as import."}},create(e){const t=(e.options[0]||{}).includeExports,n=new Map,r={ImportDeclaration:l(e,n,"import",t)};return t&&(r.ExportNamedDeclaration=l(e,n,"export",t),r.ExportAllDeclaration=l(e,n,"export",t)),r}},iD}function Aj(){if(aD)return oD;aD=1;const e=Pw();return oD=class{constructor(e,t){this.fixer=e,this.sourceCode=t,this.retainedRange=null}retainRange(e){return this.retainedRange=e,this}retainEnclosingFunction(t){const n=e.getUpperFunction(t);return this.retainRange(n?n.range:this.sourceCode.ast.range)}retainSurroundingTokens(e){const t=this.sourceCode.getTokenBefore(e)||e,n=this.sourceCode.getTokenAfter(e)||e;return this.retainRange([t.range[0],n.range[1]])}replaceTextRange(e,t){let n;return n=this.retainedRange?[Math.min(this.retainedRange[0],e[0]),Math.max(this.retainedRange[1],e[1])]:e,this.fixer.replaceTextRange(n,this.sourceCode.text.slice(n[0],e[0])+t+this.sourceCode.text.slice(e[1],n[1]))}remove(e){return this.replaceTextRange(e.range,"")}},oD}function Pj(){if(cD)return lD;cD=1;const e=Pw(),t=Aj();return lD={meta:{type:"suggestion",docs:{description:"Disallow `else` blocks after `return` statements in `if` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-else-return"},schema:[{type:"object",properties:{allowElseIf:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unexpected:"Unnecessary 'else' after 'return'."}},create(n){const r=n.sourceCode;function i(e){const i=r.getScope(e.parent);n.report({node:e,messageId:"unexpected",fix(n){if(!function(e,t){if("FunctionDeclaration"===e.type)return!1;if("BlockStatement"!==e.type)return!0;const n=t.childScopes.find((({block:t})=>t===e));return!n||function(e,t){if(0===e.length)return!0;const n=t.variableScope;if(t.variables.filter((({defs:e})=>e.length>0)).some((({name:t})=>e.includes(t))))return!1;if(t!==n&&"catch"===t.upper.type&&t.upper.variables.some((({name:t})=>e.includes(t))))return!1;if(t.variables.filter((({defs:e,references:t})=>0===e.length&&t.length>0)).some((({name:t})=>e.includes(t))))return!1;if(t.through.some((t=>e.includes(t.identifier.name))))return!1;if(t!==n){const r=t.block.range;if(n.variables.filter((({name:t})=>e.includes(t))).some((e=>e.defs.some((({node:{range:e}})=>r[0]<=e[0]&&e[1]<=r[1])))))return!1}return!0}(n.variables.map((({name:e})=>e)),t)}(e,i))return null;const s=r.getFirstToken(e),o=r.getTokenBefore(s),a=r.getText(e),l=r.getTokenBefore(o);let c,u;u="Punctuator"===s.type&&"{"===s.value?r.getTokenAfter(s):s;const p="BlockStatement"!==e.parent.consequent.type&&";"!==l.value,d=/^[([/+`-]/u.test(u.value);if(p&&d)return null;const f=r.getLastToken(e),h=r.getTokenBefore(f);if(";"!==h.value){const e=r.getTokenAfter(f),t=e&&/^[([/+`-]/u.test(e.value),n=e&&e.loc.start.line===h.loc.start.line;if(t||n&&"}"!==e.value)return null}return c="Punctuator"===s.type&&"{"===s.value?a.slice(1,-1):a,new t(n,r).retainEnclosingFunction(e).replaceTextRange([o.range[0],e.range[1]],c)}})}function s(e){return"ReturnStatement"===e.type}function o(e){if("BlockStatement"===e.type){const t=e.body,n=t[t.length-1];return n&&s(n)}return s(e)}function a(e){return s(e)||function(e){return"IfStatement"===e.type&&function(e){return e.alternate&&e.consequent}(e)&&o(e.alternate)&&o(e.consequent)}(e)}function l(e){return"BlockStatement"===e.type?e.body.some(a):a(e)}return{"IfStatement:exit":!(n.options[0]&&!1===n.options[0].allowElseIf)?function(t){const n=t.parent;if(!e.STATEMENT_LIST_PARENTS.has(n.type))return;const r=[];let s;for(let e=t;"IfStatement"===e.type;e=e.alternate){if(!e.alternate)return;r.push(e.consequent),s=e.alternate}r.every(l)&&i(s)}:function(t){const n=t.parent;if(!e.STATEMENT_LIST_PARENTS.has(n.type))return;const r=t.alternate;r&&l(t.consequent)&&i(r)}}}},lD}function kj(){if(SD)return xD;SD=1;const e=Pw(),t=Object.freeze(["global","window","globalThis"]);function n(t,n){return e.isSpecificMemberAccess(t,null,n)}return xD={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eval"},schema:[{type:"object",properties:{allowIndirect:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"eval can be harmful."}},create(r){const i=Boolean(r.options[0]&&r.options[0].allowIndirect),s=r.sourceCode;let o=null;function a(e){const t=s.getScope(e).isStrict;o={upper:o,node:e,strict:t,isTopLevelOfScript:!1,defaultThis:!1,initialized:t}}function l(){o=o.upper}function c(e){const t=e.parent,n="MemberExpression"===e.type?e.property:e,i="CallExpression"===t.type&&t.callee===e?t:e;r.report({node:i,loc:n.loc,messageId:"unexpected"})}return i?{"CallExpression:exit"(t){const n=t.callee;!t.optional&&e.isSpecificId(n,"eval")&&c(n)}}:{"CallExpression:exit"(t){const n=t.callee;e.isSpecificId(n,"eval")&&c(n)},Program(e){const t=s.getScope(e),n=r.parserOptions.ecmaFeatures||{},i=t.isStrict||"module"===e.sourceType||n.globalReturn&&t.childScopes[0].isStrict,a="module"!==e.sourceType&&!n.globalReturn;o={upper:null,node:e,strict:i,isTopLevelOfScript:a,defaultThis:!0,initialized:!0}},"Program:exit"(r){const i=s.getScope(r);l(),function(t){const n=e.getVariableByName(t,"eval");if(!n)return;const r=n.references;for(let t=0;t *.value":a,"PropertyDefinition > *.value:exit":l,StaticBlock:a,"StaticBlock:exit":l,ThisExpression(t){n(t.parent,"eval")&&(o.initialized||(o.initialized=!0,o.defaultThis=e.isDefaultThisBinding(o.node,s)),(o.isTopLevelOfScript||!o.strict&&o.defaultThis)&&c(t.parent))}}}},xD}function Dj(){if(CD)return wD;CD=1;const e=Pw(),t=Bx();return wD={meta:{type:"suggestion",docs:{description:"Disallow extending native types",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extend-native"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"{{builtin}} prototype is read only, properties should not be added."}},create(n){const r=n.options[0]||{},i=n.sourceCode,s=new Set(r.exceptions||[]),o=new Set(Object.keys(t.builtin).filter((e=>e[0].toUpperCase()===e[0])).filter((e=>!s.has(e))));function a(e,t){n.report({node:e,messageId:"unexpected",data:{builtin:t}})}function l(t){if(!function(t){return Boolean(t&&t.parent&&"MemberExpression"===t.parent.type&&t.parent.object===t&&"prototype"===e.getStaticPropertyName(t.parent))}(t))return;const n="ChainExpression"===t.parent.parent.type?t.parent.parent:t.parent;!function(e){return"MemberExpression"===e.parent.type&&e.parent.object===e&&"AssignmentExpression"===e.parent.parent.type&&e.parent.parent.left===e.parent}(n)?function(t){return"CallExpression"===t.parent.type&&t.parent.arguments[0]===t&&e.isSpecificMemberAccess(t.parent.callee,"Object",/^definePropert(?:y|ies)$/u)}(n)&&a(n.parent,t.name):a(n.parent.parent,t.name)}return{"Program:exit"(e){const t=i.getScope(e);o.forEach((e=>{const n=t.set.get(e);n&&n.references&&n.references.map((e=>e.identifier)).forEach(l)}))}}}},wD}function Rj(){if(PD)return AD;PD=1;const e=Pw(),t=new Set(["Literal","Identifier","ThisExpression","FunctionExpression"]);return AD={meta:{type:"suggestion",docs:{description:"Disallow unnecessary calls to `.bind()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-bind"},schema:[],fixable:"code",messages:{unexpected:"The function binding is unnecessary."}},create(n){const r=n.sourceCode;let i=null;function s(i){const s=i.parent,o="ChainExpression"===s.parent.type?s.parent.parent:s.parent;n.report({node:o,messageId:"unexpected",loc:s.property.loc,fix(n){if(!function(e){return t.has(e.type)}(o.arguments[0]))return null;const i=[[r.getTokenAfter(s.object,e.isNotClosingParenToken),r.getLastToken(s)],[r.getTokenAfter(s,e.isNotClosingParenToken),r.getLastToken(o)]],a=i[0][0],l=i[1][1];return r.commentsExistBetween(a,l)?null:i.map((([e,t])=>n.removeRange([e.range[0],t.range[1]])))}})}function o(t){if(!e.isSpecificMemberAccess(t.parent,null,"bind"))return!1;const n="ChainExpression"===t.parent.parent.type?t.parent.parent:t.parent;return"CallExpression"===n.parent.type&&n.parent.callee===n&&1===n.parent.arguments.length&&"SpreadElement"!==n.parent.arguments[0].type}function a(e){i={isBound:o(e),thisFound:!1,upper:i}}function l(e){i.isBound&&!i.thisFound&&s(e),i=i.upper}return{"ArrowFunctionExpression:exit":function(e){o(e)&&s(e)},FunctionDeclaration:a,"FunctionDeclaration:exit":l,FunctionExpression:a,"FunctionExpression:exit":l,ThisExpression:function(){i&&(i.thisFound=!0)}}}},AD}function Ij(){if(DD)return kD;DD=1;const e=Pw(),t=rS(),n=e.getPrecedence;return kD={meta:{type:"suggestion",docs:{description:"Disallow unnecessary boolean casts",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-boolean-cast"},schema:[{type:"object",properties:{enforceForLogicalOperands:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{unexpectedCall:"Redundant Boolean call.",unexpectedNegation:"Redundant double negation."}},create(r){const i=r.sourceCode,s=new Set(["IfStatement","DoWhileStatement","WhileStatement","ConditionalExpression","ForStatement"]);function o(e){return"ChainExpression"===e.parent.type?o(e.parent):function(e){return function(e){return("CallExpression"===e.type||"NewExpression"===e.type)&&"Identifier"===e.callee.type&&"Boolean"===e.callee.name}(e.parent)&&e===e.parent.arguments[0]||s.has(e.parent.type)&&e===e.parent.test||"UnaryExpression"===e.parent.type&&"!"===e.parent.operator}(e)||function(e){return"LogicalExpression"===e.type&&("||"===e.operator||"&&"===e.operator)&&r.options.length&&!0===r.options[0].enforceForLogicalOperands}(e.parent)&&o(e.parent)}function a(e){return Boolean(i.getCommentsInside(e).length)}function l(r,s){if("ChainExpression"===r.parent.type)return l(r.parent,s);if(function(e){return t.isParenthesized(1,e,i)}(r))return!1;const o=r.parent;switch(o.type){case"CallExpression":case"NewExpression":return"SequenceExpression"===s.type;case"IfStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":return!1;case"ConditionalExpression":return n(s)<=n(o);case"UnaryExpression":return n(s)=t||S(e)))}function C(e){return a&&"AssignmentExpression"===e.test.type}function A(e){const n=r.getLastToken(e),i=r.getTokenBefore(n);return e.arguments.length>0||t.isOpeningParenToken(i)&&t.isClosingParenToken(n)&&e.callee.range[1]0&&n.test(e[t-1].value))return}}function a(){n.report({node:e,loc:s.loc,messageId:"unexpected",fix:L(e)?n=>{const i=r.text.slice(s.range[1],o.range[0]);return n.replaceTextRange([s.range[0],o.range[1]],(function(e){const n=r.getTokenBefore(e),i=r.getTokenBefore(n,{includeComments:!0}),s=r.getTokenAfter(n,{includeComments:!0});return i&&i.range[1]===n.range[0]&&n.range[1]===s.range[0]&&!t.canTokensBeAdjacent(i,s)}(e)?" ":"")+i+(function(e){const n=r.getTokensAfter(e,{count:2}),i=n[0],s=n[1],o=r.getLastToken(e);return i&&s&&!r.isSpaceBetweenTokens(i,s)&&!t.canTokensBeAdjacent(o,s)}(e)?" ":""))}:null})}b?b.reports.push({node:e,finishReport:a}):a()}function M(e){w(e.argument,s(e))&&B(e.argument)}function j(e){let t=e.object,n=e.object.type;for(;"MemberExpression"===n;)t=t.object,n=t.type;return"CallExpression"===n}function N(e){const t=e.callee;w(t,s(e))&&(!T(t)&&(R(e)||"NewExpression"===t.type&&!A(t)&&("NewExpression"!==e.type||A(e))||"NewExpression"===e.type&&"MemberExpression"===t.type&&j(t)||!e.optional&&"ChainExpression"===t.type)||B(e.callee)),e.arguments.filter((e=>w(e,y))).forEach(B)}function F(e){const n=s(e),r=s(e.left),i=s(e.right),o="**"===e.operator,a=c&&("BinaryExpression"===e.left.type||"LogicalExpression"===e.left.type),l=c&&("BinaryExpression"===e.right.type||"LogicalExpression"===e.right.type);!a&&O(e.left)&&((["AwaitExpression","UnaryExpression"].includes(e.left.type)&&o||t.isMixedLogicalAndCoalesceExpressions(e.left,e)||!(r>n||r===n&&!o))&&!S(e.left)||B(e.left)),!l&&O(e.right)&&(!t.isMixedLogicalAndCoalesceExpressions(e.right,e)&&(i>n||i===n&&o)||S(e.right))&&B(e.right)}function U(e){if(!e.superClass)return;(s(e.superClass)>_?O(e.superClass):T(e.superClass))&&B(e.superClass)}function V(e){w(e.argument,y)&&B(e.argument)}function K(e){const n=x(e)?r.getTokenBefore(e):r.getFirstToken(e),s=r.getTokenAfter(n,t.isNotOpeningParenToken),o=s?r.getTokenAfter(s):null,a=s?r.getTokenAfter(s,t.isNotClosingParenToken):null;t.isOpeningParenToken(n)&&(t.isOpeningBraceToken(s)||"Keyword"===s.type&&("function"===s.value||"class"===s.value||"let"===s.value&&a&&(t.isOpeningBracketToken(a)||"Identifier"===a.type))||s&&"Identifier"===s.type&&"async"===s.value&&o&&"Keyword"===o.type&&"function"===o.value)&&i.add(s);("ExportDefaultDeclaration"===e.parent.type?w(e,y):O(e))&&B(e)}function W(e,t){return function(e,t){const n=[e];let r=e;for(;r!==t;){if(r=r.parent,null===r)throw new Error("Nodes are not in the ancestor-descendant relationship.");n.push(r)}return n}(t,e).reverse()}function $(e,t){switch(e.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return e.params.includes(t);case"CallExpression":case"NewExpression":return e.arguments.includes(t);case"MemberExpression":return e.computed&&e.property===t;case"ConditionalExpression":return e.consequent===t;default:return!1}}function q(e){return b.reports.some((t=>t.node===e))}function Q(e){return"MemberExpression"===e.type&&("NewExpression"===e.parent.type&&e.parent.callee===e||e.parent.object===e&&Q(e.parent))}return{ArrayExpression(e){e.elements.filter((e=>e&&w(e,y))).forEach(B)},ArrayPattern(e){e.elements.filter((e=>I(e)&&O(e))).forEach(B)},ArrowFunctionExpression(e){if(!(k(e)||"ConditionalExpression"===e.body.type&&d||"BlockStatement"===e.body.type)){const n=r.getFirstToken(e.body,t.isNotOpeningParenToken),s=r.getTokenBefore(n);t.isOpeningParenToken(s)&&t.isOpeningBraceToken(n)&&i.add(n),w(e.body,y)&&B(e.body)}},AssignmentExpression(e){I(e.left)&&O(e.left)&&(!function({left:e,operator:t,right:n}){if("Identifier"===e.type&&["=","&&=","||=","??="].includes(t)){const e=n.type;if("ArrowFunctionExpression"===e)return!0;if(("FunctionExpression"===e||"ClassExpression"===e)&&!n.id)return!0}return!1}(e)||S(e.left))&&B(e.left),!k(e)&&w(e.right,s(e))&&B(e.right)},BinaryExpression(e){b&&"in"===e.operator&&b.inExpressionNodes.push(e),F(e)},CallExpression:N,ConditionalExpression(e){if(k(e))return;const t=new Set(["BinaryExpression","LogicalExpression"]);l&&t.has(e.test.type)||C(e)||!w(e.test,s({type:"LogicalExpression",operator:"||"}))||B(e.test),l&&t.has(e.consequent.type)||!w(e.consequent,y)||B(e.consequent),l&&t.has(e.alternate.type)||!w(e.alternate,y)||B(e.alternate)},DoWhileStatement(e){O(e.test)&&!C(e)&&B(e.test)},ExportDefaultDeclaration:e=>K(e.declaration),ExpressionStatement:e=>K(e.expression),ForInStatement(e){if("VariableDeclaration"!==e.left.type){const n=r.getFirstToken(e.left,t.isNotOpeningParenToken);"let"===n.value&&t.isOpeningBracketToken(r.getTokenAfter(n,t.isNotClosingParenToken))&&i.add(n)}O(e.left)&&B(e.left),O(e.right)&&B(e.right)},ForOfStatement(e){if("VariableDeclaration"!==e.left.type){const n=r.getFirstToken(e.left,t.isNotOpeningParenToken);"let"===n.value&&i.add(n)}O(e.left)&&B(e.left),w(e.right,y)&&B(e.right)},ForStatement(e){if(e.test&&O(e.test)&&!C(e)&&B(e.test),e.update&&O(e.update)&&B(e.update),e.init){if("VariableDeclaration"!==e.init.type){const n=r.getFirstToken(e.init,t.isNotOpeningParenToken);"let"===n.value&&t.isOpeningBracketToken(r.getTokenAfter(n,t.isNotClosingParenToken))&&i.add(n)}b={upper:b,inExpressionNodes:[],reports:[]},O(e.init)&&B(e.init)}},"ForStatement > *.init:exit"(e){b.reports.length&&b.inExpressionNodes.forEach((t=>{const n=W(e,t);let r;for(let e=0;et.node!==e))}(r)})),function(){const{upper:e,inExpressionNodes:t,reports:n}=b;e?(e.inExpressionNodes.push(...t),e.reports.push(...n)):n.forEach((({finishReport:e})=>e())),b=e}()},IfStatement(e){O(e.test)&&!C(e)&&B(e.test)},ImportExpression(e){const{source:t}=e;"SequenceExpression"===t.type?T(t)&&B(t):O(t)&&B(t)},LogicalExpression:F,MemberExpression(e){const n=Q(e)&&j(e)?T(e.object):O(e.object)&&!(v(e.parent)&&e.parent.callee===e&&m);n&&s(e.object)>=s(e)&&(e.computed||!(t.isDecimalInteger(e.object)||"Literal"===e.object.type&&e.object.regex))&&B(e.object),n&&"CallExpression"===e.object.type&&B(e.object),n&&!h&&"NewExpression"===e.object.type&&A(e.object)&&B(e.object),n&&e.optional&&"ChainExpression"===e.object.type&&B(e.object),e.computed&&O(e.property)&&B(e.property)},"MethodDefinition[computed=true]"(e){w(e.key,y)&&B(e.key)},NewExpression:N,ObjectExpression(e){e.properties.filter((e=>e.value&&w(e.value,y))).forEach((e=>B(e.value)))},ObjectPattern(e){e.properties.filter((e=>{const t=e.value;return I(t)&&O(t)})).forEach((e=>B(e.value)))},Property(e){if(e.computed){const{key:t}=e;t&&w(t,y)&&B(t)}},PropertyDefinition(e){e.computed&&w(e.key,y)&&B(e.key),e.value&&w(e.value,y)&&B(e.value)},RestElement(e){const t=e.argument;I(t)&&O(t)&&B(t)},ReturnStatement(e){const t=r.getFirstToken(e);k(e)||!e.argument||!D(t,e.argument)||"Literal"===e.argument.type&&e.argument.regex||B(e.argument)},SequenceExpression(e){const t=s(e);e.expressions.filter((e=>w(e,t))).forEach(B)},SwitchCase(e){e.test&&O(e.test)&&B(e.test)},SwitchStatement(e){O(e.discriminant)&&B(e.discriminant)},ThrowStatement(e){D(r.getFirstToken(e),e.argument)&&B(e.argument)},UnaryExpression:M,UpdateExpression(e){if(e.prefix)M(e);else{const{argument:t}=e,n=r.getLastToken(e);t.loc.end.line===n.loc.start.line?M(e):T(t)&&B(t)}},AwaitExpression:M,VariableDeclarator(e){!e.init||!w(e.init,y)||"Literal"===e.init.type&&e.init.regex||B(e.init)},WhileStatement(e){O(e.test)&&!C(e)&&B(e.test)},WithStatement(e){O(e.object)&&B(e.object)},YieldExpression(e){if(e.argument){const t=r.getFirstToken(e);(s(e.argument)>=s(e)&&D(t,e.argument)||T(e.argument))&&B(e.argument)}},ClassDeclaration:U,ClassExpression:U,SpreadElement:V,SpreadProperty:V,ExperimentalSpreadProperty:V,TemplateLiteral(e){e.expressions.filter((e=>e&&O(e))).forEach(B)},AssignmentPattern(e){const{left:t,right:n}=e;I(t)&&O(t)&&B(t),n&&w(n,y)&&B(n)}}}},LD}function Bj(){if(FD)return ND;FD=1;const{directivesPattern:e}=Pv(),t=/falls?\s?through/iu;function n(t,n){return n.test(t)&&!e.test(t.trim())}return ND={meta:{type:"problem",docs:{description:"Disallow fallthrough of `case` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-fallthrough"},schema:[{type:"object",properties:{commentPattern:{type:"string",default:""},allowEmptyCase:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{case:"Expected a 'break' statement before 'case'.",default:"Expected a 'break' statement before 'default'."}},create(e){const r=e.options[0]||{},i=[];let s=new Set;const o=e.sourceCode,a=r.allowEmptyCase||!1;let l=null,c=null;return c=r.commentPattern?new RegExp(r.commentPattern,"u"):t,{onCodePathStart(){i.push(s),s=new Set},onCodePathEnd(){s=i.pop()},onUnreachableCodePathSegmentStart(e){s.add(e)},onUnreachableCodePathSegmentEnd(e){s.delete(e)},onCodePathSegmentStart(e){s.add(e)},onCodePathSegmentEnd(e){s.delete(e)},SwitchCase(t){l&&!function(e,t,r,i){const s=r.sourceCode;if(1===e.consequent.length&&"BlockStatement"===e.consequent[0].type){const t=s.getLastToken(e.consequent[0]),r=s.getCommentsBefore(t).pop();if(r&&n(r.value,i))return!0}const o=s.getCommentsBefore(t).pop();return Boolean(o&&n(o.value,i))}(l,t,e,c)&&e.report({messageId:t.test?"case":"default",node:t}),l=null},"SwitchCase:exit"(e){const t=o.getTokenAfter(e);(function(e){for(const t of e)if(t.reachable)return!0;return!1})(s)&&(e.consequent.length>0||!a&&function(e,t){return t.loc.start.line>e.loc.end.line+1}(e,t))&&e.parent.cases[e.parent.cases.length-1]!==e&&(l=e)}}}},ND}function Mj(){if(WD)return KD;WD=1;const e=Pw();return KD={meta:{type:"problem",docs:{description:"Disallow reassigning `function` declarations",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-func-assign"},schema:[],messages:{isAFunction:"'{{name}}' is a function."}},create(t){const n=t.sourceCode;function r(n){var r;"FunctionName"===n.defs[0].type&&(r=n.references,e.getModifyingReferences(r).forEach((e=>{t.report({node:e.identifier,messageId:"isAFunction",data:{name:e.identifier.name}})})))}function i(e){n.getDeclaredVariables(e).forEach(r)}return{FunctionDeclaration:i,FunctionExpression:i}}},KD}function jj(){if(zD)return QD;zD=1;const e=Pw(),t=/^(?:i|lastI)ndexOf$/u;function n(e){return"Literal"===e.type&&"number"==typeof e.value||"CallExpression"===e.type&&("Number"===e.callee.name||"parseInt"===e.callee.name||"parseFloat"===e.callee.name)}function r(t){return e.isStringLiteral(t)||"CallExpression"===t.type&&"Identifier"===t.callee.type&&"String"===t.callee.name}function i(t){return e.isStringLiteral(t)&&(""===t.value||"TemplateLiteral"===t.type&&1===t.quasis.length&&""===t.quasis[0].value.cooked)}function s(e){return i(e.left)?e.right:e.left}return QD={meta:{type:"suggestion",docs:{description:"Disallow shorthand type conversions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-coercion"},fixable:"code",schema:[{type:"object",properties:{boolean:{type:"boolean",default:!0},number:{type:"boolean",default:!0},string:{type:"boolean",default:!0},disallowTemplateShorthand:{type:"boolean",default:!1},allow:{type:"array",items:{enum:["~","!!","+","*"]},uniqueItems:!0}},additionalProperties:!1}],messages:{useRecommendation:"use `{{recommendation}}` instead."}},create(o){const a=function(e){return{boolean:!("boolean"in e)||e.boolean,number:!("number"in e)||e.number,string:!("string"in e)||e.string,disallowTemplateShorthand:"disallowTemplateShorthand"in e&&e.disallowTemplateShorthand,allow:e.allow||[]}}(o.options[0]||{}),l=o.sourceCode;function c(t,n,r){o.report({node:t,messageId:"useRecommendation",data:{recommendation:n},fix(i){if(!r)return null;const s=l.getTokenBefore(t);return s&&s.range[1]===t.range[0]&&!e.canTokensBeAdjacent(s,n)?i.replaceText(t,` ${n}`):i.replaceText(t,n)}})}return{UnaryExpression(r){let i;if(i=a.allow.includes("!!"),!i&&a.boolean&&function(e){return"!"===e.operator&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}(r)){c(r,`Boolean(${l.getText(r.argument.argument)})`,!0)}if(i=a.allow.includes("~"),!i&&a.boolean&&function(n){if("~"!==n.operator)return!1;const r=e.skipChainExpression(n.argument);return"CallExpression"===r.type&&e.isSpecificMemberAccess(r.callee,null,t)}(r)){const e="ChainExpression"===r.argument.type?">= 0":"!== -1";c(r,`${l.getText(r.argument)} ${e}`,!1)}if(i=a.allow.includes("+"),!i&&a.number&&"+"===r.operator&&!n(r.argument)){c(r,`Number(${l.getText(r.argument)})`,!0)}},"BinaryExpression:exit"(t){let o;o=a.allow.includes("*");const u=!o&&a.number&&function(e){return"*"===e.operator&&("Literal"===e.left.type&&1===e.left.value||"Literal"===e.right.type&&1===e.right.value)}(t)&&!function(t,n){return"BinaryExpression"===t.type&&"*"===t.operator&&"Literal"===t.right.type&&1===t.right.value&&"BinaryExpression"===t.parent.type&&"/"===t.parent.operator&&t.parent.left===t&&!e.isParenthesised(n,t)}(t,l)&&function(e){const t=e.left,r=e.right;return"BinaryExpression"===r.type||n(r)?"BinaryExpression"===t.type||n(t)?null:t:r}(t);if(u){c(t,`Number(${l.getText(u)})`,!0)}if(o=a.allow.includes("+"),!o&&a.string&&function(e){return"+"===e.operator&&(i(e.left)&&!r(e.right)||i(e.right)&&!r(e.left))}(t)){c(t,`String(${l.getText(s(t))})`,!0)}},AssignmentExpression(e){if(!a.allow.includes("+")&&a.string&&function(e){return"+="===e.operator&&i(e.right)}(e)){const t=l.getText(s(e));c(e,`${t} = String(${t})`,!0)}},TemplateLiteral(e){if(!a.disallowTemplateShorthand)return;if("TaggedTemplateExpression"===e.parent.type)return;if(1!==e.expressions.length)return;if(""!==e.quasis[0].value.cooked)return;if(""!==e.quasis[1].value.cooked)return;if(r(e.expressions[0]))return;c(e,`String(${l.getText(e.expressions[0])})`,!0)}}}},QD}function Nj(){if(HD)return ZD;HD=1;const e=Pw(),{getStaticValue:t}=rS();return ZD={meta:{type:"suggestion",docs:{description:"Disallow the use of `eval()`-like methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implied-eval"},schema:[],messages:{impliedEval:"Implied eval. Consider passing a function instead of a string."}},create(n){const r=Object.freeze(["global","window","globalThis"]),i=/^(?:set(?:Interval|Timeout)|execScript)$/u,s=n.sourceCode;function o(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type||"BinaryExpression"===e.type&&"+"===e.operator&&(o(e.left)||o(e.right))}function a(e){const[r]=e.arguments;if(r){const i=t(r,s.getScope(e));(i&&"string"==typeof i.value||o(r))&&n.report({node:e,messageId:"impliedEval"})}}function l(t){const{references:n,name:r}=t;n.forEach((t=>{let n=t.identifier.parent;for(;e.isSpecificMemberAccess(n,null,r);)n=n.parent;if(e.isSpecificMemberAccess(n,null,i)){const e="ChainExpression"===n.parent.type?n.parent:n,t=e.parent;"CallExpression"===t.type&&t.callee===e&&a(t)}}))}return{CallExpression(t){e.isSpecificId(t.callee,i)&&a(t)},"Program:exit"(t){const n=s.getScope(t);r.map((t=>e.getVariableByName(n,t))).filter((e=>!!e&&0===e.defs.length)).forEach(l)}}}},ZD}function Fj(){if(JD)return YD;JD=1;const{findVariable:e}=rS(),t=Pw(),n=/^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,r=/^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u;function i(i,s){const{parent:o}=i;return"MemberExpression"===o.type&&o.object===i&&(function(e){const{parent:t}=e;return"AssignmentExpression"===t.type&&t.left===e||"ArrayPattern"===t.type||"Property"===t.type&&t.value===e&&"ObjectPattern"===t.parent.type||"RestElement"===t.type||"AssignmentPattern"===t.type&&t.left===e}(o)||function(e){const t="ChainExpression"===e.parent.type?e.parent:e,{parent:n}=t;return"UpdateExpression"===n.type&&n.argument===t||"UnaryExpression"===n.type&&"delete"===n.operator&&n.argument===t}(o)||function(e){const{parent:t}=e;return"ForInStatement"===t.type&&t.left===e||"ForOfStatement"===t.type&&t.left===e}(o))||function(i,s){const{parent:o}=i;if("CallExpression"!==o.type||o.arguments[0]!==i)return!1;const a=t.skipChainExpression(o.callee);if(!t.isSpecificMemberAccess(a,"Object",n)&&!t.isSpecificMemberAccess(a,"Reflect",r))return!1;const l=e(s,a.object);return null!==l&&"global"===l.scope.type}(i,s)}function s(e){let t=e.parent;for(;t&&"AssignmentExpression"!==t.type&&"UpdateExpression"!==t.type&&"UnaryExpression"!==t.type&&"CallExpression"!==t.type&&"ForInStatement"!==t.type&&"ForOfStatement"!==t.type;)t=t.parent;return t||e}return YD={meta:{type:"problem",docs:{description:"Disallow assigning to imported bindings",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-import-assign"},schema:[],messages:{readonly:"'{{name}}' is read-only.",readonlyMember:"The members of '{{name}}' are read-only."}},create(e){const t=e.sourceCode;return{ImportDeclaration(n){const r=t.getScope(n);for(const o of t.getDeclaredVariables(n)){const t=o.defs.some((e=>"ImportNamespaceSpecifier"===e.node.type));let n=null;for(const a of o.references){const o=a.identifier;o!==n&&(n=o,a.isWrite()?e.report({node:s(o),messageId:"readonly",data:{name:o.name}}):t&&i(o,r)&&e.report({node:s(o),messageId:"readonlyMember",data:{name:o.name}}))}}}}}},YD}function Uj(){if(sR)return iR;sR=1;const e=new(0,Tj().RegExpValidator),t=/[dgimsuvy]/gu,n=void 0;return iR={meta:{type:"problem",docs:{description:"Disallow invalid regular expression strings in `RegExp` constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-invalid-regexp"},schema:[{type:"object",properties:{allowConstructorFlags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{regexMessage:"{{message}}."}},create(r){const i=r.options[0];let s=null;if(i&&i.allowConstructorFlags){const e=i.allowConstructorFlags.join("").replace(t,"");e&&(s=new RegExp(`[${e}]`,"giu"))}function o(e,t){r.report({node:e,messageId:"regexMessage",data:{message:t}})}function a(e){return e&&"Literal"===e.type&&"string"==typeof e.value}function l(t,r){try{return e.validatePattern(t,n,n,r),null}catch(e){return e.message}}return{"CallExpression, NewExpression"(t){if("Identifier"!==t.callee.type||"RegExp"!==t.callee.name)return;let n=function(e){return e.arguments.length<2?"":a(e.arguments[1])?e.arguments[1].value:null}(t);n&&s&&(n=n.replace(s,""));let r=function(t){if(!t)return null;try{e.validateFlags(t)}catch{return`Invalid flags supplied to RegExp constructor '${t}'`}return t.includes("u")&&t.includes("v")?"Regex 'u' and 'v' flags cannot be used together":null}(n);if(r)return void o(t,r);if(!a(t.arguments[0]))return;const i=t.arguments[0].value;r=null===n?l(i,{unicode:!0,unicodeSets:!1})&&l(i,{unicode:!1,unicodeSets:!0})&&l(i,{unicode:!1,unicodeSets:!1}):l(i,{unicode:n.includes("u"),unicodeSets:n.includes("v")}),r&&o(t,r)}}}},iR}function Vj(){if(cR)return lR;cR=1;const e=Pw(),t=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/u,n=/[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/gmu,r=/[\u2028\u2029]/gmu,i=e.createGlobalLinebreakMatcher();return lR={meta:{type:"problem",docs:{description:"Disallow irregular whitespace",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-irregular-whitespace"},schema:[{type:"object",properties:{skipComments:{type:"boolean",default:!1},skipStrings:{type:"boolean",default:!0},skipTemplates:{type:"boolean",default:!1},skipRegExps:{type:"boolean",default:!1},skipJSXText:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noIrregularWhitespace:"Irregular whitespace not allowed."}},create(e){let s=[];const o=e.options[0]||{},a=!!o.skipComments,l=!1!==o.skipStrings,c=!!o.skipRegExps,u=!!o.skipTemplates,p=!!o.skipJSXText,d=e.sourceCode,f=d.getAllComments();function h(e){const t=e.loc.start,n=e.loc.end;s=s.filter((({loc:{start:e}})=>e.line=n.column||e.line>n.line))}function m(e){t.test(e.value)&&h(e)}function g(){}const y={};return t.test(d.getText())?(y.Program=function(e){!function(e){d.lines.forEach(((t,r)=>{const i=r+1;let o;for(;null!==(o=n.exec(t));)s.push({node:e,messageId:"noIrregularWhitespace",loc:{start:{line:i,column:o.index},end:{line:i,column:o.index+o[0].length}}})}))}(e),function(e){const t=d.getText(),n=d.lines,o=t.match(i);let a,l=-1;for(;null!==(a=r.exec(t));){const t=o.indexOf(a[0],l+1)||0;s.push({node:e,messageId:"noIrregularWhitespace",loc:{start:{line:t+1,column:n[t].length},end:{line:t+2,column:0}}}),l=t}}(e)},y.Literal=function(e){const n=l&&"string"==typeof e.value,r=c&&Boolean(e.regex);(n||r)&&t.test(e.raw)&&h(e)},y.TemplateElement=u?function(e){"string"==typeof e.value.raw&&t.test(e.value.raw)&&h(e)}:g,y.JSXText=p?function(e){t.test(e.raw)&&h(e)}:g,y["Program:exit"]=function(){a&&f.forEach(m),s.forEach((t=>e.report(t)))}):y.Program=g,y}},lR}function Kj(){if(fR)return dR;fR=1;const e=Pw();return dR={meta:{type:"suggestion",docs:{description:"Disallow labels that share a name with a variable",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-label-var"},schema:[],messages:{identifierClashWithLabel:"Found identifier with same name as label."}},create(t){const n=t.sourceCode;return{LabeledStatement(r){(function(t,n){return null!==e.getVariableByName(t,n)})(n.getScope(r),r.label.name)&&t.report({node:r,messageId:"identifierClashWithLabel"})}}}},dR}function Wj(){if(ER)return vR;function e(e){for(let t=e;t.parent;t=t.parent){const e=t.parent;switch(e.type){case"WhileStatement":case"DoWhileStatement":return e;case"ForStatement":if(e.init!==t)return e;break;case"ForInStatement":case"ForOfStatement":if(e.right!==t)return e;break;case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":return null}}return null}function t(t,n){const r=n.resolved,i=r&&r.defs[0],s=i&&i.parent,o=s&&"VariableDeclaration"===s.type?s.kind:"";if("const"===o)return!0;if("let"===o&&s.range[0]>t.range[0]&&s.range[1]=r;)i=s,s=e(s);return i}(t,"let"===o?s:null).range[0];return Boolean(r)&&r.references.every((function(e){const t=e.identifier;return!e.isWrite()||r.scope.variableScope===e.from.variableScope&&t.range[0]e.resolved&&!t(s,e))).map((e=>e.identifier.name));o.length>0&&n.report({node:i,messageId:"unsafeRefs",data:{varNames:`'${o.join("', '")}'`}})}return{ArrowFunctionExpression:i,FunctionExpression:i,FunctionDeclaration:i}}},vR}function $j(){return SR||(SR=1,xR={meta:{type:"problem",docs:{description:"Disallow literal numbers that lose precision",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-loss-of-precision"},schema:[],messages:{noLossOfPrecision:"This number literal will lose precision at runtime."}},create(e){function t(e){return e.raw.replace(/_/gu,"")}function n(e){return`${e[0]}.${e.slice(1)}`}function r(e){for(let t=0;t=0;t--)if("0"!==e[t])return e.slice(0,t+1);return e}(r(e));return{magnitude:e.startsWith("0")?e.length-2:e.length-1,coefficient:n(t)}}(i);return`${s.coefficient}e${t.length>1?parseInt(t[1],10)+s.magnitude:s.magnitude}`}function s(e){return function(e){return["0x","0X","0b","0B","0o","0O"].every((t=>!e.raw.startsWith(t)))&&!/^0[0-7]+$/u.test(e.raw)}(e)?function(e){const n=i(t(e)),r=n.split("e")[0].replace(".","").length;return r>100||n!==i(e.value.toPrecision(r))}(e):function(e){const n=t(e).toUpperCase();let r=0;return r=n.startsWith("0B")?2:n.startsWith("0X")?16:8,!n.endsWith(e.value.toString(r).toUpperCase())}(e)}return{Literal(t){t.value&&function(e){return"number"==typeof e.value}(t)&&s(t)&&e.report({messageId:"noLossOfPrecision",node:t})}}}}),xR}function qj(){if(TR)return OR;TR=1;const e=Pw();function t(e){return"string"==typeof e?BigInt(e.slice(0,-1)):e}return OR={meta:{type:"suggestion",docs:{description:"Disallow magic numbers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-magic-numbers"},schema:[{type:"object",properties:{detectObjects:{type:"boolean",default:!1},enforceConst:{type:"boolean",default:!1},ignore:{type:"array",items:{anyOf:[{type:"number"},{type:"string",pattern:"^[+-]?(?:0|[1-9][0-9]*)n$"}]},uniqueItems:!0},ignoreArrayIndexes:{type:"boolean",default:!1},ignoreDefaultValues:{type:"boolean",default:!1},ignoreClassFieldInitialValues:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"Number constants declarations must use 'const'.",noMagic:"No magic number: {{raw}}."}},create(n){const r=n.options[0]||{},i=!!r.detectObjects,s=!!r.enforceConst,o=new Set((r.ignore||[]).map(t)),a=!!r.ignoreArrayIndexes,l=!!r.ignoreDefaultValues,c=!!r.ignoreClassFieldInitialValues,u=i?[]:["ObjectExpression","Property","AssignmentExpression"];return{Literal(t){if(!e.isNumericLiteral(t))return;let r,i,p;"UnaryExpression"===t.parent.type&&"-"===t.parent.operator?(r=t.parent,i=-t.value,p=`-${t.raw}`):(r=t,i=t.value,p=t.raw);const d=r.parent;(function(e){return o.has(e)})(i)||l&&function(e){const t=e.parent;return"AssignmentPattern"===t.type&&t.right===e}(r)||c&&function(e){const t=e.parent;return"PropertyDefinition"===t.type&&t.value===e}(r)||function(t){const n=t.parent;return"CallExpression"===n.type&&t===n.arguments[1]&&(e.isSpecificId(n.callee,"parseInt")||e.isSpecificMemberAccess(n.callee,"Number","parseInt"))}(r)||function(e){return 0===e.parent.type.indexOf("JSX")}(r)||a&&function(e,t){const n=e.parent;return"MemberExpression"===n.type&&n.property===e&&(Number.isInteger(t)||"bigint"==typeof t)&&t>=0&&t<4294967295}(r,i)||("VariableDeclarator"===d.type?s&&"const"!==d.parent.kind&&n.report({node:r,messageId:"useConst"}):(!u.includes(d.type)||"AssignmentExpression"===d.type&&"Identifier"===d.left.type)&&n.report({node:r,messageId:"noMagic",data:{raw:p}}))}}}},OR}function Qj(){return BR||(BR=1,LR={isCombiningCharacter:CR?wR:(CR=1,wR=function(e){return/^[\p{Mc}\p{Me}\p{Mn}]$/u.test(String.fromCodePoint(e))}),isEmojiModifier:(PR||(PR=1,AR=function(e){return e>=127995&&e<=127999}),AR),isRegionalIndicatorSymbol:(DR||(DR=1,kR=function(e){return e>=127462&&e<=127487}),kR),isSurrogatePair:IR?RR:(IR=1,RR=function(e,t){return e>=55296&&e<56320&&t>=56320&&t<57344})}),LR}function zj(){if(jR)return MR;jR=1;const{RegExpValidator:e}=Tj();return MR={isValidWithUnicodeFlag:function(t,n){if(t<=5)return!1;const r=new e({ecmaVersion:Math.min(t,2024)});try{r.validatePattern(n,void 0,void 0,{unicode:!0})}catch{return!1}return!0},REGEXPP_LATEST_ECMA_VERSION:2024},MR}function Xj(){if(VR)return UR;VR=1;const e=Pw(),t=["+","-","*","/","%","**"],n=["&","|","^","~","<<",">>",">>>"],r=["==","!=","===","!==",">",">=","<","<="],i=["&&","||"],s=["in","instanceof"],o=[].concat(t,n,r,i,s,["?:"],["??"]),a=[t,n,r,i,s],l=/^(?:Binary|Logical|Conditional)Expression$/u;function c(e){return"ConditionalExpression"===e.type?e.test:e.left}return UR={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow mixed binary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{enum:o},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(t){const n=t.sourceCode,r=function(e={}){return{groups:e.groups&&e.groups.length>0?e.groups:a,allowSamePrecedence:!1!==e.allowSamePrecedence}}(t.options[0]);function i(t){return n.getTokenAfter(c(t),e.isNotClosingParenToken)}function s(s){l.test(s.parent.type)&&function(t){return t.operator!==t.parent.operator&&!e.isParenthesised(n,t)}(s)&&!function(t){const n=t,i=t.parent;return s=r.groups,o=n.operator,a="ConditionalExpression"===i.type?"?:":i.operator,!s.some((e=>e.includes(o)&&e.includes(a)))||r.allowSamePrecedence&&e.getPrecedence(n)===e.getPrecedence(i);var s,o,a}(s)&&function(e){const n=e.parent,r=c(n)===e?e:n,s=c(n)!==e?e:n,o={leftOperator:r.operator||"?:",rightOperator:s.operator||"?:"};t.report({node:r,loc:i(r).loc,messageId:"unexpectedMixedOperator",data:o}),t.report({node:s,loc:i(s).loc,messageId:"unexpectedMixedOperator",data:o})}(s)}return{BinaryExpression:s,LogicalExpression:s}}},UR}function Gj(){return WR||(WR=1,KR={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `require` calls to be mixed with regular variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-mixed-requires"},schema:[{oneOf:[{type:"boolean"},{type:"object",properties:{grouping:{type:"boolean"},allowCall:{type:"boolean"}},additionalProperties:!1}]}],messages:{noMixRequire:"Do not mix 'require' and other declarations.",noMixCoreModuleFileComputed:"Do not mix core, module, file and computed requires."}},create(e){const t=e.options[0];let n=!1,r=!1;"object"==typeof t?(n=t.grouping,r=t.allowCall):n=!!t;const i=["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","smalloc","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"],s="require",o="uninitialized",a="other",l="computed";function c(e){return e?"CallExpression"===e.type&&"Identifier"===e.callee.type&&"require"===e.callee.name?s:r&&"CallExpression"===e.type&&"CallExpression"===e.callee.type?c(e.callee):"MemberExpression"===e.type?c(e.object):a:o}function u(e){if("MemberExpression"===e.type)return u(e.object);if(0===e.arguments.length)return l;const t=e.arguments[0];return"Literal"!==t.type||"string"!=typeof t.value?l:i.includes(t.value)?"core":/^\.{0,2}\//u.test(t.value)?"file":"module"}function p(e){const t={};return e.forEach((e=>{c(e.init)===s&&(t[u(e.init)]=!0)})),Object.keys(t).length<=1}return{VariableDeclaration(t){!function(e){const t={};return e.forEach((e=>{const n=c(e.init);t[n]=!0})),!(!t[s]||!t[o]&&!t[a])}(t.declarations)?n&&!p(t.declarations)&&e.report({node:t,messageId:"noMixCoreModuleFileComputed"}):e.report({node:t,messageId:"noMixRequire"})}}}}),KR}function Zj(){if(CI)return wI;CI=1;const{getVariableByName:e,isArrowToken:t,isStartOfExpressionStatement:n,needsPrecedingSemicolon:r}=Pw();return wI={meta:{type:"suggestion",docs:{description:"Disallow calls to the `Object` constructor without an argument",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-object-constructor"},hasSuggestions:!0,schema:[],messages:{preferLiteral:"The object literal notation {} is preferable.",useLiteral:"Replace with '{{replacement}}'.",useLiteralAfterSemicolon:"Replace with '{{replacement}}', add preceding semicolon."}},create(i){const s=i.sourceCode;function o(o){if("Identifier"!==o.callee.type||"Object"!==o.callee.name||o.arguments.length)return;const a=e(s.getScope(o),"Object");if(a&&0===a.identifiers.length){let e,a,l="useLiteral";!function(e){if(n(e))return!0;const r=s.getTokenBefore(e);return!(!r||!t(r))}(o)?e=a="{}":(e="({})",r(s,o)?(a=";({})",l="useLiteralAfterSemicolon"):a="({})"),i.report({node:o,messageId:"preferLiteral",suggest:[{messageId:l,data:{replacement:e},fix:e=>e.replaceText(o,a)}]})}}return{CallExpression:o,NewExpression:o}}},wI}function Hj(){if(II)return RI;II=1;const e=/(?:Statement|Declaration|Function(?:Expression)?|Program)$/u;return RI={meta:{type:"suggestion",docs:{description:"Disallow reassigning `function` parameters",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-param-reassign"},schema:[{oneOf:[{type:"object",properties:{props:{enum:[!1]}},additionalProperties:!1},{type:"object",properties:{props:{enum:[!0]},ignorePropertyModificationsFor:{type:"array",items:{type:"string"},uniqueItems:!0},ignorePropertyModificationsForRegex:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}]}],messages:{assignmentToFunctionParam:"Assignment to function parameter '{{name}}'.",assignmentToFunctionParamProp:"Assignment to property of function parameter '{{name}}'."}},create(t){const n=t.options[0]&&t.options[0].props,r=t.options[0]&&t.options[0].ignorePropertyModificationsFor||[],i=t.options[0]&&t.options[0].ignorePropertyModificationsForRegex||[],s=t.sourceCode;function o(s,o,a){const l=s.identifier;var c;!l||s.init||0!==o&&a[o-1].identifier===l||(s.isWrite()?t.report({node:l,messageId:"assignmentToFunctionParam",data:{name:l.name}}):n&&function(t){let n=t.identifier,r=n.parent;for(;r&&(!e.test(r.type)||"ForInStatement"===r.type||"ForOfStatement"===r.type);){switch(r.type){case"AssignmentExpression":case"ForInStatement":case"ForOfStatement":return r.left===n;case"UpdateExpression":return!0;case"UnaryExpression":if("delete"===r.operator)return!0;break;case"CallExpression":if(r.callee!==n)return!1;break;case"MemberExpression":if(r.property===n)return!1;break;case"Property":if(r.key===n)return!1;break;case"ConditionalExpression":if(r.test===n)return!1}n=r,r=n.parent}return!1}(s)&&(c=l.name,!r.includes(c)&&!i.some((e=>new RegExp(e,"u").test(c))))&&t.report({node:l,messageId:"assignmentToFunctionParamProp",data:{name:l.name}}))}function a(e){"Parameter"===e.defs[0].type&&e.references.forEach(o)}function l(e){s.getDeclaredVariables(e).forEach(a)}return{"FunctionDeclaration:exit":l,"FunctionExpression:exit":l,"ArrowFunctionExpression:exit":l}}},RI}function Yj(){if(jI)return MI;function e(t){const n=t.parent;return"SequenceExpression"===n.type?e(n):function(e){const t=e.parent;return"ForStatement"===t.type&&t.update===e}(t)}return jI=1,MI={meta:{type:"suggestion",docs:{description:"Disallow the unary operators `++` and `--`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-plusplus"},schema:[{type:"object",properties:{allowForLoopAfterthoughts:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedUnaryOp:"Unary operator '{{operator}}' used."}},create(t){const n=t.options[0];let r=!1;return"object"==typeof n&&(r=!0===n.allowForLoopAfterthoughts),{UpdateExpression(n){r&&e(n)||t.report({node:n,messageId:"unexpectedUnaryOp",data:{operator:n.operator}})}}}},MI}function Jj(){if(WI)return KI;WI=1;const{findVariable:e}=rS(),t=Pw(),n=new Set(["ArrowFunctionExpression","FunctionExpression"]);function r(t,n){const r=t.parent;return"NewExpression"===r.type&&r.arguments[0]===t&&"Identifier"===r.callee.type&&"Promise"===r.callee.name&&function(t,n){const r=e(n,t);return null!==r&&"global"===r.scope.type&&0===r.defs.length}(r.callee,function(e){const t=e.upper;return"function-expression-name"===t.type?t.upper:t}(n))}function i(e){return"UnaryExpression"===e.type&&"void"===e.operator}function s(e,n,r){const i=t.getPrecedence(n)"Keyword"===e.type&&"return"===e.value),o=e.getTokenAfter(s),a="return"===s.value&&s.range[1]===o.range[0];return[r.insertTextBefore(o,`${a?" ":""}void ${i?"(":""}`),r.insertTextAfter(n,i?")":"")]}return KI={meta:{type:"problem",docs:{description:"Disallow returning values from Promise executor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-promise-executor-return"},hasSuggestions:!0,schema:[{type:"object",properties:{allowVoid:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{returnsValue:"Return values from promise executor functions cannot be read.",prependVoid:"Prepend `void` to the expression.",wrapBraces:"Wrap the expression in `{}`."}},create(e){let o=null;const a=e.sourceCode,{allowVoid:l=!1}=e.options[0]||{};return{onCodePathStart(c,u){if(o={upper:o,shouldCheck:n.has(u.type)&&r(u,a.getScope(u))},o.shouldCheck&&"ArrowFunctionExpression"===u.type&&u.expression&&(!l||!i(u.body))){const n=[];l&&n.push({messageId:"prependVoid",fix(e){return s(a,u.body,e)}}),("FunctionExpression"!==u.body.type||u.body.id)&&n.push({messageId:"wrapBraces",fix(e){return function(e,n,r){const i=e.getTokenBefore(n.body,t.isArrowToken),s=e.getTokenAfter(i),o=e.getLastToken(n);return[r.insertTextBefore(s,"{"),r.insertTextAfter(o,"}")]}(a,u,e)}}),e.report({node:u.body,messageId:"returnsValue",suggest:n})}},onCodePathEnd(){o=o.upper},ReturnStatement(t){o.shouldCheck&&t.argument&&(l?i(t.argument)||e.report({node:t,messageId:"returnsValue",suggest:[{messageId:"prependVoid",fix(e){return s(a,t.argument,e)}}]}):e.report({node:t,messageId:"returnsValue"}))}}}},KI}function eN(){if(zI)return QI;zI=1;const e=Pw();function t(e){let n;if("MemberExpression"===e.type)n=e.object;else{if("CallExpression"!==e.type)return!1;n=e.callee}return!!e.optional||t(n)}return QI={meta:{type:"problem",docs:{description:"Disallow calling some `Object.prototype` methods directly on objects",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-prototype-builtins"},hasSuggestions:!0,schema:[],messages:{prototypeBuildIn:"Do not access Object.prototype method '{{prop}}' from target object.",callObjectPrototype:"Call Object.prototype.{{prop}} explicitly."}},create(n){const r=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);return{CallExpression:function(i){const s=e.skipChainExpression(i.callee);if("MemberExpression"!==s.type)return;const o=e.getStaticPropertyName(s);null!==o&&r.has(o)&&n.report({messageId:"prototypeBuildIn",loc:s.property.loc,data:{prop:o},node:i,suggest:[{messageId:"callObjectPrototype",data:{prop:o},fix(r){const a=n.sourceCode;if(t(i))return null;if("ChainExpression"===i.callee.type)return null;const l=e.getVariableByName(a.getScope(i),"Object");if(!l||"global"!==l.scope.type||l.defs.length>0)return null;let c=a.getText(s.object);e.getPrecedence(s.object)<=e.getPrecedence({type:"SequenceExpression"})&&(c=`(${c})`);const u=a.getTokenAfter(i.callee,e.isOpeningParenToken),p=0===i.arguments.length?"":", ";return[r.replaceText(s,`Object.prototype.${o}.call`),r.insertTextAfter(u,c+p)]}}]})}}}},QI}function tN(){if(rL)return nL;function e(e){return Array.isArray(e)?e:[e]}rL=1;const t=/^\s+$/,n=/(?:[^\\]|^)\\$/,r=/^\\!/,i=/^\\#/,s=/\r?\n/g,o=/^\.*\/|^\.+$/;let a="node-ignore";"undefined"!=typeof Symbol&&(a=Symbol.for("node-ignore"));const l=a,c=/([0-z])-([0-z])/g,u=()=>!1,p=[[/\\?\s+$/,e=>0===e.indexOf("\\")?" ":""],[/\\\s/g,()=>" "],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${i}`:"]"===i&&r.length%2==0?`[${(e=>e.replace(c,((e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:"")))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],d=Object.create(null),f=e=>"string"==typeof e;class h{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}}const m=(e,t)=>{const n=e;let s=!1;0===e.indexOf("!")&&(s=!0,e=e.substr(1));const o=((e,t)=>{let n=d[e];return n||(n=p.reduce(((t,n)=>t.replace(n[0],n[1].bind(e))),e),d[e]=n),t?new RegExp(n,"i"):new RegExp(n)})(e=e.replace(r,"!").replace(i,"#"),t);return new h(n,e,s,o)},g=(e,t)=>{throw new t(e)},y=(e,t,n)=>{if(!f(e))return n(`path must be a string, but got \`${t}\``,TypeError);if(!e)return n("path must not be empty",TypeError);if(y.isNotRelative(e)){return n(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},_=e=>o.test(e);y.isNotRelative=_,y.convert=e=>e;class b{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){var r,i,s;r=this,i=l,s=!0,Object.defineProperty(r,i,{value:s}),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[l])return this._rules=this._rules.concat(e._rules),void(this._added=!0);if((e=>e&&f(e)&&!t.test(e)&&!n.test(e)&&0!==e.indexOf("#"))(e)){const t=m(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(t){return this._added=!1,e(f(t)?(e=>e.split(s))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach((i=>{const{negative:s}=i;if(r===s&&n!==r||s&&!n&&!r&&!t)return;i.regex.test(e)&&(n=!s,r=s)})),{ignored:n,unignored:r}}_test(e,t,n,r){const i=e&&y.convert(e);return y(i,e,this._allowRelativePaths?u:g),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split("/")),r.pop(),!r.length)return t[e]=this._testOne(e,n);const i=this._t(r.join("/")+"/",t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(t){return e(t).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const v=e=>new b(e);if(v.isPathValid=e=>y(e&&y.convert(e),e,u),v.default=v,nL=v,void 0!==by&&({NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.IGNORE_TEST_WIN32||"win32"===by.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");y.convert=e;const t=/^[a-z]:\//i;y.isNotRelative=e=>t.test(e)||_(e)}return nL}function nN(){if(sL)return iL;sL=1;const e=Pw(),t=tN(),n={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1},importNames:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return iL={meta:{type:"suggestion",docs:{description:"Disallow specified modules when loaded by `import`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-imports"},messages:{path:"'{{importSource}}' import is restricted from being used.",pathWithCustomMessage:"'{{importSource}}' import is restricted from being used. {{customMessage}}",patterns:"'{{importSource}}' import is restricted from being used by a pattern.",patternWithCustomMessage:"'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",patternAndImportName:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",patternAndImportNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",patternAndEverythingWithRegexImportName:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",patternAndEverythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",patternAndEverythingWithRegexImportNameAndCustomMessage:"* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",everything:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",everythingWithCustomMessage:"* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",importName:"'{{importName}}' import from '{{importSource}}' is restricted.",importNameWithCustomMessage:"'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}"},schema:{anyOf:[n,{type:"array",items:[{type:"object",properties:{paths:n,patterns:{anyOf:[{type:"array",items:{type:"string"},uniqueItems:!0},{type:"array",items:{type:"object",properties:{importNames:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},group:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},importNamePattern:{type:"string"},message:{type:"string",minLength:1},caseSensitive:{type:"boolean"}},additionalProperties:!1,required:["group"]},uniqueItems:!0}]}},additionalProperties:!1}],additionalItems:!1}]}},create(n){const r=n.sourceCode,i=Array.isArray(n.options)?n.options:[],s="object"==typeof i[0]&&(Object.prototype.hasOwnProperty.call(i[0],"paths")||Object.prototype.hasOwnProperty.call(i[0],"patterns")),o=(s?i[0].paths:n.options)||[],a=o.reduce(((e,t)=>("string"==typeof t?e[t]={message:null}:e[t.name]={message:t.message,importNames:t.importNames},e)),{});let l=(s?i[0].patterns:[])||[];l.length>0&&"string"==typeof l[0]&&(l=[{group:l}]);const c=l.map((({group:e,message:n,caseSensitive:r,importNames:i,importNamePattern:s})=>({matcher:t({allowRelativePaths:!0,ignorecase:!r}).add(e),customMessage:n,importNames:i,importNamePattern:s})));if(0===Object.keys(o).length&&0===c.length)return{};function u(t){const i=t.source.value.trim(),s=new Map;if("ExportAllDeclaration"===t.type){const e=r.getFirstToken(t,1);s.set("*",[{loc:e.loc}])}else if(t.specifiers)for(const n of t.specifiers){let t;const r={loc:n.loc};"ImportDefaultSpecifier"===n.type?t="default":"ImportNamespaceSpecifier"===n.type?t="*":n.imported?t=e.getModuleExportName(n.imported):n.local&&(t=e.getModuleExportName(n.local)),"string"==typeof t&&(s.has(t)?s.get(t).push(r):s.set(t,[r]))}!function(e,t,r){if(!Object.prototype.hasOwnProperty.call(a,e))return;const i=a[e].message,s=a[e].importNames;if(s){if(t.has("*")){const o=t.get("*")[0];n.report({node:r,messageId:i?"everythingWithCustomMessage":"everything",loc:o.loc,data:{importSource:e,importNames:s,customMessage:i}})}s.forEach((s=>{t.has(s)&&t.get(s).forEach((t=>{n.report({node:r,messageId:i?"importNameWithCustomMessage":"importName",loc:t.loc,data:{importSource:e,customMessage:i,importName:s}})}))}))}else n.report({node:r,messageId:i?"pathWithCustomMessage":"path",data:{importSource:e,customMessage:i}})}(i,s,t),c.forEach((e=>{(function(e,t){return t.matcher.ignores(e)})(i,e)&&function(e,t,r){const i=e.source.value.trim(),s=t.customMessage,o=t.importNames,a=t.importNamePattern?new RegExp(t.importNamePattern,"u"):null;o||a?r.forEach(((t,r)=>{if("*"!==r)(o&&o.includes(r)||a&&a.test(r))&&t.forEach((t=>{n.report({node:e,messageId:s?"patternAndImportNameWithCustomMessage":"patternAndImportName",loc:t.loc,data:{importSource:i,customMessage:s,importName:r}})}));else{const[r]=t;o?n.report({node:e,messageId:s?"patternAndEverythingWithCustomMessage":"patternAndEverything",loc:r.loc,data:{importSource:i,importNames:o,customMessage:s}}):n.report({node:e,messageId:s?"patternAndEverythingWithRegexImportNameAndCustomMessage":"patternAndEverythingWithRegexImportName",loc:r.loc,data:{importSource:i,importNames:a,customMessage:s}})}})):n.report({node:e,messageId:s?"patternWithCustomMessage":"patterns",data:{importSource:i,customMessage:s}})}(t,e,s)}))}return{ImportDeclaration:u,ExportNamedDeclaration(e){e.source&&u(e)},ExportAllDeclaration:u}}},iL}function rN(){if(aL)return oL;aL=1;const e=Pw(),t=tN(),n={type:"array",items:{anyOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string",minLength:1}},additionalProperties:!1,required:["name"]}]},uniqueItems:!0};return oL={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow specified modules when loaded by `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-modules"},schema:{anyOf:[n,{type:"array",items:{type:"object",properties:{paths:n,patterns:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1},additionalItems:!1}]},messages:{defaultMessage:"'{{name}}' module is restricted from being used.",customMessage:"'{{name}}' module is restricted from being used. {{customMessage}}",patternMessage:"'{{name}}' module is restricted from being used by a pattern."}},create(n){const r=Array.isArray(n.options)?n.options:[],i="object"==typeof r[0]&&(Object.prototype.hasOwnProperty.call(r[0],"paths")||Object.prototype.hasOwnProperty.call(r[0],"patterns")),s=(i?r[0].paths:n.options)||[],o=(i?r[0].patterns:[])||[],a=s.reduce(((e,t)=>("string"==typeof t?e[t]=null:e[t.name]=t.message,e)),{});if(0===Object.keys(s).length&&0===o.length)return{};const l=t({allowRelativePaths:!0}).add(o);return{CallExpression(t){if(function(e){return"Identifier"===e.callee.type&&"require"===e.callee.name}(t)&&t.arguments.length){const r=function(t){return function(e){return e&&"Literal"===e.type&&"string"==typeof e.value}(t)?t.value.trim():e.isStaticTemplateLiteral(t)?t.quasis[0].value.cooked.trim():null}(t.arguments[0]);r&&(function(e){return Object.prototype.hasOwnProperty.call(a,e)}(r)&&function(e,t){const r=a[t],i=r?"customMessage":"defaultMessage";n.report({node:e,messageId:i,data:{name:t,customMessage:r}})}(t,r),o.length>0&&l.ignores(r)&&n.report({node:t,messageId:"patternMessage",data:{name:r}}))}}}}},oL}function iN(){if(mL)return hL;mL=1;const e=Pw();return hL={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow unnecessary `return await`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-await"},fixable:null,deprecated:!0,replacedBy:[],schema:[],messages:{removeAwait:"Remove redundant `await`.",redundantUseOfAwait:"Redundant use of `await` on a return value."}},create(t){function n(t){let n=t;for(;!e.isFunction(n)&&"Program"!==n.type;){if("TryStatement"===n.parent.type&&(n===n.parent.block||n===n.parent.handler&&n.parent.finalizer))return!0;n=n.parent}return!1}function r(e){return"ArrowFunctionExpression"===e.parent.type||("ReturnStatement"===e.parent.type?!n(e.parent):"ConditionalExpression"!==e.parent.type||e!==e.parent.consequent&&e!==e.parent.alternate?("LogicalExpression"===e.parent.type&&e===e.parent.right||"SequenceExpression"===e.parent.type&&e===e.parent.expressions[e.parent.expressions.length-1])&&r(e.parent):r(e.parent))}return{AwaitExpression(e){r(e)&&!n(e)&&function(e){t.report({node:t.sourceCode.getFirstToken(e),loc:e.loc,messageId:"redundantUseOfAwait",suggest:[{messageId:"removeAwait",fix(n){const r=t.sourceCode,[i,s]=r.getFirstTokens(e,2);if(i.loc.start.line!==s.loc.start.line)return null;const[o,a]=i.range,l=[o,a+(" "===r.text[a]?1:0)];return n.removeRange(l)}}]})}(e)}}}},hL}function sN(){if(bL)return _L;bL=1;const e=Pw(),t=/\s+/gu;function n(t,r,i,s){if(t&&r)if("Identifier"===t.type&&"Identifier"===r.type&&t.name===r.name)s(r);else if("ArrayPattern"===t.type&&"ArrayExpression"===r.type){const e=Math.min(t.elements.length,r.elements.length);for(let o=0;o=1){let e=0;for(let t=r.properties.length-1;t>=0;--t){const n=r.properties[t].type;if("SpreadElement"===n||"ExperimentalSpreadProperty"===n){e=t+1;break}}for(let o=0;o","<",">=","<="]).has(n.operator)&&function(e,n){const r=t.getTokens(e),i=t.getTokens(n);return r.length===i.length&&r.every(((e,t)=>e.type===i[t].type&&e.value===i[t].value))}(n.left,n.right)&&e.report({node:n,messageId:"comparingToSelf"})}}}}),vL}function aN(){if(SL)return xL;SL=1;const e=Pw(),t={allowInParentheses:!0};return xL={meta:{type:"suggestion",docs:{description:"Disallow comma operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sequences"},schema:[{properties:{allowInParentheses:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedCommaExpression:"Unexpected use of comma operator."}},create(n){const r=Object.assign({},t,n.options[0]),i=n.sourceCode,s={DoWhileStatement:"test",IfStatement:"test",SwitchStatement:"discriminant",WhileStatement:"test",WithStatement:"object",ArrowFunctionExpression:"body"};function o(t){return e.isParenthesised(i,t)}return{SequenceExpression(t){if("ForStatement"===t.parent.type&&(t===t.parent.init||t===t.parent.update))return;if(r.allowInParentheses)if(function(e){return e.parent&&s[e.parent.type]&&e===e.parent[s[e.parent.type]]}(t)){if(function(t){const n=i.getTokenBefore(t,1),r=i.getTokenAfter(t,1);return o(t)&&n&&r&&e.isOpeningParenToken(n)&&n.range[1]<=t.range[0]&&e.isClosingParenToken(r)&&r.range[0]>=t.range[1]}(t))return}else if(o(t))return;const a=i.getTokenAfter(t.expressions[0],e.isCommaToken);n.report({node:t,loc:a.loc,messageId:"unexpectedCommaExpression"})}}}},xL}function lN(){if(TL)return OL;TL=1;const e=Pw(),{findVariable:t}=rS();function n(n,r,i,s,o){const a=n.parent;return"CallExpression"===a.type&&a.arguments[o]===n&&e.isSpecificMemberAccess(a.callee,i,s)&&function(e,n){const r=t(n,e);return null!==r&&"global"===r.scope.type&&0===r.defs.length}(e.skipChainExpression(a.callee).object,r)}function r(t,r){const i=t.parent;return("Property"===i.type||"MethodDefinition"===i.type)&&"set"===i.kind&&i.value===t||!("Property"!==i.type||i.value!==t||"set"!==e.getStaticPropertyName(i)||"ObjectExpression"!==i.parent.type||!function(e,t){if(n(e,t,"Object","defineProperty",2)||n(e,t,"Reflect","defineProperty",2))return!0;const r=e.parent;if("Property"===r.type&&r.value===e){const e=r.parent;if("ObjectExpression"===e.type&&(n(e,t,"Object","create",1)||n(e,t,"Object","defineProperties",1)))return!0}return!1}(i.parent,r))}return OL={meta:{type:"problem",docs:{description:"Disallow returning values from setters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-setter-return"},schema:[],messages:{returnsValue:"Setter cannot return a value."}},create(e){let t=null;const n=e.sourceCode;function i(e){const i=function(e){const t=e.upper;return"function-expression-name"===t.type?t.upper:t}(n.getScope(e));t={upper:t,isSetter:r(e,i)}}function s(){t=t.upper}function o(t){e.report({node:t,messageId:"returnsValue"})}return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression(e){i(e),t.isSetter&&e.expression&&o(e.body)},"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s,ReturnStatement(e){t&&t.isSetter&&e.argument&&o(e)}}}},OL}function cN(){if(WL)return KL;WL=1;const e=Pw();return KL={meta:{type:"problem",docs:{description:"Disallow `this`/`super` before calling `super()` in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-this-before-super"},schema:[],messages:{noBeforeSuper:"'{{kind}}' is not allowed before 'super()'."}},create(t){let n=null,r=Object.create(null);function i(e){return!e.reachable||r[e.id].superCalled}function s(){return Boolean(n&&n.isConstructor&&n.hasExtends)}function o(){return s()&&!function(e){for(const t of e)if(!i(t))return!1;return!0}(n.currentSegments)}function a(e){const t=n.currentSegments;for(const n of t)n.reachable&&r[n.id].invalidNodes.push(e)}return{onCodePathStart(t,r){if(function(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}(r)){const i=r.parent.parent.parent;n={upper:n,isConstructor:!0,hasExtends:Boolean(i.superClass&&!e.isNullOrUndefined(i.superClass)),codePath:t,currentSegments:new Set}}else n={upper:n,isConstructor:!1,hasExtends:!1,codePath:t,currentSegments:new Set}},onCodePathEnd(e){const i=n.hasExtends;n=n.upper,i&&e.traverseSegments(((e,n)=>{const i=r[e.id];for(let e=0;e0&&e.prevSegments.every(i),invalidNodes:[]})},onUnreachableCodePathSegmentStart(e){n.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentLoop(e,t){s()&&n.codePath.traverseSegments({first:t,last:e},((e,t)=>{const n=r[e.id];n.superCalled?(n.invalidNodes=[],t.skip()):e.prevSegments.length>0&&e.prevSegments.every(i)&&(n.superCalled=!0,n.invalidNodes=[])}))},ThisExpression(e){o()&&a(e)},Super(t){!e.isCallee(t)&&o()&&a(t)},"CallExpression:exit"(e){"Super"===e.callee.type&&o()&&function(){const e=n.currentSegments;for(const t of e)t.reachable&&(r[t.id].superCalled=!0)}()},"Program:exit"(){r=Object.create(null)}}}},KL}function uN(){if(zL)return QL;zL=1;const e=Pw();return QL={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-trailing-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(t){const n=t.sourceCode,r="[ \t  -​ ]",i=`^${r}*$`,s=`${r}+$`,o=t.options[0]||{},a=o.skipBlankLines||!1,l=o.ignoreComments||!1;function c(e,n,r){t.report({node:e,loc:n,messageId:"trailingSpace",fix(e){return e.removeRange(r)}})}return{Program:function(t){const r=new RegExp(s,"u"),o=new RegExp(i,"u"),u=n.lines,p=n.getText().match(e.createGlobalLinebreakMatcher()),d=function(e){const t=new Set;return e.forEach((e=>{const n="Block"===e.type?e.loc.end.line-1:e.loc.end.line;for(let r=e.loc.start.line;r<=n;r++)t.add(r)})),t}(n.getAllComments());let f=0,h=[];for(let e=0,i=u.length;e_.parent.range[0]&&y<_.parent.range[1]){f+=m;continue}if(a&&o.test(u[e])){f+=m;continue}h=[p,y],l&&d.has(i)||c(t,r,h)}f+=m}}}}},QL}function pN(){return tB||(tB=1,eB={meta:{type:"suggestion",docs:{description:"Disallow dangling underscores in identifiers",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-underscore-dangle"},schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},allowAfterThis:{type:"boolean",default:!1},allowAfterSuper:{type:"boolean",default:!1},allowAfterThisConstructor:{type:"boolean",default:!1},enforceInMethodNames:{type:"boolean",default:!1},allowFunctionParams:{type:"boolean",default:!0},enforceInClassFields:{type:"boolean",default:!1},allowInArrayDestructuring:{type:"boolean",default:!0},allowInObjectDestructuring:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedUnderscore:"Unexpected dangling '_' in '{{identifier}}'."}},create(e){const t=e.options[0]||{},n=t.allow?t.allow:[],r=void 0!==t.allowAfterThis&&t.allowAfterThis,i=void 0!==t.allowAfterSuper&&t.allowAfterSuper,s=void 0!==t.allowAfterThisConstructor&&t.allowAfterThisConstructor,o=void 0!==t.enforceInMethodNames&&t.enforceInMethodNames,a=void 0!==t.enforceInClassFields&&t.enforceInClassFields,l=void 0===t.allowFunctionParams||t.allowFunctionParams,c=void 0===t.allowInArrayDestructuring||t.allowInArrayDestructuring,u=void 0===t.allowInObjectDestructuring||t.allowInObjectDestructuring,p=e.sourceCode;function d(e){return n.includes(e)}function f(e){const t=e.length;return"_"!==e&&("_"===e[0]||"_"===e[t-1])}function h(t){if("FunctionDeclaration"===t.type&&t.id){const n=t.id.name;void 0!==n&&f(n)&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:n}})}!function(t){l||t.params.forEach((t=>{const{type:n}=t;let r;if(r="RestElement"===n?t.argument:"AssignmentPattern"===n?t.left:t,"Identifier"===r.type){const n=r.name;f(n)&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:n}})}}))}(t)}function m(t){const n=t.key.name,r="MethodDefinition"===t.type||"Property"===t.type&&t.method;void 0!==n&&o&&r&&f(n)&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:"PrivateIdentifier"===t.key.type?`#${n}`:n}})}return{FunctionDeclaration:h,VariableDeclarator:function(t){p.getDeclaredVariables(t).forEach((n=>{const r=n.defs.find((e=>e.node===t)).name,i=r.name;let s=r.parent;for(;!["VariableDeclarator","ArrayPattern","ObjectPattern"].includes(s.type);)s=s.parent;!f(i)||function(e){return"_"===e}(i)||d(i)||c&&"ArrayPattern"===s.type||u&&"ObjectPattern"===s.type||e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:i}})}))},MemberExpression:function(t){const n=t.property.name,o="ThisExpression"===t.object.type,a="Super"===t.object.type,l=function(e){return"MemberExpression"===e.object.type&&"constructor"===e.object.property.name&&"ThisExpression"===e.object.object.type}(t);void 0===n||!f(n)||o&&r||a&&i||l&&s||function(e){return"__proto__"===e}(n)||d(n)||e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:n}})},MethodDefinition:m,PropertyDefinition:function(t){const n=t.key.name;void 0!==n&&f(n)&&a&&!d(n)&&e.report({node:t,messageId:"unexpectedUnderscore",data:{identifier:"PrivateIdentifier"===t.key.type?`#${n}`:n}})},Property:m,FunctionExpression:h,ArrowFunctionExpression:h}}}),eB}function dN(){if(sB)return iB;sB=1;const e=eS(),t=Pw(),n=/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u,r=/^(?:DoWhile|For|While)Statement$/u,i=/^(?:BinaryExpression|ConditionalExpression)$/u,s=/^(?:ArrowFunction|Class|Function)Expression$/u,o=/^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;function a(e){if(e.init){const t=e.resolved&&e.resolved.defs[0];if(!t||"Variable"!==t.type||"var"!==t.parent.kind)return!1}return e.isWrite()}function l(e){return!e.modified}function c(e){return!(e.modified||e.group)}function u(e,t){const n=e.range,r=t.identifier.range;return n[0]<=r[0]&&r[1]<=n[1]}const p={WhileStatement:u,DoWhileStatement:u,ForStatement(e,t){return u(e,t)&&!(e.init&&u(e.init,t))}};function d(e){let t=e.identifier;for(;t;){if("FunctionDeclaration"===t.type)return t.id?t:null;t=t.parent}return null}return iB={meta:{type:"problem",docs:{description:"Disallow unmodified loop conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unmodified-loop-condition"},schema:[],messages:{loopConditionNotModified:"'{{name}}' is not modified in this loop."}},create(u){const f=u.sourceCode;let h=null;function m(e){const t=e.reference.identifier;u.report({node:t,messageId:"loopConditionNotModified",data:t})}function g(e){e.every(l)&&e.forEach(m)}function y(t){let n=!1;return e.traverse(t,{visitorKeys:f.visitorKeys,enter(e){o.test(e.type)?(n=!0,this.break()):s.test(e.type)&&this.skip()}}),n}function _(e){if(e.init)return null;let t=null,s=e.identifier,o=s.parent;for(;o;){if(n.test(o.type)){if(r.test(o.type)&&o.test===s)return{reference:e,group:t,isInLoop:p[o.type].bind(null,o),modified:!1};break}if(i.test(o.type)){if(y(o))break;t=o}s=o,o=o.parent}return null}function b(e){const n=e.references.map(_).filter(Boolean);if(0===n.length)return;!function(e){for(let t=0;t0&&function(e,n){for(let r=0;r",">=","<","<=","in","instanceof"]),n={"==":"!=","!=":"==","===":"!==","!==":"==="},r=e.getPrecedence({type:"LogicalExpression",operator:"||"});return oB={meta:{type:"suggestion",docs:{description:"Disallow ternary operators when simpler alternatives exist",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unneeded-ternary"},schema:[{type:"object",properties:{defaultAssignment:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"code",messages:{unnecessaryConditionalExpression:"Unnecessary use of boolean literals in conditional expression.",unnecessaryConditionalAssignment:"Unnecessary use of conditional expression for default assignment."}},create(i){const s=!1!==(i.options[0]||{}).defaultAssignment,o=i.sourceCode;function a(e){return"Literal"===e.type&&"boolean"==typeof e.value}function l(t){if("BinaryExpression"===t.type&&Object.prototype.hasOwnProperty.call(n,t.operator)){const e=o.getFirstTokenBetween(t.left,t.right,(e=>e.value===t.operator)),r=o.getText();return r.slice(t.range[0],e.range[0])+n[t.operator]+r.slice(e.range[1],t.range[1])}return e.getPrecedence(t)u(e.name.parent))),n=e.references.some((e=>u(e.identifier.parent)));return t||n}return!1}function d(e,t){return e.range[0]>=t.range[0]&&e.range[1]<=t.range[1]}function f(e){const t=e.parent;if("ExpressionStatement"===t.type)return!0;if("SequenceExpression"===t.type){return!(t.expressions[t.expressions.length-1]===e)||f(t)}return!1}function h(t,n){const r=e.getUpperFunction(t);return r&&d(r,n)&&function(e,t){let n=e,r=e.parent;for(;r&&d(r,t);){switch(r.type){case"SequenceExpression":if(r.expressions[r.expressions.length-1]!==n)return!1;break;case"CallExpression":case"NewExpression":return r.callee!==n;case"AssignmentExpression":case"TaggedTemplateExpression":case"YieldExpression":return!0;default:if(l.test(r.type))return!0}n=r,r=r.parent}return!1}(r,n)}function m(t){const n=function(e){const t=[];return e.defs.forEach((e=>{const{type:n,node:r}=e;"FunctionName"===n&&t.push(r),"Variable"!==n||!r.init||"FunctionExpression"!==r.init.type&&"ArrowFunctionExpression"!==r.init.type||t.push(r.init)})),t}(t),r=n.length>0;let i=null;return t.references.some((t=>{if(function(e){let t=e.identifier.parent;return"VariableDeclarator"===t.type&&(t=t.parent.parent),("ForInStatement"===t.type||"ForOfStatement"===t.type)&&(t="BlockStatement"===t.body.type?t.body.body[0]:t.body,!!t&&"ReturnStatement"===t.type)}(t))return!0;const s=function(t,n){const r=t.identifier,i=r.parent;return t.isRead()&&("AssignmentExpression"===i.type&&i.left===r&&f(i)&&!e.isLogicalAssignmentOperator(i.operator)||"UpdateExpression"===i.type&&f(i)||n&&d(r,n)&&!h(r,n))}(t,i);return i=function(t,n){const r=t.identifier,i=r.parent,s=t.from.variableScope!==t.resolved.scope.variableScope||e.isInLoop(r);return n&&d(r,n)?n:"AssignmentExpression"===i.type&&f(i)&&r===i.left&&!s?i.right:null}(t,i),function(e){return e.isRead()}(t)&&!s&&!(r&&function(e,t){let n=e.from;for(;n;){if(t.includes(n.block))return!0;n=n.upper}return!1}(t,n))}))}function g(e){const t=e.defs[0],r=n.getDeclaredVariables(t.node);return!r.slice(r.indexOf(e)+1).some((e=>e.references.length>0||e.eslintUsed))}function y(t,n){const r=t.variables,s=t.childScopes;let o,a;if("global"!==t.type||"all"===i.vars)for(o=0,a=r.length;o"ArrayPattern"===e.identifier.parent.type));if(("ArrayPattern"===a.name.parent.type||n)&&i.destructuredArrayIgnorePattern&&i.destructuredArrayIgnorePattern.test(a.name.name))continue;if("CatchClause"===t){if("none"===i.caughtErrors)continue;if(i.caughtErrorsIgnorePattern&&i.caughtErrorsIgnorePattern.test(a.name.name))continue}if("Parameter"===t){if(("Property"===a.node.parent.type||"MethodDefinition"===a.node.parent.type)&&"set"===a.node.parent.kind)continue;if("none"===i.args)continue;if(i.argsIgnorePattern&&i.argsIgnorePattern.test(a.name.name))continue;if("after-used"===i.args&&e.isFunction(a.name.parent)&&!g(s))continue}else if(i.varsIgnorePattern&&i.varsIgnorePattern.test(a.name.name))continue}m(s)||c(s)||p(s)||n.push(s)}for(o=0,a=s.length;o0){const e=l.references.filter((e=>e.isWrite()&&e.from.variableScope===l.scope.variableScope));let n;e.length>0&&(n=e[e.length-1]),t.report({node:n?n.identifier:l.identifiers[0],messageId:"unusedVar",data:l.references.some((e=>e.isWrite()))?a(l):o(l)})}else if(l.eslintExplicitGlobalComments){const i=l.eslintExplicitGlobalComments[0];t.report({node:r,loc:e.getNameLocationInGlobalDirectiveComment(n,i,l.name),messageId:"unusedVar",data:o(l)})}}}}}},OB}function yN(){if(CB)return wB;CB=1;const e=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u,t=/^For(?:In|Of)Statement$/u;function n(e,t){return e&&e.range[0]<=t&&t<=e.range[1]}function r(e){if("class-static-block"===e.type)return!0;if("class-field-initializer"===e.type){return e.block.parent.static}return!1}function i(e){const t=e.resolved;let n=e.from;for(;t.scope.variableScope!==n.variableScope;){if(!r(n.variableScope))return!0;n=n.variableScope.upper}return!1}function s(r){if(i(r))return!1;const s=r.identifier.range[1],o=r.resolved.defs[0];if("ClassName"===o.type){const e=o.node;return n(e,s)&&!function(e,t){return e.body.some((e=>"StaticBlock"===e.type&&n(e,t)||"PropertyDefinition"===e.type&&e.static&&e.value&&n(e.value,t)))}(e.body,s)}let a=o.name.parent;for(;a;){if("VariableDeclarator"===a.type){if(n(a.init,s))return!0;if(t.test(a.parent.parent.type)&&n(a.parent.parent.right,s))return!0;break}if("AssignmentPattern"===a.type){if(n(a.right,s))return!0}else if(e.test(a.type))break;a=a.parent}return!1}return wB={meta:{type:"problem",docs:{description:"Disallow the use of variables before they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-use-before-define"},schema:[{oneOf:[{enum:["nofunc"]},{type:"object",properties:{functions:{type:"boolean"},classes:{type:"boolean"},variables:{type:"boolean"},allowNamedExports:{type:"boolean"}},additionalProperties:!1}]}],messages:{usedBeforeDefined:"'{{name}}' was used before it was defined."}},create(e){const t=function(e){let t=!0,n=!0,r=!0,i=!1;return"string"==typeof e?t="nofunc"!==e:"object"==typeof e&&null!==e&&(t=!1!==e.functions,n=!1!==e.classes,r=!1!==e.variables,i=!!e.allowNamedExports),{functions:t,classes:n,variables:r,allowNamedExports:i}}(e.options[0]),n=e.sourceCode;function r(e){if(e.init)return!1;const{identifier:n}=e;if(t.allowNamedExports&&"ExportSpecifier"===n.parent.type&&n.parent.local===n)return!1;const r=e.resolved;if(!r||0===r.defs.length)return!1;const s=r.defs[0].type;return!(!t.functions&&"FunctionName"===s)&&!((!t.variables&&"Variable"===s||!t.classes&&"ClassName"===s)&&i(e))}function o(t){t.references.filter(r).forEach((t=>{const n=t.resolved.defs[0].name;(t.identifier.range[1]=1||"apply"===n.property.name&&2===t.arguments.length&&"ArrayExpression"===t.arguments[1].type)}(r))return;const i=e.skipChainExpression(r.callee),s=e.skipChainExpression(i.object);(function(t,n,r){return t?e.equalTokens(t,n,r):e.isNullOrUndefined(n)})("MemberExpression"===s.type?s.object:null,r.arguments[0],n)&&t.report({node:r,messageId:"unnecessaryCall",data:{name:i.property.name}})}}}},kB}function bN(){if(BB)return LB;BB=1;const e=Pw();return LB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary computed property keys in objects and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-computed-key"},schema:[{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{unnecessarilyComputedProperty:"Unnecessarily computed property [{{property}}] found."}},create(t){const n=t.sourceCode,r=t.options[0]&&t.options[0].enforceForClassMembers;function i(r){if(function(e){if(!e.computed)return!1;const{key:t}=e;if("Literal"!==t.type)return!1;const{value:n}=t;if("number"!=typeof n&&"string"!=typeof n)return!1;switch(e.type){case"Property":return"__proto__"!==n;case"PropertyDefinition":return e.static?"constructor"!==n&&"prototype"!==n:"constructor"!==n;case"MethodDefinition":return e.static?"prototype"!==n:"constructor"!==n;default:throw new Error(`Unexpected node type: ${e.type}`)}}(r)){const{key:i}=r;t.report({node:r,messageId:"unnecessarilyComputedProperty",data:{property:n.getText(i)},fix(t){const r=n.getTokenBefore(i,e.isOpeningBracketToken),s=n.getTokenAfter(i,e.isClosingBracketToken);if(n.commentsExistBetween(r,s))return null;const o=n.getTokenBefore(r),a=(o.range[1]===r.range[0]&&!e.canTokensBeAdjacent(o,n.getFirstToken(i))?" ":"")+i.raw;return t.replaceTextRange([r.range[0],s.range[1]],a)}})}}function s(){}return{Property:i,MethodDefinition:r?i:s,PropertyDefinition:r?i:s}}},LB}function vN(){if(jB)return MB;jB=1;const e=Pw();function t(e){return"BinaryExpression"===e.type&&"+"===e.operator}function n(e){return"+"===e.value&&"Punctuator"===e.type}return MB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary concatenation of literals or template literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-concat"},schema:[],messages:{unexpectedConcat:"Unexpected string concatenation of literals."}},create(r){const i=r.sourceCode;return{BinaryExpression(s){if("+"!==s.operator)return;const o=function(e){let n=e.left;for(;t(n);)n=n.right;return n}(s),a=function(e){let n=e.right;for(;t(n);)n=n.left;return n}(s);if(e.isStringLiteral(o)&&e.isStringLiteral(a)&&e.isTokenOnSameLine(o,a)){const e=i.getFirstTokenBetween(o,a,n);r.report({node:s,loc:e.loc,messageId:"unexpectedConcat"})}}}}},MB}function EN(){if(FB)return NB;function e(e){return"Identifier"===e.type||"RestElement"===e.type}function t(e,t){return"Identifier"===e.type&&"Identifier"===t.type&&e.name===t.name}function n(e,n){return t(e,n)||function(e,n){return"RestElement"===e.type&&"SpreadElement"===n.type&&t(e.argument,n.argument)}(e,n)}function r(t,r){return function(e){return 1===e.length&&"ExpressionStatement"===e[0].type&&"CallExpression"===e[0].expression.type&&"Super"===e[0].expression.callee.type}(t)&&r.every(e)&&(1===(i=t[0].expression.arguments).length&&"SpreadElement"===i[0].type&&"Identifier"===i[0].argument.type&&"arguments"===i[0].argument.name||function(e,t){if(e.length!==t.length)return!1;for(let r=0;r?@^`~");return UB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary escape characters",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-escape"},hasSuggestions:!0,messages:{unnecessaryEscape:"Unnecessary escape character: \\{{character}}.",removeEscape:"Remove the `\\`. This maintains the current functionality.",removeEscapeDoNotKeepSemantics:"Remove the `\\` if it was inserted by mistake.",escapeBackslash:"Replace the `\\` with `\\\\` to include the actual backslash character."},schema:[]},create(r){const c=r.sourceCode,u=new t;function p(t,n,i,s){const o=t.range[0]+n,a=[o,o+1],l=c.getLocFromIndex(o);r.report({node:t,loc:{start:l,end:{line:l.line,column:l.column+1}},messageId:"unnecessaryEscape",data:{character:i},suggest:[{messageId:e.isDirective(t.parent)?"removeEscapeDoNotKeepSemantics":"removeEscape",fix(e){return e.removeRange(a)}},...s?[]:[{messageId:"escapeBackslash",fix(e){return e.insertTextBeforeRange(a,"\\")}}]]})}function d(e,t){const n="TemplateElement"===e.type,r=t[0][1];let s,o=!i.has(r);n?(s="`"===r,"$"===r?o="{"!==t.input[t.index+2]:"{"===r&&(o="$"!==t.input[t.index-1])):s=r===e.raw[0],o&&!s&&p(e,t.index,t[0].slice(1))}function f(e){const t="TemplateElement"===e.type;if(!(t&&e.parent&&e.parent.parent&&"TaggedTemplateExpression"===e.parent.parent.type&&e.parent===e.parent.parent.quasi))if("string"==typeof e.value||t){if("JSXAttribute"===e.parent.type||"JSXElement"===e.parent.type||"JSXFragment"===e.parent.type)return;const n=t?c.getText(e):e.raw,r=/\\[^\d]/gu;let i;for(;i=r.exec(n);)d(e,i)}else e.regex&&function(e){const{pattern:t,flags:r}=e.regex;let i;const c=r.includes("u"),d=r.includes("v");try{i=u.parsePattern(t,0,t.length,{unicode:c,unicodeSets:d})}catch{return}const f=[];n(i,{onCharacterClassEnter:e=>f.unshift(e),onCharacterClassLeave:()=>f.shift(),onExpressionCharacterClassEnter:e=>f.unshift(e),onExpressionCharacterClassLeave:()=>f.shift(),onCharacterEnter(n){if(!n.raw.startsWith("\\"))return;const r=n.raw.slice(1);if(r!==String.fromCodePoint(n.value))return;let i;if(i=f.length?d?a:s:o,i.has(r))return;const c=n.start+1;let u=!1;if(f.length){const e=f[0];if("^"===r&&e.start+1===n.start)return;if(d){if(l.has(r)){if(t[n.end]===r)return;if(t[n.start-1]===r){if("^"!==r)return;if(!e.negate)return;if(e.start+1!t.has(e))).forEach((e=>c(e,t)));const n=i.get(e);n.uselessReturns=n.uselessReturns.filter((e=>{if(o.traversedTryBlockStatements&&o.traversedTryBlockStatements.length>0){const t=e.range[0],n=e.range[1];if(o.traversedTryBlockStatements.some((e=>{const r=e.range[0],i=e.range[1];return t>=r&&n<=i})))return!0}return function(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}(o.uselessReturns,e),!1}))}function u(){o.currentSegments.forEach((e=>c(e,new Set)))}return{onCodePathStart(e){o={upper:o,uselessReturns:[],traversedTryBlockStatements:[],codePath:e,currentSegments:new Set}},onCodePathEnd(){for(const e of o.uselessReturns)r.report({node:e,loc:e.loc,messageId:"unnecessaryReturn",fix(r){return n(e)&&!s.getCommentsInside(e).length?new t(r,s).retainEnclosingFunction(e).remove(e):null}});o=o.upper},onCodePathSegmentStart(e){o.currentSegments.add(e);const t={uselessReturns:l([],e.allPrevSegments),returned:!1};i.set(e,t)},onUnreachableCodePathSegmentStart(e){o.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){o.currentSegments.delete(e)},onCodePathSegmentEnd(e){o.currentSegments.delete(e)},ReturnStatement(t){if(t.argument&&u(),!(t.argument||e.isInLoop(t)||function(t){for(let n=t;n&&n.parent&&!e.isFunction(n);n=n.parent)if("TryStatement"===n.parent.type&&n.parent.finalizer===n)return!0;return!1}(t))&&function(e){for(const t of e)if(t.reachable)return!0;return!1}(o.currentSegments)){for(const e of o.currentSegments){const n=i.get(e);n&&(n.uselessReturns.push(t),n.returned=!0)}o.uselessReturns.push(t)}},"TryStatement > BlockStatement.block:exit"(e){o.traversedTryBlockStatements.push(e)},"TryStatement:exit"(){o.traversedTryBlockStatements.pop()},ClassDeclaration:u,ContinueStatement:u,DebuggerStatement:u,DoWhileStatement:u,EmptyStatement:u,ExpressionStatement:u,ForInStatement:u,ForOfStatement:u,ForStatement:u,IfStatement:u,ImportDeclaration:u,LabeledStatement:u,SwitchStatement:u,ThrowStatement:u,TryStatement:u,VariableDeclaration:u,WhileStatement:u,WithStatement:u,ExportNamedDeclaration:u,ExportDefaultDeclaration:u,ExportAllDeclaration:u}}},$B}function ON(){if(zB)return QB;zB=1;const e=Pw();function t(e){return Boolean(e.scope)&&"global"===e.scope.type}function n(e){let t=e;for(;"function"!==t.type&&"global"!==t.type;)t=t.upper;return t}function r(e){const t=n(e.scope);return e.references.some((e=>n(e.from)!==t))}function i(e){return("ForOfStatement"===e.parent.type||"ForInStatement"===e.parent.type)&&e===e.parent.left}const s=/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;function o(e){return e.defs.length>=2}function a(e){return"let"===e.name}return QB={meta:{type:"suggestion",docs:{description:"Require `let` or `const` instead of `var`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-var"},schema:[],fixable:"code",messages:{unexpectedVar:"Unexpected var, use let or const instead."}},create(n){const l=n.sourceCode;function c(t){if(!t.init)return!1;return l.getDeclaredVariables(t).some(function(t){const n=t.range[0],r=t.range[1];return i=>{const s=i.defs[0].name,o=s.range[0],a="AssignmentPattern"===s.parent.type?s.parent.right:null,l=a&&a.range[0],c=a&&a.range[1];return i.references.some((i=>{const s=i.identifier.range[0],u=i.identifier.range[1];return!i.init&&(s=l&&u<=c||!e.isFunction(t)&&s>=n&&u<=r)}))}}(t.init))}function u(n){const u=l.getDeclaredVariables(n),p=function(e){for(let t=e;t;t=t.parent)if(s.test(t.type))return t;return null}(n);if("SwitchCase"===n.parent.type||n.declarations.some(c)||u.some(t)||u.some(o)||u.some(function(e){function t(t){const n=e.range,r=t.identifier.range;return r[0]n[1]}return function(e){return e.references.some(t)}}(p))||u.some(a))return!1;if(e.isInLoop(n)){if(u.some(r))return!1;if(!i(n)&&!function(e){return e.declarations.every((e=>null!==e.init))}(n))return!1}return!!(i(n)||"ForStatement"===n.parent.type&&n.parent.init===n||e.STATEMENT_LIST_PARENTS.has(n.parent.type))}return{"VariableDeclaration:exit"(e){"var"===e.kind&&function(e){n.report({node:e,messageId:"unexpectedVar",fix(t){const n=l.getFirstToken(e,{filter:e=>"var"===e.value});return u(e)?t.replaceText(n,"let"):null}})}(e)}}}},QB}function TN(){if(HB)return ZB;HB=1;const e=HO(),t=Pw();return ZB={meta:{type:"suggestion",docs:{description:"Disallow specified warning terms in comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-warning-comments"},schema:[{type:"object",properties:{terms:{type:"array",items:{type:"string"}},location:{enum:["start","anywhere"]},decoration:{type:"array",items:{type:"string",pattern:"^\\S$"},minItems:1,uniqueItems:!0}},additionalProperties:!1}],messages:{unexpectedComment:"Unexpected '{{matchedTerm}}' comment: '{{comment}}'."}},create(n){const r=n.sourceCode,i=n.options[0]||{},s=i.terms||["todo","fixme","xxx"],o=i.location||"start",a=[...i.decoration||[]].join(""),l=/\bno-warning-comments\b/u;const c=s.map((function(t){const n=e(t),r=e(a);let i="";"start"===o?i=`^[\\s${r}]*`:/^\w/u.test(t)&&(i="\\b");const s=/\w$/u.test(t)?"\\b":"";return new RegExp(`${i}${n}${s}`,"iu")}));function u(e){const r=e.value;if(t.isDirectiveComment(e)&&l.test(r))return;const i=function(e){const t=[];return c.forEach(((n,r)=>{n.test(e)&&t.push(s[r])})),t}(r);i.forEach((t=>{let i="",s=!1;for(const e of r.trim().split(/\s+/u)){const t=i?`${i} ${e}`:e;if(!(t.length<=40)){s=!0;break}i=t}n.report({node:e,messageId:"unexpectedComment",data:{matchedTerm:t,comment:`${i}${s?"...":""}`}})}))}return{Program(){r.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(u)}}}},ZB}function wN(){if(JB)return YB;JB=1;const e=Pw();return YB={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow whitespace before properties",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-whitespace-before-property"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(t){const n=t.sourceCode;return{MemberExpression(r){let i,s;e.isTokenOnSameLine(r.object,r.property)&&(r.computed?(i=n.getTokenBefore(r.property,e.isOpeningBracketToken),s=n.getTokenBefore(i,r.optional?1:0)):(i=n.getFirstToken(r.property),s=n.getTokenBefore(i,1)),n.isSpaceBetweenTokens(s,i)&&function(r,i,s){t.report({node:r,messageId:"unexpectedWhitespace",data:{propName:n.getText(r.property)},fix(t){let o="";return r.computed||r.optional||!e.isDecimalInteger(r.object)?n.commentsExistBetween(i,s)?null:(r.optional?o="?.":r.computed||(o="."),t.replaceTextRange([i.range[1],s.range[0]],o)):null}})}(r,s,i))}}}},YB}function CN(){if(rM)return nM;rM=1;const e={enum:["beside","below","any"]};return nM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the location of single-line statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/nonblock-statement-body-position"},fixable:"whitespace",schema:[e,{properties:{overrides:{properties:{if:e,else:e,while:e,do:e,for:e},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(e){const t=e.sourceCode;function n(n,r){const i=function(t){return e.options[1]&&e.options[1].overrides&&e.options[1].overrides[t]||e.options[0]||"beside"}(r);if("BlockStatement"===n.type||"any"===i)return;const s=t.getTokenBefore(n);s.loc.end.line===n.loc.start.line&&"below"===i?e.report({node:n,messageId:"expectLinebreak",fix:e=>e.insertTextBefore(n,"\n")}):s.loc.end.line!==n.loc.start.line&&"beside"===i&&e.report({node:n,messageId:"expectNoLinebreak",fix(e){return t.getText().slice(s.range[1],n.range[0]).trim()?null:e.replaceTextRange([s.range[1],n.range[0]]," ")}})}return{IfStatement(e){n(e.consequent,"if"),e.alternate&&"IfStatement"!==e.alternate.type&&n(e.alternate,"else")},WhileStatement:e=>n(e.body,"while"),DoWhileStatement:e=>n(e.body,"do"),ForStatement:e=>n(e.body,"for"),ForInStatement:e=>n(e.body,"for"),ForOfStatement:e=>n(e.body,"for")}}},nM}function AN(){if(sM)return iM;sM=1;const e=Pw(),t={oneOf:[{enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]};function n(e){let t=!1,n=Number.POSITIVE_INFINITY,r=!1;return e?"always"===e?n=0:"never"===e?n=Number.POSITIVE_INFINITY:(t=Boolean(e.multiline),n=e.minProperties||Number.POSITIVE_INFINITY,r=Boolean(e.consistent)):r=!0,{multiline:t,minProperties:n,consistent:r}}function r(e){return"object"==typeof e&&null!==e}function i(e){return r(e)||"string"==typeof e}return iM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-newline"},fixable:"whitespace",schema:[{oneOf:[t,{type:"object",properties:{ObjectExpression:t,ObjectPattern:t,ImportDeclaration:t,ExportDeclaration:t},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(t){const s=t.sourceCode,o=function(e){if(r(e)&&Object.values(e).some(i))return{ObjectExpression:n(e.ObjectExpression),ObjectPattern:n(e.ObjectPattern),ImportDeclaration:n(e.ImportDeclaration),ExportNamedDeclaration:n(e.ExportDeclaration)};const t=n(e);return{ObjectExpression:t,ObjectPattern:t,ImportDeclaration:t,ExportNamedDeclaration:t}}(t.options[0]);function a(n){const r=o[n.type];if("ImportDeclaration"===n.type&&!n.specifiers.some((e=>"ImportSpecifier"===e.type))||"ExportNamedDeclaration"===n.type&&!n.specifiers.some((e=>"ExportSpecifier"===e.type)))return;const i=s.getFirstToken(n,(e=>"{"===e.value));let a;a=n.typeAnnotation?s.getTokenBefore(n.typeAnnotation):s.getLastToken(n,(e=>"}"===e.value));let l=s.getTokenAfter(i,{includeComments:!0}),c=s.getTokenBefore(a,{includeComments:!0});const u=function(e,t,n,r){let i;return i="ObjectExpression"===e.type||"ObjectPattern"===e.type?e.properties:e.specifiers.filter((e=>"ImportSpecifier"===e.type||"ExportSpecifier"===e.type)),i.length>=t.minProperties||t.multiline&&i.length>0&&n.loc.start.line!==r.loc.end.line}(n,r,l,c),p=e.isCommentToken(l),d=e.isCommentToken(c);if(l=s.getTokenAfter(i),c=s.getTokenBefore(a),u)e.isTokenOnSameLine(i,l)&&t.report({messageId:"expectedLinebreakAfterOpeningBrace",node:n,loc:i.loc,fix(e){return p?null:e.insertTextAfter(i,"\n")}}),e.isTokenOnSameLine(c,a)&&t.report({messageId:"expectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix(e){return d?null:e.insertTextBefore(a,"\n")}});else{const s=r.consistent,o=!e.isTokenOnSameLine(i,l),u=!e.isTokenOnSameLine(c,a);(!s&&o||s&&o&&!u)&&t.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:n,loc:i.loc,fix(e){return p?null:e.removeRange([i.range[1],l.range[0]])}}),(!s&&u||s&&!o&&u)&&t.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix(e){return d?null:e.removeRange([c.range[1],a.range[0]])}})}}return{ObjectExpression:a,ObjectPattern:a,ImportDeclaration:a,ExportNamedDeclaration:a}}},iM}function PN(){if(aM)return oM;aM=1;const e=Pw();return oM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside braces",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},create(t){const n="always"===t.options[0],r=t.sourceCode;function i(e){return!!t.options[1]&&t.options[1][e]===!n}const s={spaced:n,arraysInObjectsException:i("arraysInObjects"),objectsInObjectsException:i("objectsInObjects")};function o(n,i,o,a,l){if(e.isTokenOnSameLine(i,o)){const e=r.isSpaceBetweenTokens(i,o);s.spaced&&!e&&function(e,n){t.report({node:e,loc:n.loc,messageId:"requireSpaceAfter",data:{token:n.value},fix(e){return e.insertTextAfter(n," ")}})}(n,i),!s.spaced&&e&&"Line"!==o.type&&function(e,n){const r=t.sourceCode.getTokenAfter(n,{includeComments:!0});t.report({node:e,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceAfter",data:{token:n.value},fix(e){return e.removeRange([n.range[1],r.range[0]])}})}(n,i)}if(e.isTokenOnSameLine(a,l)){const i=(s.arraysInObjectsException&&e.isClosingBracketToken(a)||s.objectsInObjectsException&&e.isClosingBraceToken(a))&&r.getNodeByRangeIndex(a.range[0]).type,o=s.arraysInObjectsException&&"ArrayExpression"===i||s.objectsInObjectsException&&("ObjectExpression"===i||"ObjectPattern"===i)?!s.spaced:s.spaced,c=r.isSpaceBetweenTokens(a,l);o&&!c&&function(e,n){t.report({node:e,loc:n.loc,messageId:"requireSpaceBefore",data:{token:n.value},fix(e){return e.insertTextBefore(n," ")}})}(n,l),!o&&c&&function(e,n){const r=t.sourceCode.getTokenBefore(n,{includeComments:!0});t.report({node:e,loc:{start:r.loc.end,end:n.loc.start},messageId:"unexpectedSpaceBefore",data:{token:n.value},fix(e){return e.removeRange([r.range[1],n.range[0]])}})}(n,l)}}function a(t){if(0===t.properties.length)return;const n=r.getFirstToken(t),i=function(t){const n=t.properties[t.properties.length-1];return r.getTokenAfter(n,e.isClosingBraceToken)}(t);o(t,n,r.getTokenAfter(n,{includeComments:!0}),r.getTokenBefore(i,{includeComments:!0}),i)}return{ObjectPattern:a,ObjectExpression:a,ImportDeclaration:function(t){if(0===t.specifiers.length)return;let n=t.specifiers[0];const i=t.specifiers[t.specifiers.length-1];if("ImportSpecifier"!==i.type)return;"ImportSpecifier"!==n.type&&(n=t.specifiers[1]);const s=r.getTokenBefore(n),a=r.getTokenAfter(i,e.isNotCommaToken);o(t,s,r.getTokenAfter(s,{includeComments:!0}),r.getTokenBefore(a,{includeComments:!0}),a)},ExportNamedDeclaration:function(t){if(0===t.specifiers.length)return;const n=t.specifiers[0],i=t.specifiers[t.specifiers.length-1],s=r.getTokenBefore(n),a=r.getTokenAfter(i,e.isNotCommaToken);o(t,s,r.getTokenAfter(s,{includeComments:!0}),r.getTokenBefore(a,{includeComments:!0}),a)}}}},oM}function kN(){if(pM)return uM;pM=1;const e="always",t="never",n="methods",r="properties",i="consistent",s="consistent-as-needed",o=Pw();return uM={meta:{type:"suggestion",docs:{description:"Require or disallow method and property shorthand syntax for object literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-shorthand"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["always","methods","properties","never","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","methods","properties"]},{type:"object",properties:{avoidQuotes:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always","methods"]},{type:"object",properties:{ignoreConstructors:{type:"boolean"},methodsIgnorePattern:{type:"string"},avoidQuotes:{type:"boolean"},avoidExplicitReturnArrows:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{expectedAllPropertiesShorthanded:"Expected shorthand for all properties.",expectedLiteralMethodLongform:"Expected longform method syntax for string literal keys.",expectedPropertyShorthand:"Expected property shorthand.",expectedPropertyLongform:"Expected longform property syntax.",expectedMethodShorthand:"Expected method shorthand.",expectedMethodLongform:"Expected longform method syntax.",unexpectedMix:"Unexpected mix of shorthand and non-shorthand properties."}},create(a){const l=a.options[0]||e,c=l===n||l===e,u=l===r||l===e,p=l===t,d=l===i,f=l===s,h=a.options[1]||{},m=h.ignoreConstructors,g=h.methodsIgnorePattern?new RegExp(h.methodsIgnorePattern,"u"):null,y=h.avoidQuotes,_=!!h.avoidExplicitReturnArrows,b=a.sourceCode,v=/[^_$0-9]/u;function E(e){return"set"!==e.kind&&"get"!==e.kind&&"SpreadElement"!==e.type&&"SpreadProperty"!==e.type&&"ExperimentalSpreadProperty"!==e.type}function x(e){return"Literal"===e.type&&"string"==typeof e.value}function S(e){return e.shorthand||e.method}function O(e){const t=e.value;return"FunctionExpression"===t.type?!t.id:"Identifier"===t.type&&o.getStaticPropertyName(e)===t.name}function T(e,t){const n=e.properties.filter(E);if(n.length>0){const r=n.filter(S);if(r.length!==n.length)if(r.length>0)a.report({node:e,messageId:"unexpectedMix"});else if(t){n.every(O)&&a.report({node:e,messageId:"expectedAllPropertiesShorthanded"})}}}const w=[],C=new WeakSet,A=new WeakSet;function P(e){w.unshift(new Set),b.getScope(e).variables.filter((e=>"arguments"===e.name)).forEach((e=>{e.references.map((e=>e.identifier)).forEach((e=>A.add(e)))}))}function k(){w.shift()}function D(){w[0].forEach((e=>C.add(e)))}return{Program:P,FunctionDeclaration:P,FunctionExpression:P,"Program:exit":k,"FunctionDeclaration:exit":k,"FunctionExpression:exit":k,ArrowFunctionExpression(e){w[0].add(e)},"ArrowFunctionExpression:exit"(e){w[0].delete(e)},ThisExpression:D,Super:D,MetaProperty(e){"new"===e.meta.name&&"target"===e.property.name&&D()},Identifier(e){A.has(e)&&D()},ObjectExpression(e){d?T(e,!1):f&&T(e,!0)},"Property:exit"(e){const t=e.method||e.shorthand;if("ObjectPattern"!==e.parent.type&&"get"!==e.kind&&"set"!==e.kind&&(!e.computed||"FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type))if(t)if(e.method&&(p||y&&x(e.key))){const t=p?"expectedMethodLongform":"expectedLiteralMethodLongform";a.report({node:e,messageId:t,fix:t=>function(e,t){const n=t.computed?b.getTokens(t).find((e=>"["===e.value)):b.getFirstToken(t.key),r=t.computed?b.getTokensBetween(t.key,t.value).find((e=>"]"===e.value)):b.getLastToken(t.key),i=b.text.slice(n.range[0],r.range[1]);let s="function";return t.value.async&&(s=`async ${s}`),t.value.generator&&(s=`${s}*`),e.replaceTextRange([t.range[0],r.range[1]],`${i}: ${s}`)}(t,e)})}else p&&a.report({node:e,messageId:"expectedPropertyLongform",fix:t=>t.insertTextAfter(e.key,`: ${e.key.name}`)});else if(!c||e.value.id||"FunctionExpression"!==e.value.type&&"ArrowFunctionExpression"!==e.value.type){if("Identifier"===e.value.type&&e.key.name===e.value.name&&u)a.report({node:e,messageId:"expectedPropertyShorthand",fix(t){return t.replaceText(e,e.value.name)}});else if("Identifier"===e.value.type&&"Literal"===e.key.type&&e.key.value===e.value.name&&u){if(y)return;a.report({node:e,messageId:"expectedPropertyShorthand",fix(t){return t.replaceText(e,e.value.name)}})}}else{if(m&&"Identifier"===e.key.type&&function(e){const t=v.exec(e);if(!t)return!1;const n=e.charAt(t.index);return n===n.toUpperCase()}(e.key.name))return;if(g){const t=o.getStaticPropertyName(e);if(null!==t&&g.test(t))return}if(y&&x(e.key))return;("FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type&&"BlockStatement"===e.value.body.type&&_&&!C.has(e.value))&&a.report({node:e,messageId:"expectedMethodShorthand",fix:t=>function(e,t){const n=t.computed?b.getFirstToken(t,o.isOpeningBracketToken):b.getFirstToken(t.key),r=t.computed?b.getFirstTokenBetween(t.key,t.value,o.isClosingBracketToken):b.getLastToken(t.key),i=b.text.slice(n.range[0],r.range[1]);let s="";if(b.commentsExistBetween(r,t.value))return null;t.value.async&&(s+="async "),t.value.generator&&(s+="*");const a=[n.range[0],t.range[1]],l=s+i;if("FunctionExpression"===t.value.type){const n=b.getTokens(t.value).find((e=>"Keyword"===e.type&&"function"===e.value)),r=t.value.generator?b.getTokenAfter(n):n;return e.replaceTextRange(a,l+b.text.slice(r.range[1],t.value.range[1]))}const c=b.getTokenBefore(t.value.body,o.isArrowToken),u=b.text.slice(c.range[1],t.value.range[1]);let p,d=!1;if(p=0===t.value.params.length?b.getFirstToken(t.value,o.isOpeningParenToken):b.getTokenBefore(t.value.params[0]),1===t.value.params.length){const e=o.isOpeningParenToken(p),n=p.range[0]0&&i.uninitialized===n&&s.uninitialized)&&(!(r.initialized>0&&i.initialized===n&&s.initialized&&!a)&&((!s.required||!a)&&(function(e,t,r){for(let i=0;ie.range[0]===t.parent.range[0])),i=n[r-1];return e=>{const n=a.getTokenBefore(t),r=a.getTokenBefore(n),s=[];return i&&i.kind===a.getText(n)&&(";"===r.value?s.push(e.replaceText(r,",")):s.push(e.insertTextAfter(r,",")),s.push(e.replaceText(n,""))),s}}function _(t){const{parent:n}=t;return function(t){return e.STATEMENT_LIST_PARENTS.has(t.parent.type)}("ExportNamedDeclaration"===n.type?n:t)?e=>t.declarations.map((n=>{const r=a.getTokenAfter(n);if(null===r)return null;const i=a.getTokenAfter(r,{includeComments:!0});if(","!==r.value)return null;const s="ExportNamedDeclaration"===t.parent.type?"export ":"";if(i.range[0]===r.range[1])return e.replaceText(r,`; ${s}${t.kind} `);if(i.loc.start.line>r.loc.end.line||"Line"===i.type||"Block"===i.type){let n=i;for(;"Line"===n.type||"Block"===n.type;)n=a.getTokenAfter(n,{includeComments:!0});return e.replaceTextRange([r.range[0],n.range[0]],`;${a.text.slice(r.range[1],n.range[0])}${s}${t.kind} `)}return e.replaceText(r,`; ${s}${t.kind}`)})).filter((e=>e)):null}return{Program:p,FunctionDeclaration:p,FunctionExpression:p,ArrowFunctionExpression:p,StaticBlock:p,BlockStatement:u,ForStatement:u,ForInStatement:u,ForOfStatement:u,SwitchStatement:u,VariableDeclaration:function(e){const s=e.parent,a=e.kind;if(!o[a])return;const l=e.declarations,c=m(l),u=l.some(h)&&!l.every(h);o[a].initialized===n&&o.separateRequires&&u&&t.report({node:e,messageId:"splitRequires"});const p=s.body&&s.body.length>0&&s.body.indexOf(e)||0;if(p>0){const n=s.body[p-1],r="VariableDeclaration"===n.type,u=l.concat(n.declarations||[]);if(r&&n.kind===a&&(!u.some(h)||u.every(h))){const r=m(n.declarations);o[a].initialized===i&&o[a].uninitialized===i?t.report({node:e,messageId:"combine",data:{type:a},fix:y(l)}):o[a].initialized===i&&c.initialized>0&&r.initialized>0?t.report({node:e,messageId:"combineInitialized",data:{type:a},fix:y(l)}):o[a].uninitialized===i&&c.uninitialized>0&&r.uninitialized>0&&t.report({node:e,messageId:"combineUninitialized",data:{type:a},fix:y(l)})}}if(!g(a,l))if(o[a].initialized===n&&o[a].uninitialized===n)t.report({node:e,messageId:"combine",data:{type:a},fix:y(l)});else if(o[a].initialized===n&&c.initialized>0&&t.report({node:e,messageId:"combineInitialized",data:{type:a},fix:y(l)}),o[a].uninitialized===n&&c.uninitialized>0){if(e.parent.left===e&&("ForInStatement"===e.parent.type||"ForOfStatement"===e.parent.type))return;t.report({node:e,messageId:"combineUninitialized",data:{type:a},fix:y(l)})}if("ForStatement"!==s.type||s.init!==e){c.uninitialized+c.initialized>1&&(o[a].initialized===r&&o[a].uninitialized===r?t.report({node:e,messageId:"split",data:{type:a},fix:_(e)}):o[a].initialized===r&&c.initialized>0?t.report({node:e,messageId:"splitInitialized",data:{type:a},fix:_(e)}):o[a].uninitialized===r&&c.uninitialized>0&&t.report({node:e,messageId:"splitUninitialized",data:{type:a},fix:_(e)}))}},"ForStatement:exit":d,"ForOfStatement:exit":d,"ForInStatement:exit":d,"SwitchStatement:exit":d,"BlockStatement:exit":d,"Program:exit":f,"FunctionDeclaration:exit":f,"FunctionExpression:exit":f,"ArrowFunctionExpression:exit":f,"StaticBlock:exit":f}}},dM}function RN(){if(bM)return _M;bM=1;const e=Pw();return _M={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style for operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-linebreak"},schema:[{enum:["after","before","none",null]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(t){const n=!t.options[0],r=t.options[0]||"after",i=t.options[1]||{},s=i.overrides?Object.assign({},i.overrides):{};n&&!s["?"]&&(s["?"]="before"),n&&!s[":"]&&(s[":"]="before");const o=t.sourceCode;function a(n,i,a){const l=o.getTokenBefore(i,(e=>e.value===a)),c=o.getTokenBefore(l),u=o.getTokenAfter(l),p=s[a],d=p||r,f=function(t,n){return r=>{const i=o.getTokenBefore(t),s=o.getTokenAfter(t),a=o.text.slice(i.range[1],t.range[0]),l=o.text.slice(t.range[1],s.range[0]);let c,u;if(!e.isTokenOnSameLine(i,t)!=!e.isTokenOnSameLine(t,s)&&"none"!==n){if(o.getTokenBefore(t,{includeComments:!0})!==i&&o.getTokenAfter(t,{includeComments:!0})!==s)return null;c=l,u=a}else{const t=e.createGlobalLinebreakMatcher();if(c="before"===n||a.trim()?a:a.replace(t,""),u="after"===n||l.trim()?l:l.replace(t,""),c===a&&u===l)return null}return""===u&&"Punctuator"===s.type&&"+-".includes(t.value)&&s.value===t.value&&(u+=" "),r.replaceTextRange([i.range[1],s.range[0]],c+t.value+u)}}(l,d);e.isTokenOnSameLine(c,l)&&e.isTokenOnSameLine(l,u)||("ignore"===p||e.isTokenOnSameLine(c,l)||e.isTokenOnSameLine(l,u)?"before"===d&&e.isTokenOnSameLine(c,l)?t.report({node:n,loc:l.loc,messageId:"operatorAtBeginning",data:{operator:a},fix:f}):"after"===d&&e.isTokenOnSameLine(l,u)?t.report({node:n,loc:l.loc,messageId:"operatorAtEnd",data:{operator:a},fix:f}):"none"===d&&t.report({node:n,loc:l.loc,messageId:"noLinebreak",data:{operator:a},fix:f}):t.report({node:n,loc:l.loc,messageId:"badLinebreak",data:{operator:a},fix:f}))}function l(e){a(e,e.right,e.operator)}return{BinaryExpression:l,LogicalExpression:l,AssignmentExpression:l,VariableDeclarator(e){e.init&&a(e,e.init,"=")},PropertyDefinition(e){e.value&&a(e,e.value,"=")},ConditionalExpression(e){a(e,e.consequent,"?"),a(e,e.alternate,":")}}}},_M}function IN(){if(EM)return vM;EM=1;const e=Pw();return vM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding within blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/padded-blocks"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{blocks:{enum:["always","never"]},switches:{enum:["always","never"]},classes:{enum:["always","never"]}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{alwaysPadBlock:"Block must be padded by blank lines.",neverPadBlock:"Block must not be padded by blank lines."}},create(t){const n={},r=t.options[0]||"always",i=t.options[1]||{};if("string"==typeof r){const e="always"===r;n.blocks=e,n.switches=e,n.classes=e}else Object.prototype.hasOwnProperty.call(r,"blocks")&&(n.blocks="always"===r.blocks),Object.prototype.hasOwnProperty.call(r,"switches")&&(n.switches="always"===r.switches),Object.prototype.hasOwnProperty.call(r,"classes")&&(n.classes="always"===r.classes);Object.prototype.hasOwnProperty.call(i,"allowSingleLineBlocks")&&(n.allowSingleLineBlocks=!0===i.allowSingleLineBlocks);const s=t.sourceCode;function o(e){return"Line"===e.type||"Block"===e.type}function a(e,t){return t.loc.start.line-e.loc.end.line>=2}function l(r){const i=function(e){return"SwitchStatement"===e.type?s.getTokenBefore(e.cases[0]):"StaticBlock"===e.type?s.getFirstToken(e,{skip:1}):s.getFirstToken(e)}(r),l=function(e){let t,n=e;do{t=n,n=s.getTokenAfter(n,{includeComments:!0})}while(o(n)&&n.loc.start.line===t.loc.end.line);return n}(i),c=s.getTokenBefore(l,{includeComments:!0}),u=function(e){let t,n=e;do{t=n,n=s.getTokenBefore(n,{includeComments:!0})}while(o(n)&&n.loc.end.line===t.loc.start.line);return n}(s.getLastToken(r)),p=s.getTokenAfter(u,{includeComments:!0}),d=a(c,l),f=a(u,p);n.allowSingleLineBlocks&&e.isTokenOnSameLine(c,p)||(!function(e){switch(e.type){case"BlockStatement":case"StaticBlock":return n.blocks;case"SwitchStatement":return n.switches;case"ClassBody":return n.classes;default:throw new Error("unreachable")}}(r)?(d&&t.report({node:r,loc:{start:c.loc.start,end:l.loc.start},fix(e){return e.replaceTextRange([c.range[1],l.range[0]-l.loc.start.column],"\n")},messageId:"neverPadBlock"}),f&&t.report({node:r,loc:{end:p.loc.start,start:u.loc.end},messageId:"neverPadBlock",fix(e){return e.replaceTextRange([u.range[1],p.range[0]-p.loc.start.column],"\n")}})):(d||t.report({node:r,loc:{start:c.loc.start,end:l.loc.start},fix(e){return e.insertTextAfter(c,"\n")},messageId:"alwaysPadBlock"}),f||t.report({node:r,loc:{end:p.loc.start,start:u.loc.end},fix(e){return e.insertTextBefore(p,"\n")},messageId:"alwaysPadBlock"})))}const c={};return Object.prototype.hasOwnProperty.call(n,"switches")&&(c.SwitchStatement=function(e){0!==e.cases.length&&l(e)}),Object.prototype.hasOwnProperty.call(n,"blocks")&&(c.BlockStatement=function(e){0!==e.body.length&&l(e)},c.StaticBlock=c.BlockStatement),Object.prototype.hasOwnProperty.call(n,"classes")&&(c.ClassBody=function(e){0!==e.body.length&&l(e)}),c}},vM}function LN(){if(SM)return xM;SM=1;const e=Pw(),t=`[${Array.from(e.LINEBREAKS).join("")}]`,n=new RegExp(String.raw`^(\s*?${t})\s*${t}(\s*;?)$`,"u"),r=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,i=/^require\(/u;function s(e){return{test:(t,n)=>n.getFirstToken(t).value===e}}function o(e){return{test:(t,n)=>t.loc.start.line===t.loc.end.line&&n.getFirstToken(t).value===e}}function a(e){return{test:(t,n)=>t.loc.start.line!==t.loc.end.line&&n.getFirstToken(t).value===e}}function l(e){return{test:t=>t.type===e}}function c(t){if("ExpressionStatement"===t.type){let n=e.skipChainExpression(t.expression);return"UnaryExpression"===n.type&&(n=e.skipChainExpression(n.argument)),"CallExpression"===n.type&&e.isFunction(n.callee)}return!1}function u(t,n){if("DoWhileStatement"===n.type&&"BlockStatement"===n.body.type)return!0;if(c(n))return!0;const r=t.getLastToken(n,e.isNotSemicolonToken),i=r&&e.isClosingBraceToken(r)?t.getNodeByRangeIndex(r.range[0]):null;return Boolean(i)&&("BlockStatement"===i.type||"SwitchStatement"===i.type)}function p(t,n){const r=t.getLastToken(n),i=t.getTokenBefore(r),s=t.getTokenAfter(r);return Boolean(i&&s&&i.range[0]>=n.range[0]&&e.isSemicolonToken(r)&&r.loc.start.line!==i.loc.end.line&&r.loc.end.line===s.loc.start.line)?i:r}function d(e,t,n){return t+n}const f={any:{verify:function(){}},never:{verify:function(e,t,r,i){0!==i.length&&e.report({node:r,messageId:"unexpectedBlankLine",fix(t){if(i.length>=2)return null;const r=i[0][0],s=i[0][1],o=r.range[1],a=s.range[0],l=e.sourceCode.text.slice(o,a).replace(n,d);return t.replaceTextRange([o,a],l)}})}},always:{verify:function(t,n,r,i){i.length>0||t.report({node:r,messageId:"expectedBlankLine",fix(i){const s=t.sourceCode;let o=p(s,n);const a=s.getFirstTokenBetween(o,r,{includeComments:!0,filter(t){return!e.isTokenOnSameLine(o,t)||(o=t,!1)}})||r,l=e.isTokenOnSameLine(o,a)?"\n\n":"\n";return i.insertTextAfter(o,l)}})}}},h={"*":{test:()=>!0},"block-like":{test:(e,t)=>u(t,e)},"cjs-export":{test:(e,t)=>"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&r.test(t.getText(e.expression.left))},"cjs-import":{test:(e,t)=>"VariableDeclaration"===e.type&&e.declarations.length>0&&Boolean(e.declarations[0].init)&&i.test(t.getText(e.declarations[0].init))},directive:{test:e.isDirective},expression:{test:t=>"ExpressionStatement"===t.type&&!e.isDirective(t)},iife:{test:c},"multiline-block-like":{test:(e,t)=>e.loc.start.line!==e.loc.end.line&&u(t,e)},"multiline-expression":{test:t=>t.loc.start.line!==t.loc.end.line&&"ExpressionStatement"===t.type&&!e.isDirective(t)},"multiline-const":a("const"),"multiline-let":a("let"),"multiline-var":a("var"),"singleline-const":o("const"),"singleline-let":o("let"),"singleline-var":o("var"),block:l("BlockStatement"),empty:l("EmptyStatement"),function:l("FunctionDeclaration"),break:s("break"),case:s("case"),class:s("class"),const:s("const"),continue:s("continue"),debugger:s("debugger"),default:s("default"),do:s("do"),export:s("export"),for:s("for"),if:s("if"),import:s("import"),let:s("let"),return:s("return"),switch:s("switch"),throw:s("throw"),try:s("try"),var:s("var"),while:s("while"),with:s("with")};return xM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow padding lines between statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/padding-line-between-statements"},fixable:"whitespace",schema:{definitions:{paddingType:{enum:Object.keys(f)},statementType:{anyOf:[{enum:Object.keys(h)},{type:"array",items:{enum:Object.keys(h)},minItems:1,uniqueItems:!0}]}},type:"array",items:{type:"object",properties:{blankLine:{$ref:"#/definitions/paddingType"},prev:{$ref:"#/definitions/statementType"},next:{$ref:"#/definitions/statementType"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},create(t){const n=t.sourceCode,r=t.options||[];let i=null;function s(){i={upper:i,prevNode:null}}function o(){i=i.upper}function a(e,t){let r=e;for(;"LabeledStatement"===r.type;)r=r.body;return Array.isArray(t)?t.some(a.bind(null,r)):h[t].test(r,n)}function l(s){const o=s.parent.type;if(!(e.STATEMENT_LIST_PARENTS.has(o)||"SwitchStatement"===o))return;const l=i.prevNode;if(l){const e=function(e,t){for(let n=r.length-1;n>=0;--n){const i=r[n];if(a(e,i.prev)&&a(t,i.next))return f[i.blankLine]}return f.any}(l,s),i=function(e,t){const r=[];let i=p(n,e);if(t.loc.start.line-i.loc.end.line>=2)do{const e=n.getTokenAfter(i,{includeComments:!0});e.loc.start.line-i.loc.end.line>=2&&r.push([i,e]),i=e}while(i.range[0]0)return;const c=function(e){const t=e.variables;for(let e=0;e0)return;const u=function(t){const n={isCallback:!1,isLexicalThis:!1};let r=t,i=t.parent,s=!1;for(;r;){switch(i.type){case"LogicalExpression":case"ChainExpression":case"ConditionalExpression":break;case"MemberExpression":if(i.object!==r||i.property.computed||"Identifier"!==i.property.type||"bind"!==i.property.name)return n;{const t="ChainExpression"===i.parent.type?i.parent:i;if(!e.isCallee(t))return n;s||(s=!0,n.isLexicalThis=1===t.parent.arguments.length&&"ThisExpression"===t.parent.arguments[0].type),i=t.parent}break;case"CallExpression":case"NewExpression":return i.callee!==r&&(n.isCallback=!0),n;default:return n}r=i,i=i.parent}throw new Error("unreachable")}(n);!u.isCallback||r&&o.this&&!u.isLexicalThis||o.super||o.meta||t.report({node:n,messageId:"preferArrowCallback",*fix(t){if(!u.isLexicalThis&&o.this||(r=n.params).every((e=>"Identifier"===e.type))&&r.length!==new Set(r.map((e=>e.name))).size)return;var r;if(u.isLexicalThis){const r=n.parent;if("MemberExpression"!==r.type)return;const i=r.parent,o=s.getTokenAfter(r.object,e.isNotClosingParenToken),a=s.getLastToken(i);if(e.isParenthesised(s,r))return;if(s.commentsExistBetween(o,a))return;yield t.removeRange([o.range[0],a.range[1]])}const i=s.getFirstToken(n,n.async?1:0),a=s.getTokenAfter(i,e.isOpeningParenToken),l=s.getTokenBefore(n.body);s.commentsExistBetween(i,a)?(yield t.remove(i),n.id&&(yield t.remove(n.id))):yield t.removeRange([i.range[0],a.range[0]]),yield t.insertTextAfter(l," =>");let c=u.isLexicalThis?n.parent.parent:n;"ChainExpression"===c.type&&(c=c.parent),"CallExpression"===c.parent.type||"ConditionalExpression"===c.parent.type||e.isParenthesised(s,c)||e.isParenthesised(s,n)||(yield t.insertTextBefore(c,"("),yield t.insertTextAfter(c,")"))}})}}}},OM}function MN(){if(CM)return wM;CM=1;const e=Aj(),t=Pw(),n=/^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u,r=/^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u,i=/^(?:VariableDeclarator|AssignmentExpression)$/u;function s(e,n){if(n.through.some((t=>t.resolved&&t.resolved.name===e)))return!0;const r=t.getVariableByName(n,e);return null!==r&&r.defs.some((e=>"Parameter"===e.type))}function o(e){if(!e.isWrite())return null;let t=e.identifier.parent;for(;n.test(t.type);)t=t.parent;return i.test(t.type)?t:null}function a(e){switch(e.type){case"ObjectPattern":return e.properties.some((e=>!!e&&a(e.argument||e.value)));case"ArrayPattern":return e.elements.some((e=>!!e&&a(e)));case"AssignmentPattern":return a(e.left);case"MemberExpression":return!0}return!1}function l(e,t){if(e.eslintUsed&&"global"===e.scope.type)return null;let i=null,l=!1;const c=e.references;for(let n=0;ne.value)).map((e=>e.value.name)).some((t=>s(t,e.scope))),i=a(n)}else if("ArrayPattern"===n.type){r=n.elements.map((e=>e&&e.name)).some((t=>s(t,e.scope))),i=a(n)}if(r||i)return null}i=r}else if(r.isRead()&&null===i){if(t)return null;l=!0}}const u=null!==i&&i.from===e.scope&&function(e){let t=e.parent;for(;n.test(t.type);)t=t.parent;return"VariableDeclarator"===t.type||"AssignmentExpression"===t.type&&"ExpressionStatement"===t.parent.type&&r.test(t.parent.parent.type)}(i.identifier);return u?l?e.defs[0].name:i.identifier:null}function c(e,t,n){return!e||n(e)?null:e.type===t?e:c(e.parent,t,n)}return wM={meta:{type:"suggestion",docs:{description:"Require `const` declarations for variables that are never reassigned after declared",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-const"},fixable:"code",schema:[{type:"object",properties:{destructuring:{enum:["any","all"],default:"any"},ignoreReadBeforeAssign:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{useConst:"'{{name}}' is never reassigned. Use 'const' instead."}},create(t){const n=t.options[0]||{},r=t.sourceCode,i="all"!==n.destructuring,s=!0===n.ignoreReadBeforeAssign,a=[];let u=0,p=null,d="";function f(n){const s=n.filter(Boolean);if(n.length&&(i||s.length===n.length)){const i=c(n[0],"VariableDeclaration",(e=>e.type.endsWith("Statement"))),o=null===i;if(!o&&i.declarations.length>0){const e=i.declarations[0];if(e.init){const t=e.init.parent;"VariableDeclarator"===t.type&&(t.id.name!==d&&(d=t.id.name,u=0),"ObjectPattern"===t.id.type&&t.init.name!==d&&(d=t.init.name,u=0),t.id!==p&&(p=t.id,u=0))}}let a=i&&("ForInStatement"===i.parent.type||"ForOfStatement"===i.parent.type||i.declarations.every((e=>e.init)))&&s.length===n.length;if(!o&&i.declarations&&1!==i.declarations.length&&i&&i.declarations&&i.declarations.length>=1){u+=s.length;let e=0;i.declarations.forEach((t=>{"ObjectPattern"===t.id.type?e+=t.id.properties.length:"ArrayPattern"===t.id.type?e+=t.id.elements.length:e+=1})),a=a&&u===e}s.forEach((n=>{t.report({node:n,messageId:"useConst",data:n,fix:a?t=>{const n=r.getFirstToken(i,(e=>e.value===i.kind));return new e(t,r).retainRange(i.range).replaceTextRange(n.range,"const")}:null})}))}}return{"Program:exit"(){(function(e,t){const n=new Map;for(let r=0;rfunction(r,i){const s=i.init,o=n.sourceCode;if(o.getCommentsInside(i).length>o.getCommentsInside(s.object).length)return null;let a=o.getText(s.object);return e.getPrecedence(s.object)"SpreadElement"===e.type))||o.getCommentsInside(t).length>0)return null;const s=t.arguments[0],a=t.arguments[1],l=o.getText(s),c=o.getText(a),u=function(t){return e.getPrecedence(t)<=r||"AwaitExpression"===t.type||"UnaryExpression"===t.type}(s),p=function(t){return e.getPrecedence(t)=r)&&!("BinaryExpression"===i.type&&"**"===i.operator&&i.right===t)&&!(("CallExpression"===i.type||"NewExpression"===i.type)&&i.arguments.includes(t))&&!("MemberExpression"===i.type&&i.computed&&i.property===t)&&!("ArrayExpression"===i.type))&&!e.isParenthesised(n,t)}(t,o);let f="",h="";if(!d){if(!u){const n=o.getFirstToken(s),r=o.getTokenBefore(t);r&&r.range[1]===t.range[0]&&!e.canTokensBeAdjacent(r,n)&&(f=" ")}if(!p){const n=o.getLastToken(a),r=o.getTokenAfter(t);r&&t.range[1]===r.range[0]&&!e.canTokensBeAdjacent(n,r)&&(h=" ")}}const m=i(l,u),g=i(c,p),y=i(`${m}**${g}`,d);return n.replaceText(t,`${f}${y}${h}`)}})}return{Program(e){const r=o.getScope(e),i=new n(r),s={Math:{pow:{[t]:!0}}};for(const{node:e}of i.iterateGlobalReferences(s))a(e)}}}},kM}function FN(){if(IM)return RM;IM=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),i=Tj(),s=new i.RegExpParser;return RM={meta:{type:"suggestion",docs:{description:"Enforce using named capture group in regular expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-named-capture-group"},hasSuggestions:!0,schema:[],messages:{addGroupName:"Add name to capture group.",addNonCapture:"Convert group to non-capturing.",required:"Capture group '{{group}}' should be converted to a named or non-capturing group."}},create(o){const a=o.sourceCode;function l(e,t,n,r){let l;try{l=s.parsePattern(e,0,e.length,{unicode:Boolean(r&&r.includes("u")),unicodeSets:Boolean(r&&r.includes("v"))})}catch{return}i.visitRegExpAST(l,{onCapturingGroupEnter(r){if(!r.name){const i=a.getText(n),s=function(e,t,n,r){switch(r.type){case"Literal":if("string"==typeof r.value&&n.includes("\\"))return null;break;case"TemplateLiteral":if(r.expressions.length||n.slice(1,-1)!==t)return null;break;default:return null}const i=r.range[0]+e+2;return[{fix(e){const n=(t.match(/temp\d+/gu)||[]).reduce(((e,t)=>Math.max(e,Number(t.slice("temp".length)))),0);return e.insertTextBeforeRange([i,i],`?`)},messageId:"addGroupName"},{fix(e){return e.insertTextBeforeRange([i,i],"?:")},messageId:"addNonCapture"}]}(r.start,e,i,n);o.report({node:t,messageId:"required",data:{group:r.raw},suggest:s})}}})}return{Literal(e){e.regex&&l(e.regex.pattern,e,e,e.regex.flags)},Program(i){const s=a.getScope(i),o=new n(s),c={RegExp:{[e]:!0,[t]:!0}};for(const{node:e}of o.iterateGlobalReferences(c)){const t=r(e.arguments[0]),n=r(e.arguments[1]);t&&l(t,e,e.arguments[0],n)}}}}},RM}function UN(){if(BM)return LM;BM=1;const e=Pw(),t=new Map([[2,{system:"binary",literalPrefix:"0b"}],[8,{system:"octal",literalPrefix:"0o"}],[16,{system:"hexadecimal",literalPrefix:"0x"}]]);return LM={meta:{type:"suggestion",docs:{description:"Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-numeric-literals"},schema:[],messages:{useLiteral:"Use {{system}} literals instead of {{functionName}}()."},fixable:"code"},create(n){const r=n.sourceCode;return{"CallExpression[arguments.length=2]"(i){const[s,o]=i.arguments,a=e.getStaticStringValue(s),l=o.value;if(null!==a&&e.isStringLiteral(s)&&"Literal"===o.type&&"number"==typeof l&&t.has(l)&&(c=i.callee,e.isSpecificId(c,"parseInt")||e.isSpecificMemberAccess(c,"Number","parseInt"))){const{system:s,literalPrefix:o}=t.get(l);n.report({node:i,messageId:"useLiteral",data:{system:s,functionName:r.getText(i.callee)},fix(t){if(r.getCommentsInside(i).length)return null;const n=`${o}${a}`;if(+n!==parseInt(a,l))return null;const s=r.getTokenBefore(i),c=r.getTokenAfter(i);let u="",p="";return s&&s.range[1]===i.range[0]&&!e.canTokensBeAdjacent(s,n)&&(u=" "),c&&i.range[1]===c.range[0]&&!e.canTokensBeAdjacent(n,c)&&(p=" "),t.replaceText(i,`${u}${n}${p}`)}})}var c}}}},LM}function VN(){if(jM)return MM;jM=1;const e=Pw();return MM={meta:{type:"suggestion",docs:{description:"Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-has-own"},schema:[],messages:{useHasOwn:"Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'."},fixable:"code"},create(t){const n=t.sourceCode;return{CallExpression(r){if("MemberExpression"!==r.callee.type||"MemberExpression"!==r.callee.object.type)return;const i=e.getStaticPropertyName(r.callee),s=e.getStaticPropertyName(r.callee.object),o=function(t){if("ObjectExpression"===t.object.type&&0===t.object.properties.length)return!0;const n="MemberExpression"===t.object.type&&"prototype"===e.getStaticPropertyName(t.object)?t.object.object:t.object;return"Identifier"===n.type&&"Object"===n.name}(r.callee.object),a=n.getScope(r),l=e.getVariableByName(a,"Object");"call"===i&&"hasOwnProperty"===s&&o&&l&&"global"===l.scope.type&&t.report({node:r,messageId:"useHasOwn",fix(t){if(n.getCommentsInside(r.callee).length>0)return null;const i=n.getTokenBefore(r.callee,{includeComments:!0});return i&&i.range[1]===r.callee.range[0]&&!e.canTokensBeAdjacent(i,"Object.hasOwn")?t.replaceText(r.callee," Object.hasOwn"):t.replaceText(r.callee,"Object.hasOwn")}})}}}},MM}function KN(){if(FM)return NM;FM=1;const{CALL:e,ReferenceTracker:t}=rS(),{isCommaToken:n,isOpeningParenToken:r,isClosingParenToken:i,isParenthesised:s}=Pw(),o=/\s/u;function a(e){return e.arguments.some((e=>"SpreadElement"===e.type))}function l(e){return"Property"===e.type&&("get"===e.kind||"set"===e.kind)}function c(e){return e.properties.some(l)}function u(e){return e.arguments.filter((e=>"ObjectExpression"===e.type)).some(c)}function p(e,t){switch(e.type){case"AssignmentExpression":case"ArrowFunctionExpression":case"ConditionalExpression":return!s(t,e);default:return!1}}function d(e,t,n){const s=[n.getFirstToken(e),n.getLastToken(e)];let o=n.getTokenBefore(e),a=n.getTokenAfter(e);for(;o&&a&&o.range[0]>t.range[0]&&r(o)&&i(a);)s.push(o,a),o=n.getTokenBefore(o),a=n.getTokenAfter(a);return s.sort(((e,t)=>e.range[0]-t.range[0]))}function f(e,t){const n=t.text;let r=e.range[0];{const n=t.getTokenBefore(e,{includeComments:!0});if(n&&"Line"===n.type)return r}for(;o.test(n[r-1]||"");)r-=1;return r}function h(e,t){const n=t.text;let r=e.range[1];for(;o.test(n[r]||"");)r+=1;return r}function m(e,t){return function*(i){const o=t.getTokenAfter(e.callee,r),a=t.getLastToken(e);yield i.removeRange([e.range[0],o.range[0]]),!function(e,t){const n=e.parent;switch(n.type){case"VariableDeclarator":case"ArrayExpression":case"ReturnStatement":case"CallExpression":case"Property":return!1;case"AssignmentExpression":return n.left===e&&!s(t,e);default:return!s(t,e)}}(e,t)?(yield i.replaceText(o,"{"),yield i.replaceText(a,"}")):(yield i.replaceText(o,"({"),yield i.replaceText(a,"})"));for(const r of e.arguments){const e=d(r,o,t),s=e.shift(),a=e.pop();if("ObjectExpression"===r.type){const o=t.getLastToken(r,1),l=t.getTokenAfter(a);for(const t of e)yield i.remove(t);const c=[s.range[0],h(s,t)],u=[Math.max(f(a,t),c[1]),a.range[1]];yield i.removeRange(c),yield i.removeRange(u),(0===r.properties.length||n(o))&&n(l)&&(yield i.remove(l))}else p(r,t)?(yield i.insertTextBefore(s,"...("),yield i.insertTextAfter(a,")")):yield i.insertTextBefore(s,"...")}}}return NM={meta:{type:"suggestion",docs:{description:"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-object-spread"},schema:[],fixable:"code",messages:{useSpreadMessage:"Use an object spread instead of `Object.assign` eg: `{ ...foo }`.",useLiteralMessage:"Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`."}},create(n){const r=n.sourceCode;return{Program(i){const s=r.getScope(i),o=new t(s),l={Object:{assign:{[e]:!0}}};for(const{node:e}of o.iterateGlobalReferences(l))if(e.arguments.length>=1&&"ObjectExpression"===e.arguments[0].type&&!a(e)&&!(e.arguments.length>1&&u(e))){const t=1===e.arguments.length?"useLiteralMessage":"useSpreadMessage",i=m(e,r);n.report({node:e,messageId:t,fix:i})}}}}},NM}function WN(){if(VM)return UM;VM=1;const e=Pw();return UM={meta:{type:"suggestion",docs:{description:"Require using Error objects as Promise rejection reasons",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-promise-reject-errors"},fixable:null,schema:[{type:"object",properties:{allowEmptyReject:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{rejectAnError:"Expected the Promise rejection reason to be an Error."}},create(t){const n=t.options.length&&t.options[0].allowEmptyReject,r=t.sourceCode;function i(r){!r.arguments.length&&n||r.arguments.length&&e.couldBeError(r.arguments[0])&&("Identifier"!==r.arguments[0].type||"undefined"!==r.arguments[0].name)||t.report({node:r,messageId:"rejectAnError"})}return{CallExpression(t){(function(t){return e.isSpecificMemberAccess(t.callee,"Promise","reject")})(t)&&i(t)},"NewExpression:exit"(t){"Identifier"===t.callee.type&&"Promise"===t.callee.name&&t.arguments.length&&e.isFunction(t.arguments[0])&&t.arguments[0].params.length>1&&"Identifier"===t.arguments[0].params[1].type&&r.getDeclaredVariables(t.arguments[0]).find((e=>e.name===t.arguments[0].params[1].name)).references.filter((e=>e.isRead())).filter((e=>"CallExpression"===e.identifier.parent.type&&e.identifier===e.identifier.parent.callee)).forEach((e=>i(e.identifier.parent)))}}}},UM}function $N(){if(qM)return $M;qM=1;const e=Pw(),{CALL:t,CONSTRUCT:n,ReferenceTracker:r,findVariable:i}=rS(),{RegExpValidator:s,visitRegExpAST:o,RegExpParser:a}=Tj(),{canTokensBeAdjacent:l}=Pw(),{REGEXPP_LATEST_ECMA_VERSION:c}=zj();function u(e){return"Literal"===e.type&&"string"==typeof e.value}function p(e){return"Literal"===e.type&&Object.prototype.hasOwnProperty.call(e,"regex")}const d=new Set(["(",";","[",",","=","+","*","-","?","~","%","**","!","typeof","instanceof","&&","||","??","return","...","delete","void","in","<",">","<=",">=","==","===","!=","!==","<<",">>",">>>","&","|","^",":","{","=>","*=","<<=",">>=",">>>=","^=","|=","&=","??=","||=","&&=","**=","+=","-=","/=","%=","/","do","break","continue","debugger","case","throw"]);return $M={meta:{type:"suggestion",docs:{description:"Disallow use of the `RegExp` constructor in favor of regular expression literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-regex-literals"},hasSuggestions:!0,schema:[{type:"object",properties:{disallowRedundantWrapping:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedRegExp:"Use a regular expression literal instead of the 'RegExp' constructor.",replaceWithLiteral:"Replace with an equivalent regular expression literal.",replaceWithLiteralAndFlags:"Replace with an equivalent regular expression literal with flags '{{ flags }}'.",replaceWithIntendedLiteralAndFlags:"Replace with a regular expression literal with flags '{{ flags }}'.",unexpectedRedundantRegExp:"Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.",unexpectedRedundantRegExpWithFlags:"Use regular expression literal with flags instead of the 'RegExp' constructor."}},create(f){const[{disallowRedundantWrapping:h=!1}={}]=f.options,m=f.sourceCode;function g(t){return"TaggedTemplateExpression"===t.type&&e.isSpecificMemberAccess(t.tag,"String","raw")&&function(e){const t=m.getScope(e),n=i(t,e);return null!==n&&"global"===n.scope.type&&0===n.defs.length}(e.skipChainExpression(t.tag).object)&&e.isStaticTemplateLiteral(t.quasi)}function y(t){return u(t)?t.value:e.isStaticTemplateLiteral(t)?t.quasis[0].value.cooked:g(t)?t.quasi.quasis[0].value.raw:null}function _(t){return u(t)||e.isStaticTemplateLiteral(t)||g(t)}function b(e){const t=e.arguments;return!(1!==t.length&&2!==t.length||!t.every(_))}function v(e){const t=e.arguments;return!(1!==t.length||!p(t[0]))||!(2!==t.length||!p(t[0])||!_(t[1]))}const E=(x=f.languageOptions.ecmaVersion)<=5?5:Math.min(x,c);var x;function S(e){switch(e){case"\n":case"\\\n":return"\\n";case"\r":case"\\\r":return"\\r";case"\t":case"\\\t":return"\\t";case"\v":case"\\\v":return"\\v";case"\f":case"\\\f":return"\\f";case"/":return"\\/";default:return null}}function O(e,t){return[...e].sort().join("")===[...t].sort().join("")}function T(e,t,n){const r=m.getTokenBefore(e);return 0===m.getCommentsInside(e).length&&(!r||d.has(r.value))&&function(e,t){const n=new s({ecmaVersion:E});try{return n.validatePattern(e,0,e.length,{unicode:!!t&&t.includes("u"),unicodeSets:!!t&&t.includes("v")}),t&&n.validateFlags(t),!0}catch{return!1}}(t,n)}function w(e,t){const n=m.getTokenBefore(e),r=m.getTokenAfter(e);return(n&&!l(n,t)&&n.range[1]===e.range[0]?" ":"")+t+(r&&!l(t,r)&&e.range[1]===r.range[0]?" ":"")}return{Program(e){const i=m.getScope(e),s=new r(i),l={RegExp:{[t]:!0,[n]:!0}};for(const{node:e}of s.iterateGlobalReferences(l))if(h&&v(e)){const t=e.arguments[0];if(2===e.arguments.length){const n=[],r=y(e.arguments[1])||"";T(e,t.regex.pattern,r)&&n.push({messageId:"replaceWithLiteralAndFlags",pattern:t.regex.pattern,flags:r});const i=t.regex.flags||"",s=(c=i,u=r,[...new Set([...c,...u])].join(""));!O(s,r)&&T(e,t.regex.pattern,s)&&n.push({messageId:"replaceWithIntendedLiteralAndFlags",pattern:t.regex.pattern,flags:s}),f.report({node:e,messageId:"unexpectedRedundantRegExpWithFlags",suggest:n.map((({flags:t,pattern:n,messageId:r})=>({messageId:r,data:{flags:t},fix(r){return r.replaceText(e,w(e,`/${n}/${t}`))}})))})}else{const n=[];T(e,t.regex.pattern,t.regex.flags)&&n.push(m.getText(t)),f.report({node:e,messageId:"unexpectedRedundantRegExp",suggest:n.map((t=>({messageId:"replaceWithLiteral",fix(n){return n.replaceText(e,w(e,t))}})))})}}else if(b(e)){let t,n=y(e.arguments[0]),r=!1;if(e.arguments[1]&&(t=y(e.arguments[1])),T(e,n,t)||(r=!0),/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.>e+r.slice(t.range[1],n[i+1].range[0])),"")}function p(e,n,r){if("Literal"===e.type&&"string"==typeof e.value)return`\`${e.raw.slice(1,-1).replace(/\\*(\$\{|`)/gu,(e=>e.lastIndexOf("\\")%2?`\\${e}`:e)).replace(new RegExp(`\\\\${e.raw[0]}`,"gu"),e.raw[0])}\``;if("TemplateLiteral"===e.type)return l.getText(e);if(t(e)&&i(e)){const t=l.getFirstTokenBetween(e.left,e.right,(e=>"+"===e.value)),i=u(e.left,t),s=u(t,e.right),a=function(e){return"BinaryExpression"===e.type?o(e.right):"TemplateLiteral"===e.type?e.expressions.length&&e.quasis.length&&e.quasis[e.quasis.length-1].range[0]===e.quasis[e.quasis.length-1].range[1]:"Literal"!==e.type||"string"!=typeof e.value}(e.left),c=o(e.right);return a?p(e.left,n,i+s).slice(0,-1)+p(e.right,null,r).slice(1):c?p(e.left,n,null).slice(0,-1)+p(e.right,i+s,r).slice(1):`${p(e.left,n,null)}${i}+${s}${p(e.right,r,null)}`}return`\`\${${n||""}${l.getText(e)}${r||""}}\``}function d(e,t){const i=n(t.parent);return r(i)?null:e.replaceText(i,p(i,null,null))}function f(r){if(!e.isStringLiteral(r)||!t(r.parent))return;const i=n(r.parent);c[i.range[0]]||(c[i.range[0]]=!0,s(i)&&a.report({node:i,messageId:"unexpectedStringConcatenation",fix:e=>d(e,r)}))}return{Program(){c=Object.create(null)},Literal:f,TemplateLiteral:f}}},ZM}function zN(){if(JM)return YM;JM=1;const e=bv(),t=Pw(),n=ok();return YM={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require quotes around object literal property names",recommended:!1,url:"https://eslint.org/docs/latest/rules/quote-props"},schema:{anyOf:[{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},fixable:"code",messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},create(r){const i=r.options[0],s=r.options[1]&&r.options[1].keywords,o=!r.options[1]||!1!==r.options[1].unnecessary,a=r.options[1]&&r.options[1].numbers,l=r.sourceCode;function c(e){return n.includes(e)}function u(e,t,n){return 1===t.length&&0===t[0].start&&t[0].end===e.length&&(["Identifier","Keyword","Null","Boolean"].includes(t[0].type)||"Numeric"===t[0].type&&!n&&String(+t[0].value)===t[0].value)}function p(e){return"Identifier"===e.type?e.name:e.value}function d(e){return"Literal"===e.type&&"string"==typeof e.value?l.getText(e):`"${"Identifier"===e.type?e.name:e.value}"`}function f(t,n){const i=[],o=[];let a=null,l=!1;t.properties.forEach((t=>{const r=t.key;if(r&&!t.method&&!t.computed&&!t.shorthand)if("Literal"===r.type&&"string"==typeof r.value){if(i.push(t),n){let t;try{t=e.tokenize(r.value)}catch{return void(l=!0)}l=l||!u(r.value,t)||s&&c(t[0].value)}}else s&&n&&"Identifier"===r.type&&c(r.name)?(o.push(t),l=!0,a=r.name):o.push(t)})),n&&i.length&&!l?i.forEach((e=>{r.report({node:e,messageId:"redundantQuoting",fix:t=>t.replaceText(e.key,p(e.key))})})):o.length&&a?o.forEach((e=>{r.report({node:e,messageId:"requireQuotesDueToReservedWord",data:{property:a},fix:t=>t.replaceText(e.key,d(e.key))})})):i.length&&o.length&&o.forEach((e=>{r.report({node:e,messageId:"inconsistentlyQuotedProperty",data:{key:e.key.name||e.key.value},fix:t=>t.replaceText(e.key,d(e.key))})}))}return{Property(n){"always"!==i&&i||function(e){const t=e.key;e.method||e.computed||e.shorthand||"Literal"===t.type&&"string"==typeof t.value||r.report({node:e,messageId:"unquotedPropertyFound",data:{property:t.name||t.value},fix:e=>e.replaceText(t,d(t))})}(n),"as-needed"===i&&function(n){const i=n.key;if(!(n.method||n.computed||n.shorthand))if("Literal"===i.type&&"string"==typeof i.value){let t;try{t=e.tokenize(i.value)}catch{return}if(1!==t.length)return;if(c(t[0].value)&&s)return;o&&u(i.value,t,a)&&r.report({node:n,messageId:"unnecessarilyQuotedProperty",data:{property:i.value},fix:e=>e.replaceText(i,p(i))})}else s&&"Identifier"===i.type&&c(i.name)?r.report({node:n,messageId:"unquotedReservedProperty",data:{property:i.name},fix:e=>e.replaceText(i,d(i))}):a&&"Literal"===i.type&&t.isNumericLiteral(i)&&r.report({node:n,messageId:"unquotedNumericProperty",data:{property:i.value},fix:e=>e.replaceText(i,d(i))})}(n)},ObjectExpression(e){"consistent"===i&&f(e,!1),"consistent-as-needed"===i&&f(e,!0)}}}},YM}function XN(){if(tj)return ej;tj=1;const e=Pw(),t={double:{quote:'"',alternateQuote:"'",description:"doublequote"},single:{quote:"'",alternateQuote:'"',description:"singlequote"},backtick:{quote:"`",alternateQuote:'"',description:"backtick"}},n=new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(e.LINEBREAKS).join("")}]`,"u");t.double.convert=t.single.convert=t.backtick.convert=function(e){const t=this.quote,n=e[0];return t===n?e:t+e.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,((e,r,i)=>r===n||"`"===n&&"${"===r?r:e===t||"`"===t&&"${"===e?`\\${e}`:i&&"`"===n?"\\n":e))+t};return ej={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes",recommended:!1,url:"https://eslint.org/docs/latest/rules/quotes"},fixable:"code",schema:[{enum:["single","double","backtick"]},{anyOf:[{enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},create(r){const i=r.options[0],s=t[i||"double"],o=r.options[1],a=o&&!0===o.allowTemplateLiterals,l=r.sourceCode;let c=o&&!0===o.avoidEscape;function u(t){return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&!e.isParenthesised(l,t.expression)}function p(t){const n=t.parent;switch(n.type){case"ExpressionStatement":return!e.isParenthesised(l,t)&&function(t){if(!e.isTopLevelExpressionStatement(t.parent))return!1;const n=t.parent.parent;for(let e=0;e0||!!(e.quasis.length>=1&&n.test(e.quasis[0].value.raw)))}(t)||r.report({node:t,messageId:"wrongQuotes",data:{description:s.description},fix(n){return e.isTopLevelExpressionStatement(t.parent)&&!e.isParenthesised(l,t)?null:n.replaceText(t,s.convert(l.getText(t)))}})}}}},ej}function GN(){if(rj)return nj;rj=1;const e=Pw(),t="always",n=new Set(Array.from({length:35},((e,t)=>t+2)));function r(e){return e.defs.length>=1}return nj={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of the radix argument when using `parseInt()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/radix"},hasSuggestions:!0,schema:[{enum:["always","as-needed"]}],messages:{missingParameters:"Missing parameters.",redundantRadix:"Redundant radix parameter.",missingRadix:"Missing radix parameter.",invalidRadix:"Invalid radix parameter, must be an integer between 2 and 36.",addRadixParameter10:"Add radix parameter `10` for parsing decimal numbers."}},create(i){const s=i.options[0]||t,o=i.sourceCode;function a(e){const r=e.arguments;switch(r.length){case 0:i.report({node:e,messageId:"missingParameters"});break;case 1:s===t&&i.report({node:e,messageId:"missingRadix",suggest:[{messageId:"addRadixParameter10",fix(t){const n=o.getTokens(e),r=n[n.length-1],i=n[n.length-2],s="Punctuator"===i.type&&","===i.value;return t.insertTextBefore(r,s?" 10,":", 10")}}]});break;default:"as-needed"===s&&function(e){return"Literal"===e.type&&10===e.value}(r[1])?i.report({node:e,messageId:"redundantRadix"}):function(e){return!("Literal"===e.type&&!n.has(e.value)||"Identifier"===e.type&&"undefined"===e.name)}(r[1])||i.report({node:e,messageId:"invalidRadix"})}}return{"Program:exit"(t){const n=o.getScope(t);let i;i=e.getVariableByName(n,"parseInt"),i&&!r(i)&&i.references.forEach((t=>{const n=t.identifier;e.isCallee(n)&&a(n.parent)})),i=e.getVariableByName(n,"Number"),i&&!r(i)&&i.references.forEach((t=>{const n=t.identifier.parent,r="ChainExpression"===n.parent.type?n.parent:n;(function(e){return"MemberExpression"===e.type&&!e.computed&&"Identifier"===e.property.type&&"parseInt"===e.property.name})(n)&&e.isCallee(r)&&a(r.parent)}))}}}},nj}function ZN(){return cj||(cj=1,lj={meta:{type:"suggestion",docs:{description:"Require JSDoc comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-jsdoc"},schema:[{type:"object",properties:{require:{type:"object",properties:{ClassDeclaration:{type:"boolean",default:!1},MethodDefinition:{type:"boolean",default:!1},FunctionDeclaration:{type:"boolean",default:!0},ArrowFunctionExpression:{type:"boolean",default:!1},FunctionExpression:{type:"boolean",default:!1}},additionalProperties:!1,default:{}}},additionalProperties:!1}],deprecated:!0,replacedBy:[],messages:{missingJSDocComment:"Missing JSDoc comment."}},create(e){const t=e.sourceCode,n=Object.assign({FunctionDeclaration:!0,MethodDefinition:!1,ClassDeclaration:!1,ArrowFunctionExpression:!1,FunctionExpression:!1},e.options[0]&&e.options[0].require);function r(n){t.getJSDocComment(n)||function(t){e.report({node:t,messageId:"missingJSDocComment"})}(n)}return{FunctionDeclaration(e){n.FunctionDeclaration&&r(e)},FunctionExpression(e){(n.MethodDefinition&&"MethodDefinition"===e.parent.type||n.FunctionExpression&&("VariableDeclarator"===e.parent.type||"Property"===e.parent.type&&e===e.parent.value))&&r(e)},ClassDeclaration(e){n.ClassDeclaration&&r(e)},ArrowFunctionExpression(e){n.ArrowFunctionExpression&&"VariableDeclarator"===e.parent.type&&r(e)}}}}),lj}function HN(){if(yj)return gj;yj=1;const e=Aj(),t=Pw();return gj={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow semicolons instead of ASI",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi"},fixable:"code",schema:{anyOf:[{type:"array",items:[{enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},create(n){const r=/^[-[(/+`]/u,i=new Set(["get","set","static"]),s=new Set(["*","in","instanceof"]),o=n.options[1],a="never"===n.options[0],l=Boolean(o&&o.omitLastInOneLineBlock),c=Boolean(o&&o.omitLastInOneLineClassBody),u=o&&o.beforeStatementContinuationChars||"any",p=n.sourceCode;function d(r,i){const s=p.getLastToken(r);let o,a,l;i?(o="extraSemi",l=s.loc,a=function(t){return new e(t,p).retainSurroundingTokens(s).remove(s)}):(o="missingSemi",l={start:s.loc.end,end:t.getNextLocation(p,s.loc.end)},a=function(e){return e.insertTextAfter(s,";")}),n.report({node:r,loc:l,messageId:o,fix:a})}function f(e){const n=e.type;return"DoWhileStatement"!==n&&"BreakStatement"!==n&&"ContinueStatement"!==n&&"DebuggerStatement"!==n&&"ImportDeclaration"!==n&&"ExportAllDeclaration"!==n&&("ReturnStatement"===n?Boolean(e.argument):"ExportNamedDeclaration"===n?Boolean(e.declaration):!function(e){if(!t.isClosingBraceToken(e))return!1;const n=p.getNodeByRangeIndex(e.range[0]);return"BlockStatement"===n.type&&"ArrowFunctionExpression"===n.parent.type}(p.getLastToken(e,1)))}function h(e){return Boolean(e)&&r.test(e.value)&&"++"!==e.value&&"--"!==e.value}function m(e){return!!function(e){const n=p.getTokenAfter(e);return!n||t.isClosingBraceToken(n)||t.isSemicolonToken(n)}(p.getLastToken(e))||!function(e){if("PropertyDefinition"!==e.type)return!1;if(!e.computed&&"Identifier"===e.key.type&&i.has(e.key.name)&&!(e.static&&"static"===e.key.name||e.value))return!0;const t=p.getTokenAfter(e);return s.has(t.value)}(e)&&(!function(e){const n=p.getLastToken(e,1),r=p.getTokenAfter(e);return!!r&&t.isTokenOnSameLine(n,r)}(e)&&("PropertyDefinition"!==e.type&&"never"===u&&!f(e)||!h(p.getTokenAfter(e))))}function g(e){const n=t.isSemicolonToken(p.getLastToken(e));if(a)n&&m(e)?d(e,!0):!n&&"always"===u&&"PropertyDefinition"!==e.type&&h(p.getTokenAfter(e))&&d(e);else{const t=l&&function(e){const t=e.parent,n=p.getTokenAfter(e);if(!n||"}"!==n.value)return!1;if("BlockStatement"===t.type)return t.loc.start.line===t.loc.end.line;if("StaticBlock"===t.type)return p.getFirstToken(t,{skip:1}).loc.start.line===t.loc.end.line;return!1}(e),r=c&&function(e){const t=e.parent,n=p.getTokenAfter(e);return!(!n||"}"!==n.value)&&"ClassBody"===t.type&&t.loc.start.line===t.loc.end.line}(e),i=t||r;n&&i?d(e,!0):n||i||d(e)}}return{VariableDeclaration:function(e){const t=e.parent;"ForStatement"===t.type&&t.init===e||/^For(?:In|Of)Statement/u.test(t.type)&&t.left===e||g(e)},ExpressionStatement:g,ReturnStatement:g,ThrowStatement:g,DoWhileStatement:g,DebuggerStatement:g,BreakStatement:g,ContinueStatement:g,ImportDeclaration:g,ExportAllDeclaration:g,ExportNamedDeclaration(e){e.declaration||g(e)},ExportDefaultDeclaration(e){/(?:Class|Function)Declaration/u.test(e.declaration.type)||g(e)},PropertyDefinition:g}}},gj}function YN(){if(bj)return _j;bj=1;const e=Pw();return _j={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(t){const n=t.options[0],r=t.sourceCode;let i=!1,s=!0;function o(n,o){if(e.isSemicolonToken(n)){if(function(t){const n=r.getTokenBefore(t);return n&&e.isTokenOnSameLine(n,t)&&r.isSpaceBetweenTokens(n,t)}(n)){if(!i){const e=r.getTokenBefore(n),i={start:e.loc.end,end:n.loc.start};t.report({node:o,loc:i,messageId:"unexpectedWhitespaceBefore",fix(t){return t.removeRange([e.range[1],n.range[0]])}})}}else if(i){const e=n.loc;t.report({node:o,loc:e,messageId:"missingWhitespaceBefore",fix(e){return e.insertTextBefore(n," ")}})}if(!function(t){const n=r.getTokenBefore(t);return!(n&&e.isTokenOnSameLine(t,n))}(n)&&!function(t){const n=r.getTokenAfter(t);return!(n&&e.isTokenOnSameLine(t,n))}(n)&&!function(t){const n=r.getTokenAfter(t);return n&&e.isClosingBraceToken(n)||e.isClosingParenToken(n)}(n))if(function(t){const n=r.getTokenAfter(t);return n&&e.isTokenOnSameLine(t,n)&&r.isSpaceBetweenTokens(t,n)}(n)){if(!s){const e=r.getTokenAfter(n),i={start:n.loc.end,end:e.loc.start};t.report({node:o,loc:i,messageId:"unexpectedWhitespaceAfter",fix(t){return t.removeRange([n.range[1],e.range[0]])}})}}else if(s){const e=n.loc;t.report({node:o,loc:e,messageId:"missingWhitespaceAfter",fix(e){return e.insertTextAfter(n," ")}})}}}function a(e){o(r.getLastToken(e),e)}return"object"==typeof n&&(i=n.before,s=n.after),{VariableDeclaration:a,ExpressionStatement:a,BreakStatement:a,ContinueStatement:a,DebuggerStatement:a,DoWhileStatement:a,ReturnStatement:a,ThrowStatement:a,ImportDeclaration:a,ExportNamedDeclaration:a,ExportAllDeclaration:a,ExportDefaultDeclaration:a,ForStatement(e){e.init&&o(r.getTokenAfter(e.init),e),e.test&&o(r.getTokenAfter(e.test),e)},PropertyDefinition:a}}},_j}function JN(){return Sj||(Sj=1,xj={meta:{type:"suggestion",docs:{description:"Enforce sorted import declarations within modules",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-imports"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1},memberSyntaxSortOrder:{type:"array",items:{enum:["none","all","multiple","single"]},uniqueItems:!0,minItems:4,maxItems:4},ignoreDeclarationSort:{type:"boolean",default:!1},ignoreMemberSort:{type:"boolean",default:!1},allowSeparatedGroups:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortImportsAlphabetically:"Imports should be sorted alphabetically.",sortMembersAlphabetically:"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",unexpectedSyntaxOrder:"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax."}},create(e){const t=e.options[0]||{},n=t.ignoreCase||!1,r=t.ignoreDeclarationSort||!1,i=t.ignoreMemberSort||!1,s=t.memberSyntaxSortOrder||["none","all","multiple","single"],o=t.allowSeparatedGroups||!1,a=e.sourceCode;let l=null;function c(e){return s.indexOf(function(e){return 0===e.specifiers.length?"none":"ImportNamespaceSpecifier"===e.specifiers[0].type?"all":1===e.specifiers.length?"single":"multiple"}(e))}function u(e){return e.specifiers[0]?e.specifiers[0].local.name:null}return{ImportDeclaration(t){if(!r){if(l&&o&&(p=l,d=t,Math.max(d.loc.start.line-p.loc.end.line-1,0)>0)&&(l=null),l){const r=c(t),i=c(l);let o=u(t),a=u(l);n&&(a=a&&a.toLowerCase(),o=o&&o.toLowerCase()),r!==i?r"ImportSpecifier"===e.type)),i=n?e=>e.local.name.toLowerCase():e=>e.local.name,s=r.map(i).findIndex(((e,t,n)=>n[t-1]>e));-1!==s&&e.report({node:r[s],messageId:"sortMembersAlphabetically",data:{memberName:r[s].local.name},fix(e){return r.some((e=>a.getCommentsBefore(e).length||a.getCommentsAfter(e).length))?null:e.replaceTextRange([r[0].range[0],r[r.length-1].range[1]],r.slice().sort(((e,t)=>i(e)>i(t)?1:-1)).reduce(((e,t,n)=>{const i=n===r.length-1?"":a.getText().slice(r[n].range[1],r[n+1].range[0]);return e+a.getText(t)+i}),""))}})}}}}}),xj}var eF,tF,nF,rF,iF,sF,oF,aF,lF,cF,uF,pF,dF,fF,hF,mF,gF,yF,_F,bF,vF,EF,xF,SF,OF,TF,wF,CF,AF,PF,kF,DF={exports:{}};function RF(){if(eF)return DF.exports;eF=1;var e=function(e,t){var n,r,i=1,s=0,o=0,a=String.alphabet;function l(e,t,r){if(r){for(n=t;(r=l(e,n))<76&&r>65;)++n;return+e.slice(t-1,n)}return(r=a&&a.indexOf(e.charAt(t)))>-1?r+76:(r=e.charCodeAt(t)||0)<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63}if((e+="")!=(t+=""))for(;i;)if(r=l(e,s++),i=l(t,o++),r<76&&i<76&&r>66&&i>66&&(r=l(e,s,s),i=l(t,o,s=n),o=n),r!=i)return r{const n=h[t-1];n&&e.loc.start.line-n.loc.end.line>1&&(m=!0)})),!m&&n.loc.start.line-h[h.length-1].loc.end.line>1&&(m=!0),!m&&h[0].loc.start.line-u.prevNode.loc.end.line>1&&(m=!0)),u.prevNode=n,null!==f&&(u.prevName=f),l&&m?u.prevBlankLine=null===f:null===i||null===f||d0?i.getTokenBefore(t[0]):i.getLastToken(e,1),p(n)}}}},sF}function BF(){if(lF)return aF;lF=1;const e=Pw();return aF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before `function` definition opening parenthesis",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-before-function-paren"},fixable:"whitespace",schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{anonymous:{enum:["always","never","ignore"]},named:{enum:["always","never","ignore"]},asyncArrow:{enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},create(t){const n=t.sourceCode,r="string"==typeof t.options[0]?t.options[0]:"always",i="object"==typeof t.options[0]?t.options[0]:{};function s(s){const o=function(t){if("ArrowFunctionExpression"===t.type){if(t.async&&e.isOpeningParenToken(n.getFirstToken(t,{skip:1})))return i.asyncArrow||r}else{if(function(e){if(e.id)return!0;const t=e.parent;return"MethodDefinition"===t.type||"Property"===t.type&&("get"===t.kind||"set"===t.kind||t.method)}(t))return i.named||r;if(!t.generator)return i.anonymous||r}return"ignore"}(s);if("ignore"===o)return;const a=n.getFirstToken(s,e.isOpeningParenToken),l=n.getTokenBefore(a),c=n.isSpaceBetweenTokens(l,a);c&&"never"===o?t.report({node:s,loc:{start:l.loc.end,end:a.loc.start},messageId:"unexpectedSpace",fix(e){const t=n.getCommentsBefore(a);return t.some((e=>"Line"===e.type))?null:e.replaceTextRange([l.range[1],a.range[0]],t.reduce(((e,t)=>e+n.getText(t)),""))}}):c||"always"!==o||t.report({node:s,loc:a.loc,messageId:"missingSpace",fix:e=>e.insertTextAfter(l," ")})}return{ArrowFunctionExpression:s,FunctionDeclaration:s,FunctionExpression:s}}},aF}function MF(){if(uF)return cF;uF=1;const e=Pw();return cF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing inside parentheses",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-in-parens"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(t){const n="always"===t.options[0],r=t.options[1]&&t.options[1].exceptions||[],i={};let s;r.length&&(i.braceException=r.includes("{}"),i.bracketException=r.includes("[]"),i.parenException=r.includes("()"),i.empty=r.includes("empty"));const o=t.sourceCode;function a(e){return s.openers.includes(e.value)}function l(e){return s.closers.includes(e.value)}return{Program:function(r){s=function(){const e=[],t=[];return i.braceException&&(e.push("{"),t.push("}")),i.bracketException&&(e.push("["),t.push("]")),i.parenException&&(e.push("("),t.push(")")),i.empty&&(e.push(")"),t.push("(")),{openers:e,closers:t}}();const c=o.tokensAndComments;c.forEach(((s,u)=>{const p=c[u-1],d=c[u+1];var f,h,m,g;(e.isOpeningParenToken(s)||e.isClosingParenToken(s))&&("("!==s.value||(f=s,h=d,o.isSpaceBetweenTokens(f,h)||!i.empty&&e.isClosingParenToken(h)||(n?a(h):!a(h)))||t.report({node:r,loc:s.loc,messageId:"missingOpeningSpace",fix(e){return e.insertTextAfter(s," ")}}),"("===s.value&&function(t,r){return!!e.isTokenOnSameLine(t,r)&&"Line"!==r.type&&!!o.isSpaceBetweenTokens(t,r)&&(n?a(r):!a(r))}(s,d)&&t.report({node:r,loc:{start:s.loc.end,end:d.loc.start},messageId:"rejectedOpeningSpace",fix(e){return e.removeRange([s.range[1],d.range[0]])}}),")"!==s.value||(m=p,g=s,o.isSpaceBetweenTokens(m,g)||!i.empty&&e.isOpeningParenToken(m)||(n?l(m):!l(m)))||t.report({node:r,loc:s.loc,messageId:"missingClosingSpace",fix(e){return e.insertTextBefore(s," ")}}),")"===s.value&&function(t,r){return!!e.isTokenOnSameLine(t,r)&&!!o.isSpaceBetweenTokens(t,r)&&(n?l(t):!l(t))}(p,s)&&t.report({node:r,loc:{start:p.loc.end,end:s.loc.start},messageId:"rejectedClosingSpace",fix(e){return e.removeRange([p.range[1],s.range[0]])}}))}))}}}},cF}function jF(){if(_F)return yF;_F=1;const e=Pw();function t(e){const t=[];for(let n=0;nt.remove(e)}function u(e,t,r,i,s){e.slice(t,r).forEach((e=>{n.report({node:e,messageId:i,fix:s?c(e):null})}))}function p(e,t,n){u(e,0,e.length,t,n)}function d(e,t,n){u(e,1,e.length,t,n)}function f(){s.pop()}function h(i){const u="BlockStatement"===i.body.type?t(i.body.body):[];"function"===a?function(t,i){const a=o.length>0,l=0===s.length&&0===o.length,u=s.length>0&&s[s.length-1],p=i.length>0;p?(r(t.params)?u?n.report({node:i[0],messageId:"unnecessary",fix:c(i[0])}):a&&n.report({node:i[0],messageId:"unnecessaryInClasses",fix:c(i[0])}):n.report({node:i[0],messageId:"nonSimpleParameterList"}),d(i,"multiple",!0)):l&&(r(t.params)?n.report({node:t,messageId:"function"}):n.report({node:t,messageId:"wrap",data:{name:e.getFunctionNameWithKind(t)}})),s.push(u||p)}(i,u):u.length>0&&(r(i.params)?p(u,a,l(a)):(n.report({node:u[0],messageId:"nonSimpleParameterList"}),d(u,"multiple",!0)))}i.impliedStrict?a="implied":"safe"===a&&(a=i.globalReturn||"commonjs"===n.languageOptions.sourceType?"global":"function");const m={Program(e){const r=t(e.body);"module"===e.sourceType&&(a="module"),"global"===a?(e.body.length>0&&0===r.length&&n.report({node:e,messageId:"global"}),d(r,"multiple",!0)):p(r,a,l(a))},FunctionDeclaration:h,FunctionExpression:h,ArrowFunctionExpression:h};return"function"===a&&Object.assign(m,{ClassBody(){o.push(!0)},"ClassBody:exit"(){o.pop()},"FunctionDeclaration:exit":f,"FunctionExpression:exit":f,"ArrowFunctionExpression:exit":f}),m}},yF}function NF(){if(vF)return bF;vF=1;const e=Pw();return bF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing around colons of switch statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/switch-colon-spacing"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=!0===r.before,s=!1!==r.after;function o(t,r,i){return e.isClosingBraceToken(r)||!e.isTokenOnSameLine(t,r)||n.isSpaceBetweenTokens(t,r)===i}function a(t,r,i,s){return function(t,r){return null!==n.getFirstTokenBetween(t,r,{includeComments:!0,filter:e.isCommentToken})}(r,i)?null:s?t.insertTextAfter(r," "):t.removeRange([r.range[1],i.range[0]])}return{SwitchCase(r){const l=e.getSwitchCaseColonToken(r,n),c=n.getTokenBefore(l),u=n.getTokenAfter(l);o(c,l,i)||t.report({node:r,loc:l.loc,messageId:i?"expectedBefore":"unexpectedBefore",fix:e=>a(e,c,l,i)}),o(l,u,s)||t.report({node:r,loc:l.loc,messageId:s?"expectedAfter":"unexpectedAfter",fix:e=>a(e,l,u,s)})}}}},bF}function FF(){if(xF)return EF;xF=1;const e=Pw();return EF={meta:{type:"suggestion",docs:{description:"Require symbol descriptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/symbol-description"},fixable:null,schema:[],messages:{expected:"Expected Symbol to have a description."}},create(t){const n=t.sourceCode;return{"Program:exit"(r){const i=n.getScope(r),s=e.getVariableByName(i,"Symbol");s&&0===s.defs.length&&s.references.forEach((n=>{const r=n.identifier;e.isCallee(r)&&function(e){0===e.arguments.length&&t.report({node:e,messageId:"expected"})}(r.parent)}))}}}},EF}function UF(){if(OF)return SF;OF=1;const e=Pw();return SF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-curly-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(t){const n=t.sourceCode,r="always"===t.options[0];return{TemplateElement(i){const s=n.getFirstToken(i);!function(i){if(!i.value.startsWith("}"))return;const s=n.getTokenBefore(i,{includeComments:!0}),o=n.isSpaceBetween(s,i);e.isTokenOnSameLine(s,i)&&(r&&!o&&t.report({loc:{start:i.loc.start,end:{line:i.loc.start.line,column:i.loc.start.column+1}},messageId:"expectedBefore",fix:e=>e.insertTextBefore(i," ")}),!r&&o&&t.report({loc:{start:s.loc.end,end:i.loc.start},messageId:"unexpectedBefore",fix:e=>e.removeRange([s.range[1],i.range[0]])}))}(s),function(i){if(!i.value.endsWith("${"))return;const s=n.getTokenAfter(i,{includeComments:!0}),o=n.isSpaceBetween(i,s);e.isTokenOnSameLine(i,s)&&(r&&!o&&t.report({loc:{start:{line:i.loc.end.line,column:i.loc.end.column-2},end:i.loc.end},messageId:"expectedAfter",fix:e=>e.insertTextAfter(i," ")}),!r&&o&&t.report({loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpectedAfter",fix:e=>e.removeRange([i.range[1],s.range[0]])}))}(s)}}}},SF}var VF,KF,WF,$F,qF,QF,zF,XF,GF,ZF,HF,YF,JF,eU,tU,nU,rU,iU,sU,oU,aU,lU,cU,uU,pU,dU,fU,hU={},mU={},gU={},yU="3.0.0";function _U(){return VF||(VF=1,function(){var e,t;function n(e){this.name="DoctrineError",this.message=e}e=yU,gU.VERSION=e,n.prototype=((t=function(){}).prototype=Error.prototype,new t),n.prototype.constructor=n,gU.DoctrineError=n,gU.throwError=function(e){throw new n(e)},gU.assert=Fb}()),gU}function bU(){return KF||(KF=1,function(){var e,t,n,r,i,s,o,a,l,c,u,p;function d(e){return-1==="><(){}[],:*|?!=".indexOf(String.fromCharCode(e))&&!l.code.isWhiteSpace(e)&&!l.code.isLineTerminator(e)}function f(e,t,n,r){this._previous=e,this._index=t,this._token=n,this._value=r}function h(e,t){return p&&(e.range=[t[0]+u,t[1]+u]),e}function m(){var e=n.charAt(i);return i+=1,e}function g(e){var t,s,o,a=0;for(s="u"===e?4:2,t=0;t=r)return o=t.EOF;switch(e=n.charCodeAt(i)){case 39:case 34:return o=function(){var e,s,o,u,p,d="";for(e=n.charAt(i),++i;i=0&&i=r)return t.ILLEGAL;if(60===n.charCodeAt(i+1))break}a+=m()}return t.NAME}())}}function b(e,t){c.assert(o===e,t||"consumed token not matched"),_()}function v(e,t){o!==e&&c.throwError(t||"unexpected token"),_()}function E(){var n,r=s;return n=function(){var e=a;return o===t.NAME||o===t.STRING?(_(),e):o===t.NUMBER?(b(t.NUMBER),String(e)):void c.throwError("unexpected token")}(),o===t.COLON?(b(t.COLON),h({type:e.FieldType,key:n,value:w()},[r,s])):h({type:e.FieldType,key:n,value:null},[r,s])}function x(){var n,r,l,c,u=i-a.length;return c=i-(l=a).length,v(t.NAME),o!==t.COLON||"module"!==l&&"external"!==l&&"event"!==l||(b(t.COLON),l+=":"+a,v(t.NAME)),n=h({type:e.NameExpression,name:l},[c,s]),o===t.DOT_LT||o===t.LT?(_(),r=function(){var e=[];for(e.push(C());o===t.COMMA;)b(t.COMMA),e.push(C());return e}(),v(t.GT),h({type:e.TypeApplication,expression:n,applications:r},[u,s])):n}function S(){for(var n,r,a,l=[],u=!1,p=!1,d=i-3;o!==t.RPAREN;)o===t.REST&&(b(t.REST),p=!0),r=s,(n=w()).type===e.NameExpression&&o===t.COLON&&(a=s-n.name.length,b(t.COLON),n=h({type:e.ParameterType,name:n.name,expression:w()},[a,s])),o===t.EQUAL?(b(t.EQUAL),n=h({type:e.OptionalType,expression:n},[r,s]),u=!0):u&&c.throwError("unexpected token"),p&&(n=h({type:e.RestType,expression:n},[d,s])),l.push(n),o!==t.RPAREN&&v(t.COMMA);return l}function O(){var n,r,l,u,p,d=i-a.length;return c.assert(o===t.NAME&&"function"===a,"FunctionType should start with 'function'"),b(t.NAME),v(t.LPAREN),n=!1,l=[],r=null,o!==t.RPAREN&&(o!==t.NAME||"this"!==a&&"new"!==a?l=S():(n="new"===a,b(t.NAME),v(t.COLON),r=x(),o===t.COMMA&&(b(t.COMMA),l=S()))),v(t.RPAREN),u=null,o===t.COLON&&(b(t.COLON,"ResultType should start with :"),u=o===t.NAME&&"void"===a?(b(t.NAME),{type:e.VoidLiteral}):w()),p=h({type:e.FunctionType,params:l,result:u},[d,s]),r&&(p.this=r,n&&(p.new=!0)),p}function T(){var n,r;switch(o){case t.STAR:return b(t.STAR),h({type:e.AllLiteral},[s-1,s]);case t.LPAREN:return function(){var n,r=i-1;if(b(t.LPAREN,"UnionType should start with ("),n=[],o!==t.RPAREN)for(;n.push(w()),o!==t.RPAREN;)v(t.PIPE);return b(t.RPAREN,"UnionType should end with )"),h({type:e.UnionType,elements:n},[r,s])}();case t.LBRACK:return function(){var n,r,a=i-1;for(b(t.LBRACK,"ArrayType should start with ["),n=[];o!==t.RBRACK;){if(o===t.REST){r=i-3,b(t.REST),n.push(h({type:e.RestType,expression:w()},[r,s]));break}n.push(w()),o!==t.RBRACK&&v(t.COMMA)}return v(t.RBRACK),h({type:e.ArrayType,elements:n},[a,s])}();case t.LBRACE:return function(){var n,r,s=i-1;if(b(t.LBRACE,"RecordType should start with {"),n=[],o===t.COMMA)b(t.COMMA);else for(;o!==t.RBRACE;)n.push(E()),o!==t.RBRACE&&v(t.COMMA);return r=i,v(t.RBRACE),h({type:e.RecordType,fields:n},[s,r])}();case t.NAME:if(r=i-a.length,"null"===a)return b(t.NAME),h({type:e.NullLiteral},[r,s]);if("undefined"===a)return b(t.NAME),h({type:e.UndefinedLiteral},[r,s]);if("true"===a||"false"===a)return b(t.NAME),h({type:e.BooleanLiteralType,value:"true"===a},[r,s]);if(n=f.save(),"function"===a)try{return O()}catch(e){n.restore()}return x();case t.STRING:return _(),h({type:e.StringLiteralType,value:a},[s-a.length-2,s]);case t.NUMBER:return _(),h({type:e.NumericLiteralType,value:a},[s-String(a).length,s]);default:c.throwError("unexpected token")}}function w(){var n,r;return o===t.QUESTION?(r=i-1,b(t.QUESTION),h(o===t.COMMA||o===t.EQUAL||o===t.RBRACE||o===t.RPAREN||o===t.PIPE||o===t.EOF||o===t.RBRACK||o===t.GT?{type:e.NullableLiteral}:{type:e.NullableType,expression:T(),prefix:!0},[r,s])):o===t.BANG?(r=i-1,b(t.BANG),h({type:e.NonNullableType,expression:T(),prefix:!0},[r,s])):(r=s,n=T(),o===t.BANG?(b(t.BANG),h({type:e.NonNullableType,expression:n,prefix:!1},[r,s])):o===t.QUESTION?(b(t.QUESTION),h({type:e.NullableType,expression:n,prefix:!1},[r,s])):o===t.LBRACK?(b(t.LBRACK),v(t.RBRACK,"expected an array-style type declaration ("+a+"[])"),h({type:e.TypeApplication,expression:h({type:e.NameExpression,name:"Array"},[r,s]),applications:[n]},[r,s])):n)}function C(){var n,r;if(n=w(),o!==t.PIPE)return n;for(r=[n],b(t.PIPE);r.push(w()),o===t.PIPE;)b(t.PIPE);return h({type:e.UnionType,elements:r},[0,i])}function A(t,n,r){var i,s,o;switch(t.type){case e.NullableLiteral:i="?";break;case e.AllLiteral:i="*";break;case e.NullLiteral:i="null";break;case e.UndefinedLiteral:i="undefined";break;case e.VoidLiteral:i="void";break;case e.UnionType:for(i=r?"":"(",s=0,o=t.elements.length;s=e)return null;if(91===_.charCodeAt(o)){if(!t)return null;r=!0,a=S()}if(a+=T(e),n)for(58!==_.charCodeAt(o)||"module"!==a&&"external"!==a&&"event"!==a||(a+=S(),a+=T(e)),91===_.charCodeAt(o)&&93===_.charCodeAt(o+1)&&(a+=S(),a+=S());46===_.charCodeAt(o)||47===_.charCodeAt(o)||35===_.charCodeAt(o)||45===_.charCodeAt(o)||126===_.charCodeAt(o);)a+=S(),a+=T(e);if(r){if(w(e),61===_.charCodeAt(o)){var l;a+=S(),w(e);for(var c=1;o=e||93!==_.charCodeAt(o))return null;a+=S()}return a}function A(e){return _===b?e:function(e,t){for(var n,r=e.replace(/^\/\*\*?/,""),i=0,s=new RegExp(m,"g");n=s.exec(r);)if(i+=n[1].length,n.index+n[0].length>t+i)return t+i+e.length-r.length;return e.replace(/\*\/$/,"").replace(/\s*$/,"").length}(b,e)}function P(e,t){this._options=e,this._title=t.toLowerCase(),this._tag={title:t,description:null},this._options.lineNumbers&&(this._tag.lineNumber=h),this._first=o-t.length-1,this._last=0,this._extra={}}function k(e){var t,r;if(!function(){for(;o=y||(n.assert(64===_.charCodeAt(o)),0))}())return null;for(r=(t=new P(e,function(){var e,t="";for(S();o=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57);)t+=S();return t}())).parse();o1&&(this._tag.default=e.slice(1).join("=")),this._tag.name=e[0],this._tag.type&&"OptionalType"!==this._tag.type.type&&(this._tag.type={type:"OptionalType",expression:this._tag.type}));else{if(!p(this._title))return!0;if(l(this._title)&&this._tag.type&&this._tag.type.name)this._extra.name=this._tag.type,this._tag.name=this._tag.type.name,this._tag.type=null;else if(!this.addError("Missing or invalid tag name"))return!1}return!0},P.prototype.parseDescription=function(){var e=a(_,o,this._last).trim();return e&&(/^-\s+/.test(e)&&(e=e.substring(2)),this._tag.description=e),!0},P.prototype.parseCaption=function(){var e=a(_,o,this._last).trim(),t="",n="",r=e.indexOf(t),i=e.indexOf(n);return r>=0&&i>=0?(this._tag.caption=e.substring(r+t.length,i).trim(),this._tag.description=e.substring(i+n.length).trim()):this._tag.description=e,!0},P.prototype.parseKind=function(){var e,t;return t={class:!0,constant:!0,event:!0,external:!0,file:!0,function:!0,member:!0,mixin:!0,module:!0,namespace:!0,typedef:!0},e=a(_,o,this._last).trim(),this._tag.kind=e,!(!s(t,e)&&!this.addError("Invalid kind name '%0'",e))},P.prototype.parseAccess=function(){var e;return e=a(_,o,this._last).trim(),this._tag.access=e,!("private"!==e&&"protected"!==e&&"public"!==e&&!this.addError("Invalid access name '%0'",e))},P.prototype.parseThis=function(){var e=a(_,o,this._last).trim();return e&&"{"===e.charAt(0)?this.parseType()&&"NameExpression"===this._tag.type.type||"UnionType"===this._tag.type.type?(this._tag.name=this._tag.type.name,!0):this.addError("Invalid name for this"):this.parseNamePath()},P.prototype.parseVariation=function(){var e,t;return t=a(_,o,this._last).trim(),e=parseFloat(t,10),this._tag.variation=e,!(isNaN(e)&&!this.addError("Invalid variation '%0'",t))},P.prototype.ensureEnd=function(){var e=a(_,o,this._last).trim();return!(e&&!this.addError("Unknown content '%0'",e))},P.prototype.epilogue=function(){var e;return e=this._tag.description,!(d(this._title)&&!this._tag.type&&e&&"["===e.charAt(0)&&(this._tag.type=this._extra.name,this._tag.name||(this._tag.name=void 0),!E&&!this.addError("Missing or invalid tag name")))},r={access:["parseAccess"],alias:["parseNamePath","ensureEnd"],augments:["parseType","parseNamePathOptional","ensureEnd"],constructor:["parseType","parseNamePathOptional","ensureEnd"],class:["parseType","parseNamePathOptional","ensureEnd"],extends:["parseType","parseNamePathOptional","ensureEnd"],example:["parseCaption"],deprecated:["parseDescription"],global:["ensureEnd"],inner:["ensureEnd"],instance:["ensureEnd"],kind:["parseKind"],mixes:["parseNamePath","ensureEnd"],mixin:["parseNamePathOptional","ensureEnd"],member:["parseType","parseNamePathOptional","ensureEnd"],method:["parseNamePathOptional","ensureEnd"],module:["parseType","parseNamePathOptional","ensureEnd"],func:["parseNamePathOptional","ensureEnd"],function:["parseNamePathOptional","ensureEnd"],var:["parseType","parseNamePathOptional","ensureEnd"],name:["parseNamePath","ensureEnd"],namespace:["parseType","parseNamePathOptional","ensureEnd"],private:["parseType","parseDescription"],protected:["parseType","parseDescription"],public:["parseType","parseDescription"],readonly:["ensureEnd"],requires:["parseNamePath","ensureEnd"],since:["parseDescription"],static:["ensureEnd"],summary:["parseDescription"],this:["parseThis","ensureEnd"],todo:["parseDescription"],typedef:["parseType","parseNamePathOptional"],variation:["parseVariation"],version:["parseDescription"]},P.prototype.parse=function(){var e,t,n;if(!this._title&&!this.addError("Missing or invalid title"))return null;for(this._last=function(){var e,t,n=o;for(t=!1;n{n.expectedTypeName&&n.expectedTypeName!==n.currentType.name&&t.report({node:e,messageId:"useType",loc:y(e,n.currentType),data:{currentTypeName:n.currentType.name,expectedTypeName:n.expectedTypeName},fix(t){return t.replaceTextRange(n.currentType.range.map((t=>e.range[0]+2+t)),n.expectedTypeName)}})}))}function b(u){const h=i.getJSDocComment(u),g=d.pop(),b=Object.create(null),v=[];let E,x=!1,S=!1,O=!1,T=!1,w=!1;if(h){let i;try{i=e.parse(h.value,{strict:!0,unwrap:!0,sloppy:!0,range:!0})}catch(e){return void(/braces/iu.test(e.message)?t.report({node:h,messageId:"missingBrace"}):t.report({node:h,messageId:"syntaxError"}))}i.tags.forEach((e=>{switch(e.title.toLowerCase()){case"param":case"arg":case"argument":v.push(e);break;case"return":case"returns":x=!0,E=e;break;case"constructor":case"class":S=!0;break;case"override":case"inheritdoc":T=!0;break;case"abstract":case"virtual":w=!0;break;case"interface":O=!0}if(Object.prototype.hasOwnProperty.call(r,e.title)&&e.title!==r[e.title]){const n=y(h,e);t.report({node:h,messageId:"use",loc:{start:n.start,end:{line:n.start.line,column:n.start.column+`@${e.title}`.length}},data:{name:r[e.title]},fix(t){return t.replaceTextRange([h.range[0]+e.range[0]+3,h.range[0]+e.range[0]+e.title.length+3],r[e.title])}})}p&&e.type&&_(h,e.type)})),v.forEach((e=>{c&&!e.type&&t.report({node:h,messageId:"missingParamType",loc:y(h,e),data:{name:e.name}}),!e.description&&o&&t.report({node:h,messageId:"missingParamDesc",loc:y(h,e),data:{name:e.name}}),b[e.name]?t.report({node:h,messageId:"duplicateParam",loc:y(h,e),data:{name:e.name}}):e.name.includes(".")||(b[e.name]=e)})),x&&(s||g.returnPresent||null!==E.type&&m(E)||w?(l&&!E.type&&t.report({node:h,messageId:"missingReturnType"}),m(E)||E.description||!a||t.report({node:h,messageId:"missingReturnDesc"})):t.report({node:h,messageId:"unexpectedTag",loc:y(h,E),data:{title:E.title}})),T||x||S||O||"get"===u.parent.kind||"constructor"===u.parent.kind||"set"===u.parent.kind||f(u)||(s||g.returnPresent&&!u.async)&&t.report({node:h,messageId:"missingReturn",data:{returns:r.returns||"returns"}});const d=Object.keys(b);if(u.params&&u.params.forEach(((e,n)=>{const r="AssignmentPattern"===e.type?e.left:e;if("Identifier"===r.type){const e=r.name;d[n]&&e!==d[n]?t.report({node:h,messageId:"expected",loc:y(h,b[d[n]]),data:{name:e,jsdocName:d[n]}}):b[e]||T||t.report({node:h,messageId:"missingParam",data:{name:e}})}})),n.matchDescription){new RegExp(n.matchDescription,"u").test(i.description)||t.report({node:h,messageId:"unsatisfiedDesc"})}}}return{ArrowFunctionExpression:h,FunctionExpression:h,FunctionDeclaration:h,ClassExpression:h,ClassDeclaration:h,"ArrowFunctionExpression:exit":b,"FunctionExpression:exit":b,"FunctionDeclaration:exit":b,"ClassExpression:exit":b,"ClassDeclaration:exit":b,ReturnStatement:function(e){const t=d[d.length-1];t&&null!==e.argument&&(t.returnPresent=!0)}}}},$F}function xU(){if(zF)return QF;zF=1;const e=Pw();return QF={meta:{type:"problem",docs:{description:"Enforce comparing `typeof` expressions against valid strings",recommended:!0,url:"https://eslint.org/docs/latest/rules/valid-typeof"},hasSuggestions:!0,schema:[{type:"object",properties:{requireStringLiterals:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{invalidValue:"Invalid typeof comparison value.",notString:"Typeof comparisons should be to string literals.",suggestString:'Use `"{{type}}"` instead of `{{type}}`.'}},create(t){const n=new Set(["symbol","undefined","object","boolean","number","string","function","bigint"]),r=new Set(["==","===","!=","!=="]),i=t.sourceCode,s=t.options[0]&&t.options[0].requireStringLiterals;let o;function a(e){return"UnaryExpression"===e.type&&"typeof"===e.operator}return{Program(e){o=i.getScope(e)},UnaryExpression(i){if(a(i)){const{parent:l}=i;if("BinaryExpression"===l.type&&r.has(l.operator)){const r=l.left===i?l.right:l.left;if("Literal"===r.type||e.isStaticTemplateLiteral(r)){const e="Literal"===r.type?r.value:r.quasis[0].value.cooked;n.has(e)||t.report({node:r,messageId:"invalidValue"})}else"Identifier"===r.type&&"undefined"===r.name&&function(e){const t=o.set.get(e.name);return t&&0===t.defs.length&&t.references.some((t=>t.identifier===e))}(r)?t.report({node:r,messageId:s?"notString":"invalidValue",suggest:[{messageId:"suggestString",data:{type:"undefined"},fix(e){return e.replaceText(r,'"undefined"')}}]}):s&&!a(r)&&t.report({node:r,messageId:"notString"})}}}}}},QF}function SU(){return GF||(GF=1,XF={meta:{type:"suggestion",docs:{description:"Require `var` declarations be placed at the top of their containing scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/vars-on-top"},schema:[],messages:{top:"All 'var' declarations must be at the top of the function scope."}},create(e){function t(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value}function n(e){return"ImportDeclaration"===e.type||"ImportSpecifier"===e.type||"ImportDefaultSpecifier"===e.type||"ImportNamespaceSpecifier"===e.type}function r(e){return"VariableDeclaration"===e.type||"ExportNamedDeclaration"===e.type&&e.declaration&&"VariableDeclaration"===e.declaration.type}function i(e,i){const s=i.length;let o=0;if("StaticBlock"!==e.parent.type)for(;o",">":"<","<=":">=",">=":"<="};return{BinaryExpression(u){const p=s?u.left:u.right,d=s?u.right:u.left;"Literal"!==d.type&&!r(d)||"Literal"===p.type||r(p)||!function(e){return/^(==|===)$/u.test(e)}(u.operator)&&a||!function(e){return/^(==|===|!=|!==|<|>|<=|>=)$/u.test(e)}(u.operator)||o&&function(n){const r=n.left,s=n.right;return"LogicalExpression"===n.type&&"BinaryExpression"===r.type&&"BinaryExpression"===s.type&&t(r.operator)&&t(s.operator)&&(function(){if("&&"===n.operator&&e.isSameReference(r.right,s.left)){const e=i(r.left),t=i(s.right);if(null===e&&null===t)return!1;if(null===t||null===e)return!0;if(e.value<=t.value)return!0}return!1}()||function(){if("||"===n.operator&&e.isSameReference(r.left,s.right)){const e=i(r.right),t=i(s.left);if(null===e&&null===t)return!1;if(null===t||null===e)return!0;if(e.value<=t.value)return!0}return!1}())&&e.isParenthesised(l,n)}(u.parent)||n.report({node:u,messageId:"expected",data:{operator:u.operator,expectedSide:s?"left":"right"},fix:t=>t.replaceText(u,function(t){const n=l.getFirstTokenBetween(t.left,t.right,(e=>e.value===t.operator)),r=l.getTokenBefore(n),i=l.getTokenAfter(n),s=l.getText(),o=s.slice(t.range[0],r.range[1]),a=s.slice(r.range[1],n.range[0]),u=s.slice(n.range[1],i.range[0]),p=s.slice(i.range[0],t.range[1]),d=l.getTokenBefore(t),f=l.getTokenAfter(t);let h="",m="";return d&&d.range[1]===t.range[0]&&!e.canTokensBeAdjacent(d,i)&&(h=" "),f&&t.range[1]===f.range[0]&&!e.canTokensBeAdjacent(r,f)&&(m=" "),h+p+a+c[n.value]+u+o+m}(u))})}}}},nU}function wU(){if(sU)return iU;sU=1;const{LazyLoadingRuleMap:e}=function(){if(yT)return gT;yT=1;const e=Jx()("eslint:rules");class t extends Map{constructor(n){let r=n.length;super(e.enabled?n.map((([t,n])=>{let i=null;return[t,()=>(i||(e("Loading rule %o (remaining=%d)",t,--r),i=n()),i)]})):n),Object.defineProperty(t.prototype,"set",{configurable:!0,value:void 0})}get(e){const t=super.get(e);return t&&t()}*values(){for(const e of super.values())yield e()}*entries(){for(const[e,t]of super.entries())yield[e,t()]}forEach(e,t){for(const[n,r]of super.entries())e.call(t,r(),n,this)}}return Object.defineProperties(t.prototype,{clear:{configurable:!0,value:void 0},delete:{configurable:!0,value:void 0},[Symbol.iterator]:{configurable:!0,writable:!0,value:t.prototype.entries}}),gT={LazyLoadingRuleMap:t}}();return iU=new e(Object.entries({"accessor-pairs":()=>kw(),"array-bracket-newline":()=>Dw(),"array-bracket-spacing":()=>Rw(),"array-callback-return":()=>Iw(),"array-element-newline":()=>Lw(),"arrow-body-style":()=>Bw(),"arrow-parens":()=>Mw(),"arrow-spacing":()=>jw(),"block-scoped-var":()=>(ow||(ow=1,sw={meta:{type:"suggestion",docs:{description:"Enforce the use of variables within the scope they are defined",recommended:!1,url:"https://eslint.org/docs/latest/rules/block-scoped-var"},schema:[],messages:{outOfScope:"'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context."}},create(e){let t=[];const n=e.sourceCode;function r(e){t.push(e.range)}function i(){t.pop()}function s(t,n){const r=t.identifier,i=n.name.loc.start;e.report({node:r,messageId:"outOfScope",data:{name:r.name,definitionLine:i.line,definitionColumn:i.column+1}})}return{Program(e){t=[e.range]},BlockStatement:r,"BlockStatement:exit":i,ForStatement:r,"ForStatement:exit":i,ForInStatement:r,"ForInStatement:exit":i,ForOfStatement:r,"ForOfStatement:exit":i,SwitchStatement:r,"SwitchStatement:exit":i,CatchClause:r,"CatchClause:exit":i,StaticBlock:r,"StaticBlock:exit":i,VariableDeclaration:function(e){if("var"!==e.kind)return;const r=t[t.length-1];function i(e){const t=e.identifier.range;return t[0]r[1]}const o=n.getDeclaredVariables(e);for(let t=0;ts(n,o[t].defs.find((t=>t.parent===e)))))}}}}),sw),"block-spacing":()=>Nw(),"brace-style":()=>function(){if(uw)return cw;uw=1;const e=Pw();return cw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent brace style for blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/brace-style"},schema:[{enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},create(t){const n=t.options[0]||"1tbs",r=t.options[1]||{},i=t.sourceCode;function s(e,t){const n=[e.range[1],t.range[0]];return i.text.slice(n[0],n[1]).trim()?null:e=>e.replaceTextRange(n," ")}function o(o,a){const l=i.getTokenBefore(o),c=i.getTokenAfter(o),u=i.getTokenBefore(a),p=r.allowSingleLine&&e.isTokenOnSameLine(o,a);"allman"===n||e.isTokenOnSameLine(l,o)||t.report({node:o,messageId:"nextLineOpen",fix:s(l,o)}),"allman"===n&&e.isTokenOnSameLine(l,o)&&!p&&t.report({node:o,messageId:"sameLineOpen",fix:e=>e.insertTextBefore(o,"\n")}),e.isTokenOnSameLine(o,c)&&c!==a&&!p&&t.report({node:o,messageId:"blockSameLine",fix:e=>e.insertTextAfter(o,"\n")}),u!==o&&!p&&e.isTokenOnSameLine(u,a)&&t.report({node:a,messageId:"singleLineClose",fix:e=>e.insertTextBefore(a,"\n")})}function a(r){const o=i.getTokenAfter(r);"1tbs"!==n||e.isTokenOnSameLine(r,o)||t.report({node:r,messageId:"nextLineClose",fix:s(r,o)}),"1tbs"!==n&&e.isTokenOnSameLine(r,o)&&t.report({node:r,messageId:"sameLineClose",fix:e=>e.insertTextAfter(r,"\n")})}return{BlockStatement(t){e.STATEMENT_LIST_PARENTS.has(t.parent.type)||o(i.getFirstToken(t),i.getLastToken(t))},StaticBlock(e){o(i.getFirstToken(e,{skip:1}),i.getLastToken(e))},ClassBody(e){o(i.getFirstToken(e),i.getLastToken(e))},SwitchStatement(e){const t=i.getLastToken(e);o(i.getTokenBefore(e.cases.length?e.cases[0]:t),t)},IfStatement(e){"BlockStatement"===e.consequent.type&&e.alternate&&a(i.getLastToken(e.consequent))},TryStatement(e){a(i.getLastToken(e.block)),e.handler&&e.finalizer&&a(i.getLastToken(e.handler.body))}}}},cw}(),"callback-return":()=>Fw(),camelcase:()=>Uw(),"capitalized-comments":()=>Vw(),"class-methods-use-this":()=>Kw(),"comma-dangle":()=>Ww(),"comma-spacing":()=>function(){if(Ow)return Sw;Ow=1;const e=Pw();return Sw={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before and after commas",recommended:!1,url:"https://eslint.org/docs/latest/rules/comma-spacing"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{missing:"A space is required {{loc}} ','.",unexpected:"There should be no space {{loc}} ','."}},create(t){const n=t.sourceCode,r=n.tokensAndComments,i={before:!!t.options[0]&&t.options[0].before,after:!t.options[0]||t.options[0].after},s=[];function o(e,n,r){t.report({node:e,fix(t){if(i[n])return"before"===n?t.insertTextBefore(e," "):t.insertTextAfter(e," ");let s,o;return"before"===n?(s=r.range[1],o=e.range[0]):(s=e.range[1],o=r.range[0]),t.replaceTextRange([s,o],"")},messageId:i[n]?"missing":"unexpected",data:{loc:n}})}function a(t){let r=n.getFirstToken(t);t.elements.forEach((t=>{let i;null===t?(i=n.getTokenAfter(r),e.isCommaToken(i)&&s.push(i)):i=n.getTokenAfter(t),r=i}))}return{"Program:exit"(){r.forEach(((t,a)=>{if(!e.isCommaToken(t))return;const l=r[a-1],c=r[a+1];l&&!e.isCommaToken(l)&&!s.includes(t)&&e.isTokenOnSameLine(l,t)&&i.before!==n.isSpaceBetweenTokens(l,t)&&o(t,"before",l),!c||e.isCommaToken(c)||e.isClosingParenToken(c)||e.isClosingBracketToken(c)||e.isClosingBraceToken(c)||!i.after&&"Line"===c.type||!e.isTokenOnSameLine(t,c)||i.after===n.isSpaceBetweenTokens(t,c)||o(t,"after",c)}))},ArrayExpression:a,ArrayPattern:a}}},Sw}(),"comma-style":()=>$w(),complexity:()=>function(){if(iC)return rC;iC=1;const e=Pw(),{upperCaseFirst:t}=tk();return rC={meta:{type:"suggestion",docs:{description:"Enforce a maximum cyclomatic complexity allowed in a program",recommended:!1,url:"https://eslint.org/docs/latest/rules/complexity"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{complex:"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}."}},create(n){const r=n.options[0];let i=20;"object"==typeof r&&(Object.prototype.hasOwnProperty.call(r,"maximum")||Object.prototype.hasOwnProperty.call(r,"max"))?i=r.maximum||r.max:"number"==typeof r&&(i=r);const s=[];function o(){s[s.length-1]++}return{onCodePathStart(){s.push(1)},CatchClause:o,ConditionalExpression:o,LogicalExpression:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,IfStatement:o,WhileStatement:o,DoWhileStatement:o,"SwitchCase[test]":o,AssignmentExpression(t){e.isLogicalAssignmentOperator(t.operator)&&o()},onCodePathEnd(r,o){const a=s.pop();if(("function"===r.origin||"class-field-initializer"===r.origin||"class-static-block"===r.origin)&&a>i){let s;s="class-field-initializer"===r.origin?"class field initializer":"class-static-block"===r.origin?"class static block":e.getFunctionNameWithKind(o),n.report({node:o,messageId:"complex",data:{name:t(s),complexity:a,max:i}})}}}}},rC}(),"computed-property-spacing":()=>nk(),"consistent-return":()=>function(){if(lC)return aC;lC=1;const e=Pw(),{upperCaseFirst:t}=tk();return aC={meta:{type:"suggestion",docs:{description:"Require `return` statements to either always or never specify values",recommended:!1,url:"https://eslint.org/docs/latest/rules/consistent-return"},schema:[{type:"object",properties:{treatUndefinedAsUnspecified:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingReturn:"Expected to return a value at the end of {{name}}.",missingReturnValue:"{{name}} expected a return value.",unexpectedReturnValue:"{{name}} expected no return value."}},create(n){const r=!0===(n.options[0]||{}).treatUndefinedAsUnspecified;let i=null;function s(t){let r,s;!i.hasReturnValue||function(e){for(const t of e)if(t.reachable)return!1;return!0}(i.currentSegments)||e.isES5Constructor(t)||function(e){return"FunctionExpression"===e.type&&e.parent&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}(t)||("Program"===t.type?(r={line:1,column:0},s="program"):r="ArrowFunctionExpression"===t.type?n.sourceCode.getTokenBefore(t.body,e.isArrowToken).loc:"MethodDefinition"===t.parent.type||"Property"===t.parent.type&&t.parent.method?t.parent.key.loc:(t.id||n.sourceCode.getFirstToken(t)).loc,s||(s=e.getFunctionNameWithKind(t)),n.report({node:t,loc:r,messageId:"missingReturn",data:{name:s}}))}return{onCodePathStart(e,t){i={upper:i,codePath:e,hasReturn:!1,hasReturnValue:!1,messageId:"",node:t,currentSegments:new Set}},onCodePathEnd(){i=i.upper},onUnreachableCodePathSegmentStart(e){i.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){i.currentSegments.delete(e)},onCodePathSegmentStart(e){i.currentSegments.add(e)},onCodePathSegmentEnd(e){i.currentSegments.delete(e)},ReturnStatement(s){const o=s.argument;let a=Boolean(o);r&&a&&(a=!e.isSpecificId(o,"undefined")&&"void"!==o.operator),i.hasReturn?i.hasReturnValue!==a&&n.report({node:s,messageId:i.messageId,data:i.data}):(i.hasReturn=!0,i.hasReturnValue=a,i.messageId=a?"missingReturnValue":"unexpectedReturnValue",i.data={name:"Program"===i.node.type?"Program":t(e.getFunctionNameWithKind(i.node))})},"Program:exit":s,"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s}}},aC}(),"consistent-this":()=>rk(),"constructor-super":()=>function(){if(dC)return pC;function e(t){if(!t)return!1;switch(t.type){case"ClassExpression":case"FunctionExpression":case"ThisExpression":case"MemberExpression":case"CallExpression":case"NewExpression":case"ChainExpression":case"YieldExpression":case"TaggedTemplateExpression":case"MetaProperty":return!0;case"Identifier":return"undefined"!==t.name;case"AssignmentExpression":return["=","&&="].includes(t.operator)?e(t.right):!!["||=","??="].includes(t.operator)&&(e(t.left)||e(t.right));case"LogicalExpression":return"&&"===t.operator?e(t.right):e(t.left)||e(t.right);case"ConditionalExpression":return e(t.alternate)||e(t.consequent);case"SequenceExpression":return e(t.expressions[t.expressions.length-1]);default:return!1}}return dC=1,pC={meta:{type:"problem",docs:{description:"Require `super()` calls in constructors",recommended:!0,url:"https://eslint.org/docs/latest/rules/constructor-super"},schema:[],messages:{missingSome:"Lacked a call of 'super()' in some code paths.",missingAll:"Expected to call 'super()'.",duplicate:"Unexpected duplicate 'super()'.",badSuper:"Unexpected 'super()' because 'super' is not a constructor.",unexpected:"Unexpected 'super()'."}},create(t){let n=null,r=Object.create(null);function i(e){return e.reachable&&r[e.id].calledInSomePaths}function s(e){return!(1!==e.nextSegments.length||!e.nextSegments[0].isLoopedPrevSegment(e))||e.reachable&&r[e.id].calledInEveryPaths}return{onCodePathStart(t,r){if(function(e){return"FunctionExpression"===e.type&&"MethodDefinition"===e.parent.type&&"constructor"===e.parent.kind}(r)){const i=r.parent.parent.parent.superClass;n={upper:n,isConstructor:!0,hasExtends:Boolean(i),superIsConstructor:e(i),codePath:t,currentSegments:new Set}}else n={upper:n,isConstructor:!1,hasExtends:!1,superIsConstructor:!1,codePath:t,currentSegments:new Set}},onCodePathEnd(e,r){const o=n.hasExtends;if(n=n.upper,!o)return;const a=e.returnedSegments,l=a.every(s),c=a.some(i);l||t.report({messageId:c?"missingSome":"missingAll",node:r.parent})},onCodePathSegmentStart(e){if(n.currentSegments.add(e),!(n&&n.isConstructor&&n.hasExtends))return;const t=r[e.id]={calledInSomePaths:!1,calledInEveryPaths:!1,validNodes:[]},o=e.prevSegments;o.length>0&&(t.calledInSomePaths=o.some(i),t.calledInEveryPaths=o.every(s))},onUnreachableCodePathSegmentStart(e){n.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentEnd(e){n.currentSegments.delete(e)},onCodePathSegmentLoop(e,o){if(!(n&&n.isConstructor&&n.hasExtends))return;const a=o.prevSegments.length>=2;n.codePath.traverseSegments({first:o,last:e},(e=>{const n=r[e.id],o=e.prevSegments;if(n.calledInSomePaths=o.some(i),n.calledInEveryPaths=o.every(s),n.calledInSomePaths||a){const e=n.validNodes;n.validNodes=[];for(let n=0;nik(),"default-case":()=>function(){if(gC)return mC;gC=1;const e=/^no default$/iu;return mC={meta:{type:"suggestion",docs:{description:"Require `default` cases in `switch` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case"},schema:[{type:"object",properties:{commentPattern:{type:"string"}},additionalProperties:!1}],messages:{missingDefaultCase:"Expected a default case."}},create(t){const n=t.options[0]||{},r=n.commentPattern?new RegExp(n.commentPattern,"u"):e,i=t.sourceCode;function s(e){return e[e.length-1]}return{SwitchStatement(e){if(!e.cases.length)return;const n=e.cases.some((e=>null===e.test));if(!n){let n;const o=s(e.cases),a=i.getCommentsAfter(o);a.length&&(n=s(a)),n&&r.test(n.value.trim())||t.report({node:e,messageId:"missingDefaultCase"})}}}}},mC}(),"default-case-last":()=>(_C||(_C=1,yC={meta:{type:"suggestion",docs:{description:"Enforce default clauses in switch statements to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-case-last"},schema:[],messages:{notLast:"Default clause should be the last clause."}},create(e){return{SwitchStatement(t){const n=t.cases,r=n.findIndex((e=>null===e.test));if(-1!==r&&r!==n.length-1){const t=n[r];e.report({node:t,messageId:"notLast"})}}}}}),yC),"default-param-last":()=>(vC||(vC=1,bC={meta:{type:"suggestion",docs:{description:"Enforce default parameters to be last",recommended:!1,url:"https://eslint.org/docs/latest/rules/default-param-last"},schema:[],messages:{shouldBeLast:"Default parameters should be last."}},create(e){function t(t){let n=!1;for(let r=t.params.length-1;r>=0;r-=1){const i=t.params[r];"AssignmentPattern"===i.type||"RestElement"===i.type?n&&"AssignmentPattern"===i.type&&e.report({node:i,messageId:"shouldBeLast"}):n=!0}}return{FunctionDeclaration:t,FunctionExpression:t,ArrowFunctionExpression:t}}}),bC),"dot-location":()=>sk(),"dot-notation":()=>function(){if(wC)return TC;wC=1;const e=Pw(),t=ok(),n=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/u,r=new Set(["string","boolean"]);return TC={meta:{type:"suggestion",docs:{description:"Enforce dot notation whenever possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/dot-notation"},schema:[{type:"object",properties:{allowKeywords:{type:"boolean",default:!0},allowPattern:{type:"string",default:""}},additionalProperties:!1}],fixable:"code",messages:{useDot:"[{{key}}] is better written in dot notation.",useBrackets:".{{key}} is a syntax error."}},create(i){const s=i.options[0]||{},o=void 0===s.allowKeywords||s.allowKeywords,a=i.sourceCode;let l;function c(r,s){if(n.test(s)&&(o||!t.includes(String(s)))&&(!l||!l.test(s))){const t="Literal"===r.property.type?JSON.stringify(s):`\`${s}\``;i.report({node:r.property,messageId:"useDot",data:{key:t},*fix(t){const n=a.getTokenAfter(r.object,e.isOpeningBracketToken),i=a.getLastToken(r),o=a.getTokenAfter(r);a.commentsExistBetween(n,i)||(r.optional||(yield t.insertTextBefore(n,e.isDecimalInteger(r.object)?" .":".")),yield t.replaceTextRange([n.range[0],i.range[1]],s),o&&i.range[1]===o.range[0]&&!e.canTokensBeAdjacent(String(s),o)&&(yield t.insertTextAfter(r," ")))}})}}return s.allowPattern&&(l=new RegExp(s.allowPattern,"u")),{MemberExpression(n){n.computed&&"Literal"===n.property.type&&(r.has(typeof n.property.value)||e.isNullLiteral(n.property))&&c(n,n.property.value),n.computed&&e.isStaticTemplateLiteral(n.property)&&c(n,n.property.quasis[0].value.cooked),o||n.computed||"Identifier"!==n.property.type||!t.includes(String(n.property.name))||i.report({node:n.property,messageId:"useBrackets",data:{key:n.property.name},*fix(e){const t=a.getTokenBefore(n.property);("Identifier"!==n.object.type||"let"!==n.object.name||n.optional)&&(a.commentsExistBetween(t,n.property)||(n.optional||(yield e.remove(t)),yield e.replaceText(n.property,`["${n.property.name}"]`)))}})}}}},TC}(),"eol-last":()=>(AC||(AC=1,CC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow newline at the end of files",recommended:!1,url:"https://eslint.org/docs/latest/rules/eol-last"},fixable:"whitespace",schema:[{enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create(e){return{Program:function(t){const n=e.sourceCode,r=n.getText(),i={column:n.lines[n.lines.length-1].length,line:n.lines.length},s=r.endsWith("\n");if(!r.length)return;let o=e.options[0]||"always",a=!1;if("unix"===o&&(o="always"),"windows"===o&&(o="always",a=!0),"always"!==o||s){if("never"===o&&s){const r=n.lines[n.lines.length-2];e.report({node:t,loc:{start:{line:n.lines.length-1,column:r.length},end:{line:n.lines.length,column:0}},messageId:"unexpected",fix(e){const t=/(?:\r?\n)+$/u.exec(n.text).index,r=n.text.length;return e.replaceTextRange([t,r],"")}})}}else e.report({node:t,loc:i,messageId:"missing",fix(e){return e.insertTextAfterRange([0,r.length],a?"\r\n":"\n")}})}}}}),CC),eqeqeq:()=>ak(),"for-direction":()=>function(){if(RC)return DC;RC=1;const{getStaticValue:e}=rS();return DC={meta:{type:"problem",docs:{description:'Enforce "for" loop update clause moving the counter in the right direction',recommended:!0,url:"https://eslint.org/docs/latest/rules/for-direction"},fixable:null,schema:[],messages:{incorrectDirection:"The update clause in this loop moves the variable in the wrong direction."}},create(t){const{sourceCode:n}=t;function r(e){t.report({node:e,messageId:"incorrectDirection"})}function i(t,r){const i=e(t.right,n.getScope(t));return i&&["bigint","boolean","number"].includes(typeof i.value)?r*(Math.sign(Number(i.value))||0):0}function s(e,t){if("Identifier"===e.argument.type&&e.argument.name===t){if("++"===e.operator)return 1;if("--"===e.operator)return-1}return 0}function o(e,t){if(e.left.name===t){if("+="===e.operator)return i(e,1);if("-="===e.operator)return i(e,-1)}return 0}return{ForStatement(e){if(e.test&&"BinaryExpression"===e.test.type&&e.update)for(const t of["left","right"]){if("Identifier"!==e.test[t].type)continue;const n=e.test[t].name,i=e.test.operator,a=e.update;let l;if("<"===i||"<="===i)l="left"===t?-1:1;else{if(">"!==i&&">="!==i)return;l="left"===t?1:-1}"UpdateExpression"===a.type?s(a,n)===l&&r(e):"AssignmentExpression"===a.type&&o(a,n)===l&&r(e)}}}}},DC}(),"func-call-spacing":()=>function(){if(LC)return IC;LC=1;const e=Pw();return IC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-call-spacing"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},create(t){const n="always"!==t.options[0],r=!n&&t.options[1]&&t.options[1].allowNewlines,i=t.sourceCode,s=i.getText();function o(o,a,l){const c=s.slice(a.range[1],l.range[0]).replace(/\/\*.*?\*\//gu,""),u=/\s/u.test(c),p=u&&e.LINEBREAK_MATCHER.test(c);n&&u?t.report({node:o,loc:{start:a.loc.end,end:{line:l.loc.start.line,column:l.loc.start.column-1}},messageId:"unexpectedWhitespace",fix(e){return i.commentsExistBetween(a,l)?null:o.optional?e.replaceTextRange([a.range[1],l.range[0]],"?."):p?null:e.removeRange([a.range[1],l.range[0]])}}):n||u?n||r||!p||t.report({node:o,loc:{start:a.loc.end,end:l.loc.start},messageId:"unexpectedNewline",fix(e){if(!o.optional)return null;if(i.commentsExistBetween(a,l))return null;const t=[a.range[1],l.range[0]],n=i.getTokenAfter(a);return n.range[0]===a.range[1]?e.replaceTextRange(t,"?. "):n.range[1]===l.range[0]?e.replaceTextRange(t," ?."):e.replaceTextRange(t," ?. ")}}):t.report({node:o,loc:{start:{line:a.loc.end.line,column:a.loc.end.column-1},end:l.loc.start},messageId:"missing",fix(e){return o.optional?null:e.insertTextBefore(l," ")}})}return{"CallExpression, NewExpression"(t){const n=i.getLastToken(t),r=i.getLastToken(t.callee),s=i.getFirstTokenBetween(r,n,e.isOpeningParenToken),a=s&&i.getTokenBefore(s,e.isNotQuestionDotToken);s&&s.range[1]function(){if(MC)return BC;MC=1;const e=Pw(),t=Aw();function n(e,n){return n>=2015?t.keyword.isIdentifierES6(e):t.keyword.isIdentifierES5(e)}const r={type:"object",properties:{considerPropertyDescriptor:{type:"boolean"},includeCommonJSModuleExports:{type:"boolean"}},additionalProperties:!1};return BC={meta:{type:"suggestion",docs:{description:"Require function names to match the name of the variable or property to which they are assigned",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-name-matching"},schema:{anyOf:[{type:"array",additionalItems:!1,items:[{enum:["always","never"]},r]},{type:"array",additionalItems:!1,items:[r]}]},messages:{matchProperty:"Function name `{{funcName}}` should match property name `{{name}}`.",matchVariable:"Function name `{{funcName}}` should match variable name `{{name}}`.",notMatchProperty:"Function name `{{funcName}}` should not match property name `{{name}}`.",notMatchVariable:"Function name `{{funcName}}` should not match variable name `{{name}}`."}},create(t){const r=("object"==typeof t.options[0]?t.options[0]:t.options[1])||{},i="string"==typeof t.options[0]?t.options[0]:"always",s=r.considerPropertyDescriptor,o=r.includeCommonJSModuleExports,a=t.languageOptions.ecmaVersion;function l(t,n,r){return!!r&&"CallExpression"===r.type&&e.isSpecificMemberAccess(r.callee,t,n)}function c(e,t){return"always"===i&&e!==t||"never"===i&&e===t}function u(e,n,r,s){let o;o="always"===i&&s?"matchProperty":"always"===i?"matchVariable":s?"notMatchProperty":"notMatchVariable",t.report({node:e,messageId:o,data:{name:n,funcName:r}})}function p(e){return"Literal"===e.type&&"string"==typeof e.value}return{VariableDeclarator(e){e.init&&"FunctionExpression"===e.init.type&&"Identifier"===e.id.type&&e.init.id&&c(e.id.name,e.init.id.name)&&u(e,e.id.name,e.init.id.name,!1)},AssignmentExpression(t){if("FunctionExpression"!==t.right.type||t.left.computed&&"Literal"!==t.left.property.type||!o&&function(e){if("MemberExpression"===e.type&&"Identifier"===e.object.type&&"module"===e.object.name){if("Identifier"===e.property.type&&"exports"===e.property.name)return!0;if("Literal"===e.property.type&&"exports"===e.property.value)return!0}return!1}(t.left)||"Identifier"!==t.left.type&&"MemberExpression"!==t.left.type)return;const r="MemberExpression"===t.left.type,i=r?e.getStaticPropertyName(t.left):t.left.name;t.right.id&&i&&n(i)&&c(i,t.right.id.name)&&u(t,i,t.right.id.name,r)},"Property, PropertyDefinition[value]"(e){if("FunctionExpression"===e.value.type&&e.value.id)if("Identifier"!==e.key.type||e.computed)p(e.key)&&n(e.key.value,a)&&c(e.key.value,e.value.id.name)&&u(e,e.key.value,e.value.id.name,!0);else{const t=e.value.id.name;let n=e.key.name;if(s&&"value"===n&&"ObjectExpression"===e.parent.type)if(l("Object","defineProperty",e.parent.parent)||l("Reflect","defineProperty",e.parent.parent)){const n=e.parent.parent.arguments[1];p(n)&&c(n.value,t)&&u(e,n.value,t,!0)}else l("Object","defineProperties",e.parent.parent.parent.parent)||l("Object","create",e.parent.parent.parent.parent)?(n=e.parent.parent.key.name,!e.parent.parent.computed&&c(n,t)&&u(e,n,t,!0)):c(n,t)&&u(e,n,t,!0);else c(n,t)&&u(e,n,t,!0)}}}}},BC}(),"func-names":()=>lk(),"func-style":()=>(UC||(UC=1,FC={meta:{type:"suggestion",docs:{description:"Enforce the consistent use of either `function` declarations or expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/func-style"},schema:[{enum:["declaration","expression"]},{type:"object",properties:{allowArrowFunctions:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expression:"Expected a function expression.",declaration:"Expected a function declaration."}},create(e){const t=e.options[0],n=e.options[1]&&e.options[1].allowArrowFunctions,r="declaration"===t,i=[],s={FunctionDeclaration(t){i.push(!1),r||"ExportDefaultDeclaration"===t.parent.type||e.report({node:t,messageId:"expression"})},"FunctionDeclaration:exit"(){i.pop()},FunctionExpression(t){i.push(!1),r&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,messageId:"declaration"})},"FunctionExpression:exit"(){i.pop()},ThisExpression(){i.length>0&&(i[i.length-1]=!0)}};return n||(s.ArrowFunctionExpression=function(){i.push(!1)},s["ArrowFunctionExpression:exit"]=function(t){const n=i.pop();r&&!n&&"VariableDeclarator"===t.parent.type&&e.report({node:t.parent,messageId:"declaration"})}),s}}),FC),"function-call-argument-newline":()=>(KC||(KC=1,VC={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce line breaks between arguments of a function call",recommended:!1,url:"https://eslint.org/docs/latest/rules/function-call-argument-newline"},fixable:"whitespace",schema:[{enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(e){const t=e.sourceCode,n={messageId:"unexpectedLineBreak",check:(e,t)=>e.loc.end.line!==t.loc.start.line,createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]]," ")},r={messageId:"missingLineBreak",check:(e,t)=>e.loc.end.line===t.loc.start.line,createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]],"\n")};function i(n,r){for(let i=1;ick(),"generator-star-spacing":()=>uk(),"getter-return":()=>function(){if(XC)return zC;XC=1;const e=Pw(),t=/^(?:Arrow)?FunctionExpression$/u;return zC={meta:{type:"problem",docs:{description:"Enforce `return` statements in getters",recommended:!0,url:"https://eslint.org/docs/latest/rules/getter-return"},fixable:null,schema:[{type:"object",properties:{allowImplicit:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expected:"Expected to return a value in {{name}}.",expectedAlways:"Expected {{name}} to always return a value."}},create(n){const r=n.options[0]||{allowImplicit:!1},i=n.sourceCode;let s={upper:null,codePath:null,hasReturn:!1,shouldCheck:!1,node:null,currentSegments:[]};function o(t){s.shouldCheck&&function(e){for(const t of e)if(t.reachable)return!0;return!1}(s.currentSegments)&&n.report({node:t,loc:e.getFunctionHeadLoc(t,i),messageId:s.hasReturn?"expectedAlways":"expected",data:{name:e.getFunctionNameWithKind(s.node)}})}function a(n){const r=n.parent;if(t.test(n.type)&&"BlockStatement"===n.body.type){if("get"===r.kind)return!0;if("Property"===r.type&&"get"===e.getStaticPropertyName(r)&&"ObjectExpression"===r.parent.type){if("CallExpression"===r.parent.parent.type){const t=r.parent.parent.callee;if(e.isSpecificMemberAccess(t,"Object","defineProperty")||e.isSpecificMemberAccess(t,"Reflect","defineProperty"))return!0}if("Property"===r.parent.parent.type&&"ObjectExpression"===r.parent.parent.parent.type&&"CallExpression"===r.parent.parent.parent.parent.type){const t=r.parent.parent.parent.parent.callee;return e.isSpecificMemberAccess(t,"Object","defineProperties")||e.isSpecificMemberAccess(t,"Object","create")}}}return!1}return{onCodePathStart(e,t){s={upper:s,codePath:e,hasReturn:!1,shouldCheck:a(t),node:t,currentSegments:new Set}},onCodePathEnd(){s=s.upper},onUnreachableCodePathSegmentStart(e){s.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){s.currentSegments.delete(e)},onCodePathSegmentStart(e){s.currentSegments.add(e)},onCodePathSegmentEnd(e){s.currentSegments.delete(e)},ReturnStatement(t){s.shouldCheck&&(s.hasReturn=!0,r.allowImplicit||t.argument||n.report({node:t,messageId:"expected",data:{name:e.getFunctionNameWithKind(s.node)}}))},"FunctionExpression:exit":o,"ArrowFunctionExpression:exit":o}}},zC}(),"global-require":()=>function(){if(ZC)return GC;ZC=1;const e=new Set(["AssignmentExpression","VariableDeclarator","MemberExpression","ExpressionStatement","CallExpression","ConditionalExpression","Program","VariableDeclaration","ChainExpression"]);return GC={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require `require()` calls to be placed at top-level module scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/global-require"},schema:[],messages:{unexpected:"Unexpected require()."}},create(t){const n=t.sourceCode;return{CallExpression(r){const i=n.getScope(r);"require"!==r.callee.name||function(e,t){const n=function(e,t){const n=e.references.filter((e=>e.identifier.range[0]===t.range[0]&&e.identifier.range[1]===t.range[1]));return 1===n.length?n[0]:null}(e,t);return n&&n.resolved&&n.resolved.defs.length>0}(i,r.callee)||n.getAncestors(r).every((t=>e.has(t.type)))||t.report({node:r,messageId:"unexpected"})}}}},GC}(),"grouped-accessor-pairs":()=>function(){if(YC)return HC;YC=1;const e=Pw();function t(e){return"get"===e.kind||"set"===e.kind}return HC={meta:{type:"suggestion",docs:{description:"Require grouped accessor pairs in object literals and classes",recommended:!1,url:"https://eslint.org/docs/latest/rules/grouped-accessor-pairs"},schema:[{enum:["anyOrder","getBeforeSet","setBeforeGet"]}],messages:{notGrouped:"Accessor pair {{ formerName }} and {{ latterName }} should be grouped.",invalidOrder:"Expected {{ latterName }} to be before {{ formerName }}."}},create(n){const r=n.options[0]||"anyOrder",i=n.sourceCode;function s(t,r,s){n.report({node:s,messageId:t,loc:e.getFunctionHeadLoc(s.value,i),data:{formerName:e.getFunctionNameWithKind(r.value),latterName:e.getFunctionNameWithKind(s.value)}})}function o(n,o){const a=[];let l=!1;for(let r=0;r1?s("notGrouped",c,u):("getBeforeSet"===r&&a>l||"setBeforeGet"===r&&a"Property"===e.type))},ClassBody(e){o(e.body,(e=>"MethodDefinition"===e.type&&!e.static)),o(e.body,(e=>"MethodDefinition"===e.type&&e.static))}}}},HC}(),"guard-for-in":()=>(eA||(eA=1,JC={meta:{type:"suggestion",docs:{description:"Require `for-in` loops to include an `if` statement",recommended:!1,url:"https://eslint.org/docs/latest/rules/guard-for-in"},schema:[],messages:{wrap:"The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."}},create(e){return{ForInStatement(t){const n=t.body;if("EmptyStatement"!==n.type&&"IfStatement"!==n.type&&!("BlockStatement"===n.type&&0===n.body.length||"BlockStatement"===n.type&&1===n.body.length&&"IfStatement"===n.body[0].type)){if("BlockStatement"===n.type&&n.body.length>=1&&"IfStatement"===n.body[0].type){const e=n.body[0];if("ContinueStatement"===e.consequent.type)return;if("BlockStatement"===e.consequent.type&&1===e.consequent.body.length&&"ContinueStatement"===e.consequent.body[0].type)return}e.report({node:t,messageId:"wrap"})}}}}}),JC),"handle-callback-err":()=>pk(),"id-blacklist":()=>dk(),"id-denylist":()=>fk(),"id-length":()=>hk(),"id-match":()=>mk(),"implicit-arrow-linebreak":()=>gk(),indent:()=>yk(),"indent-legacy":()=>_k(),"init-declarations":()=>function(){if(_A)return yA;function e(e){return"ForInStatement"===e.type||"ForOfStatement"===e.type||"ForStatement"===e.type}function t(t){const n=t.parent,r=n.parent;return e(r)?"ForStatement"===r.type?r.init===n:r.left===n:Boolean(t.init)}return _A=1,yA={meta:{type:"suggestion",docs:{description:"Require or disallow initialization in variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/init-declarations"},schema:{anyOf:[{type:"array",items:[{enum:["always"]}],minItems:0,maxItems:1},{type:"array",items:[{enum:["never"]},{type:"object",properties:{ignoreForLoopInit:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{initialized:"Variable '{{idName}}' should be initialized on declaration.",notInitialized:"Variable '{{idName}}' should not be initialized on declaration."}},create(n){const r="always",i=n.options[0]||r,s=n.options[1]||{};return{"VariableDeclaration:exit"(o){const a=o.kind,l=o.declarations;for(let c=0;cbk(),"key-spacing":()=>vk(),"keyword-spacing":()=>function(){if(OA)return SA;OA=1;const e=Pw(),t=ok(),n=/^[)\]}>]$/u,r=/^(?:[([{<~!]|\+\+?|--?)$/u,i=/^[)\]}>*]$/u,s=/^[{*]$/u,o=/\$\{$/u,a=/^\}/u,l=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,c=t.concat(["as","async","await","from","get","let","of","set","yield"]);function u(e){return"Template"===e.type&&o.test(e.value)}function p(e){return"Template"===e.type&&a.test(e.value)}return function(){c.sort();for(let e=1;e(e[t]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},e)),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},create(t){const o=t.sourceCode,a=new WeakSet;function d(n,r){const i=o.getTokenBefore(n);!i||!l.test(i.type)&&!r.test(i.value)||u(i)||a.has(i)||!e.isTokenOnSameLine(i,n)||o.isSpaceBetweenTokens(i,n)||t.report({loc:n.loc,messageId:"expectedBefore",data:n,fix(e){return e.insertTextBefore(n," ")}})}function f(n,r){const i=o.getTokenBefore(n);i&&(l.test(i.type)||r.test(i.value))&&!u(i)&&!a.has(i)&&e.isTokenOnSameLine(i,n)&&o.isSpaceBetweenTokens(i,n)&&t.report({loc:{start:i.loc.end,end:n.loc.start},messageId:"unexpectedBefore",data:n,fix(e){return e.removeRange([i.range[1],n.range[0]])}})}function h(n,r){const i=o.getTokenAfter(n);!i||!l.test(i.type)&&!r.test(i.value)||p(i)||a.has(i)||!e.isTokenOnSameLine(n,i)||o.isSpaceBetweenTokens(n,i)||t.report({loc:n.loc,messageId:"expectedAfter",data:n,fix(e){return e.insertTextAfter(n," ")}})}function m(n,r){const i=o.getTokenAfter(n);i&&(l.test(i.type)||r.test(i.value))&&!p(i)&&!a.has(i)&&e.isTokenOnSameLine(n,i)&&o.isSpaceBetweenTokens(n,i)&&t.report({loc:{start:n.loc.end,end:i.loc.start},messageId:"unexpectedAfter",data:n,fix(e){return e.removeRange([n.range[1],i.range[0]])}})}const g=function(e={}){const t=!1!==e.before,n=!1!==e.after,r={before:t?d:f,after:n?h:m},i=e&&e.overrides||{},s=Object.create(null);for(let e=0;e{switch(e.value){case"get":case"set":case"async":return!0;default:return!1}}));if(!t)throw new Error("Failed to find token get, set, or async beside method name");b(t)}}return{DebuggerStatement:v,WithStatement:v,BreakStatement:v,ContinueStatement:v,ReturnStatement:v,ThrowStatement:v,TryStatement:function(e){v(e),v(e.handler),x(e.finalizer)},IfStatement:function(e){v(e),x(e.alternate)},SwitchStatement:v,SwitchCase:v,DoWhileStatement:function(e){v(e),x(e.test)},ForInStatement:function(t){v(t);const n=o.getTokenBefore(t.right,e.isNotOpeningParenToken);"PrivateIdentifier"!==o.getTokenBefore(n).type&&y(n),_(n)},ForOfStatement:function(t){t.await?(y(o.getFirstToken(t,0)),_(o.getFirstToken(t,1))):v(t);const n=o.getTokenBefore(t.right,e.isNotOpeningParenToken);"PrivateIdentifier"!==o.getTokenBefore(n).type&&y(n),_(n)},ForStatement:v,WhileStatement:v,ClassDeclaration:O,ExportNamedDeclaration:T,ExportDefaultDeclaration:T,ExportAllDeclaration:T,FunctionDeclaration:S,ImportDeclaration:T,VariableDeclaration:v,ArrowFunctionExpression:S,AwaitExpression:function(e){y(o.getFirstToken(e))},ClassExpression:O,FunctionExpression:S,NewExpression:E,Super:E,ThisExpression:E,UnaryExpression:E,YieldExpression:E,ImportSpecifier:function(e){e.imported.range[0]!==e.local.range[0]&&y(o.getTokenBefore(e.local),i)},ExportSpecifier:function(e){if(e.local.range[0]!==e.exported.range[0]){const t=o.getTokenBefore(e.exported);y(t,i),_(t,s)}},ImportNamespaceSpecifier:function(e){y(o.getFirstToken(e,1),i)},MethodDefinition:w,PropertyDefinition:w,StaticBlock:v,Property:w,"BinaryExpression[operator='>']"(t){const n=o.getTokenBefore(t.right,e.isNotOpeningParenToken);a.add(n)}}}},SA}(),"line-comment-position":()=>function(){if(wA)return TA;wA=1;const e=Pw();return TA={meta:{type:"layout",docs:{description:"Enforce position of line comments",recommended:!1,url:"https://eslint.org/docs/latest/rules/line-comment-position"},schema:[{oneOf:[{enum:["above","beside"]},{type:"object",properties:{position:{enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(t){const n=t.options[0];let r,i,s=!0;n&&"string"!=typeof n?(r=!n.position||"above"===n.position,i=n.ignorePattern,s=Object.prototype.hasOwnProperty.call(n,"applyDefaultIgnorePatterns")?n.applyDefaultIgnorePatterns:!1!==n.applyDefaultPatterns):r=!n||"above"===n;const o=e.COMMENTS_IGNORE_PATTERN,a=/^\s*falls?\s?through/u,l=new RegExp(i,"u"),c=t.sourceCode;return{Program(){c.getAllComments().filter((e=>"Line"===e.type)).forEach((e=>{if(s&&(o.test(e.value)||a.test(e.value)))return;if(i&&l.test(e.value))return;const n=c.getTokenBefore(e,{includeComments:!0}),u=n&&n.loc.end.line===e.loc.start.line;r?u&&t.report({node:e,messageId:"above"}):u||t.report({node:e,messageId:"beside"})}))}}}},TA}(),"linebreak-style":()=>function(){if(AA)return CA;AA=1;const e=Pw();return CA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent linebreak style",recommended:!1,url:"https://eslint.org/docs/latest/rules/linebreak-style"},fixable:"whitespace",schema:[{enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(t){const n=t.sourceCode;function r(e,t){return function(n){return n.replaceTextRange(e,t)}}return{Program:function(i){const s="unix"===(t.options[0]||"unix"),o=s?"\n":"\r\n",a=n.getText(),l=e.createGlobalLinebreakMatcher();let c,u=0;for(;null!==(c=l.exec(a));){if(u++,c[0]===o)continue;const e=c.index,a=[e,e+c[0].length];t.report({node:i,loc:{start:{line:u,column:n.lines[u-1].length},end:{line:u+1,column:0}},messageId:s?"expectedLF":"expectedCRLF",fix:r(a,o)})}}}}},CA}(),"lines-around-comment":()=>Ek(),"lines-around-directive":()=>function(){if(RA)return DA;RA=1;const e=Pw();return DA={meta:{type:"layout",docs:{description:"Require or disallow newlines around directives",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-around-directive"},schema:[{oneOf:[{enum:["always","never"]},{type:"object",properties:{before:{enum:["always","never"]},after:{enum:["always","never"]}},additionalProperties:!1,minProperties:2}]}],fixable:"whitespace",messages:{expected:'Expected newline {{location}} "{{value}}" directive.',unexpected:'Unexpected newline {{location}} "{{value}}" directive.'},deprecated:!0,replacedBy:["padding-line-between-statements"]},create(t){const n=t.sourceCode,r=t.options[0]||"always",i="string"==typeof r?r:r.before,s="string"==typeof r?r:r.after;function o(e){const t=n.getTokenBefore(e,{includeComments:!0}),r=t?t.loc.end.line:0;return e.loc.start.line-r>=2}function a(t){const r=n.getLastToken(t),i=n.getTokenBefore(r);return e.isSemicolonToken(r)&&r.loc.start.line>i.loc.end.line?i:r}function l(e){const t=a(e);return n.getTokenAfter(t,{includeComments:!0}).loc.start.line-t.loc.end.line>=2}function c(e,n,r){t.report({node:e,messageId:r?"expected":"unexpected",data:{value:e.expression.value,location:n},fix(t){const i=a(e);return r?"before"===n?t.insertTextBefore(e,"\n"):t.insertTextAfter(i,"\n"):t.removeRange("before"===n?[e.range[0]-1,e.range[0]]:[i.range[1],i.range[1]+1])}})}function u(t){const r=e.getDirectivePrologue(t);if(!r.length)return;const a=r[0],u=n.getCommentsBefore(a);u.length?("always"!==i||o(a)||c(a,"before",!0),"never"===i&&o(a)&&c(a,"before",!1)):"Program"===t.type&&"never"===i&&!u.length&&o(a)&&c(a,"before",!1);const p=r[r.length-1],d="Program"===t.type?t.body:t.body.body;(p!==d[d.length-1]||p.trailingComments)&&("always"!==s||l(p)||c(p,"after",!0),"never"===s&&l(p)&&c(p,"after",!1))}return{Program:u,FunctionDeclaration:u,FunctionExpression:u,ArrowFunctionExpression:u}}},DA}(),"lines-between-class-members":()=>function(){if(LA)return IA;LA=1;const e=Pw(),t={"*":{test:()=>!0},field:{test:e=>"PropertyDefinition"===e.type},method:{test:e=>"MethodDefinition"===e.type}};return IA={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow an empty line between class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/lines-between-class-members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{enum:["always","never"]},prev:{enum:["method","field","*"]},next:{enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},create(n){const r=[];r[0]=n.options[0]||"always",r[1]=n.options[1]||{exceptAfterSingleLine:!1};const i="object"==typeof r[0]?r[0].enforce:[{blankLine:r[0],prev:"*",next:"*"}],s=n.sourceCode;function o(t,n){const r=s.getLastToken(t),i=s.getTokenBefore(r),o=s.getFirstToken(n);return e.isSemicolonToken(r)&&!e.isTokenOnSameLine(i,r)&&e.isTokenOnSameLine(r,o)?{curLast:i,nextFirst:r}:{curLast:r,nextFirst:o}}function a(e,t,n){const r=s.getTokenAfter(e,{includeComments:!0});return r!==t&&r.loc.start.line-e.loc.end.line<=n?a(r,t,n):e}function l(e,t,n){const r=s.getTokenBefore(e,{includeComments:!0});return r!==t&&e.loc.start.line-r.loc.end.line<=n?l(r,t,n):e}function c(e,n){return t[n].test(e)}function u(e,t){for(let n=i.length-1;n>=0;--n){const r=i[n];if(c(e,r.prev)&&c(t,r.next))return r.blankLine}return null}return{ClassBody(t){const i=t.body;for(let t=0;t1,b=(c=g,p=y,0!==s.getTokensBetween(c,p,{includeComments:!0}).length),v=a(f,h,0),E=u(i[t],i[t+1]);"never"===E&&_?n.report({node:i[t+1],messageId:"never",fix(e){return b?null:e.replaceTextRange([g.range[1],y.range[0]],"\n")}}):"always"!==E||m||_||n.report({node:i[t+1],messageId:"always",fix(e){return b?null:e.insertTextAfter(v,"\n")}})}var c,p}}}},IA}(),"logical-assignment-operators":()=>xk(),"max-classes-per-file":()=>(NA||(NA=1,jA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of classes per file",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-classes-per-file"},schema:[{oneOf:[{type:"integer",minimum:1},{type:"object",properties:{ignoreExpressions:{type:"boolean"},max:{type:"integer",minimum:1}},additionalProperties:!1}]}],messages:{maximumExceeded:"File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}."}},create(e){const[t={}]=e.options,[n,r]="number"==typeof t?[!1,t||1]:[t.ignoreExpressions,t.max||1];let i=0;return{Program(){i=0},"Program:exit"(t){i>r&&e.report({node:t,messageId:"maximumExceeded",data:{classCount:i,max:r}})},ClassDeclaration(){i++},ClassExpression(){n||i++}}}}),jA),"max-depth":()=>(UA||(UA=1,FA={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that blocks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-depth"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{tooDeeply:"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}."}},create(e){const t=[],n=e.options[0];let r=4;function i(){t.push(0)}function s(){t.pop()}function o(n){const i=++t[t.length-1];i>r&&e.report({node:n,messageId:"tooDeeply",data:{depth:i,maxDepth:r}})}function a(){t[t.length-1]--}return"object"==typeof n&&(Object.prototype.hasOwnProperty.call(n,"maximum")||Object.prototype.hasOwnProperty.call(n,"max"))&&(r=n.maximum||n.max),"number"==typeof n&&(r=n),{Program:i,FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i,StaticBlock:i,IfStatement(e){"IfStatement"!==e.parent.type&&o(e)},SwitchStatement:o,TryStatement:o,DoWhileStatement:o,WhileStatement:o,WithStatement:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,"IfStatement:exit":a,"SwitchStatement:exit":a,"TryStatement:exit":a,"DoWhileStatement:exit":a,"WhileStatement:exit":a,"WithStatement:exit":a,"ForStatement:exit":a,"ForInStatement:exit":a,"ForOfStatement:exit":a,"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s,"StaticBlock:exit":s,"Program:exit":s}}}),FA),"max-len":()=>Sk(),"max-lines":()=>Ok(),"max-lines-per-function":()=>Tk(),"max-nested-callbacks":()=>(XA||(XA=1,zA={meta:{type:"suggestion",docs:{description:"Enforce a maximum depth that callbacks can be nested",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-nested-callbacks"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."}},create(e){const t=e.options[0];let n=10;"object"==typeof t&&(Object.prototype.hasOwnProperty.call(t,"maximum")||Object.prototype.hasOwnProperty.call(t,"max"))?n=t.maximum||t.max:"number"==typeof t&&(n=t);const r=[];function i(t){if("CallExpression"===t.parent.type&&r.push(t),r.length>n){const i={num:r.length,max:n};e.report({node:t,messageId:"exceed",data:i})}}function s(){r.pop()}return{ArrowFunctionExpression:i,"ArrowFunctionExpression:exit":s,FunctionExpression:i,"FunctionExpression:exit":s}}}),zA),"max-params":()=>function(){if(ZA)return GA;ZA=1;const e=Pw(),{upperCaseFirst:t}=tk();return GA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of parameters in function definitions",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-params"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{exceed:"{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}."}},create(n){const r=n.sourceCode,i=n.options[0];let s=3;function o(i){i.params.length>s&&n.report({loc:e.getFunctionHeadLoc(i,r),node:i,messageId:"exceed",data:{name:t(e.getFunctionNameWithKind(i)),count:i.params.length,max:s}})}return"object"==typeof i&&(Object.prototype.hasOwnProperty.call(i,"maximum")||Object.prototype.hasOwnProperty.call(i,"max"))&&(s=i.maximum||i.max),"number"==typeof i&&(s=i),{FunctionDeclaration:o,ArrowFunctionExpression:o,FunctionExpression:o}}},GA}(),"max-statements":()=>function(){if(YA)return HA;YA=1;const e=Pw(),{upperCaseFirst:t}=tk();return HA={meta:{type:"suggestion",docs:{description:"Enforce a maximum number of statements allowed in function blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/max-statements"},schema:[{oneOf:[{type:"integer",minimum:0},{type:"object",properties:{maximum:{type:"integer",minimum:0},max:{type:"integer",minimum:0}},additionalProperties:!1}]},{type:"object",properties:{ignoreTopLevelFunctions:{type:"boolean"}},additionalProperties:!1}],messages:{exceed:"{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}."}},create(n){const r=[],i=n.options[0],s=n.options[1]&&n.options[1].ignoreTopLevelFunctions||!1,o=[];let a=10;function l(r,i,s){if(i>s){const o=t(e.getFunctionNameWithKind(r));n.report({node:r,messageId:"exceed",data:{name:o,count:i,max:s}})}}function c(){r.push(0)}function u(e){const t=r.pop();"StaticBlock"!==e.type&&(s&&0===r.length?o.push({node:e,count:t}):l(e,t,a))}return"object"==typeof i&&(Object.prototype.hasOwnProperty.call(i,"maximum")||Object.prototype.hasOwnProperty.call(i,"max"))?a=i.maximum||i.max:"number"==typeof i&&(a=i),{FunctionDeclaration:c,FunctionExpression:c,ArrowFunctionExpression:c,StaticBlock:c,BlockStatement:function(e){r[r.length-1]+=e.body.length},"FunctionDeclaration:exit":u,"FunctionExpression:exit":u,"ArrowFunctionExpression:exit":u,"StaticBlock:exit":u,"Program:exit"(){1!==o.length&&o.forEach((e=>{const t=e.count;l(e.node,t,a)}))}}}},HA}(),"max-statements-per-line":()=>wk(),"multiline-comment-style":()=>Ck(),"multiline-ternary":()=>function(){if(iP)return rP;iP=1;const e=Pw();return rP={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/multiline-ternary"},schema:[{enum:["always","always-multiline","never"]}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(t){const n=t.sourceCode,r=t.options[0],i="never"!==r,s="always-multiline"===r;return{ConditionalExpression(r){const o=n.getTokenAfter(r.test,e.isNotClosingParenToken),a=n.getTokenAfter(r.consequent,e.isNotClosingParenToken),l=n.getFirstToken(r),c=n.getTokenBefore(o),u=n.getTokenAfter(o),p=n.getTokenBefore(a),d=n.getTokenAfter(a),f=e.isTokenOnSameLine(c,u),h=e.isTokenOnSameLine(p,d),m=!!n.getCommentsInside(r).length;if(i){if(s&&r.loc.start.line===r.loc.end.line)return;f&&t.report({node:r.test,loc:{start:l.loc.start,end:c.loc.end},messageId:"expectedTestCons",fix:e=>m?null:e.replaceTextRange([c.range[1],o.range[0]],"\n")}),h&&t.report({node:r.consequent,loc:{start:u.loc.start,end:p.loc.end},messageId:"expectedConsAlt",fix:e=>m?null:e.replaceTextRange([p.range[1],a.range[0]],"\n")})}else f||t.report({node:r.test,loc:{start:l.loc.start,end:c.loc.end},messageId:"unexpectedTestCons",fix(t){if(m)return null;const n=[],r=e.isTokenOnSameLine(c,o),i=e.isTokenOnSameLine(o,u);return r||n.push(t.removeRange([c.range[1],o.range[0]])),i||n.push(t.removeRange([o.range[1],u.range[0]])),n}}),h||t.report({node:r.consequent,loc:{start:u.loc.start,end:p.loc.end},messageId:"unexpectedConsAlt",fix(t){if(m)return null;const n=[],r=e.isTokenOnSameLine(p,a),i=e.isTokenOnSameLine(a,d);return r||n.push(t.removeRange([p.range[1],a.range[0]])),i||n.push(t.removeRange([a.range[1],d.range[0]])),n}})}}}},rP}(),"new-cap":()=>Ak(),"new-parens":()=>function(){if(lP)return aP;lP=1;const e=Pw();return aP={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments",recommended:!1,url:"https://eslint.org/docs/latest/rules/new-parens"},fixable:"code",schema:[{enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(t){const n="never"!==t.options[0],r=t.sourceCode;return{NewExpression(i){if(0!==i.arguments.length)return;const s=r.getLastToken(i),o=s&&e.isClosingParenToken(s)&&e.isOpeningParenToken(r.getTokenBefore(s))&&i.callee.range[1]e.insertTextAfter(i,"()")}):o&&t.report({node:i,messageId:"unnecessary",fix:e=>[e.remove(r.getTokenBefore(s)),e.remove(s),e.insertTextBefore(i,"("),e.insertTextAfter(i,")")]})}}}},aP}(),"newline-after-var":()=>Pk(),"newline-before-return":()=>kk(),"newline-per-chained-call":()=>function(){if(hP)return fP;hP=1;const e=Pw();return fP={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require a newline after each call in a method chain",recommended:!1,url:"https://eslint.org/docs/latest/rules/newline-per-chained-call"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(t){const n=(t.options[0]||{}).ignoreChainWithDepth||2,r=t.sourceCode;function i(t){const n=function(e){return e.computed?e.optional?"?.[":"[":e.optional?"?.":"."}(t),i=r.getText(t.property).split(e.LINEBREAK_MATCHER),s=t.computed&&1===i.length?"]":"";return n+i[0]+s}return{"CallExpression:exit"(s){const o=e.skipChainExpression(s.callee);if("MemberExpression"!==o.type)return;let a=e.skipChainExpression(o.object),l=1;for(;a&&a.callee;)l+=1,a=e.skipChainExpression(e.skipChainExpression(a.callee).object);if(l>n&&e.isTokenOnSameLine(o.object,o.property)){const n=r.getTokenAfter(o.object,e.isNotClosingParenToken);t.report({node:o.property,loc:{start:n.loc.start,end:o.loc.end},messageId:"expected",data:{callee:i(o)},fix(e){return e.insertTextBefore(n,"\n")}})}}}}},fP}(),"no-alert":()=>Dk(),"no-array-constructor":()=>Rk(),"no-async-promise-executor":()=>(vP||(vP=1,bP={meta:{type:"problem",docs:{description:"Disallow using an async function as a Promise executor",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-async-promise-executor"},fixable:null,schema:[],messages:{async:"Promise executor functions should not be async."}},create(e){return{"NewExpression[callee.name='Promise'][arguments.0.async=true]"(t){e.report({node:e.sourceCode.getFirstToken(t.arguments[0],(e=>"async"===e.value)),messageId:"async"})}}}}),bP),"no-await-in-loop":()=>function(){if(xP)return EP;function e(e){const t=e.type;return"FunctionDeclaration"===t||"FunctionExpression"===t||"ArrowFunctionExpression"===t||"ForOfStatement"===t&&!0===e.await}function t(e,t){switch(t.type){case"ForStatement":return e===t.test||e===t.update||e===t.body;case"ForOfStatement":case"ForInStatement":return e===t.body;case"WhileStatement":case"DoWhileStatement":return e===t.test||e===t.body;default:return!1}}return xP=1,EP={meta:{type:"problem",docs:{description:"Disallow `await` inside of loops",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-await-in-loop"},schema:[],messages:{unexpectedAwait:"Unexpected `await` inside a loop."}},create(n){function r(r){if("ForOfStatement"===r.type&&!r.await)return;let i=r,s=i.parent;for(;s&&!e(s);){if(t(i,s))return void n.report({node:r,messageId:"unexpectedAwait"});i=s,s=s.parent}}return{AwaitExpression:r,ForOfStatement:r}}},EP}(),"no-bitwise":()=>Ik(),"no-buffer-constructor":()=>(wP||(wP=1,TP={meta:{deprecated:!0,replacedBy:[],type:"problem",docs:{description:"Disallow use of the `Buffer()` constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-buffer-constructor"},schema:[],messages:{deprecated:"{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead."}},create(e){return{"CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(t){e.report({node:t,messageId:"deprecated",data:{expr:"CallExpression"===t.type?"Buffer()":"new Buffer()"}})}}}}),TP),"no-caller":()=>(AP||(AP=1,CP={meta:{type:"suggestion",docs:{description:"Disallow the use of `arguments.caller` or `arguments.callee`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-caller"},schema:[],messages:{unexpected:"Avoid arguments.{{prop}}."}},create(e){return{MemberExpression(t){const n=t.object.name,r=t.property.name;"arguments"===n&&!t.computed&&r&&r.match(/^calle[er]$/u)&&e.report({node:t,messageId:"unexpected",data:{prop:r}})}}}}),CP),"no-case-declarations":()=>(kP||(kP=1,PP={meta:{type:"suggestion",docs:{description:"Disallow lexical declarations in case clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-case-declarations"},schema:[],messages:{unexpected:"Unexpected lexical declaration in case block."}},create(e){function t(e){switch(e.type){case"FunctionDeclaration":case"ClassDeclaration":return!0;case"VariableDeclaration":return"var"!==e.kind;default:return!1}}return{SwitchCase(n){for(let r=0;rLk(),"no-class-assign":()=>function(){if(LP)return IP;LP=1;const e=Pw();return IP={meta:{type:"problem",docs:{description:"Disallow reassigning class members",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-class-assign"},schema:[],messages:{class:"'{{name}}' is a class."}},create(t){const n=t.sourceCode;function r(n){e.getModifyingReferences(n.references).forEach((e=>{t.report({node:e.identifier,messageId:"class",data:{name:e.identifier.name}})}))}function i(e){n.getDeclaredVariables(e).forEach(r)}return{ClassDeclaration:i,ClassExpression:i}}},IP}(),"no-compare-neg-zero":()=>(MP||(MP=1,BP={meta:{type:"problem",docs:{description:"Disallow comparing against -0",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-compare-neg-zero"},fixable:null,schema:[],messages:{unexpected:"Do not use the '{{operator}}' operator to compare against -0."}},create(e){function t(e){return"UnaryExpression"===e.type&&"-"===e.operator&&"Literal"===e.argument.type&&0===e.argument.value}const n=new Set([">",">=","<","<=","==","===","!=","!=="]);return{BinaryExpression(r){n.has(r.operator)&&(t(r.left)||t(r.right))&&e.report({node:r,messageId:"unexpected",data:{operator:r.operator}})}}}}),BP),"no-cond-assign":()=>Bk(),"no-confusing-arrow":()=>function(){if(UP)return FP;UP=1;const e=Pw();return FP={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow arrow functions where they could be confused with comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-confusing-arrow"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(t){const n=t.options[0]||{},r=n.allowParens||void 0===n.allowParens,i=n.onlyOneSimpleParam,s=t.sourceCode;return{ArrowFunctionExpression:function(n){const o=n.body;!function(e){return e&&"ConditionalExpression"===e.type}(o)||r&&e.isParenthesised(s,o)||i&&(1!==n.params.length||"Identifier"!==n.params[0].type)||t.report({node:n,messageId:"confusing",fix(e){return r&&e.replaceText(n.body,`(${s.getText(n.body)})`)}})}}}},FP}(),"no-console":()=>Mk(),"no-const-assign":()=>function(){if($P)return WP;$P=1;const e=Pw();return WP={meta:{type:"problem",docs:{description:"Disallow reassigning `const` variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-const-assign"},schema:[],messages:{const:"'{{name}}' is constant."}},create(t){const n=t.sourceCode;function r(n){e.getModifyingReferences(n.references).forEach((e=>{t.report({node:e.identifier,messageId:"const",data:{name:e.identifier.name}})}))}return{VariableDeclaration(e){"const"===e.kind&&n.getDeclaredVariables(e).forEach(r)}}}},WP}(),"no-constant-binary-expression":()=>jk(),"no-constant-condition":()=>Nk(),"no-constructor-return":()=>(ZP||(ZP=1,GP={meta:{type:"problem",docs:{description:"Disallow returning value from constructor",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-constructor-return"},schema:{},fixable:null,messages:{unexpected:"Unexpected return statement in constructor."}},create(e){const t=[];return{onCodePathStart(e,n){t.push(n)},onCodePathEnd(){t.pop()},ReturnStatement(n){const r=t[t.length-1];r.parent&&("MethodDefinition"!==r.parent.type||"constructor"!==r.parent.kind||n.parent.parent!==r&&!n.argument||e.report({node:n,messageId:"unexpected"}))}}}}),GP),"no-continue":()=>(YP||(YP=1,HP={meta:{type:"suggestion",docs:{description:"Disallow `continue` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-continue"},schema:[],messages:{unexpected:"Unexpected use of continue statement."}},create(e){return{ContinueStatement(t){e.report({node:t,messageId:"unexpected"})}}}}),HP),"no-control-regex":()=>function(){if(Vk)return Uk;Vk=1;const e=Tj().RegExpValidator,t=new class{constructor(){this._source="",this._controlChars=[],this._validator=new e(this)}onPatternEnter(){this._controlChars=[]}onCharacter(e,t,n){n>=0&&n<=31&&(this._source.codePointAt(e)===n||this._source.slice(e,t).startsWith("\\x")||this._source.slice(e,t).startsWith("\\u"))&&this._controlChars.push(`\\x${`0${n.toString(16)}`.slice(-2)}`)}collectControlChars(e,t){const n="string"==typeof t&&t.includes("u"),r="string"==typeof t&&t.includes("v");this._controlChars=[],this._source=e;try{this._validator.validatePattern(e,void 0,void 0,{unicode:n,unicodeSets:r})}catch{}return this._controlChars}};return Uk={meta:{type:"problem",docs:{description:"Disallow control characters in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-control-regex"},schema:[],messages:{unexpected:"Unexpected control character(s) in regular expression: {{controlChars}}."}},create(e){return{Literal(n){const r=function(e){return e.regex?e.regex:"string"!=typeof e.value||"NewExpression"!==e.parent.type&&"CallExpression"!==e.parent.type||"Identifier"!==e.parent.callee.type||"RegExp"!==e.parent.callee.name||e.parent.arguments[0]!==e?null:{pattern:e.value,flags:e.parent.arguments.length>1&&"Literal"===e.parent.arguments[1].type&&"string"==typeof e.parent.arguments[1].value?e.parent.arguments[1].value:null}}(n);if(r){const{pattern:i,flags:s}=r,o=t.collectControlChars(i,s);o.length>0&&e.report({node:n,messageId:"unexpected",data:{controlChars:o.join(", ")}})}}}}},Uk}(),"no-debugger":()=>(Wk||(Wk=1,Kk={meta:{type:"problem",docs:{description:"Disallow the use of `debugger`",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-debugger"},fixable:null,schema:[],messages:{unexpected:"Unexpected 'debugger' statement."}},create(e){return{DebuggerStatement(t){e.report({node:t,messageId:"unexpected"})}}}}),Kk),"no-delete-var":()=>(qk||(qk=1,$k={meta:{type:"suggestion",docs:{description:"Disallow deleting variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-delete-var"},schema:[],messages:{unexpected:"Variables should not be deleted."}},create(e){return{UnaryExpression(t){"delete"===t.operator&&"Identifier"===t.argument.type&&e.report({node:t,messageId:"unexpected"})}}}}),$k),"no-div-regex":()=>(zk||(zk=1,Qk={meta:{type:"suggestion",docs:{description:"Disallow equal signs explicitly at the beginning of regular expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-div-regex"},fixable:"code",schema:[],messages:{unexpected:"A regular expression literal can be confused with '/='."}},create(e){const t=e.sourceCode;return{Literal(n){const r=t.getFirstToken(n);"RegularExpression"===r.type&&"="===r.value[1]&&e.report({node:n,messageId:"unexpected",fix(e){return e.replaceTextRange([r.range[0]+1,r.range[0]+2],"[=]")}})}}}}),Qk),"no-dupe-args":()=>(Gk||(Gk=1,Xk={meta:{type:"problem",docs:{description:"Disallow duplicate arguments in `function` definitions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-args"},schema:[],messages:{unexpected:"Duplicate param '{{name}}'."}},create(e){const t=e.sourceCode;function n(e){return"Parameter"===e.type}function r(r){const i=t.getDeclaredVariables(r);for(let t=0;t=2&&e.report({node:r,messageId:"unexpected",data:{name:s.name}})}}return{FunctionDeclaration:r,FunctionExpression:r}}}),Xk),"no-dupe-class-members":()=>wj(),"no-dupe-else-if":()=>function(){if(Jk)return Yk;Jk=1;const e=Pw();function t(e,t,n){return t.every((t=>n.some((n=>e(t,n)))))}function n(e,t){return"LogicalExpression"===t.type&&t.operator===e?[...n(e,t.left),...n(e,t.right)]:[t]}const r=n.bind(null,"||"),i=n.bind(null,"&&");return Yk={meta:{type:"problem",docs:{description:"Disallow duplicate conditions in if-else-if chains",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-else-if"},schema:[],messages:{unexpected:"This branch can never execute. Its condition is a duplicate or covered by previous conditions in the if-else-if chain."}},create(n){const s=n.sourceCode,o=t.bind(null,(function t(n,r){return n.type===r.type&&("LogicalExpression"!==n.type||"||"!==n.operator&&"&&"!==n.operator||n.operator!==r.operator?e.equalTokens(n,r,s):t(n.left,r.left)&&t(n.right,r.right)||t(n.left,r.right)&&t(n.right,r.left))}));return{IfStatement(e){const t=e.test;let s=e,a=("LogicalExpression"===t.type&&"&&"===t.operator?[t,...i(t)]:[t]).map((e=>r(e).map(i)));for(;s.parent&&"IfStatement"===s.parent.type&&s.parent.alternate===s;){s=s.parent;const e=r(s.test).map(i);if(a=a.map((t=>t.filter((t=>!e.some((e=>o(e,t))))))),a.some((e=>0===e.length))){n.report({node:t,messageId:"unexpected"});break}}}}}},Yk}(),"no-dupe-keys":()=>function(){if(tD)return eD;tD=1;const e=Pw(),t=/^(?:init|get)$/u,n=/^(?:init|set)$/u;class r{constructor(e,t){this.upper=e,this.node=t,this.properties=new Map}getPropertyInfo(t){const n=e.getStaticPropertyName(t);return this.properties.has(n)||this.properties.set(n,{get:!1,set:!1}),this.properties.get(n)}isPropertyDefined(e){const r=this.getPropertyInfo(e);return t.test(e.kind)&&r.get||n.test(e.kind)&&r.set}defineProperty(e){const r=this.getPropertyInfo(e);t.test(e.kind)&&(r.get=!0),n.test(e.kind)&&(r.set=!0)}}return eD={meta:{type:"problem",docs:{description:"Disallow duplicate keys in object literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-dupe-keys"},schema:[],messages:{unexpected:"Duplicate key '{{name}}'."}},create(t){let n=null;return{ObjectExpression(e){n=new r(n,e)},"ObjectExpression:exit"(){n=n.upper},Property(r){const i=e.getStaticPropertyName(r);"ObjectExpression"===r.parent.type&&null!==i&&(n.isPropertyDefined(r)&&t.report({node:n.node,loc:r.key.loc,messageId:"unexpected",data:{name:i}}),n.defineProperty(r))}}}},eD}(),"no-duplicate-case":()=>function(){if(rD)return nD;rD=1;const e=Pw();return nD={meta:{type:"problem",docs:{description:"Disallow duplicate case labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-duplicate-case"},schema:[],messages:{unexpected:"Duplicate case label."}},create(t){const n=t.sourceCode;function r(t,r){return t.type===r.type&&e.equalTokens(t,r,n)}return{SwitchStatement(e){const n=[];for(const i of e.cases)if(i.test){const e=i.test;n.some((t=>r(t,e)))?t.report({node:i,messageId:"unexpected"}):n.push(e)}}}}},nD}(),"no-duplicate-imports":()=>Cj(),"no-else-return":()=>Pj(),"no-empty":()=>function(){if(pD)return uD;pD=1;const e=Pw();return uD={meta:{hasSuggestions:!0,type:"suggestion",docs:{description:"Disallow empty block statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty"},schema:[{type:"object",properties:{allowEmptyCatch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Empty {{type}} statement.",suggestComment:"Add comment inside empty {{type}} statement."}},create(t){const n=(t.options[0]||{}).allowEmptyCatch||!1,r=t.sourceCode;return{BlockStatement(i){0===i.body.length&&(e.isFunction(i.parent)||n&&"CatchClause"===i.parent.type||r.getCommentsInside(i).length>0||t.report({node:i,messageId:"unexpected",data:{type:"block"},suggest:[{messageId:"suggestComment",data:{type:"block"},fix(e){const t=[i.range[0]+1,i.range[1]-1];return e.replaceTextRange(t," /* empty */ ")}}]}))},SwitchStatement(e){void 0!==e.cases&&0!==e.cases.length||t.report({node:e,messageId:"unexpected",data:{type:"switch"}})}}}},uD}(),"no-empty-character-class":()=>function(){if(fD)return dD;fD=1;const{RegExpParser:e,visitRegExpAST:t}=Tj(),n=new e,r=/\[\]/u;return dD={meta:{type:"problem",docs:{description:"Disallow empty character classes in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-character-class"},schema:[],messages:{unexpected:"Empty class."}},create(e){return{"Literal[regex]"(i){const{pattern:s,flags:o}=i.regex;if(!r.test(s))return;let a;try{a=n.parsePattern(s,0,s.length,{unicode:o.includes("u"),unicodeSets:o.includes("v")})}catch{return}t(a,{onCharacterClassEnter(t){t.negate||0!==t.elements.length||e.report({node:i,messageId:"unexpected"})}})}}}},dD}(),"no-empty-function":()=>function(){if(mD)return hD;mD=1;const e=Pw(),t=Object.freeze(["functions","arrowFunctions","generatorFunctions","methods","generatorMethods","getters","setters","constructors","asyncFunctions","asyncMethods"]);return hD={meta:{type:"suggestion",docs:{description:"Disallow empty functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-function"},schema:[{type:"object",properties:{allow:{type:"array",items:{enum:t},uniqueItems:!0}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{name}}."}},create(t){const n=(t.options[0]||{}).allow||[],r=t.sourceCode;function i(i){const s=function(e){const t=e.parent;let n="";if("ArrowFunctionExpression"===e.type)return"arrowFunctions";if("Property"===t.type){if("get"===t.kind)return"getters";if("set"===t.kind)return"setters";n=t.method?"methods":"functions"}else if("MethodDefinition"===t.type){if("get"===t.kind)return"getters";if("set"===t.kind)return"setters";if("constructor"===t.kind)return"constructors";n="methods"}else n="functions";let r="";if(e.generator)r="generator";else{if(!e.async)return n;r="async"}return r+n[0].toUpperCase()+n.slice(1)}(i),o=e.getFunctionNameWithKind(i),a=r.getTokens(i.body,{includeComments:!0,filter:e.isCommentToken});n.includes(s)||"BlockStatement"!==i.body.type||0!==i.body.body.length||0!==a.length||t.report({node:i,loc:i.body.loc,messageId:"unexpected",data:{name:o}})}return{ArrowFunctionExpression:i,FunctionDeclaration:i,FunctionExpression:i}}},hD}(),"no-empty-pattern":()=>function(){if(yD)return gD;yD=1;const e=Pw();return gD={meta:{type:"problem",docs:{description:"Disallow empty destructuring patterns",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-empty-pattern"},schema:[{type:"object",properties:{allowObjectPatternsAsParameters:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpected:"Unexpected empty {{type}} pattern."}},create(t){const n=(t.options[0]||{}).allowObjectPatternsAsParameters||!1;return{ObjectPattern(r){r.properties.length>0||n&&(e.isFunction(r.parent)||"AssignmentPattern"===r.parent.type&&e.isFunction(r.parent.parent)&&"ObjectExpression"===r.parent.right.type&&0===r.parent.right.properties.length)||t.report({node:r,messageId:"unexpected",data:{type:"object"}})},ArrayPattern(e){0===e.elements.length&&t.report({node:e,messageId:"unexpected",data:{type:"array"}})}}}},gD}(),"no-empty-static-block":()=>(bD||(bD=1,_D={meta:{type:"suggestion",docs:{description:"Disallow empty static blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-empty-static-block"},schema:[],messages:{unexpected:"Unexpected empty static block."}},create(e){const t=e.sourceCode;return{StaticBlock(n){if(0===n.body.length){const r=t.getLastToken(n);0===t.getCommentsBefore(r).length&&e.report({node:n,messageId:"unexpected"})}}}}}),_D),"no-eq-null":()=>(ED||(ED=1,vD={meta:{type:"suggestion",docs:{description:"Disallow `null` comparisons without type-checking operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-eq-null"},schema:[],messages:{unexpected:"Use '===' to compare with null."}},create(e){return{BinaryExpression(t){const n="=="===t.operator||"!="===t.operator;("Literal"===t.right.type&&"null"===t.right.raw&&n||"Literal"===t.left.type&&"null"===t.left.raw&&n)&&e.report({node:t,messageId:"unexpected"})}}}}),vD),"no-eval":()=>kj(),"no-ex-assign":()=>function(){if(TD)return OD;TD=1;const e=Pw();return OD={meta:{type:"problem",docs:{description:"Disallow reassigning exceptions in `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-ex-assign"},schema:[],messages:{unexpected:"Do not assign to the exception parameter."}},create(t){const n=t.sourceCode;function r(n){e.getModifyingReferences(n.references).forEach((e=>{t.report({node:e.identifier,messageId:"unexpected"})}))}return{CatchClause(e){n.getDeclaredVariables(e).forEach(r)}}}},OD}(),"no-extend-native":()=>Dj(),"no-extra-bind":()=>Rj(),"no-extra-boolean-cast":()=>Ij(),"no-extra-label":()=>function(){if(ID)return RD;ID=1;const e=Pw();return RD={meta:{type:"suggestion",docs:{description:"Disallow unnecessary labels",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-extra-label"},schema:[],fixable:"code",messages:{unexpected:"This label '{{name}}' is unnecessary."}},create(t){const n=t.sourceCode;let r=null;function i(e){r={label:"LabeledStatement"===e.parent.type?e.parent.label:null,breakable:!0,upper:r}}function s(){r=r.upper}function o(e){if(!e.label)return;const i=e.label;for(let s=r;null!==s;s=s.upper)if(s.breakable||s.label&&s.label.name===i.name)return void(s.breakable&&s.label&&s.label.name===i.name&&t.report({node:i,messageId:"unexpected",data:i,fix(t){const r=n.getFirstToken(e);return n.commentsExistBetween(r,i)?null:t.removeRange([r.range[1],i.range[1]])}}))}return{WhileStatement:i,"WhileStatement:exit":s,DoWhileStatement:i,"DoWhileStatement:exit":s,ForStatement:i,"ForStatement:exit":s,ForInStatement:i,"ForInStatement:exit":s,ForOfStatement:i,"ForOfStatement:exit":s,SwitchStatement:i,"SwitchStatement:exit":s,LabeledStatement:function(t){e.isBreakableStatement(t.body)||(r={label:t.label,breakable:!1,upper:r})},"LabeledStatement:exit":function(t){e.isBreakableStatement(t.body)||(r=r.upper)},BreakStatement:o,ContinueStatement:o}}},RD}(),"no-extra-parens":()=>Lj(),"no-extra-semi":()=>function(){if(jD)return MD;jD=1;const e=Aj(),t=Pw();return MD={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow unnecessary semicolons",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-extra-semi"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},create(n){const r=n.sourceCode;function i(e){const n=r.getTokenAfter(e);if(!n||"String"!==n.type)return!0;const i=r.getNodeByRangeIndex(n.range[0]);return!t.isTopLevelExpressionStatement(i.parent)}function s(t){n.report({node:t,messageId:"unexpected",fix:i(t)?r=>new e(r,n.sourceCode).retainSurroundingTokens(t).remove(t):null})}function o(e){for(let n=e;"Punctuator"===n.type&&!t.isClosingBraceToken(n);n=r.getTokenAfter(n))t.isSemicolonToken(n)&&s(n)}return{EmptyStatement(e){const t=e.parent;["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(t.type)||s(e)},ClassBody(e){o(r.getFirstToken(e,1))},"MethodDefinition, PropertyDefinition, StaticBlock"(e){o(r.getTokenAfter(e))}}}},MD}(),"no-fallthrough":()=>Bj(),"no-floating-decimal":()=>function(){if(VD)return UD;VD=1;const e=Pw();return UD={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow leading or trailing decimal points in numeric literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-floating-decimal"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(t){const n=t.sourceCode;return{Literal(r){"number"==typeof r.value&&(r.raw.startsWith(".")&&t.report({node:r,messageId:"leading",fix(t){const i=n.getTokenBefore(r),s=i&&i.range[1]===r.range[0]&&!e.canTokensBeAdjacent(i,`0${r.raw}`);return t.insertTextBefore(r,s?" 0":"0")}}),r.raw.indexOf(".")===r.raw.length-1&&t.report({node:r,messageId:"trailing",fix:e=>e.insertTextAfter(r,"0")}))}}}},UD}(),"no-func-assign":()=>Mj(),"no-global-assign":()=>(qD||(qD=1,$D={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-global-assign"},schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{globalShouldNotBeModified:"Read-only global '{{name}}' should not be modified."}},create(e){const t=e.options[0],n=e.sourceCode,r=t&&t.exceptions||[];function i(t,n,r){const i=t.identifier;!1!==t.init||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,messageId:"globalShouldNotBeModified",data:{name:i.name}})}function s(e){!1!==e.writeable||r.includes(e.name)||e.references.forEach(i)}return{Program(e){n.getScope(e).variables.forEach(s)}}}}),$D),"no-implicit-coercion":()=>jj(),"no-implicit-globals":()=>(GD||(GD=1,XD={meta:{type:"suggestion",docs:{description:"Disallow declarations in the global scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-implicit-globals"},schema:[{type:"object",properties:{lexicalBindings:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{globalNonLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.",globalLexicalBinding:"Unexpected {{kind}} declaration in the global scope, wrap in a block or in an IIFE.",globalVariableLeak:"Global variable leak, declare the variable if it is intended to be local.",assignmentToReadonlyGlobal:"Unexpected assignment to read-only global variable.",redeclarationOfReadonlyGlobal:"Unexpected redeclaration of read-only global variable."}},create(e){const t=e.options[0]&&!0===e.options[0].lexicalBindings,n=e.sourceCode;function r(t,n,r){e.report({node:t,messageId:n,data:{kind:r}})}return{Program(e){const i=n.getScope(e);i.variables.forEach((e=>{const n=!1===e.writeable;!0===e.writeable||e.eslintExported||e.defs.forEach((e=>{const i=e.node;("FunctionName"===e.type||"Variable"===e.type&&"var"===e.parent.kind)&&(n?r(i,"redeclarationOfReadonlyGlobal"):r(i,"globalNonLexicalBinding","FunctionName"===e.type?"function":`'${e.parent.kind}'`)),t&&("ClassName"!==e.type&&("Variable"!==e.type||"let"!==e.parent.kind&&"const"!==e.parent.kind)||(n?r(i,"redeclarationOfReadonlyGlobal"):r(i,"globalLexicalBinding","ClassName"===e.type?"class":`'${e.parent.kind}'`)))}))})),i.implicit.variables.forEach((e=>{const t=i.set.get(e.name);let n;if(t){if(t.writeable)return;n="assignmentToReadonlyGlobal"}else n="globalVariableLeak";e.defs.forEach((e=>{r(e.node,n)}))}))}}}}),XD),"no-implied-eval":()=>Nj(),"no-import-assign":()=>Fj(),"no-inline-comments":()=>function(){if(tR)return eR;tR=1;const e=Pw();return eR={meta:{type:"suggestion",docs:{description:"Disallow inline comments after code",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-inline-comments"},schema:[{type:"object",properties:{ignorePattern:{type:"string"}},additionalProperties:!1}],messages:{unexpectedInlineComment:"Unexpected comment inline with code."}},create(t){const n=t.sourceCode,r=t.options[0];let i;function s(r){const s=String(n.lines[r.loc.start.line-1]),o=String(n.lines[r.loc.end.line-1]),a=s.slice(0,r.loc.start.column).trim(),l=o.slice(r.loc.end.column).trim(),c=!a,u=!l;if(!(c&&u||i&&i.test(r.value))){if((c||"{"===a)&&(u||"}"===l)){const e=n.getNodeByRangeIndex(r.range[0]);if(e&&"JSXEmptyExpression"===e.type)return}e.isDirectiveComment(r)||t.report({node:r,messageId:"unexpectedInlineComment"})}}return r&&r.ignorePattern&&(i=new RegExp(r.ignorePattern,"u")),{Program(){n.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(s)}}}},eR}(),"no-inner-declarations":()=>function(){if(rR)return nR;rR=1;const e=Pw(),t=new Set(["Program","StaticBlock","ExportNamedDeclaration","ExportDefaultDeclaration"]),n=new Set(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function r(t){let{parent:n}=t;for(;n;){if("StaticBlock"===n.type)return"class static block body";if(e.isFunction(n))return"function body";({parent:n}=n)}return"program"}return nR={meta:{type:"problem",docs:{description:"Disallow variable or `function` declarations in nested blocks",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-inner-declarations"},schema:[{enum:["functions","both"]}],messages:{moveDeclToRoot:"Move {{type}} declaration to {{body}} root."}},create(e){function i(i){const s=i.parent;"BlockStatement"===s.type&&n.has(s.parent.type)||t.has(s.type)||e.report({node:i,messageId:"moveDeclToRoot",data:{type:"FunctionDeclaration"===i.type?"function":"variable",body:r(i)}})}return{FunctionDeclaration:i,VariableDeclaration(t){"both"===e.options[0]&&"var"===t.kind&&i(t)}}}},nR}(),"no-invalid-regexp":()=>Uj(),"no-invalid-this":()=>function(){if(aR)return oR;aR=1;const e=Pw();function t(e,t){return"function"===e.origin&&"ArrowFunctionExpression"===t.type}return oR={meta:{type:"suggestion",docs:{description:"Disallow use of `this` in contexts where the value of `this` is `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-invalid-this"},schema:[{type:"object",properties:{capIsConstructor:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedThis:"Unexpected 'this'."}},create(n){const r=!1!==(n.options[0]||{}).capIsConstructor,i=[],s=n.sourceCode;return i.getCurrent=function(){const t=this[this.length-1];return t.init||(t.init=!0,t.valid=!e.isDefaultThisBinding(t.node,s,{capIsConstructor:r})),t},{onCodePathStart(e,r){if(!t(e,r))if("program"!==e.origin)i.push({init:!s.getScope(r).isStrict,node:r,valid:!0});else{const e=s.getScope(r),t=n.languageOptions.parserOptions.ecmaFeatures||{};i.push({init:!0,node:r,valid:!("module"===r.sourceType||t.globalReturn&&e.childScopes[0].isStrict)})}},onCodePathEnd(e,n){t(e,n)||i.pop()},ThisExpression(e){const t=i.getCurrent();t&&!t.valid&&n.report({node:e,messageId:"unexpectedThis"})}}}},oR}(),"no-irregular-whitespace":()=>Vj(),"no-iterator":()=>function(){if(pR)return uR;pR=1;const{getStaticPropertyName:e}=Pw();return uR={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__iterator__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-iterator"},schema:[],messages:{noIterator:"Reserved name '__iterator__'."}},create(t){return{MemberExpression(n){"__iterator__"===e(n)&&t.report({node:n,messageId:"noIterator"})}}}},uR}(),"no-label-var":()=>Kj(),"no-labels":()=>function(){if(mR)return hR;mR=1;const e=Pw();return hR={meta:{type:"suggestion",docs:{description:"Disallow labeled statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-labels"},schema:[{type:"object",properties:{allowLoop:{type:"boolean",default:!1},allowSwitch:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedLabel:"Unexpected labeled statement.",unexpectedLabelInBreak:"Unexpected label in break statement.",unexpectedLabelInContinue:"Unexpected label in continue statement."}},create(t){const n=t.options[0],r=n&&n.allowLoop,i=n&&n.allowSwitch;let s=null;function o(t){return e.isLoop(t)?"loop":"SwitchStatement"===t.type?"switch":"other"}function a(e){switch(e){case"loop":return r;case"switch":return i;default:return!1}}function l(e){let t=s;for(;t;){if(t.label===e)return t.kind;t=t.upper}return"other"}return{LabeledStatement(e){s={label:e.label.name,kind:o(e.body),upper:s}},"LabeledStatement:exit"(e){a(s.kind)||t.report({node:e,messageId:"unexpectedLabel"}),s=s.upper},BreakStatement(e){e.label&&!a(l(e.label.name))&&t.report({node:e,messageId:"unexpectedLabelInBreak"})},ContinueStatement(e){e.label&&!a(l(e.label.name))&&t.report({node:e,messageId:"unexpectedLabelInContinue"})}}}},hR}(),"no-lone-blocks":()=>(yR||(yR=1,gR={meta:{type:"suggestion",docs:{description:"Disallow unnecessary nested blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lone-blocks"},schema:[],messages:{redundantBlock:"Block is redundant.",redundantNestedBlock:"Nested block is redundant."}},create(e){const t=[];let n;const r=e.sourceCode;function i(t){const n="BlockStatement"===t.parent.type||"StaticBlock"===t.parent.type?"redundantNestedBlock":"redundantBlock";e.report({node:t,messageId:n})}function s(e){return"BlockStatement"===e.parent.type||"StaticBlock"===e.parent.type||"Program"===e.parent.type||"SwitchCase"===e.parent.type&&!(e.parent.consequent[0]===e&&1===e.parent.consequent.length)}function o(e){if(0===t.length)return;const n=e.parent;t[t.length-1]===n&&t.pop()}return n={BlockStatement(e){s(e)&&i(e)}},e.languageOptions.ecmaVersion>=2015&&(n={BlockStatement(e){s(e)&&t.push(e)},"BlockStatement:exit"(e){t.length>0&&t[t.length-1]===e?(t.pop(),i(e)):"BlockStatement"!==e.parent.type&&"StaticBlock"!==e.parent.type||1!==e.parent.body.length||i(e)}},n.VariableDeclaration=function(e){"let"!==e.kind&&"const"!==e.kind||o(e)},n.FunctionDeclaration=function(e){r.getScope(e).isStrict&&o(e)},n.ClassDeclaration=o),n}}),gR),"no-lonely-if":()=>(bR||(bR=1,_R={meta:{type:"suggestion",docs:{description:"Disallow `if` statements as the only statement in `else` blocks",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-lonely-if"},schema:[],fixable:"code",messages:{unexpectedLonelyIf:"Unexpected if as the only statement in an else block."}},create(e){const t=e.sourceCode;return{IfStatement(n){const r=n.parent,i=r.parent;r&&"BlockStatement"===r.type&&1===r.body.length&&i&&"IfStatement"===i.type&&r===i.alternate&&e.report({node:n,messageId:"unexpectedLonelyIf",fix(e){const i=t.getFirstToken(r),s=t.getLastToken(r),o=t.getTokenBefore(i),a=t.getTokenAfter(s),l=t.getLastToken(n.consequent),c=t.getText();return c.slice(i.range[1],n.range[0]).trim()||c.slice(n.range[1],s.range[0]).trim()||"BlockStatement"!==n.consequent.type&&";"!==l.value&&a&&(n.consequent.loc.end.line===a.loc.start.line||/^[([/+`-]/u.test(a.value)||"++"===l.value||"--"===l.value)?null:e.replaceTextRange([i.range[0],s.range[1]],(o.range[1]===i.range[0]?" ":"")+t.getText(n))}})}}}}),_R),"no-loop-func":()=>Wj(),"no-loss-of-precision":()=>$j(),"no-magic-numbers":()=>qj(),"no-misleading-character-class":()=>function(){if(FR)return NR;FR=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),{RegExpParser:i,visitRegExpAST:s}=Tj(),{isCombiningCharacter:o,isEmojiModifier:a,isRegionalIndicatorSymbol:l,isSurrogatePair:c}=Qj(),u=Pw(),{isValidWithUnicodeFlag:p}=zj();function d(e){return/^\\u\{[\da-f]+\}$/iu.test(e.raw)}const f={surrogatePairWithoutUFlag(e){return e.some(((t,n)=>{if(0===n)return!1;const r=e[n-1];return c(r.value,t.value)&&!d(r)&&!d(t)}))},surrogatePair(e){return e.some(((t,n)=>{if(0===n)return!1;const r=e[n-1];return c(r.value,t.value)&&(d(r)||d(t))}))},combiningClass(e){return e.some(((t,n)=>0!==n&&o(t.value)&&!o(e[n-1].value)))},emojiModifier(e){return e.some(((t,n)=>0!==n&&a(t.value)&&!a(e[n-1].value)))},regionalIndicatorSymbol(e){return e.some(((t,n)=>0!==n&&l(t.value)&&l(e[n-1].value)))},zwj(e){const t=e.length-1;return e.some(((n,r)=>0!==r&&r!==t&&8205===n.value&&8205!==e[r-1].value&&8205!==e[r+1].value))}},h=Object.keys(f);return NR={meta:{type:"problem",docs:{description:"Disallow characters which are made with multiple code points in character class syntax",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-misleading-character-class"},hasSuggestions:!0,schema:[],messages:{surrogatePairWithoutUFlag:"Unexpected surrogate pair in character class. Use 'u' flag.",surrogatePair:"Unexpected surrogate pair in character class.",combiningClass:"Unexpected combined character in character class.",emojiModifier:"Unexpected modified Emoji in character class.",regionalIndicatorSymbol:"Unexpected national flag in character class.",zwj:"Unexpected joined character sequence in character class.",suggestUnicodeFlag:"Add unicode 'u' flag to regex."}},create(o){const a=o.sourceCode,l=new i;function c(e,t,n,r){let i;try{i=l.parsePattern(t,0,t.length,{unicode:n.includes("u"),unicodeSets:n.includes("v")})}catch{return}const a=new Set;s(i,{onCharacterClassEnter(e){for(const t of function*(e){let t=[];for(const n of e)switch(n.type){case"Character":t.push(n);break;case"CharacterClassRange":t.push(n.min),yield t,t=[n.max];break;case"CharacterSet":case"CharacterClass":case"ClassStringDisjunction":case"ExpressionCharacterClass":t.length>0&&(yield t,t=[])}t.length>0&&(yield t)}(e.elements))for(const e of h)f[e](t)&&a.add(e)}});for(const t of a){let n;"surrogatePairWithoutUFlag"===t&&(n=[{messageId:"suggestUnicodeFlag",fix:r}]),o.report({node:e,messageId:t,suggest:n})}}return{"Literal[regex]"(e){c(e,e.regex.pattern,e.regex.flags,(t=>p(o.languageOptions.ecmaVersion,e.regex.pattern)?t.insertTextAfter(e,"u"):null))},Program(i){const s=a.getScope(i),l=new n(s);for(const{node:n}of l.iterateGlobalReferences({RegExp:{[e]:!0,[t]:!0}})){const[e,t]=n.arguments,i=r(e,s),l=r(t,s);"string"==typeof i&&c(n,i,l||"",(e=>{if(!p(o.languageOptions.ecmaVersion,i))return null;if(1===n.arguments.length){const t=a.getLastToken(n,{skip:1});return e.insertTextAfter(t,u.isCommaToken(t)?' "u",':', "u"')}if("Literal"===t.type&&"string"==typeof t.value||"TemplateLiteral"===t.type){const n=[t.range[0],t.range[1]-1];return e.insertTextAfterRange(n,"u")}return null}))}}}}},NR}(),"no-mixed-operators":()=>Xj(),"no-mixed-requires":()=>Gj(),"no-mixed-spaces-and-tabs":()=>(qR||(qR=1,$R={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs"},schema:[{enum:["smart-tabs",!0,!1]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(e){const t=e.sourceCode;let n;switch(e.options[0]){case!0:case"smart-tabs":n=!0;break;default:n=!1}return{"Program:exit"(r){const i=t.lines,s=t.getAllComments(),o=new Set;s.forEach((e=>{for(let t=e.loc.start.line+1;t<=e.loc.end.line;t++)o.add(t)}));let a=/^(?=( +|\t+))\1(?:\t| )/u;n&&(a=/^(?=(\t*))\1(?=( +))\2\t/u),i.forEach(((n,i)=>{const s=a.exec(n);if(s){const n=i+1,a={start:{line:n,column:s[0].length-2},end:{line:n,column:s[0].length}};if(!o.has(n)){const n=t.getNodeByRangeIndex(t.getIndexFromLoc(a.start));n&&["Literal","TemplateElement"].includes(n.type)||e.report({node:r,loc:a,messageId:"mixedSpacesAndTabs"})}}}))}}}}),$R),"no-multi-assign":()=>(zR||(zR=1,QR={meta:{type:"suggestion",docs:{description:"Disallow use of chained assignment expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-assign"},schema:[{type:"object",properties:{ignoreNonDeclaration:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedChain:"Unexpected chained assignment."}},create(e){const t=["VariableDeclarator > AssignmentExpression.init","PropertyDefinition > AssignmentExpression.value"];return(e.options[0]||{ignoreNonDeclaration:!1}).ignoreNonDeclaration||t.push("AssignmentExpression > AssignmentExpression.right"),{[t](t){e.report({node:t,messageId:"unexpectedChain"})}}}}),QR),"no-multi-spaces":()=>function(){if(GR)return XR;GR=1;const e=Pw();return XR={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple spaces",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=r.ignoreEOLComments,s=Object.assign({Property:!0},r.exceptions),o=Object.keys(s).some((e=>s[e]));function a(e){const t=e.value.split("\n"),n=t[0],r=`${n.slice(0,12)}...`;return 1===t.length&&n.length<=12?n:r}return{Program(){n.tokensAndComments.forEach(((r,l,c)=>{if(l===c.length-1)return;const u=c[l+1];if(!n.text.slice(r.range[1],u.range[0]).includes(" ")||r.loc.end.linee.replaceTextRange([r.range[1],u.range[0]]," ")})}))}}}},XR}(),"no-multi-str":()=>function(){if(HR)return ZR;HR=1;const e=Pw();return ZR={meta:{type:"suggestion",docs:{description:"Disallow multiline strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multi-str"},schema:[],messages:{multilineString:"Multiline support is limited to browsers supporting ES5 only."}},create(t){return{Literal(n){e.LINEBREAK_MATCHER.test(n.raw)&&!function(e){return 0===e.type.indexOf("JSX")}(n.parent)&&t.report({node:n,messageId:"multilineString"})}}}},ZR}(),"no-multiple-empty-lines":()=>(JR||(JR=1,YR={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow multiple empty lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-multiple-empty-lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(e){let t=2,n=t,r=t;e.options.length&&(t=e.options[0].max,n=void 0!==e.options[0].maxEOF?e.options[0].maxEOF:t,r=void 0!==e.options[0].maxBOF?e.options[0].maxBOF:t);const i=e.sourceCode,s=""===i.lines[i.lines.length-1]?i.lines.slice(0,-1):i.lines,o=new Set;return{TemplateLiteral(e){e.quasis.forEach((e=>{for(let t=e.loc.start.line;t((t.trim()||o.has(n+1))&&e.push(n+1),e)),[]).concat(s.length+1).reduce(((o,l)=>{let c,u;return 0===o?(c="blankBeginningOfFile",u=r):l===s.length+1?(c="blankEndOfFile",u=n):(c="consecutiveBlank",u=t),l-o-1>u&&e.report({node:a,loc:{start:{line:o+u+1,column:0},end:{line:l,column:0}},messageId:c,data:{max:u,pluralizedLines:1===u?"line":"lines"},fix(e){const t=i.getIndexFromLoc({line:o+1,column:0}),n=l-u,r=n<=s.length?i.getIndexFromLoc({line:n,column:0}):i.text.length;return e.removeRange([t,r])}}),l}),0)}}}}),YR),"no-native-reassign":()=>(tI||(tI=1,eI={meta:{type:"suggestion",docs:{description:"Disallow assignments to native objects or read-only global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-native-reassign"},deprecated:!0,replacedBy:["no-global-assign"],schema:[{type:"object",properties:{exceptions:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1}],messages:{nativeReassign:"Read-only global '{{name}}' should not be modified."}},create(e){const t=e.options[0],n=t&&t.exceptions||[],r=e.sourceCode;function i(t,n,r){const i=t.identifier;!1!==t.init||!t.isWrite()||0!==n&&r[n-1].identifier===i||e.report({node:i,messageId:"nativeReassign",data:i})}function s(e){!1!==e.writeable||n.includes(e.name)||e.references.forEach(i)}return{Program(e){r.getScope(e).variables.forEach(s)}}}}),eI),"no-negated-condition":()=>(rI||(rI=1,nI={meta:{type:"suggestion",docs:{description:"Disallow negated conditions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-condition"},schema:[],messages:{unexpectedNegated:"Unexpected negated condition."}},create(e){function t(e){return"UnaryExpression"===(t=e.test).type&&"!"===t.operator||function(e){return"BinaryExpression"===e.type&&("!="===e.operator||"!=="===e.operator)}(e.test);var t}return{IfStatement(n){(function(e){return e.alternate&&"IfStatement"!==e.alternate.type})(n)&&t(n)&&e.report({node:n,messageId:"unexpectedNegated"})},ConditionalExpression(n){t(n)&&e.report({node:n,messageId:"unexpectedNegated"})}}}}),nI),"no-negated-in-lhs":()=>(sI||(sI=1,iI={meta:{type:"problem",docs:{description:"Disallow negating the left operand in `in` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-negated-in-lhs"},replacedBy:["no-unsafe-negation"],deprecated:!0,schema:[],messages:{negatedLHS:"The 'in' expression's left operand is negated."}},create(e){return{BinaryExpression(t){"in"===t.operator&&"UnaryExpression"===t.left.type&&"!"===t.left.operator&&e.report({node:t,messageId:"negatedLHS"})}}}}),iI),"no-nested-ternary":()=>(aI||(aI=1,oI={meta:{type:"suggestion",docs:{description:"Disallow nested ternary expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-nested-ternary"},schema:[],messages:{noNestedTernary:"Do not nest ternary expressions."}},create(e){return{ConditionalExpression(t){"ConditionalExpression"!==t.alternate.type&&"ConditionalExpression"!==t.consequent.type||e.report({node:t,messageId:"noNestedTernary"})}}}}),oI),"no-new":()=>(cI||(cI=1,lI={meta:{type:"suggestion",docs:{description:"Disallow `new` operators outside of assignments or comparisons",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new"},schema:[],messages:{noNewStatement:"Do not use 'new' for side effects."}},create(e){return{"ExpressionStatement > NewExpression"(t){e.report({node:t.parent,messageId:"noNewStatement"})}}}}),lI),"no-new-func":()=>function(){if(pI)return uI;pI=1;const e=Pw(),t=new Set(["apply","bind","call"]);return uI={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `Function` object",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-func"},schema:[],messages:{noFunctionConstructor:"The Function constructor is eval."}},create(n){const r=n.sourceCode;return{"Program:exit"(i){const s=r.getScope(i).set.get("Function");s&&0===s.defs.length&&s.references.forEach((r=>{const i=r.identifier,{parent:s}=i;let o;if(s)if(i!==s.callee||"NewExpression"!==s.type&&"CallExpression"!==s.type){if("MemberExpression"===s.type&&i===s.object&&t.has(e.getStaticPropertyName(s))){const e="ChainExpression"===s.parent.type?s.parent:s;"CallExpression"===e.parent.type&&e.parent.callee===e&&(o=e.parent)}}else o=s;o&&n.report({node:o,messageId:"noFunctionConstructor"})}))}}}},uI}(),"no-new-native-nonconstructor":()=>function(){if(fI)return dI;fI=1;const e=["Symbol","BigInt"];return dI={meta:{type:"problem",docs:{description:"Disallow `new` operators with global non-constructor functions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"},schema:[],messages:{noNewNonconstructor:"`{{name}}` cannot be called as a constructor."}},create(t){const n=t.sourceCode;return{"Program:exit"(r){const i=n.getScope(r);for(const n of e){const e=i.set.get(n);e&&0===e.defs.length&&e.references.forEach((e=>{const r=e.identifier,i=r.parent;i&&"NewExpression"===i.type&&i.callee===r&&t.report({node:r,messageId:"noNewNonconstructor",data:{name:n}})}))}}}}},dI}(),"no-new-object":()=>function(){if(mI)return hI;mI=1;const e=Pw();return hI={meta:{type:"suggestion",docs:{description:"Disallow `Object` constructors",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-object"},deprecated:!0,replacedBy:["no-object-constructor"],schema:[],messages:{preferLiteral:"The object literal notation {} is preferable."}},create(t){const n=t.sourceCode;return{NewExpression(r){const i=e.getVariableByName(n.getScope(r),r.callee.name);i&&i.identifiers.length>0||"Object"===r.callee.name&&t.report({node:r,messageId:"preferLiteral"})}}}},hI}(),"no-new-require":()=>(yI||(yI=1,gI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow `new` operators with calls to `require`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-require"},schema:[],messages:{noNewRequire:"Unexpected use of new with require."}},create(e){return{NewExpression(t){"Identifier"===t.callee.type&&"require"===t.callee.name&&e.report({node:t,messageId:"noNewRequire"})}}}}),gI),"no-new-symbol":()=>(bI||(bI=1,_I={meta:{type:"problem",docs:{description:"Disallow `new` operators with the `Symbol` object",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-new-symbol"},schema:[],messages:{noNewSymbol:"`Symbol` cannot be called as a constructor."}},create(e){const t=e.sourceCode;return{"Program:exit"(n){const r=t.getScope(n).set.get("Symbol");r&&0===r.defs.length&&r.references.forEach((t=>{const n=t.identifier,r=n.parent;r&&"NewExpression"===r.type&&r.callee===n&&e.report({node:n,messageId:"noNewSymbol"})}))}}}}),_I),"no-new-wrappers":()=>function(){if(EI)return vI;EI=1;const{getVariableByName:e}=Pw();return vI={meta:{type:"suggestion",docs:{description:"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-new-wrappers"},schema:[],messages:{noConstructor:"Do not use {{fn}} as a constructor."}},create(t){const{sourceCode:n}=t;return{NewExpression(r){const{name:i}=r.callee;if(["String","Number","Boolean"].includes(i)){const s=e(n.getScope(r),i);s&&0===s.identifiers.length&&t.report({node:r,messageId:"noConstructor",data:{fn:i}})}}}}},vI}(),"no-nonoctal-decimal-escape":()=>function(){if(SI)return xI;SI=1;const e=/\\[89]/u;function t(e){return`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`}return xI={meta:{type:"suggestion",docs:{description:"Disallow `\\8` and `\\9` escape sequences in string literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape"},hasSuggestions:!0,schema:[],messages:{decimalEscape:"Don't use '{{decimalEscape}}' escape sequence.",refactor:"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",escapeBackslash:"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character."}},create(n){const r=n.sourceCode;function i(e,t,n){return{messageId:e,data:{original:r.getText().slice(...t),replacement:n},fix(e){return e.replaceTextRange(t,n)}}}return{Literal(s){if("string"!=typeof s.value)return;if(!e.test(s.raw))return;const o=/(?:[^\\]|(?\\.))*?(?\\[89])/suy;let a;for(;a=o.exec(s.raw);){const{previousEscape:e,decimalEscape:o}=a.groups,l=s.range[0]+a.index+a[0].length,c=l-o.length,u=[c,l],p=[];"\\0"===e?p.push(i("refactor",[c-e.length,l],`${t("\0")}${o[1]}`),i("refactor",u,t(o[1]))):p.push(i("refactor",u,o[1])),p.push(i("escapeBackslash",u,`\\${o}`)),n.report({node:s,loc:{start:r.getLocFromIndex(c),end:r.getLocFromIndex(l)},messageId:"decimalEscape",data:{decimalEscape:o},suggest:p})}}}}},xI}(),"no-obj-calls":()=>function(){if(TI)return OI;TI=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n}=rS(),r=Pw().getStaticPropertyName,i=["Atomics","JSON","Math","Reflect","Intl"];function s(e){return"ChainExpression"===e.type?s(e.expression):"MemberExpression"===e.type?r(e):e.name}return OI={meta:{type:"problem",docs:{description:"Disallow calling global object properties as functions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-obj-calls"},schema:[],messages:{unexpectedCall:"'{{name}}' is not a function.",unexpectedRefCall:"'{{name}}' is reference to '{{ref}}', which is not a function."}},create(r){const o=r.sourceCode;return{Program(a){const l=o.getScope(a),c=new n(l),u={};for(const n of i)u[n]={[e]:!0,[t]:!0};for(const{node:e,path:t}of c.iterateGlobalReferences(u)){const n=s(e.callee),i=t[0],o=n===i?"unexpectedCall":"unexpectedRefCall";r.report({node:e,messageId:o,data:{name:n,ref:i}})}}}}},OI}(),"no-object-constructor":()=>Zj(),"no-octal":()=>(PI||(PI=1,AI={meta:{type:"suggestion",docs:{description:"Disallow octal literals",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-octal"},schema:[],messages:{noOctal:"Octal literals should not be used."}},create(e){return{Literal(t){"number"==typeof t.value&&/^0[0-9]/u.test(t.raw)&&e.report({node:t,messageId:"noOctal"})}}}}),AI),"no-octal-escape":()=>(DI||(DI=1,kI={meta:{type:"suggestion",docs:{description:"Disallow octal escape sequences in string literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-octal-escape"},schema:[],messages:{octalEscapeSequence:"Don't use octal: '\\{{sequence}}'. Use '\\u....' instead."}},create(e){return{Literal(t){if("string"!=typeof t.value)return;const n=t.raw.match(/^(?:[^\\]|\\.)*?\\([0-3][0-7]{1,2}|[4-7][0-7]|0(?=[89])|[1-7])/su);n&&e.report({node:t,messageId:"octalEscapeSequence",data:{sequence:n[1]}})}}}}),kI),"no-param-reassign":()=>Hj(),"no-path-concat":()=>(BI||(BI=1,LI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow string concatenation with `__dirname` and `__filename`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-path-concat"},schema:[],messages:{usePathFunctions:"Use path.join() or path.resolve() instead of + to create paths."}},create(e){const t=/^__(?:dir|file)name$/u;return{BinaryExpression(n){const r=n.left,i=n.right;"+"===n.operator&&("Identifier"===r.type&&t.test(r.name)||"Identifier"===i.type&&t.test(i.name))&&e.report({node:n,messageId:"usePathFunctions"})}}}}),LI),"no-plusplus":()=>Yj(),"no-process-env":()=>(FI||(FI=1,NI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.env`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-env"},schema:[],messages:{unexpectedProcessEnv:"Unexpected use of process.env."}},create(e){return{MemberExpression(t){const n=t.object.name,r=t.property.name;"process"===n&&!t.computed&&r&&"env"===r&&e.report({node:t,messageId:"unexpectedProcessEnv"})}}}}),NI),"no-process-exit":()=>(VI||(VI=1,UI={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow the use of `process.exit()`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-process-exit"},schema:[],messages:{noProcessExit:"Don't use process.exit(); throw an error instead."}},create(e){return{"CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(t){e.report({node:t.parent,messageId:"noProcessExit"})}}}}),UI),"no-promise-executor-return":()=>Jj(),"no-proto":()=>function(){if(qI)return $I;qI=1;const{getStaticPropertyName:e}=Pw();return $I={meta:{type:"suggestion",docs:{description:"Disallow the use of the `__proto__` property",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-proto"},schema:[],messages:{unexpectedProto:"The '__proto__' property is deprecated."}},create(t){return{MemberExpression(n){"__proto__"===e(n)&&t.report({node:n,messageId:"unexpectedProto"})}}}},$I}(),"no-prototype-builtins":()=>eN(),"no-redeclare":()=>function(){if(GI)return XI;GI=1;const e=Pw();return XI={meta:{type:"suggestion",docs:{description:"Disallow variable redeclaration",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-redeclare"},messages:{redeclared:"'{{id}}' is already defined.",redeclaredAsBuiltin:"'{{id}}' is already defined as a built-in global variable.",redeclaredBySyntax:"'{{id}}' is already defined by a variable declaration."},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!0}},additionalProperties:!1}]},create(t){const n=Boolean(0===t.options.length||t.options[0].builtinGlobals),r=t.sourceCode;function*i(t){!n||"readonly"!==t.eslintImplicitGlobalSetting&&"writable"!==t.eslintImplicitGlobalSetting||(yield{type:"builtin"});for(const e of t.identifiers)yield{type:"syntax",node:e,loc:e.loc};if(t.eslintExplicitGlobalComments)for(const n of t.eslintExplicitGlobalComments)yield{type:"comment",node:n,loc:e.getNameLocationInGlobalDirectiveComment(r,n,t.name)}}function s(e){for(const n of e.variables){const[e,...r]=i(n);if(0===r.length)continue;const s="builtin"===e.type?"redeclaredAsBuiltin":"redeclaredBySyntax",o={id:n.name};for(const{type:n,node:i,loc:a}of r){const r=n===e.type?"redeclared":s;t.report({node:i,loc:a,messageId:r,data:o})}}}function o(e){const t=r.getScope(e);t.block===e&&s(t)}return{Program(e){const t=r.getScope(e);s(t),"global"===t.type&&t.childScopes[0]&&t.block===t.childScopes[0].block&&s(t.childScopes[0])},FunctionDeclaration:o,FunctionExpression:o,ArrowFunctionExpression:o,StaticBlock:o,BlockStatement:o,ForStatement:o,ForInStatement:o,ForOfStatement:o,SwitchStatement:o}}},XI}(),"no-regex-spaces":()=>function(){if(HI)return ZI;HI=1;const e=Pw(),t=Tj(),n=new t.RegExpParser,r=/ {2}/u;function i(e){return e&&"Literal"===e.type&&"string"==typeof e.value}return ZI={meta:{type:"suggestion",docs:{description:"Disallow multiple spaces in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-regex-spaces"},schema:[],fixable:"code",messages:{multipleSpaces:"Spaces are hard to count. Use {{{length}}}."}},create(s){const o=s.sourceCode;function a(e,i,o,a,l){if(!r.test(o))return;const c=[];let u;try{u=n.parsePattern(i,0,i.length,{unicode:l.includes("u"),unicodeSets:l.includes("v")})}catch{return}t.visitRegExpAST(u,{onCharacterClassEnter(e){c.push(e)}});const p=/( {2,})(?: [+*{?]|[^+*{?]|$)/gu;let d;for(;d=p.exec(i);){const{1:{length:t},index:n}=d;if(c.every((({start:e,end:t})=>n0,l=t.arguments[0];if("Identifier"===t.callee.type&&"RegExp"===t.callee.name&&i(l)&&!s){const e=l.value,n=l.raw.slice(1,-1),r=l.range[0]+1;let s;if(t.arguments.length<2)s="";else{const e=t.arguments[1];if(!i(e))return;s=e.value}a(t,e,n,r,s)}}return{Literal:function(e){if(e.regex){const t=e.regex.pattern,n=e.raw.slice(1,e.raw.lastIndexOf("/"));a(e,t,n,e.range[0]+1,e.regex.flags)}},CallExpression:l,NewExpression:l}}},ZI}(),"no-restricted-exports":()=>function(){if(JI)return YI;JI=1;const e=Pw();return YI={meta:{type:"suggestion",docs:{description:"Disallow specified names in exports",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-exports"},schema:[{anyOf:[{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string"},uniqueItems:!0}},additionalProperties:!1},{type:"object",properties:{restrictedNamedExports:{type:"array",items:{type:"string",pattern:"^(?!default$)"},uniqueItems:!0},restrictDefaultExports:{type:"object",properties:{direct:{type:"boolean"},named:{type:"boolean"},defaultFrom:{type:"boolean"},namedFrom:{type:"boolean"},namespaceFrom:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{restrictedNamed:"'{{name}}' is restricted from being used as an exported name.",restrictedDefault:"Exporting 'default' is restricted."}},create(t){const n=new Set(t.options[0]&&t.options[0].restrictedNamedExports),r=t.options[0]&&t.options[0].restrictDefaultExports,i=t.sourceCode;function s(i){const s=e.getModuleExportName(i);if(n.has(s))t.report({node:i,messageId:"restrictedNamed",data:{name:s}});else if("default"===s)if("ExportAllDeclaration"===i.parent.type)r&&r.namespaceFrom&&t.report({node:i,messageId:"restrictedDefault"});else{const n=!!i.parent.parent.source,s=e.getModuleExportName(i.parent.local);if(!n&&r&&r.named)return void t.report({node:i,messageId:"restrictedDefault"});n&&r&&("default"===s&&r.defaultFrom||"default"!==s&&r.namedFrom)&&t.report({node:i,messageId:"restrictedDefault"})}}return{ExportAllDeclaration(e){e.exported&&s(e.exported)},ExportDefaultDeclaration(e){r&&r.direct&&t.report({node:e,messageId:"restrictedDefault"})},ExportNamedDeclaration(e){const t=e.declaration;t?"FunctionDeclaration"===t.type||"ClassDeclaration"===t.type?s(t.id):"VariableDeclaration"===t.type&&i.getDeclaredVariables(t).map((e=>e.defs.find((e=>e.parent===t)))).map((e=>e.name)).forEach(s):e.specifiers.map((e=>e.exported)).forEach(s)}}}},YI}(),"no-restricted-globals":()=>(tL||(tL=1,eL={meta:{type:"suggestion",docs:{description:"Disallow specified global variables",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-globals"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{name:{type:"string"},message:{type:"string"}},required:["name"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{defaultMessage:"Unexpected use of '{{name}}'.",customMessage:"Unexpected use of '{{name}}'. {{customMessage}}"}},create(e){const t=e.sourceCode;if(0===e.options.length)return{};const n=e.options.reduce(((e,t)=>("string"==typeof t?e[t]=null:e[t.name]=t.message,e)),{});function r(t){const r=t.identifier.name,i=n[r],s=i?"customMessage":"defaultMessage";e.report({node:t.identifier,messageId:s,data:{name:r,customMessage:i}})}function i(e){return Object.prototype.hasOwnProperty.call(n,e)}return{Program(e){const n=t.getScope(e);n.variables.forEach((e=>{!e.defs.length&&i(e.name)&&e.references.forEach(r)})),n.through.forEach((e=>{i(e.identifier.name)&&r(e)}))}}}}),eL),"no-restricted-imports":()=>nN(),"no-restricted-modules":()=>rN(),"no-restricted-properties":()=>function(){if(cL)return lL;cL=1;const e=Pw();return lL={meta:{type:"suggestion",docs:{description:"Disallow certain properties on certain objects",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-properties"},schema:{type:"array",items:{anyOf:[{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["object"]},{type:"object",properties:{object:{type:"string"},property:{type:"string"},message:{type:"string"}},additionalProperties:!1,required:["property"]}]},uniqueItems:!0},messages:{restrictedObjectProperty:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",restrictedProperty:"'{{propertyName}}' is restricted from being used.{{message}}"}},create(t){const n=t.options;if(0===n.length)return{};const r=new Map,i=new Map,s=new Map;function o(e,n,o){if(null===o)return;const a=r.get(n),l=a?a.get(o):i.get(n),c=s.get(o);if(l){const r=l.message?` ${l.message}`:"";t.report({node:e,messageId:"restrictedObjectProperty",data:{objectName:n,propertyName:o,message:r}})}else if(c){const n=c.message?` ${c.message}`:"";t.report({node:e,messageId:"restrictedProperty",data:{propertyName:o,message:n}})}}return n.forEach((e=>{const t=e.object,n=e.property;void 0===t?s.set(n,{message:e.message}):void 0===n?i.set(t,{message:e.message}):(r.has(t)||r.set(t,new Map),r.get(t).set(n,{message:e.message}))})),{MemberExpression(t){o(t,t.object&&t.object.name,e.getStaticPropertyName(t))},ObjectPattern(t){let n=null;"VariableDeclarator"===t.parent.type?t.parent.init&&"Identifier"===t.parent.init.type&&(n=t.parent.init.name):"AssignmentExpression"!==t.parent.type&&"AssignmentPattern"!==t.parent.type||"Identifier"===t.parent.right.type&&(n=t.parent.right.name),t.properties.forEach((r=>{o(t,n,e.getStaticPropertyName(r))}))}}}},lL}(),"no-restricted-syntax":()=>(pL||(pL=1,uL={meta:{type:"suggestion",docs:{description:"Disallow specified syntax",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-restricted-syntax"},schema:{type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{selector:{type:"string"},message:{type:"string"}},required:["selector"],additionalProperties:!1}]},uniqueItems:!0,minItems:0},messages:{restrictedSyntax:"{{message}}"}},create(e){return e.options.reduce(((t,n)=>{const r="string"==typeof n,i=!r&&Boolean(n.message),s=r?n:n.selector,o=i?n.message:`Using '${s}' is not allowed.`;return Object.assign(t,{[s](t){e.report({node:t,messageId:"restrictedSyntax",data:{message:o}})}})}),{})}}),uL),"no-return-assign":()=>function(){if(fL)return dL;fL=1;const e=Pw(),t=/^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/u;return dL={meta:{type:"suggestion",docs:{description:"Disallow assignment operators in `return` statements",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-return-assign"},schema:[{enum:["except-parens","always"]}],messages:{returnAssignment:"Return statement should not contain assignment.",arrowAssignment:"Arrow function should not return assignment."}},create(n){const r="except-parens"!==(n.options[0]||"except-parens"),i=n.sourceCode;return{AssignmentExpression(s){if(!r&&e.isParenthesised(i,s))return;let o=s,a=o.parent;for(;a&&!t.test(a.type);)o=a,a=a.parent;a&&"ReturnStatement"===a.type?n.report({node:a,messageId:"returnAssignment"}):a&&"ArrowFunctionExpression"===a.type&&a.body===o&&n.report({node:a,messageId:"arrowAssignment"})}}}},dL}(),"no-return-await":()=>iN(),"no-script-url":()=>function(){if(yL)return gL;yL=1;const e=Pw();return gL={meta:{type:"suggestion",docs:{description:"Disallow `javascript:` urls",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-script-url"},schema:[],messages:{unexpectedScriptURL:"Script URL is a form of eval."}},create(t){function n(n){const r=e.getStaticStringValue(n);"string"==typeof r&&0===r.toLowerCase().indexOf("javascript:")&&t.report({node:n,messageId:"unexpectedScriptURL"})}return{Literal(e){e.value&&"string"==typeof e.value&&n(e)},TemplateLiteral(e){e.parent&&"TaggedTemplateExpression"===e.parent.type||n(e)}}}},gL}(),"no-self-assign":()=>sN(),"no-self-compare":()=>oN(),"no-sequences":()=>aN(),"no-setter-return":()=>lN(),"no-shadow":()=>function(){if(CL)return wL;CL=1;const e=Pw(),t=new Set(["ArrowFunctionExpression","FunctionExpression"]),n=new Set(["CallExpression"]),r=/^For(?:In|Of)Statement$/u,i=/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;return wL={meta:{type:"suggestion",docs:{description:"Disallow variable declarations from shadowing variables declared in the outer scope",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-shadow"},schema:[{type:"object",properties:{builtinGlobals:{type:"boolean",default:!1},hoist:{enum:["all","functions","never"],default:"functions"},allow:{type:"array",items:{type:"string"}},ignoreOnInitialization:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noShadow:"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",noShadowGlobal:"'{{name}}' is already a global variable."}},create(s){const o={builtinGlobals:s.options[0]&&s.options[0].builtinGlobals,hoist:s.options[0]&&s.options[0].hoist||"functions",allow:s.options[0]&&s.options[0].allow||[],ignoreOnInitialization:s.options[0]&&s.options[0].ignoreOnInitialization},a=s.sourceCode;function l(e,t){return e&&e.range[0]<=t&&t<=e.range[1]}function c(e,s){const o=s.defs[0];if(!o)return!1;const{variableScope:a}=e.scope;if(!t.has(a.block.type)||function(e){const t=e.upper;return"function-expression-name"===t.type?t.upper:t}(a)!==s.scope)return!1;const c=a.block,{parent:u}=c,p=function(e,t){let n=e;for(;n&&!t(n);)n=n.parent;return n}(u,(e=>n.has(e.type)));if(!p)return!1;let d=o.name;const f=p.range[1];for(;d;){if("VariableDeclarator"===d.type){if(l(d.init,f))return!0;if(r.test(d.parent.parent.type)&&l(d.parent.parent.right,f))return!0;break}if("AssignmentPattern"===d.type){if(l(d.right,f))return!0}else if(i.test(d.type))break;d=d.parent}return!1}function u(e){return o.allow.includes(e.name)}function p(e){const t=e.scope.block;return"ClassDeclaration"===t.type&&t.id===e.identifiers[0]}function d(e,t){const n=t.scope,r=t.defs[0],i=r&&r.parent&&r.parent.range,s=e.scope,o=e.defs[0],a=o&&o.name.range;return i&&a&&i[0]0||o.builtinGlobals&&"writeable"in a)&&!d(i,a)&&(!o.ignoreOnInitialization||!c(i,a))&&("all"===o.hoist||!m(i,a))){const e=h(a),t=e.global?"noShadowGlobal":"noShadow",n={name:i.name};e.global||(n.shadowedLine=e.line,n.shadowedColumn=e.column),s.report({node:i.identifiers[0],messageId:t,data:n})}}}return{"Program:exit"(e){const t=a.getScope(e).childScopes.slice();for(;t.length;){const e=t.pop();t.push(...e.childScopes),g(e)}}}}},wL}(),"no-shadow-restricted-names":()=>function(){if(PL)return AL;function e(e){return"undefined"===e.name&&e.references.every((e=>!e.isWrite()))&&e.defs.every((e=>"VariableDeclarator"===e.node.type&&null===e.node.init))}return PL=1,AL={meta:{type:"suggestion",docs:{description:"Disallow identifiers from shadowing restricted names",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-shadow-restricted-names"},schema:[],messages:{shadowingRestrictedName:"Shadowing of global property '{{name}}'."}},create(t){const n=new Set(["undefined","NaN","Infinity","arguments","eval"]),r=t.sourceCode;return{"VariableDeclaration, :function, CatchClause"(i){for(const s of r.getDeclaredVariables(i))s.defs.length>0&&n.has(s.name)&&!e(s)&&t.report({node:s.defs[0].name,messageId:"shadowingRestrictedName",data:{name:s.name}})}}}},AL}(),"no-spaced-func":()=>(DL||(DL=1,kL={meta:{type:"layout",docs:{description:"Disallow spacing between function identifiers and their applications (deprecated)",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-spaced-func"},deprecated:!0,replacedBy:["func-call-spacing"],fixable:"whitespace",schema:[],messages:{noSpacedFunction:"Unexpected space between function name and paren."}},create(e){const t=e.sourceCode;function n(n){const r=t.getLastToken(n.callee);let i=r,s=t.getTokenAfter(r);for(;s&&s.range[1](IL||(IL=1,RL={meta:{type:"problem",docs:{description:"Disallow sparse arrays",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-sparse-arrays"},schema:[],messages:{unexpectedSparseArray:"Unexpected comma in middle of array."}},create(e){return{ArrayExpression(t){t.elements.includes(null)&&e.report({node:t,messageId:"unexpectedSparseArray"})}}}}),RL),"no-sync":()=>(BL||(BL=1,LL={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Disallow synchronous methods",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-sync"},schema:[{type:"object",properties:{allowAtRootLevel:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{noSync:"Unexpected sync method: '{{propertyName}}'."}},create(e){return{[e.options[0]&&e.options[0].allowAtRootLevel?":function MemberExpression[property.name=/.*Sync$/]":"MemberExpression[property.name=/.*Sync$/]"](t){e.report({node:t,messageId:"noSync",data:{propertyName:t.property.name}})}}}}),LL),"no-tabs":()=>function(){if(jL)return ML;jL=1;const e=/\t+/gu,t=/\S/u;return ML={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Disallow all tabs",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-tabs"},schema:[{type:"object",properties:{allowIndentationTabs:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedTab:"Unexpected tab character."}},create(n){const r=n.sourceCode,i=n.options&&n.options[0]&&n.options[0].allowIndentationTabs;return{Program(s){r.getLines().forEach(((r,o)=>{let a;for(;null!==(a=e.exec(r));)i&&!t.test(r.slice(0,a.index))||n.report({node:s,loc:{start:{line:o+1,column:a.index},end:{line:o+1,column:a.index+a[0].length}},messageId:"unexpectedTab"})}))}}}},ML}(),"no-template-curly-in-string":()=>(FL||(FL=1,NL={meta:{type:"problem",docs:{description:"Disallow template literal placeholder syntax in regular strings",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-template-curly-in-string"},schema:[],messages:{unexpectedTemplateExpression:"Unexpected template string expression."}},create(e){const t=/\$\{[^}]+\}/u;return{Literal(n){"string"==typeof n.value&&t.test(n.value)&&e.report({node:n,messageId:"unexpectedTemplateExpression"})}}}}),NL),"no-ternary":()=>(VL||(VL=1,UL={meta:{type:"suggestion",docs:{description:"Disallow ternary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-ternary"},schema:[],messages:{noTernaryOperator:"Ternary operator used."}},create(e){return{ConditionalExpression(t){e.report({node:t,messageId:"noTernaryOperator"})}}}}),UL),"no-this-before-super":()=>cN(),"no-throw-literal":()=>function(){if(qL)return $L;qL=1;const e=Pw();return $L={meta:{type:"suggestion",docs:{description:"Disallow throwing literals as exceptions",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-throw-literal"},schema:[],messages:{object:"Expected an error object to be thrown.",undef:"Do not throw undefined."}},create(t){return{ThrowStatement(n){e.couldBeError(n.argument)?"Identifier"===n.argument.type&&"undefined"===n.argument.name&&t.report({node:n,messageId:"undef"}):t.report({node:n,messageId:"object"})}}}},$L}(),"no-trailing-spaces":()=>uN(),"no-undef":()=>(GL||(GL=1,XL={meta:{type:"problem",docs:{description:"Disallow the use of undeclared variables unless mentioned in `/*global */` comments",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-undef"},schema:[{type:"object",properties:{typeof:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{undef:"'{{name}}' is not defined."}},create(e){const t=e.options[0],n=t&&!0===t.typeof||!1,r=e.sourceCode;return{"Program:exit"(t){r.getScope(t).through.forEach((t=>{const r=t.identifier;!n&&function(e){const t=e.parent;return"UnaryExpression"===t.type&&"typeof"===t.operator}(r)||e.report({node:r,messageId:"undef",data:r})}))}}}}),XL),"no-undef-init":()=>function(){if(HL)return ZL;HL=1;const e=Pw();return ZL={meta:{type:"suggestion",docs:{description:"Disallow initializing variables to `undefined`",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undef-init"},schema:[],fixable:"code",messages:{unnecessaryUndefinedInit:"It's not necessary to initialize '{{name}}' to undefined."}},create(t){const n=t.sourceCode;return{VariableDeclarator(r){const i=n.getText(r.id),s=r.init&&r.init.name,o=n.getScope(r),a=e.getVariableByName(o,"undefined"),l=a&&a.defs.length>0,c=n.getLastToken(r);"undefined"!==s||"const"===r.parent.kind||l||t.report({node:r,messageId:"unnecessaryUndefinedInit",data:{name:i},fix(e){return"var"===r.parent.kind||"ArrayPattern"===r.id.type||"ObjectPattern"===r.id.type||n.commentsExistBetween(r.id,c)?null:e.removeRange([r.id.range[1],r.range[1]])}})}}}},ZL}(),"no-undefined":()=>(JL||(JL=1,YL={meta:{type:"suggestion",docs:{description:"Disallow the use of `undefined` as an identifier",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-undefined"},schema:[],messages:{unexpectedUndefined:"Unexpected use of undefined."}},create(e){const t=e.sourceCode;function n(t){e.report({node:t,messageId:"unexpectedUndefined"})}function r(e){const t=e.set.get("undefined");if(!t)return;const r=t.references,i=t.defs;r.filter((e=>!e.init)).forEach((e=>n(e.identifier))),i.forEach((e=>n(e.name)))}return{"Program:exit"(e){const n=[t.getScope(e)];for(;n.length;){const e=n.pop();n.push(...e.childScopes),r(e)}}}}}),YL),"no-underscore-dangle":()=>pN(),"no-unexpected-multiline":()=>function(){if(rB)return nB;rB=1;const e=Pw();return nB={meta:{type:"problem",docs:{description:"Disallow confusing multiline expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unexpected-multiline"},schema:[],messages:{function:"Unexpected newline between function and ( of function call.",property:"Unexpected newline between object and [ of property access.",taggedTemplate:"Unexpected newline between template tag and template literal.",division:"Unexpected newline between numerator and division operator."}},create(t){const n=/^[gimsuy]+$/u,r=t.sourceCode;function i(n,i){const s=r.getTokenAfter(n,e.isNotClosingParenToken),o=r.getTokenBefore(s);s.loc.start.line!==o.loc.end.line&&t.report({node:n,loc:s.loc,messageId:i})}return{MemberExpression(e){e.computed&&!e.optional&&i(e.object,"property")},TaggedTemplateExpression(e){const{quasi:n}=e;r.getTokenBefore(n).loc.end.line!==n.loc.start.line&&t.report({node:e,loc:{start:n.loc.start,end:{line:n.loc.start.line,column:n.loc.start.column+1}},messageId:"taggedTemplate"})},CallExpression(e){0===e.arguments.length||e.optional||i(e.callee,"function")},"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(e){const t=r.getTokenAfter(e,(e=>"/"===e.value)),s=r.getTokenAfter(t);"Identifier"===s.type&&n.test(s.value)&&t.range[1]===s.range[0]&&i(e.left,"division")}}}},nB}(),"no-unmodified-loop-condition":()=>dN(),"no-unneeded-ternary":()=>fN(),"no-unreachable":()=>function(){if(cB)return lB;function e(e){return Boolean(e.init)}cB=1;class t{constructor(e){this.sourceCode=e,this.startNode=null,this.endNode=null}get location(){return{start:this.startNode.loc.start,end:this.endNode.loc.end}}get isEmpty(){return!(this.startNode&&this.endNode)}contains(e){return e.range[0]>=this.startNode.range[0]&&e.range[1]<=this.endNode.range[1]}isConsecutive(e){return this.contains(this.sourceCode.getTokenBefore(e))}merge(e){this.endNode=e}reset(e){this.startNode=this.endNode=e}}return lB={meta:{type:"problem",docs:{description:"Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unreachable"},schema:[],messages:{unreachableCode:"Unreachable code."}},create(n){let r=null;const i=new t(n.sourceCode),s=[];let o=new Set;function a(e){let t=null;if(e&&("PropertyDefinition"===e.type||function(e){for(const t of e)if(t.reachable)return!1;return!0}(o))){if(i.isEmpty)return void i.reset(e);if(i.contains(e))return;if(i.isConsecutive(e))return void i.merge(e);t=e}i.isEmpty||n.report({messageId:"unreachableCode",loc:i.location,node:i.startNode}),i.reset(t)}return{onCodePathStart(){s.push(o),o=new Set},onCodePathEnd(){o=s.pop()},onUnreachableCodePathSegmentStart(e){o.add(e)},onUnreachableCodePathSegmentEnd(e){o.delete(e)},onCodePathSegmentEnd(e){o.delete(e)},onCodePathSegmentStart(e){o.add(e)},BlockStatement:a,BreakStatement:a,ClassDeclaration:a,ContinueStatement:a,DebuggerStatement:a,DoWhileStatement:a,ExpressionStatement:a,ForInStatement:a,ForOfStatement:a,ForStatement:a,IfStatement:a,ImportDeclaration:a,LabeledStatement:a,ReturnStatement:a,SwitchStatement:a,ThrowStatement:a,TryStatement:a,VariableDeclaration(t){("var"!==t.kind||t.declarations.some(e))&&a(t)},WhileStatement:a,WithStatement:a,ExportNamedDeclaration:a,ExportDefaultDeclaration:a,ExportAllDeclaration:a,"Program:exit"(){a()},"MethodDefinition[kind='constructor']"(){r={upper:r,hasSuperCall:!1}},"MethodDefinition[kind='constructor']:exit"(e){const{hasSuperCall:t}=r;if(r=r.upper,!e.value.body)return;const n=e.parent.parent;if(n.superClass&&!t)for(const e of n.body.body)"PropertyDefinition"!==e.type||e.static||a(e)},"CallExpression > Super.callee"(){r&&(r.hasSuperCall=!0)}}}},lB}(),"no-unreachable-loop":()=>function(){if(pB)return uB;pB=1;const e=["WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement"];return uB={meta:{type:"problem",docs:{description:"Disallow loops with a body that allows only one iteration",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unreachable-loop"},schema:[{type:"object",properties:{ignore:{type:"array",items:{enum:e},uniqueItems:!0}},additionalProperties:!1}],messages:{invalid:"Invalid loop. Its body allows only one iteration."}},create(t){const n=t.options[0]&&t.options[0].ignore||[],r=(a=n,e.filter((e=>!a.includes(e)))),i=r.join(","),s=new Map,o=new Set;var a;const l=[];let c=new Set;return{onCodePathStart(){l.push(c),c=new Set},onCodePathEnd(){c=l.pop()},onUnreachableCodePathSegmentStart(e){c.add(e)},onUnreachableCodePathSegmentEnd(e){c.delete(e)},onCodePathSegmentEnd(e){c.delete(e)},onCodePathSegmentStart(e,t){if(c.add(e),function(e){const t=e.parent;if(t)switch(t.type){case"WhileStatement":return e===t.test;case"DoWhileStatement":return e===t.body;case"ForStatement":return e===(t.update||t.test||t.body);case"ForInStatement":case"ForOfStatement":return e===t.left}return!1}(t)){const n=t.parent;s.set(e,n)}},onCodePathSegmentLoop(e,t,n){const r=s.get(t);n!==r&&"ContinueStatement"!==n.type||o.delete(r)},[i](e){(function(e){for(const t of e)if(t.reachable)return!0;return!1})(c)&&o.add(e)},"Program:exit"(){o.forEach((e=>t.report({node:e,messageId:"invalid"})))}}}},uB}(),"no-unsafe-finally":()=>hN(),"no-unsafe-negation":()=>function(){if(mB)return hB;mB=1;const e=Pw();return hB={meta:{type:"problem",docs:{description:"Disallow negating the left operand of relational operators",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-negation"},hasSuggestions:!0,schema:[{type:"object",properties:{enforceForOrderingRelations:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unexpected:"Unexpected negating the left operand of '{{operator}}' operator.",suggestNegatedExpression:"Negate '{{operator}}' expression instead of its left operand. This changes the current behavior.",suggestParenthesisedNegation:"Wrap negation in '()' to make the intention explicit. This preserves the current behavior."}},create(t){const n=t.sourceCode,r=!0===(t.options[0]||{}).enforceForOrderingRelations;return{BinaryExpression(i){const s=i.operator,o=r&&("<"===(a=s)||">"===a||">="===a||"<="===a);var a;(function(e){return"in"===e||"instanceof"===e}(s)||o)&&function(e){return"UnaryExpression"===e.type&&"!"===e.operator}(i.left)&&!e.isParenthesised(n,i.left)&&t.report({node:i,loc:i.left.loc,messageId:"unexpected",data:{operator:s},suggest:[{messageId:"suggestNegatedExpression",data:{operator:s},fix(e){const t=[n.getFirstToken(i.left).range[1],i.range[1]],r=n.text.slice(t[0],t[1]);return e.replaceTextRange(t,`(${r})`)}},{messageId:"suggestParenthesisedNegation",fix(e){return e.replaceText(i.left,`(${n.getText(i.left)})`)}}]})}}}},hB}(),"no-unsafe-optional-chaining":()=>function(){if(yB)return gB;yB=1;const e=new Set(["+","-","/","*","%","**"]),t=new Set(["+=","-=","/=","*=","%=","**="]),n=new Set(["in","instanceof"]);function r(e){return"ObjectPattern"===e.type||"ArrayPattern"===e.type}return gB={meta:{type:"problem",docs:{description:"Disallow use of optional chaining in contexts where the `undefined` value is not allowed",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining"},schema:[{type:"object",properties:{disallowArithmeticOperators:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:null,messages:{unsafeOptionalChain:"Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.",unsafeArithmetic:"Unsafe arithmetic operation on optional chaining. It can result in NaN."}},create(i){const s=(i.options[0]||{}).disallowArithmeticOperators||!1;function o(e){i.report({messageId:"unsafeOptionalChain",node:e})}function a(e){i.report({messageId:"unsafeArithmetic",node:e})}function l(e,t){if(e)switch(e.type){case"LogicalExpression":"||"===e.operator||"??"===e.operator?l(e.right,t):"&&"===e.operator&&(l(e.left,t),l(e.right,t));break;case"SequenceExpression":l(e.expressions[e.expressions.length-1],t);break;case"ConditionalExpression":l(e.consequent,t),l(e.alternate,t);break;case"AwaitExpression":l(e.argument,t);break;case"ChainExpression":t(e)}}function c(e){l(e,o)}function u(e){l(e,a)}return{"AssignmentExpression, AssignmentPattern"(e){r(e.left)&&c(e.right)},"ClassDeclaration, ClassExpression"(e){c(e.superClass)},CallExpression(e){e.optional||c(e.callee)},NewExpression(e){c(e.callee)},VariableDeclarator(e){r(e.id)&&c(e.init)},MemberExpression(e){e.optional||c(e.object)},TaggedTemplateExpression(e){c(e.tag)},ForOfStatement(e){c(e.right)},SpreadElement(e){e.parent&&"ObjectExpression"!==e.parent.type&&c(e.argument)},BinaryExpression(t){n.has(t.operator)&&c(t.right),s&&e.has(t.operator)&&(u(t.right),u(t.left))},WithStatement(e){c(e.object)},UnaryExpression(t){s&&e.has(t.operator)&&u(t.argument)},AssignmentExpression(e){s&&t.has(e.operator)&&u(e.right)}}}},gB}(),"no-unused-expressions":()=>mN(),"no-unused-labels":()=>function(){if(EB)return vB;EB=1;const e=Pw();return vB={meta:{type:"suggestion",docs:{description:"Disallow unused labels",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-unused-labels"},schema:[],fixable:"code",messages:{unused:"'{{name}}:' is defined but never used."}},create(t){const n=t.sourceCode;let r=null;function i(t){if(n.getTokenAfter(t.label,{includeComments:!0})!==n.getTokenBefore(t.body,{includeComments:!0}))return!1;let r=t.parent;for(;"LabeledStatement"===r.type;)r=r.parent;if("Program"===r.type||"BlockStatement"===r.type&&e.isFunction(r.parent)){const{body:n}=t;if("ExpressionStatement"===n.type&&("Literal"===n.expression.type&&"string"==typeof n.expression.value||e.isStaticTemplateLiteral(n.expression)))return!1}return!0}function s(e){if(!e.label)return;const t=e.label.name;let n=r;for(;n;){if(n.label===t){n.used=!0;break}n=n.upper}}return{LabeledStatement:function(e){r={label:e.label.name,used:!1,upper:r}},"LabeledStatement:exit":function(e){r.used||t.report({node:e.label,messageId:"unused",data:e.label,fix:i(e)?t=>t.removeRange([e.range[0],e.body.range[0]]):null}),r=r.upper},BreakStatement:s,ContinueStatement:s}}},vB}(),"no-unused-private-class-members":()=>SB?xB:(SB=1,xB={meta:{type:"problem",docs:{description:"Disallow unused private class members",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-unused-private-class-members"},schema:[],messages:{unusedPrivateClassMember:"'{{classMemberName}}' is defined but never used."}},create(e){const t=[];return{ClassBody(e){const n=new Map;t.unshift(n);for(const t of e.body)"PropertyDefinition"!==t.type&&"MethodDefinition"!==t.type||"PrivateIdentifier"===t.key.type&&n.set(t.key.name,{declaredNode:t,isAccessor:"MethodDefinition"===t.type&&("set"===t.kind||"get"===t.kind)})},PrivateIdentifier(e){const n=t.find((t=>t.has(e.name)));if(!n)return;const r=n.get(e.name);if(r.isUsed)return;if("PropertyDefinition"===e.parent.type||"MethodDefinition"===e.parent.type)return;if(r.isAccessor)return void(r.isUsed=!0);if(function(e){const t=e.parent.parent,n="AssignmentExpression"===t.type;return!(!n&&"ForInStatement"!==t.type&&"ForOfStatement"!==t.type&&"AssignmentPattern"!==t.type||t.left!==e.parent||n&&"="!==t.operator&&"ExpressionStatement"!==t.parent.type)}(e))return;const i=e.parent.parent.type,s=e.parent.parent.parent.type;"UpdateExpression"===i&&"ExpressionStatement"===s||"Property"===i&&"ObjectPattern"===s&&e.parent.parent.value===e.parent||"RestElement"!==i&&"ArrayPattern"!==i&&(r.isUsed=!0)},"ClassBody:exit"(){const n=t.shift();for(const[t,{declaredNode:r,isUsed:i}]of n.entries())i||e.report({node:r,loc:r.key.loc,messageId:"unusedPrivateClassMember",data:{classMemberName:`#${t}`}})}}}}),"no-unused-vars":()=>gN(),"no-use-before-define":()=>yN(),"no-useless-backreference":()=>function(){if(PB)return AB;PB=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),{RegExpParser:i,visitRegExpAST:s}=Tj(),o=new i;function a(e){const t=[];let n=e;do{t.push(n),n=n.parent}while(n);return t}function l(e){return"Assertion"===e.type&&("lookahead"===e.kind||"lookbehind"===e.kind)}function c(e){return l(e)&&e.negate}return AB={meta:{type:"problem",docs:{description:"Disallow useless backreferences in regular expressions",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-backreference"},schema:[],messages:{nested:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' from within that group.",forward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears later in the pattern.",backward:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears before in the same lookbehind.",disjunctive:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in another alternative.",intoNegativeLookaround:"Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in a negative lookaround."}},create(i){const u=i.sourceCode;function p(e,t,n){let r;try{r=o.parsePattern(t,0,t.length,{unicode:n.includes("u"),unicodeSets:n.includes("v")})}catch{return}s(r,{onBackreferenceEnter(t){const n=t.resolved,r=a(t),s=a(n);let o=null;if(r.includes(n))o="nested";else{let e=r.length-1,i=s.length-1;do{e--,i--}while(r[e]===s[i]);const a=i+1,u=s.slice(0,a),p=s.slice(a).find(l),d=p&&"lookbehind"===p.kind;!d&&t.end<=n.start?o="forward":d&&n.end<=t.start?o="backward":"Alternative"===u[u.length-1].type?o="disjunctive":u.some(c)&&(o="intoNegativeLookaround")}o&&i.report({node:e,messageId:o,data:{bref:t.raw,group:n.raw}})}})}return{"Literal[regex]"(e){const{pattern:t,flags:n}=e.regex;p(e,t,n)},Program(i){const s=u.getScope(i),o=new n(s),a={RegExp:{[e]:!0,[t]:!0}};for(const{node:e}of o.iterateGlobalReferences(a)){const[t,n]=e.arguments,i=r(t,s),o=r(n,s);"string"==typeof i&&p(e,i,o||"")}}}}},AB}(),"no-useless-call":()=>_N(),"no-useless-catch":()=>(IB||(IB=1,RB={meta:{type:"suggestion",docs:{description:"Disallow unnecessary `catch` clauses",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-useless-catch"},schema:[],messages:{unnecessaryCatchClause:"Unnecessary catch clause.",unnecessaryCatch:"Unnecessary try/catch wrapper."}},create(e){return{CatchClause(t){t.param&&"Identifier"===t.param.type&&t.body.body.length&&"ThrowStatement"===t.body.body[0].type&&"Identifier"===t.body.body[0].argument.type&&t.body.body[0].argument.name===t.param.name&&(t.parent.finalizer?e.report({node:t,messageId:"unnecessaryCatchClause"}):e.report({node:t.parent,messageId:"unnecessaryCatch"}))}}}}),RB),"no-useless-computed-key":()=>bN(),"no-useless-concat":()=>vN(),"no-useless-constructor":()=>EN(),"no-useless-escape":()=>xN(),"no-useless-rename":()=>function(){if(WB)return KB;WB=1;const e=Pw();return KB={meta:{type:"suggestion",docs:{description:"Disallow renaming import, export, and destructured assignments to the same name",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-useless-rename"},fixable:"code",schema:[{type:"object",properties:{ignoreDestructuring:{type:"boolean",default:!1},ignoreImport:{type:"boolean",default:!1},ignoreExport:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unnecessarilyRenamed:"{{type}} {{name}} unnecessarily renamed."}},create(t){const n=t.sourceCode,r=t.options[0]||{},i=!0===r.ignoreDestructuring,s=!0===r.ignoreImport,o=!0===r.ignoreExport;function a(r,i,s){const o="Identifier"===i.type?i.name:i.value;return t.report({node:r,messageId:"unnecessarilyRenamed",data:{name:o,type:s},fix(t){const i="Property"===r.type?r.value:r.local;return n.getCommentsInside(r).length>n.getCommentsInside(i).length||"AssignmentPattern"===i.type&&e.isParenthesised(n,i.left)?null:t.replaceText(r,n.getText(i))}})}return{ObjectPattern:function(e){if(!i)for(const t of e.properties)"Property"!==t.type||t.shorthand||t.computed||("Identifier"===t.key.type&&t.key.name||"Literal"===t.key.type&&t.key.value)===("AssignmentPattern"===t.value.type?t.value.left.name:t.value.name)&&a(t,t.key,"Destructuring assignment")},ImportSpecifier:function(t){s||t.imported.range[0]!==t.local.range[0]&&e.getModuleExportName(t.imported)===t.local.name&&a(t,t.imported,"Import")},ExportSpecifier:function(t){o||t.local.range[0]!==t.exported.range[0]&&e.getModuleExportName(t.local)===e.getModuleExportName(t.exported)&&a(t,t.local,"Export")}}}},KB}(),"no-useless-return":()=>SN(),"no-var":()=>ON(),"no-void":()=>(GB||(GB=1,XB={meta:{type:"suggestion",docs:{description:"Disallow `void` operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/no-void"},messages:{noVoid:"Expected 'undefined' and instead saw 'void'."},schema:[{type:"object",properties:{allowAsStatement:{type:"boolean",default:!1}},additionalProperties:!1}]},create(e){const t=e.options[0]&&e.options[0].allowAsStatement;return{'UnaryExpression[operator="void"]'(n){t&&n.parent&&"ExpressionStatement"===n.parent.type||e.report({node:n,messageId:"noVoid"})}}}}),XB),"no-warning-comments":()=>TN(),"no-whitespace-before-property":()=>wN(),"no-with":()=>(tM||(tM=1,eM={meta:{type:"suggestion",docs:{description:"Disallow `with` statements",recommended:!0,url:"https://eslint.org/docs/latest/rules/no-with"},schema:[],messages:{unexpectedWith:"Unexpected use of 'with' statement."}},create(e){return{WithStatement(t){e.report({node:t,messageId:"unexpectedWith"})}}}}),eM),"nonblock-statement-body-position":()=>CN(),"object-curly-newline":()=>AN(),"object-curly-spacing":()=>PN(),"object-property-newline":()=>(cM||(cM=1,lM={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce placing object properties on separate lines",recommended:!1,url:"https://eslint.org/docs/latest/rules/object-property-newline"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1},allowMultiplePropertiesPerLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},create(e){const t=e.options[0]&&(e.options[0].allowAllPropertiesOnSameLine||e.options[0].allowMultiplePropertiesPerLine),n=t?"propertiesOnNewlineAll":"propertiesOnNewline",r=e.sourceCode;return{ObjectExpression(i){if(t&&i.properties.length>1){const e=r.getFirstToken(i.properties[0]),t=r.getLastToken(i.properties[i.properties.length-1]);if(e.loc.end.line===t.loc.start.line)return}for(let t=1;tkN(),"one-var":()=>DN(),"one-var-declaration-per-line":()=>(mM||(mM=1,hM={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Require or disallow newlines around variable declarations",recommended:!1,url:"https://eslint.org/docs/latest/rules/one-var-declaration-per-line"},schema:[{enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(e){const t="always"===e.options[0];return{VariableDeclaration:function(n){if(function(e){return"ForStatement"===e||"ForInStatement"===e||"ForOfStatement"===e}(n.parent.type))return;let r;n.declarations.forEach((i=>{r&&r.loc.end.line===i.loc.start.line&&(t||r.init||i.init)&&e.report({node:n,messageId:"expectVarOnNewline",loc:i.loc,fix:e=>e.insertTextBefore(i,"\n")}),r=i}))}}}}),hM),"operator-assignment":()=>function(){if(yM)return gM;yM=1;const e=Pw();function t(e){return["*","&","^","|"].includes(e)}function n(e){return"Identifier"===e.type||"MemberExpression"===e.type&&("Identifier"===e.object.type||"ThisExpression"===e.object.type)&&(!e.computed||"Literal"===e.property.type)}return gM={meta:{type:"suggestion",docs:{description:"Require or disallow assignment operator shorthand where possible",recommended:!1,url:"https://eslint.org/docs/latest/rules/operator-assignment"},schema:[{enum:["always","never"]}],fixable:"code",messages:{replaced:"Assignment (=) can be replaced with operator assignment ({{operator}}).",unexpected:"Unexpected operator assignment ({{operator}}) shorthand."}},create(r){const i=r.sourceCode;function s(e){return i.getFirstTokenBetween(e.left,e.right,(t=>t.value===e.operator))}return{AssignmentExpression:"never"!==r.options[0]?function(o){if("="!==o.operator||"BinaryExpression"!==o.right.type)return;const a=o.left,l=o.right,c=l.operator;if(t(c)||function(e){return["+","-","/","%","<<",">>",">>>","**"].includes(e)}(c)){const u=`${c}=`;e.isSameReference(a,l.left,!0)?r.report({node:o,messageId:"replaced",data:{operator:u},fix(e){if(n(a)&&n(l.left)){const t=s(o),n=s(l),r=i.getText().slice(o.range[0],t.range[0]),a=i.getText().slice(n.range[1],o.right.range[1]);return i.commentsExistBetween(t,n)?null:e.replaceText(o,`${r}${u}${a}`)}return null}}):e.isSameReference(a,l.right,!0)&&t(c)&&r.report({node:o,messageId:"replaced",data:{operator:u}})}}:function(t){"="===t.operator||e.isLogicalAssignmentOperator(t.operator)||r.report({node:t,messageId:"unexpected",data:{operator:t.operator},fix(r){if(n(t.left)){const n=i.getFirstToken(t),o=s(t),a=i.getText().slice(t.range[0],o.range[0]),l=t.operator.slice(0,-1);let c;if(i.commentsExistBetween(n,o))return null;if(e.getPrecedence(t.right)<=e.getPrecedence({type:"BinaryExpression",operator:l})&&!e.isParenthesised(i,t.right))c=`${i.text.slice(o.range[1],t.right.range[0])}(${i.getText(t.right)})`;else{const n=i.getTokenAfter(o,{includeComments:!0});let r="";o.range[1]!==n.range[0]||e.canTokensBeAdjacent({type:"Punctuator",value:l},n)||(r=" "),c=`${r}${i.text.slice(o.range[1],t.range[1])}`}return r.replaceText(t,`${a}= ${a}${l}${c}`)}return null}})}}}},gM}(),"operator-linebreak":()=>RN(),"padded-blocks":()=>IN(),"padding-line-between-statements":()=>LN(),"prefer-arrow-callback":()=>BN(),"prefer-const":()=>MN(),"prefer-destructuring":()=>jN(),"prefer-exponentiation-operator":()=>NN(),"prefer-named-capture-group":()=>FN(),"prefer-numeric-literals":()=>UN(),"prefer-object-has-own":()=>VN(),"prefer-object-spread":()=>KN(),"prefer-promise-reject-errors":()=>WN(),"prefer-reflect":()=>(WM||(WM=1,KM={meta:{type:"suggestion",docs:{description:"Require `Reflect` methods where applicable",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-reflect"},deprecated:!0,replacedBy:[],schema:[{type:"object",properties:{exceptions:{type:"array",items:{enum:["apply","call","delete","defineProperty","getOwnPropertyDescriptor","getPrototypeOf","setPrototypeOf","isExtensible","getOwnPropertyNames","preventExtensions"]},uniqueItems:!0}},additionalProperties:!1}],messages:{preferReflect:"Avoid using {{existing}}, instead use {{substitute}}."}},create(e){const t={apply:"Function.prototype.apply",call:"Function.prototype.call",defineProperty:"Object.defineProperty",getOwnPropertyDescriptor:"Object.getOwnPropertyDescriptor",getPrototypeOf:"Object.getPrototypeOf",setPrototypeOf:"Object.setPrototypeOf",isExtensible:"Object.isExtensible",getOwnPropertyNames:"Object.getOwnPropertyNames",preventExtensions:"Object.preventExtensions"},n={apply:"Reflect.apply",call:"Reflect.apply",defineProperty:"Reflect.defineProperty",getOwnPropertyDescriptor:"Reflect.getOwnPropertyDescriptor",getPrototypeOf:"Reflect.getPrototypeOf",setPrototypeOf:"Reflect.setPrototypeOf",isExtensible:"Reflect.isExtensible",getOwnPropertyNames:"Reflect.getOwnPropertyNames",preventExtensions:"Reflect.preventExtensions"},r=(e.options[0]||{}).exceptions||[];function i(t,n,r){e.report({node:t,messageId:"preferReflect",data:{existing:n,substitute:r}})}return{CallExpression(e){const s=(e.callee.property||{}).name,o="Reflect"===(e.callee.object||{}).name,a=Object.prototype.hasOwnProperty.call(n,s),l=r.includes(s);!a||o||l||i(e,t[s],n[s])},UnaryExpression(e){const t="delete"===e.operator,n="Identifier"===e.argument.type,s=r.includes("delete");!t||n||s||i(e,"the delete keyword","Reflect.deleteProperty")}}}}),KM),"prefer-regex-literals":()=>$N(),"prefer-rest-params":()=>function(){if(zM)return QM;function e(e){const t=e.identifier,n=t.parent;return!("MemberExpression"===n.type&&n.object===t&&!n.computed)}return zM=1,QM={meta:{type:"suggestion",docs:{description:"Require rest parameters instead of `arguments`",recommended:!1,url:"https://eslint.org/docs/latest/rules/prefer-rest-params"},schema:[],messages:{preferRestParams:"Use the rest parameters instead of 'arguments'."}},create(t){const n=t.sourceCode;function r(e){t.report({node:e.identifier,loc:e.identifier.loc,messageId:"preferRestParams"})}function i(t){const i=function(e){const t=e.variables;for(let e=0;eqN(),"prefer-template":()=>QN(),"quote-props":()=>zN(),quotes:()=>XN(),radix:()=>GN(),"require-atomic-updates":()=>function(){if(sj)return ij;function e(t,n=new Map){for(const e of t.references)null!==e.resolved&&n.set(e.identifier,e);for(const r of t.childScopes)"function"!==r.type&&e(r,n);return n}sj=1;class t{constructor(){this.info=new WeakMap}initialize(e){const t=new Set,n=new Set;for(const r of e.prevSegments){const e=this.info.get(r);e&&(e.outdatedReadVariables.forEach(Set.prototype.add,t),e.freshReadVariables.forEach(Set.prototype.add,n))}this.info.set(e,{outdatedReadVariables:t,freshReadVariables:n})}markAsRead(e,t){for(const n of e){const e=this.info.get(n);e&&(e.freshReadVariables.add(t),e.outdatedReadVariables.delete(t))}}makeOutdated(e){for(const t of e){const e=this.info.get(t);e&&(e.freshReadVariables.forEach(Set.prototype.add,e.outdatedReadVariables),e.freshReadVariables.clear())}}isOutdated(e,t){for(const n of e){const e=this.info.get(n);if(e&&e.outdatedReadVariables.has(t))return!0}return!1}}return ij={meta:{type:"problem",docs:{description:"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-atomic-updates"},fixable:null,schema:[{type:"object",properties:{allowProperties:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nonAtomicUpdate:"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",nonAtomicObjectUpdate:"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`."}},create(n){const r=!!n.options[0]&&n.options[0].allowProperties,i=n.sourceCode,s=new Map,o=new t;let a=null;return{onCodePathStart(t,n){const r=i.getScope(n),s="function"===r.type&&(r.block.async||r.block.generator);a={upper:a,codePath:t,referenceMap:s?e(r):null,currentSegments:new Set}},onCodePathEnd(){a=a.upper},onCodePathSegmentStart(e){o.initialize(e),a.currentSegments.add(e)},onUnreachableCodePathSegmentStart(e){a.currentSegments.add(e)},onUnreachableCodePathSegmentEnd(e){a.currentSegments.delete(e)},onCodePathSegmentEnd(e){a.currentSegments.delete(e)},Identifier(e){const{referenceMap:t}=a,n=t&&t.get(e);if(!n)return;const r=n.resolved,i=function(e){if(e.writeExpr)return e.writeExpr;let t=e.identifier;for(;t;){const e=t.parent.type;if("AssignmentExpression"===e&&t.parent.left===t)return t.parent.right;if("MemberExpression"!==e||t.parent.object!==t)break;t=t.parent}return null}(n),l="MemberExpression"===n.identifier.parent.type;if(!n.isRead()||i&&"="===i.parent.operator||o.markAsRead(a.currentSegments,r),i&&i.parent.right===i&&!function(e,t){if(!e)return!1;if(t&&e.defs.some((e=>"Parameter"===e.type)))return!1;const n=e.scope.variableScope;return e.references.every((e=>e.from.variableScope===n))}(r,l)){let e=s.get(i);e||(e=[],s.set(i,e)),e.push(n)}},":expression:exit"(e){if(!a.referenceMap)return;"AwaitExpression"!==e.type&&"YieldExpression"!==e.type||o.makeOutdated(a.currentSegments);const t=s.get(e);if(t){s.delete(e);for(const s of t){const t=s.resolved;o.isOutdated(a.currentSegments,t)&&(e.parent.left===s.identifier?n.report({node:e.parent,messageId:"nonAtomicUpdate",data:{value:t.name}}):r||n.report({node:e.parent,messageId:"nonAtomicObjectUpdate",data:{value:i.getText(e.parent.left),object:t.name}}))}}}}}},ij}(),"require-await":()=>function(){if(aj)return oj;aj=1;const e=Pw();return oj={meta:{type:"suggestion",docs:{description:"Disallow async functions which have no `await` expression",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-await"},schema:[],messages:{missingAwait:"{{name}} has no 'await' expression."}},create(t){const n=t.sourceCode;let r=null;function i(){r={upper:r,hasAwait:!1}}function s(i){var s;i.generator||!i.async||r.hasAwait||e.isEmptyFunction(i)||t.report({node:i,loc:e.getFunctionHeadLoc(i,n),messageId:"missingAwait",data:{name:(s=e.getFunctionNameWithKind(i),s[0].toUpperCase()+s.slice(1))}}),r=r.upper}return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i,"FunctionDeclaration:exit":s,"FunctionExpression:exit":s,"ArrowFunctionExpression:exit":s,AwaitExpression(){r&&(r.hasAwait=!0)},ForOfStatement(e){r&&e.await&&(r.hasAwait=!0)}}}},oj}(),"require-jsdoc":()=>ZN(),"require-unicode-regexp":()=>function(){if(pj)return uj;pj=1;const{CALL:e,CONSTRUCT:t,ReferenceTracker:n,getStringIfConstant:r}=rS(),i=Pw(),{isValidWithUnicodeFlag:s}=zj();return uj={meta:{type:"suggestion",docs:{description:"Enforce the use of `u` or `v` flag on RegExp",recommended:!1,url:"https://eslint.org/docs/latest/rules/require-unicode-regexp"},hasSuggestions:!0,messages:{addUFlag:"Add the 'u' flag.",requireUFlag:"Use the 'u' flag."},schema:[]},create(o){const a=o.sourceCode;return{"Literal[regex]"(e){const t=e.regex.flags||"";t.includes("u")||t.includes("v")||o.report({messageId:"requireUFlag",node:e,suggest:s(o.languageOptions.ecmaVersion,e.regex.pattern)?[{fix(t){return t.insertTextAfter(e,"u")},messageId:"addUFlag"}]:null})},Program(l){const c=a.getScope(l),u=new n(c),p={RegExp:{[e]:!0,[t]:!0}};for(const{node:e}of u.iterateGlobalReferences(p)){const[t,n]=e.arguments;if(t&&"SpreadElement"===t.type)continue;const l=r(t,c),u=r(n,c);n&&("string"!=typeof u||u.includes("u")||u.includes("v"))||o.report({messageId:"requireUFlag",node:e,suggest:"string"==typeof l&&s(o.languageOptions.ecmaVersion,l)?[{fix(t){if(n){if("Literal"===n.type&&"string"==typeof n.value||"TemplateLiteral"===n.type){const e=a.getText(n);return t.replaceText(n,[e.slice(0,e.length-1),e.slice(e.length-1)].join("u"))}return null}const r=a.getLastToken(e,{skip:1});return t.insertTextAfter(r,i.isCommaToken(r)?' "u",':', "u"')},messageId:"addUFlag"}]:null})}}}}},uj}(),"require-yield":()=>(fj||(fj=1,dj={meta:{type:"suggestion",docs:{description:"Require generator functions to contain `yield`",recommended:!0,url:"https://eslint.org/docs/latest/rules/require-yield"},schema:[],messages:{missingYield:"This generator function does not have 'yield'."}},create(e){const t=[];function n(e){e.generator&&t.push(0)}function r(n){n.generator&&0===t.pop()&&n.body.body.length>0&&e.report({node:n,messageId:"missingYield"})}return{FunctionDeclaration:n,"FunctionDeclaration:exit":r,FunctionExpression:n,"FunctionExpression:exit":r,YieldExpression(){t.length>0&&(t[t.length-1]+=1)}}}}),dj),"rest-spread-spacing":()=>(mj||(mj=1,hj={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/rest-spread-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(e){const t=e.sourceCode,n="always"===e.options[0];function r(r){const i=t.getFirstToken(r),s=t.getTokenAfter(i),o=t.isSpaceBetweenTokens(i,s);let a;switch(r.type){case"SpreadElement":a="spread","ObjectExpression"===r.parent.type&&(a+=" property");break;case"RestElement":a="rest","ObjectPattern"===r.parent.type&&(a+=" property");break;case"ExperimentalSpreadProperty":a="spread property";break;case"ExperimentalRestProperty":a="rest property";break;default:return}n&&!o?e.report({node:r,loc:i.loc,messageId:"expectedWhitespace",data:{type:a},fix(e){return e.replaceTextRange([i.range[1],s.range[0]]," ")}}):!n&&o&&e.report({node:r,loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpectedWhitespace",data:{type:a},fix(e){return e.removeRange([i.range[1],s.range[0]])}})}return{SpreadElement:r,RestElement:r,ExperimentalSpreadProperty:r,ExperimentalRestProperty:r}}}),hj),semi:()=>HN(),"semi-spacing":()=>YN(),"semi-style":()=>function(){if(Ej)return vj;Ej=1;const e=Pw(),t=["BreakStatement","ContinueStatement","DebuggerStatement","DoWhileStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ImportDeclaration","ReturnStatement","ThrowStatement","VariableDeclaration","PropertyDefinition"].join(",");return vj={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce location of semicolons",recommended:!1,url:"https://eslint.org/docs/latest/rules/semi-style"},schema:[{enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(n){const r=n.sourceCode,i=n.options[0]||"last";function s(t,i){const s=r.getTokenBefore(t),o=r.getTokenAfter(t),a=!s||e.isTokenOnSameLine(s,t),l=!o||e.isTokenOnSameLine(t,o);("last"===i&&!a||"first"===i&&!l)&&n.report({loc:t.loc,messageId:"expectedSemiColon",data:{pos:"last"===i?"the end of the previous line":"the beginning of the next line"},fix(e){if(s&&o&&r.commentsExistBetween(s,o))return null;const n=s?s.range[1]:t.range[0],a=o?o.range[0]:t.range[1],l="last"===i?";\n":"\n;";return e.replaceTextRange([n,a],l)}})}return{[t](t){if("first"===i&&function(e){const t=e.parent.type;if("IfStatement"===t&&e.parent.consequent===e&&e.parent.alternate)return!0;if("DoWhileStatement"===t)return!0;const n=function(e){const t=e.type;return"BlockStatement"===t||"StaticBlock"===t||"Program"===t||"ClassBody"===t?e.body:"SwitchCase"===t?e.consequent:null}(e.parent);return null!==n&&n[n.length-1]===e}(t))return;const n=r.getLastToken(t);e.isSemicolonToken(n)&&s(n,i)},ForStatement(t){const n=t.init&&r.getTokenAfter(t.init,e.isSemicolonToken),i=t.test&&r.getTokenAfter(t.test,e.isSemicolonToken);n&&s(n,"last"),i&&s(i,"last")}}}},vj}(),"sort-imports":()=>JN(),"sort-keys":()=>IF(),"sort-vars":()=>(iF||(iF=1,rF={meta:{type:"suggestion",docs:{description:"Require variables within the same declaration block to be sorted",recommended:!1,url:"https://eslint.org/docs/latest/rules/sort-vars"},schema:[{type:"object",properties:{ignoreCase:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{sortVars:"Variables within the same declaration block should be sorted alphabetically."}},create(e){const t=(e.options[0]||{}).ignoreCase||!1,n=e.sourceCode;return{VariableDeclaration(r){const i=r.declarations.filter((e=>"Identifier"===e.id.type)),s=t?e=>e.id.name.toLowerCase():e=>e.id.name,o=i.some((e=>null!==e.init&&"Literal"!==e.init.type));let a=!1;i.slice(1).reduce(((t,r)=>{const l=s(t);return s(r)s(e)>s(t)?1:-1)).reduce(((e,t,r)=>{const s=r===i.length-1?"":n.getText().slice(i[r].range[1],i[r+1].range[0]);return e+n.getText(t)+s}),""))}}),a=!0,t):r}),i[0])}}}}),rF),"space-before-blocks":()=>LF(),"space-before-function-paren":()=>BF(),"space-in-parens":()=>MF(),"space-infix-ops":()=>function(){if(dF)return pF;dF=1;const{isEqToken:e}=Pw();return pF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require spacing around infix operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-infix-ops"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},create(t){const n=!!t.options[0]&&!0===t.options[0].int32Hint,r=t.sourceCode;function i(e,t,n){const i=r.getFirstTokenBetween(e,t,(e=>e.value===n)),s=r.getTokenBefore(i),o=r.getTokenAfter(i);return r.isSpaceBetweenTokens(s,i)&&r.isSpaceBetweenTokens(i,o)?null:i}function s(e,n){t.report({node:e,loc:n.loc,messageId:"missingSpace",data:{operator:n.value},fix(e){const t=r.getTokenBefore(n),i=r.getTokenAfter(n);let s="";return n.range[0]-t.range[1]==0&&(s=" "),s+=n.value,i.range[0]-n.range[1]==0&&(s+=" "),e.replaceText(n,s)}})}function o(e){const t=i(e.left.typeAnnotation?e.left.typeAnnotation:e.left,e.right,e.operator||"=");t&&(n&&r.getText(e).endsWith("|0")||s(e,t))}return{AssignmentExpression:o,AssignmentPattern:o,BinaryExpression:o,LogicalExpression:o,ConditionalExpression:function(e){const t=i(e.test,e.consequent,"?"),n=i(e.consequent,e.alternate,":");t&&s(e,t),n&&s(e,n)},VariableDeclarator:function(e){const t=e.id.typeAnnotation?e.id.typeAnnotation:e.id,n=e.init;if(n){const r=i(t,n,"=");r&&s(e,r)}},PropertyDefinition(t){if(!t.value)return;const n=r.getTokenBefore(t.value,e),i=r.getTokenBefore(n),o=r.getTokenAfter(n);r.isSpaceBetweenTokens(i,n)&&r.isSpaceBetweenTokens(n,o)||s(t,n)}}}},pF}(),"space-unary-ops":()=>function(){if(hF)return fF;hF=1;const e=Pw();return fF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators",recommended:!1,url:"https://eslint.org/docs/latest/rules/space-unary-ops"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(t){const n=t.options[0]||{words:!0,nonwords:!1},r=t.sourceCode;function i(e){return n.overrides&&Object.prototype.hasOwnProperty.call(n.overrides,e)}function s(e){return n.overrides[e]}function o(e,n,r,i){r.range[0]===n.range[1]&&t.report({node:e,messageId:"wordOperator",data:{word:i},fix(e){return e.insertTextAfter(n," ")}})}function a(n,r,i,s){e.canTokensBeAdjacent(r,i)&&i.range[0]>r.range[1]&&t.report({node:n,messageId:"unexpectedAfterWord",data:{word:s},fix(e){return e.removeRange([r.range[1],i.range[0]])}})}function l(e,t,r,l){i(l)?s(l)?o(e,t,r,l):a(e,t,r,l):n.words?o(e,t,r,l):a(e,t,r,l)}function c(e,n,r){if(e.prefix){if(function(e){return e&&"UnaryExpression"===e.type&&"!"===e.argument.operator&&e.argument&&"UnaryExpression"===e.argument.type&&"!"===e.argument.operator}(e))return;n.range[1]===r.range[0]&&t.report({node:e,messageId:"operator",data:{operator:n.value},fix(e){return e.insertTextAfter(n," ")}})}else n.range[1]===r.range[0]&&t.report({node:e,messageId:"beforeUnaryExpressions",data:{token:r.value},fix(e){return e.insertTextBefore(r," ")}})}function u(n,r,i){n.prefix?i.range[0]>r.range[1]&&t.report({node:n,messageId:"unexpectedAfter",data:{operator:r.value},fix(t){return e.canTokensBeAdjacent(r,i)?t.removeRange([r.range[1],i.range[0]]):null}}):i.range[0]>r.range[1]&&t.report({node:n,messageId:"unexpectedBefore",data:{operator:i.value},fix(e){return e.removeRange([r.range[1],i.range[0]])}})}function p(e){const t="UpdateExpression"!==e.type||e.prefix?r.getFirstTokens(e,2):r.getLastTokens(e,2),o=t[0],a=t[1];if(("NewExpression"===e.type||e.prefix)&&"Keyword"===o.type)return void l(e,o,a,o.value);const p=e.prefix?t[0].value:t[1].value;i(p)?s(p)?c(e,o,a):u(e,o,a):n.nonwords?c(e,o,a):u(e,o,a)}return{UnaryExpression:p,UpdateExpression:p,NewExpression:p,YieldExpression:function(e){const t=r.getFirstTokens(e,3);e.argument&&!e.delegate&&l(e,t[0],t[1],"yield")},AwaitExpression:function(e){const t=r.getFirstTokens(e,3);l(e,t[0],t[1],"await")}}}},fF}(),"spaced-comment":()=>function(){if(gF)return mF;gF=1;const e=HO(),t=Pw();function n(t){return`(?:${e(t)})`}function r(e){return`${n(e)}+`}function i(e){let n="";return 0===e.length?n+="\\s":(n+="(?:\\s|",1===e.length?n+=r(e[0]):(n+="(?:",n+=e.map(r).join("|"),n+=")"),n+=`(?:$|[${Array.from(t.LINEBREAKS).join("")}]))`),n}function s(e,t){let r="^";return 1===e.length?r+=n(e[0]):(r+="(?:",r+=e.map(n).join("|"),r+=")"),r+="?",r+=i(t),new RegExp(r,"u")}function o(e){const t=`^(${e.map(n).join("|")})?[ \t]+`;return new RegExp(t,"u")}return mF={meta:{deprecated:!0,replacedBy:[],type:"suggestion",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment",recommended:!1,url:"https://eslint.org/docs/latest/rules/spaced-comment"},fixable:"whitespace",schema:[{enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(e){const t=e.sourceCode,r="never"!==e.options[0],a=e.options[1]||{},l=a.block&&a.block.balanced,c=["block","line"].reduce(((e,t)=>{const c=function(e){return e.includes("*")?e:e.concat("*")}(a[t]&&a[t].markers||a.markers||[]),u=a[t]&&a[t].exceptions||a.exceptions||[];return e[t]={beginRegex:r?s(c,u):o(c),endRegex:l&&r?new RegExp(`${i(u)}$`,"u"):new RegExp("[ \t]+$","u"),hasExceptions:u.length>0,captureMarker:new RegExp(`^(${c.map(n).join("|")})`,"u"),markers:new Set(c)},e}),{});function u(t,n,i,s){const o="block"===t.type.toLowerCase()?"/*":"//";e.report({node:t,fix(e){const n=t.range[0];let s=n+2;return r?(i&&(s+=i[0].length),e.insertTextAfterRange([n,s]," ")):(s+=i[0].length,e.replaceTextRange([n,s],o+(i[1]?i[1]:"")))},messageId:n,data:{refChar:s}})}function p(t,n,i){e.report({node:t,fix(e){if(r)return e.insertTextAfterRange([t.range[0],t.range[1]-2]," ");const n=t.range[1]-2,s=n-i[0].length;return e.replaceTextRange([s,n],"")},messageId:n})}function d(e){const t=e.type.toLowerCase(),n=c[t],i="block"===t?"/*":"//";if(0===e.value.length||n.markers.has(e.value))return;const s=n.beginRegex.exec(e.value),o=n.endRegex.exec(e.value);if(r){if(!s){const t=n.captureMarker.exec(e.value),r=t?i+t[0]:i;n.hasExceptions?u(e,"expectedExceptionAfter",t,r):u(e,"expectedSpaceAfter",t,r)}l&&"block"===t&&!o&&p(e,"expectedSpaceBefore")}else s&&(s[1]?u(e,"unexpectedSpaceAfterMarker",s,s[1]):u(e,"unexpectedSpaceAfter",s,i)),l&&"block"===t&&o&&p(e,"unexpectedSpaceBefore",o)}return{Program(){t.getAllComments().filter((e=>"Shebang"!==e.type)).forEach(d)}}}},mF}(),strict:()=>jF(),"switch-colon-spacing":()=>NF(),"symbol-description":()=>FF(),"template-curly-spacing":()=>UF(),"template-tag-spacing":()=>(wF||(wF=1,TF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/template-tag-spacing"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(e){const t="always"!==e.options[0],n=e.sourceCode;return{TaggedTemplateExpression:function(r){const i=n.getTokenBefore(r.quasi),s=n.getFirstToken(r.quasi),o=n.isSpaceBetweenTokens(i,s);t&&o?e.report({node:r,loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpected",fix(e){const t=n.getCommentsBefore(r.quasi);return t.some((e=>"Line"===e.type))?null:e.replaceTextRange([i.range[1],s.range[0]],t.reduce(((e,t)=>e+n.getText(t)),""))}}):t||o||e.report({node:r,loc:{start:r.loc.start,end:s.loc.start},messageId:"missing",fix(e){return e.insertTextAfter(i," ")}})}}}}),TF),"unicode-bom":()=>(AF||(AF=1,CF={meta:{type:"layout",docs:{description:"Require or disallow Unicode byte order mark (BOM)",recommended:!1,url:"https://eslint.org/docs/latest/rules/unicode-bom"},fixable:"whitespace",schema:[{enum:["always","never"]}],messages:{expected:"Expected Unicode BOM (Byte Order Mark).",unexpected:"Unexpected Unicode BOM (Byte Order Mark)."}},create(e){return{Program:function(t){const n=e.sourceCode,r={column:0,line:1},i=e.options[0]||"never";n.hasBOM||"always"!==i?n.hasBOM&&"never"===i&&e.report({node:t,loc:r,messageId:"unexpected",fix(e){return e.removeRange([-1,0])}}):e.report({node:t,loc:r,messageId:"expected",fix(e){return e.insertTextBeforeRange([0,1],"\ufeff")}})}}}}),CF),"use-isnan":()=>function(){if(kF)return PF;kF=1;const e=Pw();function t(t){return Boolean(t)&&(e.isSpecificId(t,"NaN")||e.isSpecificMemberAccess(t,"Number","NaN"))}return PF={meta:{type:"problem",docs:{description:"Require calls to `isNaN()` when checking for `NaN`",recommended:!0,url:"https://eslint.org/docs/latest/rules/use-isnan"},schema:[{type:"object",properties:{enforceForSwitchCase:{type:"boolean",default:!0},enforceForIndexOf:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{comparisonWithNaN:"Use the isNaN function to compare with NaN.",switchNaN:"'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",caseNaN:"'case NaN' can never match. Use Number.isNaN before the switch.",indexOfNaN:"Array prototype method '{{ methodName }}' cannot find NaN."}},create(n){const r=!n.options[0]||n.options[0].enforceForSwitchCase,i=n.options[0]&&n.options[0].enforceForIndexOf,s={BinaryExpression:function(e){/^(?:[<>]|[!=]=)=?$/u.test(e.operator)&&(t(e.left)||t(e.right))&&n.report({node:e,messageId:"comparisonWithNaN"})}};return r&&(s.SwitchStatement=function(e){t(e.discriminant)&&n.report({node:e,messageId:"switchNaN"});for(const r of e.cases)t(r.test)&&n.report({node:r,messageId:"caseNaN"})}),i&&(s.CallExpression=function(r){const i=e.skipChainExpression(r.callee);if("MemberExpression"===i.type){const s=e.getStaticPropertyName(i);"indexOf"!==s&&"lastIndexOf"!==s||1!==r.arguments.length||!t(r.arguments[0])||n.report({node:r,messageId:"indexOfNaN",data:{methodName:s}})}}),s}},PF}(),"valid-jsdoc":()=>EU(),"valid-typeof":()=>xU(),"vars-on-top":()=>SU(),"wrap-iife":()=>OU(),"wrap-regex":()=>(JF||(JF=1,YF={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require parenthesis around regex literals",recommended:!1,url:"https://eslint.org/docs/latest/rules/wrap-regex"},schema:[],fixable:"code",messages:{requireParens:"Wrap the regexp literal in parens to disambiguate the slash."}},create(e){const t=e.sourceCode;return{Literal(n){if("RegularExpression"===t.getFirstToken(n).type){const r=t.getTokenBefore(n),i=t.getTokenAfter(n),{parent:s}=n;"MemberExpression"!==s.type||s.object!==n||r&&"("===r.value&&i&&")"===i.value||e.report({node:n,messageId:"requireParens",fix:e=>e.replaceText(n,`(${t.getText(n)})`)})}}}}}),YF),"yield-star-spacing":()=>(tU||(tU=1,eU={meta:{deprecated:!0,replacedBy:[],type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions",recommended:!1,url:"https://eslint.org/docs/latest/rules/yield-star-spacing"},fixable:"whitespace",schema:[{oneOf:[{enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){const t=e.sourceCode,n=(r=e.options[0])&&"string"!=typeof r?r:{before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}}[r||"after"];var r;function i(r,i,s){if(t.isSpaceBetweenTokens(i,s)!==n[r]){const t="*"===i.value,o=n[r],a=t?i:s;let l="";l=o?"before"===r?"missingBefore":"missingAfter":"before"===r?"unexpectedBefore":"unexpectedAfter",e.report({node:a,messageId:l,fix(e){return o?t?e.insertTextAfter(a," "):e.insertTextBefore(a," "):e.removeRange([i.range[1],s.range[0]])}})}}return{YieldExpression:function(e){if(!e.delegate)return;const n=t.getFirstTokens(e,3),r=n[0],s=n[1],o=n[2];i("before",r,s),i("after",s,o)}}}}),eU),yoda:()=>TU()})),iU}function CU(){if(aU)return oU;aU=1;const e=wU();class t{constructor(){this._rules=Object.create(null)}define(e,t){var n;this._rules[e]="function"==typeof(n=t)?Object.assign({create:n},n):n}get(t){return"string"==typeof this._rules[t]&&this.define(t,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(this._rules[t])),this._rules[t]?this._rules[t]:e.has(t)?e.get(t):null}*[Symbol.iterator](){yield*e;for(const e of Object.keys(this._rules))yield[e,this.get(e)]}}return oU=t}function AU(){if(fU)return dU;function e(e,t,n){return new Array(t-e.length+1).join(n||" ")+e}fU=1;const t=!!{NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING,n=["Rule","Time (ms)","Relative"],r=[function(e,t,n){return e+new Array(t-e.length+1).join(n||" ")},e,e];function i(){if("string"!=typeof{NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING)return 10;if("all"==={NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING.toLowerCase())return Number.POSITIVE_INFINITY;const e=Number.parseInt({NODE_ENV:"production",PUBLIC_PATH:"/designer/"}.TIMING,10);return e>10?e:10}return dU=function(){const e=Object.create(null);return t&&by.on("exit",(()=>{!function(e){let t=0;const s=Object.keys(e).map((n=>{const r=e[n];return t+=r,[n,r]})).sort(((e,t)=>t[1]-e[1])).slice(0,i());s.forEach((e=>{e.push(`${(100*e[1]/t).toFixed(1)}%`),e[1]=e[1].toFixed(3)})),s.unshift(n);const o=[];s.forEach((e=>{const t=e.length;for(let n=0;no[n])&&(o[n]=t)}}));const a=s.map((e=>e.map(((e,t)=>r[t](e,o[t]))).join(" | ")));a.splice(1,0,o.map(((e,t)=>{const n=0!==t&&t!==o.length-1?2:1;return r[t](":",e+n,"-")})).join("|")),console.log(a.join("\n"))}(e)})),{time:function(t,n){return void 0===e[t]&&(e[t]=0),function(...r){let i=by.hrtime();const s=n(...r);return i=by.hrtime(i),e[t]+=1e3*i[0]+i[1]/1e6,s}},enabled:t,getListSize:i}}(),dU}var PU,kU,DU={rules:{"generator-star":["generator-star-spacing"],"global-strict":["strict"],"no-arrow-condition":["no-confusing-arrow","no-constant-condition"],"no-comma-dangle":["comma-dangle"],"no-empty-class":["no-empty-character-class"],"no-empty-label":["no-labels"],"no-extra-strict":["strict"],"no-reserved-keys":["quote-props"],"no-space-before-semi":["semi-spacing"],"no-wrap-func":["no-extra-parens"],"space-after-function-name":["space-before-function-paren"],"space-after-keywords":["keyword-spacing"],"space-before-function-parentheses":["space-before-function-paren"],"space-before-keywords":["keyword-spacing"],"space-in-brackets":["object-curly-spacing","array-bracket-spacing","computed-property-spacing"],"space-return-throw-case":["keyword-spacing"],"space-unary-word-ops":["space-unary-ops"],"spaced-line-comment":["spaced-comment"]}};function RU(){if(kU)return PU;function e(e){let t,n;return e.includes("/")?(t=e.startsWith("@")?e.slice(0,e.lastIndexOf("/")):e.slice(0,e.indexOf("/")),n=e.slice(t.length+1)):(t="@",n=e),{pluginName:t,ruleName:n}}return kU=1,PU={parseRuleId:e,getRuleFromConfig:function(t,n){const{pluginName:r,ruleName:i}=e(t),s=n.plugins&&n.plugins[r];let o=s&&s.rules&&s.rules[i];return o&&"function"==typeof o&&(o={create:o}),o},getRuleOptionsSchema:function(e){if(!e)return null;const t=e.schema||e.meta&&e.meta.schema;return Array.isArray(t)?t.length?{type:"array",items:t,minItems:0,maxItems:t.length}:{type:"array",minItems:0,maxItems:0}:t||null}},PU}var IU,LU,BU,MU,jU,NU,FU,UU,VU={},KU={};function WU(){if(LU)return IU;LU=1,IU=function(t,n){for(var r=[],i=0;i=0&&c>0){for(r=[],s=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),c]:((i=r.pop())=0?l:c;r.length&&(a=[s,o])}return a}return MU=1,BU=e,e.range=n,BU}();jU=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return h(function(e){return e.split("\\\\").join(n).split("\\{").join(r).split("\\}").join(i).split("\\,").join(s).split("\\.").join(o)}(e),!0).map(l)};var n="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",o="\0PERIOD"+Math.random()+"\0";function a(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(n).join("\\").split(r).join("{").split(i).join("}").split(s).join(",").split(o).join(".")}function c(e){if(!e)return[""];var n=[],r=t("{","}",e);if(!r)return e.split(",");var i=r.pre,s=r.body,o=r.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var l=c(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),n.push.apply(n,a),n}function u(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function d(e,t){return e<=t}function f(e,t){return e>=t}function h(n,r){var s=[],o=t("{","}",n);if(!o||/\$$/.test(o.pre))return[n];var l,m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),y=m||g,_=o.body.indexOf(",")>=0;if(!y&&!_)return o.post.match(/,.*\}/)?h(n=o.pre+"{"+o.body+i+o.post):[n];if(y)l=o.body.split(/\.\./);else if(1===(l=c(o.body)).length&&1===(l=h(l[0],!1).map(u)).length)return(E=o.post.length?h(o.post,!1):[""]).map((function(e){return o.pre+l[0]+e}));var b,v=o.pre,E=o.post.length?h(o.post,!1):[""];if(y){var x=a(l[0]),S=a(l[1]),O=Math.max(l[0].length,l[1].length),T=3==l.length?Math.abs(a(l[2])):1,w=d;S0){var D=new Array(k+1).join("0");P=A<0?"-"+D+P.slice(1):D+P}}b.push(P)}}else b=e(l,(function(e){return h(e,!1)}));for(var R=0;Rnull==e||"object"!=typeof e)))throw new TypeError("All arguments must be objects.");return e.reduce(((e,t)=>{this.validate(t);for(const[r,i]of this[n])try{if(r in e||r in t){const n=i.merge.call(this,e[r],t[r]);void 0!==n&&(e[r]=n)}}catch(e){throw new l(r,e)}return e}),{})}validate(e){for(const t of Object.keys(e)){if(!this.hasKey(t))throw new s(t);const r=this[n].get(t);if(Array.isArray(r.requires)&&!r.requires.every((t=>t in e)))throw new a(t,r.requires);try{r.validate.call(r,e[t])}catch(e){throw new l(t,e)}}for(const[t]of this[r])if(!(t in e))throw new o(t)}}return zU.ObjectSchema=c,zU}().ObjectSchema,QU.MergeStrategy=GU().MergeStrategy,QU.ValidationStrategy=tV().ValidationStrategy),QU}function rV(){if(JU)return KU;JU=1;var e=Py,t=function(){if(UU)return FU;UU=1,FU=c,c.Minimatch=u;var e=function(){try{return Py}catch(e){}}()||{sep:"/"};c.sep=e.sep;var t=c.GLOBSTAR=u.GLOBSTAR={},n=$U(),r={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},i="[^/]",s=i+"*?",o="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),a=/\/+/;function l(e,t){t=t||{};var n={};return Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function c(e,t,n){return d(t),n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&new u(t,n).match(e)}function u(t,n){if(!(this instanceof u))return new u(t,n);d(t),n||(n={}),t=t.trim(),n.allowWindowsEscape||"/"===e.sep||(t=t.split(e.sep).join("/")),this.options=n,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.make()}function p(e,t){return t||(t=this instanceof u?this.options:{}),e=void 0===e?this.pattern:e,d(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:n(e)}c.filter=function(e,t){return t=t||{},function(n,r,i){return c(n,e,t)}},c.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return c;var t=c,n=function(n,r,i){return t(n,r,l(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,l(e,r))},n.Minimatch.defaults=function(n){return t.defaults(l(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,l(e,r))},n.defaults=function(n){return t.defaults(l(e,n))},n.makeRe=function(n,r){return t.makeRe(n,l(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,l(e,r))},n.match=function(n,r,i){return t.match(n,r,l(e,i))},n},u.defaults=function(e){return c.defaults(e).Minimatch},u.prototype.debug=function(){},u.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(a)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0},u.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r65536)throw new TypeError("pattern is too long")};u.prototype.parse=function(e,n){d(e);var a=this.options;if("**"===e){if(!a.noglobstar)return t;e="*"}if(""===e)return"";var l,c="",u=!!a.nocase,p=!1,h=[],m=[],g=!1,y=-1,_=-1,b="."===e.charAt(0)?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function E(){if(l){switch(l){case"*":c+=s,u=!0;break;case"?":c+=i,u=!0;break;default:c+="\\"+l}v.debug("clearStateChar %j %j",l,c),l=!1}}for(var x,S=0,O=e.length;S-1;D--){var R=m[D],I=c.slice(0,R.reStart),L=c.slice(R.reStart,R.reEnd-8),B=c.slice(R.reEnd-8,R.reEnd),M=c.slice(R.reEnd);B+=M;var j=I.split("(").length-1,N=M;for(S=0;S=0&&!(i=t[s]);s--);for(s=0;s>> no match, partial?",e,d,n,f),d!==a))}if("string"==typeof u?(c=p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(s===a&&o===l)return!0;if(s===a)return r;if(o===l)return s===a-1&&""===e[s];throw new Error("wtf?")},FU}(),n=Jx(),r=nV();const i={required:!1,merge(){},validate(){}},s=Object.freeze({name:{required:!1,merge(){},validate(e){if("string"!=typeof e)throw new TypeError("Property must be a string.")}},files:i,ignores:i});function o(e,t){if(function(e){if(!Array.isArray(e))throw new TypeError("Expected value to be an array.")}(e),e.some((e=>"string"!=typeof e&&"function"!=typeof e)))throw new TypeError("Expected array to only contain strings and functions.")}const a=Object.freeze({files:{required:!1,merge(){},validate(e){!function(e){if(!Array.isArray(e)||0===e.length)throw new TypeError("Expected value to be a non-empty array.")}(e),e.forEach((e=>{if(Array.isArray(e))o(e);else if("string"!=typeof e&&"function"!=typeof e)throw new TypeError("Items must be a string, a function, or an array of strings and functions.")}))}},ignores:{required:!1,merge(){},validate:o}}),l=t.Minimatch,c=new Map,u=new Map,p=n("@hwc/config-array"),d={dot:!0},f=new Set(["array","function"]),h=new r.ObjectSchema(a);function m(e){if(!e||"object"!=typeof e)return;const t={};"files"in e&&(t.files=e.files),"ignores"in e&&(t.ignores=e.ignores),h.validate(t)}function g(e,t,n={}){let r=c;n.flipNegate&&(r=u);let i=r.get(t);return i||(i=new l(t,Object.assign({},d,n)),r.set(t,i)),i.match(e)}function y(e,t,n){return!!n.startsWith("..")||e.reduce(((e,r)=>e?"string"==typeof r&&r.startsWith("!")?!g(n,r,{flipNegate:!0}):e:"function"==typeof r?r(t):!r.startsWith("!")&&g(n,r)),!1)}function _(t,n,r){const i=e.relative(n,t),s=e=>{if("string"==typeof e)return g(i,e);if("function"==typeof e)return e(t);throw new TypeError(`Unexpected matcher type ${e}.`)};let o=r.files.some((e=>Array.isArray(e)?e.every(s):s(e)));return o&&r.ignores&&(o=!y(r.ignores,t,i)),o}function b(e){if(!e.isNormalized())throw new Error("ConfigArray must be normalized to perform this operation.")}const v={isNormalized:Symbol("isNormalized"),configCache:Symbol("configCache"),schema:Symbol("schema"),finalizeConfig:Symbol("finalizeConfig"),preprocessConfig:Symbol("preprocessConfig")},E=new WeakMap;class x extends Array{constructor(e,{basePath:t="",normalized:n=!1,schema:i,extraConfigTypes:o=[]}={}){super(),this[v.isNormalized]=n,this[v.schema]=new r.ObjectSchema(Object.assign({},i,s)),this.basePath=t,function(e){if(e.length>2)throw new TypeError("configTypes must be an array with at most two items.");for(const t of e)if(!f.has(t))throw new TypeError(`Unexpected config type "${t}" found. Expected one of: "object", "array", "function".`)}(o),this.extraConfigTypes=Object.freeze([...o]),this[v.configCache]=new Map,E.set(this,{explicitMatches:new Map,directoryMatches:new Map,files:void 0,ignores:void 0}),Array.isArray(e)?this.push(...e):this.push(e)}static get[Symbol.species](){return Array}get files(){b(this);const e=E.get(this);if(e.files)return e.files;const t=[];for(const e of this)e.files&&e.files.forEach((e=>{t.push(e)}));return e.files=t,E.set(this,e),t}get ignores(){b(this);const e=E.get(this);if(e.ignores)return e.ignores;const t=[];for(const e of this)e.ignores&&1===Object.keys(e).length&&t.push(...e.ignores);return e.ignores=t,E.set(this,e),t}isNormalized(){return this[v.isNormalized]}async normalize(e={}){if(!this.isNormalized()){const t=await async function(e,t,n){const r=n.includes("function"),i=n.includes("array"),s=await async function*e(n){for(let s of n){if("function"==typeof s){if(!r)throw new TypeError("Unexpected function.");s=s(t),s.then&&(s=await s)}if(Array.isArray(s)){if(!i)throw new TypeError("Unexpected array.");yield*e(s)}else{if("function"==typeof s)throw new TypeError("A config function can only return an object or array.");yield s}}}(e),o=[];for await(const e of s)o.push(e);return o}(this,e,this.extraConfigTypes);this.length=0,this.push(...t.map(this[v.preprocessConfig].bind(this))),this.forEach(m),this[v.isNormalized]=!0,Object.freeze(this)}return this}normalizeSync(e={}){if(!this.isNormalized()){const t=function(e,t,n){const r=n.includes("function"),i=n.includes("array");return[...function*e(n){for(let s of n){if("function"==typeof s){if(!r)throw new TypeError("Unexpected function.");if(s=s(t),s.then)throw new TypeError("Async config functions are not supported.")}if(Array.isArray(s)){if(!i)throw new TypeError("Unexpected array.");yield*e(s)}else{if("function"==typeof s)throw new TypeError("A config function can only return an object or array.");yield s}}}(e)]}(this,e,this.extraConfigTypes);this.length=0,this.push(...t.map(this[v.preprocessConfig].bind(this))),this.forEach(m),this[v.isNormalized]=!0,Object.freeze(this)}return this}[v.finalizeConfig](e){return e}[v.preprocessConfig](e){return e}isExplicitMatch(t){b(this);const n=E.get(this);let r=n.explicitMatches.get(t);if("boolean"==typeof r)return r;const i=e.relative(this.basePath,t);if(y(this.ignores,t,i))return p(`Ignoring ${t}`),n.explicitMatches.set(t,!1),!1;for(const e of this)if(e.files&&_(t,this.basePath,e))return p(`Matching config found for ${t}`),n.explicitMatches.set(t,!0),!0;return!1}getConfig(t){b(this);const n=this[v.configCache];if(n.has(t))return n.get(t);let r;if(this.isDirectoryIgnored(e.dirname(t)))return p(`Ignoring ${t} based on directory pattern`),n.set(t,r),r;const i=e.relative(this.basePath,t);if(y(this.ignores,t,i))return p(`Ignoring ${t} based on file pattern`),n.set(t,r),r;const s=[];let o=!1;const a=/\/\*{1,2}$/;return this.forEach(((n,r)=>{if(!n.files)return n.ignores?function(t,n,r){const i=e.relative(n,t);return Object.keys(r).length>1&&!y(r.ignores,t,i)}(t,this.basePath,n)?(p(`Matching config found for ${t} (based on ignores: ${n.ignores})`),void s.push(r)):void p(`Skipped config found for ${t} (based on ignores: ${n.ignores})`):(p(`Anonymous universal config found for ${t}`),void s.push(r));const i=n.files.filter((e=>a.test(e)));if(i.length){p("Universal files patterns found. Checking carefully.");const e=n.files.filter((e=>!a.test(e)));return e.length&&_(t,this.basePath,{files:e,ignores:n.ignores})?(p(`Matching config found for ${t}`),s.push(r),void(o=!0)):i.length&&_(t,this.basePath,{files:i,ignores:n.ignores})?(p(`Matching config found for ${t}`),void s.push(r)):void 0}return _(t,this.basePath,n)?(p(`Matching config found for ${t}`),s.push(r),void(o=!0)):void 0})),o?(r=n.get(s.toString()),r?(n.set(t,r),r):(r=s.reduce(((e,t)=>this[v.schema].merge(e,this[t])),{},this),r=this[v.finalizeConfig](r),n.set(t,r),n.set(s.toString(),r),r)):(p(`No matching configs found for ${t}`),n.set(t,r),r)}isIgnored(e){return this.isFileIgnored(e)}isFileIgnored(e){return void 0===this.getConfig(e)}isDirectoryIgnored(t){b(this);const n=e.relative(this.basePath,t).replace(/\\/g,"/");if(n.startsWith(".."))return!0;const r=E.get(this).directoryMatches;if(r.has(n))return r.get(n);const i=n.split("/");let s="",o=!1;do{s+=i.shift()+"/",o=y(this.ignores,e.join(this.basePath,s),s),r.set(s,o)}while(!o&&i.length);return r.set(n,o),o}}return KU.ConfigArray=x,KU.ConfigArraySymbol=v,KU}var iV,sV,oV={},aV={},lV={};function cV(){if(iV)return lV;iV=1;lV.VOID=-1;lV.PRIMITIVE=0;lV.ARRAY=1;lV.OBJECT=2;lV.DATE=3;lV.REGEXP=4;lV.MAP=5;lV.SET=6;lV.ERROR=7;return lV.BIGINT=8,lV}function uV(){if(sV)return aV;sV=1;const{VOID:e,PRIMITIVE:t,ARRAY:n,OBJECT:r,DATE:i,REGEXP:s,MAP:o,SET:a,ERROR:l,BIGINT:c}=cV(),u="object"==typeof self?self:globalThis;return aV.deserialize=p=>((p,d)=>{const f=(e,t)=>(p.set(t,e),e),h=m=>{if(p.has(m))return p.get(m);const[g,y]=d[m];switch(g){case t:case e:return f(y,m);case n:{const e=f([],m);for(const t of y)e.push(h(t));return e}case r:{const e=f({},m);for(const[t,n]of y)e[h(t)]=h(n);return e}case i:return f(new Date(y),m);case s:{const{source:e,flags:t}=y;return f(new RegExp(e,t),m)}case o:{const e=f(new Map,m);for(const[t,n]of y)e.set(h(t),h(n));return e}case a:{const e=f(new Set,m);for(const t of y)e.add(h(t));return e}case l:{const{name:e,message:t}=y;return f(new u[e](t),m)}case c:return f(BigInt(y),m);case"BigInt":return f(Object(BigInt(y)),m)}return f(new u[g](y),m)};return h})(new Map,p)(0),aV}var pV,dV,fV,hV,mV,gV,yV={};function _V(){if(pV)return yV;pV=1;const{VOID:e,PRIMITIVE:t,ARRAY:n,OBJECT:r,DATE:i,REGEXP:s,MAP:o,SET:a,ERROR:l,BIGINT:c}=cV(),u="",{toString:p}={},{keys:d}=Object,f=e=>{const c=typeof e;if("object"!==c||!e)return[t,c];const d=p.call(e).slice(8,-1);switch(d){case"Array":return[n,u];case"Object":return[r,u];case"Date":return[i,u];case"RegExp":return[s,u];case"Map":return[o,u];case"Set":return[a,u]}return d.includes("Array")?[n,d]:d.includes("Error")?[l,d]:[r,d]},h=([e,n])=>e===t&&("function"===n||"symbol"===n);return yV.serialize=(l,{json:u,lossy:p}={})=>{const m=[];return((l,u,p,m)=>{const g=(e,t)=>{const n=m.push(e)-1;return p.set(t,n),n},y=m=>{if(p.has(m))return p.get(m);let[_,b]=f(m);switch(_){case t:{let t=m;switch(b){case"bigint":_=c,t=m.toString();break;case"function":case"symbol":if(l)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return g([e],m)}return g([_,t],m)}case n:{if(b)return g([b,[...m]],m);const e=[],t=g([_,e],m);for(const t of m)e.push(y(t));return t}case r:{if(b)switch(b){case"BigInt":return g([b,m.toString()],m);case"Boolean":case"Number":case"String":return g([b,m.valueOf()],m)}if(u&&"toJSON"in m)return y(m.toJSON());const e=[],t=g([_,e],m);for(const t of d(m))!l&&h(f(m[t]))||e.push([y(t),y(m[t])]);return t}case i:return g([_,m.toISOString()],m);case s:{const{source:e,flags:t}=m;return g([_,{source:e,flags:t}],m)}case o:{const e=[],t=g([_,e],m);for(const[t,n]of m)(l||!h(f(t))&&!h(f(n)))&&e.push([y(t),y(n)]);return t}case a:{const e=[],t=g([_,e],m);for(const t of m)!l&&h(f(t))||e.push(y(t));return t}}const{message:v}=m;return g([_,{name:b,message:v}],m)};return y})(!(u||p),!!u,new Map,m)(l),m},yV}function bV(){return dV||(dV=1,function(e){const{deserialize:t}=uV(),{serialize:n}=_V();Object.defineProperty(e,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,r)=>r&&("json"in r||"lossy"in r)?t(n(e,r)):structuredClone(e):(e,r)=>t(n(e,r)),e.deserialize=t,e.serialize=n}(oV)),oV}function vV(){if(hV)return fV;return hV=1,fV={normalizeSeverityToString:function(e){if([2,"2","error"].includes(e))return"error";if([1,"1","warn"].includes(e))return"warn";if([0,"0","off"].includes(e))return"off";throw new Error(`Invalid severity value: ${e}`)},normalizeSeverityToNumber:function(e){if([2,"2","error"].includes(e))return 2;if([1,"1","warn"].includes(e))return 1;if([0,"0","off"].includes(e))return 0;throw new Error(`Invalid severity value: ${e}`)}}}function EV(){if(gV)return mV;gV=1;const e=bV().default,{normalizeSeverityToNumber:t}=vV(),n=new Map([[0,0],["off",0],[1,1],["warn",1],[2,2],["error",2]]),r=new Set([!0,"true","writable","writeable",!1,"false","readonly","readable",null,"off"]);function i(e){return"object"==typeof e&&null!==e}function s(e){return i(e)&&!Array.isArray(e)}function o(e,t,n=new Map){let r=n.get(e);if(r){const e=r.get(t);if(e)return e}else r=new Map,n.set(e,r);const i={...e,...t};delete i.__proto__,r.set(t,i);for(const r of Object.keys(t)){if("__proto__"===r||!Object.prototype.propertyIsEnumerable.call(e,r))continue;const a=e[r],l=t[r];s(a)&&s(l)?i[r]=o(a,l,n):void 0===l&&(i[r]=a)}return i}function a(t){const r=Array.isArray(t)?t.slice(0):[t];return r[0]=n.get(r[0]),e(r)}class l extends Error{constructor(e,t){super(`Key "${e}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-options",this.messageData={ruleId:e,value:t}}}function c(e,t){if("string"!=typeof t&&"number"!=typeof t&&!Array.isArray(t))throw new l(e,t)}class u extends Error{constructor(e,t){super(`Key "${e}": Expected severity of "off", 0, "warn", 1, "error", or 2.`),this.messageTemplate="invalid-rule-severity",this.messageData={ruleId:e,value:t}}}function p(e,t){if(void 0===n.get(t))throw new u(e,t)}function d(e){if(!i(e))throw new TypeError("Expected an object.")}class f extends Error{constructor(e){super("This appears to be in eslintrc format rather than flat config format."),this.messageTemplate="eslintrc-incompat",this.messageData={key:e}}}class h extends Error{constructor(e){super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."),this.messageTemplate="eslintrc-plugins",this.messageData={plugins:e}}}const m=new Set(["error","warn","off",2,1,0]),g={merge(e,n){const r=void 0===n?e:n;return"boolean"==typeof r?r?"warn":"off":t(r)},validate(e){if(!m.has(e)&&"boolean"!=typeof e)throw new TypeError('Expected one of: "error", "warn", "off", 0, 1, 2, or a boolean.')}},y={merge(e={},t={}){return o(e,t)},validate:"object"},_={merge:"assign",validate(e){d(e);for(const t of Object.keys(e))if("__proto__"!==t){if(t!==t.trim())throw new TypeError(`Global "${t}" has leading or trailing whitespace.`);if(!r.has(e[t]))throw new TypeError(`Key "${t}": Expected "readonly", "writable", or "off".`)}}},b={merge:"replace",validate(e){if(!e||"object"!=typeof e||"function"!=typeof e.parse&&"function"!=typeof e.parseForESLint)throw new TypeError("Expected object with parse() or parseForESLint() method.")}},v={merge(e={},t={}){const n=new Set([...Object.keys(e),...Object.keys(t)]),r={};for(const i of n)if("__proto__"!==i){if(i in e&&i in t&&e[i]!==t[i])throw new TypeError(`Cannot redefine plugin "${i}".`);r[i]=t[i]||e[i]}return r},validate(e){if(null===e||"object"!=typeof e)throw new TypeError("Expected an object.");if(Array.isArray(e))throw new h(e);for(const t of Object.keys(e))if("__proto__"!==t&&(null===e[t]||"object"!=typeof e[t]))throw new TypeError(`Key "${t}": Expected an object.`)}},E={merge:"replace",validate(e){if("string"==typeof e)!function(e){if(!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(e))throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${e}".`)}(e);else{if(!e||"object"!=typeof e)throw new TypeError("Expected an object or a string.");if("function"!=typeof e.preprocess||"function"!=typeof e.postprocess)throw new TypeError("Object must have a preprocess() and a postprocess() method.")}}},x={merge(e={},t={}){const n={...e,...t};for(const r of Object.keys(n))try{if("__proto__"===r){delete n.__proto__;continue}if(n[r]=a(n[r]),!(r in e)||!(r in t))continue;const i=a(e[r]),s=a(t[r]);if(1===s.length){n[r]=[s[0],...i.slice(1)];continue}}catch(e){throw new Error(`Key "${r}": ${e.message}`,{cause:e})}return n},validate(e){d(e);for(const t of Object.keys(e)){if("__proto__"===t)continue;const n=e[t];c(t,n),Array.isArray(n)?p(t,n[0]):p(t,n)}}},S={merge:"replace",validate(e){if("number"!=typeof e&&"latest"!==e)throw new TypeError('Expected a number or "latest".')}},O={merge:"replace",validate(e){if("string"!=typeof e||!/^(?:script|module|commonjs)$/u.test(e))throw new TypeError('Expected "script", "module", or "commonjs".')}};function T(e){return{merge:"replace",validate(){throw new f(e)}}}const w={...Object.fromEntries(["env","extends","globals","ignorePatterns","noInlineConfig","overrides","parser","parserOptions","reportUnusedDisableDirectives","root"].map((e=>[e,T(e)]))),settings:y,linterOptions:{schema:{noInlineConfig:{merge:"replace",validate:"boolean"},reportUnusedDisableDirectives:g}},languageOptions:{schema:{ecmaVersion:S,sourceType:O,globals:_,parser:b,parserOptions:y}},processor:E,plugins:v,rules:x};return mV={flatConfigSchema:w,assertIsRuleSeverity:p,assertIsRuleOptions:c}}var xV,SV,OV,TV={},wV={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string"},$schema:{type:"string"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};function CV(){if(SV)return xV;SV=1;const e=kx(),t=wV;return xV=(n={})=>{const r=new e({meta:!1,useDefaults:!0,validateSchema:!1,missingRefs:"ignore",verbose:!0,schemaId:"auto",...n});return r.addMetaSchema(t),r._opts.defaultMeta=t.id,r}}function AV(){if(OV)return TV;OV=1;const e=CV()(),{parseRuleId:t,getRuleFromConfig:n,getRuleOptionsSchema:r}=RU(),i=DU;function s({pluginName:e,ruleName:t},n){const r=`Key "rules": Key "${"@"===e?t:`${e}/${t}`}"`;let s=`${r}: Could not find plugin "${e}".`;if(n.plugins&&n.plugins[e]){const o=i.rules[t];if("@"===e&&o)s=`${r}: Rule "${t}" was removed and replaced by "${o}".`;else{s=`${r}: Could not find "${t}" in plugin "${e}".`;for(const[e,r]of Object.entries(n.plugins))if(r.rules&&r.rules[t]){s+=` Did you mean "${e}/${t}"?`;break}}}throw new TypeError(s)}return TV.RuleValidator=class{constructor(){this.validators=new WeakMap}validate(i){if(i.rules)for(const[o,a]of Object.entries(i.rules)){if("__proto__"===o)continue;if(0===a[0])continue;const l=n(o,i);if(l||s(t(o),i),!this.validators.has(l)){const t=r(l);t&&this.validators.set(l,e.compile(t))}const c=this.validators.get(l);if(c&&(c(a.slice(1)),c.errors))throw new Error(`Key "rules": Key "${o}": ${c.errors.map((e=>`\tValue ${JSON.stringify(e.data)} ${e.message}.\n`)).join("")}`)}}},TV}var PV,kV,DV,RV,IV,LV,BV,MV,jV,NV,FV={};function UV(){if(MV)return VU;MV=1;const{ConfigArray:e,ConfigArraySymbol:t}=rV(),{flatConfigSchema:n}=EV(),{RuleValidator:r}=AV(),{defaultConfig:i}=function(){if(PV)return FV;PV=1;const e=wU();return FV.defaultConfig=[{plugins:{"@":{rules:new Proxy({},{get(t,n){return e.get(n)},has(t,n){return e.has(n)}})}},languageOptions:{sourceType:"module",ecmaVersion:"latest",parser:bv(),parserOptions:{}}},{ignores:["**/node_modules/",".git/"]},{files:["**/*.js","**/*.mjs"]},{files:["**/*.cjs"],languageOptions:{sourceType:"commonjs",ecmaVersion:"latest"}}],FV}(),s=BV?LV:(BV=1,LV={configs:{all:DV?kV:(DV=1,kV=Object.freeze({rules:{"accessor-pairs":"error","array-callback-return":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"error","capitalized-comments":"error","class-methods-use-this":"error",complexity:"error","consistent-return":"error","consistent-this":"error","constructor-super":"error",curly:"error","default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","for-direction":"error","func-name-matching":"error","func-names":"error","func-style":"error","getter-return":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":"error","id-match":"error","init-declarations":"error","line-comment-position":"error","logical-assignment-operators":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"error","max-lines-per-function":"error","max-nested-callbacks":"error","max-params":"error","max-statements":"error","multiline-comment-style":"error","new-cap":"error","no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-console":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-continue":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-div-regex":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-else-return":"error","no-empty":"error","no-empty-character-class":"error","no-empty-function":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-import-assign":"error","no-inline-comments":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-invalid-this":"error","no-irregular-whitespace":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-loss-of-precision":"error","no-magic-numbers":"error","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-symbol":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-promise-executor-return":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-imports":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-setter-return":"error","no-shadow":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-ternary":"error","no-this-before-super":"error","no-throw-literal":"error","no-undef":"error","no-undef-init":"error","no-undefined":"error","no-underscore-dangle":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-expressions":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-use-before-define":"error","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"error","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"error","prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-atomic-updates":"error","require-await":"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"error","sort-keys":"error","sort-vars":"error",strict:"error","symbol-description":"error","unicode-bom":"error","use-isnan":"error","valid-typeof":"error","vars-on-top":"error",yoda:"error"}})),recommended:IV?RV:(IV=1,RV=Object.freeze({rules:Object.freeze({"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-extra-semi":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-mixed-spaces-and-tabs":"error","no-new-symbol":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"})}))}}),o=new r;function a(e){let t=e.name;if(!t){if(!e.meta)return null;if(t=e.meta.name,!t)return null}let n=e.version;return n||(n=e.meta&&e.meta.version),n?`${t}@${n}`:t}const l=Symbol("originalBaseConfig");class c extends e{constructor(e,{basePath:t,shouldIgnore:r=!0,baseConfig:s=i}={}){super(e,{basePath:t,schema:n}),s[Symbol.iterator]?this.unshift(...s):this.unshift(s),this[l]=s,Object.defineProperty(this,l,{writable:!1}),this.shouldIgnore=r,Object.defineProperty(this,"shouldIgnore",{writable:!1})}[t.preprocessConfig](e){if("eslint:recommended"===e)return void 0!==by&&by.emitWarning&&by.emitWarning("The 'eslint:recommended' string configuration is deprecated and will be replaced by the @eslint/js package's 'recommended' config."),s.configs.recommended;if("eslint:all"===e)return void 0!==by&&by.emitWarning&&by.emitWarning("The 'eslint:all' string configuration is deprecated and will be replaced by the @eslint/js package's 'all' config."),s.configs.all;if(!this.shouldIgnore&&!this[l].includes(e)&&e.ignores&&!e.files){const{ignores:t,...n}=e;return n}return e}[t.finalizeConfig](e){const{plugins:t,languageOptions:n,processor:r}=e;let i,s,l=!1,c=!1;if(n&&n.parser){const{parser:e}=n;"object"==typeof e?(i=a(e),i||(l=!0)):l=!0}if(r)if("string"==typeof r){const{pluginName:n,objectName:i}=function(e){const t=e.split("/");return{objectName:t.pop(),pluginName:t.join("/")}}(r);if(s=r,!(t&&t[n]&&t[n].processors&&t[n].processors[i]))throw new TypeError(`Key "processor": Could not find "${i}" in plugin "${n}".`);e.processor=t[n].processors[i]}else"object"==typeof r?(s=a(r),s||(c=!0)):c=!0;return o.validate(e),Object.defineProperty(e,"toJSON",{value:function(){if(l)throw new Error("Could not serialize parser object (missing 'meta' object).");if(c)throw new Error("Could not serialize processor object (missing 'meta' object).");return{...this,plugins:Object.entries(t).map((([e,t])=>{const n=a(t);return n?`${e}:${n}`:e})),languageOptions:{...n,parser:i},processor:s}}}),e}}return VU.FlatConfigArray=c,VU}function VV(){if(NV)return jV;NV=1;const e=Py,t=sv(),n=lv(),r=bv(),i=xv(),s=Cv,o=Av(),{directivesPattern:a}=Pv(),{Legacy:{ConfigOps:l,ConfigValidator:c,environments:u}}=Mx(),p=eS(),{SourceCode:d}=EO?vO:(EO=1,vO={SourceCode:qO()}),f=ZO(),h=YO(),m=$O(),g=kT(),y=RT(),_=CU(),b=cU?lU:(cU=1,lU=()=>{const e=Object.create(null);return Object.freeze({on(t,n){t in e?e[t].push(n):e[t]=[n]},emit(t,...n){t in e&&e[t].forEach((e=>e(...n)))},eventNames(){return Object.keys(e)}})}),v=function(){if(pU)return uU;pU=1;const e=Jx()("eslint:source-code-fixer");function t(e,t){return e.fix.range[0]-t.fix.range[0]||e.fix.range[1]-t.fix.range[1]}function n(e,t){return e.line-t.line||e.column-t.column}function r(){Object.freeze(this)}return r.applyFixes=function(r,i,s){if(e("Applying fixes"),!1===s)return e("shouldFix parameter was false, not attempting fixes"),{fixed:!1,messages:i,output:r};const o=[],a=[],l=r.startsWith("\ufeff")?"\ufeff":"",c=l?r.slice(1):r;let u=Number.NEGATIVE_INFINITY,p=l;function d(e){const t=e.fix,n=t.range[0],r=t.range[1];return u>=n||n>r?(o.push(e),!1):((n<0&&r>=0||0===n&&t.text.startsWith("\ufeff"))&&(p=""),p+=c.slice(Math.max(0,u),Math.max(0,n)),p+=t.text,u=r,!0)}if(i.forEach((e=>{Object.prototype.hasOwnProperty.call(e,"fix")?a.push(e):o.push(e)})),a.length){e("Found fixes to apply");let r=!1;for(const e of a.sort(t))"function"!=typeof s||s(e)?(d(e),r=!0):o.push(e);return p+=c.slice(Math.max(0,u)),{fixed:r,messages:o.sort(n),output:p}}return e("No fixes to apply"),{fixed:!1,messages:i,output:l+c}},uU=r}(),E=AU(),x=DU,{getRuleFromConfig:S}=RU(),{FlatConfigArray:O}=UV(),{RuleValidator:T}=AV(),{assertIsRuleOptions:w,assertIsRuleSeverity:C}=EV(),{normalizeSeverityToString:A}=vV(),P=Jx()("eslint:linter"),k=new m,D={start:{line:1,column:0},end:{line:1,column:1}},R=Symbol.for("eslint.RuleTester.parser");function I(e){return!(e!==r&&e[R]!==r)}function L(e){return Object.prototype.hasOwnProperty.call(x.rules,e)?`Rule '${e}' was removed and replaced by: ${x.rules[e].join(", ")}`:`Definition for rule '${e}' was not found.`}function B(e){const{ruleId:t=null,loc:n=D,message:r=L(e.ruleId),severity:i=2}=e;return{ruleId:t,message:r,line:n.start.line,column:n.start.column+1,endLine:n.end.line,endColumn:n.end.column+1,severity:i,nodeType:null}}function M(e){const{commentToken:t,type:n,value:r,justification:i,ruleMapper:s}=e,o=Object.keys(k.parseListConfig(r)),a=o.length?o:[null],l={directives:[],directiveProblems:[]},c={commentToken:t,ruleIds:o};for(const e of a)null===e||s(e)?"disable-next-line"===n?l.directives.push({parentComment:c,type:n,line:t.loc.end.line,column:t.loc.end.column+1,ruleId:e,justification:i}):l.directives.push({parentComment:c,type:n,line:t.loc.start.line,column:t.loc.start.column+1,ruleId:e,justification:i}):l.directiveProblems.push(B({ruleId:e,loc:t.loc}));return l}function j(e){switch(e){case 3:return 3;case 5:case void 0:return 5;default:if("number"==typeof e)return e>=2015?e:e+2009}return r.latestEcmaVersion+2009}const N=/\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;function F(t){const n=t.split(e.sep),r=n.lastIndexOf("");return-1===r?t:n.slice(r).join(e.sep)}function U(e,t){const n=t.linterOptions||t,r=!0===n.noInlineConfig,i=!1===e.allowInlineConfig,s=t.configNameOfNoInlineConfig?` (${t.configNameOfNoInlineConfig})`:"";let o=e.reportUnusedDisableDirectives;return"boolean"==typeof o&&(o=o?"error":"off"),"string"!=typeof o&&(o="boolean"==typeof n.reportUnusedDisableDirectives?n.reportUnusedDisableDirectives?"warn":"off":void 0===n.reportUnusedDisableDirectives?"off":A(n.reportUnusedDisableDirectives)),{filename:F(e.filename||""),allowInlineConfig:!i,warnInlineConfig:r&&!i?`your config${s}`:null,reportUnusedDisableDirectives:o,disableFixes:Boolean(e.disableFixes)}}function V(e,t,n){const s=n.filter((e=>e.parserOptions)).reduce(((e,t)=>i(e,t.parserOptions)),{}),o=i(s,t||{});return"module"===o.sourceType&&(o.ecmaFeatures=Object.assign({},o.ecmaFeatures,{globalReturn:!1})),o.ecmaVersion=function(e,t){return I(e)&&"latest"===t?r.latestEcmaVersion:t>=2015?t-2009:t}(e,o.ecmaVersion),o}function K(e,r,i){const s=r.parserOptions.ecmaFeatures||{},o=r.ecmaVersion||5;return t.analyze(e,{ignoreEval:!0,nodejsScope:s.globalReturn,impliedStrict:s.impliedStrict,ecmaVersion:"number"==typeof o?o:6,sourceType:r.sourceType||"script",childVisitorKeys:i||n.KEYS,fallback:p.getKeys})}function W(e,t,r){const i=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(e).replace(o.shebangPattern,((e,t)=>`//${t}`)),{ecmaVersion:s,sourceType:a,parser:l}=t,c=Object.assign({ecmaVersion:s,sourceType:a},t.parserOptions,{loc:!0,range:!0,raw:!0,tokens:!0,comment:!0,eslintVisitorKeys:!0,eslintScopeManager:!0,filePath:r});try{P("Parsing:",r);const s="function"==typeof l.parseForESLint?l.parseForESLint(i,c):{ast:l.parse(i,c)};P("Parsing successful:",r);const o=s.ast,a=s.services||{},u=s.visitorKeys||n.KEYS;P("Scope analysis:",r);const p=s.scopeManager||K(o,t,u);return P("Scope analysis successful:",r),{success:!0,sourceCode:new d({text:e,ast:o,parserServices:a,scopeManager:p,visitorKeys:u})}}catch(e){const t=`Parsing error: ${e.message.replace(/^line \d+:/iu,"").trim()}`;return P("%s\n%s",t,e.stack),{success:!1,error:{ruleId:null,fatal:!0,severity:2,message:t,line:e.lineNumber,column:e.column,nodeType:null}}}}function $(e,t){try{return e.create(t)}catch(e){throw e.message=`Error while loading rule '${t.id}': ${e.message}`,e}}const q={getSource:"getText",getSourceLines:"getLines",getAllComments:"getAllComments",getNodeByRangeIndex:"getNodeByRangeIndex",getComments:"getComments",getCommentsBefore:"getCommentsBefore",getCommentsAfter:"getCommentsAfter",getCommentsInside:"getCommentsInside",getJSDocComment:"getJSDocComment",getFirstToken:"getFirstToken",getFirstTokens:"getFirstTokens",getLastToken:"getLastToken",getLastTokens:"getLastTokens",getTokenAfter:"getTokenAfter",getTokenBefore:"getTokenBefore",getTokenByRangeStart:"getTokenByRangeStart",getTokens:"getTokens",getTokensAfter:"getTokensAfter",getTokensBefore:"getTokensBefore",getTokensBetween:"getTokensBetween"},Q=Object.freeze(Object.keys(q).reduce(((e,t)=>Object.assign(e,{[t](...e){return this.sourceCode[q[t]](...e)}})),{}));function z(e,t,n,r,i,s,o,a,c,u){const d=b(),h=[];let m=e.ast;p.traverse(e.ast,{enter(e,t){e.parent=t,h.push({isEntering:!0,node:e})},leave(e){h.push({isEntering:!1,node:e})},visitorKeys:e.visitorKeys});const _=Object.freeze(Object.assign(Object.create(Q),{getAncestors:()=>e.getAncestors(m),getDeclaredVariables:t=>e.getDeclaredVariables(t),getCwd:()=>c,cwd:c,getFilename:()=>o,filename:o,getPhysicalFilename:()=>u||o,physicalFilename:u||o,getScope:()=>e.getScope(m),getSourceCode:()=>e,sourceCode:e,markVariableAsUsed:t=>e.markVariableAsUsed(t,m),parserOptions:{...i.parserOptions},parserPath:r,languageOptions:i,parserServices:e.parserServices,settings:s})),v=[];Object.keys(t).forEach((r=>{const i=l.getRuleSeverity(t[r]);if(0===i)return;const s=n(r);if(!s)return void v.push(B({ruleId:r}));const o=s.meta&&s.meta.messages;let c=null;const u=Object.freeze(Object.assign(Object.create(_),{id:r,options:(p=t[r],Array.isArray(p)?p.slice(1):[]),report(...t){null===c&&(c=y({ruleId:r,severity:i,sourceCode:e,messageIds:o,disableFixes:a}));const n=c(...t);if(n.fix&&(!s.meta||!s.meta.fixable))throw new Error('Fixable rules must set the `meta.fixable` property to "code" or "whitespace".');if(n.suggestions&&(!s.meta||!0!==s.meta.hasSuggestions)){if(s.meta&&s.meta.docs&&void 0!==s.meta.docs.suggestion)throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint.");throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.")}v.push(n)}}));var p;const f=E.enabled?E.time(r,$)(s,u):$(s,u);if(null==f)throw new Error(`The create() function for rule '${r}' did not return an object.`);Object.keys(f).forEach((e=>{const t=E.enabled?E.time(r,f[e]):f[e];d.on(e,function(e){return function(...t){try{return e(...t)}catch(e){throw e.ruleId=r,e}}}(t))}))}));const x="Program"===h[0].node.type?new f(new g(d,{visitorKeys:e.visitorKeys,fallback:p.getKeys})):new g(d,{visitorKeys:e.visitorKeys,fallback:p.getKeys});return h.forEach((e=>{m=e.node;try{e.isEntering?x.enterNode(m):x.leaveNode(m)}catch(e){throw e.currentNode=m,e}})),v}function X(e){if("object"==typeof e){const{hasBOM:t,text:n}=e;return(t?"\ufeff":"")+n}return String(e)}function G(e,t){return e.lastConfigArray&&e.lastConfigArray.pluginRules.get(t)||e.ruleMap.get(t)}function Z(e){return e||("object"==typeof by?by.cwd():void 0)}const H=new WeakMap;function Y(e){const{configType:t}=H.get(e);if("flat"===t)throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.")}return jV={Linter:class{constructor({cwd:e,configType:t}={}){H.set(this,{cwd:Z(e),lastConfigArray:null,lastSourceCode:null,lastSuppressedMessages:[],configType:t,parserMap:new Map([["espree",r]]),ruleMap:new _}),this.version=s.version}static get version(){return s.version}_verifyWithoutProcessors(e,n,i){const s=H.get(this),o=n||{},p=U(i,o);let f;"string"==typeof e?(s.lastSourceCode=null,f=e):(s.lastSourceCode=e,f=e.text);let m="espree",g=r;if("object"==typeof o.parser&&null!==o.parser)m=o.parser.filePath,g=o.parser.definition;else if("string"==typeof o.parser){if(!s.parserMap.has(o.parser))return[{ruleId:null,fatal:!0,severity:2,message:`Configured parser '${o.parser}' was not found.`,line:0,column:0,nodeType:null}];m=o.parser,g=s.parserMap.get(o.parser)}const y=p.allowInlineConfig&&!p.warnInlineConfig?function(e){let t,n;for(N.lastIndex=0;null!==(t=N.exec(e));)t[0].endsWith("*/")&&(n=Object.assign(n||{},k.parseListConfig(k.extractDirectiveComment(t[1]).directivePart)));return n}(f):{},b=Object.assign({builtin:!0},o.env,y),v=Object.keys(b).filter((e=>b[e])).map((e=>function(e,t){return e.lastConfigArray&&e.lastConfigArray.pluginEnvironments.get(t)||u.get(t)||null}(s,e))).filter((e=>e)),E=V(g,o.parserOptions||{},v),x=(S=o.globals||{},O=v,Object.assign({},...O.filter((e=>e.globals)).map((e=>e.globals)),S));var S,O;const T=o.settings||{},w=function({globals:e,parser:t,parserOptions:n}){const{ecmaVersion:r,sourceType:i}=n;return{globals:e,ecmaVersion:j(r),sourceType:i,parser:t,parserOptions:n}}({globals:o.globals,parser:g,parserOptions:E});if(s.lastSourceCode)s.lastSourceCode.scopeManager||(s.lastSourceCode=new d({text:s.lastSourceCode.text,ast:s.lastSourceCode.ast,parserServices:s.lastSourceCode.parserServices,visitorKeys:s.lastSourceCode.visitorKeys,scopeManager:K(s.lastSourceCode.ast,w)}));else{const e=W(f,w,p.filename);if(!e.success)return[e.error];s.lastSourceCode=e.sourceCode}const C=s.lastSourceCode,A=p.allowInlineConfig?function(e,t,n){const r={},i=Object.create(null),s={},o=[],u=[],p=new c({builtInRules:_});return e.getInlineConfigNodes().filter((e=>"Shebang"!==e.type)).forEach((e=>{const{directivePart:c,justificationPart:d}=k.extractDirectiveComment(e.value),f=a.exec(c);if(!f)return;const h=f[1],m=/^eslint-disable-(next-)?line$/u.test(h);if("Line"===e.type&&!m)return;if(n){const t="Block"===e.type?`/*${h}*/`:`//${h}`;return void o.push(B({ruleId:null,message:`'${t}' has no effect because you have 'noInlineConfig' setting in ${n}.`,loc:e.loc,severity:1}))}if("eslint-disable-line"===h&&e.loc.start.line!==e.loc.end.line){const t=`${h} comment should not span multiple lines.`;return void o.push(B({ruleId:null,message:t,loc:e.loc}))}const g=c.slice(f.index+h.length);switch(h){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const n=h.slice("eslint-".length),r={commentToken:e,type:n,value:g,justification:d,ruleMapper:t},{directives:i,directiveProblems:s}=M(r);u.push(...i),o.push(...s);break}case"exported":Object.assign(s,k.parseStringConfig(g,e));break;case"globals":case"global":for(const[t,{value:n}]of Object.entries(k.parseStringConfig(g,e))){let r;try{r=l.normalizeConfigGlobal(n)}catch(t){o.push(B({ruleId:null,loc:e.loc,message:t.message}));continue}i[t]?(i[t].comments.push(e),i[t].value=r):i[t]={comments:[e],value:r}}break;case"eslint":{const n=k.parseJsonConfig(g,e.loc);n.success?Object.keys(n.config).forEach((i=>{const s=t(i),a=n.config[i];if(s){try{p.validateRuleOptions(s,i,a)}catch(t){return void o.push(B({ruleId:i,message:t.message,loc:e.loc}))}r[i]=a}else o.push(B({ruleId:i,loc:e.loc}))})):o.push(n.error);break}}})),{configuredRules:r,enabledGlobals:i,exportedVariables:s,problems:o,disableDirectives:u}}(C,(e=>G(s,e)),p.warnInlineConfig):{configuredRules:{},enabledGlobals:{},exportedVariables:{},problems:[],disableDirectives:[]};!function(e,n,{exportedVariables:r,enabledGlobals:i}){for(const r of new Set([...Object.keys(n),...Object.keys(i)])){const s=void 0===n[r]?void 0:l.normalizeConfigGlobal(n[r]),o=i[r]&&i[r].value||s,a=i[r]&&i[r].comments;if("off"===o)continue;let c=e.set.get(r);c||(c=new t.Variable(r,e),e.variables.push(c),e.set.set(r,c)),c.eslintImplicitGlobalSetting=s,c.eslintExplicitGlobal=void 0!==a,c.eslintExplicitGlobalComments=a,c.writeable="writable"===o}Object.keys(r).forEach((t=>{const n=e.set.get(t);n&&(n.eslintUsed=!0,n.eslintExported=!0)})),e.through=e.through.filter((t=>{const n=t.identifier.name,r=e.set.get(n);return!r||(t.resolved=r,r.references.push(t),!1)}))}(C.scopeManager.scopes[0],x,{exportedVariables:A.exportedVariables,enabledGlobals:A.enabledGlobals});const D=Object.assign({},o.rules,A.configuredRules);let R;try{R=z(C,D,(e=>G(s,e)),m,w,T,p.filename,p.disableFixes,s.cwd,i.physicalFilename)}catch(e){if(e.message+=`\nOccurred while linting ${p.filename}`,P("An error occurred while traversing"),P("Filename:",p.filename),e.currentNode){const{line:t}=e.currentNode.loc.start;P("Line:",t),e.message+=`:${t}`}throw P("Parser Options:",E),P("Parser Path:",m),P("Settings:",T),e.ruleId&&(e.message+=`\nRule: "${e.ruleId}"`),e}return h({directives:A.disableDirectives,disableFixes:p.disableFixes,problems:R.concat(A.problems).sort(((e,t)=>e.line-t.line||e.column-t.column)),reportUnusedDisableDirectives:p.reportUnusedDisableDirectives})}verify(e,t,n){P("Verify");const{configType:r,cwd:i}=H.get(this),s="string"==typeof n?{filename:n}:n||{};if(t){if("flat"===r){let n=t;return Array.isArray(t)&&"function"==typeof t.getConfig||(n=new O(t,{basePath:i}),n.normalizeSync()),this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(e,n,s,!0))}if("function"==typeof t.extractConfig)return this._distinguishSuppressedMessages(this._verifyWithConfigArray(e,t,s))}return s.preprocess||s.postprocess?this._distinguishSuppressedMessages(this._verifyWithProcessor(e,t,s)):this._distinguishSuppressedMessages(this._verifyWithoutProcessors(e,t,s))}_verifyWithFlatConfigArrayAndProcessor(t,n,r,i){const s=r.filename||"",o=F(s),a=r.physicalFilename||o,l=X(t),c=r.preprocess||(e=>[e]),u=r.postprocess||(e=>e.flat()),p=r.filterCodeBlock||(e=>e.endsWith(".js")),d=e.extname(s);let f;try{f=c(l,o)}catch(e){const t=`Preprocessing error: ${e.message.replace(/^line \d+:/iu,"").trim()}`;return P("%s\n%s",t,e.stack),[{ruleId:null,fatal:!0,severity:2,message:t,line:e.lineNumber,column:e.column,nodeType:null}]}const h=f.map(((t,o)=>{if(P("A code block was found: %o",t.filename||"(unnamed)"),"string"==typeof t)return this._verifyWithFlatConfigArrayAndWithoutProcessors(t,n,r);const c=t.text,u=e.join(s,`${o}_${t.filename}`);return p(u,c)?!i||l===c&&e.extname(u)===d?this._verifyWithFlatConfigArrayAndWithoutProcessors(c,n,{...r,filename:u,physicalFilename:a}):(P("Resolving configuration again because the file content or extension was changed."),this._verifyWithFlatConfigArray(c,i,{...r,filename:u,physicalFilename:a})):(P("This code block was skipped."),[])}));return u(h,o)}_verifyWithFlatConfigArrayAndWithoutProcessors(e,t,n){const r=H.get(this),i=t||{},s=U(n,i);let o;"string"==typeof e?(r.lastSourceCode=null,o=e):(r.lastSourceCode=e,o=e.text);const l=i.languageOptions;if(l.ecmaVersion=j(l.ecmaVersion),!l.parser)throw new TypeError(`No parser specified for ${s.filename}`);if(I(l.parser)){const e=l.parserOptions;l.sourceType&&(e.sourceType=l.sourceType,"module"===e.sourceType&&e.ecmaFeatures&&e.ecmaFeatures.globalReturn&&(e.ecmaFeatures.globalReturn=!1))}const c=i.settings||{};if(r.lastSourceCode)r.lastSourceCode.scopeManager||(r.lastSourceCode=new d({text:r.lastSourceCode.text,ast:r.lastSourceCode.ast,parserServices:r.lastSourceCode.parserServices,visitorKeys:r.lastSourceCode.visitorKeys,scopeManager:K(r.lastSourceCode.ast,l)}));else{const e=W(o,l,s.filename);if(!e.success)return[e.error];r.lastSourceCode=e.sourceCode}const u=r.lastSourceCode;u.applyLanguageOptions(l);const p={rules:{}},f=[];if(s.allowInlineConfig)if(s.warnInlineConfig)u.getInlineConfigNodes().forEach((e=>{f.push(B({ruleId:null,message:`'${u.text.slice(e.range[0],e.range[1])}' has no effect because you have 'noInlineConfig' setting in ${s.warnInlineConfig}.`,loc:e.loc,severity:1}))}));else{const e=u.applyInlineConfig();f.push(...e.problems.map(B).map((e=>(e.fatal=!0,e))));const t=new T;for(const{config:n,node:r}of e.configs)Object.keys(n.rules).forEach((e=>{const s=S(e,i),o=n.rules[e];if(s)try{const n=Array.isArray(o)?o:[o];w(e,o),C(e,n[0]),t.validate({plugins:i.plugins,rules:{[e]:n}}),p.rules[e]=o}catch(t){let n=t.message.slice(t.message.startsWith('Key "rules":')?t.message.indexOf(":",12)+1:t.message.indexOf(":")+1).trim();t.messageTemplate&&(n+=` You passed "${o}".`),f.push(B({ruleId:e,message:`Inline configuration for rule "${e}" is invalid:\n\t${n}\n`,loc:r.loc}))}else f.push(B({ruleId:e,loc:r.loc}))}))}const m=s.allowInlineConfig&&!s.warnInlineConfig?function(e,t){const n=[],r=[];return e.getInlineConfigNodes().filter((e=>"Shebang"!==e.type)).forEach((e=>{const{directivePart:i,justificationPart:s}=k.extractDirectiveComment(e.value),o=a.exec(i);if(!o)return;const l=o[1],c=/^eslint-disable-(next-)?line$/u.test(l);if("Line"===e.type&&!c)return;if("eslint-disable-line"===l&&e.loc.start.line!==e.loc.end.line){const t=`${l} comment should not span multiple lines.`;return void n.push(B({ruleId:null,message:t,loc:e.loc}))}const u=i.slice(o.index+l.length);switch(l){case"eslint-disable":case"eslint-enable":case"eslint-disable-next-line":case"eslint-disable-line":{const i={commentToken:e,type:l.slice("eslint-".length),value:u,justification:s,ruleMapper:t},{directives:o,directiveProblems:a}=M(i);r.push(...o),n.push(...a);break}}})),{problems:n,disableDirectives:r}}(u,(e=>S(e,i))):{problems:[],disableDirectives:[]},g=Object.assign({},i.rules,p.rules);let y;u.finalize();try{y=z(u,g,(e=>S(e,i)),void 0,l,c,s.filename,s.disableFixes,r.cwd,n.physicalFilename)}catch(e){if(e.message+=`\nOccurred while linting ${s.filename}`,P("An error occurred while traversing"),P("Filename:",s.filename),e.currentNode){const{line:t}=e.currentNode.loc.start;P("Line:",t),e.message+=`:${t}`}throw P("Parser Options:",l.parserOptions),P("Settings:",c),e.ruleId&&(e.message+=`\nRule: "${e.ruleId}"`),e}return h({directives:m.disableDirectives,disableFixes:s.disableFixes,problems:y.concat(m.problems).concat(f).sort(((e,t)=>e.line-t.line||e.column-t.column)),reportUnusedDisableDirectives:s.reportUnusedDisableDirectives})}_verifyWithConfigArray(e,t,n){P("With ConfigArray: %s",n.filename),H.get(this).lastConfigArray=t;const r=t.extractConfig(n.filename),i=r.processor&&t.pluginProcessors.get(r.processor);if(i){P("Apply the processor: %o",r.processor);const{preprocess:s,postprocess:o,supportsAutofix:a}=i,l=n.disableFixes||!a;return this._verifyWithProcessor(e,r,{...n,disableFixes:l,postprocess:o,preprocess:s},t)}return this._verifyWithoutProcessors(e,r,n)}_verifyWithFlatConfigArray(e,t,n,r=!1){P("With flat config: %s",n.filename);const i=n.filename||"__placeholder__.js";H.get(this).lastConfigArray=t;const s=t.getConfig(i);if(!s)return[{ruleId:null,severity:1,message:`No matching configuration found for ${i}.`,line:0,column:0,nodeType:null}];if(s.processor){P("Apply the processor: %o",s.processor);const{preprocess:r,postprocess:o,supportsAutofix:a}=s.processor,l=n.disableFixes||!a;return this._verifyWithFlatConfigArrayAndProcessor(e,s,{...n,filename:i,disableFixes:l,postprocess:o,preprocess:r},t)}return r&&(n.preprocess||n.postprocess)?this._verifyWithFlatConfigArrayAndProcessor(e,s,n):this._verifyWithFlatConfigArrayAndWithoutProcessors(e,s,n)}_verifyWithProcessor(t,n,r,i){const s=r.filename||"",o=F(s),a=r.physicalFilename||o,l=X(t),c=r.preprocess||(e=>[e]),u=r.postprocess||(e=>e.flat()),p=r.filterCodeBlock||(e=>e.endsWith(".js")),d=e.extname(s);let f;try{f=c(l,o)}catch(e){const t=`Preprocessing error: ${e.message.replace(/^line \d+:/iu,"").trim()}`;return P("%s\n%s",t,e.stack),[{ruleId:null,fatal:!0,severity:2,message:t,line:e.lineNumber,column:e.column,nodeType:null}]}const h=f.map(((t,o)=>{if(P("A code block was found: %o",t.filename||"(unnamed)"),"string"==typeof t)return this._verifyWithoutProcessors(t,n,r);const c=t.text,u=e.join(s,`${o}_${t.filename}`);return p(u,c)?!i||l===c&&e.extname(u)===d?this._verifyWithoutProcessors(c,n,{...r,filename:u,physicalFilename:a}):(P("Resolving configuration again because the file content or extension was changed."),this._verifyWithConfigArray(c,i,{...r,filename:u,physicalFilename:a})):(P("This code block was skipped."),[])}));return u(h,o)}_distinguishSuppressedMessages(e){const t=[],n=[],r=H.get(this);for(const r of e)r.suppressions?n.push(r):t.push(r);return r.lastSuppressedMessages=n,t}getSourceCode(){return H.get(this).lastSourceCode}getSuppressedMessages(){return H.get(this).lastSuppressedMessages}defineRule(e,t){Y(this),H.get(this).ruleMap.define(e,t)}defineRules(e){Y(this),Object.getOwnPropertyNames(e).forEach((t=>{this.defineRule(t,e[t])}))}getRules(){Y(this);const{lastConfigArray:e,ruleMap:t}=H.get(this);return new Map(function*(){yield*t,e&&(yield*e.pluginRules)}())}defineParser(e,t){Y(this),H.get(this).parserMap.set(e,t)}verifyAndFix(e,t,n){let r,i=[],s=!1,o=0,a=e;const l=n&&n.filename||`${e.slice(0,10)}...`,c=!n||void 0===n.fix||n.fix;do{if(o++,P(`Linting code for ${l} (pass ${o})`),i=this.verify(a,t,n),P(`Generating fixed text for ${l} (pass ${o})`),r=v.applyFixes(a,i,c),1===i.length&&i[0].fatal)break;s=s||r.fixed,a=r.output}while(r.fixed&&o<10);return r.fixed&&(r.messages=this.verify(a,t,n)),r.fixed=s,r.output=a,r}},getLinterInternalSlots(e){return H.get(e)}},jV}void 0===by&&((()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==vy)return vy;throw new Error("Unable to locate global `this`")})().process=function(){if(Ey)return xy.exports;Ey=1;var e,t,n=xy.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:r}catch(t){e=r}try{t="function"==typeof clearTimeout?clearTimeout:i}catch(e){t=i}}();var o,a=[],l=!1,c=-1;function u(){l&&o&&(l=!1,o.length?a=o.concat(a):c=-1,a.length&&p())}function p(){if(!l){var e=s(u);l=!0;for(var n=a.length;n;){for(o=a,a=[];++c1)for(var n=1;n{n.push({label:e,type:"function"==typeof t?"function":"variable"})})),{from:e,options:n,validFor:/^[\w$]*$/}}function zV(e=window,t=[]){return function(n){var r;const i=Bc(n.state).resolveInner(n.pos,-1);if(WV.includes(i.name)&&"MemberExpression"===(null===(r=i.parent)||void 0===r?void 0:r.name)){const t=i.parent.getChild("Expression");if("VariableName"===(null==t?void 0:t.name)){const r=/\./.test(i.name)?i.to:i.from,s=n.state.sliceDoc(t.from,t.to);if("object"==typeof e[s])return QV(r,e[s])}else if("MemberExpression"===(null==t?void 0:t.name)){const r=i.to,s=n.state.sliceDoc(t.from,t.to);let o;if(o=s.startsWith("this.props")?(0,Ve.NA)(e,s.replace("this.props","__UNSAFE_TANGO_CURRENT_PAGE_RENDER_RUNTIME__")):(0,Ve.NA)(e,s),"object"==typeof o)return QV(r,o)}}else{if("VariableName"===i.name)return QV(i.from,e);if(n.explicit&&!$V.includes(i.name))return QV(n.pos,e);if(!n.explicit&&"{"===i.name)return{from:n.pos,options:t}}return null}}function XV(e){var{shape:t="solid",suffix:n,status:s,autoCompleteContext:o,autoCompleteOptions:a,showLineNumbers:l,showFoldGutter:u,enableESLint:p=!1}=e,d=V(e,["shape","suffix","status","autoCompleteContext","autoCompleteOptions","showLineNumbers","showFoldGutter","enableESLint"]);const f=(0,r.useMemo)((()=>{const e=a?a.map((e=>({label:e}))):[];return iy.data.of({autocomplete:zV(o,e)})}),[o,a]),h=[dy({jsx:!0}),f];p&&h.push(function(e={}){return[Bm.of(e),km,Pm,Im,Rm]}(),function(e,t={}){return[ym.of({source:e,config:t}),gm,Lm]}(function(e,t){return t||(t={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},e.getRules().forEach(((e,n)=>{e.meta.docs.recommended&&(t.rules[n]=2)}))),n=>{let{state:r}=n,i=[];for(let{from:n,to:s}of iy.findRegions(r)){let o=r.doc.lineAt(n),a={line:o.number-1,col:n-o.from,pos:n};for(let o of e.verify(r.sliceDoc(n,s),t))i.push(yy(o,r.doc,a))}return i}}(new KV,qV)));const{rootStyle:m,codeSetup:g}=function({shape:e,status:t,showLineNumbers:n,showFoldGutter:r}){let i,s,o;"solid"===e&&(i={border:"solid",borderColor:"error"===t?"error.60":"line.normal",borderRadius:"s",minHeight:32},s=!1,o=!1);return{rootStyle:i,codeSetup:{lineNumbers:null!=n?n:s,foldGutter:null!=r?r:o,searchKeymap:!1}}}({shape:t,status:s,showLineNumbers:l,showFoldGutter:u});return i().createElement(c.xu,Object.assign({className:"InputCode",display:"flex",alignItems:"center",overflow:"hidden"},m),i().createElement(c.xu,{flex:"1",overflow:"auto"},i().createElement(ag,Object.assign({extensions:h,basicSetup:g,placeholder:"//输入 javascript 代码"},d))),n)}var GV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ZV=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:GV}))};ZV.displayName="SearchOutlined";var HV=r.forwardRef(ZV);function YV(e){var{placeholder:t="请输入关键词",onChange:n,width:r,escapeValue:s=!0,style:o={}}=e,a=V(e,["placeholder","onChange","width","escapeValue","style"]);const l=Object.assign({width:r},o);return i().createElement(u.Input,Object.assign({placeholder:t,onChange:e=>{let t=e.target.value;s&&(t=t.replaceAll("\\","\\\\")),null==n||n(t)},suffix:i().createElement(c.xv,{color:"text.placeholder"},i().createElement(HV,null)),allowClear:!0,style:l},a))}var JV=n(55171),eK=n.n(JV);function tK(e){var{enableCopy:t,onCopy:n}=e,r=V(e,["enableCopy","onCopy"]);return i().createElement(eK(),Object.assign({name:!1,iconStyle:"square",quotesOnKeys:!1,displayDataTypes:!1,enableClipboard:!!t&&(e=>{const t=function(e){if(!Array.isArray(e))return;!1===e[0]&&(e=e.slice(1));return[...e].reduce(((e,t)=>e=nK.test(t)?`${e}[${t}]`:e?[e,t].join("?."):t),"")}(e.namespace),r=null==n?void 0:n(t,e);navigator.clipboard.writeText(r||t)})},r))}const nK=/^\d+$/;var rK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},iK=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:rK}))};iK.displayName="PlusOutlined";var sK=r.forwardRef(iK),oK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},aK=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:oK}))};aK.displayName="DeleteOutlined";var lK=r.forwardRef(aK);const cK={flex:1};function uK({value:e,onChange:t,onRemove:n,options:r}){return i().createElement(c.xu,{display:"flex",gap:"m"},i().createElement(u.Select,{placeholder:"请选择",options:r,value:e,onChange:e=>{null==t||t(e)},style:cK}),i().createElement(u.Tooltip,{title:"删除"},i().createElement(u.Button,{type:"text",icon:i().createElement(lK,null),onClick:n})))}function pK({title:e,children:t}){return i().createElement(c.xu,{className:"SettingGroup",mb:"l"},i().createElement(c.xu,{className:"SettingGroupTitle",fontSize:"14px",fontWeight:"bold",borderBottom:"solid",borderBottomColor:"#f0f0f0",px:"l",py:"s"},e),i().createElement(c.xu,{className:"SettingGroupChildren",px:"l"},t))}const dK={switch:e=>{var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(u.Switch,Object.assign({},r,{checked:t,onChange:n}))},input:e=>{var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(u.Input,Object.assign({},r,{value:t,onBlur:e=>n(e.target.value)}))},select:u.Select,selectList:function({value:e=[],onChange:t,options:n=[],isUniqueValue:s=!1}){const[o,a]=(0,r.useState)(!1);return s&&(n=n.filter((t=>e.indexOf(t.value)<0))),i().createElement(c.xu,null,!e.length&&!o&&i().createElement(c.xu,{color:"text.note"},"空"),i().createElement(c.xu,{display:"flex",flexDirection:"column",gap:"m"},e.map(((r,s)=>i().createElement(uK,{key:s,options:n,value:r,onChange:n=>{if(n===r)return;const i=[...e];i[s]=n,null==t||t(i)},onRemove:()=>{const n=[...e];n.splice(s,1),null==t||t(n)}}))),o&&i().createElement(uK,{options:n,onChange:n=>{n&&(null==t||t(e.concat([n])),a(!1))},onRemove:()=>{a(!1)}})),i().createElement(c.xu,{mt:"m"},i().createElement(u.Button,{icon:i().createElement(sK,null),onClick:()=>a(!0)},"新增")))}};function fK({title:e,description:t,children:n,layoutDirection:r="row",component:s,componentProps:o={},onChange:a,value:l}){let u=n;const p=dK[s];p&&(u=i().createElement(p,Object.assign({},o,{value:l,onChange:a})));const{rootStyle:d,leftStyle:f,rightStyle:h}=function(e){let t,n,r;"row"===e?(t={display:"flex",alignItems:"center"},n={width:"60%"},r={width:"40%",display:"flex",justifyContent:"flex-end"}):"column"===e&&(t={display:"flex",flexDirection:"column"});return{rootStyle:t,leftStyle:n,rightStyle:r}}(r);return i().createElement(c.xu,Object.assign({className:"SettingItem",py:"m",borderBottom:"solid",borderBottomColor:"#f0f0f0"},d),i().createElement(c.xu,Object.assign({className:"SettingItemLeft"},f),i().createElement(c.xu,{className:"SettingItemTitle",fontSize:"14px",fontWeight:"bold",mb:"s"},e),i().createElement(c.xu,{className:"SettingItemDescription",fontSize:"12px",color:"text.note"},t)),i().createElement(c.xu,Object.assign({className:"SettingItemRight"},h),u))}var hK=n(57316),mK=n.n(hK);const gK=mK()(u.Tabs)` .ant-tabs-nav { padding-left: 12px; padding-right: 12px; @@ -261,7 +268,7 @@ border-style: solid; border-width: 1px; } -`;function IK({label:e,note:t,tip:n,docs:s,error:o,extra:a,children:l,onCheck:p,checked:d,defaultChecked:f=!1}){const[h,m]=(0,r.useState)((0,$.kK)(d)?!f:!d);return i().createElement(Ne,{collapsed:h,onCollapse:m,className:"FormControlGroup",title:i().createElement(c.xu,{display:"flex",columnGap:"s"},i().createElement(u.Checkbox,{checked:d,onChange:e=>{e.stopPropagation();const t=e.target.checked;m(!t),null==p||p(t)}}),i().createElement(MK,{type:"secondary",label:e,note:t,tip:n,docs:s})),extra:i().createElement(c.xu,{flex:"1",textAlign:"right"},a),border:"solid",borderColor:"line.normal",headerProps:{bg:"fill1"}},i().createElement(c.xu,{p:"m",display:"flex",flexDirection:"column",rowGap:"l",css:RK},l),i().createElement(c.xu,{color:"red"},o))}const LK=c.iv` +`;function IK({label:e,note:t,tip:n,docs:s,error:o,extra:a,children:l,onCheck:p,checked:d,defaultChecked:f=!1}){const[h,m]=(0,r.useState)((0,$.kK)(d)?!f:!d);return i().createElement(Ne,{collapsed:h,onCollapse:m,className:"FormControlGroup",stickyHeader:!0,title:i().createElement(c.xu,{display:"flex",columnGap:"s"},i().createElement(u.Checkbox,{checked:d,onChange:e=>{e.stopPropagation();const t=e.target.checked;m(!t),null==p||p(t)}}),i().createElement(MK,{type:"secondary",label:e,note:t,tip:n,docs:s})),extra:i().createElement(c.xu,{flex:"1",textAlign:"right"},a),border:"solid",borderColor:"line.normal",headerProps:{bg:"fill1",zIndex:2}},i().createElement(c.xu,{p:"m",display:"flex",flexDirection:"column",rowGap:"l",css:RK},l),i().createElement(c.xu,{color:"red"},o))}const LK=c.iv` overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -281,7 +288,7 @@ a:link { color: #fff; } -`;function MK(e){var{type:t="normal",label:n,note:r,tip:s,docs:o,deprecated:a}=e,l=V(e,["type","label","note","tip","docs","deprecated"]);let p;p=a||o?i().createElement(c.xu,null,i().createElement(c.xu,{css:BK},s,o?i().createElement(c.rU,{href:o,isExternal:!0,ml:"m"},"查看属性文档"):null),a?i().createElement(c.xu,{color:"#faad14"},i().createElement(kK,null)," 废弃提示:",(0,$.HD)(a)?a:"该属性已废弃,请谨慎使用。"):null):s;const d={normal:"text.body",secondary:"text.note"}[t];let f=i().createElement(c.xu,{as:"span",display:"inline-block",color:d,className:p?"hasHelp":"",css:LK,title:(0,$.HD)(n)?n:void 0},a?i().createElement(kK,{style:{color:"#faad14",marginRight:4}}):null,n);return p&&(f=i().createElement(u.Tooltip,{title:p},f)),i().createElement(c.xu,Object.assign({fontSize:"14px"},l),f,r&&i().createElement(c.xu,{as:"i",display:"inline-block",fontSize:"12px",color:"text.note",ml:"m"},r))}function jK({title:e,extra:t,subTitle:n}){return i().createElement(c.xu,{className:"FormHeader"},i().createElement(c.xu,{display:"flex",alignItems:"center"},i().createElement(c.xu,{flex:"1",display:"flex",alignItems:"center"},i().createElement(c.xu,{fontSize:"16px",fontWeight:"500",mr:"s"},e),n&&i().createElement(c.xu,null,n)),t&&i().createElement(c.xu,null,t)))}const NK=()=>({}),FK=()=>!0;function UK(e){var t;const n=null!==(t=e.render)&&void 0!==t?t:t=>i().createElement(e.component,t);function s({name:t,title:s,tip:o,placeholder:a,docs:l,autoCompleteOptions:u,setter:d,setterProps:f,defaultValue:h,options:m,disableVariableSetter:g=e.disableVariableSetter,getVisible:y,getSetterProps:_,deprecated:b,extra:v,footer:E,noStyle:x}){var S,O,T;const{disableSwitchExpressionSetter:w,showItemSubtitle:C}=(0,r.useContext)(wK),A=TK(),P=A.getField(t),k=(0,p.ZN)(null!==(S=P.value)&&void 0!==S?S:h),D=null!=w?w:g,[R,{toggle:I}]=EK((()=>!D&&(0,xK.Lx)(k))),L=R?"expressionSetter":d;P.setConfig({validate:e.validate});const B=(0,Ve.d9)({value:k,defaultValue:h,onChange:P.handleChange,status:P.error?"error":void 0,placeholder:a,options:m},!1);let M={};(["expressionSetter","expSetter","actionSetter","eventSetter"].includes(d)||R)&&(M={modalTitle:s,modalTip:o,autoCompleteOptions:u});const j=_||NK,N=null===(T=null===(O=VK.expressionSetter)||void 0===O?void 0:O.config)||void 0===T?void 0:T.component,F=R?i().createElement(N,Object.assign({},M,B)):n(Object.assign(Object.assign(Object.assign(Object.assign({},M),B),f),j(A))),U=y||FK;return x?U(A)?F:i().createElement("div",{"data-setter":L,"data-field":t}):i().createElement(DK,{visible:U(A),label:s,note:C?t:null,tip:o,docs:l,deprecated:b,error:P.error,extra:i().createElement(c.xu,null,v,D?null:i().createElement(qe,{borderRadius:"s",size:"s",shape:"ghost",type:"primary",tooltip:R?"关闭 JS 表达式":"使用 JS 表达式",tooltipPlacement:"left",selected:R,onClick:()=>I()},i().createElement(G,null))),footer:E,"data-setter":L,"data-field":t},F)}return s.displayName=`FormItem_${e.name}`,s.config=e,w(s)}const VK={};function KK(e){var t;[e.name,...null!==(t=e.alias)&&void 0!==t?t:[]].forEach((t=>{VK[t]=UK(e)}))}function WK(e){const{setter:t}=e,n=VK[t];if(null==n){const t=VK.expressionSetter;return i().createElement(t,Object.assign({},e,{footer:i().createElement(c.xv,{color:"red",mt:"m"},e.setter," is invalid")}))}return i().createElement(n,e)}function $K(e){return Array.isArray(e)&&e.length>0}function qK(e){return e.split(".")}function QK(e){return String(Number.parseInt(e,10))===e}function zK(e,t,n){const r=Array.isArray(t)?t:qK(t);let i=e;for(let e=0;e!!e)).join(".")}onChange(e,t,n){var r,i;null===(i=(r=this.parent).onChange)||void 0===i||i.call(r,this.getPath(e),t,n)}}class YK{get value(){return this.parent.getValue(this.name)}set value(e){this.parent.setValue(this.name,e)}get error(){return this.state.error}constructor(e){this.config=null,this.state={},this.detail={},this.validate=(e="*")=>K(this,void 0,void 0,(function*(){var t,n;if(!["*","blur","change"].includes(e))return;const{validate:r}=this.config,i=this.value;let s=!1;return null===(n=(t=this.state).cancelValidation)||void 0===n||n.call(t),this.state.validating=!0,this.state.cancelValidation=(0,p.aD)((()=>{s=!0,this.state.cancelValidation=null,this.state.validating=!1})),(()=>K(this,void 0,void 0,(function*(){return r?r(i,this,e):null})))().then((0,p.aD)((e=>{var t,n;if(!s){if(this.state.cancelValidation=null,this.state.validating=!1,this.state.error=e,e)return e;null===(n=null===(t=this.parent)||void 0===t?void 0:t.onChange)||void 0===n||n.call(t,this.name,this.value,this)}})))})),this.handleBlur=()=>this.validate("blur"),this.handleChange=(e,t)=>(this.detail=t,this.value=e,this.validate("change")),this.parent=e.parent,this.name=e.name,(0,p.rC)(this,{state:p.LO,value:p.Fl,error:p.Fl,validate:p.aD,handleBlur:p.aD,handleChange:p.aD})}setConfig(e){this.config=e}}const HK=()=>!0,JK=w((({title:e,tip:t,docs:n,name:r,defaultValue:s,getVisible:o=HK,props:a=[]})=>{var l;const u=TK(),p=o(u),d=u.getSubModel(r);return i().createElement(OK,{value:d},i().createElement(c.xu,{className:"FormObject",display:p?"block":"none"},i().createElement(IK,{label:e,note:r,tip:t,docs:n,checked:null!==(l=!!d.values)&&void 0!==l?l:!!s,onCheck:e=>{const t=e?{}:void 0;u.setValue(r,t),u.onChange(r,t)}},a.map((e=>$K(e.props)?i().createElement(JK,Object.assign({key:e.name},e)):i().createElement(WK,Object.assign({key:e.name},e)))))))}));function eW(e){var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(XV,Object.assign({onChange:e=>null==n?void 0:n(e),value:t||""},r))}function tW(e){var{onChange:t}=e,n=V(e,["onChange"]);return i().createElement(u.Input,Object.assign({onChange:e=>null==t?void 0:t(e.target.value)},n))}const nW=c.iv` +`;function MK(e){var{type:t="normal",label:n,note:r,tip:s,docs:o,deprecated:a}=e,l=V(e,["type","label","note","tip","docs","deprecated"]);let p;p=a||o?i().createElement(c.xu,null,i().createElement(c.xu,{css:BK},s,o?i().createElement(c.rU,{href:o,isExternal:!0,ml:"m"},"查看属性文档"):null),a?i().createElement(c.xu,{color:"#faad14"},i().createElement(kK,null)," 废弃提示:",(0,$.HD)(a)?a:"该属性已废弃,请谨慎使用。"):null):s;const d={normal:"text.body",secondary:"text.note"}[t];let f=i().createElement(c.xu,{as:"span",display:"inline-block",color:d,className:p?"hasHelp":"",css:LK,title:(0,$.HD)(n)?n:void 0},a?i().createElement(kK,{style:{color:"#faad14",marginRight:4}}):null,n);return p&&(f=i().createElement(u.Tooltip,{title:p},f)),i().createElement(c.xu,Object.assign({fontSize:"14px"},l),f,r&&i().createElement(c.xu,{as:"i",display:"inline-block",fontSize:"12px",color:"text.note",ml:"m"},r))}function jK({title:e,extra:t,subTitle:n}){return i().createElement(c.xu,{className:"FormHeader"},i().createElement(c.xu,{display:"flex",alignItems:"center"},i().createElement(c.xu,{flex:"1",display:"flex",alignItems:"center"},i().createElement(c.xu,{fontSize:"16px",fontWeight:"500",mr:"s"},e),n&&i().createElement(c.xu,null,n)),t&&i().createElement(c.xu,null,t)))}const NK=()=>({}),FK=()=>!0;function UK(e){var t;const n=null!==(t=e.render)&&void 0!==t?t:t=>i().createElement(e.component,t);function s({name:t,title:s,tip:o,placeholder:a,docs:l,autoCompleteOptions:u,setter:d,setterProps:f,defaultValue:h,options:m,disableVariableSetter:g=e.disableVariableSetter,getVisible:y,getSetterProps:_,deprecated:b,extra:v,footer:E,noStyle:x}){var S,O,T;const{disableSwitchExpressionSetter:w,showItemSubtitle:C}=(0,r.useContext)(wK),A=TK(),P=A.getField(t),k=(0,p.ZN)(null!==(S=P.value)&&void 0!==S?S:h),D=null!=w?w:g,[R,{toggle:I}]=EK((()=>!D&&(0,xK.Lx)(k))),L=R?"expressionSetter":d;P.setConfig({validate:e.validate});const B=(0,Ve.d9)({value:k,defaultValue:h,onChange:P.handleChange,status:P.error?"error":void 0,placeholder:a,options:m},!1);let M={};(["expressionSetter","expSetter","actionSetter","eventSetter"].includes(d)||R)&&(M={modalTitle:s,modalTip:o,autoCompleteOptions:u});const j=_||NK,N=null===(T=null===(O=VK.expressionSetter)||void 0===O?void 0:O.config)||void 0===T?void 0:T.component,F=R?i().createElement(N,Object.assign({},M,B)):n(Object.assign(Object.assign(Object.assign(Object.assign({},M),B),f),j(A))),U=y||FK;return x?U(A)?F:i().createElement("div",{"data-setter":L,"data-field":t}):i().createElement(DK,{visible:U(A),label:s,note:C?t:null,tip:o,docs:l,deprecated:b,error:P.error,extra:i().createElement(c.xu,null,v,D?null:i().createElement(qe,{borderRadius:"s",size:"s",shape:"text",type:"primary",tooltip:R?"关闭 JS 表达式":"使用 JS 表达式",tooltipPlacement:"left",selected:R,onClick:()=>I()},i().createElement(G,null))),footer:E,"data-setter":L,"data-field":t},F)}return s.displayName=`FormItem_${e.name}`,s.config=e,w(s)}const VK={};function KK(e){var t;[e.name,...null!==(t=e.alias)&&void 0!==t?t:[]].forEach((t=>{VK[t]=UK(e)}))}function WK(e){const{setter:t}=e,n=VK[t];if(null==n){const t=VK.expressionSetter;return i().createElement(t,Object.assign({},e,{footer:i().createElement(c.xv,{color:"red",mt:"m"},e.setter," is invalid")}))}return i().createElement(n,e)}function $K(e){return Array.isArray(e)&&e.length>0}function qK(e){return e.split(".")}function QK(e){return String(Number.parseInt(e,10))===e}function zK(e,t,n){const r=Array.isArray(t)?t:qK(t);let i=e;for(let e=0;e!!e)).join(".")}onChange(e,t,n){var r,i;null===(i=(r=this.parent).onChange)||void 0===i||i.call(r,this.getPath(e),t,n)}}class HK{get value(){return this.parent.getValue(this.name)}set value(e){this.parent.setValue(this.name,e)}get error(){return this.state.error}constructor(e){this.config=null,this.state={},this.detail={},this.validate=(e="*")=>K(this,void 0,void 0,(function*(){var t,n;if(!["*","blur","change"].includes(e))return;const{validate:r}=this.config,i=this.value;let s=!1;return null===(n=(t=this.state).cancelValidation)||void 0===n||n.call(t),this.state.validating=!0,this.state.cancelValidation=(0,p.aD)((()=>{s=!0,this.state.cancelValidation=null,this.state.validating=!1})),(()=>K(this,void 0,void 0,(function*(){return r?r(i,this,e):null})))().then((0,p.aD)((e=>{var t,n;if(!s){if(this.state.cancelValidation=null,this.state.validating=!1,this.state.error=e,e)return e;null===(n=null===(t=this.parent)||void 0===t?void 0:t.onChange)||void 0===n||n.call(t,this.name,this.value,this)}})))})),this.handleBlur=()=>this.validate("blur"),this.handleChange=(e,t)=>(this.detail=t,this.value=e,this.validate("change")),this.parent=e.parent,this.name=e.name,(0,p.rC)(this,{state:p.LO,value:p.Fl,error:p.Fl,validate:p.aD,handleBlur:p.aD,handleChange:p.aD})}setConfig(e){this.config=e}}const YK=()=>!0,JK=w((({title:e,tip:t,docs:n,name:r,defaultValue:s,getVisible:o=YK,props:a=[]})=>{var l;const u=TK(),p=o(u),d=u.getSubModel(r);return i().createElement(OK,{value:d},i().createElement(c.xu,{className:"FormObject",display:p?"block":"none"},i().createElement(IK,{label:e,note:r,tip:t,docs:n,checked:null!==(l=!!d.values)&&void 0!==l?l:!!s,onCheck:e=>{const t=e?{}:void 0;u.setValue(r,t),u.onChange(r,t)}},a.map((e=>$K(e.props)?i().createElement(JK,Object.assign({key:e.name},e)):i().createElement(WK,Object.assign({key:e.name},e)))))))}));function eW(e){var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(XV,Object.assign({onChange:e=>null==n?void 0:n(e),value:t||""},r))}function tW(e){var{onChange:t}=e,n=V(e,["onChange"]);return i().createElement(u.Input,Object.assign({onChange:e=>null==t?void 0:t(e.target.value)},n))}const nW=c.iv` > .ant-input-borderless { border: 1px solid transparent; padding: 4px; @@ -292,7 +299,9 @@ } `,rW=/^[a-z]+[\w]*$/;function iW(e){var{value:t,defaultValue:n,onChange:s,placeholder:o="输入唯一组件ID"}=e,a=V(e,["value","defaultValue","onChange","placeholder"]);const[l,p]=(0,r.useState)(t||n),[d,f]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1);(0,r.useEffect)((()=>{p(t)}),[t]);const g=h?{status:d?"error":void 0,onBlur(){m(!1),d||null==s||s(l||void 0)},onChange(e){const t=e.target.value;p(e.target.value),f(t&&!rW.test(t)?"error":"")}}:{readOnly:!0,bordered:!1,onClick(){m(!0)}};return i().createElement(c.xu,{css:nW},i().createElement(u.Input,Object.assign({placeholder:o,value:l},g,a)))}var sW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},oW=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:sW}))};oW.displayName="QuestionCircleOutlined";var aW=r.forwardRef(oW);KK({name:"expressionSetter",component:eW}),KK({name:"textSetter",component:tW}),KK({name:"idSetter",component:iW});const lW=c.iv` position: relative; - + height: 100%; + display: flex; + flex-direction: column; > .SettingFormMain > :first-child:is(.FormControl) { margin-top: var(--tango-space-m); } @@ -306,7 +315,7 @@ margin-left: var(--tango-space-m); margin-right: var(--tango-space-m); } -`,cW=[{label:"常用",value:"basic"},{label:"事件",value:"event"},{label:"样式",value:"style"},{label:"高级",value:"advanced"}];function uW({prototype:e,disableSwitchExpressionSetter:t,model:n,defaultValue:s,onChange:o=q,showIdentifier:a=!1,showSearch:l=!0,showGroups:p=!0,showItemSubtitle:d=!0,renderItemExtra:f,groupOptions:h=cW}){const[m,g]=(0,r.useState)(""),[y,_]=(0,r.useState)("basic"),[b,v]=(0,r.useState)(null!=n?n:new GK(s,{onChange:o})),{props:E=[]}=e,x=(0,r.useMemo)((()=>function(e){const t={};return e.forEach((e=>{const n=e.group||"basic";t[n]||(t[n]=[]),t[n].push(e)})),t}(E)),[E]),S=(0,r.useMemo)((()=>{const e=(0,W.Fx)(E,(e=>{const{getProp:t}=e,n=V(e,["getProp"]);return Object.assign(Object.assign({},n),null==t?void 0:t(b))}));return m?function(e,t){if(!t)return e;const n=new RegExp(t,"ig");return(0,W.lH)(e,(e=>n.test(e.title)||n.test(e.name)),"props")}(e,m):p?x[y]||[]:e}),[m,E,y,b,p,x]),O=(0,r.useCallback)((e=>e.map((e=>{const{getProp:t}=e,n=V(e,["getProp"]),r=Object.assign(Object.assign({},n),null==t?void 0:t(b));return $K(r.props)?i().createElement(JK,Object.assign({key:e.name},r)):i().createElement(WK,Object.assign({key:e.name,extra:null==f?void 0:f(r)},r))}))),[b,f]);return(0,r.useEffect)((()=>{n&&n!==b&&v(n)}),[n]),i().createElement(CK,{value:{disableSwitchExpressionSetter:t,showItemSubtitle:d}},i().createElement(OK,{value:b},i().createElement(c.xu,{className:"SettingForm",mb:"xl",css:lW},i().createElement(c.xu,{className:"SettingFormHeader",position:"sticky",top:"0",bg:"white",zIndex:"2"},i().createElement(c.xu,{px:"l",py:"m"},a&&i().createElement(jK,{title:e.title,subTitle:i().createElement(WK,{noStyle:!0,setter:"idSetter",name:a.identifierKey}),extra:(null==e?void 0:e.docs)?i().createElement(ae,{icon:i().createElement(aW,null),tooltip:"查看组件文档",href:e.docs}):null}),l&&i().createElement(c.xu,{className:"SettingFormSearch",mt:"m"},i().createElement(HV,{placeholder:"搜索属性",onChange:e=>{g(null==e?void 0:e.trim())}}))),!m&&p&&i().createElement(c.xu,{className:"SettingFormNav"},i().createElement(yK,{activeKey:y,onChange:_},h.map((e=>{var t;return i().createElement(yK.TabPane,{key:e.value,tab:e.label,disabled:!(null===(t=x[e.value])||void 0===t?void 0:t.length)})}))))),i().createElement(c.xu,{className:"SettingFormMain",display:"flex",flexDirection:"column",rowGap:"m"},O(S),0===S.length&&i().createElement(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:"未找到配置项"})))))}uW.register=KK;var pW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},dW=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:pW}))};dW.displayName="HolderOutlined";var fW=r.forwardRef(dW),hW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},mW=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:hW}))};mW.displayName="EditOutlined";var gW=r.forwardRef(mW);const yW=e=>{var{children:t,index:n,onMove:r}=e,s=V(e,["children","index","onMove"]);return i().createElement(c.xu,Object.assign({},s,{draggable:!0,onDragStart:e=>{e.dataTransfer.setData("text",`${n}`)},onDragEnd:e=>{e.dataTransfer.dropEffect="move"},onDragOver:e=>{e.preventDefault()},onDrop:e=>{const t=e.dataTransfer.getData("text");null==r||r(+t,n)}}),t)},_W=c.iv` +`,cW=[{label:"基本",value:"basic"},{label:"样式",value:"style"},{label:"高级",value:"advanced"}];function uW({prototype:e,disableSwitchExpressionSetter:t,model:n,defaultValue:s,onChange:o=q,showIdentifier:a=!1,showSearch:l=!0,showGroups:p=!0,showItemSubtitle:d=!0,renderItemExtra:f,groupOptions:h=cW}){const[m,g]=(0,r.useState)(""),[y,_]=(0,r.useState)("basic"),[b,v]=(0,r.useState)(null!=n?n:new GK(s,{onChange:o})),{props:E=[]}=e,x=(0,r.useMemo)((()=>function(e,t){const n=t.reduce(((e,t)=>(e[t.value]=[],e)),{});return e.forEach((e=>{const t=n[e.group]?e.group:"basic";n[t].push(e)})),n}(E,h)),[E,h]),S=(0,r.useMemo)((()=>{const e=(0,W.Fx)(E,(e=>{const{getProp:t}=e,n=V(e,["getProp"]);return Object.assign(Object.assign({},n),null==t?void 0:t(b))}));return m?function(e,t){if(!t)return e;const n=new RegExp(t,"ig");return(0,W.lH)(e,(e=>n.test(e.title)||n.test(e.name)),"props")}(e,m):p?x[y]||[]:e}),[m,E,y,b,p,x]),O=(0,r.useCallback)((e=>e.map((e=>{const{getProp:t}=e,n=V(e,["getProp"]),r=Object.assign(Object.assign({},n),null==t?void 0:t(b));return $K(r.props)?i().createElement(JK,Object.assign({key:e.name},r)):i().createElement(WK,Object.assign({key:e.name,extra:null==f?void 0:f(r)},r))}))),[b,f]);return(0,r.useEffect)((()=>{n&&n!==b&&v(n)}),[n]),i().createElement(CK,{value:{disableSwitchExpressionSetter:t,showItemSubtitle:d}},i().createElement(OK,{value:b},i().createElement(c.xu,{className:"SettingForm",mb:"xl",css:lW},i().createElement(c.xu,{className:"SettingFormHeader",bg:"white"},i().createElement(c.xu,{px:"l",py:"m"},a&&i().createElement(jK,{title:e.title,subTitle:i().createElement(WK,{noStyle:!0,setter:"idSetter",name:a.identifierKey}),extra:(null==e?void 0:e.docs)?i().createElement(ae,{icon:i().createElement(aW,null),tooltip:"查看组件文档",href:e.docs}):null}),l&&i().createElement(c.xu,{className:"SettingFormSearch",mt:"m"},i().createElement(YV,{placeholder:"搜索属性",onChange:e=>{g(null==e?void 0:e.trim())}}))),!m&&p&&i().createElement(c.xu,{className:"SettingFormNav"},i().createElement(yK,{activeKey:y,onChange:_},h.map((e=>i().createElement(yK.TabPane,{key:e.value,tab:e.label,disabled:!x[e.value].length})))))),i().createElement(c.xu,{className:"SettingFormMain",display:"flex",flexDirection:"column",paddingBottom:"m",rowGap:"m",overflow:"auto"},O(S),0===S.length&&i().createElement(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:"未找到配置项"})))))}uW.register=KK;var pW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},dW=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:pW}))};dW.displayName="HolderOutlined";var fW=r.forwardRef(dW),hW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},mW=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:hW}))};mW.displayName="EditOutlined";var gW=r.forwardRef(mW);const yW=e=>{var{children:t,index:n,onMove:r}=e,s=V(e,["children","index","onMove"]);return i().createElement(c.xu,Object.assign({},s,{draggable:!0,onDragStart:e=>{e.dataTransfer.setData("text",`${n}`)},onDragEnd:e=>{e.dataTransfer.dropEffect="move"},onDragOver:e=>{e.preventDefault()},onDrop:e=>{const t=e.dataTransfer.getData("text");null==r||r(+t,n)}}),t)},_W=c.iv` display: flex; align-items: center; margin-bottom: 12px; @@ -359,7 +368,7 @@ .ant-tree-indent-unit { width: 12px; } -`;function QW(e){const{dataSource:t=[],serviceModules:n=[],appContext:s={},defaultValueDetailMode:o,onSelect:a=q,onAddStoreVariable:l=q,onAddStore:p=q,onAddService:d=q,onUpdateStoreVariable:f=q,onUpdateService:h=q,onRemoveStoreVariable:m,onRemoveService:g,onCopy:y=q,onView:_=q,getServiceData:b,getServiceNames:v,getStoreNames:E,getPreviewValue:x=q,showViewButton:S,renderHeaderExtra:O,renderDetail:T}=e,w=V(e,["dataSource","serviceModules","appContext","defaultValueDetailMode","onSelect","onAddStoreVariable","onAddStore","onAddService","onUpdateStoreVariable","onUpdateService","onRemoveStoreVariable","onRemoveService","onCopy","onView","getServiceData","getServiceNames","getStoreNames","getPreviewValue","showViewButton","renderHeaderExtra","renderDetail"]),[C,A]=(0,r.useState)(""),[P,k]=(0,r.useState)(),[D,R]=(0,r.useState)(),I=(0,r.useCallback)((()=>{k(null),R(null)}),[]),L=(0,r.useCallback)(((e,t)=>{(0,$.q9)(e.key)?R("storeVariableDetail"):(0,$.E7)(e.key)?R("serviceDetail"):R("detail"),k(e),null==t||t(e)}),[]),B=(0,r.useMemo)((()=>{const e=new RegExp(C,"ig");return C?(0,W.lH)(t,(t=>e.test(t.title)),"children",!0):t}),[C,t]),M={activeNode:P,mode:D,setMode:R,clear:I};return i().createElement(c.xu,Object.assign({display:"flex",columnGap:"l",className:"VariableTree",css:qW},w),i().createElement(c.xu,{className:"VariableList",width:"40%"},null==O?void 0:O(e,M),i().createElement(c.xu,{mb:"m",position:"sticky",top:"0",bg:"white",zIndex:2},i().createElement(HV,{placeholder:"请输入变量名",onChange:e=>A(null==e?void 0:e.trim())})),i().createElement(u.Tree,{blockNode:!0,showIcon:!1,defaultExpandAll:!0,treeData:B,onSelect:(e,t)=>{L(t.node,a)},titleRender:e=>{var t;if(!e.children){const n=null!==(t=e.showViewButton)&&void 0!==t?t:S;let r=e.key;return/^(stores|services)\./.test(r)&&(r=`tango.${e.key.replaceAll(".","?.").replace("?.",".")}`),i().createElement(c.xu,{display:"flex",justifyContent:"space-between",alignItems:"center"},i().createElement(c.xv,{flex:"1",truncated:!0},e.title,"function"===e.type&&i().createElement(c.xv,{color:"text3",ml:"m"},i().createElement(TW.Z,null))),i().createElement(c.xu,{flex:"0 0 72px",textAlign:"right"},e.showRemoveButton&&i().createElement(u.Popconfirm,{title:`确认删除吗 ${e.title}?该操作会导致引用此模型的代码报错,请谨慎操作!`,onConfirm:()=>{(0,$.q9)(e.key)?m(e.key):g(e.key)}},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(lK,null),onClick:e=>{e.stopPropagation()}})),i().createElement(vK,{text:r},(({copied:t,onClick:n})=>{const r=t?"已复制":"复制变量路径";return i().createElement(u.Tooltip,{title:r},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(AW,null),onClick:t=>{t.stopPropagation(),n(),y(e)}}))})),n&&i().createElement(u.Tooltip,{title:"查看变量详情"},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(DW,null),onClick:t=>{t.stopPropagation(),L(e,_)}}))))}return i().createElement(c.xu,{display:"flex",alignItems:"center",justifyContent:"space-between"},i().createElement(c.xv,{mr:"m"},e.title),i().createElement(c.xu,null,/^\$?stores$/.test(e.key)&&i().createElement(u.Tooltip,{title:"新建数据模型"},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(sK,null),onClick:e=>{e.stopPropagation(),R("addStore")}})),e.showAddButton&&/^stores\.[a-zA-Z0-9]+$/.test(e.key)&&i().createElement(u.Tooltip,{title:`向 ${e.title} 中添加变量`},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(sK,null),onClick:t=>{t.stopPropagation(),k(e),R("addVariable")}})),/^services(\.[a-zA-Z0-9]+)?$/.test(e.key)&&i().createElement(u.Tooltip,{title:`向 ${e.title} 中添加服务函数`},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(sK,null),onClick:t=>{t.stopPropagation(),k(e),R("addService")}}))))}})),i().createElement(c.xu,{className:"VariableDetail",flex:"1",position:"sticky",top:"0",overflow:"auto"},function(){var t;const r=null==T?void 0:T(e,M);return r||("detail"===D?i().createElement(NW,{data:P}):"storeVariableDetail"===D?i().createElement(MW,{key:P.key,defaultMode:o},(e=>"runtime"===e?i().createElement(FW,{value:x(P),onCopy:e=>["tango",P.key.replaceAll(".","?."),e].join(".")}):i().createElement(jW,{data:P,onSave:f}))):"serviceDetail"===D?i().createElement(i().Fragment,null,i().createElement(We,{shape:"solid",title:"服务函数配置"},i().createElement(LW,{key:P.key,serviceModules:n,serviceNames:function(){const{moduleName:e}=(0,OW.Ak)(P.key);return(null==v?void 0:v(e))||[]}(),initialValues:Object.assign({},null==b?void 0:b(P.key)),onCancel:I,onSubmit:e=>{h(e)}})),i().createElement(We,{shape:"solid",title:"服务函数预览",mt:"l"},i().createElement(WW,{key:P.key,appContext:s,functionKey:P.key}))):"addVariable"===D?i().createElement(RW,{parentNode:P,onSubmit:(e,t)=>{l(e,t),I()},onCancel:()=>{I()}}):"addStore"===D?i().createElement(IW,{storeNames:(null==E?void 0:E())||[],onSubmit:({name:e})=>{p(e),I()},onCancel:()=>{I()}}):"addService"===D?i().createElement(We,{shape:"solid",title:"创建服务函数"},i().createElement(LW,{key:P.key,serviceModules:n,serviceNames:(null===(t=P.children)||void 0===t?void 0:t.map((e=>e.title)))||[],initialValues:{moduleName:P.title},onCancel:()=>{I()},onSubmit:e=>{d(e),I()}})):void 0)}()))}function zW(e){var{trigger:t,title:n,modalProps:s,onSelect:o=q}=e,a=V(e,["trigger","title","modalProps","onSelect"]);const[l,p]=(0,r.useState)(),[d,{on:f,off:h}]=EK(!1);return i().createElement(c.xu,null,i().cloneElement(t,{onClick:f}),i().createElement(u.Modal,Object.assign({title:n,open:d,onCancel:h,okButtonProps:{disabled:!l},onOk:()=>{l&&(o(l),h())},width:"60%"},s),i().createElement(QW,Object.assign({height:400,onSelect:p},a))))}const XW=c.iv` +`;function QW(e){const{dataSource:t=[],serviceModules:n=[],appContext:s={},defaultValueDetailMode:o,onSelect:a=q,onAddStoreVariable:l=q,onAddStore:p=q,onAddService:d=q,onUpdateStoreVariable:f=q,onUpdateService:h=q,onRemoveStoreVariable:m,onRemoveService:g,onCopy:y=q,onView:_=q,getServiceData:b,getServiceNames:v,getStoreNames:E,getPreviewValue:x=q,showViewButton:S,renderHeaderExtra:O,renderDetail:T}=e,w=V(e,["dataSource","serviceModules","appContext","defaultValueDetailMode","onSelect","onAddStoreVariable","onAddStore","onAddService","onUpdateStoreVariable","onUpdateService","onRemoveStoreVariable","onRemoveService","onCopy","onView","getServiceData","getServiceNames","getStoreNames","getPreviewValue","showViewButton","renderHeaderExtra","renderDetail"]),[C,A]=(0,r.useState)(""),[P,k]=(0,r.useState)(),[D,R]=(0,r.useState)(),I=(0,r.useCallback)((()=>{k(null),R(null)}),[]),L=(0,r.useCallback)(((e,t)=>{(0,$.q9)(e.key)?R("storeVariableDetail"):(0,$.E7)(e.key)?R("serviceDetail"):R("detail"),k(e),null==t||t(e)}),[]),B=(0,r.useMemo)((()=>{const e=new RegExp(C,"ig");return C?(0,W.lH)(t,(t=>e.test(t.title)),"children",!0):t}),[C,t]),M={activeNode:P,mode:D,setMode:R,clear:I};return i().createElement(c.xu,Object.assign({display:"flex",columnGap:"l",className:"VariableTree",css:qW},w),i().createElement(c.xu,{className:"VariableList",width:"40%"},null==O?void 0:O(e,M),i().createElement(c.xu,{mb:"m",position:"sticky",top:"0",bg:"white",zIndex:2},i().createElement(YV,{placeholder:"请输入变量名",onChange:e=>A(null==e?void 0:e.trim())})),i().createElement(u.Tree,{blockNode:!0,showIcon:!1,defaultExpandAll:!0,treeData:B,onSelect:(e,t)=>{L(t.node,a)},titleRender:e=>{var t;if(!e.children){const n=null!==(t=e.showViewButton)&&void 0!==t?t:S;let r=e.key;return/^(stores|services)\./.test(r)&&(r=`tango.${e.key.replaceAll(".","?.").replace("?.",".")}`),i().createElement(c.xu,{display:"flex",justifyContent:"space-between",alignItems:"center"},i().createElement(c.xv,{flex:"1",truncated:!0},e.title,"function"===e.type&&i().createElement(c.xv,{color:"text3",ml:"m"},i().createElement(TW.Z,null))),i().createElement(c.xu,{flex:"0 0 72px",textAlign:"right"},e.showRemoveButton&&i().createElement(u.Popconfirm,{title:`确认删除吗 ${e.title}?该操作会导致引用此模型的代码报错,请谨慎操作!`,onConfirm:()=>{(0,$.q9)(e.key)?m(e.key):g(e.key)}},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(lK,null),onClick:e=>{e.stopPropagation()}})),i().createElement(vK,{text:r},(({copied:t,onClick:n})=>{const r=t?"已复制":"复制变量路径";return i().createElement(u.Tooltip,{title:r},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(AW,null),onClick:t=>{t.stopPropagation(),n(),y(e)}}))})),n&&i().createElement(u.Tooltip,{title:"查看变量详情"},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(DW,null),onClick:t=>{t.stopPropagation(),L(e,_)}}))))}return i().createElement(c.xu,{display:"flex",alignItems:"center",justifyContent:"space-between"},i().createElement(c.xv,{mr:"m"},e.title),i().createElement(c.xu,null,/^\$?stores$/.test(e.key)&&i().createElement(u.Tooltip,{title:"新建数据模型"},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(sK,null),onClick:e=>{e.stopPropagation(),R("addStore")}})),e.showAddButton&&/^stores\.[a-zA-Z0-9]+$/.test(e.key)&&i().createElement(u.Tooltip,{title:`向 ${e.title} 中添加变量`},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(sK,null),onClick:t=>{t.stopPropagation(),k(e),R("addVariable")}})),/^services(\.[a-zA-Z0-9]+)?$/.test(e.key)&&i().createElement(u.Tooltip,{title:`向 ${e.title} 中添加服务函数`},i().createElement(u.Button,{type:"text",size:"small",icon:i().createElement(sK,null),onClick:t=>{t.stopPropagation(),k(e),R("addService")}}))))}})),i().createElement(c.xu,{className:"VariableDetail",flex:"1",position:"sticky",top:"0",overflow:"auto"},function(){var t;const r=null==T?void 0:T(e,M);return r||("detail"===D?i().createElement(NW,{data:P}):"storeVariableDetail"===D?i().createElement(MW,{key:P.key,defaultMode:o},(e=>"runtime"===e?i().createElement(FW,{value:x(P),onCopy:e=>["tango",P.key.replaceAll(".","?."),e].join(".")}):i().createElement(jW,{data:P,onSave:f}))):"serviceDetail"===D?i().createElement(i().Fragment,null,i().createElement(We,{shape:"solid",title:"服务函数配置"},i().createElement(LW,{key:P.key,serviceModules:n,serviceNames:function(){const{moduleName:e}=(0,OW.Ak)(P.key);return(null==v?void 0:v(e))||[]}(),initialValues:Object.assign({},null==b?void 0:b(P.key)),onCancel:I,onSubmit:e=>{h(e)}})),i().createElement(We,{shape:"solid",title:"服务函数预览",mt:"l"},i().createElement(WW,{key:P.key,appContext:s,functionKey:P.key}))):"addVariable"===D?i().createElement(RW,{parentNode:P,onSubmit:(e,t)=>{l(e,t),I()},onCancel:()=>{I()}}):"addStore"===D?i().createElement(IW,{storeNames:(null==E?void 0:E())||[],onSubmit:({name:e})=>{p(e),I()},onCancel:()=>{I()}}):"addService"===D?i().createElement(We,{shape:"solid",title:"创建服务函数"},i().createElement(LW,{key:P.key,serviceModules:n,serviceNames:(null===(t=P.children)||void 0===t?void 0:t.map((e=>e.title)))||[],initialValues:{moduleName:P.title},onCancel:()=>{I()},onSubmit:e=>{d(e),I()}})):void 0)}()))}function zW(e){var{trigger:t,title:n,modalProps:s,onSelect:o=q}=e,a=V(e,["trigger","title","modalProps","onSelect"]);const[l,p]=(0,r.useState)(),[d,{on:f,off:h}]=EK(!1);return i().createElement(c.xu,null,i().cloneElement(t,{onClick:f}),i().createElement(u.Modal,Object.assign({title:n,open:d,onCancel:h,okButtonProps:{disabled:!l},onOk:()=>{l&&(o(l),h())},width:"60%"},s),i().createElement(QW,Object.assign({height:400,onSelect:p},a))))}const XW=c.iv` display: flex; justify-content: space-between; border: 1px solid var(--tango-colors-line-normal); @@ -377,20 +386,22 @@ margin-right: 8px; cursor: move; } -`;function ZW(e){var{children:t,onRemove:n,index:r=0,onMove:s}=e,o=V(e,["children","onRemove","index","onMove"]);return i().createElement(yW,{mb:"m",index:r,css:XW,onMove:s},i().createElement(c.xu,{css:GW},i().createElement(fW,{className:"icon"}),t),i().createElement("div",null,i().createElement(YW,Object.assign({},o)),i().createElement(u.Button,{type:"link",icon:i().createElement(lK,null),onClick:n})))}function YW({formFields:e,formInitialValues:t,onEdit:n}){const[s,o]=(0,r.useState)(!1);return i().createElement(u.Popover,{visible:s,onVisibleChange:o,trigger:"click",placement:"leftTop",title:"修改数据",content:i().createElement(t$,{fields:e,initialValues:t,onSubmit:e=>{n&&n(e),o(!1)}})},i().createElement(u.Button,{type:"link",icon:i().createElement(gW,null)}))}function HW({formFields:e=[],formInitialValues:t={},getFormInitialValues:n,text:s="添加一项",onAdd:o}){var a;const[l,c]=(0,r.useState)(!1),p=null!==(a=null==n?void 0:n())&&void 0!==a?a:t;return i().createElement(u.Popover,{destroyTooltipOnHide:!0,visible:l,onVisibleChange:c,trigger:"click",placement:"leftTop",title:s,content:i().createElement(t$,{fields:e,initialValues:p,onSubmit:e=>{o&&o(e),c(!1)}})},i().createElement(u.Button,{block:!0},s))}const JW={labelCol:{span:8},wrapperCol:{span:16}},e$={wrapperCol:{offset:8,span:16}};function t$({fields:e=[],initialValues:t={},onSubmit:n}){const[r]=u.Form.useForm();return i().createElement(u.Form,Object.assign({form:r,onFinish:e=>{n&&n(function(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}(e))}},JW),e.map((e=>i().createElement(u.Form.Item,{key:e.name,label:e.label,name:e.name,required:e.required,valuePropName:e.valuePropName,extra:e.extra,style:{width:e.width},initialValue:t[e.name]},e.component||i().createElement(u.Input,{placeholder:"请输入",autoComplete:"off"})))),i().createElement(u.Form.Item,Object.assign({},e$),i().createElement(u.Button,{type:"primary",htmlType:"submit"},"提交")))}const n$=[{label:"key",name:"key",required:!0}],r$=e=>e.key,i$=e=>e.key;function s$(e){const{listItemFormFields:t=n$,newItemDefaultValues:n,getNewItemDefaultValues:r,addBtnText:s,getListItemKey:o=r$,renderItem:a=i$}=e,l=V(e,["listItemFormFields","newItemDefaultValues","getNewItemDefaultValues","addBtnText","getListItemKey","renderItem"]),{value:u,onAdd:p,getOnEdit:d,getOnRemove:f,onMove:h}=function(e){const{value:t=[],onChange:n}=e,r=V(e,["value","onChange"]),i=Array.isArray(t)?t:[],s=(e=[])=>{n&&n(e)};return Object.assign({value:i,onAdd:e=>{const t=[...i].concat([e]);s(t)},getOnEdit:e=>t=>{const n=[...i];n[e]=t,s(n)},getOnRemove:e=>()=>{const t=[...i];t.splice(e,1),s(t)},onMove:(e,t)=>{const n=[...i],r=n[t];n[t]=n[e],n[e]=r,s(n)}},r)}(l);return i().createElement(c.xu,null,i().createElement(c.xu,null,u.map(((e,n)=>i().createElement(ZW,{key:o(e),index:n,formFields:t,formInitialValues:e,onEdit:d(n),onRemove:f(n),onMove:h},a(e))))),i().createElement(HW,{text:s,formFields:t,formInitialValues:n,getFormInitialValues:r,onAdd:p}))}const o$={key:"1",label:"按钮"},a$=[{label:"key",name:"key",required:!0},{label:"文本",name:"label",required:!0},{label:"外观",name:"shape",component:i().createElement(u.Select,{placeholder:"请选择",options:[{label:"普通按钮",value:"button"},{label:"文本按钮",value:"text"}]})},{label:"按钮类型",name:"buttonType",component:i().createElement(u.Select,{placeholder:"请选择",options:[{label:"主要",value:"primary"},{label:"次要",value:"secondary"},{label:"普通",value:"normal"}]})},{label:"类型",name:"actionType",component:i().createElement(u.Select,{placeholder:"请选择",options:[{label:"普通动作",value:"action"},{label:"确认提示",value:"confirm"}]})},{label:"确认气泡内容",name:"confirmContent"}],l$=e=>e.key,c$=e=>e.label;var u$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M875.6 515.9c2.1.8 4.4-.3 5.2-2.4.2-.4.2-.9.2-1.4v-58.3c0-1.8-1.1-3.3-2.8-3.8-6-1.8-17.2-3-27.2-3-32.9 0-61.7 16.7-73.5 41.2v-28.6c0-4.4-3.6-8-8-8H717c-4.4 0-8 3.6-8 8V729c0 4.4 3.6 8 8 8h54.8c4.4 0 8-3.6 8-8V572.7c0-36.2 26.1-60.2 65.1-60.2 10.4.1 26.6 1.8 30.7 3.4zm-537-40.5l-54.7-12.6c-61.2-14.2-87.7-34.8-87.7-70.7 0-44.6 39.1-73.5 96.9-73.5 52.8 0 91.4 26.5 99.9 68.9h70C455.9 311.6 387.6 259 293.4 259c-103.3 0-171 55.5-171 139 0 68.6 38.6 109.5 122.2 128.5l61.6 14.3c63.6 14.9 91.6 37.1 91.6 75.1 0 44.1-43.5 75.2-102.5 75.2-60.6 0-104.5-27.2-112.8-70.5H111c7.2 79.9 75.6 130.4 179.1 130.4C402.3 751 471 695.2 471 605.3c0-70.2-38.6-108.5-132.4-129.9zM841 729a36 36 0 1072 0 36 36 0 10-72 0zM653 457.8h-51.4V396c0-4.4-3.6-8-8-8h-54.7c-4.4 0-8 3.6-8 8v61.8H495c-4.4 0-8 3.6-8 8v42.3c0 4.4 3.6 8 8 8h35.9v147.5c0 56.2 27.4 79.4 93.1 79.4 11.7 0 23.6-1.2 33.8-3.1 1.9-.3 3.2-2 3.2-3.9v-49.3c0-2.2-1.8-4-4-4h-.4c-4.9.5-6.2.6-8.3.8-4.1.3-7.8.5-12.6.5-24.1 0-34.1-10.3-34.1-35.6V516.1H653c4.4 0 8-3.6 8-8v-42.3c0-4.4-3.6-8-8-8z"}}]},name:"field-string",theme:"outlined"},p$=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:u$}))};p$.displayName="FieldStringOutlined";var d$=r.forwardRef(p$);const f$={title:"Column"},h$=[{label:"key",name:"key",required:!0},{label:"dataIndex",name:"dataIndex",required:!0},{label:"列标题",name:"title",required:!0},{label:"列宽",name:"width"},{label:"锁列",name:"fixed",valuePropName:"checked",component:i().createElement(u.Switch,null)}],m$=e=>i().createElement(i().Fragment,null,i().createElement(d$,null),i().createElement(c.xu,{display:"inline-block",ml:"m"},e.title));var g$=n(98317);const y$={width:"100%"};function _$(e){return i().createElement(u.Slider,Object.assign({},e))}var b$=n(79941),v$=function(e,t,n,r,i){var s=i.clientWidth,o=i.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(i.getBoundingClientRect().left+window.pageXOffset),u=l-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var p=void 0;if(p=u<0?0:u>o?1:Math.round(100*u/o)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var d=void 0;if(r!==(d=c<0?0:c>s?1:Math.round(100*c/s)/100))return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}return null},E$={},x$=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(E$[i])return E$[i];var s=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var s=i.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,i.width,i.height),s.fillStyle=t,s.fillRect(0,0,n,n),s.translate(n,n),s.fillRect(0,0,n,n),i.toDataURL()):null}(e,t,n,r);return E$[i]=s,s},S$=Object.assign||function(e){for(var t=1;t-1)){var i=n.getArrowOffset(),s=38===e.keyCode?r+i:r-i;n.setUpdatedValue(s,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+L$++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),R$(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,b$.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i().createElement("div",{style:t.wrap},i().createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i().createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),M$=B$,j$=function(e,t,n,r){var i=r.clientWidth,s=r.clientHeight,o="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,a="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=o-(r.getBoundingClientRect().left+window.pageXOffset),c=a-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u=void 0;if(c<0)u=359;else if(c>s)u=0;else{u=360*(-100*c/s+100)/100}if(n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var p=void 0;if(l<0)p=0;else if(l>i)p=359;else{p=360*(100*l/i)/100}if(n.h!==p)return{h:p,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},N$=function(){function e(e,t){for(var n=0;n-1};var H$=function(e,t){var n=this.__data__,r=z$(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function J$(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var IQ=function(e){return null!=e&&RQ(e.length)&&!vq(e)};var LQ=function(e){return OQ(e)&&IQ(e)};var BQ=function(){return!1},MQ="object"==typeof exports&&exports&&!exports.nodeType&&exports,jQ=MQ&&"object"==typeof module&&module&&!module.nodeType&&module,NQ=jQ&&jQ.exports===MQ?aq.Buffer:void 0,FQ=(NQ?NQ.isBuffer:void 0)||BQ,UQ=Function.prototype,VQ=Object.prototype,KQ=UQ.toString,WQ=VQ.hasOwnProperty,$Q=KQ.call(Object);var qQ=function(e){if(!OQ(e)||"[object Object]"!=yq(e))return!1;var t=vQ(e);if(null===t)return!0;var n=WQ.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&KQ.call(n)==$Q},QQ={};QQ["[object Float32Array]"]=QQ["[object Float64Array]"]=QQ["[object Int8Array]"]=QQ["[object Int16Array]"]=QQ["[object Int32Array]"]=QQ["[object Uint8Array]"]=QQ["[object Uint8ClampedArray]"]=QQ["[object Uint16Array]"]=QQ["[object Uint32Array]"]=!0,QQ["[object Arguments]"]=QQ["[object Array]"]=QQ["[object ArrayBuffer]"]=QQ["[object Boolean]"]=QQ["[object DataView]"]=QQ["[object Date]"]=QQ["[object Error]"]=QQ["[object Function]"]=QQ["[object Map]"]=QQ["[object Number]"]=QQ["[object Object]"]=QQ["[object RegExp]"]=QQ["[object Set]"]=QQ["[object String]"]=QQ["[object WeakMap]"]=!1;var zQ=function(e){return OQ(e)&&RQ(e.length)&&!!QQ[yq(e)]};var XQ=function(e){return function(t){return e(t)}},GQ="object"==typeof exports&&exports&&!exports.nodeType&&exports,ZQ=GQ&&"object"==typeof module&&module&&!module.nodeType&&module,YQ=ZQ&&ZQ.exports===GQ&&sq.process,HQ=function(){try{var e=ZQ&&ZQ.require&&ZQ.require("util").types;return e||YQ&&YQ.binding&&YQ.binding("util")}catch(e){}}(),JQ=HQ&&HQ.isTypedArray,ez=JQ?XQ(JQ):zQ;var tz=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},nz=Object.prototype.hasOwnProperty;var rz=function(e,t,n){var r=e[t];nz.call(e,t)&&Q$(r,n)&&(void 0!==n||t in e)||sQ(e,t,n)};var iz=function(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},wz=Tz(Sz);var Cz=function(e,t){return wz(vz(e,t,yz),e+"")};var Az=function(e,t,n){if(!_q(n))return!1;var r=typeof t;return!!("number"==r?IQ(n)&&az(t,n.length):"string"==r&&t in n)&&Q$(n[t],e)};var Pz=function(e){return Cz((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,o&&Az(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r=t||n<0||p&&e-c>=s}function g(){var e=Rz();if(m(e))return y(e);a=setTimeout(g,function(e){var n=t-(e-l);return p?$z(n,s-(e-c)):n}(e))}function y(e){return a=void 0,d&&r?f(e):(r=i=void 0,o)}function _(){var e=Rz(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return h(l);if(p)return clearTimeout(a),a=setTimeout(g,t),f(l)}return void 0===a&&(a=setTimeout(g,t)),o}return t=Kz(t)||0,_q(n)&&(u=!!n.leading,s=(p="maxWait"in n)?Wz(Kz(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),_.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},_.flush=function(){return void 0===a?o:y(Rz())},_};var Qz=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return _q(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),qz(e,t,{leading:r,maxWait:t,trailing:i})},zz=function(){function e(e,t){for(var n=0;ni&&(l=i),c<0?c=0:c>s&&(c=s);var u=l/i,p=1-c/s;return{h:t.h,s:u,v:p,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=Qz((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),zz(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,s=t.black,o=t.pointer,a=t.circle,l=(0,b$.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:s,pointer:o,circle:a}},{custom:!!this.props.style});return i().createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i().createElement("div",{style:l.white,className:"saturation-white"},i().createElement("div",{style:l.black,className:"saturation-black"}),i().createElement("div",{style:l.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:l.circle}))))}}]),t}(r.PureComponent||r.Component),Gz=Xz;var Zz=function(e,t){for(var n=-1,r=null==e?0:e.length;++n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=CX(e,360),t=CX(t,100),n=CX(n,100),0===t)r=i=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=o(l,a,e+1/3),i=o(l,a,e),s=o(l,a,e-1/3)}return{r:255*r,g:255*i,b:255*s}}(e.h,r,s),o=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=wX(n),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function lX(e,t,n){e=CX(e,255),t=CX(t,255),n=CX(n,255);var r,i,s=Math.max(e,t,n),o=Math.min(e,t,n),a=(s+o)/2;if(s==o)r=i=0;else{var l=s-o;switch(i=a>.5?l/(2-s-o):l/(s+o),s){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,s.push(aX(r));return s}function SX(e,t){t=t||6;for(var n=aX(e).toHsv(),r=n.h,i=n.s,s=n.v,o=[],a=1/t;t--;)o.push(aX({h:r,s:i,v:s})),s=(s+a)%1;return o}aX.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=wX(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=cX(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=cX(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=lX(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=lX(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return uX(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var s=[kX(Math.round(e).toString(16)),kX(Math.round(t).toString(16)),kX(Math.round(n).toString(16)),kX(RX(r))];if(i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*CX(this._r,255))+"%",g:Math.round(100*CX(this._g,255))+"%",b:Math.round(100*CX(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*CX(this._r,255))+"%, "+Math.round(100*CX(this._g,255))+"%, "+Math.round(100*CX(this._b,255))+"%)":"rgba("+Math.round(100*CX(this._r,255))+"%, "+Math.round(100*CX(this._g,255))+"%, "+Math.round(100*CX(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(TX[uX(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+pX(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=aX(e);n="#"+pX(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return aX(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(mX,arguments)},brighten:function(){return this._applyModification(gX,arguments)},darken:function(){return this._applyModification(yX,arguments)},desaturate:function(){return this._applyModification(dX,arguments)},saturate:function(){return this._applyModification(fX,arguments)},greyscale:function(){return this._applyModification(hX,arguments)},spin:function(){return this._applyModification(_X,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(xX,arguments)},complement:function(){return this._applyCombination(bX,arguments)},monochromatic:function(){return this._applyCombination(SX,arguments)},splitcomplement:function(){return this._applyCombination(EX,arguments)},triad:function(){return this._applyCombination(vX,[3])},tetrad:function(){return this._applyCombination(vX,[4])}},aX.fromRatio=function(e,t){if("object"==iX(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:DX(e[r]));e=n}return aX(e,t)},aX.equals=function(e,t){return!(!e||!t)&&aX(e).toRgbString()==aX(t).toRgbString()},aX.random=function(){return aX.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},aX.mix=function(e,t,n){n=0===n?0:n||50;var r=aX(e).toRgb(),i=aX(t).toRgb(),s=n/100;return aX({r:(i.r-r.r)*s+r.r,g:(i.g-r.g)*s+r.g,b:(i.b-r.b)*s+r.b,a:(i.a-r.a)*s+r.a})},aX.readability=function(e,t){var n=aX(e),r=aX(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},aX.isReadable=function(e,t,n){var r,i,s=aX.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=s>=4.5;break;case"AAlarge":i=s>=3;break;case"AAAsmall":i=s>=7}return i},aX.mostReadable=function(e,t,n){var r,i,s,o,a=null,l=0;i=(n=n||{}).includeFallbackColors,s=n.level,o=n.size;for(var c=0;cl&&(l=r,a=aX(t[c]));return aX.isReadable(e,a,{level:s,size:o})||!i?a:(n.includeFallbackColors=!1,aX.mostReadable(e,["#fff","#000"],n))};var OX=aX.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},TX=aX.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(OX);function wX(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function CX(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function AX(e){return Math.min(1,Math.max(0,e))}function PX(e){return parseInt(e,16)}function kX(e){return 1==e.length?"0"+e:""+e}function DX(e){return e<=1&&(e=100*e+"%"),e}function RX(e){return Math.round(255*parseFloat(e)).toString(16)}function IX(e){return PX(e)/255}var LX,BX,MX,jX=(BX="[\\s|\\(]+("+(LX="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+LX+")[,|\\s]+("+LX+")\\s*\\)?",MX="[\\s|\\(]+("+LX+")[,|\\s]+("+LX+")[,|\\s]+("+LX+")[,|\\s]+("+LX+")\\s*\\)?",{CSS_UNIT:new RegExp(LX),rgb:new RegExp("rgb"+BX),rgba:new RegExp("rgba"+MX),hsl:new RegExp("hsl"+BX),hsla:new RegExp("hsla"+MX),hsv:new RegExp("hsv"+BX),hsva:new RegExp("hsva"+MX),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function NX(e){return!!jX.CSS_UNIT.exec(e)}var FX=function(e){var t=0,n=0;return rX(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},UX=function(e,t){var n=e.hex?aX(e.hex):aX(e),r=n.toHsl(),i=n.toHsv(),s=n.toRgb(),o=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===o&&0===s.a?"transparent":"#"+o,rgb:s,hsv:i,oldHue:e.h||t||r.h,source:e.source}},VX=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&aX(e).isValid()},KX=function(e){if(!e)return"#fff";var t=UX(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},WX=function(e,t){return aX(t+" ("+e.replace("°","")+")")._ok},$X=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;GX(this,r);for(var i=arguments.length,s=Array(i),o=0;oa))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var p=-1,d=!0,f=2&n?new aG:void 0;for(s.set(e,t),s.set(t,e);++p1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(ZZ(e.s)?n.props.hsl.s:e.s),l:Number(ZZ(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),HZ(t,[{key:"render",value:function(){var e=this,t=(0,b$.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(M$,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(M$,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i().createElement("div",{style:t.wrap,className:"flexbox-fix"},n,i().createElement("div",{style:t.toggle},i().createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i().createElement(YZ.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i().Component);JZ.defaultProps={view:"hex"};var eY=JZ,tY=function(){var e=(0,b$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i().createElement("div",{style:e.picker})},nY=function(){var e=(0,b$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i().createElement("div",{style:e.picker})},rY=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,s=e.rgb,o=e.hsl,a=e.hsv,l=e.hex,c=e.renderers,u=e.styles,p=void 0===u?{}:u,d=e.className,f=void 0===d?"":d,h=e.defaultView,m=(0,b$.ZP)(Pz({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+s.r+", "+s.g+", "+s.b+", "+s.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:r});return i().createElement("div",{style:m.picker,className:"chrome-picker "+f},i().createElement("div",{style:m.saturation},i().createElement(Gz,{style:m.Saturation,hsl:o,hsv:a,pointer:nY,onChange:n})),i().createElement("div",{style:m.body},i().createElement("div",{style:m.controls,className:"flexbox-fix"},i().createElement("div",{style:m.color},i().createElement("div",{style:m.swatch},i().createElement("div",{style:m.active}),i().createElement(T$,{renderers:c}))),i().createElement("div",{style:m.toggles},i().createElement("div",{style:m.hue},i().createElement(K$,{style:m.Hue,hsl:o,pointer:tY,onChange:n})),i().createElement("div",{style:m.alpha},i().createElement(D$,{style:m.Alpha,rgb:s,hsl:o,pointer:tY,renderers:c,onChange:n})))),i().createElement(eY,{rgb:s,hsl:o,hex:l,view:h,onChange:n,disableAlpha:r})))};rY.propTypes={width:$$().oneOfType([$$().string,$$().number]),disableAlpha:$$().bool,styles:$$().object,defaultView:$$().oneOf(["hex","rgb","hsl"])},rY.defaultProps={width:225,disableAlpha:!1,styles:{}};QX(rY);var iY=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,s=e.onSwatchHover,o=e.active,a=(0,b$.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:KX(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i().createElement(JX,{style:a.color,color:t,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},i().createElement("div",{style:a.dot}))},sY=function(e){var t=e.hex,n=e.rgb,r=e.onChange,s=(0,b$.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return i().createElement("div",{style:s.fields,className:"flexbox-fix"},i().createElement("div",{style:s.active}),i().createElement(M$,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:t,onChange:o}),i().createElement(M$,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:o}),i().createElement(M$,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:o}),i().createElement(M$,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:o}))},oY=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,s=e.hex,o=e.rgb,a=e.styles,l=void 0===a?{}:a,c=e.className,u=void 0===c?"":c,p=(0,b$.ZP)(Pz({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(e,n){e.hex?VX(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return i().createElement(Dz,{style:p.Compact,styles:l},i().createElement("div",{style:p.compact,className:"compact-picker "+u},i().createElement("div",null,wZ(r,(function(e){return i().createElement(iY,{key:e,color:e,active:e.toLowerCase()===s,onClick:d,onSwatchHover:n})})),i().createElement("div",{style:p.clear})),i().createElement(sY,{hex:s,rgb:o,onChange:d})))};oY.propTypes={colors:$$().arrayOf($$().string),styles:$$().object},oY.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};QX(oY);var aY=(0,b$.tz)((function(e){var t=e.hover,n=e.color,r=e.onClick,s=e.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=(0,b$.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return i().createElement("div",{style:a.swatch},i().createElement(JX,{color:n,onClick:r,onHover:s,focusStyle:o}))})),lY=function(e){var t=e.width,n=e.colors,r=e.onChange,s=e.onSwatchHover,o=e.triangle,a=e.styles,l=void 0===a?{}:a,c=e.className,u=void 0===c?"":c,p=(0,b$.ZP)(Pz({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===o,"top-left-triangle":"top-left"===o,"top-right-triangle":"top-right"===o,"bottom-left-triangle":"bottom-left"===o,"bottom-right-triangle":"bottom-right"===o}),d=function(e,t){return r({hex:e,source:"hex"},t)};return i().createElement("div",{style:p.card,className:"github-picker "+u},i().createElement("div",{style:p.triangleShadow}),i().createElement("div",{style:p.triangle}),wZ(n,(function(e){return i().createElement(aY,{color:e,key:e,onClick:d,onSwatchHover:s})})))};lY.propTypes={width:$$().oneOfType([$$().string,$$().number]),colors:$$().arrayOf($$().string),triangle:$$().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:$$().object},lY.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};QX(lY);var cY=function(e){var t=e.direction,n=(0,b$.ZP)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return i().createElement("div",{style:n.picker})},uY=Object.assign||function(e){for(var t=1;t.5});return i().createElement("div",{style:n.picker})},hY=function(){var e=(0,b$.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i().createElement("div",{style:e.pointer},i().createElement("div",{style:e.left},i().createElement("div",{style:e.leftInside})),i().createElement("div",{style:e.right},i().createElement("div",{style:e.rightInside})))},mY=function(e){var t=e.onClick,n=e.label,r=e.children,s=e.active,o=(0,b$.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:s});return i().createElement("div",{style:o.button,onClick:t},n||r)},gY=function(e){var t=e.rgb,n=e.currentColor,r=(0,b$.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i().createElement("div",null,i().createElement("div",{style:r.label},"new"),i().createElement("div",{style:r.swatches},i().createElement("div",{style:r.new}),i().createElement("div",{style:r.current})),i().createElement("div",{style:r.label},"current"))},yY=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},i))};return i().createElement("div",{style:a.fields,className:"flexbox-fix"},i().createElement("div",{style:a.double},i().createElement(M$,{style:{input:a.input,label:a.label},label:"hex",value:s.replace("#",""),onChange:l})),i().createElement("div",{style:a.single},i().createElement(M$,{style:{input:a.input,label:a.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:a.single},i().createElement(M$,{style:{input:a.input,label:a.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:a.single},i().createElement(M$,{style:{input:a.input,label:a.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:a.alpha},i().createElement(M$,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},vY=Object.assign||function(e){for(var t=1;te&&e.startsWith("icon-")?i().createElement(Ue,{type:e}):null),[]);return i().createElement(u.Radio.Group,Object.assign({optionType:"button",buttonStyle:"solid",onChange:e=>{n&&n(e.target.value)}},s),t.map((e=>i().createElement(JY,{tip:e.tip,key:e.value,value:e.value},o(e.icon),e.label))))}function JY(e){var{tip:t}=e,n=V(e,["tip"]);let r=i().createElement(u.Radio.Button,Object.assign({},n));return t&&(r=i().createElement(u.Tooltip,{title:t},r)),r}const eH=()=>{};function tH(e){var{value:t,onChange:n=eH,placeholder:s="请输入"}=e,o=V(e,["value","onChange","placeholder"]);const[a,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{l(t)}),[t]),i().createElement(u.Input,Object.assign({placeholder:s,allowClear:!0,value:a,onChange:e=>l(e.target.value),onBlur:()=>{n(a)}},o))}const nH={minRows:2,maxRows:5};function rH({value:e,onChange:t}){const n=function(e){return e&&e.startsWith("{css`")?e.split("").slice(5,-2).join("").trim():e}(e);return i().createElement(u.Popover,{placement:"leftBottom",title:"自定义样式(CSS in JS)",content:i().createElement(c.xu,{height:480,width:400},i().createElement(ve,{language:"css",value:n,onBlur:e=>{e!=n&&t(`{css\`${e}\`}`,{})}}))},i().createElement(u.Button,{block:!0},"编写样式"))}function iH(e){return i().createElement(HY,Object.assign({options:[{value:"block",icon:"icon-display-block",tip:"块级元素"},{value:"inline-block",icon:"icon-display-inline-block",tip:"行内块级元素"},{value:"flex",icon:"icon-flex",tip:"Flex 弹性布局"},{value:"grid",icon:"icon-display-grid",tip:"Grid 弹性网格布局"},{value:"inline",icon:"icon-display-inline",tip:"行内元素"},{value:"none",icon:"icon-display-none",tip:"不显示"}],mode:"icon"},e))}function sH(e){return i().createElement(HY,Object.assign({options:[{value:"column",icon:"icon-direction-column",tip:"单行排列"},{value:"column-reverse",icon:"icon-direction-column-reverse",tip:"单行逆序"},{value:"row",icon:"icon-direction-row",tip:"纵向排列"},{value:"row-reverse",icon:"icon-direction-row-reverse",tip:"纵向逆序"}],mode:"icon"},e))}function oH(e){return i().createElement(HY,Object.assign({options:[{value:"flex-start",icon:"icon-justify-flex-start",tip:"从行首起始位置开始排列"},{value:"flex-end",icon:"icon-justify-flex-end",tip:"从行尾位置开始排列"},{value:"center",icon:"icon-justify-center",tip:"居中排列"},{value:"space-between",icon:"icon-justify-space-between",tip:"均匀排列每个元素,首个元素放置于起点,末尾元素放置于终点"},{value:"space-around",icon:"icon-justify-space-around",tip:"均匀排列每个元素,每个元素周围分配相同的空间"}],mode:"icon"},e))}function aH(e){return i().createElement(HY,Object.assign({options:[{value:"flex-start",icon:"icon-align-flex-start",tip:"元素向辅轴起点对齐"},{value:"flex-end",icon:"icon-align-flex-end",tip:"元素向辅轴终点对齐"},{value:"center",icon:"icon-align-center",tip:"元素在辅轴居中"},{value:"stretch",icon:"icon-align-stretch",tip:"弹性项包含外边距的交叉轴尺寸被拉升至行高"},{value:"baseline",icon:"icon-align-baseline",tip:"所有元素向基线对齐"}],mode:"icon"},e))}function lH(e){const{value:t,onChange:n,placeholder:r="请选择颜色"}=e,s=cH.test(t)?t:function(e){const{r:t,g:n,b:r,alpha:i}=e;return{r:t,g:n,b:r,a:i}}(KY()(t).object()),o=i().createElement(TY,{color:s,onChangeComplete:e=>{const t=1===e.rgb.a?e.hex:`rgba(${(r=e.rgb).r}, ${r.g}, ${r.b}, ${r.a})`;var r;"function"==typeof n&&n(t)}});return i().createElement(u.Dropdown,{overlay:o,trigger:["click"]},i().createElement(u.Input,{prefix:i().createElement(c.xu,{bg:t,border:"solid",borderColor:"gray.40",size:"14px",borderRadius:"s"}),allowClear:!0,placeholder:r,value:t,onChange:e=>{e.target.value||n(void 0)}}))}const cH=/^#[0-9a-fA-F]{3,}$/,uH=/^url\((.+)\)$/,pH=e=>{const t=uH.exec(e);return t&&t.length?t[1]:""};function dH({value:e,onChange:t}){const[n,s]=(0,r.useState)((()=>e?cH.test(e)?"color":"image":"color"));return i().createElement(c.xu,null,i().createElement(u.Radio.Group,{defaultValue:n,onChange:e=>s(e.target.value),buttonStyle:"solid"},i().createElement(u.Radio.Button,{value:"color"},i().createElement(qY,null)),i().createElement(u.Radio.Button,{value:"image"},i().createElement(XY,null))),i().createElement(c.xu,{mt:"m"},"color"===n&&i().createElement(lH,{value:e,onChange:t}),"image"===n&&i().createElement(tH,{value:pH(e),onChange:e=>{t(e?`url(${e})`:void 0)}})))}function fH({value:e,onChange:t}){const n=function(e){if(!e||"string"!=typeof e)return["0","0","0","0"];const t=e.split(" ");if(1===t.length)return["0","0","0","0"];if(2===t.length){const e=mH(t[1]),n=mH(t[0]);return[n,e,n,e]}if(4===t.length)return t.map(mH)}(e),s=(0,r.useRef)([...n]),o=e=>n=>{s.current[e]=`${n}`;const r=s.current.map((e=>`${e}px`));t(r.join(" "))};return i().createElement(c.rj,{columns:2,spacing:"m"},i().createElement(u.InputNumber,{addonBefore:"上",addonAfter:"px",defaultValue:n[0],onChange:o(0)}),i().createElement(u.InputNumber,{addonBefore:"下",addonAfter:"px",defaultValue:n[2],onChange:o(2)}),i().createElement(u.InputNumber,{addonBefore:"右",addonAfter:"px",defaultValue:n[1],onChange:o(1)}),i().createElement(u.InputNumber,{addonBefore:"左",addonAfter:"px",defaultValue:n[3],onChange:o(3)}))}const hH=/^(\d+)px$/;function mH(e){const t=hH.exec(e);return t&&t.length?t[1]:"0"}function gH({value:e,onChange:t}){const n=function(e){return e&&"string"==typeof e?e.split(" "):["0","none"]}(e),[s,o]=(0,r.useState)((()=>/^(none|solid|dashed)$/.test(n[1])?n[1]:"none")),[a,l]=(0,r.useState)(Number(mH(n[0]))||0),[p,d]=(0,r.useState)(n[2]||"#000"),f=(e,n)=>{let r;switch(e){case"style":r=[a,n,p];break;case"width":r=[`${n}px`,s,p];break;case"color":r=[a,s,n];break;default:r=["none"]}"none"===r[1]&&(r=["none"]),t(r.join(" "))};return i().createElement(c.xu,null,i().createElement(yH,{label:"风格"},i().createElement(u.Radio.Group,{defaultValue:s,onChange:e=>{o(e.target.value),f("style",e.target.value)},buttonStyle:"solid"},i().createElement(u.Radio.Button,{value:"none"},i().createElement(YY,null)),i().createElement(u.Radio.Button,{value:"solid"},i().createElement(Y,null)),i().createElement(u.Radio.Button,{value:"dashed"},i().createElement(Z,null)))),"none"!==s&&i().createElement(c.xu,null,i().createElement(yH,{label:"宽度",mt:"m"},i().createElement(u.InputNumber,{defaultValue:a,addonAfter:"px",min:0,onChange:e=>{l(e),f("width",e)}})),i().createElement(yH,{label:"颜色",mt:"m"},i().createElement(lH,{value:p,onChange:e=>{d(e),f("color",e)}}))))}function yH(e){var{label:t,children:n}=e,r=V(e,["label","children"]);return i().createElement(c.xu,Object.assign({display:"flex",alignItems:"center"},r),i().createElement(c.xu,{mr:"m"},t),i().createElement(c.xu,null,n))}const _H=e=>e&&e.startsWith("{css`")?e.split("").slice(5,-2).join("").trim():e,bH=e=>{const t=vH.exec(e);return t&&t.length?t[1]:"0"},vH=/^(\d+)px$/,EH=(e,t)=>{const n=new RegExp(`(?<=s*?\n*?;?s*?\n*?${t}s*).*?(?=;)`,"g"),r=new RegExp(`(?<=^[s]*?${t}).*?(?=;)`,"g");return n.test(e)?n:!!r.test(e)&&r};function xH({title:e,children:t}){return i().createElement(c.xu,{borderBottom:"solid",borderBottomColor:"gray.30",px:"m"},i().createElement(c.xu,{pt:"m"},e),i().createElement(c.xu,{py:"m"},t))}var SH=n(48488),OH=n.n(SH);function TH(e,t){let n;if(n=OH().isMoment(e)?e:"string"==typeof e&&t?OH()(e,t):OH()(),n&&n.isValid())return n}const wH={width:"100%"};function CH(e,t){return Array.isArray(e)?e.map((e=>TH(e,t))):[]}function AH(e){var{value:t,onChange:n,format:r="YYYY-MM-DD"}=e,s=V(e,["value","onChange","format"]);return i().createElement(u.DatePicker.RangePicker,Object.assign({},s,{style:wH,format:r,value:CH(t,r),onChange:(e,t)=>{n&&n(t)}}))}var PH={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},kH=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:PH}))};kH.displayName="CloseCircleFilled";var DH=r.forwardRef(kH),RH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"expand-alt",theme:"outlined"},IH=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:RH}))};IH.displayName="ExpandAltOutlined";var LH=r.forwardRef(IH),BH=n(5553),MH=n.n(BH),jH=n(51472);function NH(e){return`[${jH.K.dnd}="${e}"]`}const FH="dragGhost",UH=()=>{return e=`#${FH}`,MH()(e).get(0);var e};function VH(e,t){return MH()(e).css(t)}function KH(e,t){const n=e.getBoundingClientRect(),{x:r,y:i}=WH({x:n.left,y:n.top},t);return{width:e.offsetWidth,height:e.offsetHeight,top:i,left:r}}function WH(e,t){let n=e.x,r=e.y;if(t){const e=t.getBoundingClientRect();n-=e.left,r-=e.top}return{x:n,y:r}}function $H(e){return MH()(e).css("display")}function qH(e,t){const n=KH(e,t),r=function(e){return Object.assign({},e.dataset)}(e),i=(0,OW.cj)(r.dnd),s=$H(e);return{id:i.id,codeId:i.index,name:i.component||e.tagName.toLowerCase(),filename:i.filename,bounding:n,element:e,display:s}}function QH(e,t){let n=Math.min(Math.abs(e.clientX-t.left),Math.abs(e.clientX-t.right)),r=Math.min(Math.abs(e.clientY-t.top),Math.abs(e.clientY-t.bottom));return e.clientX>=t.left&&e.clientX<=t.right&&(n=0),e.clientY>=t.top&&e.clientY<=t.bottom&&(r=0),Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}const zH="\nimport { defineStore } from '@music163/tango-boot';\nexport default defineStore({\n});\n";function XH(e){const t=Object.assign({},e);return delete t.type,t.formatter&&(0,xK.Lx)(t.formatter)&&(t.formatter=(0,OW.jW)(t.formatter)),t}const GH=w((()=>{const e=l(),t=R(),{serviceVariables:n}=L(),r=Object.keys(t.serviceModules).map((e=>({label:"index"===e?"默认模块":e,value:e})));return i().createElement(c.xu,{className:"ServiceFunctionList",p:"m"},i().createElement(QW,{dataSource:n,appContext:null==e?void 0:e.window.tango,serviceModules:r,onRemoveService:e=>{t.removeServiceFunction(e)},onAddService:e=>{const n=XH(e),{name:r,moduleName:i}=n,s=V(n,["name","moduleName"]);t.addServiceFunction(r,s,i)},onUpdateService:e=>{const n=XH(e),{name:r,moduleName:i}=n,s=V(n,["name","moduleName"]);t.updateServiceFunction(r,s,i)},getServiceData:e=>{const n=t.getServiceFunction(e);return Object.assign({name:n.name,moduleName:n.moduleName,method:"get"},n.config)}}))}));var ZH=GH;function YH(e){let t;return e&&(t=(0,xK.Lx)(e)?e:`{${e}}`),t}const HH=c.iv` +`;function ZW(e){var{children:t,onRemove:n,index:r=0,onMove:s}=e,o=V(e,["children","onRemove","index","onMove"]);return i().createElement(yW,{mb:"m",index:r,css:XW,onMove:s},i().createElement(c.xu,{css:GW},i().createElement(fW,{className:"icon"}),t),i().createElement("div",null,i().createElement(HW,Object.assign({},o)),i().createElement(u.Button,{type:"link",icon:i().createElement(lK,null),onClick:n})))}function HW({formFields:e,formInitialValues:t,onEdit:n}){const[s,o]=(0,r.useState)(!1);return i().createElement(u.Popover,{visible:s,onVisibleChange:o,trigger:"click",placement:"leftTop",title:"修改数据",content:i().createElement(t$,{fields:e,initialValues:t,onSubmit:e=>{n&&n(e),o(!1)}})},i().createElement(u.Button,{type:"link",icon:i().createElement(gW,null)}))}function YW({formFields:e=[],formInitialValues:t={},getFormInitialValues:n,text:s="添加一项",onAdd:o}){var a;const[l,c]=(0,r.useState)(!1),p=null!==(a=null==n?void 0:n())&&void 0!==a?a:t;return i().createElement(u.Popover,{destroyTooltipOnHide:!0,visible:l,onVisibleChange:c,trigger:"click",placement:"leftTop",title:s,content:i().createElement(t$,{fields:e,initialValues:p,onSubmit:e=>{o&&o(e),c(!1)}})},i().createElement(u.Button,{block:!0},s))}const JW={labelCol:{span:8},wrapperCol:{span:16}},e$={wrapperCol:{offset:8,span:16}};function t$({fields:e=[],initialValues:t={},onSubmit:n}){const[r]=u.Form.useForm();return i().createElement(u.Form,Object.assign({form:r,onFinish:e=>{n&&n(function(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}(e))}},JW),e.map((e=>i().createElement(u.Form.Item,{key:e.name,label:e.label,name:e.name,required:e.required,valuePropName:e.valuePropName,extra:e.extra,style:{width:e.width},initialValue:t[e.name]},e.component||i().createElement(u.Input,{placeholder:"请输入",autoComplete:"off"})))),i().createElement(u.Form.Item,Object.assign({},e$),i().createElement(u.Button,{type:"primary",htmlType:"submit"},"提交")))}const n$=[{label:"key",name:"key",required:!0}],r$=e=>e.key,i$=e=>e.key;function s$(e){const{listItemFormFields:t=n$,newItemDefaultValues:n,getNewItemDefaultValues:r,addBtnText:s,getListItemKey:o=r$,renderItem:a=i$}=e,l=V(e,["listItemFormFields","newItemDefaultValues","getNewItemDefaultValues","addBtnText","getListItemKey","renderItem"]),{value:u,onAdd:p,getOnEdit:d,getOnRemove:f,onMove:h}=function(e){const{value:t=[],onChange:n}=e,r=V(e,["value","onChange"]),i=Array.isArray(t)?t:[],s=(e=[])=>{n&&n(e)};return Object.assign({value:i,onAdd:e=>{const t=[...i].concat([e]);s(t)},getOnEdit:e=>t=>{const n=[...i];n[e]=t,s(n)},getOnRemove:e=>()=>{const t=[...i];t.splice(e,1),s(t)},onMove:(e,t)=>{const n=[...i],r=n[t];n[t]=n[e],n[e]=r,s(n)}},r)}(l);return i().createElement(c.xu,null,i().createElement(c.xu,null,u.map(((e,n)=>i().createElement(ZW,{key:o(e),index:n,formFields:t,formInitialValues:e,onEdit:d(n),onRemove:f(n),onMove:h},a(e))))),i().createElement(YW,{text:s,formFields:t,formInitialValues:n,getFormInitialValues:r,onAdd:p}))}const o$={key:"1",label:"按钮"},a$=[{label:"key",name:"key",required:!0},{label:"文本",name:"label",required:!0},{label:"外观",name:"shape",component:i().createElement(u.Select,{placeholder:"请选择",options:[{label:"普通按钮",value:"button"},{label:"文本按钮",value:"text"}]})},{label:"按钮类型",name:"buttonType",component:i().createElement(u.Select,{placeholder:"请选择",options:[{label:"主要",value:"primary"},{label:"次要",value:"secondary"},{label:"普通",value:"normal"}]})},{label:"类型",name:"actionType",component:i().createElement(u.Select,{placeholder:"请选择",options:[{label:"普通动作",value:"action"},{label:"确认提示",value:"confirm"}]})},{label:"确认气泡内容",name:"confirmContent"}],l$=e=>e.key,c$=e=>e.label;var u$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M875.6 515.9c2.1.8 4.4-.3 5.2-2.4.2-.4.2-.9.2-1.4v-58.3c0-1.8-1.1-3.3-2.8-3.8-6-1.8-17.2-3-27.2-3-32.9 0-61.7 16.7-73.5 41.2v-28.6c0-4.4-3.6-8-8-8H717c-4.4 0-8 3.6-8 8V729c0 4.4 3.6 8 8 8h54.8c4.4 0 8-3.6 8-8V572.7c0-36.2 26.1-60.2 65.1-60.2 10.4.1 26.6 1.8 30.7 3.4zm-537-40.5l-54.7-12.6c-61.2-14.2-87.7-34.8-87.7-70.7 0-44.6 39.1-73.5 96.9-73.5 52.8 0 91.4 26.5 99.9 68.9h70C455.9 311.6 387.6 259 293.4 259c-103.3 0-171 55.5-171 139 0 68.6 38.6 109.5 122.2 128.5l61.6 14.3c63.6 14.9 91.6 37.1 91.6 75.1 0 44.1-43.5 75.2-102.5 75.2-60.6 0-104.5-27.2-112.8-70.5H111c7.2 79.9 75.6 130.4 179.1 130.4C402.3 751 471 695.2 471 605.3c0-70.2-38.6-108.5-132.4-129.9zM841 729a36 36 0 1072 0 36 36 0 10-72 0zM653 457.8h-51.4V396c0-4.4-3.6-8-8-8h-54.7c-4.4 0-8 3.6-8 8v61.8H495c-4.4 0-8 3.6-8 8v42.3c0 4.4 3.6 8 8 8h35.9v147.5c0 56.2 27.4 79.4 93.1 79.4 11.7 0 23.6-1.2 33.8-3.1 1.9-.3 3.2-2 3.2-3.9v-49.3c0-2.2-1.8-4-4-4h-.4c-4.9.5-6.2.6-8.3.8-4.1.3-7.8.5-12.6.5-24.1 0-34.1-10.3-34.1-35.6V516.1H653c4.4 0 8-3.6 8-8v-42.3c0-4.4-3.6-8-8-8z"}}]},name:"field-string",theme:"outlined"},p$=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:u$}))};p$.displayName="FieldStringOutlined";var d$=r.forwardRef(p$);const f$={title:"Column"},h$=[{label:"key",name:"key",required:!0},{label:"dataIndex",name:"dataIndex",required:!0},{label:"列标题",name:"title",required:!0},{label:"列宽",name:"width"},{label:"锁列",name:"fixed",valuePropName:"checked",component:i().createElement(u.Switch,null)}],m$=e=>i().createElement(i().Fragment,null,i().createElement(d$,null),i().createElement(c.xu,{display:"inline-block",ml:"m"},e.title));var g$=n(98317);const y$={width:"100%"};function _$(e){return i().createElement(u.Slider,Object.assign({},e))}var b$=n(79941),v$=function(e,t,n,r,i){var s=i.clientWidth,o=i.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(i.getBoundingClientRect().left+window.pageXOffset),u=l-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var p=void 0;if(p=u<0?0:u>o?1:Math.round(100*u/o)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var d=void 0;if(r!==(d=c<0?0:c>s?1:Math.round(100*c/s)/100))return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}return null},E$={},x$=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(E$[i])return E$[i];var s=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var s=i.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,i.width,i.height),s.fillStyle=t,s.fillRect(0,0,n,n),s.translate(n,n),s.fillRect(0,0,n,n),i.toDataURL()):null}(e,t,n,r);return E$[i]=s,s},S$=Object.assign||function(e){for(var t=1;t-1)){var i=n.getArrowOffset(),s=38===e.keyCode?r+i:r-i;n.setUpdatedValue(s,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+L$++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),R$(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,b$.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i().createElement("div",{style:t.wrap},i().createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i().createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),M$=B$,j$=function(e,t,n,r){var i=r.clientWidth,s=r.clientHeight,o="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,a="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=o-(r.getBoundingClientRect().left+window.pageXOffset),c=a-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u=void 0;if(c<0)u=359;else if(c>s)u=0;else{u=360*(-100*c/s+100)/100}if(n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var p=void 0;if(l<0)p=0;else if(l>i)p=359;else{p=360*(100*l/i)/100}if(n.h!==p)return{h:p,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},N$=function(){function e(e,t){for(var n=0;n-1};var Y$=function(e,t){var n=this.__data__,r=z$(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function J$(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var IQ=function(e){return null!=e&&RQ(e.length)&&!vq(e)};var LQ=function(e){return OQ(e)&&IQ(e)};var BQ=function(){return!1},MQ="object"==typeof exports&&exports&&!exports.nodeType&&exports,jQ=MQ&&"object"==typeof module&&module&&!module.nodeType&&module,NQ=jQ&&jQ.exports===MQ?aq.Buffer:void 0,FQ=(NQ?NQ.isBuffer:void 0)||BQ,UQ=Function.prototype,VQ=Object.prototype,KQ=UQ.toString,WQ=VQ.hasOwnProperty,$Q=KQ.call(Object);var qQ=function(e){if(!OQ(e)||"[object Object]"!=yq(e))return!1;var t=vQ(e);if(null===t)return!0;var n=WQ.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&KQ.call(n)==$Q},QQ={};QQ["[object Float32Array]"]=QQ["[object Float64Array]"]=QQ["[object Int8Array]"]=QQ["[object Int16Array]"]=QQ["[object Int32Array]"]=QQ["[object Uint8Array]"]=QQ["[object Uint8ClampedArray]"]=QQ["[object Uint16Array]"]=QQ["[object Uint32Array]"]=!0,QQ["[object Arguments]"]=QQ["[object Array]"]=QQ["[object ArrayBuffer]"]=QQ["[object Boolean]"]=QQ["[object DataView]"]=QQ["[object Date]"]=QQ["[object Error]"]=QQ["[object Function]"]=QQ["[object Map]"]=QQ["[object Number]"]=QQ["[object Object]"]=QQ["[object RegExp]"]=QQ["[object Set]"]=QQ["[object String]"]=QQ["[object WeakMap]"]=!1;var zQ=function(e){return OQ(e)&&RQ(e.length)&&!!QQ[yq(e)]};var XQ=function(e){return function(t){return e(t)}},GQ="object"==typeof exports&&exports&&!exports.nodeType&&exports,ZQ=GQ&&"object"==typeof module&&module&&!module.nodeType&&module,HQ=ZQ&&ZQ.exports===GQ&&sq.process,YQ=function(){try{var e=ZQ&&ZQ.require&&ZQ.require("util").types;return e||HQ&&HQ.binding&&HQ.binding("util")}catch(e){}}(),JQ=YQ&&YQ.isTypedArray,ez=JQ?XQ(JQ):zQ;var tz=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},nz=Object.prototype.hasOwnProperty;var rz=function(e,t,n){var r=e[t];nz.call(e,t)&&Q$(r,n)&&(void 0!==n||t in e)||sQ(e,t,n)};var iz=function(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},wz=Tz(Sz);var Cz=function(e,t){return wz(vz(e,t,yz),e+"")};var Az=function(e,t,n){if(!_q(n))return!1;var r=typeof t;return!!("number"==r?IQ(n)&&az(t,n.length):"string"==r&&t in n)&&Q$(n[t],e)};var Pz=function(e){return Cz((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,o&&Az(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r=t||n<0||p&&e-c>=s}function g(){var e=Rz();if(m(e))return y(e);a=setTimeout(g,function(e){var n=t-(e-l);return p?$z(n,s-(e-c)):n}(e))}function y(e){return a=void 0,d&&r?f(e):(r=i=void 0,o)}function _(){var e=Rz(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return h(l);if(p)return clearTimeout(a),a=setTimeout(g,t),f(l)}return void 0===a&&(a=setTimeout(g,t)),o}return t=Kz(t)||0,_q(n)&&(u=!!n.leading,s=(p="maxWait"in n)?Wz(Kz(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),_.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},_.flush=function(){return void 0===a?o:y(Rz())},_};var Qz=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return _q(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),qz(e,t,{leading:r,maxWait:t,trailing:i})},zz=function(){function e(e,t){for(var n=0;ni&&(l=i),c<0?c=0:c>s&&(c=s);var u=l/i,p=1-c/s;return{h:t.h,s:u,v:p,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=Qz((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),zz(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,s=t.black,o=t.pointer,a=t.circle,l=(0,b$.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:s,pointer:o,circle:a}},{custom:!!this.props.style});return i().createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i().createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),i().createElement("div",{style:l.white,className:"saturation-white"},i().createElement("div",{style:l.black,className:"saturation-black"}),i().createElement("div",{style:l.pointer},this.props.pointer?i().createElement(this.props.pointer,this.props):i().createElement("div",{style:l.circle}))))}}]),t}(r.PureComponent||r.Component),Gz=Xz;var Zz=function(e,t){for(var n=-1,r=null==e?0:e.length;++n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=CX(e,360),t=CX(t,100),n=CX(n,100),0===t)r=i=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=o(l,a,e+1/3),i=o(l,a,e),s=o(l,a,e-1/3)}return{r:255*r,g:255*i,b:255*s}}(e.h,r,s),o=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=wX(n),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function lX(e,t,n){e=CX(e,255),t=CX(t,255),n=CX(n,255);var r,i,s=Math.max(e,t,n),o=Math.min(e,t,n),a=(s+o)/2;if(s==o)r=i=0;else{var l=s-o;switch(i=a>.5?l/(2-s-o):l/(s+o),s){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,s.push(aX(r));return s}function SX(e,t){t=t||6;for(var n=aX(e).toHsv(),r=n.h,i=n.s,s=n.v,o=[],a=1/t;t--;)o.push(aX({h:r,s:i,v:s})),s=(s+a)%1;return o}aX.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=wX(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=cX(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=cX(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=lX(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=lX(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return uX(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var s=[kX(Math.round(e).toString(16)),kX(Math.round(t).toString(16)),kX(Math.round(n).toString(16)),kX(RX(r))];if(i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*CX(this._r,255))+"%",g:Math.round(100*CX(this._g,255))+"%",b:Math.round(100*CX(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*CX(this._r,255))+"%, "+Math.round(100*CX(this._g,255))+"%, "+Math.round(100*CX(this._b,255))+"%)":"rgba("+Math.round(100*CX(this._r,255))+"%, "+Math.round(100*CX(this._g,255))+"%, "+Math.round(100*CX(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(TX[uX(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+pX(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=aX(e);n="#"+pX(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return aX(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(mX,arguments)},brighten:function(){return this._applyModification(gX,arguments)},darken:function(){return this._applyModification(yX,arguments)},desaturate:function(){return this._applyModification(dX,arguments)},saturate:function(){return this._applyModification(fX,arguments)},greyscale:function(){return this._applyModification(hX,arguments)},spin:function(){return this._applyModification(_X,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(xX,arguments)},complement:function(){return this._applyCombination(bX,arguments)},monochromatic:function(){return this._applyCombination(SX,arguments)},splitcomplement:function(){return this._applyCombination(EX,arguments)},triad:function(){return this._applyCombination(vX,[3])},tetrad:function(){return this._applyCombination(vX,[4])}},aX.fromRatio=function(e,t){if("object"==iX(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:DX(e[r]));e=n}return aX(e,t)},aX.equals=function(e,t){return!(!e||!t)&&aX(e).toRgbString()==aX(t).toRgbString()},aX.random=function(){return aX.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},aX.mix=function(e,t,n){n=0===n?0:n||50;var r=aX(e).toRgb(),i=aX(t).toRgb(),s=n/100;return aX({r:(i.r-r.r)*s+r.r,g:(i.g-r.g)*s+r.g,b:(i.b-r.b)*s+r.b,a:(i.a-r.a)*s+r.a})},aX.readability=function(e,t){var n=aX(e),r=aX(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},aX.isReadable=function(e,t,n){var r,i,s=aX.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=s>=4.5;break;case"AAlarge":i=s>=3;break;case"AAAsmall":i=s>=7}return i},aX.mostReadable=function(e,t,n){var r,i,s,o,a=null,l=0;i=(n=n||{}).includeFallbackColors,s=n.level,o=n.size;for(var c=0;cl&&(l=r,a=aX(t[c]));return aX.isReadable(e,a,{level:s,size:o})||!i?a:(n.includeFallbackColors=!1,aX.mostReadable(e,["#fff","#000"],n))};var OX=aX.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},TX=aX.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(OX);function wX(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function CX(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function AX(e){return Math.min(1,Math.max(0,e))}function PX(e){return parseInt(e,16)}function kX(e){return 1==e.length?"0"+e:""+e}function DX(e){return e<=1&&(e=100*e+"%"),e}function RX(e){return Math.round(255*parseFloat(e)).toString(16)}function IX(e){return PX(e)/255}var LX,BX,MX,jX=(BX="[\\s|\\(]+("+(LX="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+LX+")[,|\\s]+("+LX+")\\s*\\)?",MX="[\\s|\\(]+("+LX+")[,|\\s]+("+LX+")[,|\\s]+("+LX+")[,|\\s]+("+LX+")\\s*\\)?",{CSS_UNIT:new RegExp(LX),rgb:new RegExp("rgb"+BX),rgba:new RegExp("rgba"+MX),hsl:new RegExp("hsl"+BX),hsla:new RegExp("hsla"+MX),hsv:new RegExp("hsv"+BX),hsva:new RegExp("hsva"+MX),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function NX(e){return!!jX.CSS_UNIT.exec(e)}var FX=function(e){var t=0,n=0;return rX(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},UX=function(e,t){var n=e.hex?aX(e.hex):aX(e),r=n.toHsl(),i=n.toHsv(),s=n.toRgb(),o=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===o&&0===s.a?"transparent":"#"+o,rgb:s,hsv:i,oldHue:e.h||t||r.h,source:e.source}},VX=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&aX(e).isValid()},KX=function(e){if(!e)return"#fff";var t=UX(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},WX=function(e,t){return aX(t+" ("+e.replace("°","")+")")._ok},$X=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;GX(this,r);for(var i=arguments.length,s=Array(i),o=0;oa))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var p=-1,d=!0,f=2&n?new aG:void 0;for(s.set(e,t),s.set(t,e);++p1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(ZZ(e.s)?n.props.hsl.s:e.s),l:Number(ZZ(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),YZ(t,[{key:"render",value:function(){var e=this,t=(0,b$.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(M$,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i().createElement("div",{style:t.fields,className:"flexbox-fix"},i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.field},i().createElement(M$,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i().createElement("div",{style:t.alpha},i().createElement(M$,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i().createElement("div",{style:t.wrap,className:"flexbox-fix"},n,i().createElement("div",{style:t.toggle},i().createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i().createElement(HZ.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i().Component);JZ.defaultProps={view:"hex"};var eH=JZ,tH=function(){var e=(0,b$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i().createElement("div",{style:e.picker})},nH=function(){var e=(0,b$.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i().createElement("div",{style:e.picker})},rH=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,s=e.rgb,o=e.hsl,a=e.hsv,l=e.hex,c=e.renderers,u=e.styles,p=void 0===u?{}:u,d=e.className,f=void 0===d?"":d,h=e.defaultView,m=(0,b$.ZP)(Pz({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+s.r+", "+s.g+", "+s.b+", "+s.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:r});return i().createElement("div",{style:m.picker,className:"chrome-picker "+f},i().createElement("div",{style:m.saturation},i().createElement(Gz,{style:m.Saturation,hsl:o,hsv:a,pointer:nH,onChange:n})),i().createElement("div",{style:m.body},i().createElement("div",{style:m.controls,className:"flexbox-fix"},i().createElement("div",{style:m.color},i().createElement("div",{style:m.swatch},i().createElement("div",{style:m.active}),i().createElement(T$,{renderers:c}))),i().createElement("div",{style:m.toggles},i().createElement("div",{style:m.hue},i().createElement(K$,{style:m.Hue,hsl:o,pointer:tH,onChange:n})),i().createElement("div",{style:m.alpha},i().createElement(D$,{style:m.Alpha,rgb:s,hsl:o,pointer:tH,renderers:c,onChange:n})))),i().createElement(eH,{rgb:s,hsl:o,hex:l,view:h,onChange:n,disableAlpha:r})))};rH.propTypes={width:$$().oneOfType([$$().string,$$().number]),disableAlpha:$$().bool,styles:$$().object,defaultView:$$().oneOf(["hex","rgb","hsl"])},rH.defaultProps={width:225,disableAlpha:!1,styles:{}};QX(rH);var iH=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,s=e.onSwatchHover,o=e.active,a=(0,b$.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:KX(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return i().createElement(JX,{style:a.color,color:t,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},i().createElement("div",{style:a.dot}))},sH=function(e){var t=e.hex,n=e.rgb,r=e.onChange,s=(0,b$.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return i().createElement("div",{style:s.fields,className:"flexbox-fix"},i().createElement("div",{style:s.active}),i().createElement(M$,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:t,onChange:o}),i().createElement(M$,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:o}),i().createElement(M$,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:o}),i().createElement(M$,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:o}))},oH=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,s=e.hex,o=e.rgb,a=e.styles,l=void 0===a?{}:a,c=e.className,u=void 0===c?"":c,p=(0,b$.ZP)(Pz({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(e,n){e.hex?VX(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return i().createElement(Dz,{style:p.Compact,styles:l},i().createElement("div",{style:p.compact,className:"compact-picker "+u},i().createElement("div",null,wZ(r,(function(e){return i().createElement(iH,{key:e,color:e,active:e.toLowerCase()===s,onClick:d,onSwatchHover:n})})),i().createElement("div",{style:p.clear})),i().createElement(sH,{hex:s,rgb:o,onChange:d})))};oH.propTypes={colors:$$().arrayOf($$().string),styles:$$().object},oH.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};QX(oH);var aH=(0,b$.tz)((function(e){var t=e.hover,n=e.color,r=e.onClick,s=e.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=(0,b$.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return i().createElement("div",{style:a.swatch},i().createElement(JX,{color:n,onClick:r,onHover:s,focusStyle:o}))})),lH=function(e){var t=e.width,n=e.colors,r=e.onChange,s=e.onSwatchHover,o=e.triangle,a=e.styles,l=void 0===a?{}:a,c=e.className,u=void 0===c?"":c,p=(0,b$.ZP)(Pz({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===o,"top-left-triangle":"top-left"===o,"top-right-triangle":"top-right"===o,"bottom-left-triangle":"bottom-left"===o,"bottom-right-triangle":"bottom-right"===o}),d=function(e,t){return r({hex:e,source:"hex"},t)};return i().createElement("div",{style:p.card,className:"github-picker "+u},i().createElement("div",{style:p.triangleShadow}),i().createElement("div",{style:p.triangle}),wZ(n,(function(e){return i().createElement(aH,{color:e,key:e,onClick:d,onSwatchHover:s})})))};lH.propTypes={width:$$().oneOfType([$$().string,$$().number]),colors:$$().arrayOf($$().string),triangle:$$().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:$$().object},lH.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};QX(lH);var cH=function(e){var t=e.direction,n=(0,b$.ZP)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return i().createElement("div",{style:n.picker})},uH=Object.assign||function(e){for(var t=1;t.5});return i().createElement("div",{style:n.picker})},hH=function(){var e=(0,b$.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i().createElement("div",{style:e.pointer},i().createElement("div",{style:e.left},i().createElement("div",{style:e.leftInside})),i().createElement("div",{style:e.right},i().createElement("div",{style:e.rightInside})))},mH=function(e){var t=e.onClick,n=e.label,r=e.children,s=e.active,o=(0,b$.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:s});return i().createElement("div",{style:o.button,onClick:t},n||r)},gH=function(e){var t=e.rgb,n=e.currentColor,r=(0,b$.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i().createElement("div",null,i().createElement("div",{style:r.label},"new"),i().createElement("div",{style:r.swatches},i().createElement("div",{style:r.new}),i().createElement("div",{style:r.current})),i().createElement("div",{style:r.label},"current"))},yH=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},i))};return i().createElement("div",{style:a.fields,className:"flexbox-fix"},i().createElement("div",{style:a.double},i().createElement(M$,{style:{input:a.input,label:a.label},label:"hex",value:s.replace("#",""),onChange:l})),i().createElement("div",{style:a.single},i().createElement(M$,{style:{input:a.input,label:a.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:a.single},i().createElement(M$,{style:{input:a.input,label:a.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:a.single},i().createElement(M$,{style:{input:a.input,label:a.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),i().createElement("div",{style:a.alpha},i().createElement(M$,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},vH=Object.assign||function(e){for(var t=1;te&&e.startsWith("icon-")?i().createElement(Ue,{type:e}):null),[]);return i().createElement(u.Radio.Group,Object.assign({optionType:"button",buttonStyle:"solid",onChange:e=>{n&&n(e.target.value)}},s),t.map((e=>i().createElement(JH,{tip:e.tip,key:e.value,value:e.value},o(e.icon),e.label))))}function JH(e){var{tip:t}=e,n=V(e,["tip"]);let r=i().createElement(u.Radio.Button,Object.assign({},n));return t&&(r=i().createElement(u.Tooltip,{title:t},r)),r}const eY=()=>{};function tY(e){var{value:t,onChange:n=eY,placeholder:s="请输入"}=e,o=V(e,["value","onChange","placeholder"]);const[a,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{l(t)}),[t]),i().createElement(u.Input,Object.assign({placeholder:s,allowClear:!0,value:a,onChange:e=>l(e.target.value),onBlur:()=>{n(a)}},o))}const nY={minRows:2,maxRows:5};function rY({value:e,onChange:t}){const n=function(e){return e&&e.startsWith("{css`")?e.split("").slice(5,-2).join("").trim():e}(e);return i().createElement(u.Popover,{placement:"leftBottom",title:"自定义样式(CSS in JS)",content:i().createElement(c.xu,{height:480,width:400},i().createElement(ve,{language:"css",value:n,onBlur:e=>{e!=n&&t(`{css\`${e}\`}`,{})}}))},i().createElement(u.Button,{block:!0},"编写样式"))}function iY(e){return i().createElement(YH,Object.assign({options:[{value:"block",icon:"icon-display-block",tip:"块级元素"},{value:"inline-block",icon:"icon-display-inline-block",tip:"行内块级元素"},{value:"flex",icon:"icon-flex",tip:"Flex 弹性布局"},{value:"grid",icon:"icon-display-grid",tip:"Grid 弹性网格布局"},{value:"inline",icon:"icon-display-inline",tip:"行内元素"},{value:"none",icon:"icon-display-none",tip:"不显示"}],mode:"icon"},e))}function sY(e){return i().createElement(YH,Object.assign({options:[{value:"column",icon:"icon-direction-column",tip:"单行排列"},{value:"column-reverse",icon:"icon-direction-column-reverse",tip:"单行逆序"},{value:"row",icon:"icon-direction-row",tip:"纵向排列"},{value:"row-reverse",icon:"icon-direction-row-reverse",tip:"纵向逆序"}],mode:"icon"},e))}function oY(e){return i().createElement(YH,Object.assign({options:[{value:"flex-start",icon:"icon-justify-flex-start",tip:"从行首起始位置开始排列"},{value:"flex-end",icon:"icon-justify-flex-end",tip:"从行尾位置开始排列"},{value:"center",icon:"icon-justify-center",tip:"居中排列"},{value:"space-between",icon:"icon-justify-space-between",tip:"均匀排列每个元素,首个元素放置于起点,末尾元素放置于终点"},{value:"space-around",icon:"icon-justify-space-around",tip:"均匀排列每个元素,每个元素周围分配相同的空间"}],mode:"icon"},e))}function aY(e){return i().createElement(YH,Object.assign({options:[{value:"flex-start",icon:"icon-align-flex-start",tip:"元素向辅轴起点对齐"},{value:"flex-end",icon:"icon-align-flex-end",tip:"元素向辅轴终点对齐"},{value:"center",icon:"icon-align-center",tip:"元素在辅轴居中"},{value:"stretch",icon:"icon-align-stretch",tip:"弹性项包含外边距的交叉轴尺寸被拉升至行高"},{value:"baseline",icon:"icon-align-baseline",tip:"所有元素向基线对齐"}],mode:"icon"},e))}function lY(e){const{value:t,onChange:n,placeholder:r="请选择颜色"}=e,s=cY.test(t)?t:function(e){const{r:t,g:n,b:r,alpha:i}=e;return{r:t,g:n,b:r,a:i}}(KH()(t).object()),o=i().createElement(TH,{color:s,onChangeComplete:e=>{const t=1===e.rgb.a?e.hex:`rgba(${(r=e.rgb).r}, ${r.g}, ${r.b}, ${r.a})`;var r;"function"==typeof n&&n(t)}});return i().createElement(u.Dropdown,{overlay:o,trigger:["click"]},i().createElement(u.Input,{prefix:i().createElement(c.xu,{bg:t,border:"solid",borderColor:"gray.40",size:"14px",borderRadius:"s"}),allowClear:!0,placeholder:r,value:t,onChange:e=>{e.target.value||n(void 0)}}))}const cY=/^#[0-9a-fA-F]{3,}$/,uY=/^url\((.+)\)$/,pY=e=>{const t=uY.exec(e);return t&&t.length?t[1]:""};function dY({value:e,onChange:t}){const[n,s]=(0,r.useState)((()=>e?cY.test(e)?"color":"image":"color"));return i().createElement(c.xu,null,i().createElement(u.Radio.Group,{defaultValue:n,onChange:e=>s(e.target.value),buttonStyle:"solid"},i().createElement(u.Radio.Button,{value:"color"},i().createElement(qH,null)),i().createElement(u.Radio.Button,{value:"image"},i().createElement(XH,null))),i().createElement(c.xu,{mt:"m"},"color"===n&&i().createElement(lY,{value:e,onChange:t}),"image"===n&&i().createElement(tY,{value:pY(e),onChange:e=>{t(e?`url(${e})`:void 0)}})))}function fY({value:e,onChange:t}){const n=function(e){if(!e||"string"!=typeof e)return["0","0","0","0"];const t=e.split(" ");if(1===t.length)return["0","0","0","0"];if(2===t.length){const e=mY(t[1]),n=mY(t[0]);return[n,e,n,e]}if(4===t.length)return t.map(mY)}(e),s=(0,r.useRef)([...n]),o=e=>n=>{s.current[e]=`${n}`;const r=s.current.map((e=>`${e}px`));t(r.join(" "))};return i().createElement(c.rj,{columns:2,spacing:"m"},i().createElement(u.InputNumber,{addonBefore:"上",addonAfter:"px",defaultValue:n[0],onChange:o(0)}),i().createElement(u.InputNumber,{addonBefore:"下",addonAfter:"px",defaultValue:n[2],onChange:o(2)}),i().createElement(u.InputNumber,{addonBefore:"右",addonAfter:"px",defaultValue:n[1],onChange:o(1)}),i().createElement(u.InputNumber,{addonBefore:"左",addonAfter:"px",defaultValue:n[3],onChange:o(3)}))}const hY=/^(\d+)px$/;function mY(e){const t=hY.exec(e);return t&&t.length?t[1]:"0"}function gY({value:e,onChange:t}){const n=function(e){return e&&"string"==typeof e?e.split(" "):["0","none"]}(e),[s,o]=(0,r.useState)((()=>/^(none|solid|dashed)$/.test(n[1])?n[1]:"none")),[a,l]=(0,r.useState)(Number(mY(n[0]))||0),[p,d]=(0,r.useState)(n[2]||"#000"),f=(e,n)=>{let r;switch(e){case"style":r=[a,n,p];break;case"width":r=[`${n}px`,s,p];break;case"color":r=[a,s,n];break;default:r=["none"]}"none"===r[1]&&(r=["none"]),t(r.join(" "))};return i().createElement(c.xu,null,i().createElement(yY,{label:"风格"},i().createElement(u.Radio.Group,{defaultValue:s,onChange:e=>{o(e.target.value),f("style",e.target.value)},buttonStyle:"solid"},i().createElement(u.Radio.Button,{value:"none"},i().createElement(HH,null)),i().createElement(u.Radio.Button,{value:"solid"},i().createElement(H,null)),i().createElement(u.Radio.Button,{value:"dashed"},i().createElement(Z,null)))),"none"!==s&&i().createElement(c.xu,null,i().createElement(yY,{label:"宽度",mt:"m"},i().createElement(u.InputNumber,{defaultValue:a,addonAfter:"px",min:0,onChange:e=>{l(e),f("width",e)}})),i().createElement(yY,{label:"颜色",mt:"m"},i().createElement(lY,{value:p,onChange:e=>{d(e),f("color",e)}}))))}function yY(e){var{label:t,children:n}=e,r=V(e,["label","children"]);return i().createElement(c.xu,Object.assign({display:"flex",alignItems:"center"},r),i().createElement(c.xu,{mr:"m"},t),i().createElement(c.xu,null,n))}const _Y=e=>e&&e.startsWith("{css`")?e.split("").slice(5,-2).join("").trim():e,bY=e=>{const t=vY.exec(e);return t&&t.length?t[1]:"0"},vY=/^(\d+)px$/,EY=(e,t)=>{const n=new RegExp(`(?<=s*?\n*?;?s*?\n*?${t}s*).*?(?=;)`,"g"),r=new RegExp(`(?<=^[s]*?${t}).*?(?=;)`,"g");return n.test(e)?n:!!r.test(e)&&r};function xY({title:e,children:t}){return i().createElement(c.xu,{borderBottom:"solid",borderBottomColor:"gray.30",px:"m"},i().createElement(c.xu,{pt:"m"},e),i().createElement(c.xu,{py:"m"},t))}var SY=n(48488),OY=n.n(SY);function TY(e,t){let n;if(n=OY().isMoment(e)?e:"string"==typeof e&&t?OY()(e,t):OY()(),n&&n.isValid())return n}const wY={width:"100%"};function CY(e,t){return Array.isArray(e)?e.map((e=>TY(e,t))):[]}function AY(e){var{value:t,onChange:n,format:r="YYYY-MM-DD"}=e,s=V(e,["value","onChange","format"]);return i().createElement(u.DatePicker.RangePicker,Object.assign({},s,{style:wY,format:r,value:CY(t,r),onChange:(e,t)=>{n&&n(t)}}))}var PY={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},kY=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:PY}))};kY.displayName="CloseCircleFilled";var DY=r.forwardRef(kY),RY=n(60532),IY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"expand-alt",theme:"outlined"},LY=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:IY}))};LY.displayName="ExpandAltOutlined";var BY=r.forwardRef(LY),MY=n(5553),jY=n.n(MY),NY=n(51472);function FY(e){return`[${NY.K.dnd}="${e}"]`}const UY="dragGhost",VY=()=>{return e=`#${UY}`,jY()(e).get(0);var e};function KY(e,t){return jY()(e).css(t)}function WY(e,t){const n=e.getBoundingClientRect(),{x:r,y:i}=$Y({x:n.left,y:n.top},t);return{width:e.offsetWidth,height:e.offsetHeight,top:i,left:r}}function $Y(e,t){let n=e.x,r=e.y;if(t){const e=t.getBoundingClientRect();n-=e.left,r-=e.top}return{x:n,y:r}}function qY(e){return jY()(e).css("display")}function QY(e,t){const n=WY(e,t),r=function(e){return Object.assign({},e.dataset)}(e),i=(0,OW.cj)(r.dnd),s=qY(e);return{id:i.id,codeId:i.index,name:i.component||e.tagName.toLowerCase(),filename:i.filename,bounding:n,element:e,display:s}}function zY(e,t){let n=Math.min(Math.abs(e.clientX-t.left),Math.abs(e.clientX-t.right)),r=Math.min(Math.abs(e.clientY-t.top),Math.abs(e.clientY-t.bottom));return e.clientX>=t.left&&e.clientX<=t.right&&(n=0),e.clientY>=t.top&&e.clientY<=t.bottom&&(r=0),Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}const XY="\nimport { defineStore } from '@music163/tango-boot';\nexport default defineStore({\n});\n";function GY(e){const t=Object.assign({},e);return delete t.type,t.formatter&&(0,xK.Lx)(t.formatter)&&(t.formatter=(0,OW.jW)(t.formatter)),t}const ZY=w((()=>{const e=l(),t=R(),{serviceVariables:n}=L(),r=Object.keys(t.serviceModules).map((e=>({label:"index"===e?"默认模块":e,value:e})));return i().createElement(c.xu,{className:"ServiceFunctionList",p:"m"},i().createElement(QW,{dataSource:n,appContext:null==e?void 0:e.window.tango,serviceModules:r,onRemoveService:e=>{t.removeServiceFunction(e)},onAddService:e=>{const n=GY(e),{name:r,moduleName:i}=n,s=V(n,["name","moduleName"]);t.addServiceFunction(r,s,i)},onUpdateService:e=>{const n=GY(e),{name:r,moduleName:i}=n,s=V(n,["name","moduleName"]);t.updateServiceFunction(r,s,i)},getServiceData:e=>{const n=t.getServiceFunction(e);return Object.assign({name:n.name,moduleName:n.moduleName,method:"get"},n.config)}}))}));var HY=ZY;function YY(e){let t;return e&&(t=(0,xK.Lx)(e)?e:`{${e}}`),t}const JY=c.iv` + display: flex; + align-items: center; .anticon-close-circle { color: rgba(0, 0, 0, 0.25); &:hover { color: rgba(0, 0, 0, 0.45); } } -`;function JH(e){const{onChange:t,modalTitle:n,modalTip:s,autoCompleteOptions:o,placeholder:a="输入JS代码",value:u,status:p,allowClear:d=!0,newStoreTemplate:f}=e,[h,{on:m,off:g}]=EK(),[y,_]=(0,r.useState)((()=>(0,xK.BB)(u))),b=l().window;(0,r.useEffect)((()=>{_((0,xK.BB)(u))}),[u]);const v=(0,r.useCallback)((e=>{if(e===u)return;const n=YH(e);n!==u&&t(n)}),[u,t]);return i().createElement(c.xu,{className:"ExpressionSetter"},i().createElement(XV,{placeholder:a,suffix:i().createElement(c.xu,{css:HH},d&&i().createElement(DH,{title:"清空",onClick:()=>{v("")}}),i().createElement(ae,{tooltip:"打开表达式变量选择面板",icon:i().createElement(LH,null),onClick:m,size:"small"})),value:y,onChange:_,onBlur:()=>{v(y)},autoCompleteContext:b,autoCompleteOptions:o,status:p,maxHeight:"200px"}),i().createElement(eJ,{title:n,subTitle:s,placeholder:a,autoCompleteOptions:o,newStoreTemplate:f,visible:h,value:y,onCancel:()=>g(),onOk:e=>{v(e),g()}}))}function eJ({title:e,subTitle:t,placeholder:n,visible:s,onCancel:o=q,onOk:a=q,defaultValue:p,value:d,dataSource:f,autoCompleteOptions:h,newStoreTemplate:m=zH}){const[g,y]=(0,r.useState)(null!=d?d:p),[_,b]=(0,r.useState)(""),v=R(),{expressionVariables:E}=L(),x=Object.keys(v.serviceModules).map((e=>({label:"index"===e?"默认模块":e,value:e}))),S=l(),O=S.window;return(0,r.useEffect)((()=>{y(d)}),[d]),i().createElement(u.Modal,{closable:!1,destroyOnClose:!0,width:"60%",open:s,onCancel:o,onOk:()=>{a(g)},bodyStyle:{padding:0}},i().createElement(We,{title:`将 ${e} 设置为引用变量或自定义表达式`,subTitle:t,shape:"solid"},i().createElement(XV,{shape:"inset",minHeight:"56px",maxHeight:"200px",value:g,placeholder:n,onChange:e=>{y(null==e?void 0:e.trim())},onBlur:()=>{b((e=>{if((0,xK.Lx)(e)){const t=(0,OW.jW)(e);if(!(0,xK.Ab)(t))return"表达式存在语法错误!"}})(g))},autoCompleteContext:O,autoCompleteOptions:h}),_?i().createElement(c.xv,{color:"red"},"输入的表达式存在语法错误,请修改后再提交!"):null),i().createElement(We,{title:"从变量列表中选中",shape:"solid",borderTop:"0",overflow:"hidden",bodyProps:{overflow:"hidden"}},i().createElement(QW,{height:380,showViewButton:!0,dataSource:f||E,appContext:null==S?void 0:S.window.tango,getStoreNames:()=>Object.keys(v.storeModules),serviceModules:x,getServiceData:e=>{const t=v.getServiceFunction(e);return Object.assign({name:t.name,moduleName:t.moduleName,method:"get"},t.config)},onSelect:e=>{if(!e.key)return;if(e.key.split(".").length<2)return;let t;t=/^(stores|services)\./.test(e.key)?`{tango.${e.key.replaceAll(".","?.")}}`:`{${e.key}}`,y(t)},onAddStoreVariable:(e,t)=>{v.addStoreState(e,t.name,t.initialValue)},onUpdateStoreVariable:(e,t)=>{v.updateStoreVariable(e,t)},onAddStore:e=>{v.addStoreFile(e,m)},onRemoveStoreVariable:e=>{v.removeStoreVariable(e)},onRemoveService:e=>{v.removeServiceFunction(e)},onAddService:e=>{const t=XH(e),{name:n,moduleName:r}=t,i=V(t,["name","moduleName"]);v.addServiceFunction(n,i,r)},onUpdateService:e=>{const t=XH(e),{name:n,moduleName:r}=t,i=V(t,["name","moduleName"]);v.updateServiceFunction(n,i,r)},getPreviewValue:e=>{if(e&&e.key&&"function"!==e.type)return(0,Ve.NA)(O.tango,e.key)}})))}var tJ;!function(e){e.NoAction="noAction",e.BindExpression="bindExpression",e.OpenModal="openModal",e.CloseModal="closeModal",e.NavigateTo="navigateTo"}(tJ||(tJ={}));const nJ=c.iv` +`;function eJ(e){const{onChange:t,modalTitle:n,modalTip:s,autoCompleteOptions:o,placeholder:a="输入JS代码",value:p,status:d,allowClear:f=!0,newStoreTemplate:h,showOptionsDropDown:m=!0}=e,[g,{on:y,off:_}]=EK(),[b,v]=(0,r.useState)((()=>(0,xK.BB)(p))),E=l().window;(0,r.useEffect)((()=>{v((0,xK.BB)(p))}),[p]);const x=(0,r.useCallback)((e=>{if(e===p)return;const n=YY(e);n!==p&&t(n)}),[p,t]);return i().createElement(c.xu,{className:"ExpressionSetter"},i().createElement(XV,{placeholder:a,suffix:i().createElement(c.xu,{css:JY},f&&i().createElement(DY,{title:"清空",onClick:()=>{x("")}}),m&&(null==o?void 0:o.length)&&i().createElement(u.Dropdown,{menu:{items:o.map((e=>({key:e,label:i().createElement(c.xv,{onClick:()=>{x(e)}},e)})))}},i().createElement(ae,{tooltip:"使用预设代码片段",icon:i().createElement(RY.Z,null),size:"small"})),i().createElement(ae,{tooltip:"打开表达式变量选择面板",icon:i().createElement(BY,null),onClick:y,size:"small"})),value:b,onChange:v,onBlur:()=>{x(b)},autoCompleteContext:E,autoCompleteOptions:o,status:d,maxHeight:"200px"}),i().createElement(tJ,{title:n,subTitle:s,placeholder:a,autoCompleteOptions:o,newStoreTemplate:h,visible:g,value:b,onCancel:()=>_(),onOk:e=>{x(e),_()}}))}function tJ({title:e,subTitle:t,placeholder:n,visible:s,onCancel:o=q,onOk:a=q,defaultValue:p,value:d,dataSource:f,autoCompleteOptions:h,newStoreTemplate:m=XY}){const[g,y]=(0,r.useState)(null!=d?d:p),[_,b]=(0,r.useState)(""),v=R(),{expressionVariables:E}=L(),x=Object.keys(v.serviceModules).map((e=>({label:"index"===e?"默认模块":e,value:e}))),S=l(),O=S.window;return(0,r.useEffect)((()=>{y(d)}),[d]),i().createElement(u.Modal,{closable:!1,destroyOnClose:!0,width:"60%",open:s,onCancel:o,onOk:()=>{a(g)},bodyStyle:{padding:0}},i().createElement(We,{title:`将 ${e} 设置为引用变量或自定义表达式`,subTitle:t,shape:"solid"},i().createElement(XV,{shape:"inset",minHeight:"56px",maxHeight:"200px",value:g,placeholder:n,onChange:e=>{y(null==e?void 0:e.trim())},onBlur:()=>{b((e=>{if((0,xK.Lx)(e)){const t=(0,OW.jW)(e);if(!(0,xK.Ab)(t))return"表达式存在语法错误!"}})(g))},autoCompleteContext:O,autoCompleteOptions:h}),_?i().createElement(c.xv,{color:"red"},"输入的表达式存在语法错误,请修改后再提交!"):null),i().createElement(We,{title:"从变量列表中选中",shape:"solid",borderTop:"0",overflow:"hidden",bodyProps:{overflow:"hidden"}},i().createElement(QW,{height:380,showViewButton:!0,dataSource:f||E,appContext:null==S?void 0:S.window.tango,getStoreNames:()=>Object.keys(v.storeModules),serviceModules:x,getServiceData:e=>{const t=v.getServiceFunction(e);return Object.assign({name:t.name,moduleName:t.moduleName,method:"get"},t.config)},onSelect:e=>{if(!e.key)return;if(e.key.split(".").length<2)return;let t;t=/^(stores|services)\./.test(e.key)?`{tango.${e.key.replaceAll(".","?.")}}`:`{${e.key}}`,y(t)},onAddStoreVariable:(e,t)=>{v.addStoreState(e,t.name,t.initialValue)},onUpdateStoreVariable:(e,t)=>{v.updateStoreVariable(e,t)},onAddStore:e=>{v.addStoreFile(e,m)},onRemoveStoreVariable:e=>{v.removeStoreVariable(e)},onRemoveService:e=>{v.removeServiceFunction(e)},onAddService:e=>{const t=GY(e),{name:n,moduleName:r}=t,i=V(t,["name","moduleName"]);v.addServiceFunction(n,i,r)},onUpdateService:e=>{const t=GY(e),{name:n,moduleName:r}=t,i=V(t,["name","moduleName"]);v.updateServiceFunction(n,i,r)},getPreviewValue:e=>{if(e&&e.key&&"function"!==e.type)return(0,Ve.NA)(O.tango,e.key)}})))}var nJ;!function(e){e.NoAction="noAction",e.ConsoleLog="consoleLog",e.BindExpression="bindExpression",e.OpenModal="openModal",e.CloseModal="closeModal",e.NavigateTo="navigateTo"}(nJ||(nJ={}));const rJ=c.iv` .ant-select, .ant-input { width: 100%; margin-bottom: 8px; } -`,rJ=[{label:"无动作",value:tJ.NoAction},{label:"绑定 JS 表达式",value:tJ.BindExpression},{label:"打开页面",value:tJ.NavigateTo},{label:"打开弹窗",value:tJ.OpenModal},{label:"关闭弹窗",value:tJ.CloseModal}];const iJ={[tJ.OpenModal]:"openModal",[tJ.CloseModal]:"closeModal",[tJ.NavigateTo]:"navigateTo"};function sJ(e,t=""){const n=iJ[e];if(n)return`{() => tango.${n}("${t}")}`}const oJ=[{label:"取消自定义",value:""},{label:"自定义区域",value:"Box"},{label:"文本",value:"Text"},{label:"占位区域",value:"Placeholder"},{label:"按钮组",value:"ButtonGroup"}],aJ=e=>{let t;const n=[];switch(e){case"Box":t="";break;case"Text":t="示例文本";break;case"Placeholder":t='';break;case"ButtonGroup":t="",n.push("Button")}return[t,n]};var lJ=n(60532);function cJ(e,t,n=0,r=999,i){const s=t.split(".").slice(-1)[0],o=null==i?void 0:i(t,e);return"object"!=typeof e||n>r?Object.assign({title:s,key:t},o):Object.assign({title:s,key:t,selectable:!1,children:Object.keys(e).reduce(((s,o)=>(s.push(cJ(e[o],`${t}.${o}`,n+1,r,i)),s)),[])},o)}function uJ(e,t){Array.isArray(e)?e.forEach((e=>uJ(e,t))):t(e),"children"in e&&uJ(e.children,t)}const pJ=[{label:"文案",name:"label",required:!0},{label:"值",name:"value",required:!0}],dJ=e=>e.value,fJ=e=>e.label;class hJ{get nodes(){return this.nodeMap.values()}constructor(e){this.keyProp=e.keyProp||"value",this.childrenProp=e.childrenProp||"children",this.nodeMap=new Map,this.visitNodes(e.data)}getNode(e){if(e)return this.nodeMap.get(e)}visitNodes(e){Array.isArray(e)&&0!==e.length&&e.forEach((e=>{const t=e[this.keyProp];this.nodeMap.set(t,e),(0,Ee.Kp)(this.nodeMap.has(t),`duplicate value '${t}' detected! All node values should be unique!`),this.nodeMap.set(t,e),e[this.childrenProp]&&this.visitNodes(e[this.childrenProp])}))}}const mJ={width:"100%"};function gJ(e){var{options:t,onChange:n}=e,s=V(e,["options","onChange"]);const o=(0,r.useMemo)((()=>new hJ({data:t})),[t]);return i().createElement(u.Select,Object.assign({showSearch:!0,allowClear:!0,style:mJ,placeholder:"请选择",options:t,onChange:e=>{const t=o.getNode(e),r=(null==t?void 0:t.relatedImports)?{relatedImports:t.relatedImports}:void 0;null==n||n(e,r)}},s))}function yJ({onChange:e,text:t="自定义渲染为",options:n=[],fallbackOption:s}){const o=(0,r.useMemo)((()=>n.reduce(((e,t)=>(e[t.value]=t,e)),{})),[n]),a=(0,r.useCallback)((t=>{const n=o[t]||s;(null==n?void 0:n.render)?e(n.render,{relatedImports:n.relatedImports}):e(void 0)}),[o,s,e]);return i().createElement(_e,{text:t,options:n,onSelect:a})}const _J=(e,t)=>{switch(t){case"tableCell":return`{(value, record, index) => ${e}}`;case"tableExpandable":return`{{\n expandedRowRender: (record) => ${e},\n rowExpandable: (record) => true\n }}`;default:return`{() => ${e}}`}},bJ=[{label:"取消自定义",value:""},{label:"自定义区域",value:"Box",render:_J("","tableCell"),relatedImports:["Box"]},{label:"标签",value:"Tag",render:_J("tag","tableCell"),relatedImports:["Tag"]},{label:"按钮",value:"Button",render:_J("","tableCell"),relatedImports:["Button"]},{label:"图片",value:"Image",render:_J('',"tableCell"),relatedImports:["Image"]}],vJ=[{label:"设置可展开行",value:"Box",render:_J("","tableExpandable"),relatedImports:["Box"]},{label:"取消可展开行",value:""}];const EJ=[{name:"boolSetter",component:function(e){var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(u.Switch,Object.assign({checked:t,onChange:e=>null==n?void 0:n(e)},r))}},{name:"choiceSetter",component:HY},{name:"expSetter",alias:["expressionSetter"],component:JH},{name:"numberSetter",component:function(e){var{onChange:t}=e,n=V(e,["onChange"]);return i().createElement(u.InputNumber,Object.assign({placeholder:"请输入数字",style:y$,onChange:e=>{null===e&&(e=void 0),t&&t(e)}},n))}},{name:"textSetter",component:tH},{name:"textAreaSetter",component:function(e){var{value:t,onChange:n=eH,placeholder:s="请输入"}=e,o=V(e,["value","onChange","placeholder"]);const[a,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{l(t)}),[t]),i().createElement(u.Input.TextArea,Object.assign({placeholder:s,allowClear:!0,value:a,onChange:e=>l(e.target.value),onBlur:()=>{n(a)},autoSize:nH},o))}},{name:"sliderSetter",component:_$},{name:"actionListSetter",component:function(e){return i().createElement(s$,Object.assign({getListItemKey:l$,renderItem:c$,listItemFormFields:a$,newItemDefaultValues:o$},e))}},{name:"columnSetter",component:function(e){return i().createElement(s$,Object.assign({getListItemKey:e=>e.key||e.dataIndex,addBtnText:"添加新列",listItemFormFields:h$,newItemDefaultValues:f$,renderItem:m$},e))}},{name:"cssSetter",component:function(e){var t,n,s,o,a,l,p,d,f,h,m,g,y;const{value:_,onChange:b}=e,[v,E]=(0,r.useState)((()=>_H(_))),[x,S]=(0,r.useState)(""),O=(0,r.useCallback)(((e,t)=>{if(v)if(EH(v,t)){const n=v.replace(EH(v,t),`:${e}`);E(n)}else E((n=>n?`${n}\n${t}: ${e};`:`\n${t}: ${e};`));else E((n=>n?`${n}\n${t}: ${e};`:`\n${t}: ${e};`))}),[v]),T=(0,r.useCallback)((e=>{const t=_H(e);E(t)}),[]);(0,r.useEffect)((()=>{(v||""===v)&&b(`{css\`${v}\`}`,{})}),[v]);const w=["flex","inline-flex"].includes(x);return i().createElement(c.xu,null,i().createElement(xH,{title:"布局方式"},i().createElement(iH,{value:null===(t=(0,g$.toJSON)(v).attributes)||void 0===t?void 0:t.display,onChange:e=>{S(e),O(e,"display")}})),w?i().createElement(i().Fragment,null,i().createElement(xH,{title:"主轴方向"},i().createElement(sH,{value:null===(n=(0,g$.toJSON)(v).attributes)||void 0===n?void 0:n["flex-direction"],onChange:e=>{O(e,"flex-direction")}})),i().createElement(xH,{title:"主轴对齐方式"},i().createElement(oH,{value:null===(s=(0,g$.toJSON)(v).attributes)||void 0===s?void 0:s["justify-content"],onChange:e=>{O(e,"justify-content")}})),i().createElement(xH,{title:"辅轴对齐方式"},i().createElement(aH,{value:null===(o=(0,g$.toJSON)(v).attributes)||void 0===o?void 0:o["align-items"],onChange:e=>{O(e,"align-items")}}))):null,i().createElement(xH,{title:"外边距"},i().createElement(fH,{value:null===(a=(0,g$.toJSON)(v).attributes)||void 0===a?void 0:a.margin,onChange:e=>{O(e,"margin")}})),i().createElement(xH,{title:"内边距"},i().createElement(fH,{value:null===(l=(0,g$.toJSON)(v).attributes)||void 0===l?void 0:l.padding,onChange:e=>{O(e,"padding")}})),i().createElement(xH,{title:"宽高"},i().createElement(u.Space,null,i().createElement(u.InputNumber,{addonBefore:"宽度",addonAfter:"px",defaultValue:bH(null===(p=(0,g$.toJSON)(v).attributes)||void 0===p?void 0:p.width),onChange:e=>{O(`${e}px`,"width")}}),i().createElement(u.InputNumber,{addonBefore:"高度",addonAfter:"px",defaultValue:bH(null===(d=(0,g$.toJSON)(v).attributes)||void 0===d?void 0:d.height),onChange:e=>{O(`${e}px`,"height")}}))),i().createElement(xH,{title:"文字颜色"},i().createElement(lH,{value:null===(f=(0,g$.toJSON)(v).attributes)||void 0===f?void 0:f.color,onChange:e=>{O(e,"color")}})),i().createElement(xH,{title:"文字大小"},i().createElement(u.InputNumber,{addonBefore:"字体大小",addonAfter:"px",defaultValue:bH(null===(h=(0,g$.toJSON)(v).attributes)||void 0===h?void 0:h["font-size"]),onChange:e=>{O(`${e}px`,"font-size")}})),i().createElement(xH,{title:"背景"},i().createElement(dH,{value:null===(m=(0,g$.toJSON)(v).attributes)||void 0===m?void 0:m.background,onChange:e=>{RegExp(/url/).test(e)?O(e,"background-image"):O(e,"background-color")}})),i().createElement(xH,{title:"边框"},i().createElement(gH,{value:null===(g=(0,g$.toJSON)(v).attributes)||void 0===g?void 0:g.border,onChange:e=>{O(e,"border")}})),i().createElement(xH,{title:"透明度"},i().createElement(_$,{max:1,min:0,step:.1,value:(null===(y=(0,g$.toJSON)(v).attributes)||void 0===y?void 0:y.opacity)||1,onChange:e=>{O(e,"opacity")}})),i().createElement(xH,{title:"样式编写"},i().createElement(rH,{value:v,onChange:T})))}},{name:"dateSetter",component:function(e){var{value:t,onChange:n,format:r="YYYY-MM-DD"}=e,s=V(e,["value","onChange","format"]);return i().createElement(u.DatePicker,Object.assign({},s,{format:r,style:wH,value:TH(t,r),onChange:(e,t)=>{n&&n(t)}}))}},{name:"dateRangeSetter",component:AH},{name:"timeSetter",component:AH},{name:"timeRangeSetter",component:function(e){var{value:t,onChange:n,format:r="HH:mm:ss"}=e,s=V(e,["value","onChange","format"]);return i().createElement(u.TimePicker.RangePicker,Object.assign({},s,{style:wH,format:r,value:CH(t,r),onChange:(e,t)=>{n&&n(t)}}))}},{name:"enumSetter",component:function(e){return i().createElement(EW,Object.assign({},e))}},{name:"eventSetter",alias:["actionSetter","functionSetter","callbackSetter"],component:function(e){const{value:t,onChange:n,modalTitle:s}=e,[o,a]=(0,r.useState)(),[l,p]=(0,r.useState)(""),[d,f]=(0,r.useState)(!1),{actionVariables:h,routeOptions:m}=L(),g=R().activeViewModule.listModals()||[],y=(0,r.useCallback)(((e,...r)=>{const i=YH(e);i!==t&&n(i,...r)}),[n,t]),_=function(e,t,n){let r;iJ[e]?r=sJ(e,t):n&&(r=n);return r=r||"请选择",r}(o,l,t),b=t;return i().createElement(c.xu,{css:nJ},i().createElement(_e,{options:rJ,onSelect:e=>{switch(a(e),p(""),e){case tJ.BindExpression:f(!0);break;case tJ.NoAction:y(void 0)}},text:_}),i().createElement(eJ,{title:s,value:b,visible:d,onCancel:()=>f(!1),onOk:e=>{f(!1),y(e)},dataSource:h}),o===tJ.NavigateTo&&i().createElement(u.AutoComplete,{placeholder:"选择或输入页面路由",options:m,value:l,onChange:p,onBlur:()=>{l&&y(sJ(o,l))}}),o===tJ.OpenModal&&i().createElement(u.AutoComplete,{placeholder:"选择或输入弹窗 id",options:g,value:l,onChange:p,onBlur:()=>{l&&y(sJ(o,l))}}),o===tJ.CloseModal&&i().createElement(u.AutoComplete,{placeholder:"选择或输入弹窗 id",options:g,value:l,onChange:p,onBlur:()=>{l&&y(sJ(o,l))}}))}},{name:"expressionSetter",alias:["expSetter"],component:JH},{name:"jsonSetter",component:function({value:e,onChange:t}){return i().createElement(c.xu,{height:"120px",border:"solid",borderColor:"line.normal",borderRadius:"s"},i().createElement(ve,{defaultValue:e,onBlur:n=>{n!==e&&t(`{${n}}`)},language:"json",options:{lineNumbers:"off",minimap:{enabled:!1}}}))}},{name:"jsxSetter",component:function(e){const{showInput:t,getTemplate:n=aJ,value:r,onChange:s}=e;return i().createElement(_e,{showInput:t,defaultInputValue:(0,OW.X6)(r)?r:void 0,options:oJ,text:"将此区域初始化为",onInputChange:s,onSelect:e=>{const[t,r]=n(e);t?s(`{${t}}`,{relatedImports:[...r,e]}):s(void 0)}})}},{name:"listSetter",component:s$},{name:"modelSetter",component:function({value:e,onChange:t,newStoreTemplate:n=zH}){var s,o;const[a,p]=(0,r.useState)(e),{modelVariables:d}=L(),f=l().window||{},h=R(),m=(0,r.useMemo)((()=>{const e=[];return uJ(d,(t=>{t.key.split(".").length>1&&e.push(t.key)})),e}),[d]),g=(null===(s=f.tango)||void 0===s?void 0:s.stores)?[cJ(null===(o=f.tango)||void 0===o?void 0:o.stores,"stores",0,1,((e,t)=>{const n={};return(0,$.mf)(t)&&(n.disabled=!0,n.type="function"),m.includes(e)?/^stores\.[a-zA-Z0-9]+$/.test(e)&&(n.showAddButton=!0):(n.showAddButton=!1,n.showRemoveButton=!1),n}))]:d;(0,r.useEffect)((()=>{e!==a&&p(e)}),[e]);const y=(0,r.useCallback)((e=>{var t;p(null===(t=e.target)||void 0===t?void 0:t.value)}),[]),_=(0,r.useCallback)((e=>{var n;const r=null===(n=e.target)||void 0===n?void 0:n.value;t(r||void 0)}),[t]);return i().createElement(c.xu,null,i().createElement(u.Input,{value:a,placeholder:"将结果同步到的变量,例如storeName.varName",allowClear:!0,autoFocus:!1,onChange:y,onBlur:_,suffix:i().createElement(zW,{title:"同步到的变量",trigger:i().createElement(u.Tooltip,{title:"从模型列表选择",placement:"topRight"},i().createElement(lJ.Z,null)),dataSource:g,onSelect:e=>{const n=e.key.split(".").slice(1).join(".");t(n)},onAddStoreVariable:(e,t)=>{h.addStoreState(e,t.name,t.initialValue)},onUpdateStoreVariable:(e,t)=>{h.updateStoreVariable(e,t)},onAddStore:e=>{h.addStoreFile(e,n)},onRemoveStoreVariable:e=>{h.removeStoreVariable(e)},onRemoveService:e=>{h.removeServiceFunction(e)},getStoreNames:()=>Object.keys(h.storeModules),getPreviewValue:e=>{if(e&&e.key)return(0,Ve.NA)(f.tango,e.key)}})}))}},{name:"optionSetter",component:function(e){return i().createElement(s$,Object.assign({getListItemKey:dJ,renderItem:fJ,listItemFormFields:pJ,getNewItemDefaultValues:()=>{const e=(0,OW.Vj)("_",4);return{label:`选项${e}`,value:e}}},e))}},{name:"pickerSetter",component:gJ},{name:"renderPropsSetter",component:yJ},{name:"tableCellSetter",component:function(e){return i().createElement(yJ,Object.assign({options:bJ},e))}},{name:"tableExpandableSetter",component:function(e){return i().createElement(yJ,Object.assign({options:vJ,text:"配置表格可展开行"},e))}},{name:"routerSetter",component:function(e){const[t,n]=(0,r.useState)((()=>(0,OW.jv)(e.value)?"input":"select")),[s,o]=(0,r.useState)(e.value),{routeOptions:a}=L(),l=e.type||"both";return(0,r.useEffect)((()=>{n("router"===l?"select":"input")}),[l]),i().createElement(c.xu,null,i().createElement(c.xu,{mb:"m"},["both","router"].includes(l)&&i().createElement(u.Radio.Group,{value:t,optionType:"button",buttonStyle:"solid",onChange:e=>n(e.target.value)},i().createElement(u.Radio,{value:"select"},"选择路由"),i().createElement(u.Radio,{value:"input"},"自定义输入"))),"select"===t&&i().createElement(gJ,Object.assign({placeholder:"请选择本地路由",options:a},e)),"input"===t&&i().createElement(u.Input,Object.assign({placeholder:`请输入任意${{link:"链接",router:"路由",both:""}[l]}地址`},e,{value:s,onChange:e=>o(e.target.value),onBlur:()=>null==e?void 0:e.onChange(s)})))}},{name:"displaySetter",component:iH},{name:"flexDirectionSetter",component:sH},{name:"flexGapSetter",component:function({value:e,onChange:t}){const n=function(e){if(!e||"string"!=typeof e)return["0","0"];const t=e.split(" ");if(1===t.length)return["0","0"];return t.map(mH)}(e),s=(0,r.useRef)([...n]),o=e=>n=>{s.current[e]=`${n}px`,t(s.current.join(" "))};return i().createElement(c.rj,{columns:2,spacing:"m"},i().createElement(u.InputNumber,{addonBefore:"主",addonAfter:"px",defaultValue:n[0],onChange:o(0)}),i().createElement(u.InputNumber,{addonBefore:"辅",addonAfter:"px",defaultValue:n[1],onChange:o(1)}))}},{name:"flexJustifyContentSetter",component:oH},{name:"flexAlignItemsSetter",component:aH},{name:"spacingSetter",component:fH},{name:"colorSetter",component:lH},{name:"bgSetter",component:dH},{name:"borderSetter",component:gH}];EJ.forEach(KK);const xJ={fontSize:"18px"},SJ=w((e=>{var t,n;const r=R(),s=I();if(!s.showRightPanel||!r.selectSource.isSelected)return i().createElement(c.xu,{className:"SettingPanel"});let o="flex";("design"!==s.activeView||s.isPreview)&&(o="none");const a=(e=>{const t={},n=Object.keys(e);for(const r of n)/^data-/.test(r)||(t[r]=e[r]);return t})((null===(t=r.selectSource.firstNode)||void 0===t?void 0:t.props)||{}),l=new GK(a,{onChange(e,t,n){var i;if(!e)return;if("tid"===e&&r.activeViewModule.hasNodeByCodeId(t))return;let s=e,o=t;const a=e.split(".");a.length>1&&(s=a[0],o=(0,Ve.d9)(l.getValue(s),!1),Object.keys(o).length||(o=void 0)),n?n.error||r.updateSelectedNodeAttributes({[s]:o},null===(i=n.detail)||void 0===i?void 0:i.relatedImports):r.updateSelectedNodeAttributes({[s]:o})}}),u=r.componentPrototypes.get(null===(n=r.selectSource.first)||void 0===n?void 0:n.name);return i().createElement(We,{display:o,flexDirection:"column",width:"320px",borderLeft:"solid",borderLeftColor:"line2",bg:"white",headerProps:xJ,className:"SettingPanel"},u?i().createElement(uW,Object.assign({key:r.selectSource.first.id,model:l,prototype:u,showIdentifier:{identifierKey:"tid"}},e)):i().createElement(c.xu,{p:"m"},"没有找到与该组件相关的配置信息"))})),OJ=w((e=>{const{mode:t="design",children:n}=e,r=I(),s=t!==r.activeView?"none":"block",o="phone"===r.simulator.name||r.isPreview?"auto":"hidden";return i().createElement(c.xu,{className:`ViewPanel ${t}`,display:s,flex:"1",overflow:o,position:"relative"},n)})),TJ=w((({children:e})=>{const t="desktop"===I().simulator.name?wJ:AJ;return i().createElement(t,null,e)}));function wJ({children:e}){return i().createElement(c.xu,{className:"DesktopSimulator",height:"100%"},e)}const CJ=c.iv` +`,iJ=[{label:"无动作",value:nJ.NoAction},{label:"打印事件",value:nJ.ConsoleLog},{label:"绑定 JS 表达式",value:nJ.BindExpression},{label:"打开页面",value:nJ.NavigateTo},{label:"打开弹窗",value:nJ.OpenModal},{label:"关闭弹窗",value:nJ.CloseModal}];const sJ={[nJ.OpenModal]:"openModal",[nJ.CloseModal]:"closeModal",[nJ.NavigateTo]:"navigateTo"};function oJ(e,t=""){const n=sJ[e];if(n)return`{() => tango.${n}("${t}")}`}const aJ=[{label:"取消自定义",value:""},{label:"自定义区域",value:"Box"},{label:"文本",value:"Text"},{label:"占位区域",value:"Placeholder"},{label:"按钮组",value:"ButtonGroup"}],lJ=e=>{let t;switch(e){case"Box":t=["",["Box"]];break;case"Text":t=["示例文本",["Text"]];break;case"Placeholder":t=['',["Placeholder"]];break;case"ButtonGroup":t=["",["ButtonGroup","Button"]]}return t};function cJ(e,t,n=0,r=999,i){const s=t.split(".").slice(-1)[0],o=null==i?void 0:i(t,e);return"object"!=typeof e||n>r?Object.assign({title:s,key:t},o):Object.assign({title:s,key:t,selectable:!1,children:Object.keys(e).reduce(((s,o)=>(s.push(cJ(e[o],`${t}.${o}`,n+1,r,i)),s)),[])},o)}function uJ(e,t){Array.isArray(e)?e.forEach((e=>uJ(e,t))):t(e),"children"in e&&uJ(e.children,t)}const pJ=[{label:"文案",name:"label",required:!0},{label:"值",name:"value",required:!0}],dJ=e=>e.value,fJ=e=>e.label;class hJ{get nodes(){return this.nodeMap.values()}constructor(e){this.keyProp=e.keyProp||"value",this.childrenProp=e.childrenProp||"children",this.nodeMap=new Map,this.visitNodes(e.data)}getNode(e){if(e)return this.nodeMap.get(e)}visitNodes(e){Array.isArray(e)&&0!==e.length&&e.forEach((e=>{const t=e[this.keyProp];this.nodeMap.set(t,e),(0,Ee.Kp)(this.nodeMap.has(t),`duplicate value '${t}' detected! All node values should be unique!`),this.nodeMap.set(t,e),e[this.childrenProp]&&this.visitNodes(e[this.childrenProp])}))}}const mJ={width:"100%"};function gJ(e){var{options:t,onChange:n}=e,s=V(e,["options","onChange"]);const o=(0,r.useMemo)((()=>new hJ({data:t})),[t]);return i().createElement(u.Select,Object.assign({showSearch:!0,allowClear:!0,style:mJ,placeholder:"请选择",options:t,onChange:e=>{const t=o.getNode(e),r=(null==t?void 0:t.relatedImports)?{relatedImports:t.relatedImports}:void 0;null==n||n(e,r)}},s))}function yJ({value:e,onChange:t,text:n="自定义渲染为",options:s=[],fallbackOption:o}){const[a,l]=(0,r.useState)(e);(0,r.useEffect)((()=>{l(e)}),[e]);const u=(0,r.useMemo)((()=>s.reduce(((e,t)=>(e[t.value]=t,e)),{})),[s]),p=(0,r.useCallback)((e=>{const n=u[e]||o;(null==n?void 0:n.render)?t(n.render,{relatedImports:n.relatedImports}):t(void 0)}),[u,o,t]);return i().createElement(c.xu,null,i().createElement(_e,{text:n,options:s,onSelect:p}),e&&i().createElement(XV,{value:e,onChange:e=>l(e),onBlur:()=>t(a)}))}const _J=(e,t)=>{switch(t){case"tableCell":return`{(value, record, index) => ${e}}`;case"tableExpandable":return`{{\n expandedRowRender: (record) => ${e},\n rowExpandable: (record) => true\n }}`;default:return`{() => ${e}}`}},bJ=[{label:"取消自定义",value:""},{label:"自定义区域",value:"Box",render:_J("","tableCell"),relatedImports:["Box"]},{label:"标签",value:"Tag",render:_J("tag","tableCell"),relatedImports:["Tag"]},{label:"按钮",value:"Button",render:_J("","tableCell"),relatedImports:["Button"]},{label:"图片",value:"Image",render:_J('',"tableCell"),relatedImports:["Image"]}],vJ=[{label:"设置可展开行",value:"Box",render:_J("","tableExpandable"),relatedImports:["Box"]},{label:"取消可展开行",value:""}];const EJ=[{name:"boolSetter",component:function(e){var{value:t,onChange:n}=e,r=V(e,["value","onChange"]);return i().createElement(u.Switch,Object.assign({checked:t,onChange:e=>null==n?void 0:n(e)},r))}},{name:"choiceSetter",component:YH},{name:"expSetter",alias:["expressionSetter"],component:eJ},{name:"numberSetter",component:function(e){var{onChange:t}=e,n=V(e,["onChange"]);return i().createElement(u.InputNumber,Object.assign({placeholder:"请输入数字",style:y$,onChange:e=>{null===e&&(e=void 0),t&&t(e)}},n))}},{name:"textSetter",component:tY},{name:"textAreaSetter",component:function(e){var{value:t,onChange:n=eY,placeholder:s="请输入"}=e,o=V(e,["value","onChange","placeholder"]);const[a,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{l(t)}),[t]),i().createElement(u.Input.TextArea,Object.assign({placeholder:s,allowClear:!0,value:a,onChange:e=>l(e.target.value),onBlur:()=>{n(a)},autoSize:nY},o))}},{name:"sliderSetter",component:_$},{name:"actionListSetter",component:function(e){return i().createElement(s$,Object.assign({getListItemKey:l$,renderItem:c$,listItemFormFields:a$,newItemDefaultValues:o$},e))}},{name:"columnSetter",component:function(e){return i().createElement(s$,Object.assign({getListItemKey:e=>e.key||e.dataIndex,addBtnText:"添加新列",listItemFormFields:h$,newItemDefaultValues:f$,renderItem:m$},e))}},{name:"cssSetter",component:function(e){var t,n,s,o,a,l,p,d,f,h,m,g,y;const{value:_,onChange:b}=e,[v,E]=(0,r.useState)((()=>_Y(_))),[x,S]=(0,r.useState)(""),O=(0,r.useCallback)(((e,t)=>{if(v)if(EY(v,t)){const n=v.replace(EY(v,t),`:${e}`);E(n)}else E((n=>n?`${n}\n${t}: ${e};`:`\n${t}: ${e};`));else E((n=>n?`${n}\n${t}: ${e};`:`\n${t}: ${e};`))}),[v]),T=(0,r.useCallback)((e=>{const t=_Y(e);E(t)}),[]);(0,r.useEffect)((()=>{(v||""===v)&&b(`{css\`${v}\`}`,{})}),[v]);const w=["flex","inline-flex"].includes(x);return i().createElement(c.xu,null,i().createElement(xY,{title:"布局方式"},i().createElement(iY,{value:null===(t=(0,g$.toJSON)(v).attributes)||void 0===t?void 0:t.display,onChange:e=>{S(e),O(e,"display")}})),w?i().createElement(i().Fragment,null,i().createElement(xY,{title:"主轴方向"},i().createElement(sY,{value:null===(n=(0,g$.toJSON)(v).attributes)||void 0===n?void 0:n["flex-direction"],onChange:e=>{O(e,"flex-direction")}})),i().createElement(xY,{title:"主轴对齐方式"},i().createElement(oY,{value:null===(s=(0,g$.toJSON)(v).attributes)||void 0===s?void 0:s["justify-content"],onChange:e=>{O(e,"justify-content")}})),i().createElement(xY,{title:"辅轴对齐方式"},i().createElement(aY,{value:null===(o=(0,g$.toJSON)(v).attributes)||void 0===o?void 0:o["align-items"],onChange:e=>{O(e,"align-items")}}))):null,i().createElement(xY,{title:"外边距"},i().createElement(fY,{value:null===(a=(0,g$.toJSON)(v).attributes)||void 0===a?void 0:a.margin,onChange:e=>{O(e,"margin")}})),i().createElement(xY,{title:"内边距"},i().createElement(fY,{value:null===(l=(0,g$.toJSON)(v).attributes)||void 0===l?void 0:l.padding,onChange:e=>{O(e,"padding")}})),i().createElement(xY,{title:"宽高"},i().createElement(u.Space,null,i().createElement(u.InputNumber,{addonBefore:"宽度",addonAfter:"px",defaultValue:bY(null===(p=(0,g$.toJSON)(v).attributes)||void 0===p?void 0:p.width),onChange:e=>{O(`${e}px`,"width")}}),i().createElement(u.InputNumber,{addonBefore:"高度",addonAfter:"px",defaultValue:bY(null===(d=(0,g$.toJSON)(v).attributes)||void 0===d?void 0:d.height),onChange:e=>{O(`${e}px`,"height")}}))),i().createElement(xY,{title:"文字颜色"},i().createElement(lY,{value:null===(f=(0,g$.toJSON)(v).attributes)||void 0===f?void 0:f.color,onChange:e=>{O(e,"color")}})),i().createElement(xY,{title:"文字大小"},i().createElement(u.InputNumber,{addonBefore:"字体大小",addonAfter:"px",defaultValue:bY(null===(h=(0,g$.toJSON)(v).attributes)||void 0===h?void 0:h["font-size"]),onChange:e=>{O(`${e}px`,"font-size")}})),i().createElement(xY,{title:"背景"},i().createElement(dY,{value:null===(m=(0,g$.toJSON)(v).attributes)||void 0===m?void 0:m.background,onChange:e=>{RegExp(/url/).test(e)?O(e,"background-image"):O(e,"background-color")}})),i().createElement(xY,{title:"边框"},i().createElement(gY,{value:null===(g=(0,g$.toJSON)(v).attributes)||void 0===g?void 0:g.border,onChange:e=>{O(e,"border")}})),i().createElement(xY,{title:"透明度"},i().createElement(_$,{max:1,min:0,step:.1,value:(null===(y=(0,g$.toJSON)(v).attributes)||void 0===y?void 0:y.opacity)||1,onChange:e=>{O(e,"opacity")}})),i().createElement(xY,{title:"样式编写"},i().createElement(rY,{value:v,onChange:T})))}},{name:"dateSetter",component:function(e){var{value:t,onChange:n,format:r="YYYY-MM-DD"}=e,s=V(e,["value","onChange","format"]);return i().createElement(u.DatePicker,Object.assign({},s,{format:r,style:wY,value:TY(t,r),onChange:(e,t)=>{n&&n(t)}}))}},{name:"dateRangeSetter",component:AY},{name:"timeSetter",component:AY},{name:"timeRangeSetter",component:function(e){var{value:t,onChange:n,format:r="HH:mm:ss"}=e,s=V(e,["value","onChange","format"]);return i().createElement(u.TimePicker.RangePicker,Object.assign({},s,{style:wY,format:r,value:CY(t,r),onChange:(e,t)=>{n&&n(t)}}))}},{name:"enumSetter",component:function(e){return i().createElement(EW,Object.assign({},e))}},{name:"eventSetter",alias:["actionSetter","functionSetter","callbackSetter"],component:function(e){const{value:t,onChange:n,modalTitle:s}=e,[o,a]=(0,r.useState)(),[l,p]=(0,r.useState)(""),[d,f]=(0,r.useState)(!1),{actionVariables:h,routeOptions:m}=L(),g=R().activeViewModule.listModals()||[],y=(0,r.useCallback)(((e,...r)=>{const i=YY(e);i!==t&&n(i,...r)}),[n,t]),_=function(e,t,n){let r;sJ[e]?r=oJ(e,t):n&&(r=n);return r=r||"请选择",r}(o,l,t),b=t;return i().createElement(c.xu,{css:rJ},i().createElement(_e,{options:iJ,onSelect:e=>{switch(a(e),p(""),e){case nJ.BindExpression:f(!0);break;case nJ.ConsoleLog:y("(...args) => console.log(...args)");break;case nJ.NoAction:y(void 0)}},text:_}),i().createElement(tJ,{title:s,value:b,visible:d,onCancel:()=>f(!1),onOk:e=>{f(!1),y(e)},dataSource:h}),o===nJ.NavigateTo&&i().createElement(u.AutoComplete,{placeholder:"选择或输入页面路由",options:m,value:l,onChange:p,onBlur:()=>{l&&y(oJ(o,l))}}),o===nJ.OpenModal&&i().createElement(u.AutoComplete,{placeholder:"选择或输入弹窗 id",options:g,value:l,onChange:p,onBlur:()=>{l&&y(oJ(o,l))}}),o===nJ.CloseModal&&i().createElement(u.AutoComplete,{placeholder:"选择或输入弹窗 id",options:g,value:l,onChange:p,onBlur:()=>{l&&y(oJ(o,l))}}))}},{name:"expressionSetter",alias:["expSetter"],component:eJ},{name:"jsonSetter",component:function({value:e,onChange:t}){return i().createElement(c.xu,{height:"120px",border:"solid",borderColor:"line.normal",borderRadius:"s"},i().createElement(ve,{defaultValue:e,onBlur:n=>{n!==e&&t(`{${n}}`)},language:"json",options:{lineNumbers:"off",minimap:{enabled:!1}}}))}},{name:"jsxSetter",component:function(e){const{showInput:t,getTemplate:n=lJ,value:r,onChange:s}=e;return i().createElement(c.xu,null,i().createElement(_e,{showInput:t,defaultInputValue:(0,OW.X6)(r)?r:void 0,options:aJ,text:"设置此区域为",onInputChange:s,onSelect:e=>{const[t,r]=n(e);t?s(`{${t}}`,{relatedImports:r}):s(void 0)}}),r&&i().createElement(XV,{value:r,readOnly:!0,editable:!1}))}},{name:"listSetter",component:s$},{name:"modelSetter",component:function({value:e,onChange:t,newStoreTemplate:n=XY}){var s,o;const[a,p]=(0,r.useState)(e),{modelVariables:d}=L(),f=l().window||{},h=R(),m=(0,r.useMemo)((()=>{const e=[];return uJ(d,(t=>{t.key.split(".").length>1&&e.push(t.key)})),e}),[d]),g=(null===(s=f.tango)||void 0===s?void 0:s.stores)?[cJ(null===(o=f.tango)||void 0===o?void 0:o.stores,"stores",0,1,((e,t)=>{const n={};return(0,$.mf)(t)&&(n.disabled=!0,n.type="function"),m.includes(e)?/^stores\.[a-zA-Z0-9]+$/.test(e)&&(n.showAddButton=!0):(n.showAddButton=!1,n.showRemoveButton=!1),n}))]:d;(0,r.useEffect)((()=>{e!==a&&p(e)}),[e]);const y=(0,r.useCallback)((e=>{var t;p(null===(t=e.target)||void 0===t?void 0:t.value)}),[]),_=(0,r.useCallback)((e=>{var n;const r=null===(n=e.target)||void 0===n?void 0:n.value;t(r||void 0)}),[t]);return i().createElement(c.xu,null,i().createElement(u.Input,{value:a,placeholder:"将结果同步到的变量,例如storeName.varName",allowClear:!0,autoFocus:!1,onChange:y,onBlur:_,suffix:i().createElement(zW,{title:"同步到的变量",trigger:i().createElement(u.Tooltip,{title:"从模型列表选择",placement:"topRight"},i().createElement(RY.Z,null)),dataSource:g,onSelect:e=>{const n=e.key.split(".").slice(1).join(".");t(n)},onAddStoreVariable:(e,t)=>{h.addStoreState(e,t.name,t.initialValue)},onUpdateStoreVariable:(e,t)=>{h.updateStoreVariable(e,t)},onAddStore:e=>{h.addStoreFile(e,n)},onRemoveStoreVariable:e=>{h.removeStoreVariable(e)},onRemoveService:e=>{h.removeServiceFunction(e)},getStoreNames:()=>Object.keys(h.storeModules),getPreviewValue:e=>{if(e&&e.key)return(0,Ve.NA)(f.tango,e.key)}})}))}},{name:"optionSetter",component:function(e){return i().createElement(s$,Object.assign({getListItemKey:dJ,renderItem:fJ,listItemFormFields:pJ,getNewItemDefaultValues:()=>{const e=(0,OW.Vj)("_",4);return{label:`选项${e}`,value:e}}},e))}},{name:"pickerSetter",component:gJ},{name:"renderPropsSetter",component:yJ},{name:"tableCellSetter",component:function(e){return i().createElement(yJ,Object.assign({options:bJ},e))}},{name:"tableExpandableSetter",component:function(e){return i().createElement(yJ,Object.assign({options:vJ,text:"配置表格可展开行"},e))}},{name:"routerSetter",component:function(e){const[t,n]=(0,r.useState)((()=>(0,OW.jv)(e.value)?"input":"select")),[s,o]=(0,r.useState)(e.value),{routeOptions:a}=L(),l=e.type||"both";return(0,r.useEffect)((()=>{n("router"===l?"select":"input")}),[l]),i().createElement(c.xu,null,i().createElement(c.xu,{mb:"m"},["both","router"].includes(l)&&i().createElement(u.Radio.Group,{value:t,optionType:"button",buttonStyle:"solid",onChange:e=>n(e.target.value)},i().createElement(u.Radio,{value:"select"},"选择路由"),i().createElement(u.Radio,{value:"input"},"自定义输入"))),"select"===t&&i().createElement(gJ,Object.assign({placeholder:"请选择本地路由",options:a},e)),"input"===t&&i().createElement(u.Input,Object.assign({placeholder:`请输入任意${{link:"链接",router:"路由",both:""}[l]}地址`},e,{value:s,onChange:e=>o(e.target.value),onBlur:()=>null==e?void 0:e.onChange(s)})))}},{name:"displaySetter",component:iY},{name:"flexDirectionSetter",component:sY},{name:"flexGapSetter",component:function({value:e,onChange:t}){const n=function(e){if(!e||"string"!=typeof e)return["0","0"];const t=e.split(" ");if(1===t.length)return["0","0"];return t.map(mY)}(e),s=(0,r.useRef)([...n]),o=e=>n=>{s.current[e]=`${n}px`,t(s.current.join(" "))};return i().createElement(c.rj,{columns:2,spacing:"m"},i().createElement(u.InputNumber,{addonBefore:"主",addonAfter:"px",defaultValue:n[0],onChange:o(0)}),i().createElement(u.InputNumber,{addonBefore:"辅",addonAfter:"px",defaultValue:n[1],onChange:o(1)}))}},{name:"flexJustifyContentSetter",component:oY},{name:"flexAlignItemsSetter",component:aY},{name:"spacingSetter",component:fY},{name:"colorSetter",component:lY},{name:"bgSetter",component:dY},{name:"borderSetter",component:gY}];EJ.forEach(KK);const xJ={fontSize:"18px"},SJ=w((e=>{var t,n;const r=R(),s=I();if(!s.showRightPanel||!r.selectSource.isSelected)return i().createElement(c.xu,{className:"SettingPanel"});let o="flex";("design"!==s.activeView||s.isPreview)&&(o="none");const a=(e=>{const t={},n=Object.keys(e);for(const r of n)/^data-/.test(r)||(t[r]=e[r]);return t})((null===(t=r.selectSource.firstNode)||void 0===t?void 0:t.props)||{}),l=new GK(a,{onChange(e,t,n){var i;if(!e)return;if("tid"===e&&r.activeViewModule.hasNodeByCodeId(t))return;let s=e,o=t;const a=e.split(".");a.length>1&&(s=a[0],o=(0,Ve.d9)(l.getValue(s),!1),Object.keys(o).length||(o=void 0)),n?n.error||r.updateSelectedNodeAttributes({[s]:o},null===(i=n.detail)||void 0===i?void 0:i.relatedImports):r.updateSelectedNodeAttributes({[s]:o})}}),u=r.componentPrototypes.get(null===(n=r.selectSource.first)||void 0===n?void 0:n.name);return i().createElement(We,{display:o,flexDirection:"column",width:"320px",borderLeft:"solid",borderLeftColor:"line2",bg:"white",headerProps:xJ,bodyProps:{overflowY:"hidden"},className:"SettingPanel"},u?i().createElement(uW,Object.assign({key:r.selectSource.first.id,model:l,prototype:u,showIdentifier:{identifierKey:"tid"}},e)):i().createElement(c.xu,{p:"m"},"没有找到与该组件相关的配置信息"))})),OJ=w((e=>{const{mode:t="design",children:n}=e,r=I(),s=t!==r.activeView?"none":"block",o="phone"===r.simulator.name||r.isPreview?"auto":"hidden";return i().createElement(c.xu,{className:`ViewPanel ${t}`,display:s,flex:"1",overflow:o,position:"relative"},n)})),TJ=w((({children:e})=>{const t="desktop"===I().simulator.name?wJ:AJ;return i().createElement(t,null,e)}));function wJ({children:e}){return i().createElement(c.xu,{className:"DesktopSimulator",height:"100%"},e)}const CJ=c.iv` --device-viewport-width: 375px; --device-viewport-height: 812px; --device-frame-width: 13px; @@ -421,7 +432,7 @@ padding: 0 12px; pointer-events: none; white-space: nowrap; -`,kJ=w((()=>{const e=R().dragSource.name||"";return i().createElement(PJ,{id:FH},e)}));var DJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},RJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:DJ}))};RJ.displayName="InfoCircleOutlined";var IJ=r.forwardRef(RJ);const LJ=w((()=>{const e=R();return i().createElement(c.xu,{display:"flex",columnGap:"m"},i().createElement(qe,{shape:"ghost",disabled:!e.history.couldBack||0===e.history.index,tooltip:"撤销",onClick:()=>{e.history.back(),e.selectSource.clear()}},i().createElement(ne,null)),i().createElement(qe,{shape:"ghost",disabled:!e.history.couldForward,tooltip:"重做",onClick:()=>{e.history.forward(),e.selectSource.clear()}},i().createElement(re,null)))}));var BJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"border",theme:"outlined"},MJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:BJ}))};MJ.displayName="BorderOutlined";var jJ=r.forwardRef(MJ);const NJ=w((()=>{const e=R(),t=I();return i().createElement(c.ZA,{attached:!0},i().createElement(qe,{shape:"ghost",selected:"design"===t.activeView,onClick:()=>{t.setActiveView("design")},tooltip:"设计视图"},i().createElement(jJ,null)),i().createElement(qe,{shape:"ghost",selected:"code"===t.activeView,onClick:()=>{t.setActiveView("code"),t.setActiveSidebarPanel(""),e.activeFile!==e.activeViewFile&&u.Modal.confirm({title:"当前打开的文件与视图不匹配,是否切换到当前视图对应的文件?",onOk:()=>{e.setActiveFile(e.activeViewFile)}})},tooltip:"源码视图"},i().createElement(G,null)))})),FJ=w((()=>{const e=I();return i().createElement(qe,{shape:"ghost",selected:e.isPreview,onClick:()=>{const t=!e.isPreview;e.toggleIsPreview(t),t&&e.setActiveView("design")},tooltip:"预览"},i().createElement(DW,null))}));var UJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},VJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:UJ}))};VJ.displayName="SettingOutlined";var KJ=r.forwardRef(VJ);const WJ=w((()=>{const e=R();return i().createElement($J,{options:e.pages,value:e.activeRoute,onSelect:t=>{e.setActiveRoute(t)},onRemove:t=>{e.removeViewModule(t)},onCopy:(...t)=>e.copyViewPage(...t),onUpdate:(...t)=>e.updateRoute(...t)})}));function $J({value:e,onSelect:t,onRemove:n,onUpdate:s,onCopy:o,options:a}){const[l,c]=(0,r.useState)(!1),u=(0,r.useMemo)((()=>(0,W.Gm)(a,(e=>e.path))),[a])[e];return i().createElement(qe,{shape:"ghost",minWidth:100,dropdownProps:{open:l,onOpenChange:c},overlay:i().createElement(QJ,{items:a,activeKey:e,onSelect:e=>{"function"==typeof t&&t(e),c(!1)},onRemove:n,onUpdate:s,onCopy:o,onAction:e=>{"delete"!==e&&c(!1)}}),icon:i().createElement(Te,null)},(null==u?void 0:u.name)||(null==u?void 0:u.label)||e)}const qJ=c.iv` +`,kJ=w((()=>{const e=R().dragSource.name||"";return i().createElement(PJ,{id:UY},e)}));var DJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},RJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:DJ}))};RJ.displayName="InfoCircleOutlined";var IJ=r.forwardRef(RJ);const LJ=w((()=>{const e=R();return i().createElement(c.xu,{display:"flex",columnGap:"m"},i().createElement(qe,{shape:"ghost",disabled:!e.history.couldBack||0===e.history.index,tooltip:"撤销",onClick:()=>{e.history.back(),e.selectSource.clear()}},i().createElement(ne,null)),i().createElement(qe,{shape:"ghost",disabled:!e.history.couldForward,tooltip:"重做",onClick:()=>{e.history.forward(),e.selectSource.clear()}},i().createElement(re,null)))}));var BJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"border",theme:"outlined"},MJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:BJ}))};MJ.displayName="BorderOutlined";var jJ=r.forwardRef(MJ);const NJ=w((()=>{const e=R(),t=I();return i().createElement(c.ZA,{attached:!0},i().createElement(qe,{shape:"ghost",selected:"design"===t.activeView,onClick:()=>{t.setActiveView("design")},tooltip:"设计视图"},i().createElement(jJ,null)),i().createElement(qe,{shape:"ghost",selected:"code"===t.activeView,onClick:()=>{t.setActiveView("code"),t.setActiveSidebarPanel(""),e.activeFile!==e.activeViewFile&&u.Modal.confirm({title:"当前打开的文件与视图不匹配,是否切换到当前视图对应的文件?",onOk:()=>{e.setActiveFile(e.activeViewFile)}})},tooltip:"源码视图"},i().createElement(G,null)))})),FJ=w((()=>{const e=I();return i().createElement(qe,{shape:"ghost",selected:e.isPreview,onClick:()=>{const t=!e.isPreview;e.toggleIsPreview(t),t&&e.setActiveView("design")},tooltip:"预览"},i().createElement(DW,null))}));var UJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},VJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:UJ}))};VJ.displayName="SettingOutlined";var KJ=r.forwardRef(VJ);const WJ=w((()=>{const e=R();return i().createElement($J,{options:e.pages,value:e.activeRoute,onSelect:t=>{e.setActiveRoute(t)},onRemove:t=>{e.removeViewModule(t)},onCopy:(...t)=>e.copyViewPage(...t),onUpdate:(...t)=>e.updateRoute(...t)})}));function $J({value:e,onSelect:t,onRemove:n,onUpdate:s,onCopy:o,options:a}){const[l,c]=(0,r.useState)(!1),u=(0,r.useMemo)((()=>(0,W.Gm)(a,(e=>e.path))),[a])[e];return i().createElement(qe,{shape:"ghost",minWidth:100,dropdownProps:{open:l,onOpenChange:c},overlay:i().createElement(QJ,{items:a,activeKey:e,onSelect:e=>{"function"==typeof t&&t(e),c(!1)},onRemove:n,onUpdate:s,onCopy:o,onAction:e=>{"delete"!==e&&c(!1)}}),icon:i().createElement(Te,null)},(null==u?void 0:u.name)||(null==u?void 0:u.label)||e)}const qJ=c.iv` min-width: 200px; max-height: 400px; overflow-y: auto; @@ -448,7 +459,7 @@ background-color: var(--tango-colors-primary-20); } } -`;function QJ({activeKey:e,items:t=[],onSelect:n,onRemove:s,onUpdate:o,onCopy:a,onAction:l}){const[p,d]=(0,r.useState)(null),[f,h]=(0,r.useState)();return i().createElement(c.xu,{as:"ul",bg:"white",boxShadow:"lowDown",borderRadius:"m",css:qJ},t.map((t=>i().createElement(c.xu,{as:"li",key:t.path,gap:"12px",onClick:()=>{n&&n(t.path)},className:e===t.path?"active":void 0},i().createElement(Te,null),i().createElement(c.xu,{flex:"1"},t.name||"未命名",i().createElement(c.xv,{as:"code",fontSize:"12px",ml:"m",color:"gray.50"},t.path)),i().createElement(c.ZA,null,"/"!==t.path?i().createElement(u.Popconfirm,{title:"确认删除此页面吗?",onConfirm:e=>{e.stopPropagation(),s&&s(t.path)},zIndex:1060},i().createElement(u.Button,{size:"small",type:"link",title:"删除页面",icon:i().createElement(lK,null),onClick:e=>{e.stopPropagation(),null==l||l("delete",e)}})):null,i().createElement(u.Button,{size:"small",type:"link",title:"复制页面",icon:i().createElement(AW,null),onClick:e=>{e.stopPropagation(),d(t),h("copy"),null==l||l("copy",e)}}),i().createElement(u.Button,{size:"small",type:"link",title:"设置页面",icon:i().createElement(KJ,null),onClick:e=>{e.stopPropagation(),d(t),h("update"),null==l||l("update",e)}}))))),i().createElement(zJ,{key:null==p?void 0:p.path,title:"update"===f?"更新当前页面":"复制当前页面",editType:f,items:t,visible:!!p,current:p,onOk:Q("update"===f?o:a,(()=>{d(null)})),onCancel:()=>{d(null)}}))}function zJ({title:e,current:t,editType:n,items:r=[],visible:s,onOk:o,onCancel:a}){const[l]=u.Form.useForm();return i().createElement(u.Modal,{title:e,visible:s,destroyOnClose:!0,onCancel:a,onOk:()=>{l.validateFields().then((e=>{null==o||o(t.path,e)}))}},i().createElement(u.Form,{wrapperCol:{span:20},form:l,initialValues:{name:null==t?void 0:t.name,path:null==t?void 0:t.path}},i().createElement(u.Form.Item,{label:"页面标题",name:"name",required:!0},i().createElement(u.Input,{placeholder:"请输入标题"})),i().createElement(u.Form.Item,{label:"页面路由",name:"path",rules:[{required:!0},"update"!==n?{validator:(e,t)=>r.map((e=>e.path)).includes(t)?Promise.reject():Promise.resolve(),message:"重复的页面路由"}:void 0,{pattern:/^\/([A-Za-z0-9-:]*\/?)*$/,message:"非法的路由地址"}]},i().createElement(u.Input,{placeholder:"请输入页面路由"}))))}var XJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},GJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:XJ}))};GJ.displayName="DesktopOutlined";var ZJ=r.forwardRef(GJ),YJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"mobile",theme:"outlined"},HJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:YJ}))};HJ.displayName="MobileOutlined";var JJ=r.forwardRef(HJ);w((()=>{const e=I();return i().createElement(c.ZA,{attached:!0},i().createElement(qe,{shape:"ghost",selected:"desktop"===e.simulator.name,onClick:()=>{e.setSimulator("desktop")},tooltip:"桌面视图"},i().createElement(ZJ,null)),i().createElement(qe,{shape:"ghost",selected:"phone"===e.simulator.name,onClick:()=>{e.setSimulator("phone")},tooltip:"手机视图"},i().createElement(JJ,null)))}));const e0=w((()=>{const e=I();return i().createElement(c.xu,{display:"flex",columnGap:"m"},i().createElement(qe,{tooltip:"隐藏/显示左侧面板",shape:"ghost",onClick:()=>{e.setActiveSidebarPanel(e.activeSidebarPanel?"":"outline")}},e.activeSidebarPanel?i().createElement(H,null):i().createElement(ee,null)),i().createElement(qe,{tooltip:"隐藏/显示右侧面板",shape:"ghost",onClick:()=>e.toggleRightPanel(),disabled:"code"===e.activeView},e.showRightPanel?i().createElement(J,null):i().createElement(te,null)))}));function t0({children:e}){const[t,n,s]=(0,r.useMemo)((()=>{const t=[],n=[],r=[];let s;return i().Children.forEach(e,((e,o)=>{var a,l;let c;if(e.key){const t=x2(["toolbar",e.key].join("."));t&&(c=i().createElement(t,e.props.widgetProps))}let u=null!==(l=null!==(a=e.props.children)&&void 0!==a?a:c)&&void 0!==l?l:null;u||(u=e);const p=e.key||o;u=i().createElement("div",{key:p,className:"ToolbarPanelItem","data-key":p},u);const d=e.props.placement||s||"center";switch(d){case"left":t.push(u);break;case"right":r.push(u);break;default:n.push(u)}s=d})),[t,n,r]}),[e]);return i().createElement(c.xu,{className:"ToolbarPanel",display:"flex",justifyContent:"space-between",alignItems:"center"},i().createElement(c.ZA,{display:"flex",alignItems:"center",gap:"m"},t),i().createElement(c.ZA,{display:"flex",alignItems:"center",gap:"m"},n),i().createElement(c.ZA,{display:"flex",alignItems:"center",gap:"m"},s))}t0.Item=function({placement:e,widgetProps:t,children:n}){return i().createElement("div",null,n)},t0.Separator=function(){return i().createElement(c.xu,{className:"Separator",width:1,height:16,bg:"colors.custom.toolbarDividerColor"})};var n0={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},r0=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:n0}))};r0.displayName="CloseOutlined";var i0=r.forwardRef(r0),s0={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},o0=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:s0}))};o0.displayName="CloseCircleOutlined";var a0=r.forwardRef(o0),l0=w((()=>{var e;const t=R();return i().createElement(pK,{title:"代理设置"},i().createElement(fK,{title:"proxy",description:"这里可以配置接口转发的代理规则",layoutDirection:"column"},i().createElement(p0,{initialValues:null===(e=t.tangoConfigJson)||void 0===e?void 0:e.getValue("proxy"),onSave:e=>{var n;null===(n=t.tangoConfigJson)||void 0===n||n.setValue("proxy",e).update(),u.message.success("proxy 规则更新成功!")}})))}));const c0=c.iv` +`;function QJ({activeKey:e,items:t=[],onSelect:n,onRemove:s,onUpdate:o,onCopy:a,onAction:l}){const[p,d]=(0,r.useState)(null),[f,h]=(0,r.useState)();return i().createElement(c.xu,{as:"ul",bg:"white",boxShadow:"lowDown",borderRadius:"m",css:qJ},t.map((t=>i().createElement(c.xu,{as:"li",key:t.path,gap:"12px",onClick:()=>{n&&n(t.path)},className:e===t.path?"active":void 0},i().createElement(Te,null),i().createElement(c.xu,{flex:"1"},t.name||"未命名",i().createElement(c.xv,{as:"code",fontSize:"12px",ml:"m",color:"gray.50"},t.path)),i().createElement(c.ZA,null,"/"!==t.path?i().createElement(u.Popconfirm,{title:"确认删除此页面吗?",onConfirm:e=>{e.stopPropagation(),s&&s(t.path)},zIndex:1060},i().createElement(u.Button,{size:"small",type:"link",title:"删除页面",icon:i().createElement(lK,null),onClick:e=>{e.stopPropagation(),null==l||l("delete",e)}})):null,i().createElement(u.Button,{size:"small",type:"link",title:"复制页面",icon:i().createElement(AW,null),onClick:e=>{e.stopPropagation(),d(t),h("copy"),null==l||l("copy",e)}}),i().createElement(u.Button,{size:"small",type:"link",title:"设置页面",icon:i().createElement(KJ,null),onClick:e=>{e.stopPropagation(),d(t),h("update"),null==l||l("update",e)}}))))),i().createElement(zJ,{key:null==p?void 0:p.path,title:"update"===f?"更新当前页面":"复制当前页面",editType:f,items:t,visible:!!p,current:p,onOk:Q("update"===f?o:a,(()=>{d(null)})),onCancel:()=>{d(null)}}))}function zJ({title:e,current:t,editType:n,items:r=[],visible:s,onOk:o,onCancel:a}){const[l]=u.Form.useForm();return i().createElement(u.Modal,{title:e,visible:s,destroyOnClose:!0,onCancel:a,onOk:()=>{l.validateFields().then((e=>{null==o||o(t.path,e)}))}},i().createElement(u.Form,{wrapperCol:{span:20},form:l,initialValues:{name:null==t?void 0:t.name,path:null==t?void 0:t.path}},i().createElement(u.Form.Item,{label:"页面标题",name:"name",required:!0},i().createElement(u.Input,{placeholder:"请输入标题"})),i().createElement(u.Form.Item,{label:"页面路由",name:"path",rules:[{required:!0},"update"!==n?{validator:(e,t)=>r.map((e=>e.path)).includes(t)?Promise.reject():Promise.resolve(),message:"重复的页面路由"}:void 0,{pattern:/^\/([A-Za-z0-9-:]*\/?)*$/,message:"非法的路由地址"}]},i().createElement(u.Input,{placeholder:"请输入页面路由"}))))}var XJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},GJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:XJ}))};GJ.displayName="DesktopOutlined";var ZJ=r.forwardRef(GJ),HJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"mobile",theme:"outlined"},YJ=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:HJ}))};YJ.displayName="MobileOutlined";var JJ=r.forwardRef(YJ);w((()=>{const e=I();return i().createElement(c.ZA,{attached:!0},i().createElement(qe,{shape:"ghost",selected:"desktop"===e.simulator.name,onClick:()=>{e.setSimulator("desktop")},tooltip:"桌面视图"},i().createElement(ZJ,null)),i().createElement(qe,{shape:"ghost",selected:"phone"===e.simulator.name,onClick:()=>{e.setSimulator("phone")},tooltip:"手机视图"},i().createElement(JJ,null)))}));const e0=w((()=>{const e=I();return i().createElement(c.xu,{display:"flex",columnGap:"m"},i().createElement(qe,{tooltip:"隐藏/显示左侧面板",shape:"ghost",onClick:()=>{e.setActiveSidebarPanel(e.activeSidebarPanel?"":"outline")}},e.activeSidebarPanel?i().createElement(Y,null):i().createElement(ee,null)),i().createElement(qe,{tooltip:"隐藏/显示右侧面板",shape:"ghost",onClick:()=>e.toggleRightPanel(),disabled:"code"===e.activeView},e.showRightPanel?i().createElement(J,null):i().createElement(te,null)))}));function t0({children:e}){const[t,n,s]=(0,r.useMemo)((()=>{const t=[],n=[],r=[];let s;return i().Children.forEach(e,((e,o)=>{var a,l;let c;if(e.key){const t=x2(["toolbar",e.key].join("."));t&&(c=i().createElement(t,e.props.widgetProps))}let u=null!==(l=null!==(a=e.props.children)&&void 0!==a?a:c)&&void 0!==l?l:null;u||(u=e);const p=e.key||o;u=i().createElement("div",{key:p,className:"ToolbarPanelItem","data-key":p},u);const d=e.props.placement||s||"center";switch(d){case"left":t.push(u);break;case"right":r.push(u);break;default:n.push(u)}s=d})),[t,n,r]}),[e]);return i().createElement(c.xu,{className:"ToolbarPanel",display:"flex",justifyContent:"space-between",alignItems:"center"},i().createElement(c.ZA,{display:"flex",alignItems:"center",gap:"m"},t),i().createElement(c.ZA,{display:"flex",alignItems:"center",gap:"m"},n),i().createElement(c.ZA,{display:"flex",alignItems:"center",gap:"m"},s))}t0.Item=function({placement:e,widgetProps:t,children:n}){return i().createElement("div",null,n)},t0.Separator=function(){return i().createElement(c.xu,{className:"Separator",width:1,height:16,bg:"colors.custom.toolbarDividerColor"})};var n0={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},r0=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:n0}))};r0.displayName="CloseOutlined";var i0=r.forwardRef(r0),s0={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},o0=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:s0}))};o0.displayName="CloseCircleOutlined";var a0=r.forwardRef(o0),l0=w((()=>{var e;const t=R();return i().createElement(pK,{title:"代理设置"},i().createElement(fK,{title:"proxy",description:"这里可以配置接口转发的代理规则",layoutDirection:"column"},i().createElement(p0,{initialValues:null===(e=t.tangoConfigJson)||void 0===e?void 0:e.getValue("proxy"),onSave:e=>{var n;null===(n=t.tangoConfigJson)||void 0===n||n.setValue("proxy",e).update(),u.message.success("proxy 规则更新成功!")}})))}));const c0=c.iv` position: relative; border: 1px dashed #f0f0f0; padding-top: 24px; @@ -495,7 +506,7 @@ width: 1em; height: 1em; } -`,_0={title:"component",key:"id",children:"children"},b0=e=>{const t=[];return null==e||e.forEach((e=>{t.push(e.id),e.children&&t.push(...b0(e.children))})),t},v0=w((({node:e,showToggleVisibleIcon:t,actionItems:n})=>{const s=R(),o=l(),[a,c]=(0,r.useState)(!0),p=(()=>{const{index:t}=(0,OW.cj)(e.id);return t})(),d=s.componentPrototypes.get(e.component),f=(null==d?void 0:d.icon)||"icon-placeholder",h=f.startsWith("icon-")?i().createElement(Ue,{className:"material-icon",type:f}):i().createElement("img",{className:"material-icon",src:f,alt:d.name}),m=a?DW:YY;return i().createElement(u.Space,null,h," ",p,t&&i().createElement(m,{className:"material-icon",onClick:t=>{var n;t.stopPropagation(),n=e.id,o.getElement(NH(n)).style.visibility=a?"hidden":"visible",c(!a)}}),(null==n?void 0:n.length)>0&&i().createElement(u.Dropdown,{menu:{items:n.map((e=>({key:e.key,label:e.item})))},trigger:["click"]},i().createElement(g0,null)))})),E0=w((({showToggleVisibleIcon:e=!0,onSelect:t=q,actionItems:n})=>{var s,o;const a=R(),p=l(),[d,f]=(0,r.useState)(a.selectSource.selected.map((e=>e.id))),h=a.activeViewModule,m=null!==(s=null==h?void 0:h.nodesTree)&&void 0!==s?s:[],[g,y]=(0,r.useState)(b0(m));return(0,r.useEffect)((()=>{f(a.selectSource.selected.map((e=>e.id)))}),[a.selectSource.selected]),(0,r.useEffect)((()=>{y(b0(m))}),[null===(o=null==m?void 0:m[0])||void 0===o?void 0:o.id]),m.length?i().createElement(c.xu,{css:y0},i().createElement(u.Tree,{selectedKeys:d,fieldNames:_0,treeData:m,onSelect:e=>{const n=null==e?void 0:e[0],r=p.getDraggableParentsData(NH(n),!0);r&&r.id&&a.selectSource.select(r),t(n),f(e)},blockNode:!0,expandedKeys:g,onExpand:e=>y(e),draggable:!0,onDragStart:e=>{const t=a.componentPrototypes.get(e.node.component);if(!t)return;const{canDrag:n}=t.rules||{};n&&!n()||a.dragSource.set({id:e.node.id,name:e.node.component})},onDrop:e=>{const t=e.node.key;let n;n=e.dropToGap?xK.qt.InsertAfter:xK.qt.InsertFirstChild,a.dragSource.dropTarget.set({id:t},n),a.dropNode()},titleRender:t=>i().createElement(v0,{actionItems:n,showToggleVisibleIcon:e,node:t})})):i().createElement(c.xu,null,"没有指定文件,或文件",i().createElement("code",null,a.activeViewFile),"没有有效的节点树")}));const x0={common:"基础组件",atom:"原子组件",snippet:"组合",bizComp:"业务组件",localComp:"本地组件"},S0={common:[]};const O0=w((({menuData:e=S0,showBizComps:t=!0,getBizCompName:n=OW.xf,loading:s=!1})=>{const[o,a]=(0,r.useState)(""),l=function(e){const t=(0,r.useMemo)((()=>{const t=new Set;return Object.values(e).forEach((e=>{e.forEach((e=>{var n;null===(n=e.items)||void 0===n||n.forEach((e=>{t.add(e)}))}))})),Array.from(t)}),[e]);return[{title:"搜索结果",items:t}]}(e),p=R(),[d,f]=(0,r.useMemo)((()=>[[{title:"已安装业务组件",items:p.bizComps.map(n)}],[{title:"本地组件",items:p.localComps}]]),[p.bizComps,p.localComps,n]),h=Object.keys(e).map((t=>({key:t,label:x0[t],children:i().createElement(T0,{data:e[t]})})));t&&h.push({key:"bizComp",label:x0.bizComp,children:i().createElement(T0,{type:"bizComp",data:d})}),f.length&&h.push({key:"localComps",label:x0.localComp,children:i().createElement(T0,{data:f})});const m=1===h.length?h[0].children:i().createElement(yK,{centered:!0,isTabBarSticky:!0,tabBarStickyOffset:48,items:h});return i().createElement(c.xu,{className:"ComponentsView",overflowY:"auto"},i().createElement(c.xu,{px:"l",py:"m",position:"sticky",top:"0",zIndex:1,bg:"white"},i().createElement(HV,{placeholder:"搜索物料",onChange:a})),i().createElement(u.Spin,{spinning:s,tip:"正在加载物料列表..."},o?i().createElement(T0,{data:l,filterKeyword:o}):m))}));function T0({data:e,filterKeyword:t,type:n="common"}){const r=R();return i().createElement(c.xu,{className:"ComponentsViewList"},e.map((e=>{let s=e.items||[];t&&(s=s.filter((e=>{const n=new RegExp(t,"ig"),i=r.componentPrototypes.get(e);return i&&(n.test(i.name)||n.test(i.title))})));const o=s.length%2==1;return i().createElement(c.xu,{key:e.title},i().createElement(Ne,{key:e.title,title:e.title,borderBottom:"solid",borderColor:"line.normal"},!s.length&&i().createElement(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:"没有匹配到任何组件"}),i().createElement(c.rj,{columns:"localComp"===n?1:2,spacing:"1px",bg:"background.normal",padding:"0"},s.map((e=>{const t=r.componentPrototypes.get(e);return t||Ee.kg.log(`<${e}> prototype not found!`),t?i().createElement(C0,{key:e,data:t}):null})),o&&i().createElement(c.xu,{bg:"white"}))))})))}const w0=mK().div` +`,_0={title:"component",key:"id",children:"children"},b0=e=>{const t=[];return null==e||e.forEach((e=>{t.push(e.id),e.children&&t.push(...b0(e.children))})),t},v0=w((({node:e,showToggleVisibleIcon:t,actionItems:n})=>{const s=R(),o=l(),[a,c]=(0,r.useState)(!0),p=(()=>{const{index:t}=(0,OW.cj)(e.id);return t})(),d=s.componentPrototypes.get(e.component),f=(null==d?void 0:d.icon)||"icon-placeholder",h=f.startsWith("icon-")?i().createElement(Ue,{className:"material-icon",type:f}):i().createElement("img",{className:"material-icon",src:f,alt:d.name}),m=a?DW:HH;return i().createElement(u.Space,null,h," ",p,t&&i().createElement(m,{className:"material-icon",onClick:t=>{var n;t.stopPropagation(),n=e.id,o.getElement(FY(n)).style.visibility=a?"hidden":"visible",c(!a)}}),(null==n?void 0:n.length)>0&&i().createElement(u.Dropdown,{menu:{items:n.map((e=>({key:e.key,label:e.item})))},trigger:["click"]},i().createElement(g0,null)))})),E0=w((({showToggleVisibleIcon:e=!0,onSelect:t=q,actionItems:n})=>{var s,o;const a=R(),p=l(),[d,f]=(0,r.useState)(a.selectSource.selected.map((e=>e.id))),h=a.activeViewModule,m=null!==(s=null==h?void 0:h.nodesTree)&&void 0!==s?s:[],[g,y]=(0,r.useState)(b0(m));return(0,r.useEffect)((()=>{f(a.selectSource.selected.map((e=>e.id)))}),[a.selectSource.selected]),(0,r.useEffect)((()=>{y(b0(m))}),[null===(o=null==m?void 0:m[0])||void 0===o?void 0:o.id]),m.length?i().createElement(c.xu,{css:y0},i().createElement(u.Tree,{selectedKeys:d,fieldNames:_0,treeData:m,onSelect:e=>{const n=null==e?void 0:e[0],r=p.getDraggableParentsData(FY(n),!0);r&&r.id&&a.selectSource.select(r),t(n),f(e)},blockNode:!0,expandedKeys:g,onExpand:e=>y(e),draggable:!0,onDragStart:e=>{const t=a.componentPrototypes.get(e.node.component);if(!t)return;const{canDrag:n}=t.rules||{};n&&!n()||a.dragSource.set({id:e.node.id,name:e.node.component})},onDrop:e=>{const t=e.node.key;let n;n=e.dropToGap?xK.qt.InsertAfter:xK.qt.InsertFirstChild,a.dragSource.dropTarget.set({id:t},n),a.dropNode()},titleRender:t=>i().createElement(v0,{actionItems:n,showToggleVisibleIcon:e,node:t})})):i().createElement(c.xu,null,"没有指定文件,或文件",i().createElement("code",null,a.activeViewFile),"没有有效的节点树")}));const x0={common:"基础组件",atom:"原子组件",snippet:"组合",bizComp:"业务组件",localComp:"本地组件"},S0={common:[]};const O0=w((({menuData:e=S0,showBizComps:t=!0,getBizCompName:n=OW.xf,loading:s=!1})=>{const[o,a]=(0,r.useState)(""),l=function(e){const t=(0,r.useMemo)((()=>{const t=new Set;return Object.values(e).forEach((e=>{e.forEach((e=>{var n;null===(n=e.items)||void 0===n||n.forEach((e=>{t.add(e)}))}))})),Array.from(t)}),[e]);return[{title:"搜索结果",items:t}]}(e),p=R(),[d,f]=(0,r.useMemo)((()=>[[{title:"已安装业务组件",items:p.bizComps.map(n)}],[{title:"本地组件",items:p.localComps}]]),[p.bizComps,p.localComps,n]),h=Object.keys(e).map((t=>({key:t,label:x0[t],children:i().createElement(T0,{data:e[t]})})));t&&h.push({key:"bizComp",label:x0.bizComp,children:i().createElement(T0,{type:"bizComp",data:d})}),f.length&&h.push({key:"localComps",label:x0.localComp,children:i().createElement(T0,{data:f})});const m=1===h.length?h[0].children:i().createElement(yK,{centered:!0,isTabBarSticky:!0,tabBarStickyOffset:48,items:h});return i().createElement(c.xu,{className:"ComponentsView",overflowY:"auto"},i().createElement(c.xu,{px:"l",py:"m",position:"sticky",top:"0",zIndex:1,bg:"white"},i().createElement(YV,{placeholder:"搜索物料",onChange:a})),i().createElement(u.Spin,{spinning:s,tip:"正在加载物料列表..."},o?i().createElement(T0,{data:l,filterKeyword:o}):m))}));function T0({data:e,filterKeyword:t,type:n="common"}){const r=R();return i().createElement(c.xu,{className:"ComponentsViewList"},e.map((e=>{let s=e.items||[];t&&(s=s.filter((e=>{const n=new RegExp(t,"ig"),i=r.componentPrototypes.get(e);return i&&(n.test(i.name)||n.test(i.title))})));const o=s.length%2==1;return i().createElement(c.xu,{key:e.title},i().createElement(Ne,{key:e.title,title:e.title,borderBottom:"solid",borderColor:"line.normal"},!s.length&&i().createElement(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:"没有匹配到任何组件"}),i().createElement(c.rj,{columns:"localComp"===n?1:2,spacing:"1px",bg:"background.normal",padding:"0"},s.map((e=>{const t=r.componentPrototypes.get(e);return t||Ee.kg.log(`<${e}> prototype not found!`),t?i().createElement(C0,{key:e,data:t}):null})),o&&i().createElement(c.xu,{bg:"white"}))))})))}const w0=mK().div` position: relative; display: flex; flex-direction: column; @@ -544,7 +555,7 @@ display: inline-block; } } -`;function C0({data:e}){const t=R(),n=e.icon||"icon-placeholder";return i().createElement(w0,{draggable:!0,"data-name":e.name,onDragStart:n=>{n.dataTransfer.effectAllowed="move",t.dragSource.set({name:e.name});const r=UH();n.dataTransfer.setDragImage(r,0,0)},onDragEnd:()=>{t.dragSource.clear()}},n.startsWith("icon-")?i().createElement(Ue,{className:"material-icon",type:e.icon||"icon-placeholder"}):i().createElement("img",{src:n,alt:e.name}),i().createElement(c.xv,{fontSize:"12px",lineHeight:"1.5"},e.title),i().createElement(c.xv,{fontSize:"12px",color:"gray.50"},e.name),e.docs||e.help?i().createElement(u.Popover,{placement:"right",title:e.title,content:i().createElement(A0,Object.assign({},e))},i().createElement(aW,null)):null)}function A0({help:e,docs:t}){return i().createElement(c.xu,{maxWidth:300},!!e&&i().createElement(c.xu,{mb:"m"},e),!!t&&i().createElement(u.Button,{size:"small",block:!0,target:"_blank",href:t},"查看组件文档"))}var P0=n(21544),k0=n.n(P0),D0=n(76397),R0=n.n(D0),I0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},L0=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:I0}))};L0.displayName="MinusCircleOutlined";var B0,M0=r.forwardRef(L0);!function(e){e["基础包"]="base",e["业务组件"]="biz",e["其他依赖"]="other"}(B0||(B0={}));const j0=w((({onBizDependencyAdd:e,onBaseDependencyAdd:t})=>{var n;const[s,o]=(0,r.useState)(),a=R(),l=null==a?void 0:a.listDependencies(),p=null===(n=null==a?void 0:a.tangoConfigJson)||void 0===n?void 0:n.getValue("packages"),d=(0,r.useMemo)((()=>Object.keys(p||{})),[p]),f=null==a?void 0:a.bizComps,h=null==a?void 0:a.baseComps,m=(0,r.useMemo)((()=>[...new Set([...d,...Object.keys(l||{})])].filter((e=>!(null==h?void 0:h.includes(e))&&!(null==f?void 0:f.includes(e)))).map((e=>{var t,n;return{name:e,version:null!==(t=null==l?void 0:l[e])&&void 0!==t?t:null===(n=null==p?void 0:p[e])||void 0===n?void 0:n.version,package:null==p?void 0:p[e]}}))),[l,h,f,p,d]),g=((0,r.useMemo)((()=>(null==f?void 0:f.map((e=>{var t,n;return{name:e,version:null!==(t=l[e])&&void 0!==t?t:null===(n=null==p?void 0:p[e])||void 0===n?void 0:n.version,package:null==p?void 0:p[e]}})))||[]),[f,l,p]),(0,r.useMemo)((()=>(null==h?void 0:h.map((e=>{var t,n,r;return{name:e,version:null!==(t=l[e])&&void 0!==t?t:null===(n=null==p?void 0:p[e])||void 0===n?void 0:n.version,description:null===(r=(s||{})[e])||void 0===r?void 0:r.description,package:null==p?void 0:p[e]}})))||[]),[h,l,s,p]));return i().createElement(c.xu,null,i().createElement(U0,{templateBaseDependencies:s,onBizDependencyAdd:e,onBaseDependencyAdd:t}),i().createElement(pK,{title:i().createElement("div",null,"基础包",i().createElement(u.Tooltip,{title:i().createElement(i().Fragment,null,"- 基础包不能被删除",i().createElement("br",null),"- 升级默认升级到最新版本",i().createElement("br",null),"- 如果想新增对应模板基础包,请联系管理员")},i().createElement(aW,null))),key:B0.基础包},i().createElement(fK,{layoutDirection:"column"},i().createElement(F0,{templateBaseDependencies:s,type:B0.基础包,dependencies:g,onUpgrade:t}))),i().createElement(pK,{title:"其他依赖",key:B0.其他依赖},i().createElement(fK,{layoutDirection:"column"},i().createElement(F0,{type:B0.其他依赖,dependencies:m}))))}));function N0({type:e,record:t,templateBaseDependencies:n,onUpgrade:s,showTags:o=!0}){var a;const[l,{on:p,off:d}]=EK(!1),f=R(),h=(0,r.useMemo)((()=>{if(e===B0.基础包&&n)return n[t.name]}),[e,n,t]);function m(n){var r;const i=!!(null===(r=f.tangoConfigJson)||void 0===r?void 0:r.getValue("packages")),{version:o,umd:a,library:l,resources:c,designerResources:p}=n||{};let d=null==t?void 0:t.package;switch(d=!1===a&&d?Object.assign(Object.assign({},d),{version:o,library:void 0,resources:void 0,designerResources:void 0}):Object.assign(Object.assign({},d),{version:o,library:l,resources:c,designerResources:p}),e){case B0.业务组件:case B0.其他依赖:f.updateDependency(t.name,o,i?{package:d}:{}),u.message.success(`依赖 ${t.name} 升级成功`),g();break;case B0.基础包:f.updateDependency(t.name,(null==h?void 0:h.version)||"latest",i?{package:d}:{}),i||f.tangoConfigJson.setValue("sandbox.externalResources",(e=>{const n=e.findIndex((e=>e.includes(t.name))),r=e.filter((e=>e.includes(t.name)))||[];return e.splice(n,r.length,...h.resources.map((e=>e.replace("{latest_version}",h.version)))),e})).update(),u.message.success(`依赖 ${t.name} 升级成功`)}s&&s({type:e,name:t.name,version:o,detail:t})}function g(){d()}const y=(0,r.useMemo)((()=>{if(e===B0.基础包&&h&&t)return!R0()(t.version)||k0()(t.version,h.version)}),[e,h,t]),_=(0,r.useMemo)((()=>{var e,n;const r=null===(e=f.tangoConfigJson)||void 0===e?void 0:e.getValue("packages");if(!o||!r)return!1;const{name:s,package:a}=t,{resources:l}=a||{},u=null===(n=f.packageJson)||void 0===n?void 0:n.getValue("dependencies"),p=!!(null==l?void 0:l.length),d=!!(null==u?void 0:u[s]),h=!!a;return i().createElement(c.xu,{display:"inline-block"},p&&i().createElement(Fe,{key:"hasUmd",color:"green",tooltip:"该依赖拥有 UMD 资源,可优化加载速度"},"UMD"),d&&i().createElement(Fe,{tooltip:"此依赖在 package.json 中存在"},"package"),h&&i().createElement(Fe,{tooltip:"此依赖在 tango.config.json 中存在"},"tango.config"))}),[o,f,t]);return i().createElement(u.List.Item,{actions:e!==B0.基础包?[i().createElement("a",{key:"upgrade",onClick:p},"修改"),i().createElement(u.Popconfirm,{onConfirm:function(){switch(e){case B0.业务组件:f.removeBizComp(t.name),u.message.success(`依赖 ${t.name} 移除成功`);break;case B0.其他依赖:case B0.基础包:f.removeDependency(t.name),u.message.success(`依赖 ${t.name} 移除成功`)}},title:`确认删除依赖 ${t.name}?`},i().createElement("a",{key:"delete"},"删除"))]:y?[i().createElement(u.Popconfirm,{title:`确认升级 ${t.name} 到 ${h.version} 吗?`,onConfirm:()=>m({version:h.version})},i().createElement("a",{key:"upgrade"},"升级"))]:[i().createElement(c.xv,{key:"latest",color:"rgba(0, 0, 0, 0.45)"},!ZZ(y)&&"已是最新")]},i().createElement(u.List.Item.Meta,{title:i().createElement(c.xv,null,t.name,i().createElement(c.xv,{ml:6,fontSize:"10px",color:"rgba(0, 0, 0, 0.45)"},R0()(t.version)&&t.version),o&&i().createElement(c.xv,{ml:6},_)),description:i().createElement(c.xv,{dangerouslySetInnerHTML:{__html:(null===(a=null==t?void 0:t.package)||void 0===a?void 0:a.description)||t.description}})}),i().createElement(K0,{open:l,record:t,onCancel:g,onOk:(e,{values:t})=>m(t)}))}function F0({type:e,dependencies:t,templateBaseDependencies:n,onUpgrade:r}){return i().createElement(u.List,{style:{paddingTop:0},size:"small",dataSource:t,renderItem:t=>i().createElement(N0,{type:e,record:t,templateBaseDependencies:n,onUpgrade:r})})}function U0(e){var t,{templateBaseDependencies:n,onBizDependencyAdd:r,onBaseDependencyAdd:s,record:o}=e,a=V(e,["templateBaseDependencies","onBizDependencyAdd","onBaseDependencyAdd","record"]);const[p,{on:d,off:f}]=EK(),h=R(),m=l(),g=!!(null===(t=h.tangoConfigJson)||void 0===t?void 0:t.getValue("packages"));return i().createElement(c.xu,{px:"l",py:"m"},i().createElement(u.Button,{ghost:!0,block:!0,type:"primary",onClick:d},i().createElement(sK,null),"添加依赖"),i().createElement(K0,Object.assign({open:p,title:o?`修改依赖:${o.name}`:"添加依赖",onOk:(e,{values:t})=>{const{type:r,name:i,version:a,umd:l,library:c,resources:p,designerResources:d}=t;switch(r){case B0.其他依赖:h.updateDependency(i,a,g&&l?{package:Object.assign(Object.assign({type:"dependency"},null==o?void 0:o.package),{version:a,library:c,resources:p,designerResources:d})}:{});break;case B0.基础包:{const e=n[i];h.updateDependency(i,e.version||"latest",g?{package:e.package}:{}),g||(h.tangoConfigJson.setValue("baseDependencies",(e=>{const t=e||[];return t.push(i),t})),h.tangoConfigJson.setValue("sandbox.externals",(t=>(t[i]=null==e?void 0:e.global,t))),h.tangoConfigJson.setValue("sandbox.externalResources",(t=>(e.resources.forEach((n=>{t.push(n.replace("{latest_version}",e.version))})),t))).update()),s&&s(e);break}}(e=>{e&&u.message.success(`${e} 添加成功`),m.reload(),f()})(null==t?void 0:t.name)},onCancel:function(){f()},destroyOnClose:!0},a)))}function V0(e){return i().createElement(u.Form.List,Object.assign({},e),((e,{add:t,remove:n},{errors:r})=>i().createElement(i().Fragment,null,e.map((e=>i().createElement(u.Form.Item,{key:e.key},i().createElement(c.xu,{display:"flex",alignItems:"center"},i().createElement(u.Form.Item,Object.assign({label:"资源地址"},e,{rules:[{required:!0,whitespace:!0,type:"url"}],noStyle:!0}),i().createElement(u.Input,{placeholder:"资源地址中的版本号可用 {{version}} 替代",style:{width:"100%"}})),i().createElement(c.xu,{width:"20px",fontSize:"18px",ml:"6px",textAlign:"center",flex:"none"},i().createElement("a",{onClick:()=>n(e.name)},i().createElement(M0,null))))))),i().createElement(u.Button,{type:"dashed",onClick:()=>t(),block:!0},"添加"),i().createElement(u.Form.ErrorList,{errors:r}))))}function K0(e){var t,{record:n,open:s,onOk:o,onCancel:a}=e,l=V(e,["record","open","onOk","onCancel"]);const[c,p]=(0,r.useState)(B0.其他依赖),[d]=u.Form.useForm(),f=!!(null===(t=R().tangoConfigJson)||void 0===t?void 0:t.getValue("packages"));(0,r.useEffect)((()=>{var e,t;s&&d&&(d.resetFields(),n&&(p(null==n?void 0:n.type),d.setFieldsValue(Object.assign(Object.assign(Object.assign({},n),null==n?void 0:n.package),{umd:!!(null===(t=null===(e=null==n?void 0:n.package)||void 0===e?void 0:e.resources)||void 0===t?void 0:t.length)}))))}),[n,s,d]);return i().createElement(i().Fragment,null,i().createElement(u.Modal,Object.assign({width:560,open:s,title:n?`修改依赖:${n.name}`:"添加依赖",onOk:e=>{d.validateFields().then((t=>{o&&o(e,{values:t,hasUpgraded:f})}))},onCancel:a,destroyOnClose:!0},l),i().createElement(u.Form,{form:d,layout:"vertical",autoComplete:"off",initialValues:{type:c},onValuesChange:({type:e})=>{e&&(d.resetFields(),d.setFieldValue("type",e),p(e))}},!n&&i().createElement(i().Fragment,null,i().createElement(u.Form.Item,{label:"依赖类型",name:"type",rules:[{required:!0}]},i().createElement(u.Radio.Group,null,i().createElement(u.Radio.Button,{value:B0.基础包},"基础包"),i().createElement(u.Radio.Button,{value:B0.其他依赖},"其他依赖"))),i().createElement(u.Form.Item,{label:"npm 包名",name:"name",rules:[{required:!0}]},i().createElement(u.Input,{placeholder:"输入依赖名"}))),i().createElement(u.Form.Item,{label:"版本号",name:"version",rules:[{required:!0,message:"请输入依赖的版本号"}]},i().createElement(u.Input,{placeholder:"输入版本号"})),f&&i().createElement(u.Form.Item,{name:"umd",valuePropName:"checked"},i().createElement(u.Checkbox,null,"使用预构建 UMD 资源")),i().createElement(u.Form.Item,{noStyle:!0,shouldUpdate:!0},(()=>d.getFieldValue("umd")&&i().createElement(i().Fragment,null,i().createElement(u.Form.Item,{label:"全局变量名",name:"library"},i().createElement(u.Input,{placeholder:"输入 UMD 资源挂载在全局变量下的变量名"})),i().createElement(u.Form.Item,{label:"资源地址",required:!0},i().createElement(V0,{name:"resources",rules:[{validator:(e,t)=>K(this,void 0,void 0,(function*(){if(!(null==t?void 0:t.length))throw new Error("资源地址不能为空")}))}]})),d.getFieldValue("type")===B0.基础包&&i().createElement(u.Form.Item,{label:"设计器资源地址"},i().createElement(V0,{name:"designerResources"}))))))))}var W0=n(71002);function $0(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function q0(e){return $0(1,arguments),e instanceof Date||"object"===(0,W0.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Q0(e){$0(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,W0.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function z0(e){if($0(1,arguments),!q0(e)&&"number"!=typeof e)return!1;var t=Q0(e);return!isNaN(Number(t))}function X0(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function G0(e,t){$0(2,arguments);var n=Q0(e).getTime(),r=X0(t);return new Date(n+r)}function Z0(e,t){$0(2,arguments);var n=X0(t);return G0(e,-n)}var Y0=864e5;function H0(e){$0(1,arguments);var t=1,n=Q0(e),r=n.getUTCDay(),i=(r=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function e1(e){$0(1,arguments);var t=J0(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=H0(n);return r}var t1=6048e5;var n1={};function r1(){return n1}function i1(e,t){var n,r,i,s,o,a,l,c;$0(1,arguments);var u=r1(),p=X0(null!==(n=null!==(r=null!==(i=null!==(s=null==t?void 0:t.weekStartsOn)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Q0(e),f=d.getUTCDay(),h=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(p+1,0,f),h.setUTCHours(0,0,0,0);var m=i1(h,t),g=new Date(0);g.setUTCFullYear(p,0,f),g.setUTCHours(0,0,0,0);var y=i1(g,t);return u.getTime()>=m.getTime()?p+1:u.getTime()>=y.getTime()?p:p-1}function o1(e,t){var n,r,i,s,o,a,l,c;$0(1,arguments);var u=r1(),p=X0(null!==(n=null!==(r=null!==(i=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==i?i:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=s1(e,t),f=new Date(0);f.setUTCFullYear(d,0,p),f.setUTCHours(0,0,0,0);var h=i1(f,t);return h}var a1=6048e5;function l1(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return l1("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):l1(n+1,2)},d:function(e,t){return l1(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return l1(e.getUTCHours()%12||12,t.length)},H:function(e,t){return l1(e.getUTCHours(),t.length)},m:function(e,t){return l1(e.getUTCMinutes(),t.length)},s:function(e,t){return l1(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return l1(Math.floor(r*Math.pow(10,n-3)),t.length)}},u1="midnight",p1="noon",d1="morning",f1="afternoon",h1="evening",m1="night",g1={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return c1.y(e,t)},Y:function(e,t,n,r){var i=s1(e,r),s=i>0?i:1-i;return"YY"===t?l1(s%100,2):"Yo"===t?n.ordinalNumber(s,{unit:"year"}):l1(s,t.length)},R:function(e,t){return l1(J0(e),t.length)},u:function(e,t){return l1(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return l1(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return l1(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return c1.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return l1(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=function(e,t){$0(1,arguments);var n=Q0(e),r=i1(n,t).getTime()-o1(n,t).getTime();return Math.round(r/a1)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):l1(i,t.length)},I:function(e,t,n){var r=function(e){$0(1,arguments);var t=Q0(e),n=H0(t).getTime()-e1(t).getTime();return Math.round(n/t1)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):l1(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):c1.d(e,t)},D:function(e,t,n){var r=function(e){$0(1,arguments);var t=Q0(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/Y0)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):l1(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return l1(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return l1(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return l1(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?p1:0===i?u1:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?h1:i>=12?f1:i>=4?d1:m1,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return c1.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):c1.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):l1(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):l1(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):c1.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):c1.s(e,t)},S:function(e,t){return c1.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return _1(i);case"XXXX":case"XX":return b1(i);default:return b1(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return _1(i);case"xxxx":case"xx":return b1(i);default:return b1(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y1(i,":");default:return"GMT"+b1(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y1(i,":");default:return"GMT"+b1(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return l1(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return l1((r._originalDate||e).getTime(),t.length)}};function y1(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;if(0===s)return n+String(i);var o=t||"";return n+String(i)+o+l1(s,2)}function _1(e,t){return e%60==0?(e>0?"-":"+")+l1(Math.abs(e)/60,2):b1(e,t)}function b1(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+l1(Math.floor(i/60),2)+n+l1(i%60,2)}var v1=g1,E1=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},x1=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},S1={p:x1,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],s=r[2];if(!s)return E1(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",E1(i,t)).replace("{{time}}",x1(s,t))}},O1=S1;function T1(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var w1=["D","DD"],C1=["YY","YYYY"];function A1(e){return-1!==w1.indexOf(e)}function P1(e){return-1!==C1.indexOf(e)}function k1(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var D1={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},R1=function(e,t,n){var r,i=D1[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function I1(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var L1={date:I1({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:I1({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:I1({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},B1={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},M1=function(e,t,n,r){return B1[e]};function j1(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=null!=n&&n.width?String(n.width):i;r=e.formattingValues[s]||e.formattingValues[i]}else{var o=e.defaultWidth,a=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var N1={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:j1({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:j1({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:j1({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:j1({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:j1({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},F1=N1;function U1(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;var o,a=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?K1(l,(function(e){return e.test(a)})):V1(l,(function(e){return e.test(a)}));o=e.valueCallback?e.valueCallback(c):c,o=n.valueCallback?n.valueCallback(o):o;var u=t.slice(a.length);return{value:o,rest:u}}}function V1(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function K1(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(W1.matchPattern);if(!n)return null;var r=n[0],i=e.match(W1.parsePattern);if(!i)return null;var s=W1.valueCallback?W1.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;var o=e.slice(r.length);return{value:s,rest:o}}),era:U1({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:U1({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:U1({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:U1({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:U1({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},q1={code:"en-US",formatDistance:R1,formatLong:L1,formatRelative:M1,localize:F1,match:$1,options:{weekStartsOn:0,firstWeekContainsDate:1}},Q1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,X1=/^'([^]*?)'?$/,G1=/''/g,Z1=/[a-zA-Z]/;function Y1(e){var t=e.match(X1);return t?t[1].replace(G1,"'"):e}w((()=>{const{history:e}=R();return i().createElement(c.xu,{as:"ul",p:"0",m:"0"},e.list.map(((t,n)=>i().createElement(J1,{key:t.time,data:t,className:se()({active:e.index===n})}))))}));const H1=c.iv` +`;function C0({data:e}){const t=R(),n=e.icon||"icon-placeholder";return i().createElement(w0,{draggable:!0,"data-name":e.name,onDragStart:n=>{n.dataTransfer.effectAllowed="move",t.dragSource.set({name:e.name});const r=VY();n.dataTransfer.setDragImage(r,0,0)},onDragEnd:()=>{t.dragSource.clear()}},n.startsWith("icon-")?i().createElement(Ue,{className:"material-icon",type:e.icon||"icon-placeholder"}):i().createElement("img",{src:n,alt:e.name}),i().createElement(c.xv,{fontSize:"12px",lineHeight:"1.5"},e.title),i().createElement(c.xv,{fontSize:"12px",color:"gray.50"},e.name),e.docs||e.help?i().createElement(u.Popover,{placement:"right",title:e.title,content:i().createElement(A0,Object.assign({},e))},i().createElement(aW,null)):null)}function A0({help:e,docs:t}){return i().createElement(c.xu,{maxWidth:300},!!e&&i().createElement(c.xu,{mb:"m"},e),!!t&&i().createElement(u.Button,{size:"small",block:!0,target:"_blank",href:t},"查看组件文档"))}var P0=n(21544),k0=n.n(P0),D0=n(76397),R0=n.n(D0),I0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},L0=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:I0}))};L0.displayName="MinusCircleOutlined";var B0,M0=r.forwardRef(L0);!function(e){e["基础包"]="base",e["业务组件"]="biz",e["其他依赖"]="other"}(B0||(B0={}));const j0=w((({onBizDependencyAdd:e,onBaseDependencyAdd:t})=>{var n;const[s,o]=(0,r.useState)(),a=R(),l=null==a?void 0:a.listDependencies(),p=null===(n=null==a?void 0:a.tangoConfigJson)||void 0===n?void 0:n.getValue("packages"),d=(0,r.useMemo)((()=>Object.keys(p||{})),[p]),f=null==a?void 0:a.bizComps,h=null==a?void 0:a.baseComps,m=(0,r.useMemo)((()=>[...new Set([...d,...Object.keys(l||{})])].filter((e=>!(null==h?void 0:h.includes(e))&&!(null==f?void 0:f.includes(e)))).map((e=>{var t,n;return{name:e,version:null!==(t=null==l?void 0:l[e])&&void 0!==t?t:null===(n=null==p?void 0:p[e])||void 0===n?void 0:n.version,package:null==p?void 0:p[e]}}))),[l,h,f,p,d]),g=((0,r.useMemo)((()=>(null==f?void 0:f.map((e=>{var t,n;return{name:e,version:null!==(t=l[e])&&void 0!==t?t:null===(n=null==p?void 0:p[e])||void 0===n?void 0:n.version,package:null==p?void 0:p[e]}})))||[]),[f,l,p]),(0,r.useMemo)((()=>(null==h?void 0:h.map((e=>{var t,n,r;return{name:e,version:null!==(t=l[e])&&void 0!==t?t:null===(n=null==p?void 0:p[e])||void 0===n?void 0:n.version,description:null===(r=(s||{})[e])||void 0===r?void 0:r.description,package:null==p?void 0:p[e]}})))||[]),[h,l,s,p]));return i().createElement(c.xu,null,i().createElement(U0,{templateBaseDependencies:s,onBizDependencyAdd:e,onBaseDependencyAdd:t}),i().createElement(pK,{title:i().createElement("div",null,"基础包",i().createElement(u.Tooltip,{title:i().createElement(i().Fragment,null,"- 基础包不能被删除",i().createElement("br",null),"- 升级默认升级到最新版本",i().createElement("br",null),"- 如果想新增对应模板基础包,请联系管理员")},i().createElement(aW,null))),key:B0.基础包},i().createElement(fK,{layoutDirection:"column"},i().createElement(F0,{templateBaseDependencies:s,type:B0.基础包,dependencies:g,onUpgrade:t}))),i().createElement(pK,{title:"其他依赖",key:B0.其他依赖},i().createElement(fK,{layoutDirection:"column"},i().createElement(F0,{type:B0.其他依赖,dependencies:m}))))}));function N0({type:e,record:t,templateBaseDependencies:n,onUpgrade:s,showTags:o=!0}){var a;const[l,{on:p,off:d}]=EK(!1),f=R(),h=(0,r.useMemo)((()=>{if(e===B0.基础包&&n)return n[t.name]}),[e,n,t]);function m(n){var r;const i=!!(null===(r=f.tangoConfigJson)||void 0===r?void 0:r.getValue("packages")),{version:o,umd:a,library:l,resources:c,designerResources:p}=n||{};let d=null==t?void 0:t.package;switch(d=!1===a&&d?Object.assign(Object.assign({},d),{version:o,library:void 0,resources:void 0,designerResources:void 0}):Object.assign(Object.assign({},d),{version:o,library:l,resources:c,designerResources:p}),e){case B0.业务组件:case B0.其他依赖:f.updateDependency(t.name,o,i?{package:d}:{}),u.message.success(`依赖 ${t.name} 升级成功`),g();break;case B0.基础包:f.updateDependency(t.name,(null==h?void 0:h.version)||"latest",i?{package:d}:{}),i||f.tangoConfigJson.setValue("sandbox.externalResources",(e=>{const n=e.findIndex((e=>e.includes(t.name))),r=e.filter((e=>e.includes(t.name)))||[];return e.splice(n,r.length,...h.resources.map((e=>e.replace("{latest_version}",h.version)))),e})).update(),u.message.success(`依赖 ${t.name} 升级成功`)}s&&s({type:e,name:t.name,version:o,detail:t})}function g(){d()}const y=(0,r.useMemo)((()=>{if(e===B0.基础包&&h&&t)return!R0()(t.version)||k0()(t.version,h.version)}),[e,h,t]),_=(0,r.useMemo)((()=>{var e,n;const r=null===(e=f.tangoConfigJson)||void 0===e?void 0:e.getValue("packages");if(!o||!r)return!1;const{name:s,package:a}=t,{resources:l}=a||{},u=null===(n=f.packageJson)||void 0===n?void 0:n.getValue("dependencies"),p=!!(null==l?void 0:l.length),d=!!(null==u?void 0:u[s]),h=!!a;return i().createElement(c.xu,{display:"inline-block"},p&&i().createElement(Fe,{key:"hasUmd",color:"green",tooltip:"该依赖拥有 UMD 资源,可优化加载速度"},"UMD"),d&&i().createElement(Fe,{tooltip:"此依赖在 package.json 中存在"},"package"),h&&i().createElement(Fe,{tooltip:"此依赖在 tango.config.json 中存在"},"tango.config"))}),[o,f,t]);return i().createElement(u.List.Item,{actions:e!==B0.基础包?[i().createElement("a",{key:"upgrade",onClick:p},"修改"),i().createElement(u.Popconfirm,{onConfirm:function(){switch(e){case B0.业务组件:f.removeBizComp(t.name),u.message.success(`依赖 ${t.name} 移除成功`);break;case B0.其他依赖:case B0.基础包:f.removeDependency(t.name),u.message.success(`依赖 ${t.name} 移除成功`)}},title:`确认删除依赖 ${t.name}?`},i().createElement("a",{key:"delete"},"删除"))]:y?[i().createElement(u.Popconfirm,{title:`确认升级 ${t.name} 到 ${h.version} 吗?`,onConfirm:()=>m({version:h.version})},i().createElement("a",{key:"upgrade"},"升级"))]:[i().createElement(c.xv,{key:"latest",color:"rgba(0, 0, 0, 0.45)"},!ZZ(y)&&"已是最新")]},i().createElement(u.List.Item.Meta,{title:i().createElement(c.xv,null,t.name,i().createElement(c.xv,{ml:6,fontSize:"10px",color:"rgba(0, 0, 0, 0.45)"},R0()(t.version)&&t.version),o&&i().createElement(c.xv,{ml:6},_)),description:i().createElement(c.xv,{dangerouslySetInnerHTML:{__html:(null===(a=null==t?void 0:t.package)||void 0===a?void 0:a.description)||t.description}})}),i().createElement(K0,{open:l,record:t,onCancel:g,onOk:(e,{values:t})=>m(t)}))}function F0({type:e,dependencies:t,templateBaseDependencies:n,onUpgrade:r}){return i().createElement(u.List,{style:{paddingTop:0},size:"small",dataSource:t,renderItem:t=>i().createElement(N0,{type:e,record:t,templateBaseDependencies:n,onUpgrade:r})})}function U0(e){var t,{templateBaseDependencies:n,onBizDependencyAdd:r,onBaseDependencyAdd:s,record:o}=e,a=V(e,["templateBaseDependencies","onBizDependencyAdd","onBaseDependencyAdd","record"]);const[p,{on:d,off:f}]=EK(),h=R(),m=l(),g=!!(null===(t=h.tangoConfigJson)||void 0===t?void 0:t.getValue("packages"));return i().createElement(c.xu,{px:"l",py:"m"},i().createElement(u.Button,{ghost:!0,block:!0,type:"primary",onClick:d},i().createElement(sK,null),"添加依赖"),i().createElement(K0,Object.assign({open:p,title:o?`修改依赖:${o.name}`:"添加依赖",onOk:(e,{values:t})=>{const{type:r,name:i,version:a,umd:l,library:c,resources:p,designerResources:d}=t;switch(r){case B0.其他依赖:h.updateDependency(i,a,g&&l?{package:Object.assign(Object.assign({type:"dependency"},null==o?void 0:o.package),{version:a,library:c,resources:p,designerResources:d})}:{});break;case B0.基础包:{const e=n[i];h.updateDependency(i,e.version||"latest",g?{package:e.package}:{}),g||(h.tangoConfigJson.setValue("baseDependencies",(e=>{const t=e||[];return t.push(i),t})),h.tangoConfigJson.setValue("sandbox.externals",(t=>(t[i]=null==e?void 0:e.global,t))),h.tangoConfigJson.setValue("sandbox.externalResources",(t=>(e.resources.forEach((n=>{t.push(n.replace("{latest_version}",e.version))})),t))).update()),s&&s(e);break}}(e=>{e&&u.message.success(`${e} 添加成功`),m.reload(),f()})(null==t?void 0:t.name)},onCancel:function(){f()},destroyOnClose:!0},a)))}function V0(e){return i().createElement(u.Form.List,Object.assign({},e),((e,{add:t,remove:n},{errors:r})=>i().createElement(i().Fragment,null,e.map((e=>i().createElement(u.Form.Item,{key:e.key},i().createElement(c.xu,{display:"flex",alignItems:"center"},i().createElement(u.Form.Item,Object.assign({label:"资源地址"},e,{rules:[{required:!0,whitespace:!0,type:"url"}],noStyle:!0}),i().createElement(u.Input,{placeholder:"资源地址中的版本号可用 {{version}} 替代",style:{width:"100%"}})),i().createElement(c.xu,{width:"20px",fontSize:"18px",ml:"6px",textAlign:"center",flex:"none"},i().createElement("a",{onClick:()=>n(e.name)},i().createElement(M0,null))))))),i().createElement(u.Button,{type:"dashed",onClick:()=>t(),block:!0},"添加"),i().createElement(u.Form.ErrorList,{errors:r}))))}function K0(e){var t,{record:n,open:s,onOk:o,onCancel:a}=e,l=V(e,["record","open","onOk","onCancel"]);const[c,p]=(0,r.useState)(B0.其他依赖),[d]=u.Form.useForm(),f=!!(null===(t=R().tangoConfigJson)||void 0===t?void 0:t.getValue("packages"));(0,r.useEffect)((()=>{var e,t;s&&d&&(d.resetFields(),n&&(p(null==n?void 0:n.type),d.setFieldsValue(Object.assign(Object.assign(Object.assign({},n),null==n?void 0:n.package),{umd:!!(null===(t=null===(e=null==n?void 0:n.package)||void 0===e?void 0:e.resources)||void 0===t?void 0:t.length)}))))}),[n,s,d]);return i().createElement(i().Fragment,null,i().createElement(u.Modal,Object.assign({width:560,open:s,title:n?`修改依赖:${n.name}`:"添加依赖",onOk:e=>{d.validateFields().then((t=>{o&&o(e,{values:t,hasUpgraded:f})}))},onCancel:a,destroyOnClose:!0},l),i().createElement(u.Form,{form:d,layout:"vertical",autoComplete:"off",initialValues:{type:c},onValuesChange:({type:e})=>{e&&(d.resetFields(),d.setFieldValue("type",e),p(e))}},!n&&i().createElement(i().Fragment,null,i().createElement(u.Form.Item,{label:"依赖类型",name:"type",rules:[{required:!0}]},i().createElement(u.Radio.Group,null,i().createElement(u.Radio.Button,{value:B0.基础包},"基础包"),i().createElement(u.Radio.Button,{value:B0.其他依赖},"其他依赖"))),i().createElement(u.Form.Item,{label:"npm 包名",name:"name",rules:[{required:!0}]},i().createElement(u.Input,{placeholder:"输入依赖名"}))),i().createElement(u.Form.Item,{label:"版本号",name:"version",rules:[{required:!0,message:"请输入依赖的版本号"}]},i().createElement(u.Input,{placeholder:"输入版本号"})),f&&i().createElement(u.Form.Item,{name:"umd",valuePropName:"checked"},i().createElement(u.Checkbox,null,"使用预构建 UMD 资源")),i().createElement(u.Form.Item,{noStyle:!0,shouldUpdate:!0},(()=>d.getFieldValue("umd")&&i().createElement(i().Fragment,null,i().createElement(u.Form.Item,{label:"全局变量名",name:"library"},i().createElement(u.Input,{placeholder:"输入 UMD 资源挂载在全局变量下的变量名"})),i().createElement(u.Form.Item,{label:"资源地址",required:!0},i().createElement(V0,{name:"resources",rules:[{validator:(e,t)=>K(this,void 0,void 0,(function*(){if(!(null==t?void 0:t.length))throw new Error("资源地址不能为空")}))}]})),d.getFieldValue("type")===B0.基础包&&i().createElement(u.Form.Item,{label:"设计器资源地址"},i().createElement(V0,{name:"designerResources"}))))))))}var W0=n(71002);function $0(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function q0(e){return $0(1,arguments),e instanceof Date||"object"===(0,W0.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Q0(e){$0(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,W0.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function z0(e){if($0(1,arguments),!q0(e)&&"number"!=typeof e)return!1;var t=Q0(e);return!isNaN(Number(t))}function X0(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function G0(e,t){$0(2,arguments);var n=Q0(e).getTime(),r=X0(t);return new Date(n+r)}function Z0(e,t){$0(2,arguments);var n=X0(t);return G0(e,-n)}var H0=864e5;function Y0(e){$0(1,arguments);var t=1,n=Q0(e),r=n.getUTCDay(),i=(r=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function e1(e){$0(1,arguments);var t=J0(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Y0(n);return r}var t1=6048e5;var n1={};function r1(){return n1}function i1(e,t){var n,r,i,s,o,a,l,c;$0(1,arguments);var u=r1(),p=X0(null!==(n=null!==(r=null!==(i=null!==(s=null==t?void 0:t.weekStartsOn)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Q0(e),f=d.getUTCDay(),h=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(p+1,0,f),h.setUTCHours(0,0,0,0);var m=i1(h,t),g=new Date(0);g.setUTCFullYear(p,0,f),g.setUTCHours(0,0,0,0);var y=i1(g,t);return u.getTime()>=m.getTime()?p+1:u.getTime()>=y.getTime()?p:p-1}function o1(e,t){var n,r,i,s,o,a,l,c;$0(1,arguments);var u=r1(),p=X0(null!==(n=null!==(r=null!==(i=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==i?i:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=s1(e,t),f=new Date(0);f.setUTCFullYear(d,0,p),f.setUTCHours(0,0,0,0);var h=i1(f,t);return h}var a1=6048e5;function l1(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return l1("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):l1(n+1,2)},d:function(e,t){return l1(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return l1(e.getUTCHours()%12||12,t.length)},H:function(e,t){return l1(e.getUTCHours(),t.length)},m:function(e,t){return l1(e.getUTCMinutes(),t.length)},s:function(e,t){return l1(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return l1(Math.floor(r*Math.pow(10,n-3)),t.length)}},u1="midnight",p1="noon",d1="morning",f1="afternoon",h1="evening",m1="night",g1={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return c1.y(e,t)},Y:function(e,t,n,r){var i=s1(e,r),s=i>0?i:1-i;return"YY"===t?l1(s%100,2):"Yo"===t?n.ordinalNumber(s,{unit:"year"}):l1(s,t.length)},R:function(e,t){return l1(J0(e),t.length)},u:function(e,t){return l1(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return l1(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return l1(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return c1.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return l1(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=function(e,t){$0(1,arguments);var n=Q0(e),r=i1(n,t).getTime()-o1(n,t).getTime();return Math.round(r/a1)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):l1(i,t.length)},I:function(e,t,n){var r=function(e){$0(1,arguments);var t=Q0(e),n=Y0(t).getTime()-e1(t).getTime();return Math.round(n/t1)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):l1(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):c1.d(e,t)},D:function(e,t,n){var r=function(e){$0(1,arguments);var t=Q0(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/H0)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):l1(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return l1(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return l1(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return l1(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?p1:0===i?u1:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?h1:i>=12?f1:i>=4?d1:m1,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return c1.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):c1.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):l1(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):l1(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):c1.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):c1.s(e,t)},S:function(e,t){return c1.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return _1(i);case"XXXX":case"XX":return b1(i);default:return b1(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return _1(i);case"xxxx":case"xx":return b1(i);default:return b1(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y1(i,":");default:return"GMT"+b1(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y1(i,":");default:return"GMT"+b1(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return l1(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return l1((r._originalDate||e).getTime(),t.length)}};function y1(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;if(0===s)return n+String(i);var o=t||"";return n+String(i)+o+l1(s,2)}function _1(e,t){return e%60==0?(e>0?"-":"+")+l1(Math.abs(e)/60,2):b1(e,t)}function b1(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+l1(Math.floor(i/60),2)+n+l1(i%60,2)}var v1=g1,E1=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},x1=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},S1={p:x1,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],s=r[2];if(!s)return E1(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",E1(i,t)).replace("{{time}}",x1(s,t))}},O1=S1;function T1(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var w1=["D","DD"],C1=["YY","YYYY"];function A1(e){return-1!==w1.indexOf(e)}function P1(e){return-1!==C1.indexOf(e)}function k1(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var D1={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},R1=function(e,t,n){var r,i=D1[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function I1(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var L1={date:I1({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:I1({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:I1({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},B1={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},M1=function(e,t,n,r){return B1[e]};function j1(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=null!=n&&n.width?String(n.width):i;r=e.formattingValues[s]||e.formattingValues[i]}else{var o=e.defaultWidth,a=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var N1={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:j1({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:j1({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:j1({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:j1({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:j1({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},F1=N1;function U1(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;var o,a=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?K1(l,(function(e){return e.test(a)})):V1(l,(function(e){return e.test(a)}));o=e.valueCallback?e.valueCallback(c):c,o=n.valueCallback?n.valueCallback(o):o;var u=t.slice(a.length);return{value:o,rest:u}}}function V1(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function K1(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(W1.matchPattern);if(!n)return null;var r=n[0],i=e.match(W1.parsePattern);if(!i)return null;var s=W1.valueCallback?W1.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;var o=e.slice(r.length);return{value:s,rest:o}}),era:U1({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:U1({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:U1({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:U1({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:U1({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},q1={code:"en-US",formatDistance:R1,formatLong:L1,formatRelative:M1,localize:F1,match:$1,options:{weekStartsOn:0,firstWeekContainsDate:1}},Q1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,X1=/^'([^]*?)'?$/,G1=/''/g,Z1=/[a-zA-Z]/;function H1(e){var t=e.match(X1);return t?t[1].replace(G1,"'"):e}w((()=>{const{history:e}=R();return i().createElement(c.xu,{as:"ul",p:"0",m:"0"},e.list.map(((t,n)=>i().createElement(J1,{key:t.time,data:t,className:se()({active:e.index===n})}))))}));const Y1=c.iv` line-height: 2.5; cursor: pointer; user-select: none; @@ -556,7 +567,7 @@ &.active { color: var(--tango-colors-brand); } -`;function J1(e){var{data:t}=e,n=V(e,["data"]);const{time:s,message:o}=t,a=(0,r.useMemo)((()=>function(e,t,n){var r,i,s,o,a,l,c,u,p,d,f,h,m,g,y,_,b,v;$0(2,arguments);var E=String(t),x=r1(),S=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:x.locale)&&void 0!==r?r:q1,O=X0(null!==(s=null!==(o=null!==(a=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==o?o:null===(p=x.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=X0(null!==(f=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(y=n.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:x.weekStartsOn)&&void 0!==h?h:null===(b=x.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==f?f:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var w=Q0(e);if(!z0(w))throw new RangeError("Invalid time value");var C=T1(w),A=Z0(w,C),P={firstWeekContainsDate:O,weekStartsOn:T,locale:S,_originalDate:w},k=E.match(z1).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,O1[t])(e,S.formatLong):e})).join("").match(Q1).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return Y1(r);var s=v1[i];if(s)return null!=n&&n.useAdditionalWeekYearTokens||!P1(r)||k1(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!A1(r)||k1(r,t,String(e)),s(A,r,S.localize,P);if(i.match(Z1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("");return k}(s,"yyyy/MM/dd HH:mm:mm")),[s]);return i().createElement(c.xu,Object.assign({as:"li",display:"flex",justifyContent:"space-between",px:"m",css:H1},n),i().createElement(c.xu,null,o),i().createElement(c.xu,null,a))}var e2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM544 472c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V472z"}}]},name:"file-add",theme:"outlined"},t2=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:e2}))};t2.displayName="FileAddOutlined";var n2=r.forwardRef(t2);const r2=w((({newStoreTemplate:e=zH})=>{const[t,{on:n,off:r}]=EK(),s=R(),{storeVariables:o}=L(),a=o.map((e=>e.title));return i().createElement(We,{className:"ModelView",height:"100%",title:"视图模型与变量管理",extra:i().createElement(u.Button,{size:"small",type:"primary",icon:i().createElement(n2,null),onClick:n},"新建模型"),bodyProps:{p:"m"}},t?i().createElement(IW,{storeNames:a,onCancel:r,onSubmit:t=>{s.addStoreFile(t.name,e),r()}}):i().createElement(QW,{defaultValueDetailMode:"define",dataSource:o,onAddStoreVariable:(e,t)=>{s.addStoreState(e,t.name,t.initialValue)},onRemoveStoreVariable:e=>{s.removeStoreVariable(e)},onUpdateStoreVariable:(e,t)=>{s.updateStoreVariable(e,t)}}))}));var i2=n(1706);const s2=(e,t)=>c.iv` +`;function J1(e){var{data:t}=e,n=V(e,["data"]);const{time:s,message:o}=t,a=(0,r.useMemo)((()=>function(e,t,n){var r,i,s,o,a,l,c,u,p,d,f,h,m,g,y,_,b,v;$0(2,arguments);var E=String(t),x=r1(),S=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:x.locale)&&void 0!==r?r:q1,O=X0(null!==(s=null!==(o=null!==(a=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==o?o:null===(p=x.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=X0(null!==(f=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(y=n.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:x.weekStartsOn)&&void 0!==h?h:null===(b=x.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==f?f:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var w=Q0(e);if(!z0(w))throw new RangeError("Invalid time value");var C=T1(w),A=Z0(w,C),P={firstWeekContainsDate:O,weekStartsOn:T,locale:S,_originalDate:w},k=E.match(z1).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,O1[t])(e,S.formatLong):e})).join("").match(Q1).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return H1(r);var s=v1[i];if(s)return null!=n&&n.useAdditionalWeekYearTokens||!P1(r)||k1(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!A1(r)||k1(r,t,String(e)),s(A,r,S.localize,P);if(i.match(Z1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("");return k}(s,"yyyy/MM/dd HH:mm:mm")),[s]);return i().createElement(c.xu,Object.assign({as:"li",display:"flex",justifyContent:"space-between",px:"m",css:Y1},n),i().createElement(c.xu,null,o),i().createElement(c.xu,null,a))}var e2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM544 472c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V472z"}}]},name:"file-add",theme:"outlined"},t2=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:e2}))};t2.displayName="FileAddOutlined";var n2=r.forwardRef(t2);const r2=w((({newStoreTemplate:e=XY})=>{const[t,{on:n,off:r}]=EK(),s=R(),{storeVariables:o}=L(),a=o.map((e=>e.title));return i().createElement(We,{className:"ModelView",height:"100%",title:"视图模型与变量管理",extra:i().createElement(u.Button,{size:"small",type:"primary",icon:i().createElement(n2,null),onClick:n},"新建模型"),bodyProps:{p:"m"}},t?i().createElement(IW,{storeNames:a,onCancel:r,onSubmit:t=>{s.addStoreFile(t.name,e),r()}}):i().createElement(QW,{defaultValueDetailMode:"define",dataSource:o,onAddStoreVariable:(e,t)=>{s.addStoreState(e,t.name,t.initialValue)},onRemoveStoreVariable:e=>{s.removeStoreVariable(e)},onUpdateStoreVariable:(e,t)=>{s.updateStoreVariable(e,t)}}))}));var i2=n(1706);const s2=(e,t)=>c.iv` position: absolute; z-index: 999; cursor: ${"x"===e?"col-resize":"row-resize"}; @@ -605,7 +616,7 @@ width: 100%; box-shadow: var(--tango-shadows-lowRight); } -`;function f2(e){var{closeable:t,onClose:n,isFloat:r,className:s,children:o}=e,a=V(e,["closeable","onClose","isFloat","className","children"]);const l=se()("SidebarPanelExpanded",{isFloat:r},s);return i().createElement(c.xu,Object.assign({css:d2,className:l},a),o)}const h2=w((()=>{const e=R();return i().createElement(bK,{tooltip:"复制节点",onClick:()=>{e.cloneSelectedNode()}},i().createElement(AW,null))})),m2=w((()=>{const e=R();return i().createElement(bK,{tooltip:"删除节点",onClick:()=>{e.removeSelectedNode()}},i().createElement(lK,null))}));var g2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"},y2=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:g2}))};y2.displayName="AimOutlined";var _2=r.forwardRef(y2);const b2=w((()=>{const e=I();return i().createElement(bK,{tooltip:"查看源码",onClick:()=>{e.setActiveView("code")}},i().createElement(_2,null))})),v2={};function E2(e,t){if(!/^(toolbar|sidebar|selectionMenu)\.[a-zA-z]+$/.test(e))throw new Error(`Invalid widget key(${e}), should start with toolbar, sidebar, or selection-menu`);(0,Ve.sO)(v2,e,t)}function x2(e){if(e)return(0,Ve.NA)(v2,e)}E2("toolbar.modeSwitch",NJ),E2("toolbar.preview",FJ),E2("toolbar.history",LJ),E2("toolbar.routeSwitch",WJ),E2("toolbar.togglePanel",e0),E2("sidebar.components",O0),E2("sidebar.outline",(function(e){var{showStateView:t=!0}=e,n=V(e,["showStateView"]);return i().createElement(c.xu,{height:"100%",position:"relative"},i().createElement(Ne,{title:"页面结构",maxHeight:t?"90%":"100%",collapsed:!!t&&void 0,overflowY:"auto",showBottomBorder:t},i().createElement(E0,Object.assign({},n))),t&&i().createElement(Ne,{title:"页面状态",stickyHeader:!0,maxHeight:"90%",overflowY:"auto"},i().createElement(f0,null)))})),E2("sidebar.dependency",j0),E2("sidebar.variables",r2),E2("sidebar.dataSource",(function(e){return i().createElement(c.xu,{className:"DataSourceView",height:"100%",overflowY:"auto"},i().createElement(yK,{size:"small",isTabBarSticky:!0,destroyInactiveTabPane:!0,items:[{key:"interface",label:"服务函数",children:i().createElement(ZH,Object.assign({},e))},{key:"proxy",label:"代理",children:i().createElement(l0,null)}]}))})),E2("selectionMenu.copyNode",h2),E2("selectionMenu.deleteNode",m2),E2("selectionMenu.viewSource",b2);const S2=w((({actions:e=["viewSource","copyNode","deleteNode"]})=>{const t=R().selectSource,n=e.map((e=>{if((0,$.HD)(e)){const t=x2(["selectionMenu",e].join("."));return t?i().createElement(t,{key:e}):null}return e}));return i().createElement(i().Fragment,null,t.selected.map((e=>i().createElement(C2,{key:e.id,showActions:1===t.selected.length,actions:n,data:e}))))})),O2=hK.css` +`;function f2(e){var{closeable:t,onClose:n,isFloat:r,className:s,children:o}=e,a=V(e,["closeable","onClose","isFloat","className","children"]);const l=se()("SidebarPanelExpanded",{isFloat:r},s);return i().createElement(c.xu,Object.assign({css:d2,className:l},a),o)}const h2=w((()=>{const e=R();return i().createElement(bK,{tooltip:"复制节点",onClick:()=>{e.cloneSelectedNode()}},i().createElement(AW,null))})),m2=w((()=>{const e=R();return i().createElement(bK,{tooltip:"删除节点",onClick:()=>{e.removeSelectedNode()}},i().createElement(lK,null))}));var g2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"},y2=function(e,t){return r.createElement(ue.Z,(0,le.Z)((0,le.Z)({},e),{},{ref:t,icon:g2}))};y2.displayName="AimOutlined";var _2=r.forwardRef(y2);const b2=w((()=>{const e=I();return i().createElement(bK,{tooltip:"查看源码",onClick:()=>{e.setActiveView("code")}},i().createElement(_2,null))})),v2={};function E2(e,t){if(!/^(toolbar|sidebar|selectionMenu)\.[a-zA-z]+$/.test(e))throw new Error(`Invalid widget key(${e}), should start with toolbar, sidebar, or selection-menu`);(0,Ve.sO)(v2,e,t)}function x2(e){if(e)return(0,Ve.NA)(v2,e)}E2("toolbar.modeSwitch",NJ),E2("toolbar.preview",FJ),E2("toolbar.history",LJ),E2("toolbar.routeSwitch",WJ),E2("toolbar.togglePanel",e0),E2("sidebar.components",O0),E2("sidebar.outline",(function(e){var{showStateView:t=!0}=e,n=V(e,["showStateView"]);return i().createElement(c.xu,{height:"100%",position:"relative"},i().createElement(Ne,{title:"页面结构",maxHeight:t?"90%":"100%",collapsed:!!t&&void 0,overflowY:"auto",showBottomBorder:t},i().createElement(E0,Object.assign({},n))),t&&i().createElement(Ne,{title:"页面状态",stickyHeader:!0,maxHeight:"90%",overflowY:"auto"},i().createElement(f0,null)))})),E2("sidebar.dependency",j0),E2("sidebar.variables",r2),E2("sidebar.dataSource",(function(e){return i().createElement(c.xu,{className:"DataSourceView",height:"100%",overflowY:"auto"},i().createElement(yK,{size:"small",isTabBarSticky:!0,destroyInactiveTabPane:!0,items:[{key:"interface",label:"服务函数",children:i().createElement(HY,Object.assign({},e))},{key:"proxy",label:"代理",children:i().createElement(l0,null)}]}))})),E2("selectionMenu.copyNode",h2),E2("selectionMenu.deleteNode",m2),E2("selectionMenu.viewSource",b2);const S2=w((({actions:e=["viewSource","copyNode","deleteNode"]})=>{const t=R().selectSource,n=e.map((e=>{if((0,$.HD)(e)){const t=x2(["selectionMenu",e].join("."));return t?i().createElement(t,{key:e}):null}return e}));return i().createElement(i().Fragment,null,t.selected.map((e=>i().createElement(C2,{key:e.id,showActions:1===t.selected.length,actions:n,data:e}))))})),O2=hK.css` display: none; border: 2px solid var(--tango-colors-brand); pointer-events: none; @@ -629,7 +640,7 @@ border-radius: 32px; z-index: 999; pointer-events: auto; -`;function C2({showActions:e,actions:t,data:n}){var r;const s=R(),o=I();if(!n.bounding)return null;if(!n.bounding.height&&!n.bounding.width)return null;const a=s.componentPrototypes.get(n.name),l="page"===(null==a?void 0:a.type);let p=[];if(null==a?void 0:a.childrenName){p=(Array.isArray(null==a?void 0:a.childrenName)?a.childrenName:[a.childrenName]).map((e=>{const t=s.componentPrototypes.get(e);return{name:e,label:(null==t?void 0:t.title)||e,icon:null==t?void 0:t.icon,description:null==t?void 0:t.help}}))}let d=[];(null==a?void 0:a.siblingNames)&&(d=null===(r=a.siblingNames)||void 0===r?void 0:r.map((e=>{const t=s.componentPrototypes.get(e);return{name:e,label:(null==t?void 0:t.title)||e,icon:null==t?void 0:t.icon,description:null==t?void 0:t.help}})));let f="top-right";n.bounding&&(n.bounding.left+n.bounding.width+1000?i().createElement(i().Fragment,null,i().createElement(j2,{title:"在当前节点的前方添加兄弟节点",options:d,onSelect:e=>{s.insertBeforeSelectedNode(e)}},i().createElement(u.Tooltip,{title:"在当前节点的前方添加兄弟节点"},i().createElement(D2,{icon:i().createElement(sK,null),css:T2}))),i().createElement(j2,{title:"在当前节点的后方添加兄弟节点",options:d,onSelect:e=>{s.insertAfterSelectedNode(e)}},i().createElement(u.Tooltip,{title:"在当前节点的后方添加兄弟节点"},i().createElement(D2,{icon:i().createElement(sK,null),css:w2})))):null,e&&i().createElement(P2,{align:f},i().createElement(D2,{icon:!l&&i().createElement(fW,{draggable:!0,onDragStart:e=>{e.dataTransfer.effectAllowed="move",s.dragSource.set(n);const t=UH();e.dataTransfer.setDragImage(t,0,0)},onDragEnd:()=>{s.dragSource.clear()}}),label:i().createElement(i().Fragment,null,i().createElement(M2,{label:n.codeId||n.name,parents:n.parents,onSelect:e=>{s.selectSource.select(e)}}),!h&&i().createElement(u.Tooltip,{title:`该节点来自其他文件(${n.filename})`},i().createElement(IJ,null)))}),i().createElement(I2,null,!l&&t),p.length>0&&i().createElement(j2,{options:p,onSelect:e=>{s.insertToSelectedNode(e)}},i().createElement(u.Tooltip,{title:"快捷添加子元素"},i().createElement(D2,{icon:i().createElement(sK,null)})))))}const A2=hK.css` +`;function C2({showActions:e,actions:t,data:n}){var r;const s=R(),o=I();if(!n.bounding)return null;if(!n.bounding.height&&!n.bounding.width)return null;const a=s.componentPrototypes.get(n.name),l="page"===(null==a?void 0:a.type);let p=[];if(null==a?void 0:a.childrenName){p=(Array.isArray(null==a?void 0:a.childrenName)?a.childrenName:[a.childrenName]).map((e=>{const t=s.componentPrototypes.get(e);return{name:e,label:(null==t?void 0:t.title)||e,icon:null==t?void 0:t.icon,description:null==t?void 0:t.help}}))}let d=[];(null==a?void 0:a.siblingNames)&&(d=null===(r=a.siblingNames)||void 0===r?void 0:r.map((e=>{const t=s.componentPrototypes.get(e);return{name:e,label:(null==t?void 0:t.title)||e,icon:null==t?void 0:t.icon,description:null==t?void 0:t.help}})));let f="top-right";n.bounding&&(n.bounding.left+n.bounding.width+1000?i().createElement(i().Fragment,null,i().createElement(j2,{title:"在当前节点的前方添加兄弟节点",options:d,onSelect:e=>{s.insertBeforeSelectedNode(e)}},i().createElement(u.Tooltip,{title:"在当前节点的前方添加兄弟节点"},i().createElement(D2,{icon:i().createElement(sK,null),css:T2}))),i().createElement(j2,{title:"在当前节点的后方添加兄弟节点",options:d,onSelect:e=>{s.insertAfterSelectedNode(e)}},i().createElement(u.Tooltip,{title:"在当前节点的后方添加兄弟节点"},i().createElement(D2,{icon:i().createElement(sK,null),css:w2})))):null,e&&i().createElement(P2,{align:f},i().createElement(D2,{icon:!l&&i().createElement(fW,{draggable:!0,onDragStart:e=>{e.dataTransfer.effectAllowed="move",s.dragSource.set(n);const t=VY();e.dataTransfer.setDragImage(t,0,0)},onDragEnd:()=>{s.dragSource.clear()}}),label:i().createElement(i().Fragment,null,i().createElement(M2,{label:n.codeId||n.name,parents:n.parents,onSelect:e=>{s.selectSource.select(e)}}),!h&&i().createElement(u.Tooltip,{title:`该节点来自其他文件(${n.filename})`},i().createElement(IJ,null)))}),i().createElement(I2,null,!l&&t),p.length>0&&i().createElement(j2,{options:p,onSelect:e=>{s.insertToSelectedNode(e)}},i().createElement(u.Tooltip,{title:"快捷添加子元素"},i().createElement(D2,{icon:i().createElement(sK,null)})))))}const A2=hK.css` pointer-events: auto; white-space: nowrap; position: absolute; @@ -708,7 +719,7 @@ &:hover { background-color: var(--tango-colors-fill2); } -`;function F2(e){var{label:t,icon:n="icon-placeholder",description:r}=e,s=V(e,["label","icon","description"]);return i().createElement(c.xu,Object.assign({display:"flex",columnGap:"m",px:"l",py:"m",fontSize:"12px",css:N2},s),i().createElement(c.xu,{size:"35px",fontSize:"32px",background:"fill1",border:"1px solid",borderColor:"line2",display:"flex",alignItems:"center",justifyContent:"center"},n.startsWith("icon-")?i().createElement(Ue,{className:"material-icon",type:n}):i().createElement("img",{src:n,alt:t})),i().createElement(c.xu,null,i().createElement(c.xu,{fontWeight:"500"},t),i().createElement(c.xu,{color:"text2"},r)))}const U2=c.iv` +`;function F2(e){var{label:t,icon:n,description:r}=e,s=V(e,["label","icon","description"]);let o;return o=n?n.startsWith("icon-")?i().createElement(Ue,{className:"material-icon",type:n}):i().createElement("img",{src:n,alt:t}):i().createElement(Ue,{className:"material-icon",type:"icon-placeholder"}),i().createElement(c.xu,Object.assign({display:"flex",columnGap:"m",px:"l",py:"m",fontSize:"12px",css:N2},s),i().createElement(c.xu,{size:"35px",fontSize:"32px",background:"fill1",border:"1px solid",borderColor:"line2",display:"flex",alignItems:"center",justifyContent:"center"},o),i().createElement(c.xu,null,i().createElement(c.xu,{fontWeight:"500"},t),i().createElement(c.xu,{color:"text2"},r)))}const U2=c.iv` display: none; z-index: 1000; position: absolute; @@ -733,7 +744,7 @@ &:hover { color: var(--tango-colors-brand); } -`,G2=e=>i().createElement(c.xu,Object.assign({display:"inline-block",css:X2},e)),Z2=(w((()=>{var e,t;const n=R(),r=I();if(1!==n.selectSource.size)return null;const s=(null===(t=null===(e=n.selectSource)||void 0===e?void 0:e.first)||void 0===t?void 0:t.parents)||[],o=[...s].reverse(),a=s.length;return i().createElement(c.xu,{className:"BottomBar",display:r.isPreview?"none":"block",flex:"0",px:"l",bg:"background.normal",borderTop:"solid",borderTopColor:"line.normal"},i().createElement(u.Breadcrumb,null,o.map(((e,t)=>i().createElement(u.Breadcrumb.Item,{key:e.id,onClick:()=>{n.selectSource.select(Object.assign(Object.assign({},e),{parents:s.slice(a-t)}))}},i().createElement(G2,null,e.name)))),i().createElement(u.Breadcrumb.Item,{key:n.selectSource.first.id},i().createElement(G2,null,n.selectSource.first.name))))})),{on(e,t,n,r=!1){return e.addEventListener&&e.addEventListener(t,n,r),{off:()=>Z2.off(e,t,n,r)}},off(e,t,n,r=!1){e.removeEventListener&&e.removeEventListener(t,n,r)}});class Y2{constructor(e){this.hotkeyMap={},Object.keys(e).forEach((t=>{t.split(",").forEach((n=>{n&&(n=function(e){if("esc"===e)return"escape";return e.replaceAll("command","meta")}(n),this.hotkeyMap[n]=e[t])}))}))}run(e){const t=this.hotkeyMap[e];null==t||t()}}function H2({sandboxQuery:e,designer:t,workspace:n,selectMode:i="point",onViewChange:s}){const o=n.selectSource;(0,r.useEffect)((()=>{n.ready()}),[n]);const a=(0,r.useMemo)((()=>new Y2({esc:()=>{n.selectSource.clear()},"del,backspace":()=>{n.removeSelectedNode()},"command+c,ctrl+c":()=>{n.copySelectedNode()},"command+v,ctrl+v":()=>{n.pasteSelectedNode()}})),[n]);let l,c;const u=t=>{var n,r,i,s;const a=e.getRelativePoint({x:t.clientX,y:t.clientY});VH(".SelectionMask",{width:Math.abs((null===(n=o.start)||void 0===n?void 0:n.point.x)-a.x)+"px",height:Math.abs((null===(r=o.start)||void 0===r?void 0:r.point.y)-a.y)+"px",left:Math.min(null===(i=o.start)||void 0===i?void 0:i.point.x,a.x)+"px",top:Math.min(null===(s=o.start)||void 0===s?void 0:s.point.y,a.y)+"px"})},p=t=>{var n,r;null==l||l.off(),null==c||c.off();const i=e.getRelativePoint({x:t.clientX,y:t.clientY});if(i.x===(null===(n=o.start)||void 0===n?void 0:n.point.x)&&i.y===(null===(r=o.start)||void 0===r?void 0:r.point.y)){const n=e.getDraggableParentsData(t.target,!0);n&&n.id&&o.select(n)}else{VH(".SelectionMask",{width:0,height:0,left:0,top:0});const t=e.getDraggableElementsDataByArea(o.start.element,o.start.point,i);o.select(t)}};let d;let f=0;const h="point"===i?{onClick:t=>{const n=e.getDraggableParentsData(t.target,!0);n&&n.id&&o.select(n)}}:{onMouseDown:n=>{if(t.isPreview)return;const r=e.getRelativePoint({x:n.clientX,y:n.clientY});o.setStart({point:r,element:n.target});const i=e.context||e.container;l=Z2.on(i,"mousemove",u),c=Z2.on(i,"mouseup",p)}};return Object.assign({onDragStart:t=>{t.dataTransfer.effectAllowed="move";const r=e.getDraggableParentsData(t.target,!1);if(!r||!r.name)return;const i=n.componentPrototypes.get(r.name);if(!i)return;const{canDrag:s}=i.rules||{};if(s&&!s())return t.preventDefault(),void t.stopPropagation();n.dragSource.set(r);const o=UH();t.dataTransfer.setDragImage(o,0,0)},onDragEnter:t=>{var r,i;if(!n.dragSource.data)return;const s=e.getDraggableParentsData(t.target,!1);if(!s||!s.id)return;if(d===s.id)return;d=s.id;const o=s.element,a=s.bounding,l=$H(o),c=n.componentPrototypes.get(s.name);if(s.id===n.dragSource.id)return;if(!c)return;if(c.rules){const{canMoveIn:e}=c.rules;if(e&&!e(n.dragSource.name))return}let u,p;if("placeholder"===c.type)u=s,p=xK.qt.ReplaceNode;else if(c.hasChildren){let n=e5;(null===(r=c.rules)||void 0===r?void 0:r.childrenContainerSelector)&&(n=`${null===(i=c.rules)||void 0===i?void 0:i.childrenContainerSelector} ${e5}`);const a=e.getDraggableDescendants(o,n);if(a.length){let n,r;for(let e=0;e{e.preventDefault(),e.dataTransfer.dropEffect="move"},onDrop:t=>{t.preventDefault(),n.dragSource.prototype&&n.dragSource.dropTarget.id&&n.dragSource.id!==n.dragSource.dropTarget.id&&!e.isChildOfElement(n.dragSource.id,n.dragSource.dropTarget.id)&&(n.dropNode(),d=void 0,null==l||l.off(),null==c||c.off())},onDragEnd:()=>{n.dragSource.clear()},onScroll:()=>{e.context&&o.isSelected&&(f&&cancelAnimationFrame(f),f=requestAnimationFrame((()=>{o.selected.forEach((t=>{if(t.element){const n=e.getElementBounding(t.element);VH(`[data-selection-id="${t.id}"]`,{transform:`translate(${n.left}px, ${n.top}px)`})}}))})))},onKeyDown:e=>{if(!function(e){if(J2.includes(null==e?void 0:e.toLowerCase()))return!0;return!1}(e.target.nodeName)){const t=function(e){const t=function(e){const t=[];return e.metaKey&&t.push("meta"),e.ctrlKey&&t.push("ctrl"),e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),t.join("+")}(e),n=e.key.toLowerCase();return t?`${t}+${n}`:n}(e);a.run(t)}},onTango:r=>{var i;const a=r.detail||{};switch(a.type){case"insertChild":n.insertToNode(a.targetId,a.sourceName);break;case"replaceNode":n.replaceNode(a.targetId,a.sourceName);break;case"viewChange":null==s||s(a.data);break;case"openSmartWizard":if(a.targetId!==(null===(i=o.first)||void 0===i?void 0:i.id)){const t=e.getElementBySlotId(a.targetId),n=e.getElementData(t);o.select(n)}t.toggleSmartWizard(!0)}}},h)}const J2=["input","textarea","text"];const e5=`[${jH.K.dnd}]`;class t5{get container(){return this._container?MH()(this._container).get(0):void 0}get context(){if(this._context)return this._secondaryContext?MH()(this._context).contents().find(this._secondaryContext).contents().get(0):MH()(this._context).contents().get(0)}get isSeparated(){return!(!this.context||!("defaultView"in this.context))}get window(){return this.context&&"defaultView"in this.context?this.context.defaultView:window}get scrollTop(){return this.context&&"documentElement"in this.context?this.context.documentElement.scrollTop:0}constructor({context:e,secondaryContext:t,container:n}){this._context=e,this._secondaryContext=t,this._container=n}get(e){return MH()(e,this.context)}getElement(e){return MH()(e,this.context).get(0)}getElementBySlotId(e){return this.getElement(NH(e))}getElementData(e){return qH(e,this.container)}getElementBounding(e){return KH(e,this.container)}getRelativePoint(e){return WH(e,this.container)}isChildOfElement(e,t){return!!this.get(NH(e)).has(this.getElementBySlotId(t)).length}getDraggableParents(e){const t=this.get(e).closest(e5).get(0),n=this.get(e).parents(e5).get();return n[0]!==t&&n.unshift(t),n}getDraggableDescendants(e,t=e5){return this.get(e).find(t).get()}getDraggableParentsData(e,t){const n=this.getDraggableParents(e);if(n.length){if(t){const e=n.map((e=>this.getElementData(e))),t=e[0];return Object.assign(Object.assign({},t),{parents:e.slice(1)})}return this.getElementData(n[0])}}getDraggableElementsDataByArea(e,t,n){const r=this.get(e).closest(e5).find(e5).get(0);if(!r)return[];let i=this.get(r).siblings(e5).get();i=[r,...i];const s=[];return i.forEach((e=>{const r=this.getElementData(e),{left:i,top:o}=r.bounding;i>t.x&&o>t.y&&i{var{autoRemoveUnusedImports:t=!0}=e,n=V(e,["autoRemoveUnusedImports"]);const s=(0,r.useRef)(null),o=R(),a=o.listFiles(),l=o.activeFile;let p;const d=o.selectSource.firstNode;d&&l===o.activeViewFile&&(p=d.loc),(0,r.useEffect)((()=>{var e;null===(e=s.current)||void 0===e||e.refresh(a,l,p)}),[a,l,p]);const f=(0,r.useCallback)(((e,n)=>{!function(e){return/.jsx?$/.test(e)}(e)||(0,xK.gW)(n)?o.updateFile(e,n,t):u.Modal.confirm({title:"检测到代码中存在语法错误,暂时无法将代码同步给设计器,是否回退到安全代码?",onOk:()=>{var e;null===(e=s.current)||void 0===e||e.refresh(a,l)},onCancel:()=>{}})}),[o,t,l,a]),h=(0,r.useCallback)(((e,t)=>{switch(e){case"addFile":o.addFile(t.path,t.value);break;case"deleteFile":case"deleteFolder":o.removeFile(t.path);break;case"renameFile":o.renameFile(t.path,t.newpath),o.setActiveFile(t.newpath);break;case"renameFolder":o.renameFolder(t.path,t.newpath)}}),[o]),m=(0,r.useCallback)((e=>{o.setActiveFile(e)}),[o]);return i().createElement(c.xu,{display:"flex",flexDirection:"row",height:"100%",bg:"white"},i().createElement(be.MultiEditor,Object.assign({ref:s,options:{fontSize:14,automaticLayout:!0},ideConfig:n5,onFileSave:f,onPathChange:m,onFileChange:h,defaultPath:l,defaultTheme:"GithubLightDefault",defaultFiles:a},n)))}));var i5,s5;!function(e){e.OpenModal="tango_openModal",e.ViewChange="tango_viewChange",e.DesignerAction="tango_designerAction"}(i5||(i5={})),function(e){e.InlineExpression="tango_inlineExpression"}(s5||(s5={}));const o5=mK().div` +`,G2=e=>i().createElement(c.xu,Object.assign({display:"inline-block",css:X2},e)),Z2=(w((()=>{var e,t;const n=R(),r=I();if(1!==n.selectSource.size)return null;const s=(null===(t=null===(e=n.selectSource)||void 0===e?void 0:e.first)||void 0===t?void 0:t.parents)||[],o=[...s].reverse(),a=s.length;return i().createElement(c.xu,{className:"BottomBar",display:r.isPreview?"none":"block",flex:"0",px:"l",bg:"background.normal",borderTop:"solid",borderTopColor:"line.normal"},i().createElement(u.Breadcrumb,null,o.map(((e,t)=>i().createElement(u.Breadcrumb.Item,{key:e.id,onClick:()=>{n.selectSource.select(Object.assign(Object.assign({},e),{parents:s.slice(a-t)}))}},i().createElement(G2,null,e.name)))),i().createElement(u.Breadcrumb.Item,{key:n.selectSource.first.id},i().createElement(G2,null,n.selectSource.first.name))))})),{on(e,t,n,r=!1){return e.addEventListener&&e.addEventListener(t,n,r),{off:()=>Z2.off(e,t,n,r)}},off(e,t,n,r=!1){e.removeEventListener&&e.removeEventListener(t,n,r)}});class H2{constructor(e){this.hotkeyMap={},Object.keys(e).forEach((t=>{t.split(",").forEach((n=>{n&&(n=function(e){if("esc"===e)return"escape";return e.replaceAll("command","meta")}(n),this.hotkeyMap[n]=e[t])}))}))}run(e){const t=this.hotkeyMap[e];null==t||t()}}function Y2({sandboxQuery:e,designer:t,workspace:n,selectMode:i="point",onViewChange:s}){const o=n.selectSource;(0,r.useEffect)((()=>{n.ready()}),[n]);const a=(0,r.useMemo)((()=>new H2({esc:()=>{n.selectSource.clear()},"del,backspace":()=>{n.removeSelectedNode()},"command+c,ctrl+c":()=>{n.copySelectedNode()},"command+v,ctrl+v":()=>{n.pasteSelectedNode()}})),[n]);let l,c;const u=t=>{var n,r,i,s;const a=e.getRelativePoint({x:t.clientX,y:t.clientY});KY(".SelectionMask",{width:Math.abs((null===(n=o.start)||void 0===n?void 0:n.point.x)-a.x)+"px",height:Math.abs((null===(r=o.start)||void 0===r?void 0:r.point.y)-a.y)+"px",left:Math.min(null===(i=o.start)||void 0===i?void 0:i.point.x,a.x)+"px",top:Math.min(null===(s=o.start)||void 0===s?void 0:s.point.y,a.y)+"px"})},p=t=>{var n,r;null==l||l.off(),null==c||c.off();const i=e.getRelativePoint({x:t.clientX,y:t.clientY});if(i.x===(null===(n=o.start)||void 0===n?void 0:n.point.x)&&i.y===(null===(r=o.start)||void 0===r?void 0:r.point.y)){const n=e.getDraggableParentsData(t.target,!0);n&&n.id&&o.select(n)}else{KY(".SelectionMask",{width:0,height:0,left:0,top:0});const t=e.getDraggableElementsDataByArea(o.start.element,o.start.point,i);o.select(t)}};let d;let f=0;const h="point"===i?{onClick:t=>{const n=e.getDraggableParentsData(t.target,!0);n&&n.id&&o.select(n)}}:{onMouseDown:n=>{if(t.isPreview)return;const r=e.getRelativePoint({x:n.clientX,y:n.clientY});o.setStart({point:r,element:n.target});const i=e.context||e.container;l=Z2.on(i,"mousemove",u),c=Z2.on(i,"mouseup",p)}};return Object.assign({onDragStart:t=>{t.dataTransfer.effectAllowed="move";const r=e.getDraggableParentsData(t.target,!1);if(!r||!r.name)return;const i=n.componentPrototypes.get(r.name);if(!i)return;const{canDrag:s}=i.rules||{};if(s&&!s())return t.preventDefault(),void t.stopPropagation();n.dragSource.set(r);const o=VY();t.dataTransfer.setDragImage(o,0,0)},onDragEnter:t=>{var r,i;if(!n.dragSource.data)return;const s=e.getDraggableParentsData(t.target,!1);if(!s||!s.id)return;if(d===s.id)return;d=s.id;const o=s.element,a=s.bounding,l=qY(o),c=n.componentPrototypes.get(s.name);if(s.id===n.dragSource.id)return;if(!c)return;if(c.rules){const{canMoveIn:e}=c.rules;if(e&&!e(n.dragSource.name))return}let u,p;if("placeholder"===c.type)u=s,p=xK.qt.ReplaceNode;else if(c.hasChildren){let n=e5;(null===(r=c.rules)||void 0===r?void 0:r.childrenContainerSelector)&&(n=`${null===(i=c.rules)||void 0===i?void 0:i.childrenContainerSelector} ${e5}`);const a=e.getDraggableDescendants(o,n);if(a.length){let n,r;for(let e=0;e{e.preventDefault(),e.dataTransfer.dropEffect="move"},onDrop:t=>{t.preventDefault(),n.dragSource.prototype&&n.dragSource.dropTarget.id&&n.dragSource.id!==n.dragSource.dropTarget.id&&!e.isChildOfElement(n.dragSource.id,n.dragSource.dropTarget.id)&&(n.dropNode(),d=void 0,null==l||l.off(),null==c||c.off())},onDragEnd:()=>{n.dragSource.clear()},onScroll:()=>{e.context&&o.isSelected&&(f&&cancelAnimationFrame(f),f=requestAnimationFrame((()=>{o.selected.forEach((t=>{if(t.element){const n=e.getElementBounding(t.element);KY(`[data-selection-id="${t.id}"]`,{transform:`translate(${n.left}px, ${n.top}px)`})}}))})))},onKeyDown:e=>{if(!function(e){if(J2.includes(null==e?void 0:e.toLowerCase()))return!0;return!1}(e.target.nodeName)){const t=function(e){const t=function(e){const t=[];return e.metaKey&&t.push("meta"),e.ctrlKey&&t.push("ctrl"),e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),t.join("+")}(e),n=e.key.toLowerCase();return t?`${t}+${n}`:n}(e);a.run(t)}},onTango:r=>{var i;const a=r.detail||{};switch(a.type){case"insertChild":n.insertToNode(a.targetId,a.sourceName);break;case"replaceNode":n.replaceNode(a.targetId,a.sourceName);break;case"viewChange":null==s||s(a.data);break;case"openSmartWizard":if(a.targetId!==(null===(i=o.first)||void 0===i?void 0:i.id)){const t=e.getElementBySlotId(a.targetId),n=e.getElementData(t);o.select(n)}t.toggleSmartWizard(!0)}}},h)}const J2=["input","textarea","text"];const e5=`[${NY.K.dnd}]`;class t5{get container(){return this._container?jY()(this._container).get(0):void 0}get context(){if(this._context)return this._secondaryContext?jY()(this._context).contents().find(this._secondaryContext).contents().get(0):jY()(this._context).contents().get(0)}get isSeparated(){return!(!this.context||!("defaultView"in this.context))}get window(){return this.context&&"defaultView"in this.context?this.context.defaultView:window}get scrollTop(){return this.context&&"documentElement"in this.context?this.context.documentElement.scrollTop:0}constructor({context:e,secondaryContext:t,container:n}){this._context=e,this._secondaryContext=t,this._container=n}get(e){return jY()(e,this.context)}getElement(e){return jY()(e,this.context).get(0)}getElementBySlotId(e){return this.getElement(FY(e))}getElementData(e){return QY(e,this.container)}getElementBounding(e){return WY(e,this.container)}getRelativePoint(e){return $Y(e,this.container)}isChildOfElement(e,t){return!!this.get(FY(e)).has(this.getElementBySlotId(t)).length}getDraggableParents(e){const t=this.get(e).closest(e5).get(0),n=this.get(e).parents(e5).get();return n[0]!==t&&n.unshift(t),n}getDraggableDescendants(e,t=e5){return this.get(e).find(t).get()}getDraggableParentsData(e,t){const n=this.getDraggableParents(e);if(n.length){if(t){const e=n.map((e=>this.getElementData(e))),t=e[0];return Object.assign(Object.assign({},t),{parents:e.slice(1)})}return this.getElementData(n[0])}}getDraggableElementsDataByArea(e,t,n){const r=this.get(e).closest(e5).find(e5).get(0);if(!r)return[];let i=this.get(r).siblings(e5).get();i=[r,...i];const s=[];return i.forEach((e=>{const r=this.getElementData(e),{left:i,top:o}=r.bounding;i>t.x&&o>t.y&&i{var{autoRemoveUnusedImports:t=!0}=e,n=V(e,["autoRemoveUnusedImports"]);const s=(0,r.useRef)(null),o=R(),a=o.listFiles(),l=o.activeFile;let p;const d=o.selectSource.firstNode;d&&l===o.activeViewFile&&(p=d.loc),(0,r.useEffect)((()=>{var e;null===(e=s.current)||void 0===e||e.refresh(a,l,p)}),[a,l,p]);const f=(0,r.useCallback)(((e,n)=>{!function(e){return/.jsx?$/.test(e)}(e)||(0,xK.gW)(n)?o.updateFile(e,n,t):u.Modal.confirm({title:"检测到代码中存在语法错误,暂时无法将代码同步给设计器,是否回退到安全代码?",onOk:()=>{var e;null===(e=s.current)||void 0===e||e.refresh(a,l)},onCancel:()=>{}})}),[o,t,l,a]),h=(0,r.useCallback)(((e,t)=>{switch(e){case"addFile":o.addFile(t.path,t.value);break;case"deleteFile":case"deleteFolder":o.removeFile(t.path);break;case"renameFile":o.renameFile(t.path,t.newpath),o.setActiveFile(t.newpath);break;case"renameFolder":o.renameFolder(t.path,t.newpath)}}),[o]),m=(0,r.useCallback)((e=>{o.setActiveFile(e)}),[o]);return i().createElement(c.xu,{display:"flex",flexDirection:"row",height:"100%",bg:"white"},i().createElement(be.MultiEditor,Object.assign({ref:s,options:{fontSize:14,automaticLayout:!0},ideConfig:n5,onFileSave:f,onPathChange:m,onFileChange:h,defaultPath:l,defaultTheme:"GithubLightDefault",defaultFiles:a},n)))}));var i5,s5;!function(e){e.OpenModal="tango_openModal",e.ViewChange="tango_viewChange",e.DesignerAction="tango_designerAction"}(i5||(i5={})),function(e){e.InlineExpression="tango_inlineExpression"}(s5||(s5={}));const o5=mK().div` position: absolute; top: 0; left: 0; @@ -988,9 +999,9 @@ background-color: #fff; } } -`;class C5 extends i().Component{constructor(e){super(e),this.changeRelativeUrl=e=>{e!==this.state.relativeUrl&&this.setState({relativeUrl:e})},this.onInputChange=e=>{const t=e.target.value.startsWith("/")?e.target.value:`/${e.target.value}`;this.changeRelativeUrl(t)},this.onPressEnter=e=>{var t,n;const r=e.currentTarget.value;null===(n=(t=this.props).onInputEnter)||void 0===n||n.call(t,r,e)},this.state={relativeUrl:e.startRoute||"/"}}componentDidUpdate(e,t){this.props.startRoute&&e.startRoute!==this.props.startRoute&&this.props.startRoute!==t.relativeUrl&&this.setState({relativeUrl:this.props.startRoute})}render(){const{disabled:e,onBack:t,onForward:n,onRefresh:r,extra:s}=this.props;return i().createElement(c.xu,{className:"navigator",bg:"white",px:"l",py:"m",borderBottom:"solid",borderBottomColor:"line.normal",css:w5},i().createElement(c.xu,null,i().createElement(ae,{size:"small",icon:i().createElement(b5,null),onClick:t,title:"返回"}),i().createElement(ae,{size:"small",icon:i().createElement(x5,null),onClick:n,title:"前进"}),i().createElement(ae,{size:"small",icon:i().createElement(T5,null),onClick:r,title:"刷新"})),i().createElement(u.Input,{className:"navigatorInput",size:"small",value:this.state.relativeUrl,onChange:this.onInputChange,onPressEnter:this.onPressEnter,disabled:e}),i().createElement(A5,null),s)}}const A5=w((()=>{const e=I();return i().createElement(c.ZA,{attached:!0},i().createElement(qe,{size:"s",selected:"desktop"===e.simulator.name,onClick:()=>{e.setSimulator("desktop")}},i().createElement(ZJ,null)),i().createElement(qe,{size:"s",selected:"phone"===e.simulator.name,onClick:()=>{e.setSimulator("phone")}},i().createElement(JJ,null)))}));function P5({isPreview:e,configFormatter:t,filesFormatter:n,onViewChange:r,onMessage:i,onLoad:s,sandboxType:o,startRoute:a,injectScript:c}={}){const u=R(),p=I(),d=l(),f=null!=e?e:p.isPreview,h=()=>f===p.isPreview,m=h(),g=()=>({sandboxQuery:d,isPreview:f,isActive:h(),sandboxType:o}),y=H2({sandboxQuery:d,workspace:u,designer:p,onViewChange:e=>r&&r(e,g())});let _=Array.from(u.files.keys()).reduce(((e,n)=>{let r=u.getFile(n).code;return"/tango.config.json"===n&&(r=function(e,{isPreview:t,injectScript:n,formatter:r}={}){let i;try{i=JSON.parse(e)}catch(t){return Ee.kg.error("Json parse failed!",t),e}const s=(0,Ve.NA)(i,"sandbox.evaluateJavaScript")||"";let o=s;const a=t?"":"window.__TANGO_DESIGNER__ = {}";a&&(o=`${a};${o}`);n&&(o=`${o};${n}`);s!==o&&(0,Ve.sO)(i,"sandbox.evaluateJavaScript",o);const l=(0,Ve.NA)(i,"packages"),c=(0,Ve.NA)(i,"sandbox.externals")||{},u=(0,Ve.NA)(i,"sandbox.externalResources")||[],p=(0,Ve.NA)(i,"externalResources")||[];if(l){const e=(e,t)=>{const n=e.map((e=>e.replace(/{{(.*?)}}/g,((e,n)=>(null==t?void 0:t[n])||e))));u.push(...n)},n=(e,t)=>{t&&(c[e]=t)};Object.keys(l).forEach((r=>{const i=l[r];i.designerResources&&!t?(e(i.designerResources,{name:r,version:i.version}),n(r,i.library)):i.resources&&(e(i.resources,{name:r,version:i.version}),n(r,i.library))}))}(null==p?void 0:p.length)&&u.push(...p);(0,Ve.sO)(i,"sandbox.externals",c),(0,Ve.sO)(i,"sandbox.externalResources",[...new Set(u)]),(0,$.mf)(r)&&(i=null==r?void 0:r(i));return JSON.stringify(i)}(r,{isPreview:f,injectScript:c,formatter:t})),e[n]={code:r},e}),{});_=function(e,t="/src/index.js"){if(e["/tango.config.json"]){const t=e["/tango.config.json"].code,n=JSON.parse(t);e["/sandbox.config.json"]={code:JSON.stringify(n.sandbox,null,2)}}e["/index.html"]||(e["/index.html"]={code:`\n \n \n \n \n \n \n Vite App\n \n \n
\n \n \n \n `,\n };\n }\n return files;\n}\nfunction mergeTangoConfigJson(code, { isPreview, injectScript, formatter } = {}) {\n let json;\n try {\n json = JSON.parse(code);\n }\n catch (err) {\n logger.error('Json parse failed!', err);\n return code;\n }\n const userJs = getValue(json, 'sandbox.evaluateJavaScript') || '';\n let mergedUserJs = userJs;\n const designerScript = !isPreview ? 'window.__TANGO_DESIGNER__ = {}' : '';\n if (designerScript) {\n mergedUserJs = `${designerScript};${mergedUserJs}`;\n }\n if (injectScript) {\n mergedUserJs = `${mergedUserJs};${injectScript}`;\n }\n if (userJs !== mergedUserJs) {\n setValue(json, 'sandbox.evaluateJavaScript', mergedUserJs);\n }\n // 合并 packages 内的信息至 sandbox\n const packages = getValue(json, 'packages');\n const externals = getValue(json, 'sandbox.externals') || {};\n const externalResources = getValue(json, 'sandbox.externalResources') || [];\n const newExternalResources = getValue(json, 'externalResources') || [];\n if (packages) {\n // 追加 umd 资源,并替换 url 中的 token,如版本号等\n const pushExternalResources = (list, tokenMap) => {\n const result = list.map((item) => item.replace(/{{(.*?)}}/g, (matched, token) => {\n return (tokenMap === null || tokenMap === void 0 ? void 0 : tokenMap[token]) || matched;\n }));\n externalResources.push(...result);\n };\n // 追加 externals\n const pushExternals = (name, library) => {\n if (library) {\n externals[name] = library;\n }\n };\n Object.keys(packages).forEach((name) => {\n const item = packages[name];\n // 如果是设计态,且拥有设计器资源,则使用设计器资源,否则使用默认资源\n if (item.designerResources && !isPreview) {\n pushExternalResources(item.designerResources, {\n name,\n version: item.version,\n });\n pushExternals(name, item.library);\n }\n else if (item.resources) {\n pushExternalResources(item.resources, {\n name,\n version: item.version,\n });\n pushExternals(name, item.library);\n }\n });\n }\n if (newExternalResources === null || newExternalResources === void 0 ? void 0 : newExternalResources.length) {\n externalResources.push(...newExternalResources);\n }\n setValue(json, 'sandbox.externals', externals);\n setValue(json, 'sandbox.externalResources', [...new Set(externalResources)]);\n if (isFunction(formatter)) {\n json = formatter === null || formatter === void 0 ? void 0 : formatter(json);\n }\n return JSON.stringify(json);\n}\nfunction canAccessIFrame(iframe) {\n let html = null;\n try {\n // deal with older browsers\n const doc = iframe.contentDocument || iframe.contentWindow.document;\n html = doc.body.innerHTML;\n }\n catch (err) {\n // do nothing\n }\n return html !== null;\n}\n","import { extendTheme } from 'coral-system';\nexport default extendTheme({\n colors: {\n custom: {\n topNavBg: '#FFF',\n topNavColor: '#333',\n topNavBorderColor: 'rgb(229,230,235)',\n toolbarDividerColor: 'rgb(229,230,235)',\n toolbarButtonBg: 'rgb(242,243,245)',\n toolbarButtonBgHover: 'rgb(229,230,235)',\n toolbarButtonBgDisabled: 'rgb(247,248,250)',\n toolbarButtonBgActive: 'colors.brand',\n toolbarButtonTextColor: 'colors.text2',\n toolbarButtonTextColorHover: 'colors.text2',\n toolbarButtonTextColorDisabled: 'colors.text4',\n toolbarButtonTextColorActive: '#FFF',\n sidebarBg: '#fff',\n sidebarExpandBg: '#fff',\n sidebarItemActiveBg: '#f2f3f5',\n sidebarItemHoverBg: '#f2f3f5',\n viewportBg: '#f0f2f5',\n },\n },\n});\n","/**\n * 对数组进行去重,适用于简单数组,对象为根据引用进行去重\n * @param arr 输入数组\n * @returns 去重后的数组\n */\nexport function uniq(arr) {\n const set = new Set(arr);\n return Array.from(set);\n}\n/**\n * 对象数组转为对象\n * @example [{ a: 'a' }, { b: 'b' }] -> { a: 'a', b: 'b' }\n * @param arr\n * @param getKey\n * @param getValue\n * @returns\n */\nexport function array2object(arr, getKey, getValue) {\n return arr.reduce((prev, cur) => {\n if (cur) {\n const key = getKey(cur);\n prev[key] = getValue ? getValue(cur) : cur;\n }\n return prev;\n }, {});\n}\n/**\n * 树形嵌套数据的过滤\n * @param array 输入的数组\n * @param predict 断言函数,过滤出符合判断函数的数据\n * @param childrenProp 子属性的名字\n * @param onlyLeaf 是否子探测叶子结点,即存在子节点的父节点不执行断言函数\n */\nexport function filterTreeData(array, predict, childrenProp = 'children', onlyLeaf = false) {\n const reducer = (result, current) => {\n if (current[childrenProp]) {\n const newChildren = current[childrenProp].reduce(reducer, []);\n if (newChildren.length) {\n result.push(Object.assign(Object.assign({}, current), { [childrenProp]: newChildren }));\n if (!onlyLeaf)\n return result;\n }\n if (onlyLeaf)\n return result;\n }\n if (predict(current)) {\n result.push(current);\n }\n return result;\n };\n return array.reduce(reducer, []);\n}\nexport function mapTreeData(treeData, mapper, childrenProp = 'children') {\n return treeData.map((node) => {\n const newNode = mapper(node);\n if (node[childrenProp]) {\n newNode[childrenProp] = mapTreeData(node[childrenProp], mapper, childrenProp);\n }\n return newNode;\n });\n}\n","/**\n * condition 为 false 的时候打印 msg\n * @param condition\n * @param msg\n */\nexport function assert(condition, msg) {\n console.assert(condition, msg);\n}\nexport function isString(str) {\n return typeof str === 'string';\n}\nexport function isFunction(fn) {\n return typeof fn === 'function';\n}\nexport function isNumber(num) {\n return typeof num === 'number';\n}\nexport function isBoolean(obj) {\n return typeof obj === 'boolean';\n}\nexport function isObject(obj) {\n return typeof obj === 'object' && !Array.isArray(obj) && obj !== null;\n}\nexport function isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\nexport function isPromise(obj) {\n return obj && obj.then && isFunction(obj.then);\n}\n/**\n * 判断值是否是 null 或 undefined\n * @param val\n * @returns true if val is null or undefined\n */\nexport function isNil(val) {\n return val == null;\n}\n/**\n * 是否是状态变量的 path\n * @param key\n * @returns\n */\nexport function isStoreVariablePath(key) {\n return /^stores\\.[a-zA-Z0-9]+\\.\\w+$/.test(key);\n}\n/**\n * 是否是服务变量的 path\n * @param key\n * @returns\n */\nexport function isServiceVariablePath(key) {\n return /^services\\.[a-zA-Z0-9]+/.test(key);\n}\n/**\n * 是否在 Tango 设计模式\n */\nexport function isInTangoDesignMode() {\n return '__TANGO_DESIGNER__' in window;\n}\n","export const SLOT = {\n /**\n * DND 追踪标记,通常值为 {{pagePath}}:{{componentName}}\n */\n dnd: 'data-dnd',\n /**\n * ID 追踪标记\n */\n id: 'data-id',\n};\n","/* eslint-disable no-console */\nexport const logger = {\n group(title, body) {\n console.groupCollapsed(title);\n console.log(body);\n console.groupEnd();\n },\n log(msg) {\n console.log('[Log]: %s', msg);\n },\n warn(msg) {\n warning(false, msg);\n },\n error(...args) {\n console.error('[Error]: ', ...args);\n },\n};\n/**\n * 如果条件为 false 则打印警告日志\n * @example warning(truthyValue, 'This should not log a warning');\n * @example warning(falsyValue, 'This should log a warning');\n * @see https://github.com/alexreardon/tiny-warning\n *\n * @param condition 打印警告日志的条件\n * @param message 警告日志\n */\nexport function warning(condition, message) {\n if (condition) {\n return;\n }\n console.warn(`Warning: ${message}`);\n}\n/**\n * 如果条件为 false 则抛出错误\n * @see https://github.com/alexreardon/tiny-invariant\n * @param condition 条件\n * @param message 错误消息\n */\nexport function invariant(condition, message) {\n if (condition) {\n return;\n }\n const text = typeof message === 'function' ? message() : message;\n throw new Error(`Invariant failed: ${text}`);\n}\n","import get from 'lodash.get';\nimport set from 'lodash.set';\n/**\n * 合并 target 和 source 对象,source 对象的优先级更高,如存在重名,覆盖 target 中的 key\n * @param target target object\n * @param source source object\n * @return new merged object, target will not be modified\n */\nexport function merge(target, source) {\n return Object.assign(Object.assign({}, (target || {})), (source || {}));\n}\n/**\n * 从目标上下文中根据 keyPath 获取对应的值\n * @param context the object to query\n * @param keyPath the path of the property to get\n * @returns\n */\nexport function getValue(context, keyPath) {\n keyPath = keyPath.replaceAll('?.', '.');\n return get(context, keyPath);\n}\n/**\n * Sets the value at path of object. If a portion of path doesn't exist, it's created. Arrays are created for missing index properties while objects are created for all other missing properties\n * @param context\n * @param keyPath\n * @param value\n * @returns\n */\nexport function setValue(context, keyPath, value) {\n return set(context, keyPath, value);\n}\n/**\n * 浅拷贝目标对象,并清除对象上的 undefined value\n * @param obj\n */\nexport function clone(obj, withUndefined = true) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n const target = {};\n for (const key in obj) {\n if (withUndefined) {\n target[key] = obj[key];\n }\n else if (obj[key] !== undefined) {\n target[key] = obj[key];\n }\n }\n return target;\n}\nexport function omit(obj, keys) {\n const target = clone(obj);\n for (const key of keys) {\n delete target[key];\n }\n return target;\n}\nexport function pick(obj, keys) {\n const target = {};\n for (const key of keys) {\n target[key] = obj[key];\n }\n return target;\n}\n","/**\n * 转为驼峰 (lowerCamelCase)\n * @example foo -> foo\n * @example foo-bar -> fooBar\n * @param str\n * @returns\n */\nexport function camelCase(str) {\n str = str.charAt(0).toLowerCase() + str.slice(1);\n return str.replace(/\\W+(.)/g, (match, chr) => {\n return chr.toUpperCase();\n });\n}\n/**\n * 将输入字符串转换为大驼峰格式(PascalCase)\n * @example about -> About\n * @example not-found -> NotFound\n * @param str\n */\nexport function upperCamelCase(str) {\n const text = camelCase(str.toLowerCase());\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n/**\n * 生成随机 uuid\n * @param prefix 前缀字符串\n * @returns\n */\nexport function uuid(prefix = 't', fractionDigits = 4) {\n return `${prefix}${Math.random().toFixed(fractionDigits).replace('0.', '')}`;\n}\n/**\n * 是否是合法的 url 地址\n * @example www.163.com\n * @example //www.163.com\n * @example https://www.163.com\n * @example http://www.163.com\n * @param url\n * @returns\n */\nexport function isValidUrl(url) {\n // 创建一个正则表达式\n const pattern = /^(https:)?(\\/\\/)?[^\\s/$.?#].[^\\s]*$/i;\n // 使用正则表达式测试 URL 是否匹配\n return pattern.test(url);\n}\n/**\n * 检查给定的路径是否含有后缀名\n * @param str 输入路径\n * @returns 如果有后缀返回 true,反之返回 false\n */\nexport function hasFileExtension(str) {\n // 如果点号的索引大于斜杠的索引,则说明路径包含后缀名\n return str.lastIndexOf('.') > str.lastIndexOf('/');\n}\n/**\n * 解析 dnd 追踪字符串\n * @deprecated 使用 parseDndId 代替\n *\n * @example Button:123 -> [\"Button\", \"Button:123\"]\n * @param str 字符串\n */\nexport function parseDndTrackId(str) {\n if (!str) {\n return [];\n }\n const parts = str.split(':');\n return [parts[0], str];\n}\n/**\n * 解析 dnd id\n * @example Button:123 -> { component: \"Button\", id: \"Button:123\" }\n * @example LocalBlock:Button:123 -> { filename: LocalBlock, component: \"Button\", id: \"Button:123\" }\n * @param str\n */\nexport function parseDndId(str) {\n if (!str) {\n return {};\n }\n const parts = str.split(':');\n if (parts.length === 2) {\n return {\n component: parts[0],\n index: parts[1],\n id: str,\n };\n }\n else if (parts.length >= 3) {\n const filename = decodeURIComponent(parts[0]);\n return {\n module: filename,\n filename,\n component: parts[1],\n index: parts[2],\n id: str,\n };\n }\n return {\n id: str,\n };\n}\n/**\n * 给定字符串是否是合法的 JSON 字符串\n * @param str\n */\nexport function isJSONString(str) {\n if (!str) {\n return false;\n }\n let json;\n try {\n json = JSON.parse(str);\n return typeof json === 'object';\n }\n catch (err) {\n return false;\n }\n}\n/**\n * 给定代码是否是有效的函数代码\n * @param str\n */\nexport function isValidFunctionCode(str) {\n try {\n // eslint-disable-next-line no-eval\n const ret = eval(`typeof (${str})`);\n return ret === 'function';\n }\n catch (e) {\n return false;\n }\n}\n/**\n * 是否是有效的对象字符串\n *\n * @example { foo: 'foo' }\n * @example [{ foo: 'foo' }]\n * TODO: 考虑箭头函数的情况 () => {}\n *\n * @param str\n * @returns\n */\nexport function isValidObjectString(str) {\n const obj = code2object(str);\n if (obj && typeof obj === 'object') {\n return true;\n }\n return false;\n}\nconst templatePattern = /^{(.+)}$/s;\n/**\n * 判断给定字符串是否为变量字符串\n * @deprecated 使用 isWrappedByExpressionContainer 代替\n *\n * @example {[]}\n * @example {{}}\n * @example {this.foo}\n * @example {123}\n * @param str\n * @returns\n */\nexport function isVariableString(str) {\n // 先检查是否是简单的对象\n // FIXME: 这里有问题,如果代码中有引用,会被误判\n if (code2object(str)) {\n return false;\n }\n // 排除简单对象后,再用正则匹配\n return templatePattern.test(str);\n}\n/**\n * 给输入代码加上花括号\n * @example foo -> {foo}\n * @example \"hello\" => {\"hello\"}\n * @example () => {} => {() => {}}\n *\n * @deprecated 有问题,不要使用\n *\n * @param code 输入代码\n * @returns 加上花括号后的代码\n */\nexport function wrapCode(code) {\n if (isVariableString(code)) {\n return code;\n }\n return `{${code}}`;\n}\n/**\n * 是否为简单字符串,非变量字符串\n * @param str\n */\nexport function isPlainString(str) {\n const isString = typeof str === 'string';\n const isVarString = isString && isVariableString(str);\n return isString && !isVarString;\n}\n/**\n * 解析并获取变量字符串的内容\n * @param str\n * @returns\n */\nexport function getVariableContent(str) {\n const match = templatePattern.exec(str);\n if (match && match.length) {\n return match[1];\n }\n return str;\n}\n// 提供给代码执行环境的全局变量\nconst patchCode = `\nvar tango = {\n stores: {},\n services: {},\n config: {},\n refs: {},\n};\n`;\n/**\n * 将代码放到函数体中进行执行\n * @param code\n * @returns 函数执行的结果\n */\nexport function runCode(code) {\n let ret;\n try {\n // eslint-disable-next-line no-new-func\n ret = new Function(`${patchCode}\\n return ${code}`)();\n }\n catch (err) {\n // ignore error\n }\n return ret;\n}\n// eslint-disable-next-line no-useless-escape\nconst objectWrapperPattern = /^[{\\[].*[}\\]]$/s;\n/**\n * 将代码片段转成 js 对象\n * @param code 代码文本\n * @param isStrict 是否为严格模式(是否废弃)\n * @returns\n */\nexport function code2object(code, isStrict = true) {\n // 非严格模式直接执行\n // 严格模式下需检测 code 是一个对象\n if (!isStrict || (isStrict && objectWrapperPattern.test(code))) {\n const ret = runCode(code);\n return typeof ret === 'object' ? ret : undefined;\n }\n return code;\n}\nconst codeBlockPattern = /```(\\w*)([\\s\\S]*?)```/g;\n/**\n * 从 markdown 中解析出代码片段,仅返回第一个匹配的代码片段\n * @param markdown\n * @returns\n */\nexport function getCodeBlockFormMarkdown(markdown) {\n const match = codeBlockPattern.exec(markdown.trim());\n if (match && match.length) {\n return match[2];\n }\n}\nexport function url2serviceName(url) {\n if (url.startsWith('http')) {\n // 去除域名前缀\n url = url\n .replace(/https?:\\/\\//, '')\n .split('/')\n .slice(1)\n .join('/');\n }\n return (url\n // 去除 api + 模块名前缀\n // - 云音乐 api 规范为 /api/模块名/\n // - 后端公技基本使用 /模块名/api/\n // - 中台类服务似乎常用 /api/middle/模块名/\n // 目前的实现是去除了模块名,只干掉 /api/middle/ 和 /api/backend/ 这种常用前缀\n .replace(/^\\/[^/]+?\\/api\\/|^\\/api\\/middle\\/|^\\/api\\/backend\\/|^\\/api\\//, '')\n // 去除路由参数\n .replace(/\\/\\{.*?\\}/, '')\n // 忽略下划线与减号,将后面的字符转成大驼峰\n .replace(/[-/_]+\\w/g, (str) => str.replace(/[-/_]+/, '').toUpperCase())\n // 首字母转小写\n .replace(/^./, (str) => str.toLowerCase())\n // 方法名以数字开头,添加 api 前缀\n .replace(/^\\d/, (str) => `api${str}`));\n}\n/**\n * 解析状态变量的 path\n * @example stores.foo.bar => { storeName: 'foo', variableName: 'bar' }\n * @example stores.user.count => { storeName: 'user', variableName: 'count' }\n *\n * @param variablePath\n * @returns\n */\nexport function parseStoreVariablePath(variablePath) {\n const [, storeName, variableName] = variablePath.split('.');\n return {\n storeName,\n variableName,\n };\n}\n/**\n * 解析服务变量的 path\n * @param variablePath\n * @returns\n *\n * @example services.list => { moduleName: 'index', name: 'list' }\n * @example services.sub.list => { moduleName: 'sub', name: 'list' }\n * @example foo => undefined\n */\nexport function parseServiceVariablePath(variablePath) {\n const parts = variablePath.split('.');\n if (parts[0] !== 'services') {\n return {};\n }\n let moduleName = 'index';\n let name = '';\n switch (parts.length) {\n case 2: {\n name = parts[1];\n break;\n }\n case 3: {\n moduleName = parts[1];\n name = parts[2];\n break;\n }\n default:\n break;\n }\n return {\n moduleName,\n name,\n };\n}\n","/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"react\"), require(\"react-dom\")) : factory(root[\"react\"], root[\"react-dom\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/button/index.less\":\n/*!***********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/button/index.less ***!\n \\***********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-button {\\\\n padding: 5px 15px;\\\\n border-radius: 20px;\\\\n font-size: 14px;\\\\n background: var(--monaco-button-background);\\\\n color: var(--monaco-button-foreground);\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-button:hover {\\\\n opacity: 0.8;\\\\n}\\\\n.music-monaco-editor-button-primary {\\\\n background: var(--monaco-editorCursor-foreground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/button/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/filelist/index.less\":\n/*!*************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/filelist/index.less ***!\n \\*************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-list {\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-list-wrapper {\\\\n width: 180px;\\\\n font-size: 14px;\\\\n line-height: 28px;\\\\n height: 100%;\\\\n background: var(--monaco-editor-background);\\\\n color: var(--monaco-editor-foreground);\\\\n overflow: scroll;\\\\n flex-shrink: 0;\\\\n padding: 5px 0 0 10px;\\\\n box-sizing: border-box;\\\\n}\\\\n.music-monaco-editor-list-wrapper::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-list-wrapper::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-list-wrapper::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-list-title {\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n height: 28px;\\\\n user-select: none;\\\\n cursor: pointer;\\\\n line-height: 28px;\\\\n}\\\\n.music-monaco-editor-list-title-icon {\\\\n visibility: hidden;\\\\n font-size: 16px;\\\\n color: var(--monaco-editor-foreground);\\\\n margin-right: 4px;\\\\n}\\\\n.music-monaco-editor-list-title-icon:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-list-title-name {\\\\n white-space: nowrap;\\\\n overflow: hidden;\\\\n text-overflow: ellipsis;\\\\n}\\\\n.music-monaco-editor-list-title:hover .music-monaco-editor-list-title-icon {\\\\n visibility: visible;\\\\n}\\\\n.music-monaco-editor-list-split-icon {\\\\n visibility: hidden;\\\\n font-size: 16px;\\\\n color: var(--monaco-editor-foreground);\\\\n margin-right: 4px;\\\\n}\\\\n.music-monaco-editor-list-split-icon:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-list-file-item {\\\\n user-select: none;\\\\n}\\\\n.music-monaco-editor-list-file-item-new {\\\\n position: relative;\\\\n flex: 1;\\\\n outline: none;\\\\n border: 1px solid var(--monaco-editor-wordHighlightBorder);\\\\n}\\\\n.music-monaco-editor-list-file-item-new:focus {\\\\n cursor: text;\\\\n}\\\\n.music-monaco-editor-list-file-item-new-error {\\\\n border: 1px solid #F44747;\\\\n}\\\\n.music-monaco-editor-list-file-item-row {\\\\n height: 28px;\\\\n cursor: pointer;\\\\n user-select: none;\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-list-file-item-row:hover {\\\\n background-color: var(--monaco-list-hoverBackground);\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-list-file-item-row:hover .music-monaco-editor-list-split-icon {\\\\n visibility: visible;\\\\n}\\\\n.music-monaco-editor-list-file-item-row-focused {\\\\n background-color: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.music-monaco-editor-list-file-item-row-name {\\\\n white-space: nowrap;\\\\n overflow: hidden;\\\\n text-overflow: ellipsis;\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/icons/index.less\":\n/*!**********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/icons/index.less ***!\n \\**********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-icons {\\\\n width: 14px;\\\\n height: 14px;\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/modal/index.less\":\n/*!**********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/modal/index.less ***!\n \\**********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-modal {\\\\n position: absolute;\\\\n top: 0;\\\\n left: 0;\\\\n right: 0;\\\\n bottom: 0;\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n justify-content: center;\\\\n}\\\\n.music-monaco-editor-modal-mask {\\\\n position: absolute;\\\\n top: 0;\\\\n left: 0;\\\\n right: 0;\\\\n bottom: 0;\\\\n background: rgba(0, 0, 0, 0.2);\\\\n}\\\\n.music-monaco-editor-modal-content {\\\\n position: relative;\\\\n border-radius: 8px;\\\\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15);\\\\n}\\\\n.music-monaco-editor-modal-content-confirm {\\\\n width: 400px;\\\\n background: var(--monaco-editor-background);\\\\n border-radius: 8px;\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n padding-bottom: 8px;\\\\n}\\\\n.music-monaco-editor-modal-content-title {\\\\n background: var(--monaco-activityBarBadge-background);\\\\n color: var(--monaco-activityBarBadge-foreground);\\\\n height: 30px;\\\\n border-radius: 8px 8px 0 0;\\\\n padding-left: 10px;\\\\n line-height: 30px;\\\\n}\\\\n.music-monaco-editor-modal-content-content {\\\\n font-size: 14px;\\\\n padding: 20px;\\\\n}\\\\n.music-monaco-editor-modal-content-footer {\\\\n padding: 0 10px;\\\\n display: flex;\\\\n flex-direction: row;\\\\n justify-content: flex-end;\\\\n}\\\\n.music-monaco-editor-modal-content-close {\\\\n position: absolute;\\\\n right: 10px;\\\\n top: 5px;\\\\n cursor: pointer;\\\\n color: var(--monaco-activityBarBadge-foreground);\\\\n}\\\\n.music-monaco-editor-modal-content-close:focus {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/modal/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/openedtab/index.less\":\n/*!**************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/openedtab/index.less ***!\n \\**************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-opened-tab {\\\\n height: 35px;\\\\n box-sizing: border-box;\\\\n font-size: 14px;\\\\n overflow-x: scroll;\\\\n overflow-y: hidden;\\\\n width: 100%;\\\\n white-space: nowrap;\\\\n background-color: var(--monaco-editor-background);\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n justify-content: flex-start;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-opened-tab::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-opened-tab::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-opened-tab::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-opened-tab-wrapper {\\\\n box-sizing: border-box;\\\\n width: 100%;\\\\n padding-right: 30px;\\\\n overflow: hidden;\\\\n}\\\\n.music-monaco-editor-opened-tab-item {\\\\n cursor: pointer;\\\\n height: 35px;\\\\n box-sizing: border-box;\\\\n padding: 0 5px 0 10px;\\\\n display: flex;\\\\n align-items: center;\\\\n margin-right: 1px;\\\\n background-color: var(--monaco-editor-background);\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-opened-tab-item-prefix {\\\\n font-size: 12px;\\\\n opacity: 0.7;\\\\n}\\\\n.music-monaco-editor-opened-tab-item-focused {\\\\n background-color: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.music-monaco-editor-opened-tab-item:hover {\\\\n background-color: var(--monaco-list-hoverBackground);\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-opened-tab-item-close {\\\\n position: relative;\\\\n padding: 5px 5px;\\\\n line-height: 10px;\\\\n}\\\\n.music-monaco-editor-opened-tab-item-close:hover {\\\\n background-color: var(--monaco-list-focusBackground);\\\\n}\\\\n.music-monaco-editor-opened-tab-item-editing {\\\\n position: absolute;\\\\n right: 10px;\\\\n top: 15px;\\\\n width: 7px;\\\\n height: 7px;\\\\n background-color: var(--monaco-list-hoverForeground, grey);\\\\n border-radius: 50%;\\\\n}\\\\n.music-monaco-editor-modal-rightclick .music-monaco-editor-modal-mask {\\\\n opacity: 0;\\\\n}\\\\n.music-monaco-editor-rightclick-panel {\\\\n position: fixed;\\\\n background: var(--monaco-editorWidget-background);\\\\n padding: 5px 0;\\\\n font-size: 12px;\\\\n line-height: 30px;\\\\n min-width: 150px;\\\\n color: var(--monaco-editor-foreground);\\\\n}\\\\n.music-monaco-editor-rightclick-panel-item {\\\\n padding: 0 10px;\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-rightclick-panel-item:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n background: var(--monaco-list-focusBackground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/prettier/index.less\":\n/*!*************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/prettier/index.less ***!\n \\*************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-prettier-icon {\\\\n color: var(--monaco-editor-foreground);\\\\n}\\\\n.music-monaco-editor-prettier-icon:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/prettier/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/searchfile/index.less\":\n/*!***************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/searchfile/index.less ***!\n \\***************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".search-file-background {\\\\n position: fixed;\\\\n top: 0;\\\\n left: 0;\\\\n width: 100%;\\\\n height: 100%;\\\\n background-color: rgba(0, 0, 0, 0.5);\\\\n z-index: 9999;\\\\n display: flex;\\\\n justify-content: center;\\\\n align-items: flex-start;\\\\n padding-top: 100px;\\\\n}\\\\n.search-file-body-back {\\\\n width: 50%;\\\\n padding: 20px;\\\\n background: var(--monaco-editor-background);\\\\n border-radius: 8px;\\\\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\\\\n}\\\\n.search-file-input {\\\\n width: calc(100% - 20px);\\\\n padding: 10px;\\\\n background: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.search-file-input {\\\\n width: calc(100% - 20px);\\\\n padding: 10px;\\\\n background: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.search-file-result-item-selected,\\\\n.search-file-result-item {\\\\n cursor: pointer;\\\\n line-height: 50px;\\\\n padding-left: 10px;\\\\n user-select: none;\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.search-file-result-item-selected {\\\\n background: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchfile/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/searchtext/search-text.less\":\n/*!*********************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/searchtext/search-text.less ***!\n \\*********************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".search-result-container {\\\\n min-width: 100px;\\\\n max-height: 100%;\\\\n overflow: hidden;\\\\n background: var(--monaco-editor-background);\\\\n color: var(--monaco-editor-foreground);\\\\n border: 1px solid #F0F0F0;\\\\n}\\\\n.search-result-top-search {\\\\n position: sticky;\\\\n z-index: 1;\\\\n background: var(--monaco-editor-background);\\\\n display: flex;\\\\n justify-content: space-between;\\\\n padding-right: 5px;\\\\n}\\\\n.search-result-list {\\\\n margin-top: 0;\\\\n overflow-y: auto;\\\\n list-style-type: none;\\\\n height: 100%;\\\\n background: var(--monaco-editor-background);\\\\n padding-inline-start: 0px;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.search-result-list::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.search-result-list::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.search-result-list::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.search-results-title,\\\\n.search-results-item-selected,\\\\n.search-results-item {\\\\n line-height: 30px;\\\\n padding-left: 2px;\\\\n user-select: none;\\\\n white-space: nowrap;\\\\n overflow: hidden;\\\\n text-overflow: ellipsis;\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.search-results-title:hover,\\\\n.search-results-item:hover {\\\\n background: var(--monaco-list-hoverBackground);\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.search-results-item-selected {\\\\n background: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.search-result-input {\\\\n border-radius: 2px;\\\\n background: var(--monaco-list-focusBackground);\\\\n border: 0.5px solid;\\\\n margin: 5px;\\\\n margin-right: 5px;\\\\n min-width: 70px;\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchtext/search-text.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/select/index.less\":\n/*!***********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/select/index.less ***!\n \\***********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-select {\\\\n width: 140px;\\\\n height: 19px;\\\\n position: relative;\\\\n display: inline-block;\\\\n background: var(--monaco-list-activeSelectionBackground);\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n user-select: none;\\\\n font-size: 12px;\\\\n line-height: 19px;\\\\n border: 1px solid var(--monaco-checkbox-border);\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-select-content {\\\\n padding-left: 10px;\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-select-content-arrow {\\\\n position: absolute;\\\\n top: 1px;\\\\n right: 5px;\\\\n}\\\\n.music-monaco-editor-select-items {\\\\n font-size: 12px;\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n line-height: 19px;\\\\n box-sizing: border-box;\\\\n cursor: pointer;\\\\n border: 1px solid var(--monaco-checkbox-border);\\\\n position: absolute;\\\\n top: 19px;\\\\n left: 0;\\\\n right: 0;\\\\n max-height: 100px;\\\\n overflow-y: scroll;\\\\n overflow-x: hidden;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-select-items::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-select-items::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-select-items::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-select-item {\\\\n cursor: pointer;\\\\n padding-left: 10px;\\\\n}\\\\n.music-monaco-editor-select-item-selected {\\\\n background: var(--monaco-list-activeSelectionBackground);\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n opacity: 0.8;\\\\n}\\\\n.music-monaco-editor-select-item:hover {\\\\n background: var(--monaco-list-activeSelectionBackground);\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/multi/index.less\":\n/*!***********************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/multi/index.less ***!\n \\***********************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-highlight {\\\\n background: rgba(0, 0, 0, 0.08);\\\\n}\\\\n.music-monaco-editor {\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: flex-start;\\\\n justify-content: flex-start;\\\\n width: 100%;\\\\n height: 100%;\\\\n position: relative;\\\\n color: var(--monaco-editor-foreground);\\\\n}\\\\n.music-monaco-editor-drag {\\\\n width: 5px;\\\\n background: var(--monaco-editor-background);\\\\n border-right: 1px solid var(--monaco-activityBar-border);\\\\n height: 100%;\\\\n cursor: col-resize;\\\\n flex-shrink: 0;\\\\n}\\\\n.music-monaco-editor-drag:hover {\\\\n background: var(--monaco-editorCursor-foreground);\\\\n}\\\\n.music-monaco-editor-area {\\\\n color: var(--monaco-editor-foreground);\\\\n background-color: var(--monaco-editor-background);\\\\n flex: 1;\\\\n min-width: 0;\\\\n height: 100%;\\\\n display: flex;\\\\n flex-direction: column;\\\\n align-items: flex-start;\\\\n justify-content: flex-start;\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-area-empty {\\\\n position: absolute;\\\\n left: 0;\\\\n right: 0;\\\\n top: 0;\\\\n bottom: 0;\\\\n background: var(--monaco-editor-background);\\\\n display: flex;\\\\n flex-direction: column;\\\\n align-items: center;\\\\n justify-content: center;\\\\n user-select: none;\\\\n}\\\\n.music-monaco-editor-area-empty-icon {\\\\n user-select: none;\\\\n width: 100px;\\\\n height: 100px;\\\\n margin-bottom: 20px;\\\\n}\\\\n.music-monaco-editor-setting {\\\\n width: 400px;\\\\n height: 200px;\\\\n background: var(--monaco-editor-background);\\\\n border-radius: 10px;\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n display: flex;\\\\n flex-direction: column;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-setting-button {\\\\n cursor: pointer;\\\\n position: absolute;\\\\n left: 8px;\\\\n bottom: 5px;\\\\n}\\\\n.music-monaco-editor-setting-header {\\\\n position: relative;\\\\n height: 28px;\\\\n line-height: 28px;\\\\n width: 100%;\\\\n background: var(--monaco-activityBarBadge-background);\\\\n color: var(--monaco-activityBarBadge-foreground);\\\\n border-radius: 8px 8px 0 0;\\\\n box-sizing: border-box;\\\\n padding-left: 10px;\\\\n}\\\\n.music-monaco-editor-setting-header-close {\\\\n cursor: pointer;\\\\n line-height: 12px;\\\\n height: 12px;\\\\n top: 4px;\\\\n padding: 4px;\\\\n position: absolute;\\\\n right: 10px;\\\\n}\\\\n.music-monaco-editor-setting-content {\\\\n flex-grow: 1;\\\\n padding: 10px 10px 10px 30px;\\\\n overflow-y: scroll;\\\\n}\\\\n.music-monaco-editor-setting-content::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-setting-content::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-setting-content::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-prettier {\\\\n position: absolute;\\\\n right: 5px;\\\\n top: 5px;\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-input-row {\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n margin-top: 10px;\\\\n}\\\\n.music-monaco-editor-input-name {\\\\n font-size: 12px;\\\\n line-height: 20px;\\\\n width: 100px;\\\\n text-align: left;\\\\n}\\\\n.music-monaco-editor-input-value {\\\\n font-size: 12px;\\\\n line-height: 20px;\\\\n}\\\\n.music-monaco-editor-loading {\\\\n display: flex;\\\\n align-items: center;\\\\n justify-content: center;\\\\n height: 100%;\\\\n width: 100%;\\\\n background: var(--monaco-editor-background);\\\\n}\\\\n.music-monaco-editor-loading-icon {\\\\n width: 60px;\\\\n height: 60px;\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/single/index.less\":\n/*!************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/single/index.less ***!\n \\************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-loading {\\\\n display: flex;\\\\n align-items: center;\\\\n justify-content: center;\\\\n height: 100%;\\\\n width: 100%;\\\\n background: var(--monaco-editor-background);\\\\n}\\\\n.music-monaco-editor-loading-icon {\\\\n width: 60px;\\\\n height: 60px;\\\\n}\\\\n.music-monaco-editor-highlight {\\\\n background: rgba(0, 0, 0, 0.08);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/runtime/api.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/css-loader/dist/runtime/api.js ***!\n \\*****************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/*\\n MIT License http://www.opensource.org/licenses/mit-license.php\\n Author Tobias Koppers @sokra\\n*/\\nmodule.exports = function (cssWithMappingToString) {\\n var list = []; // return the list of modules as css string\\n\\n list.toString = function toString() {\\n return this.map(function (item) {\\n var content = \\\"\\\";\\n var needLayer = typeof item[5] !== \\\"undefined\\\";\\n\\n if (item[4]) {\\n content += \\\"@supports (\\\".concat(item[4], \\\") {\\\");\\n }\\n\\n if (item[2]) {\\n content += \\\"@media \\\".concat(item[2], \\\" {\\\");\\n }\\n\\n if (needLayer) {\\n content += \\\"@layer\\\".concat(item[5].length > 0 ? \\\" \\\".concat(item[5]) : \\\"\\\", \\\" {\\\");\\n }\\n\\n content += cssWithMappingToString(item);\\n\\n if (needLayer) {\\n content += \\\"}\\\";\\n }\\n\\n if (item[2]) {\\n content += \\\"}\\\";\\n }\\n\\n if (item[4]) {\\n content += \\\"}\\\";\\n }\\n\\n return content;\\n }).join(\\\"\\\");\\n }; // import a list of modules into the list\\n\\n\\n list.i = function i(modules, media, dedupe, supports, layer) {\\n if (typeof modules === \\\"string\\\") {\\n modules = [[null, modules, undefined]];\\n }\\n\\n var alreadyImportedModules = {};\\n\\n if (dedupe) {\\n for (var k = 0; k < this.length; k++) {\\n var id = this[k][0];\\n\\n if (id != null) {\\n alreadyImportedModules[id] = true;\\n }\\n }\\n }\\n\\n for (var _k = 0; _k < modules.length; _k++) {\\n var item = [].concat(modules[_k]);\\n\\n if (dedupe && alreadyImportedModules[item[0]]) {\\n continue;\\n }\\n\\n if (typeof layer !== \\\"undefined\\\") {\\n if (typeof item[5] === \\\"undefined\\\") {\\n item[5] = layer;\\n } else {\\n item[1] = \\\"@layer\\\".concat(item[5].length > 0 ? \\\" \\\".concat(item[5]) : \\\"\\\", \\\" {\\\").concat(item[1], \\\"}\\\");\\n item[5] = layer;\\n }\\n }\\n\\n if (media) {\\n if (!item[2]) {\\n item[2] = media;\\n } else {\\n item[1] = \\\"@media \\\".concat(item[2], \\\" {\\\").concat(item[1], \\\"}\\\");\\n item[2] = media;\\n }\\n }\\n\\n if (supports) {\\n if (!item[4]) {\\n item[4] = \\\"\\\".concat(supports);\\n } else {\\n item[1] = \\\"@supports (\\\".concat(item[4], \\\") {\\\").concat(item[1], \\\"}\\\");\\n item[4] = supports;\\n }\\n }\\n\\n list.push(item);\\n }\\n };\\n\\n return list;\\n};\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/css-loader/dist/runtime/api.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***!\n \\**************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\nmodule.exports = function (i) {\\n return i[1];\\n};\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/css-loader/dist/runtime/noSourceMaps.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/fast-plist/release/src/main.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/fast-plist/release/src/main.js ***!\n \\*****************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"/*---------------------------------------------------------\\r\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\r\\n *--------------------------------------------------------*/\\r\\n\\r\\nfunction parseWithLocation(content, filename, locationKeyName) {\\r\\n return _parse(content, filename, locationKeyName);\\r\\n}\\r\\nexports.parseWithLocation = parseWithLocation;\\r\\n/**\\r\\n * A very fast plist parser\\r\\n */\\r\\nfunction parse(content) {\\r\\n return _parse(content, null, null);\\r\\n}\\r\\nexports.parse = parse;\\r\\nfunction _parse(content, filename, locationKeyName) {\\r\\n var len = content.length;\\r\\n var pos = 0;\\r\\n var line = 1;\\r\\n var char = 0;\\r\\n // Skip UTF8 BOM\\r\\n if (len > 0 && content.charCodeAt(0) === 65279 /* BOM */) {\\r\\n pos = 1;\\r\\n }\\r\\n function advancePosBy(by) {\\r\\n if (locationKeyName === null) {\\r\\n pos = pos + by;\\r\\n }\\r\\n else {\\r\\n while (by > 0) {\\r\\n var chCode = content.charCodeAt(pos);\\r\\n if (chCode === 10 /* LINE_FEED */) {\\r\\n pos++;\\r\\n line++;\\r\\n char = 0;\\r\\n }\\r\\n else {\\r\\n pos++;\\r\\n char++;\\r\\n }\\r\\n by--;\\r\\n }\\r\\n }\\r\\n }\\r\\n function advancePosTo(to) {\\r\\n if (locationKeyName === null) {\\r\\n pos = to;\\r\\n }\\r\\n else {\\r\\n advancePosBy(to - pos);\\r\\n }\\r\\n }\\r\\n function skipWhitespace() {\\r\\n while (pos < len) {\\r\\n var chCode = content.charCodeAt(pos);\\r\\n if (chCode !== 32 /* SPACE */ && chCode !== 9 /* TAB */ && chCode !== 13 /* CARRIAGE_RETURN */ && chCode !== 10 /* LINE_FEED */) {\\r\\n break;\\r\\n }\\r\\n advancePosBy(1);\\r\\n }\\r\\n }\\r\\n function advanceIfStartsWith(str) {\\r\\n if (content.substr(pos, str.length) === str) {\\r\\n advancePosBy(str.length);\\r\\n return true;\\r\\n }\\r\\n return false;\\r\\n }\\r\\n function advanceUntil(str) {\\r\\n var nextOccurence = content.indexOf(str, pos);\\r\\n if (nextOccurence !== -1) {\\r\\n advancePosTo(nextOccurence + str.length);\\r\\n }\\r\\n else {\\r\\n // EOF\\r\\n advancePosTo(len);\\r\\n }\\r\\n }\\r\\n function captureUntil(str) {\\r\\n var nextOccurence = content.indexOf(str, pos);\\r\\n if (nextOccurence !== -1) {\\r\\n var r = content.substring(pos, nextOccurence);\\r\\n advancePosTo(nextOccurence + str.length);\\r\\n return r;\\r\\n }\\r\\n else {\\r\\n // EOF\\r\\n var r = content.substr(pos);\\r\\n advancePosTo(len);\\r\\n return r;\\r\\n }\\r\\n }\\r\\n var state = 0 /* ROOT_STATE */;\\r\\n var cur = null;\\r\\n var stateStack = [];\\r\\n var objStack = [];\\r\\n var curKey = null;\\r\\n function pushState(newState, newCur) {\\r\\n stateStack.push(state);\\r\\n objStack.push(cur);\\r\\n state = newState;\\r\\n cur = newCur;\\r\\n }\\r\\n function popState() {\\r\\n state = stateStack.pop();\\r\\n cur = objStack.pop();\\r\\n }\\r\\n function fail(msg) {\\r\\n throw new Error('Near offset ' + pos + ': ' + msg + ' ~~~' + content.substr(pos, 50) + '~~~');\\r\\n }\\r\\n var dictState = {\\r\\n enterDict: function () {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n var newDict = {};\\r\\n if (locationKeyName !== null) {\\r\\n newDict[locationKeyName] = {\\r\\n filename: filename,\\r\\n line: line,\\r\\n char: char\\r\\n };\\r\\n }\\r\\n cur[curKey] = newDict;\\r\\n curKey = null;\\r\\n pushState(1 /* DICT_STATE */, newDict);\\r\\n },\\r\\n enterArray: function () {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n var newArr = [];\\r\\n cur[curKey] = newArr;\\r\\n curKey = null;\\r\\n pushState(2 /* ARR_STATE */, newArr);\\r\\n }\\r\\n };\\r\\n var arrState = {\\r\\n enterDict: function () {\\r\\n var newDict = {};\\r\\n if (locationKeyName !== null) {\\r\\n newDict[locationKeyName] = {\\r\\n filename: filename,\\r\\n line: line,\\r\\n char: char\\r\\n };\\r\\n }\\r\\n cur.push(newDict);\\r\\n pushState(1 /* DICT_STATE */, newDict);\\r\\n },\\r\\n enterArray: function () {\\r\\n var newArr = [];\\r\\n cur.push(newArr);\\r\\n pushState(2 /* ARR_STATE */, newArr);\\r\\n }\\r\\n };\\r\\n function enterDict() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n dictState.enterDict();\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n arrState.enterDict();\\r\\n }\\r\\n else {\\r\\n cur = {};\\r\\n if (locationKeyName !== null) {\\r\\n cur[locationKeyName] = {\\r\\n filename: filename,\\r\\n line: line,\\r\\n char: char\\r\\n };\\r\\n }\\r\\n pushState(1 /* DICT_STATE */, cur);\\r\\n }\\r\\n }\\r\\n function leaveDict() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n popState();\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n fail('unexpected ');\\r\\n }\\r\\n else {\\r\\n fail('unexpected ');\\r\\n }\\r\\n }\\r\\n function enterArray() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n dictState.enterArray();\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n arrState.enterArray();\\r\\n }\\r\\n else {\\r\\n cur = [];\\r\\n pushState(2 /* ARR_STATE */, cur);\\r\\n }\\r\\n }\\r\\n function leaveArray() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n fail('unexpected ');\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n popState();\\r\\n }\\r\\n else {\\r\\n fail('unexpected ');\\r\\n }\\r\\n }\\r\\n function acceptKey(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey !== null) {\\r\\n fail('too many ');\\r\\n }\\r\\n curKey = val;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n fail('unexpected ');\\r\\n }\\r\\n else {\\r\\n fail('unexpected ');\\r\\n }\\r\\n }\\r\\n function acceptString(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptReal(val) {\\r\\n if (isNaN(val)) {\\r\\n fail('cannot parse float');\\r\\n }\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptInteger(val) {\\r\\n if (isNaN(val)) {\\r\\n fail('cannot parse integer');\\r\\n }\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptDate(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptData(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptBool(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function escapeVal(str) {\\r\\n return str.replace(/&#([0-9]+);/g, function (_, m0) {\\r\\n return String.fromCodePoint(parseInt(m0, 10));\\r\\n }).replace(/&#x([0-9a-f]+);/g, function (_, m0) {\\r\\n return String.fromCodePoint(parseInt(m0, 16));\\r\\n }).replace(/&|<|>|"|'/g, function (_) {\\r\\n switch (_) {\\r\\n case '&': return '&';\\r\\n case '<': return '<';\\r\\n case '>': return '>';\\r\\n case '"': return '\\\"';\\r\\n case ''': return '\\\\'';\\r\\n }\\r\\n return _;\\r\\n });\\r\\n }\\r\\n function parseOpenTag() {\\r\\n var r = captureUntil('>');\\r\\n var isClosed = false;\\r\\n if (r.charCodeAt(r.length - 1) === 47 /* SLASH */) {\\r\\n isClosed = true;\\r\\n r = r.substring(0, r.length - 1);\\r\\n }\\r\\n return {\\r\\n name: r.trim(),\\r\\n isClosed: isClosed\\r\\n };\\r\\n }\\r\\n function parseTagValue(tag) {\\r\\n if (tag.isClosed) {\\r\\n return '';\\r\\n }\\r\\n var val = captureUntil('');\\r\\n return escapeVal(val);\\r\\n }\\r\\n while (pos < len) {\\r\\n skipWhitespace();\\r\\n if (pos >= len) {\\r\\n break;\\r\\n }\\r\\n var chCode = content.charCodeAt(pos);\\r\\n advancePosBy(1);\\r\\n if (chCode !== 60 /* LESS_THAN */) {\\r\\n fail('expected <');\\r\\n }\\r\\n if (pos >= len) {\\r\\n fail('unexpected end of input');\\r\\n }\\r\\n var peekChCode = content.charCodeAt(pos);\\r\\n if (peekChCode === 63 /* QUESTION_MARK */) {\\r\\n advancePosBy(1);\\r\\n advanceUntil('?>');\\r\\n continue;\\r\\n }\\r\\n if (peekChCode === 33 /* EXCLAMATION_MARK */) {\\r\\n advancePosBy(1);\\r\\n if (advanceIfStartsWith('--')) {\\r\\n advanceUntil('-->');\\r\\n continue;\\r\\n }\\r\\n advanceUntil('>');\\r\\n continue;\\r\\n }\\r\\n if (peekChCode === 47 /* SLASH */) {\\r\\n advancePosBy(1);\\r\\n skipWhitespace();\\r\\n if (advanceIfStartsWith('plist')) {\\r\\n advanceUntil('>');\\r\\n continue;\\r\\n }\\r\\n if (advanceIfStartsWith('dict')) {\\r\\n advanceUntil('>');\\r\\n leaveDict();\\r\\n continue;\\r\\n }\\r\\n if (advanceIfStartsWith('array')) {\\r\\n advanceUntil('>');\\r\\n leaveArray();\\r\\n continue;\\r\\n }\\r\\n fail('unexpected closed tag');\\r\\n }\\r\\n var tag = parseOpenTag();\\r\\n switch (tag.name) {\\r\\n case 'dict':\\r\\n enterDict();\\r\\n if (tag.isClosed) {\\r\\n leaveDict();\\r\\n }\\r\\n continue;\\r\\n case 'array':\\r\\n enterArray();\\r\\n if (tag.isClosed) {\\r\\n leaveArray();\\r\\n }\\r\\n continue;\\r\\n case 'key':\\r\\n acceptKey(parseTagValue(tag));\\r\\n continue;\\r\\n case 'string':\\r\\n acceptString(parseTagValue(tag));\\r\\n continue;\\r\\n case 'real':\\r\\n acceptReal(parseFloat(parseTagValue(tag)));\\r\\n continue;\\r\\n case 'integer':\\r\\n acceptInteger(parseInt(parseTagValue(tag), 10));\\r\\n continue;\\r\\n case 'date':\\r\\n acceptDate(new Date(parseTagValue(tag)));\\r\\n continue;\\r\\n case 'data':\\r\\n acceptData(parseTagValue(tag));\\r\\n continue;\\r\\n case 'true':\\r\\n parseTagValue(tag);\\r\\n acceptBool(true);\\r\\n continue;\\r\\n case 'false':\\r\\n parseTagValue(tag);\\r\\n acceptBool(false);\\r\\n continue;\\r\\n }\\r\\n if (/^plist/.test(tag.name)) {\\r\\n continue;\\r\\n }\\r\\n fail('unexpected opened tag ' + tag.name);\\r\\n }\\r\\n return cur;\\r\\n}\\r\\n//# sourceMappingURL=main.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/fast-plist/release/src/main.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-editor-textmate/dist/index.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/monaco-editor-textmate/dist/index.js ***!\n \\***********************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nexports.wireTmGrammars = void 0;\\nconst monaco_textmate_1 = __webpack_require__(/*! monaco-textmate */ \\\"./node_modules/monaco-textmate/dist/main.js\\\");\\nconst tm_to_monaco_token_1 = __webpack_require__(/*! ./tm-to-monaco-token */ \\\"./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js\\\");\\nclass TokenizerState {\\n _ruleStack;\\n constructor(_ruleStack) {\\n this._ruleStack = _ruleStack;\\n }\\n get ruleStack() {\\n return this._ruleStack;\\n }\\n clone() {\\n return new TokenizerState(this._ruleStack);\\n }\\n equals(other) {\\n if (!other ||\\n !(other instanceof TokenizerState) ||\\n other !== this ||\\n other._ruleStack !== this._ruleStack) {\\n return false;\\n }\\n return true;\\n }\\n}\\n/**\\n * Wires up monaco-editor with monaco-textmate\\n *\\n * @param monaco monaco namespace this operation should apply to (usually the `monaco` global unless you have some other setup)\\n * @param registry TmGrammar `Registry` this wiring should rely on to provide the grammars\\n * @param languages `Map` of language ids (string) to TM names (string)\\n */\\nfunction wireTmGrammars(monaco, registry, languages, editor) {\\n return Promise.all(Array.from(languages.keys())\\n .map(async (languageId) => {\\n const grammar = await registry.loadGrammar(languages.get(languageId));\\n monaco.languages.setTokensProvider(languageId, {\\n getInitialState: () => new TokenizerState(monaco_textmate_1.INITIAL),\\n tokenize: (line, state) => {\\n const res = grammar.tokenizeLine(line, state.ruleStack);\\n return {\\n endState: new TokenizerState(res.ruleStack),\\n tokens: res.tokens.map(token => ({\\n ...token,\\n // TODO: At the moment, monaco-editor doesn't seem to accept array of scopes\\n scopes: editor ? (0, tm_to_monaco_token_1.TMToMonacoToken)(editor, token.scopes) : token.scopes[token.scopes.length - 1]\\n })),\\n };\\n }\\n });\\n }));\\n}\\nexports.wireTmGrammars = wireTmGrammars;\\n//# sourceMappingURL=index.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-editor-textmate/dist/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js\":\n/*!************************************************************************!*\\\n !*** ./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js ***!\n \\************************************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nexports.TMToMonacoToken = void 0;\\n// as described in issue: https://github.com/NeekSandhu/monaco-textmate/issues/5\\nconst TMToMonacoToken = (editor, scopes) => {\\n let scopeName = \\\"\\\";\\n // get the scope name. Example: cpp , java, haskell\\n for (let i = scopes[0].length - 1; i >= 0; i -= 1) {\\n const char = scopes[0][i];\\n if (char === \\\".\\\") {\\n break;\\n }\\n scopeName = char + scopeName;\\n }\\n // iterate through all scopes from last to first\\n for (let i = scopes.length - 1; i >= 0; i -= 1) {\\n const scope = scopes[i];\\n /**\\n * Try all possible tokens from high specific token to low specific token\\n *\\n * Example:\\n * 0 meta.function.definition.parameters.cpp\\n * 1 meta.function.definition.parameters\\n *\\n * 2 meta.function.definition.cpp\\n * 3 meta.function.definition\\n *\\n * 4 meta.function.cpp\\n * 5 meta.function\\n *\\n * 6 meta.cpp\\n * 7 meta\\n */\\n for (let i = scope.length - 1; i >= 0; i -= 1) {\\n const char = scope[i];\\n if (char === \\\".\\\") {\\n const token = scope.slice(0, i);\\n if (editor['_themeService']._theme._tokenTheme._match(token + \\\".\\\" + scopeName)._foreground >\\n 1) {\\n return token + \\\".\\\" + scopeName;\\n }\\n if (editor[\\\"_themeService\\\"]._theme._tokenTheme._match(token)._foreground > 1) {\\n return token;\\n }\\n }\\n }\\n }\\n return \\\"\\\";\\n};\\nexports.TMToMonacoToken = TMToMonacoToken;\\n//# sourceMappingURL=tm-to-monaco-token.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/debug.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/debug.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \\\"./node_modules/process/browser.js\\\");\\n\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nexports.CAPTURE_METADATA = typeof process === 'undefined' ? false : !!process.env['VSCODE_TEXTMATE_DEBUG'];\\nexports.IN_DEBUG_MODE = typeof process === 'undefined' ? false : !!process.env['VSCODE_TEXTMATE_DEBUG'];\\n//# sourceMappingURL=debug.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/debug.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/grammar.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/grammar.js ***!\n \\******************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar utils_1 = __webpack_require__(/*! ./utils */ \\\"./node_modules/monaco-textmate/dist/utils.js\\\");\\nvar rule_1 = __webpack_require__(/*! ./rule */ \\\"./node_modules/monaco-textmate/dist/rule.js\\\");\\nvar matcher_1 = __webpack_require__(/*! ./matcher */ \\\"./node_modules/monaco-textmate/dist/matcher.js\\\");\\nvar debug_1 = __webpack_require__(/*! ./debug */ \\\"./node_modules/monaco-textmate/dist/debug.js\\\");\\nfunction createGrammar(grammar, initialLanguage, embeddedLanguages, tokenTypes, grammarRepository) {\\n return new Grammar(grammar, initialLanguage, embeddedLanguages, tokenTypes, grammarRepository);\\n}\\nexports.createGrammar = createGrammar;\\n/**\\n * Fill in `result` all external included scopes in `patterns`\\n */\\nfunction _extractIncludedScopesInPatterns(result, patterns) {\\n for (var i = 0, len = patterns.length; i < len; i++) {\\n if (Array.isArray(patterns[i].patterns)) {\\n _extractIncludedScopesInPatterns(result, patterns[i].patterns);\\n }\\n var include = patterns[i].include;\\n if (!include) {\\n continue;\\n }\\n if (include === '$base' || include === '$self') {\\n // Special includes that can be resolved locally in this grammar\\n continue;\\n }\\n if (include.charAt(0) === '#') {\\n // Local include from this grammar\\n continue;\\n }\\n var sharpIndex = include.indexOf('#');\\n if (sharpIndex >= 0) {\\n result[include.substring(0, sharpIndex)] = true;\\n }\\n else {\\n result[include] = true;\\n }\\n }\\n}\\n/**\\n * Fill in `result` all external included scopes in `repository`\\n */\\nfunction _extractIncludedScopesInRepository(result, repository) {\\n for (var name in repository) {\\n var rule = repository[name];\\n if (rule.patterns && Array.isArray(rule.patterns)) {\\n _extractIncludedScopesInPatterns(result, rule.patterns);\\n }\\n if (rule.repository) {\\n _extractIncludedScopesInRepository(result, rule.repository);\\n }\\n }\\n}\\n/**\\n * Collects the list of all external included scopes in `grammar`.\\n */\\nfunction collectIncludedScopes(result, grammar) {\\n if (grammar.patterns && Array.isArray(grammar.patterns)) {\\n _extractIncludedScopesInPatterns(result, grammar.patterns);\\n }\\n if (grammar.repository) {\\n _extractIncludedScopesInRepository(result, grammar.repository);\\n }\\n // remove references to own scope (avoid recursion)\\n delete result[grammar.scopeName];\\n}\\nexports.collectIncludedScopes = collectIncludedScopes;\\nfunction scopesAreMatching(thisScopeName, scopeName) {\\n if (!thisScopeName) {\\n return false;\\n }\\n if (thisScopeName === scopeName) {\\n return true;\\n }\\n var len = scopeName.length;\\n return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === '.';\\n}\\nfunction nameMatcher(identifers, scopes) {\\n if (scopes.length < identifers.length) {\\n return false;\\n }\\n var lastIndex = 0;\\n return identifers.every(function (identifier) {\\n for (var i = lastIndex; i < scopes.length; i++) {\\n if (scopesAreMatching(scopes[i], identifier)) {\\n lastIndex = i + 1;\\n return true;\\n }\\n }\\n return false;\\n });\\n}\\n;\\nfunction collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {\\n var matchers = matcher_1.createMatchers(selector, nameMatcher);\\n var ruleId = rule_1.RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);\\n for (var _i = 0, matchers_1 = matchers; _i < matchers_1.length; _i++) {\\n var matcher = matchers_1[_i];\\n result.push({\\n matcher: matcher.matcher,\\n ruleId: ruleId,\\n grammar: grammar,\\n priority: matcher.priority\\n });\\n }\\n}\\nvar ScopeMetadata = /** @class */ (function () {\\n function ScopeMetadata(scopeName, languageId, tokenType, themeData) {\\n this.scopeName = scopeName;\\n this.languageId = languageId;\\n this.tokenType = tokenType;\\n this.themeData = themeData;\\n }\\n return ScopeMetadata;\\n}());\\nexports.ScopeMetadata = ScopeMetadata;\\nvar ScopeMetadataProvider = /** @class */ (function () {\\n function ScopeMetadataProvider(initialLanguage, themeProvider, embeddedLanguages) {\\n this._initialLanguage = initialLanguage;\\n this._themeProvider = themeProvider;\\n this.onDidChangeTheme();\\n // embeddedLanguages handling\\n this._embeddedLanguages = Object.create(null);\\n if (embeddedLanguages) {\\n // If embeddedLanguages are configured, fill in `this._embeddedLanguages`\\n var scopes = Object.keys(embeddedLanguages);\\n for (var i = 0, len = scopes.length; i < len; i++) {\\n var scope = scopes[i];\\n var language = embeddedLanguages[scope];\\n if (typeof language !== 'number' || language === 0) {\\n console.warn('Invalid embedded language found at scope ' + scope + ': <<' + language + '>>');\\n // never hurts to be too careful\\n continue;\\n }\\n this._embeddedLanguages[scope] = language;\\n }\\n }\\n // create the regex\\n var escapedScopes = Object.keys(this._embeddedLanguages).map(function (scopeName) { return ScopeMetadataProvider._escapeRegExpCharacters(scopeName); });\\n if (escapedScopes.length === 0) {\\n // no scopes registered\\n this._embeddedLanguagesRegex = null;\\n }\\n else {\\n escapedScopes.sort();\\n escapedScopes.reverse();\\n this._embeddedLanguagesRegex = new RegExp(\\\"^((\\\" + escapedScopes.join(')|(') + \\\"))($|\\\\\\\\.)\\\", '');\\n }\\n }\\n ScopeMetadataProvider.prototype.onDidChangeTheme = function () {\\n this._cache = Object.create(null);\\n this._defaultMetaData = new ScopeMetadata('', this._initialLanguage, 0 /* Other */, [this._themeProvider.getDefaults()]);\\n };\\n ScopeMetadataProvider.prototype.getDefaultMetadata = function () {\\n return this._defaultMetaData;\\n };\\n /**\\n * Escapes regular expression characters in a given string\\n */\\n ScopeMetadataProvider._escapeRegExpCharacters = function (value) {\\n return value.replace(/[\\\\-\\\\\\\\\\\\{\\\\}\\\\*\\\\+\\\\?\\\\|\\\\^\\\\$\\\\.\\\\,\\\\[\\\\]\\\\(\\\\)\\\\#\\\\s]/g, '\\\\\\\\$&');\\n };\\n ScopeMetadataProvider.prototype.getMetadataForScope = function (scopeName) {\\n if (scopeName === null) {\\n return ScopeMetadataProvider._NULL_SCOPE_METADATA;\\n }\\n var value = this._cache[scopeName];\\n if (value) {\\n return value;\\n }\\n value = this._doGetMetadataForScope(scopeName);\\n this._cache[scopeName] = value;\\n return value;\\n };\\n ScopeMetadataProvider.prototype._doGetMetadataForScope = function (scopeName) {\\n var languageId = this._scopeToLanguage(scopeName);\\n var standardTokenType = this._toStandardTokenType(scopeName);\\n var themeData = this._themeProvider.themeMatch(scopeName);\\n return new ScopeMetadata(scopeName, languageId, standardTokenType, themeData);\\n };\\n /**\\n * Given a produced TM scope, return the language that token describes or null if unknown.\\n * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null\\n */\\n ScopeMetadataProvider.prototype._scopeToLanguage = function (scope) {\\n if (!scope) {\\n return 0;\\n }\\n if (!this._embeddedLanguagesRegex) {\\n // no scopes registered\\n return 0;\\n }\\n var m = scope.match(this._embeddedLanguagesRegex);\\n if (!m) {\\n // no scopes matched\\n return 0;\\n }\\n var language = this._embeddedLanguages[m[1]] || 0;\\n if (!language) {\\n return 0;\\n }\\n return language;\\n };\\n ScopeMetadataProvider.prototype._toStandardTokenType = function (tokenType) {\\n var m = tokenType.match(ScopeMetadataProvider.STANDARD_TOKEN_TYPE_REGEXP);\\n if (!m) {\\n return 0 /* Other */;\\n }\\n switch (m[1]) {\\n case 'comment':\\n return 1 /* Comment */;\\n case 'string':\\n return 2 /* String */;\\n case 'regex':\\n return 4 /* RegEx */;\\n case 'meta.embedded':\\n return 8 /* MetaEmbedded */;\\n }\\n throw new Error('Unexpected match for standard token type!');\\n };\\n ScopeMetadataProvider._NULL_SCOPE_METADATA = new ScopeMetadata('', 0, 0, null);\\n ScopeMetadataProvider.STANDARD_TOKEN_TYPE_REGEXP = /\\\\b(comment|string|regex|meta\\\\.embedded)\\\\b/;\\n return ScopeMetadataProvider;\\n}());\\nvar Grammar = /** @class */ (function () {\\n function Grammar(grammar, initialLanguage, embeddedLanguages, tokenTypes, grammarRepository) {\\n this._scopeMetadataProvider = new ScopeMetadataProvider(initialLanguage, grammarRepository, embeddedLanguages);\\n this._rootId = -1;\\n this._lastRuleId = 0;\\n this._ruleId2desc = [];\\n this._includedGrammars = {};\\n this._grammarRepository = grammarRepository;\\n this._grammar = initGrammar(grammar, null);\\n this._tokenTypeMatchers = [];\\n if (tokenTypes) {\\n for (var _i = 0, _a = Object.keys(tokenTypes); _i < _a.length; _i++) {\\n var selector = _a[_i];\\n var matchers = matcher_1.createMatchers(selector, nameMatcher);\\n for (var _b = 0, matchers_2 = matchers; _b < matchers_2.length; _b++) {\\n var matcher = matchers_2[_b];\\n this._tokenTypeMatchers.push({\\n matcher: matcher.matcher,\\n type: tokenTypes[selector]\\n });\\n }\\n }\\n }\\n }\\n Grammar.prototype.onDidChangeTheme = function () {\\n this._scopeMetadataProvider.onDidChangeTheme();\\n };\\n Grammar.prototype.getMetadataForScope = function (scope) {\\n return this._scopeMetadataProvider.getMetadataForScope(scope);\\n };\\n Grammar.prototype.getInjections = function () {\\n var _this = this;\\n if (!this._injections) {\\n this._injections = [];\\n // add injections from the current grammar\\n var rawInjections = this._grammar.injections;\\n if (rawInjections) {\\n for (var expression in rawInjections) {\\n collectInjections(this._injections, expression, rawInjections[expression], this, this._grammar);\\n }\\n }\\n // add injection grammars contributed for the current scope\\n if (this._grammarRepository) {\\n var injectionScopeNames = this._grammarRepository.injections(this._grammar.scopeName);\\n if (injectionScopeNames) {\\n injectionScopeNames.forEach(function (injectionScopeName) {\\n var injectionGrammar = _this.getExternalGrammar(injectionScopeName);\\n if (injectionGrammar) {\\n var selector = injectionGrammar.injectionSelector;\\n if (selector) {\\n collectInjections(_this._injections, selector, injectionGrammar, _this, injectionGrammar);\\n }\\n }\\n });\\n }\\n }\\n this._injections.sort(function (i1, i2) { return i1.priority - i2.priority; }); // sort by priority\\n }\\n if (this._injections.length === 0) {\\n return this._injections;\\n }\\n return this._injections;\\n };\\n Grammar.prototype.registerRule = function (factory) {\\n var id = (++this._lastRuleId);\\n var result = factory(id);\\n this._ruleId2desc[id] = result;\\n return result;\\n };\\n Grammar.prototype.getRule = function (patternId) {\\n return this._ruleId2desc[patternId];\\n };\\n Grammar.prototype.getExternalGrammar = function (scopeName, repository) {\\n if (this._includedGrammars[scopeName]) {\\n return this._includedGrammars[scopeName];\\n }\\n else if (this._grammarRepository) {\\n var rawIncludedGrammar = this._grammarRepository.lookup(scopeName);\\n if (rawIncludedGrammar) {\\n // console.log('LOADED GRAMMAR ' + pattern.include);\\n this._includedGrammars[scopeName] = initGrammar(rawIncludedGrammar, repository && repository.$base);\\n return this._includedGrammars[scopeName];\\n }\\n }\\n };\\n Grammar.prototype.tokenizeLine = function (lineText, prevState) {\\n var r = this._tokenize(lineText, prevState, false);\\n return {\\n tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),\\n ruleStack: r.ruleStack\\n };\\n };\\n Grammar.prototype.tokenizeLine2 = function (lineText, prevState) {\\n var r = this._tokenize(lineText, prevState, true);\\n return {\\n tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),\\n ruleStack: r.ruleStack\\n };\\n };\\n Grammar.prototype._tokenize = function (lineText, prevState, emitBinaryTokens) {\\n if (this._rootId === -1) {\\n this._rootId = rule_1.RuleFactory.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository);\\n }\\n var isFirstLine;\\n if (!prevState || prevState === StackElement.NULL) {\\n isFirstLine = true;\\n var rawDefaultMetadata = this._scopeMetadataProvider.getDefaultMetadata();\\n var defaultTheme = rawDefaultMetadata.themeData[0];\\n var defaultMetadata = StackElementMetadata.set(0, rawDefaultMetadata.languageId, rawDefaultMetadata.tokenType, defaultTheme.fontStyle, defaultTheme.foreground, defaultTheme.background);\\n var rootScopeName = this.getRule(this._rootId).getName(null, null);\\n var rawRootMetadata = this._scopeMetadataProvider.getMetadataForScope(rootScopeName);\\n var rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata);\\n var scopeList = new ScopeListElement(null, rootScopeName, rootMetadata);\\n prevState = new StackElement(null, this._rootId, -1, null, scopeList, scopeList);\\n }\\n else {\\n isFirstLine = false;\\n prevState.reset();\\n }\\n lineText = lineText + '\\\\n';\\n var onigLineText = rule_1.createOnigString(lineText);\\n var lineLength = rule_1.getString(onigLineText).length;\\n var lineTokens = new LineTokens(emitBinaryTokens, lineText, this._tokenTypeMatchers);\\n var nextState = _tokenizeString(this, onigLineText, isFirstLine, 0, prevState, lineTokens);\\n return {\\n lineLength: lineLength,\\n lineTokens: lineTokens,\\n ruleStack: nextState\\n };\\n };\\n return Grammar;\\n}());\\nexports.Grammar = Grammar;\\nfunction initGrammar(grammar, base) {\\n grammar = utils_1.clone(grammar);\\n grammar.repository = grammar.repository || {};\\n grammar.repository.$self = {\\n $vscodeTextmateLocation: grammar.$vscodeTextmateLocation,\\n patterns: grammar.patterns,\\n name: grammar.scopeName\\n };\\n grammar.repository.$base = base || grammar.repository.$self;\\n return grammar;\\n}\\nfunction handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {\\n if (captures.length === 0) {\\n return;\\n }\\n var len = Math.min(captures.length, captureIndices.length);\\n var localStack = [];\\n var maxEnd = captureIndices[0].end;\\n for (var i = 0; i < len; i++) {\\n var captureRule = captures[i];\\n if (captureRule === null) {\\n // Not interested\\n continue;\\n }\\n var captureIndex = captureIndices[i];\\n if (captureIndex.length === 0) {\\n // Nothing really captured\\n continue;\\n }\\n if (captureIndex.start > maxEnd) {\\n // Capture going beyond consumed string\\n break;\\n }\\n // pop captures while needed\\n while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {\\n // pop!\\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\\n localStack.pop();\\n }\\n if (localStack.length > 0) {\\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);\\n }\\n else {\\n lineTokens.produce(stack, captureIndex.start);\\n }\\n if (captureRule.retokenizeCapturedWithRuleId) {\\n // the capture requires additional matching\\n var scopeName = captureRule.getName(rule_1.getString(lineText), captureIndices);\\n var nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);\\n var contentName = captureRule.getContentName(rule_1.getString(lineText), captureIndices);\\n var contentNameScopesList = nameScopesList.push(grammar, contentName);\\n var stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, null, nameScopesList, contentNameScopesList);\\n _tokenizeString(grammar, rule_1.createOnigString(rule_1.getString(lineText).substring(0, captureIndex.end)), (isFirstLine && captureIndex.start === 0), captureIndex.start, stackClone, lineTokens);\\n continue;\\n }\\n var captureRuleScopeName = captureRule.getName(rule_1.getString(lineText), captureIndices);\\n if (captureRuleScopeName !== null) {\\n // push\\n var base = localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList;\\n var captureRuleScopesList = base.push(grammar, captureRuleScopeName);\\n localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));\\n }\\n }\\n while (localStack.length > 0) {\\n // pop!\\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\\n localStack.pop();\\n }\\n}\\nfunction debugCompiledRuleToString(ruleScanner) {\\n var r = [];\\n for (var i = 0, len = ruleScanner.rules.length; i < len; i++) {\\n r.push(' - ' + ruleScanner.rules[i] + ': ' + ruleScanner.debugRegExps[i]);\\n }\\n return r.join('\\\\n');\\n}\\nfunction matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\\n // The lower the better\\n var bestMatchRating = Number.MAX_VALUE;\\n var bestMatchCaptureIndices = null;\\n var bestMatchRuleId;\\n var bestMatchResultPriority = 0;\\n var scopes = stack.contentNameScopesList.generateScopes();\\n for (var i = 0, len = injections.length; i < len; i++) {\\n var injection = injections[i];\\n if (!injection.matcher(scopes)) {\\n // injection selector doesn't match stack\\n continue;\\n }\\n var ruleScanner = grammar.getRule(injection.ruleId).compile(grammar, null, isFirstLine, linePos === anchorPosition);\\n var matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' scanning for injections');\\n console.log(debugCompiledRuleToString(ruleScanner));\\n }\\n if (!matchResult) {\\n continue;\\n }\\n var matchRating = matchResult.captureIndices[0].start;\\n if (matchRating >= bestMatchRating) {\\n // Injections are sorted by priority, so the previous injection had a better or equal priority\\n continue;\\n }\\n bestMatchRating = matchRating;\\n bestMatchCaptureIndices = matchResult.captureIndices;\\n bestMatchRuleId = ruleScanner.rules[matchResult.index];\\n bestMatchResultPriority = injection.priority;\\n if (bestMatchRating === linePos) {\\n // No more need to look at the rest of the injections.\\n break;\\n }\\n }\\n if (bestMatchCaptureIndices) {\\n return {\\n priorityMatch: bestMatchResultPriority === -1,\\n captureIndices: bestMatchCaptureIndices,\\n matchedRuleId: bestMatchRuleId\\n };\\n }\\n return null;\\n}\\nfunction matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\\n var rule = stack.getRule(grammar);\\n var ruleScanner = rule.compile(grammar, stack.endRule, isFirstLine, linePos === anchorPosition);\\n var r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' scanning for');\\n console.log(debugCompiledRuleToString(ruleScanner));\\n }\\n if (r) {\\n return {\\n captureIndices: r.captureIndices,\\n matchedRuleId: ruleScanner.rules[r.index]\\n };\\n }\\n return null;\\n}\\nfunction matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\\n // Look for normal grammar rule\\n var matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\\n // Look for injected rules\\n var injections = grammar.getInjections();\\n if (injections.length === 0) {\\n // No injections whatsoever => early return\\n return matchResult;\\n }\\n var injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\\n if (!injectionResult) {\\n // No injections matched => early return\\n return matchResult;\\n }\\n if (!matchResult) {\\n // Only injections matched => early return\\n return injectionResult;\\n }\\n // Decide if `matchResult` or `injectionResult` should win\\n var matchResultScore = matchResult.captureIndices[0].start;\\n var injectionResultScore = injectionResult.captureIndices[0].start;\\n if (injectionResultScore < matchResultScore || (injectionResult.priorityMatch && injectionResultScore === matchResultScore)) {\\n // injection won!\\n return injectionResult;\\n }\\n return matchResult;\\n}\\n/**\\n * Walk the stack from bottom to top, and check each while condition in this order.\\n * If any fails, cut off the entire stack above the failed while condition. While conditions\\n * may also advance the linePosition.\\n */\\nfunction _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\\n var anchorPosition = -1;\\n var whileRules = [];\\n for (var node = stack; node; node = node.pop()) {\\n var nodeRule = node.getRule(grammar);\\n if (nodeRule instanceof rule_1.BeginWhileRule) {\\n whileRules.push({\\n rule: nodeRule,\\n stack: node\\n });\\n }\\n }\\n for (var whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {\\n var ruleScanner = whileRule.rule.compileWhile(grammar, whileRule.stack.endRule, isFirstLine, anchorPosition === linePos);\\n var r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' scanning for while rule');\\n console.log(debugCompiledRuleToString(ruleScanner));\\n }\\n if (r) {\\n var matchedRuleId = ruleScanner.rules[r.index];\\n if (matchedRuleId !== -2) {\\n // we shouldn't end up here\\n stack = whileRule.stack.pop();\\n break;\\n }\\n if (r.captureIndices && r.captureIndices.length) {\\n lineTokens.produce(whileRule.stack, r.captureIndices[0].start);\\n handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);\\n lineTokens.produce(whileRule.stack, r.captureIndices[0].end);\\n anchorPosition = r.captureIndices[0].end;\\n if (r.captureIndices[0].end > linePos) {\\n linePos = r.captureIndices[0].end;\\n isFirstLine = false;\\n }\\n }\\n }\\n else {\\n stack = whileRule.stack.pop();\\n break;\\n }\\n }\\n return { stack: stack, linePos: linePos, anchorPosition: anchorPosition, isFirstLine: isFirstLine };\\n}\\nfunction _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\\n var lineLength = rule_1.getString(lineText).length;\\n var STOP = false;\\n var whileCheckResult = _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens);\\n stack = whileCheckResult.stack;\\n linePos = whileCheckResult.linePos;\\n isFirstLine = whileCheckResult.isFirstLine;\\n var anchorPosition = whileCheckResult.anchorPosition;\\n while (!STOP) {\\n scanNext(); // potentially modifies linePos && anchorPosition\\n }\\n function scanNext() {\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log('');\\n console.log('@@scanNext: |' + rule_1.getString(lineText).replace(/\\\\n$/, '\\\\\\\\n').substr(linePos) + '|');\\n }\\n var r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\\n if (!r) {\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' no more matches.');\\n }\\n // No match\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n var captureIndices = r.captureIndices;\\n var matchedRuleId = r.matchedRuleId;\\n var hasAdvanced = (captureIndices && captureIndices.length > 0) ? (captureIndices[0].end > linePos) : false;\\n if (matchedRuleId === -1) {\\n // We matched the `end` for this rule => pop it\\n var poppedRule = stack.getRule(grammar);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' popping ' + poppedRule.debugName + ' - ' + poppedRule.debugEndRegExp);\\n }\\n lineTokens.produce(stack, captureIndices[0].start);\\n stack = stack.setContentNameScopesList(stack.nameScopesList);\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, poppedRule.endCaptures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n // pop\\n var popped = stack;\\n stack = stack.pop();\\n if (!hasAdvanced && popped.getEnterPos() === linePos) {\\n // Grammar pushed & popped a rule without advancing\\n console.error('[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing');\\n // See https://github.com/Microsoft/vscode-textmate/issues/12\\n // Let's assume this was a mistake by the grammar author and the intent was to continue in this state\\n stack = popped;\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n else {\\n // We matched a rule!\\n var _rule = grammar.getRule(matchedRuleId);\\n lineTokens.produce(stack, captureIndices[0].start);\\n var beforePush = stack;\\n // push it on the stack rule\\n var scopeName = _rule.getName(rule_1.getString(lineText), captureIndices);\\n var nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);\\n stack = stack.push(matchedRuleId, linePos, null, nameScopesList, nameScopesList);\\n if (_rule instanceof rule_1.BeginEndRule) {\\n var pushedRule = _rule;\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' pushing ' + pushedRule.debugName + ' - ' + pushedRule.debugBeginRegExp);\\n }\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n anchorPosition = captureIndices[0].end;\\n var contentName = pushedRule.getContentName(rule_1.getString(lineText), captureIndices);\\n var contentNameScopesList = nameScopesList.push(grammar, contentName);\\n stack = stack.setContentNameScopesList(contentNameScopesList);\\n if (pushedRule.endHasBackReferences) {\\n stack = stack.setEndRule(pushedRule.getEndWithResolvedBackReferences(rule_1.getString(lineText), captureIndices));\\n }\\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\\n // Grammar pushed the same rule without advancing\\n console.error('[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing');\\n stack = stack.pop();\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n else if (_rule instanceof rule_1.BeginWhileRule) {\\n var pushedRule = _rule;\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' pushing ' + pushedRule.debugName);\\n }\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n anchorPosition = captureIndices[0].end;\\n var contentName = pushedRule.getContentName(rule_1.getString(lineText), captureIndices);\\n var contentNameScopesList = nameScopesList.push(grammar, contentName);\\n stack = stack.setContentNameScopesList(contentNameScopesList);\\n if (pushedRule.whileHasBackReferences) {\\n stack = stack.setEndRule(pushedRule.getWhileWithResolvedBackReferences(rule_1.getString(lineText), captureIndices));\\n }\\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\\n // Grammar pushed the same rule without advancing\\n console.error('[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing');\\n stack = stack.pop();\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n else {\\n var matchingRule = _rule;\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' matched ' + matchingRule.debugName + ' - ' + matchingRule.debugMatchRegExp);\\n }\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, matchingRule.captures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n // pop rule immediately since it is a MatchRule\\n stack = stack.pop();\\n if (!hasAdvanced) {\\n // Grammar is not advancing, nor is it pushing/popping\\n console.error('[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping');\\n stack = stack.safePop();\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n }\\n if (captureIndices[0].end > linePos) {\\n // Advance stream\\n linePos = captureIndices[0].end;\\n isFirstLine = false;\\n }\\n }\\n return stack;\\n}\\nvar StackElementMetadata = /** @class */ (function () {\\n function StackElementMetadata() {\\n }\\n StackElementMetadata.toBinaryStr = function (metadata) {\\n var r = metadata.toString(2);\\n while (r.length < 32) {\\n r = '0' + r;\\n }\\n return r;\\n };\\n StackElementMetadata.printMetadata = function (metadata) {\\n var languageId = StackElementMetadata.getLanguageId(metadata);\\n var tokenType = StackElementMetadata.getTokenType(metadata);\\n var fontStyle = StackElementMetadata.getFontStyle(metadata);\\n var foreground = StackElementMetadata.getForeground(metadata);\\n var background = StackElementMetadata.getBackground(metadata);\\n console.log({\\n languageId: languageId,\\n tokenType: tokenType,\\n fontStyle: fontStyle,\\n foreground: foreground,\\n background: background,\\n });\\n };\\n StackElementMetadata.getLanguageId = function (metadata) {\\n return (metadata & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;\\n };\\n StackElementMetadata.getTokenType = function (metadata) {\\n return (metadata & 1792 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;\\n };\\n StackElementMetadata.getFontStyle = function (metadata) {\\n return (metadata & 14336 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;\\n };\\n StackElementMetadata.getForeground = function (metadata) {\\n return (metadata & 8372224 /* FOREGROUND_MASK */) >>> 14 /* FOREGROUND_OFFSET */;\\n };\\n StackElementMetadata.getBackground = function (metadata) {\\n return (metadata & 4286578688 /* BACKGROUND_MASK */) >>> 23 /* BACKGROUND_OFFSET */;\\n };\\n StackElementMetadata.set = function (metadata, languageId, tokenType, fontStyle, foreground, background) {\\n var _languageId = StackElementMetadata.getLanguageId(metadata);\\n var _tokenType = StackElementMetadata.getTokenType(metadata);\\n var _fontStyle = StackElementMetadata.getFontStyle(metadata);\\n var _foreground = StackElementMetadata.getForeground(metadata);\\n var _background = StackElementMetadata.getBackground(metadata);\\n if (languageId !== 0) {\\n _languageId = languageId;\\n }\\n if (tokenType !== 0 /* Other */) {\\n _tokenType = tokenType === 8 /* MetaEmbedded */ ? 0 /* Other */ : tokenType;\\n }\\n if (fontStyle !== -1 /* NotSet */) {\\n _fontStyle = fontStyle;\\n }\\n if (foreground !== 0) {\\n _foreground = foreground;\\n }\\n if (background !== 0) {\\n _background = background;\\n }\\n return ((_languageId << 0 /* LANGUAGEID_OFFSET */)\\n | (_tokenType << 8 /* TOKEN_TYPE_OFFSET */)\\n | (_fontStyle << 11 /* FONT_STYLE_OFFSET */)\\n | (_foreground << 14 /* FOREGROUND_OFFSET */)\\n | (_background << 23 /* BACKGROUND_OFFSET */)) >>> 0;\\n };\\n return StackElementMetadata;\\n}());\\nexports.StackElementMetadata = StackElementMetadata;\\nvar ScopeListElement = /** @class */ (function () {\\n function ScopeListElement(parent, scope, metadata) {\\n this.parent = parent;\\n this.scope = scope;\\n this.metadata = metadata;\\n }\\n ScopeListElement._equals = function (a, b) {\\n do {\\n if (a === b) {\\n return true;\\n }\\n if (a.scope !== b.scope || a.metadata !== b.metadata) {\\n return false;\\n }\\n // Go to previous pair\\n a = a.parent;\\n b = b.parent;\\n if (!a && !b) {\\n // End of list reached for both\\n return true;\\n }\\n if (!a || !b) {\\n // End of list reached only for one\\n return false;\\n }\\n } while (true);\\n };\\n ScopeListElement.prototype.equals = function (other) {\\n return ScopeListElement._equals(this, other);\\n };\\n ScopeListElement._matchesScope = function (scope, selector, selectorWithDot) {\\n return (selector === scope || scope.substring(0, selectorWithDot.length) === selectorWithDot);\\n };\\n ScopeListElement._matches = function (target, parentScopes) {\\n if (parentScopes === null) {\\n return true;\\n }\\n var len = parentScopes.length;\\n var index = 0;\\n var selector = parentScopes[index];\\n var selectorWithDot = selector + '.';\\n while (target) {\\n if (this._matchesScope(target.scope, selector, selectorWithDot)) {\\n index++;\\n if (index === len) {\\n return true;\\n }\\n selector = parentScopes[index];\\n selectorWithDot = selector + '.';\\n }\\n target = target.parent;\\n }\\n return false;\\n };\\n ScopeListElement.mergeMetadata = function (metadata, scopesList, source) {\\n if (source === null) {\\n return metadata;\\n }\\n var fontStyle = -1 /* NotSet */;\\n var foreground = 0;\\n var background = 0;\\n if (source.themeData !== null) {\\n // Find the first themeData that matches\\n for (var i = 0, len = source.themeData.length; i < len; i++) {\\n var themeData = source.themeData[i];\\n if (this._matches(scopesList, themeData.parentScopes)) {\\n fontStyle = themeData.fontStyle;\\n foreground = themeData.foreground;\\n background = themeData.background;\\n break;\\n }\\n }\\n }\\n return StackElementMetadata.set(metadata, source.languageId, source.tokenType, fontStyle, foreground, background);\\n };\\n ScopeListElement._push = function (target, grammar, scopes) {\\n for (var i = 0, len = scopes.length; i < len; i++) {\\n var scope = scopes[i];\\n var rawMetadata = grammar.getMetadataForScope(scope);\\n var metadata = ScopeListElement.mergeMetadata(target.metadata, target, rawMetadata);\\n target = new ScopeListElement(target, scope, metadata);\\n }\\n return target;\\n };\\n ScopeListElement.prototype.push = function (grammar, scope) {\\n if (scope === null) {\\n return this;\\n }\\n if (scope.indexOf(' ') >= 0) {\\n // there are multiple scopes to push\\n return ScopeListElement._push(this, grammar, scope.split(/ /g));\\n }\\n // there is a single scope to push\\n return ScopeListElement._push(this, grammar, [scope]);\\n };\\n ScopeListElement._generateScopes = function (scopesList) {\\n var result = [], resultLen = 0;\\n while (scopesList) {\\n result[resultLen++] = scopesList.scope;\\n scopesList = scopesList.parent;\\n }\\n result.reverse();\\n return result;\\n };\\n ScopeListElement.prototype.generateScopes = function () {\\n return ScopeListElement._generateScopes(this);\\n };\\n return ScopeListElement;\\n}());\\nexports.ScopeListElement = ScopeListElement;\\n/**\\n * Represents a \\\"pushed\\\" state on the stack (as a linked list element).\\n */\\nvar StackElement = /** @class */ (function () {\\n function StackElement(parent, ruleId, enterPos, endRule, nameScopesList, contentNameScopesList) {\\n this.parent = parent;\\n this.depth = (this.parent ? this.parent.depth + 1 : 1);\\n this.ruleId = ruleId;\\n this._enterPos = enterPos;\\n this.endRule = endRule;\\n this.nameScopesList = nameScopesList;\\n this.contentNameScopesList = contentNameScopesList;\\n }\\n /**\\n * A structural equals check. Does not take into account `scopes`.\\n */\\n StackElement._structuralEquals = function (a, b) {\\n do {\\n if (a === b) {\\n return true;\\n }\\n if (a.depth !== b.depth || a.ruleId !== b.ruleId || a.endRule !== b.endRule) {\\n return false;\\n }\\n // Go to previous pair\\n a = a.parent;\\n b = b.parent;\\n if (!a && !b) {\\n // End of list reached for both\\n return true;\\n }\\n if (!a || !b) {\\n // End of list reached only for one\\n return false;\\n }\\n } while (true);\\n };\\n StackElement._equals = function (a, b) {\\n if (a === b) {\\n return true;\\n }\\n if (!this._structuralEquals(a, b)) {\\n return false;\\n }\\n return a.contentNameScopesList.equals(b.contentNameScopesList);\\n };\\n StackElement.prototype.clone = function () {\\n return this;\\n };\\n StackElement.prototype.equals = function (other) {\\n if (other === null) {\\n return false;\\n }\\n return StackElement._equals(this, other);\\n };\\n StackElement._reset = function (el) {\\n while (el) {\\n el._enterPos = -1;\\n el = el.parent;\\n }\\n };\\n StackElement.prototype.reset = function () {\\n StackElement._reset(this);\\n };\\n StackElement.prototype.pop = function () {\\n return this.parent;\\n };\\n StackElement.prototype.safePop = function () {\\n if (this.parent) {\\n return this.parent;\\n }\\n return this;\\n };\\n StackElement.prototype.push = function (ruleId, enterPos, endRule, nameScopesList, contentNameScopesList) {\\n return new StackElement(this, ruleId, enterPos, endRule, nameScopesList, contentNameScopesList);\\n };\\n StackElement.prototype.getEnterPos = function () {\\n return this._enterPos;\\n };\\n StackElement.prototype.getRule = function (grammar) {\\n return grammar.getRule(this.ruleId);\\n };\\n StackElement.prototype._writeString = function (res, outIndex) {\\n if (this.parent) {\\n outIndex = this.parent._writeString(res, outIndex);\\n }\\n res[outIndex++] = \\\"(\\\" + this.ruleId + \\\", TODO-\\\" + this.nameScopesList + \\\", TODO-\\\" + this.contentNameScopesList + \\\")\\\";\\n return outIndex;\\n };\\n StackElement.prototype.toString = function () {\\n var r = [];\\n this._writeString(r, 0);\\n return '[' + r.join(',') + ']';\\n };\\n StackElement.prototype.setContentNameScopesList = function (contentNameScopesList) {\\n if (this.contentNameScopesList === contentNameScopesList) {\\n return this;\\n }\\n return this.parent.push(this.ruleId, this._enterPos, this.endRule, this.nameScopesList, contentNameScopesList);\\n };\\n StackElement.prototype.setEndRule = function (endRule) {\\n if (this.endRule === endRule) {\\n return this;\\n }\\n return new StackElement(this.parent, this.ruleId, this._enterPos, endRule, this.nameScopesList, this.contentNameScopesList);\\n };\\n StackElement.prototype.hasSameRuleAs = function (other) {\\n return this.ruleId === other.ruleId;\\n };\\n StackElement.NULL = new StackElement(null, 0, 0, null, null, null);\\n return StackElement;\\n}());\\nexports.StackElement = StackElement;\\nvar LocalStackElement = /** @class */ (function () {\\n function LocalStackElement(scopes, endPos) {\\n this.scopes = scopes;\\n this.endPos = endPos;\\n }\\n return LocalStackElement;\\n}());\\nexports.LocalStackElement = LocalStackElement;\\nvar LineTokens = /** @class */ (function () {\\n function LineTokens(emitBinaryTokens, lineText, tokenTypeOverrides) {\\n this._emitBinaryTokens = emitBinaryTokens;\\n this._tokenTypeOverrides = tokenTypeOverrides;\\n if (debug_1.IN_DEBUG_MODE) {\\n this._lineText = lineText;\\n }\\n if (this._emitBinaryTokens) {\\n this._binaryTokens = [];\\n }\\n else {\\n this._tokens = [];\\n }\\n this._lastTokenEndIndex = 0;\\n }\\n LineTokens.prototype.produce = function (stack, endIndex) {\\n this.produceFromScopes(stack.contentNameScopesList, endIndex);\\n };\\n LineTokens.prototype.produceFromScopes = function (scopesList, endIndex) {\\n if (this._lastTokenEndIndex >= endIndex) {\\n return;\\n }\\n if (this._emitBinaryTokens) {\\n var metadata = scopesList.metadata;\\n for (var _i = 0, _a = this._tokenTypeOverrides; _i < _a.length; _i++) {\\n var tokenType = _a[_i];\\n if (tokenType.matcher(scopesList.generateScopes())) {\\n metadata = StackElementMetadata.set(metadata, 0, toTemporaryType(tokenType.type), -1 /* NotSet */, 0, 0);\\n }\\n }\\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {\\n // no need to push a token with the same metadata\\n this._lastTokenEndIndex = endIndex;\\n return;\\n }\\n this._binaryTokens.push(this._lastTokenEndIndex);\\n this._binaryTokens.push(metadata);\\n this._lastTokenEndIndex = endIndex;\\n return;\\n }\\n var scopes = scopesList.generateScopes();\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' token: |' + this._lineText.substring(this._lastTokenEndIndex, endIndex).replace(/\\\\n$/, '\\\\\\\\n') + '|');\\n for (var k = 0; k < scopes.length; k++) {\\n console.log(' * ' + scopes[k]);\\n }\\n }\\n this._tokens.push({\\n startIndex: this._lastTokenEndIndex,\\n endIndex: endIndex,\\n // value: lineText.substring(lastTokenEndIndex, endIndex),\\n scopes: scopes\\n });\\n this._lastTokenEndIndex = endIndex;\\n };\\n LineTokens.prototype.getResult = function (stack, lineLength) {\\n if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) {\\n // pop produced token for newline\\n this._tokens.pop();\\n }\\n if (this._tokens.length === 0) {\\n this._lastTokenEndIndex = -1;\\n this.produce(stack, lineLength);\\n this._tokens[this._tokens.length - 1].startIndex = 0;\\n }\\n return this._tokens;\\n };\\n LineTokens.prototype.getBinaryResult = function (stack, lineLength) {\\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {\\n // pop produced token for newline\\n this._binaryTokens.pop();\\n this._binaryTokens.pop();\\n }\\n if (this._binaryTokens.length === 0) {\\n this._lastTokenEndIndex = -1;\\n this.produce(stack, lineLength);\\n this._binaryTokens[this._binaryTokens.length - 2] = 0;\\n }\\n var result = new Uint32Array(this._binaryTokens.length);\\n for (var i = 0, len = this._binaryTokens.length; i < len; i++) {\\n result[i] = this._binaryTokens[i];\\n }\\n return result;\\n };\\n return LineTokens;\\n}());\\nfunction toTemporaryType(standardType) {\\n switch (standardType) {\\n case 4 /* RegEx */:\\n return 4 /* RegEx */;\\n case 2 /* String */:\\n return 2 /* String */;\\n case 1 /* Comment */:\\n return 1 /* Comment */;\\n case 0 /* Other */:\\n default:\\n // `MetaEmbedded` is the same scope as `Other`\\n // but it overwrites existing token types in the stack.\\n return 8 /* MetaEmbedded */;\\n }\\n}\\n//# sourceMappingURL=grammar.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/grammar.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/grammarReader.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/grammarReader.js ***!\n \\************************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar plist = __webpack_require__(/*! fast-plist */ \\\"./node_modules/fast-plist/release/src/main.js\\\");\\nvar debug_1 = __webpack_require__(/*! ./debug */ \\\"./node_modules/monaco-textmate/dist/debug.js\\\");\\nvar json_1 = __webpack_require__(/*! ./json */ \\\"./node_modules/monaco-textmate/dist/json.js\\\");\\nfunction parseJSONGrammar(contents, filename) {\\n if (debug_1.CAPTURE_METADATA) {\\n return json_1.parse(contents, filename, true);\\n }\\n return JSON.parse(contents);\\n}\\nexports.parseJSONGrammar = parseJSONGrammar;\\nfunction parsePLISTGrammar(contents, filename) {\\n if (debug_1.CAPTURE_METADATA) {\\n return plist.parseWithLocation(contents, filename, '$vscodeTextmateLocation');\\n }\\n return plist.parse(contents);\\n}\\nexports.parsePLISTGrammar = parsePLISTGrammar;\\n//# sourceMappingURL=grammarReader.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/grammarReader.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/json.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/json.js ***!\n \\***************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nfunction doFail(streamState, msg) {\\n // console.log('Near offset ' + streamState.pos + ': ' + msg + ' ~~~' + streamState.source.substr(streamState.pos, 50) + '~~~');\\n throw new Error('Near offset ' + streamState.pos + ': ' + msg + ' ~~~' + streamState.source.substr(streamState.pos, 50) + '~~~');\\n}\\nfunction parse(source, filename, withMetadata) {\\n var streamState = new JSONStreamState(source);\\n var token = new JSONToken();\\n var state = 0 /* ROOT_STATE */;\\n var cur = null;\\n var stateStack = [];\\n var objStack = [];\\n function pushState() {\\n stateStack.push(state);\\n objStack.push(cur);\\n }\\n function popState() {\\n state = stateStack.pop();\\n cur = objStack.pop();\\n }\\n function fail(msg) {\\n doFail(streamState, msg);\\n }\\n while (nextJSONToken(streamState, token)) {\\n if (state === 0 /* ROOT_STATE */) {\\n if (cur !== null) {\\n fail('too many constructs in root');\\n }\\n if (token.type === 3 /* LEFT_CURLY_BRACKET */) {\\n cur = {};\\n if (withMetadata) {\\n cur.$vscodeTextmateLocation = token.toLocation(filename);\\n }\\n pushState();\\n state = 1 /* DICT_STATE */;\\n continue;\\n }\\n if (token.type === 2 /* LEFT_SQUARE_BRACKET */) {\\n cur = [];\\n pushState();\\n state = 4 /* ARR_STATE */;\\n continue;\\n }\\n fail('unexpected token in root');\\n }\\n if (state === 2 /* DICT_STATE_COMMA */) {\\n if (token.type === 5 /* RIGHT_CURLY_BRACKET */) {\\n popState();\\n continue;\\n }\\n if (token.type === 7 /* COMMA */) {\\n state = 3 /* DICT_STATE_NO_CLOSE */;\\n continue;\\n }\\n fail('expected , or }');\\n }\\n if (state === 1 /* DICT_STATE */ || state === 3 /* DICT_STATE_NO_CLOSE */) {\\n if (state === 1 /* DICT_STATE */ && token.type === 5 /* RIGHT_CURLY_BRACKET */) {\\n popState();\\n continue;\\n }\\n if (token.type === 1 /* STRING */) {\\n var keyValue = token.value;\\n if (!nextJSONToken(streamState, token) || token.type !== 6 /* COLON */) {\\n fail('expected colon');\\n }\\n if (!nextJSONToken(streamState, token)) {\\n fail('expected value');\\n }\\n state = 2 /* DICT_STATE_COMMA */;\\n if (token.type === 1 /* STRING */) {\\n cur[keyValue] = token.value;\\n continue;\\n }\\n if (token.type === 8 /* NULL */) {\\n cur[keyValue] = null;\\n continue;\\n }\\n if (token.type === 9 /* TRUE */) {\\n cur[keyValue] = true;\\n continue;\\n }\\n if (token.type === 10 /* FALSE */) {\\n cur[keyValue] = false;\\n continue;\\n }\\n if (token.type === 11 /* NUMBER */) {\\n cur[keyValue] = parseFloat(token.value);\\n continue;\\n }\\n if (token.type === 2 /* LEFT_SQUARE_BRACKET */) {\\n var newArr = [];\\n cur[keyValue] = newArr;\\n pushState();\\n state = 4 /* ARR_STATE */;\\n cur = newArr;\\n continue;\\n }\\n if (token.type === 3 /* LEFT_CURLY_BRACKET */) {\\n var newDict = {};\\n if (withMetadata) {\\n newDict.$vscodeTextmateLocation = token.toLocation(filename);\\n }\\n cur[keyValue] = newDict;\\n pushState();\\n state = 1 /* DICT_STATE */;\\n cur = newDict;\\n continue;\\n }\\n }\\n fail('unexpected token in dict');\\n }\\n if (state === 5 /* ARR_STATE_COMMA */) {\\n if (token.type === 4 /* RIGHT_SQUARE_BRACKET */) {\\n popState();\\n continue;\\n }\\n if (token.type === 7 /* COMMA */) {\\n state = 6 /* ARR_STATE_NO_CLOSE */;\\n continue;\\n }\\n fail('expected , or ]');\\n }\\n if (state === 4 /* ARR_STATE */ || state === 6 /* ARR_STATE_NO_CLOSE */) {\\n if (state === 4 /* ARR_STATE */ && token.type === 4 /* RIGHT_SQUARE_BRACKET */) {\\n popState();\\n continue;\\n }\\n state = 5 /* ARR_STATE_COMMA */;\\n if (token.type === 1 /* STRING */) {\\n cur.push(token.value);\\n continue;\\n }\\n if (token.type === 8 /* NULL */) {\\n cur.push(null);\\n continue;\\n }\\n if (token.type === 9 /* TRUE */) {\\n cur.push(true);\\n continue;\\n }\\n if (token.type === 10 /* FALSE */) {\\n cur.push(false);\\n continue;\\n }\\n if (token.type === 11 /* NUMBER */) {\\n cur.push(parseFloat(token.value));\\n continue;\\n }\\n if (token.type === 2 /* LEFT_SQUARE_BRACKET */) {\\n var newArr = [];\\n cur.push(newArr);\\n pushState();\\n state = 4 /* ARR_STATE */;\\n cur = newArr;\\n continue;\\n }\\n if (token.type === 3 /* LEFT_CURLY_BRACKET */) {\\n var newDict = {};\\n if (withMetadata) {\\n newDict.$vscodeTextmateLocation = token.toLocation(filename);\\n }\\n cur.push(newDict);\\n pushState();\\n state = 1 /* DICT_STATE */;\\n cur = newDict;\\n continue;\\n }\\n fail('unexpected token in array');\\n }\\n fail('unknown state');\\n }\\n if (objStack.length !== 0) {\\n fail('unclosed constructs');\\n }\\n return cur;\\n}\\nexports.parse = parse;\\nvar JSONStreamState = /** @class */ (function () {\\n function JSONStreamState(source) {\\n this.source = source;\\n this.pos = 0;\\n this.len = source.length;\\n this.line = 1;\\n this.char = 0;\\n }\\n return JSONStreamState;\\n}());\\nvar JSONToken = /** @class */ (function () {\\n function JSONToken() {\\n this.value = null;\\n this.offset = -1;\\n this.len = -1;\\n this.line = -1;\\n this.char = -1;\\n }\\n JSONToken.prototype.toLocation = function (filename) {\\n return {\\n filename: filename,\\n line: this.line,\\n char: this.char\\n };\\n };\\n return JSONToken;\\n}());\\n/**\\n * precondition: the string is known to be valid JSON (https://www.ietf.org/rfc/rfc4627.txt)\\n */\\nfunction nextJSONToken(_state, _out) {\\n _out.value = null;\\n _out.type = 0 /* UNKNOWN */;\\n _out.offset = -1;\\n _out.len = -1;\\n _out.line = -1;\\n _out.char = -1;\\n var source = _state.source;\\n var pos = _state.pos;\\n var len = _state.len;\\n var line = _state.line;\\n var char = _state.char;\\n //------------------------ skip whitespace\\n var chCode;\\n do {\\n if (pos >= len) {\\n return false; /*EOS*/\\n }\\n chCode = source.charCodeAt(pos);\\n if (chCode === 32 /* SPACE */ || chCode === 9 /* HORIZONTAL_TAB */ || chCode === 13 /* CARRIAGE_RETURN */) {\\n // regular whitespace\\n pos++;\\n char++;\\n continue;\\n }\\n if (chCode === 10 /* LINE_FEED */) {\\n // newline\\n pos++;\\n line++;\\n char = 0;\\n continue;\\n }\\n // not whitespace\\n break;\\n } while (true);\\n _out.offset = pos;\\n _out.line = line;\\n _out.char = char;\\n if (chCode === 34 /* QUOTATION_MARK */) {\\n //------------------------ strings\\n _out.type = 1 /* STRING */;\\n pos++;\\n char++;\\n do {\\n if (pos >= len) {\\n return false; /*EOS*/\\n }\\n chCode = source.charCodeAt(pos);\\n pos++;\\n char++;\\n if (chCode === 92 /* BACKSLASH */) {\\n // skip next char\\n pos++;\\n char++;\\n continue;\\n }\\n if (chCode === 34 /* QUOTATION_MARK */) {\\n // end of the string\\n break;\\n }\\n } while (true);\\n _out.value = source.substring(_out.offset + 1, pos - 1).replace(/\\\\\\\\u([0-9A-Fa-f]{4})/g, function (_, m0) {\\n return String.fromCodePoint(parseInt(m0, 16));\\n }).replace(/\\\\\\\\(.)/g, function (_, m0) {\\n switch (m0) {\\n case '\\\"': return '\\\"';\\n case '\\\\\\\\': return '\\\\\\\\';\\n case '/': return '/';\\n case 'b': return '\\\\b';\\n case 'f': return '\\\\f';\\n case 'n': return '\\\\n';\\n case 'r': return '\\\\r';\\n case 't': return '\\\\t';\\n default: doFail(_state, 'invalid escape sequence');\\n }\\n });\\n }\\n else if (chCode === 91 /* LEFT_SQUARE_BRACKET */) {\\n _out.type = 2 /* LEFT_SQUARE_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 123 /* LEFT_CURLY_BRACKET */) {\\n _out.type = 3 /* LEFT_CURLY_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 93 /* RIGHT_SQUARE_BRACKET */) {\\n _out.type = 4 /* RIGHT_SQUARE_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 125 /* RIGHT_CURLY_BRACKET */) {\\n _out.type = 5 /* RIGHT_CURLY_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 58 /* COLON */) {\\n _out.type = 6 /* COLON */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 44 /* COMMA */) {\\n _out.type = 7 /* COMMA */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 110 /* n */) {\\n //------------------------ null\\n _out.type = 8 /* NULL */;\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 117 /* u */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 108 /* l */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 108 /* l */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n }\\n else if (chCode === 116 /* t */) {\\n //------------------------ true\\n _out.type = 9 /* TRUE */;\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 114 /* r */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 117 /* u */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 101 /* e */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n }\\n else if (chCode === 102 /* f */) {\\n //------------------------ false\\n _out.type = 10 /* FALSE */;\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 97 /* a */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 108 /* l */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 115 /* s */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 101 /* e */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n }\\n else {\\n //------------------------ numbers\\n _out.type = 11 /* NUMBER */;\\n do {\\n if (pos >= len) {\\n return false; /*EOS*/\\n }\\n chCode = source.charCodeAt(pos);\\n if (chCode === 46 /* DOT */\\n || (chCode >= 48 /* D0 */ && chCode <= 57 /* D9 */)\\n || (chCode === 101 /* e */ || chCode === 69 /* E */)\\n || (chCode === 45 /* MINUS */ || chCode === 43 /* PLUS */)) {\\n // looks like a piece of a number\\n pos++;\\n char++;\\n continue;\\n }\\n // pos--; char--;\\n break;\\n } while (true);\\n }\\n _out.len = pos - _out.offset;\\n if (_out.value === null) {\\n _out.value = source.substr(_out.offset, _out.len);\\n }\\n _state.pos = pos;\\n _state.line = line;\\n _state.char = char;\\n // console.log('PRODUCING TOKEN: ', _out.value, JSONTokenType[_out.type]);\\n return true;\\n}\\n//# sourceMappingURL=json.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/json.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/main.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/main.js ***!\n \\***************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (this && this.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (_) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar registry_1 = __webpack_require__(/*! ./registry */ \\\"./node_modules/monaco-textmate/dist/registry.js\\\");\\nvar grammarReader_1 = __webpack_require__(/*! ./grammarReader */ \\\"./node_modules/monaco-textmate/dist/grammarReader.js\\\");\\nvar theme_1 = __webpack_require__(/*! ./theme */ \\\"./node_modules/monaco-textmate/dist/theme.js\\\");\\nvar grammar_1 = __webpack_require__(/*! ./grammar */ \\\"./node_modules/monaco-textmate/dist/grammar.js\\\");\\nvar DEFAULT_OPTIONS = {\\n getGrammarDefinition: function (scopeName) { return null; },\\n getInjections: function (scopeName) { return null; }\\n};\\n/**\\n * The registry that will hold all grammars.\\n */\\nvar Registry = /** @class */ (function () {\\n function Registry(locator) {\\n if (locator === void 0) { locator = DEFAULT_OPTIONS; }\\n this._locator = locator;\\n this._syncRegistry = new registry_1.SyncRegistry(theme_1.Theme.createFromRawTheme(locator.theme));\\n this.installationQueue = new Map();\\n }\\n /**\\n * Change the theme. Once called, no previous `ruleStack` should be used anymore.\\n */\\n Registry.prototype.setTheme = function (theme) {\\n this._syncRegistry.setTheme(theme_1.Theme.createFromRawTheme(theme));\\n };\\n /**\\n * Returns a lookup array for color ids.\\n */\\n Registry.prototype.getColorMap = function () {\\n return this._syncRegistry.getColorMap();\\n };\\n /**\\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\\n * Please do not use language id 0.\\n */\\n Registry.prototype.loadGrammarWithEmbeddedLanguages = function (initialScopeName, initialLanguage, embeddedLanguages) {\\n return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages: embeddedLanguages });\\n };\\n /**\\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\\n * Please do not use language id 0.\\n */\\n Registry.prototype.loadGrammarWithConfiguration = function (initialScopeName, initialLanguage, configuration) {\\n return __awaiter(this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, this._loadGrammar(initialScopeName)];\\n case 1:\\n _a.sent();\\n return [2 /*return*/, this.grammarForScopeName(initialScopeName, initialLanguage, configuration.embeddedLanguages, configuration.tokenTypes)];\\n }\\n });\\n });\\n };\\n /**\\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\\n */\\n Registry.prototype.loadGrammar = function (initialScopeName) {\\n return __awaiter(this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n return [2 /*return*/, this._loadGrammar(initialScopeName)];\\n });\\n });\\n };\\n Registry.prototype._loadGrammar = function (initialScopeName, dependentScope) {\\n if (dependentScope === void 0) { dependentScope = null; }\\n return __awaiter(this, void 0, void 0, function () {\\n var prom;\\n var _this = this;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n // already installed\\n if (this._syncRegistry.lookup(initialScopeName)) {\\n return [2 /*return*/, this.grammarForScopeName(initialScopeName)];\\n }\\n // installation in progress\\n if (this.installationQueue.has(initialScopeName)) {\\n return [2 /*return*/, this.installationQueue.get(initialScopeName)];\\n }\\n prom = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {\\n var grammarDefinition, rawGrammar, injections, deps;\\n var _this = this;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, this._locator.getGrammarDefinition(initialScopeName, dependentScope)];\\n case 1:\\n grammarDefinition = _a.sent();\\n if (!grammarDefinition) {\\n throw new Error(\\\"A tmGrammar load was requested but registry host failed to provide grammar definition\\\");\\n }\\n if ((grammarDefinition.format !== 'json' && grammarDefinition.format !== 'plist') ||\\n (grammarDefinition.format === 'json' && typeof grammarDefinition.content !== 'object' && typeof grammarDefinition.content !== 'string') ||\\n (grammarDefinition.format === 'plist' && typeof grammarDefinition.content !== 'string')) {\\n throw new TypeError('Grammar definition must be an object, either `{ content: string | object, format: \\\"json\\\" }` OR `{ content: string, format: \\\"plist\\\" }`)');\\n }\\n rawGrammar = grammarDefinition.format === 'json'\\n ? typeof grammarDefinition.content === 'string'\\n ? grammarReader_1.parseJSONGrammar(grammarDefinition.content, 'c://fakepath/grammar.json')\\n : grammarDefinition.content\\n : grammarReader_1.parsePLISTGrammar(grammarDefinition.content, 'c://fakepath/grammar.plist');\\n injections = (typeof this._locator.getInjections === 'function') && this._locator.getInjections(initialScopeName);\\n rawGrammar.scopeName = initialScopeName;\\n deps = this._syncRegistry.addGrammar(rawGrammar, injections);\\n return [4 /*yield*/, Promise.all(deps.map(function (scopeNameD) { return __awaiter(_this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n try {\\n return [2 /*return*/, this._loadGrammar(scopeNameD, initialScopeName)];\\n }\\n catch (error) {\\n throw new Error(\\\"While trying to load tmGrammar with scopeId: '\\\" + initialScopeName + \\\"', it's dependency (scopeId: \\\" + scopeNameD + \\\") loading errored: \\\" + error.message);\\n }\\n return [2 /*return*/];\\n });\\n }); }))];\\n case 2:\\n _a.sent();\\n resolve(this.grammarForScopeName(initialScopeName));\\n return [2 /*return*/];\\n }\\n });\\n }); });\\n this.installationQueue.set(initialScopeName, prom);\\n return [4 /*yield*/, prom];\\n case 1:\\n _a.sent();\\n this.installationQueue.delete(initialScopeName);\\n return [2 /*return*/, prom];\\n }\\n });\\n });\\n };\\n /**\\n * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`.\\n */\\n Registry.prototype.grammarForScopeName = function (scopeName, initialLanguage, embeddedLanguages, tokenTypes) {\\n if (initialLanguage === void 0) { initialLanguage = 0; }\\n if (embeddedLanguages === void 0) { embeddedLanguages = null; }\\n if (tokenTypes === void 0) { tokenTypes = null; }\\n return this._syncRegistry.grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes);\\n };\\n return Registry;\\n}());\\nexports.Registry = Registry;\\nexports.INITIAL = grammar_1.StackElement.NULL;\\n//# sourceMappingURL=main.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/main.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/matcher.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/matcher.js ***!\n \\******************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nfunction createMatchers(selector, matchesName) {\\n var results = [];\\n var tokenizer = newTokenizer(selector);\\n var token = tokenizer.next();\\n while (token !== null) {\\n var priority = 0;\\n if (token.length === 2 && token.charAt(1) === ':') {\\n switch (token.charAt(0)) {\\n case 'R':\\n priority = 1;\\n break;\\n case 'L':\\n priority = -1;\\n break;\\n default:\\n console.log(\\\"Unknown priority \\\" + token + \\\" in scope selector\\\");\\n }\\n token = tokenizer.next();\\n }\\n var matcher = parseConjunction();\\n if (matcher) {\\n results.push({ matcher: matcher, priority: priority });\\n }\\n if (token !== ',') {\\n break;\\n }\\n token = tokenizer.next();\\n }\\n return results;\\n function parseOperand() {\\n if (token === '-') {\\n token = tokenizer.next();\\n var expressionToNegate = parseOperand();\\n return function (matcherInput) { return expressionToNegate && !expressionToNegate(matcherInput); };\\n }\\n if (token === '(') {\\n token = tokenizer.next();\\n var expressionInParents = parseInnerExpression();\\n if (token === ')') {\\n token = tokenizer.next();\\n }\\n return expressionInParents;\\n }\\n if (isIdentifier(token)) {\\n var identifiers = [];\\n do {\\n identifiers.push(token);\\n token = tokenizer.next();\\n } while (isIdentifier(token));\\n return function (matcherInput) { return matchesName(identifiers, matcherInput); };\\n }\\n return null;\\n }\\n function parseConjunction() {\\n var matchers = [];\\n var matcher = parseOperand();\\n while (matcher) {\\n matchers.push(matcher);\\n matcher = parseOperand();\\n }\\n return function (matcherInput) { return matchers.every(function (matcher) { return matcher(matcherInput); }); }; // and\\n }\\n function parseInnerExpression() {\\n var matchers = [];\\n var matcher = parseConjunction();\\n while (matcher) {\\n matchers.push(matcher);\\n if (token === '|' || token === ',') {\\n do {\\n token = tokenizer.next();\\n } while (token === '|' || token === ','); // ignore subsequent commas\\n }\\n else {\\n break;\\n }\\n matcher = parseConjunction();\\n }\\n return function (matcherInput) { return matchers.some(function (matcher) { return matcher(matcherInput); }); }; // or\\n }\\n}\\nexports.createMatchers = createMatchers;\\nfunction isIdentifier(token) {\\n return token && token.match(/[\\\\w\\\\.:]+/);\\n}\\nfunction newTokenizer(input) {\\n var regex = /([LR]:|[\\\\w\\\\.:][\\\\w\\\\.:\\\\-]*|[\\\\,\\\\|\\\\-\\\\(\\\\)])/g;\\n var match = regex.exec(input);\\n return {\\n next: function () {\\n if (!match) {\\n return null;\\n }\\n var res = match[0];\\n match = regex.exec(input);\\n return res;\\n }\\n };\\n}\\n//# sourceMappingURL=matcher.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/matcher.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/registry.js\":\n/*!*******************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/registry.js ***!\n \\*******************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar grammar_1 = __webpack_require__(/*! ./grammar */ \\\"./node_modules/monaco-textmate/dist/grammar.js\\\");\\nvar SyncRegistry = /** @class */ (function () {\\n function SyncRegistry(theme) {\\n this._theme = theme;\\n this._grammars = {};\\n this._rawGrammars = {};\\n this._injectionGrammars = {};\\n }\\n SyncRegistry.prototype.setTheme = function (theme) {\\n var _this = this;\\n this._theme = theme;\\n Object.keys(this._grammars).forEach(function (scopeName) {\\n var grammar = _this._grammars[scopeName];\\n grammar.onDidChangeTheme();\\n });\\n };\\n SyncRegistry.prototype.getColorMap = function () {\\n return this._theme.getColorMap();\\n };\\n /**\\n * Add `grammar` to registry and return a list of referenced scope names\\n */\\n SyncRegistry.prototype.addGrammar = function (grammar, injectionScopeNames) {\\n this._rawGrammars[grammar.scopeName] = grammar;\\n var includedScopes = {};\\n grammar_1.collectIncludedScopes(includedScopes, grammar);\\n if (injectionScopeNames) {\\n this._injectionGrammars[grammar.scopeName] = injectionScopeNames;\\n injectionScopeNames.forEach(function (scopeName) {\\n includedScopes[scopeName] = true;\\n });\\n }\\n return Object.keys(includedScopes);\\n };\\n /**\\n * Lookup a raw grammar.\\n */\\n SyncRegistry.prototype.lookup = function (scopeName) {\\n return this._rawGrammars[scopeName];\\n };\\n /**\\n * Returns the injections for the given grammar\\n */\\n SyncRegistry.prototype.injections = function (targetScope) {\\n return this._injectionGrammars[targetScope];\\n };\\n /**\\n * Get the default theme settings\\n */\\n SyncRegistry.prototype.getDefaults = function () {\\n return this._theme.getDefaults();\\n };\\n /**\\n * Match a scope in the theme.\\n */\\n SyncRegistry.prototype.themeMatch = function (scopeName) {\\n return this._theme.match(scopeName);\\n };\\n /**\\n * Lookup a grammar.\\n */\\n SyncRegistry.prototype.grammarForScopeName = function (scopeName, initialLanguage, embeddedLanguages, tokenTypes) {\\n if (!this._grammars[scopeName]) {\\n var rawGrammar = this._rawGrammars[scopeName];\\n if (!rawGrammar) {\\n return null;\\n }\\n this._grammars[scopeName] = grammar_1.createGrammar(rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, this);\\n }\\n return this._grammars[scopeName];\\n };\\n return SyncRegistry;\\n}());\\nexports.SyncRegistry = SyncRegistry;\\n//# sourceMappingURL=registry.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/registry.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/rule.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/rule.js ***!\n \\***************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nvar __extends = (this && this.__extends) || (function () {\\n var extendStatics = Object.setPrototypeOf ||\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\\n return function (d, b) {\\n extendStatics(d, b);\\n function __() { this.constructor = d; }\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\n };\\n})();\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar path = __webpack_require__(/*! path */ \\\"./node_modules/path/path.js\\\");\\nvar utils_1 = __webpack_require__(/*! ./utils */ \\\"./node_modules/monaco-textmate/dist/utils.js\\\");\\nvar onigasm_1 = __webpack_require__(/*! onigasm */ \\\"./node_modules/onigasm/lib/index.js\\\");\\nvar HAS_BACK_REFERENCES = /\\\\\\\\(\\\\d+)/;\\nvar BACK_REFERENCING_END = /\\\\\\\\(\\\\d+)/g;\\nvar Rule = /** @class */ (function () {\\n function Rule($location, id, name, contentName) {\\n this.$location = $location;\\n this.id = id;\\n this._name = name || null;\\n this._nameIsCapturing = utils_1.RegexSource.hasCaptures(this._name);\\n this._contentName = contentName || null;\\n this._contentNameIsCapturing = utils_1.RegexSource.hasCaptures(this._contentName);\\n }\\n Object.defineProperty(Rule.prototype, \\\"debugName\\\", {\\n get: function () {\\n return this.constructor.name + \\\"#\\\" + this.id + \\\" @ \\\" + path.basename(this.$location.filename) + \\\":\\\" + this.$location.line;\\n },\\n enumerable: true,\\n configurable: true\\n });\\n Rule.prototype.getName = function (lineText, captureIndices) {\\n if (!this._nameIsCapturing) {\\n return this._name;\\n }\\n return utils_1.RegexSource.replaceCaptures(this._name, lineText, captureIndices);\\n };\\n Rule.prototype.getContentName = function (lineText, captureIndices) {\\n if (!this._contentNameIsCapturing) {\\n return this._contentName;\\n }\\n return utils_1.RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);\\n };\\n Rule.prototype.collectPatternsRecursive = function (grammar, out, isFirst) {\\n throw new Error('Implement me!');\\n };\\n Rule.prototype.compile = function (grammar, endRegexSource, allowA, allowG) {\\n throw new Error('Implement me!');\\n };\\n return Rule;\\n}());\\nexports.Rule = Rule;\\nvar CaptureRule = /** @class */ (function (_super) {\\n __extends(CaptureRule, _super);\\n function CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId) {\\n var _this = _super.call(this, $location, id, name, contentName) || this;\\n _this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;\\n return _this;\\n }\\n return CaptureRule;\\n}(Rule));\\nexports.CaptureRule = CaptureRule;\\nvar RegExpSource = /** @class */ (function () {\\n function RegExpSource(regExpSource, ruleId, handleAnchors) {\\n if (handleAnchors === void 0) { handleAnchors = true; }\\n if (handleAnchors) {\\n this._handleAnchors(regExpSource);\\n }\\n else {\\n this.source = regExpSource;\\n this.hasAnchor = false;\\n }\\n if (this.hasAnchor) {\\n this._anchorCache = this._buildAnchorCache();\\n }\\n this.ruleId = ruleId;\\n this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source);\\n // console.log('input: ' + regExpSource + ' => ' + this.source + ', ' + this.hasAnchor);\\n }\\n RegExpSource.prototype.clone = function () {\\n return new RegExpSource(this.source, this.ruleId, true);\\n };\\n RegExpSource.prototype.setSource = function (newSource) {\\n if (this.source === newSource) {\\n return;\\n }\\n this.source = newSource;\\n if (this.hasAnchor) {\\n this._anchorCache = this._buildAnchorCache();\\n }\\n };\\n RegExpSource.prototype._handleAnchors = function (regExpSource) {\\n if (regExpSource) {\\n var pos = void 0, len = void 0, ch = void 0, nextCh = void 0, lastPushedPos = 0, output = [];\\n var hasAnchor = false;\\n for (pos = 0, len = regExpSource.length; pos < len; pos++) {\\n ch = regExpSource.charAt(pos);\\n if (ch === '\\\\\\\\') {\\n if (pos + 1 < len) {\\n nextCh = regExpSource.charAt(pos + 1);\\n if (nextCh === 'z') {\\n output.push(regExpSource.substring(lastPushedPos, pos));\\n output.push('$(?!\\\\\\\\n)(? maximumCaptureId) {\\n maximumCaptureId = numericCaptureId;\\n }\\n }\\n // Initialize result\\n for (i = 0; i <= maximumCaptureId; i++) {\\n r[i] = null;\\n }\\n // Fill out result\\n for (captureId in captures) {\\n if (captureId === '$vscodeTextmateLocation') {\\n continue;\\n }\\n numericCaptureId = parseInt(captureId, 10);\\n var retokenizeCapturedWithRuleId = 0;\\n if (captures[captureId].patterns) {\\n retokenizeCapturedWithRuleId = RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);\\n }\\n r[numericCaptureId] = RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);\\n }\\n }\\n return r;\\n };\\n RuleFactory._compilePatterns = function (patterns, helper, repository) {\\n var r = [], pattern, i, len, patternId, externalGrammar, rule, skipRule;\\n if (patterns) {\\n for (i = 0, len = patterns.length; i < len; i++) {\\n pattern = patterns[i];\\n patternId = -1;\\n if (pattern.include) {\\n if (pattern.include.charAt(0) === '#') {\\n // Local include found in `repository`\\n var localIncludedRule = repository[pattern.include.substr(1)];\\n if (localIncludedRule) {\\n patternId = RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);\\n }\\n else {\\n // console.warn('CANNOT find rule for scopeName: ' + pattern.include + ', I am: ', repository['$base'].name);\\n }\\n }\\n else if (pattern.include === '$base' || pattern.include === '$self') {\\n // Special include also found in `repository`\\n patternId = RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);\\n }\\n else {\\n var externalGrammarName = null, externalGrammarInclude = null, sharpIndex = pattern.include.indexOf('#');\\n if (sharpIndex >= 0) {\\n externalGrammarName = pattern.include.substring(0, sharpIndex);\\n externalGrammarInclude = pattern.include.substring(sharpIndex + 1);\\n }\\n else {\\n externalGrammarName = pattern.include;\\n }\\n // External include\\n externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);\\n if (externalGrammar) {\\n if (externalGrammarInclude) {\\n var externalIncludedRule = externalGrammar.repository[externalGrammarInclude];\\n if (externalIncludedRule) {\\n patternId = RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);\\n }\\n else {\\n // console.warn('CANNOT find rule for scopeName: ' + pattern.include + ', I am: ', repository['$base'].name);\\n }\\n }\\n else {\\n patternId = RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);\\n }\\n }\\n else {\\n // console.warn('CANNOT find grammar for scopeName: ' + pattern.include + ', I am: ', repository['$base'].name);\\n }\\n }\\n }\\n else {\\n patternId = RuleFactory.getCompiledRuleId(pattern, helper, repository);\\n }\\n if (patternId !== -1) {\\n rule = helper.getRule(patternId);\\n skipRule = false;\\n if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {\\n if (rule.hasMissingPatterns && rule.patterns.length === 0) {\\n skipRule = true;\\n }\\n }\\n if (skipRule) {\\n // console.log('REMOVING RULE ENTIRELY DUE TO EMPTY PATTERNS THAT ARE MISSING');\\n continue;\\n }\\n r.push(patternId);\\n }\\n }\\n }\\n return {\\n patterns: r,\\n hasMissingPatterns: ((patterns ? patterns.length : 0) !== r.length)\\n };\\n };\\n return RuleFactory;\\n}());\\nexports.RuleFactory = RuleFactory;\\n//# sourceMappingURL=rule.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/rule.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/theme.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/theme.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar ParsedThemeRule = /** @class */ (function () {\\n function ParsedThemeRule(scope, parentScopes, index, fontStyle, foreground, background) {\\n this.scope = scope;\\n this.parentScopes = parentScopes;\\n this.index = index;\\n this.fontStyle = fontStyle;\\n this.foreground = foreground;\\n this.background = background;\\n }\\n return ParsedThemeRule;\\n}());\\nexports.ParsedThemeRule = ParsedThemeRule;\\nfunction isValidHexColor(hex) {\\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\\n // #rrggbb\\n return true;\\n }\\n if (/^#[0-9a-f]{8}$/i.test(hex)) {\\n // #rrggbbaa\\n return true;\\n }\\n if (/^#[0-9a-f]{3}$/i.test(hex)) {\\n // #rgb\\n return true;\\n }\\n if (/^#[0-9a-f]{4}$/i.test(hex)) {\\n // #rgba\\n return true;\\n }\\n return false;\\n}\\n/**\\n * Parse a raw theme into rules.\\n */\\nfunction parseTheme(source) {\\n if (!source) {\\n return [];\\n }\\n if (!source.settings || !Array.isArray(source.settings)) {\\n return [];\\n }\\n var settings = source.settings;\\n var result = [], resultLen = 0;\\n for (var i = 0, len = settings.length; i < len; i++) {\\n var entry = settings[i];\\n if (!entry.settings) {\\n continue;\\n }\\n var scopes = void 0;\\n if (typeof entry.scope === 'string') {\\n var _scope = entry.scope;\\n // remove leading commas\\n _scope = _scope.replace(/^[,]+/, '');\\n // remove trailing commans\\n _scope = _scope.replace(/[,]+$/, '');\\n scopes = _scope.split(',');\\n }\\n else if (Array.isArray(entry.scope)) {\\n scopes = entry.scope;\\n }\\n else {\\n scopes = [''];\\n }\\n var fontStyle = -1 /* NotSet */;\\n if (typeof entry.settings.fontStyle === 'string') {\\n fontStyle = 0 /* None */;\\n var segments = entry.settings.fontStyle.split(' ');\\n for (var j = 0, lenJ = segments.length; j < lenJ; j++) {\\n var segment = segments[j];\\n switch (segment) {\\n case 'italic':\\n fontStyle = fontStyle | 1 /* Italic */;\\n break;\\n case 'bold':\\n fontStyle = fontStyle | 2 /* Bold */;\\n break;\\n case 'underline':\\n fontStyle = fontStyle | 4 /* Underline */;\\n break;\\n }\\n }\\n }\\n var foreground = null;\\n if (typeof entry.settings.foreground === 'string' && isValidHexColor(entry.settings.foreground)) {\\n foreground = entry.settings.foreground;\\n }\\n var background = null;\\n if (typeof entry.settings.background === 'string' && isValidHexColor(entry.settings.background)) {\\n background = entry.settings.background;\\n }\\n for (var j = 0, lenJ = scopes.length; j < lenJ; j++) {\\n var _scope = scopes[j].trim();\\n var segments = _scope.split(' ');\\n var scope = segments[segments.length - 1];\\n var parentScopes = null;\\n if (segments.length > 1) {\\n parentScopes = segments.slice(0, segments.length - 1);\\n parentScopes.reverse();\\n }\\n result[resultLen++] = new ParsedThemeRule(scope, parentScopes, i, fontStyle, foreground, background);\\n }\\n }\\n return result;\\n}\\nexports.parseTheme = parseTheme;\\n/**\\n * Resolve rules (i.e. inheritance).\\n */\\nfunction resolveParsedThemeRules(parsedThemeRules) {\\n // Sort rules lexicographically, and then by index if necessary\\n parsedThemeRules.sort(function (a, b) {\\n var r = strcmp(a.scope, b.scope);\\n if (r !== 0) {\\n return r;\\n }\\n r = strArrCmp(a.parentScopes, b.parentScopes);\\n if (r !== 0) {\\n return r;\\n }\\n return a.index - b.index;\\n });\\n // Determine defaults\\n var defaultFontStyle = 0 /* None */;\\n var defaultForeground = '#000000';\\n var defaultBackground = '#ffffff';\\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === '') {\\n var incomingDefaults = parsedThemeRules.shift();\\n if (incomingDefaults.fontStyle !== -1 /* NotSet */) {\\n defaultFontStyle = incomingDefaults.fontStyle;\\n }\\n if (incomingDefaults.foreground !== null) {\\n defaultForeground = incomingDefaults.foreground;\\n }\\n if (incomingDefaults.background !== null) {\\n defaultBackground = incomingDefaults.background;\\n }\\n }\\n var colorMap = new ColorMap();\\n var defaults = new ThemeTrieElementRule(0, null, defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));\\n var root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1 /* NotSet */, 0, 0), []);\\n for (var i = 0, len = parsedThemeRules.length; i < len; i++) {\\n var rule = parsedThemeRules[i];\\n root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\\n }\\n return new Theme(colorMap, defaults, root);\\n}\\nvar ColorMap = /** @class */ (function () {\\n function ColorMap() {\\n this._lastColorId = 0;\\n this._id2color = [];\\n this._color2id = Object.create(null);\\n }\\n ColorMap.prototype.getId = function (color) {\\n if (color === null) {\\n return 0;\\n }\\n color = color.toUpperCase();\\n var value = this._color2id[color];\\n if (value) {\\n return value;\\n }\\n value = ++this._lastColorId;\\n this._color2id[color] = value;\\n this._id2color[value] = color;\\n return value;\\n };\\n ColorMap.prototype.getColorMap = function () {\\n return this._id2color.slice(0);\\n };\\n return ColorMap;\\n}());\\nexports.ColorMap = ColorMap;\\nvar Theme = /** @class */ (function () {\\n function Theme(colorMap, defaults, root) {\\n this._colorMap = colorMap;\\n this._root = root;\\n this._defaults = defaults;\\n this._cache = {};\\n }\\n Theme.createFromRawTheme = function (source) {\\n return this.createFromParsedTheme(parseTheme(source));\\n };\\n Theme.createFromParsedTheme = function (source) {\\n return resolveParsedThemeRules(source);\\n };\\n Theme.prototype.getColorMap = function () {\\n return this._colorMap.getColorMap();\\n };\\n Theme.prototype.getDefaults = function () {\\n return this._defaults;\\n };\\n Theme.prototype.match = function (scopeName) {\\n if (!this._cache.hasOwnProperty(scopeName)) {\\n this._cache[scopeName] = this._root.match(scopeName);\\n }\\n return this._cache[scopeName];\\n };\\n return Theme;\\n}());\\nexports.Theme = Theme;\\nfunction strcmp(a, b) {\\n if (a < b) {\\n return -1;\\n }\\n if (a > b) {\\n return 1;\\n }\\n return 0;\\n}\\nexports.strcmp = strcmp;\\nfunction strArrCmp(a, b) {\\n if (a === null && b === null) {\\n return 0;\\n }\\n if (!a) {\\n return -1;\\n }\\n if (!b) {\\n return 1;\\n }\\n var len1 = a.length;\\n var len2 = b.length;\\n if (len1 === len2) {\\n for (var i = 0; i < len1; i++) {\\n var res = strcmp(a[i], b[i]);\\n if (res !== 0) {\\n return res;\\n }\\n }\\n return 0;\\n }\\n return len1 - len2;\\n}\\nexports.strArrCmp = strArrCmp;\\nvar ThemeTrieElementRule = /** @class */ (function () {\\n function ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background) {\\n this.scopeDepth = scopeDepth;\\n this.parentScopes = parentScopes;\\n this.fontStyle = fontStyle;\\n this.foreground = foreground;\\n this.background = background;\\n }\\n ThemeTrieElementRule.prototype.clone = function () {\\n return new ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);\\n };\\n ThemeTrieElementRule.cloneArr = function (arr) {\\n var r = [];\\n for (var i = 0, len = arr.length; i < len; i++) {\\n r[i] = arr[i].clone();\\n }\\n return r;\\n };\\n ThemeTrieElementRule.prototype.acceptOverwrite = function (scopeDepth, fontStyle, foreground, background) {\\n if (this.scopeDepth > scopeDepth) {\\n console.log('how did this happen?');\\n }\\n else {\\n this.scopeDepth = scopeDepth;\\n }\\n // console.log('TODO -> my depth: ' + this.scopeDepth + ', overwriting depth: ' + scopeDepth);\\n if (fontStyle !== -1 /* NotSet */) {\\n this.fontStyle = fontStyle;\\n }\\n if (foreground !== 0) {\\n this.foreground = foreground;\\n }\\n if (background !== 0) {\\n this.background = background;\\n }\\n };\\n return ThemeTrieElementRule;\\n}());\\nexports.ThemeTrieElementRule = ThemeTrieElementRule;\\nvar ThemeTrieElement = /** @class */ (function () {\\n function ThemeTrieElement(mainRule, rulesWithParentScopes, children) {\\n if (rulesWithParentScopes === void 0) { rulesWithParentScopes = []; }\\n if (children === void 0) { children = {}; }\\n this._mainRule = mainRule;\\n this._rulesWithParentScopes = rulesWithParentScopes;\\n this._children = children;\\n }\\n ThemeTrieElement._sortBySpecificity = function (arr) {\\n if (arr.length === 1) {\\n return arr;\\n }\\n arr.sort(this._cmpBySpecificity);\\n return arr;\\n };\\n ThemeTrieElement._cmpBySpecificity = function (a, b) {\\n if (a.scopeDepth === b.scopeDepth) {\\n var aParentScopes = a.parentScopes;\\n var bParentScopes = b.parentScopes;\\n var aParentScopesLen = aParentScopes === null ? 0 : aParentScopes.length;\\n var bParentScopesLen = bParentScopes === null ? 0 : bParentScopes.length;\\n if (aParentScopesLen === bParentScopesLen) {\\n for (var i = 0; i < aParentScopesLen; i++) {\\n var aLen = aParentScopes[i].length;\\n var bLen = bParentScopes[i].length;\\n if (aLen !== bLen) {\\n return bLen - aLen;\\n }\\n }\\n }\\n return bParentScopesLen - aParentScopesLen;\\n }\\n return b.scopeDepth - a.scopeDepth;\\n };\\n ThemeTrieElement.prototype.match = function (scope) {\\n if (scope === '') {\\n return ThemeTrieElement._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));\\n }\\n var dotIndex = scope.indexOf('.');\\n var head;\\n var tail;\\n if (dotIndex === -1) {\\n head = scope;\\n tail = '';\\n }\\n else {\\n head = scope.substring(0, dotIndex);\\n tail = scope.substring(dotIndex + 1);\\n }\\n if (this._children.hasOwnProperty(head)) {\\n return this._children[head].match(tail);\\n }\\n return ThemeTrieElement._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));\\n };\\n ThemeTrieElement.prototype.insert = function (scopeDepth, scope, parentScopes, fontStyle, foreground, background) {\\n if (scope === '') {\\n this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);\\n return;\\n }\\n var dotIndex = scope.indexOf('.');\\n var head;\\n var tail;\\n if (dotIndex === -1) {\\n head = scope;\\n tail = '';\\n }\\n else {\\n head = scope.substring(0, dotIndex);\\n tail = scope.substring(dotIndex + 1);\\n }\\n var child;\\n if (this._children.hasOwnProperty(head)) {\\n child = this._children[head];\\n }\\n else {\\n child = new ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));\\n this._children[head] = child;\\n }\\n child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);\\n };\\n ThemeTrieElement.prototype._doInsertHere = function (scopeDepth, parentScopes, fontStyle, foreground, background) {\\n if (parentScopes === null) {\\n // Merge into the main rule\\n this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\\n return;\\n }\\n // Try to merge into existing rule\\n for (var i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {\\n var rule = this._rulesWithParentScopes[i];\\n if (strArrCmp(rule.parentScopes, parentScopes) === 0) {\\n // bingo! => we get to merge this into an existing one\\n rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\\n return;\\n }\\n }\\n // Must add a new rule\\n // Inherit from main rule\\n if (fontStyle === -1 /* NotSet */) {\\n fontStyle = this._mainRule.fontStyle;\\n }\\n if (foreground === 0) {\\n foreground = this._mainRule.foreground;\\n }\\n if (background === 0) {\\n background = this._mainRule.background;\\n }\\n this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));\\n };\\n return ThemeTrieElement;\\n}());\\nexports.ThemeTrieElement = ThemeTrieElement;\\n//# sourceMappingURL=theme.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/theme.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/utils.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/utils.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nfunction clone(something) {\\n return doClone(something);\\n}\\nexports.clone = clone;\\nfunction doClone(something) {\\n if (Array.isArray(something)) {\\n return cloneArray(something);\\n }\\n if (typeof something === 'object') {\\n return cloneObj(something);\\n }\\n return something;\\n}\\nfunction cloneArray(arr) {\\n var r = [];\\n for (var i = 0, len = arr.length; i < len; i++) {\\n r[i] = doClone(arr[i]);\\n }\\n return r;\\n}\\nfunction cloneObj(obj) {\\n var r = {};\\n for (var key in obj) {\\n r[key] = doClone(obj[key]);\\n }\\n return r;\\n}\\nfunction mergeObjects(target) {\\n var sources = [];\\n for (var _i = 1; _i < arguments.length; _i++) {\\n sources[_i - 1] = arguments[_i];\\n }\\n sources.forEach(function (source) {\\n for (var key in source) {\\n target[key] = source[key];\\n }\\n });\\n return target;\\n}\\nexports.mergeObjects = mergeObjects;\\nvar CAPTURING_REGEX_SOURCE = /\\\\$(\\\\d+)|\\\\${(\\\\d+):\\\\/(downcase|upcase)}/;\\nvar RegexSource = /** @class */ (function () {\\n function RegexSource() {\\n }\\n RegexSource.hasCaptures = function (regexSource) {\\n return CAPTURING_REGEX_SOURCE.test(regexSource);\\n };\\n RegexSource.replaceCaptures = function (regexSource, captureSource, captureIndices) {\\n return regexSource.replace(CAPTURING_REGEX_SOURCE, function (match, index, commandIndex, command) {\\n var capture = captureIndices[parseInt(index || commandIndex, 10)];\\n if (capture) {\\n var result = captureSource.substring(capture.start, capture.end);\\n // Remove leading dots that would make the selector invalid\\n while (result[0] === '.') {\\n result = result.substring(1);\\n }\\n switch (command) {\\n case 'downcase':\\n return result.toLowerCase();\\n case 'upcase':\\n return result.toUpperCase();\\n default:\\n return result;\\n }\\n }\\n else {\\n return match;\\n }\\n });\\n };\\n return RegexSource;\\n}());\\nexports.RegexSource = RegexSource;\\n//# sourceMappingURL=utils.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/utils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/object-assign/index.js\":\n/*!*********************************************!*\\\n !*** ./node_modules/object-assign/index.js ***!\n \\*********************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"/*\\nobject-assign\\n(c) Sindre Sorhus\\n@license MIT\\n*/\\n\\n\\n/* eslint-disable no-unused-vars */\\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\\n\\nfunction toObject(val) {\\n\\tif (val === null || val === undefined) {\\n\\t\\tthrow new TypeError('Object.assign cannot be called with null or undefined');\\n\\t}\\n\\n\\treturn Object(val);\\n}\\n\\nfunction shouldUseNative() {\\n\\ttry {\\n\\t\\tif (!Object.assign) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// Detect buggy property enumeration order in older V8 versions.\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\\n\\t\\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\\n\\t\\ttest1[5] = 'de';\\n\\t\\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\\n\\t\\tvar test2 = {};\\n\\t\\tfor (var i = 0; i < 10; i++) {\\n\\t\\t\\ttest2['_' + String.fromCharCode(i)] = i;\\n\\t\\t}\\n\\t\\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\\n\\t\\t\\treturn test2[n];\\n\\t\\t});\\n\\t\\tif (order2.join('') !== '0123456789') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\\n\\t\\tvar test3 = {};\\n\\t\\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\\n\\t\\t\\ttest3[letter] = letter;\\n\\t\\t});\\n\\t\\tif (Object.keys(Object.assign({}, test3)).join('') !==\\n\\t\\t\\t\\t'abcdefghijklmnopqrst') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t} catch (err) {\\n\\t\\t// We don't expect any of the above to throw, but better to be safe.\\n\\t\\treturn false;\\n\\t}\\n}\\n\\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\\n\\tvar from;\\n\\tvar to = toObject(target);\\n\\tvar symbols;\\n\\n\\tfor (var s = 1; s < arguments.length; s++) {\\n\\t\\tfrom = Object(arguments[s]);\\n\\n\\t\\tfor (var key in from) {\\n\\t\\t\\tif (hasOwnProperty.call(from, key)) {\\n\\t\\t\\t\\tto[key] = from[key];\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif (getOwnPropertySymbols) {\\n\\t\\t\\tsymbols = getOwnPropertySymbols(from);\\n\\t\\t\\tfor (var i = 0; i < symbols.length; i++) {\\n\\t\\t\\t\\tif (propIsEnumerable.call(from, symbols[i])) {\\n\\t\\t\\t\\t\\tto[symbols[i]] = from[symbols[i]];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn to;\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/object-assign/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/OnigRegExp.js\":\n/*!************************************************!*\\\n !*** ./node_modules/onigasm/lib/OnigRegExp.js ***!\n \\************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst OnigScanner_1 = __webpack_require__(/*! ./OnigScanner */ \\\"./node_modules/onigasm/lib/OnigScanner.js\\\");\\nclass OnigRegExp {\\n /**\\n * Create a new regex with the given pattern\\n * @param source A string pattern\\n */\\n constructor(source) {\\n this.source = source;\\n try {\\n this.scanner = new OnigScanner_1.default([this.source]);\\n }\\n catch (error) {\\n // doesn't make much sense, but this to pass atom/node-oniguruam tests\\n }\\n }\\n /**\\n * Synchronously search the string for a match starting at the given position\\n * @param string The string to search\\n * @param startPosition The optional position to start the search at, defaults to `0`\\n */\\n searchSync(string, startPosition) {\\n let match;\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n match = this.scanner.findNextMatchSync(string, startPosition);\\n return this.captureIndicesForMatch(string, match);\\n }\\n /**\\n * Search the string for a match starting at the given position\\n * @param string The string to search\\n * @param startPosition The optional position to start the search at, defaults to `0`\\n * @param callback The `(error, match)` function to call when done, match will be null if no matches were found. match will be an array of objects for each matched group on a successful search\\n */\\n search(string, startPosition, callback) {\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n if (typeof startPosition === 'function') {\\n callback = startPosition;\\n startPosition = 0;\\n }\\n try {\\n const ret = this.searchSync(string, startPosition);\\n callback(null, ret);\\n }\\n catch (error) {\\n callback(error);\\n }\\n }\\n /**\\n * Synchronously test if this regular expression matches the given string\\n * @param string The string to test against\\n */\\n testSync(string) {\\n if ((typeof this.source === 'boolean' || typeof string === 'boolean')) {\\n return this.source === string;\\n }\\n return this.searchSync(string) != null;\\n }\\n /**\\n * Test if this regular expression matches the given string\\n * @param string The string to test against\\n * @param callback The (error, matches) function to call when done, matches will be true if at least one match is found, false otherwise\\n */\\n test(string, callback) {\\n if (typeof callback !== 'function') {\\n callback = () => { };\\n }\\n try {\\n callback(null, this.testSync(string));\\n }\\n catch (error) {\\n callback(error);\\n }\\n }\\n captureIndicesForMatch(string, match) {\\n if (match != null) {\\n const { captureIndices } = match;\\n let capture;\\n string = this.scanner.convertToString(string);\\n for (let i = 0; i < captureIndices.length; i++) {\\n capture = captureIndices[i];\\n capture.match = string.slice(capture.start, capture.end);\\n }\\n return captureIndices;\\n }\\n else {\\n return null;\\n }\\n }\\n}\\nexports[\\\"default\\\"] = OnigRegExp;\\n//# sourceMappingURL=OnigRegExp.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/OnigRegExp.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/OnigScanner.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/onigasm/lib/OnigScanner.js ***!\n \\*************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst LRUCache = __webpack_require__(/*! lru-cache */ \\\"./node_modules/onigasm/node_modules/lru-cache/index.js\\\");\\nconst onigasmH_1 = __webpack_require__(/*! ./onigasmH */ \\\"./node_modules/onigasm/lib/onigasmH.js\\\");\\nconst OnigString_1 = __webpack_require__(/*! ./OnigString */ \\\"./node_modules/onigasm/lib/OnigString.js\\\");\\n/**\\n * Allocates space on the heap and copies the string bytes on to it\\n * @param str\\n * @returns pointer to the first byte's address on heap\\n */\\nfunction mallocAndWriteString(str) {\\n const ptr = onigasmH_1.onigasmH._malloc(str.utf8Bytes.length);\\n onigasmH_1.onigasmH.HEAPU8.set(str.utf8Bytes, ptr);\\n return ptr;\\n}\\nfunction convertUTF8BytesFromPtrToString(ptr) {\\n const chars = [];\\n let i = 0;\\n while (onigasmH_1.onigasmH.HEAPU8[ptr] !== 0x00) {\\n chars[i++] = onigasmH_1.onigasmH.HEAPU8[ptr++];\\n }\\n return chars.join();\\n}\\nconst cache = new LRUCache({\\n dispose: (scanner, info) => {\\n const regexTPtrsPtr = onigasmH_1.onigasmH._malloc(info.regexTPtrs.length);\\n onigasmH_1.onigasmH.HEAPU8.set(info.regexTPtrs, regexTPtrsPtr);\\n const status = onigasmH_1.onigasmH._disposeCompiledPatterns(regexTPtrsPtr, scanner.patterns.length);\\n if (status !== 0) {\\n const errMessage = convertUTF8BytesFromPtrToString(onigasmH_1.onigasmH._getLastError());\\n throw new Error(errMessage);\\n }\\n onigasmH_1.onigasmH._free(regexTPtrsPtr);\\n },\\n max: 1000,\\n});\\nclass OnigScanner {\\n /**\\n * Create a new scanner with the given patterns\\n * @param patterns An array of string patterns\\n */\\n constructor(patterns) {\\n if (onigasmH_1.onigasmH === null) {\\n throw new Error(`Onigasm has not been initialized, call loadWASM from 'onigasm' exports before using any other API`);\\n }\\n for (let i = 0; i < patterns.length; i++) {\\n const pattern = patterns[i];\\n if (typeof pattern !== 'string') {\\n throw new TypeError(`First parameter to OnigScanner constructor must be array of (pattern) strings`);\\n }\\n }\\n this.sources = patterns.slice();\\n }\\n get patterns() {\\n return this.sources.slice();\\n }\\n /**\\n * Find the next match from a given position\\n * @param string The string to search\\n * @param startPosition The optional position to start at, defaults to 0\\n * @param callback The (error, match) function to call when done, match will null when there is no match\\n */\\n findNextMatch(string, startPosition, callback) {\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n if (typeof startPosition === 'function') {\\n callback = startPosition;\\n startPosition = 0;\\n }\\n try {\\n const match = this.findNextMatchSync(string, startPosition);\\n callback(null, match);\\n }\\n catch (error) {\\n callback(error);\\n }\\n }\\n /**\\n * Find the next match from a given position\\n * @param string The string to search\\n * @param startPosition The optional position to start at, defaults to 0\\n */\\n findNextMatchSync(string, startPosition) {\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n startPosition = this.convertToNumber(startPosition);\\n let onigNativeInfo = cache.get(this);\\n let status = 0;\\n if (!onigNativeInfo) {\\n const regexTAddrRecieverPtr = onigasmH_1.onigasmH._malloc(4);\\n const regexTPtrs = [];\\n for (let i = 0; i < this.sources.length; i++) {\\n const pattern = this.sources[i];\\n const patternStrPtr = mallocAndWriteString(new OnigString_1.default(pattern));\\n status = onigasmH_1.onigasmH._compilePattern(patternStrPtr, regexTAddrRecieverPtr);\\n if (status !== 0) {\\n const errMessage = convertUTF8BytesFromPtrToString(onigasmH_1.onigasmH._getLastError());\\n throw new Error(errMessage);\\n }\\n const regexTAddress = onigasmH_1.onigasmH.HEAP32[regexTAddrRecieverPtr / 4];\\n regexTPtrs.push(regexTAddress);\\n onigasmH_1.onigasmH._free(patternStrPtr);\\n }\\n onigNativeInfo = {\\n regexTPtrs: new Uint8Array(Uint32Array.from(regexTPtrs).buffer),\\n };\\n onigasmH_1.onigasmH._free(regexTAddrRecieverPtr);\\n cache.set(this, onigNativeInfo);\\n }\\n const onigString = string instanceof OnigString_1.default ? string : new OnigString_1.default(this.convertToString(string));\\n const strPtr = mallocAndWriteString(onigString);\\n const resultInfoReceiverPtr = onigasmH_1.onigasmH._malloc(8);\\n const regexTPtrsPtr = onigasmH_1.onigasmH._malloc(onigNativeInfo.regexTPtrs.length);\\n onigasmH_1.onigasmH.HEAPU8.set(onigNativeInfo.regexTPtrs, regexTPtrsPtr);\\n status = onigasmH_1.onigasmH._findBestMatch(\\n // regex_t **patterns\\n regexTPtrsPtr, \\n // int patternCount\\n this.sources.length, \\n // UChar *utf8String\\n strPtr, \\n // int strLen\\n onigString.utf8Bytes.length - 1, \\n // int startOffset\\n onigString.convertUtf16OffsetToUtf8(startPosition), \\n // int *resultInfo\\n resultInfoReceiverPtr);\\n if (status !== 0) {\\n const errMessage = convertUTF8BytesFromPtrToString(onigasmH_1.onigasmH._getLastError());\\n throw new Error(errMessage);\\n }\\n const [\\n // The index of pattern which matched the string at least offset from 0 (start)\\n bestPatternIdx, \\n // Begin address of capture info encoded as pairs\\n // like [start, end, start, end, start, end, ...]\\n // - first start-end pair is entire match (index 0 and 1)\\n // - subsequent pairs are capture groups (2, 3 = first capture group, 4, 5 = second capture group and so on)\\n encodedResultBeginAddress, \\n // Length of the [start, end, ...] sequence so we know how much memory to read (will always be 0 or multiple of 2)\\n encodedResultLength,] = new Uint32Array(onigasmH_1.onigasmH.HEAPU32.buffer, resultInfoReceiverPtr, 3);\\n onigasmH_1.onigasmH._free(strPtr);\\n onigasmH_1.onigasmH._free(resultInfoReceiverPtr);\\n onigasmH_1.onigasmH._free(regexTPtrsPtr);\\n if (encodedResultLength > 0) {\\n const encodedResult = new Uint32Array(onigasmH_1.onigasmH.HEAPU32.buffer, encodedResultBeginAddress, encodedResultLength);\\n const captureIndices = [];\\n let i = 0;\\n let captureIdx = 0;\\n while (i < encodedResultLength) {\\n const index = captureIdx++;\\n let start = encodedResult[i++];\\n let end = encodedResult[i++];\\n if (onigString.hasMultiByteCharacters) {\\n start = onigString.convertUtf8OffsetToUtf16(start);\\n end = onigString.convertUtf8OffsetToUtf16(end);\\n }\\n captureIndices.push({\\n end,\\n index,\\n length: end - start,\\n start,\\n });\\n }\\n onigasmH_1.onigasmH._free(encodedResultBeginAddress);\\n return {\\n captureIndices,\\n index: bestPatternIdx,\\n scanner: this,\\n };\\n }\\n return null;\\n }\\n convertToString(value) {\\n if (value === undefined) {\\n return 'undefined';\\n }\\n if (value === null) {\\n return 'null';\\n }\\n if (value instanceof OnigString_1.default) {\\n return value.content;\\n }\\n return value.toString();\\n }\\n convertToNumber(value) {\\n value = parseInt(value, 10);\\n if (!isFinite(value)) {\\n value = 0;\\n }\\n value = Math.max(value, 0);\\n return value;\\n }\\n}\\nexports.OnigScanner = OnigScanner;\\nexports[\\\"default\\\"] = OnigScanner;\\n//# sourceMappingURL=OnigScanner.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/OnigScanner.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/OnigString.js\":\n/*!************************************************!*\\\n !*** ./node_modules/onigasm/lib/OnigString.js ***!\n \\************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nclass OnigString {\\n constructor(content) {\\n this.substring = (start, end) => {\\n return this.source.substring(start, end);\\n };\\n this.toString = (start, end) => {\\n return this.source;\\n };\\n if (typeof content !== 'string') {\\n throw new TypeError('Argument must be a string');\\n }\\n this.source = content;\\n this._utf8Bytes = null;\\n this._utf8Indexes = null;\\n }\\n get utf8Bytes() {\\n if (!this._utf8Bytes) {\\n this.encode();\\n }\\n return this._utf8Bytes;\\n }\\n /**\\n * Returns `null` if all utf8 offsets match utf-16 offset (content has no multi byte characters)\\n */\\n get utf8Indexes() {\\n if (!this._utf8Bytes) {\\n this.encode();\\n }\\n return this._utf8Indexes;\\n }\\n get content() {\\n return this.source;\\n }\\n get length() {\\n return this.source.length;\\n }\\n get hasMultiByteCharacters() {\\n return this.utf8Indexes !== null;\\n }\\n convertUtf8OffsetToUtf16(utf8Offset) {\\n if (utf8Offset < 0) {\\n return 0;\\n }\\n const utf8Array = this._utf8Bytes;\\n if (utf8Offset >= utf8Array.length - 1) {\\n return this.source.length;\\n }\\n const utf8OffsetMap = this.utf8Indexes;\\n if (utf8OffsetMap && utf8Offset >= this._mappingTableStartOffset) {\\n return findFirstInSorted(utf8OffsetMap, utf8Offset - this._mappingTableStartOffset) + this._mappingTableStartOffset;\\n }\\n return utf8Offset;\\n }\\n convertUtf16OffsetToUtf8(utf16Offset) {\\n if (utf16Offset < 0) {\\n return 0;\\n }\\n const utf8Array = this._utf8Bytes;\\n if (utf16Offset >= this.source.length) {\\n return utf8Array.length - 1;\\n }\\n const utf8OffsetMap = this.utf8Indexes;\\n if (utf8OffsetMap && utf16Offset >= this._mappingTableStartOffset) {\\n return utf8OffsetMap[utf16Offset - this._mappingTableStartOffset] + this._mappingTableStartOffset;\\n }\\n return utf16Offset;\\n }\\n encode() {\\n const str = this.source;\\n const n = str.length;\\n let utf16OffsetToUtf8;\\n let utf8Offset = 0;\\n let mappingTableStartOffset = 0;\\n function createOffsetTable(startOffset) {\\n const maxUtf8Len = (n - startOffset) * 3;\\n if (maxUtf8Len <= 0xff) {\\n utf16OffsetToUtf8 = new Uint8Array(n - startOffset);\\n }\\n else if (maxUtf8Len <= 0xffff) {\\n utf16OffsetToUtf8 = new Uint16Array(n - startOffset);\\n }\\n else {\\n utf16OffsetToUtf8 = new Uint32Array(n - startOffset);\\n }\\n mappingTableStartOffset = startOffset;\\n utf16OffsetToUtf8[utf8Offset++] = 0;\\n }\\n const u8view = new Uint8Array((n * 3) /* alloc max now, trim later*/ + 1 /** null termination character */);\\n let ptrHead = 0;\\n let i = 0;\\n // for some reason, v8 is faster with str.length than using a variable (might be illusion)\\n while (i < str.length) {\\n let codepoint;\\n const c = str.charCodeAt(i);\\n if (utf16OffsetToUtf8) {\\n utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;\\n }\\n if (c < 0xD800 || c > 0xDFFF) {\\n codepoint = c;\\n }\\n else if (c >= 0xDC00) {\\n codepoint = 0xFFFD;\\n }\\n else {\\n if (i === n - 1) {\\n codepoint = 0xFFFD;\\n }\\n else {\\n const d = str.charCodeAt(i + 1);\\n if (0xDC00 <= d && d <= 0xDFFF) {\\n if (!utf16OffsetToUtf8) {\\n createOffsetTable(i);\\n }\\n const a = c & 0x3FF;\\n const b = d & 0x3FF;\\n codepoint = 0x10000 + (a << 10) + b;\\n i += 1;\\n utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;\\n }\\n else {\\n codepoint = 0xFFFD;\\n }\\n }\\n }\\n let bytesRequiredToEncode;\\n let offset;\\n if (codepoint <= 0x7F) {\\n bytesRequiredToEncode = 1;\\n offset = 0;\\n }\\n else if (codepoint <= 0x07FF) {\\n bytesRequiredToEncode = 2;\\n offset = 0xC0;\\n }\\n else if (codepoint <= 0xFFFF) {\\n bytesRequiredToEncode = 3;\\n offset = 0xE0;\\n }\\n else {\\n bytesRequiredToEncode = 4;\\n offset = 0xF0;\\n }\\n if (bytesRequiredToEncode === 1) {\\n u8view[ptrHead++] = codepoint;\\n }\\n else {\\n if (!utf16OffsetToUtf8) {\\n createOffsetTable(ptrHead);\\n }\\n u8view[ptrHead++] = (codepoint >> (6 * (--bytesRequiredToEncode))) + offset;\\n while (bytesRequiredToEncode > 0) {\\n const temp = codepoint >> (6 * (bytesRequiredToEncode - 1));\\n u8view[ptrHead++] = (0x80 | (temp & 0x3F));\\n bytesRequiredToEncode -= 1;\\n }\\n }\\n i += 1;\\n }\\n const utf8 = u8view.slice(0, ptrHead + 1);\\n utf8[ptrHead] = 0x00;\\n this._utf8Bytes = utf8;\\n if (utf16OffsetToUtf8) { // set if UTF-16 surrogate chars or multi-byte characters found\\n this._utf8Indexes = utf16OffsetToUtf8;\\n this._mappingTableStartOffset = mappingTableStartOffset;\\n }\\n }\\n}\\nfunction findFirstInSorted(array, i) {\\n let low = 0;\\n let high = array.length;\\n if (high === 0) {\\n return 0; // no children\\n }\\n while (low < high) {\\n const mid = Math.floor((low + high) / 2);\\n if (array[mid] >= i) {\\n high = mid;\\n }\\n else {\\n low = mid + 1;\\n }\\n }\\n // low is on the index of the first value >= i or array.length. Decrement low until we find array[low] <= i\\n while (low > 0 && (low >= array.length || array[low] > i)) {\\n low--;\\n }\\n // check whether we are on the second index of a utf-16 surrogate char. If so, go to the first index.\\n if (low > 0 && array[low] === array[low - 1]) {\\n low--;\\n }\\n return low;\\n}\\nexports[\\\"default\\\"] = OnigString;\\n//# sourceMappingURL=OnigString.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/OnigString.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/index.js\":\n/*!*******************************************!*\\\n !*** ./node_modules/onigasm/lib/index.js ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst onigasmH_1 = __webpack_require__(/*! ./onigasmH */ \\\"./node_modules/onigasm/lib/onigasmH.js\\\");\\nexports.loadWASM = onigasmH_1.loadWASM;\\nconst OnigRegExp_1 = __webpack_require__(/*! ./OnigRegExp */ \\\"./node_modules/onigasm/lib/OnigRegExp.js\\\");\\nexports.OnigRegExp = OnigRegExp_1.default;\\nconst OnigScanner_1 = __webpack_require__(/*! ./OnigScanner */ \\\"./node_modules/onigasm/lib/OnigScanner.js\\\");\\nexports.OnigScanner = OnigScanner_1.default;\\nconst OnigString_1 = __webpack_require__(/*! ./OnigString */ \\\"./node_modules/onigasm/lib/OnigString.js\\\");\\nexports.OnigString = OnigString_1.default;\\n//# sourceMappingURL=index.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/onigasm.js\":\n/*!*********************************************!*\\\n !*** ./node_modules/onigasm/lib/onigasm.js ***!\n \\*********************************************/\n/***/ ((module) => {\n\neval(\"\\nvar Onigasm = (function() {\\n var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\\n return (\\nfunction(Onigasm) {\\n Onigasm = Onigasm || {};\\n\\nvar Module=typeof Onigasm!==\\\"undefined\\\"?Onigasm:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\\\"./this.program\\\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=true;var scriptDirectory=\\\"\\\";function locateFile(path){if(Module[\\\"locateFile\\\"]){return Module[\\\"locateFile\\\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readBinary;if(ENVIRONMENT_IS_SHELL){if(typeof read!=\\\"undefined\\\"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer===\\\"function\\\"){return new Uint8Array(readbuffer(f))}data=read(f,\\\"binary\\\");assert(typeof data===\\\"object\\\");return data};if(typeof scriptArgs!=\\\"undefined\\\"){arguments_=scriptArgs}else if(typeof arguments!=\\\"undefined\\\"){arguments_=arguments}if(typeof quit===\\\"function\\\"){quit_=function(status){quit(status)}}if(typeof print!==\\\"undefined\\\"){if(typeof console===\\\"undefined\\\")console={};console.log=print;console.warn=console.error=typeof printErr!==\\\"undefined\\\"?printErr:print}}else{}var out=Module[\\\"print\\\"]||console.log.bind(console);var err=Module[\\\"printErr\\\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\\\"arguments\\\"])arguments_=Module[\\\"arguments\\\"];if(Module[\\\"thisProgram\\\"])thisProgram=Module[\\\"thisProgram\\\"];if(Module[\\\"quit\\\"])quit_=Module[\\\"quit\\\"];var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end>_emscripten_get_heap_size()){abort()}HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){case\\\"i1\\\":case\\\"i8\\\":return 1;case\\\"i16\\\":return 2;case\\\"i32\\\":return 4;case\\\"i64\\\":return 8;case\\\"float\\\":return 4;case\\\"double\\\":return 8;default:{if(type[type.length-1]===\\\"*\\\"){return 4}else if(type[0]===\\\"i\\\"){var bits=parseInt(type.substr(1));assert(bits%8===0,\\\"getNativeTypeSize invalid bits \\\"+bits+\\\", type \\\"+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){var typeSection=[1,0,1,96];var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={\\\"i\\\":127,\\\"j\\\":126,\\\"f\\\":125,\\\"d\\\":124};typeSection.push(sigParam.length);for(var i=0;i>0]=value;break;case\\\"i8\\\":HEAP8[ptr>>0]=value;break;case\\\"i16\\\":HEAP16[ptr>>1]=value;break;case\\\"i32\\\":HEAP32[ptr>>2]=value;break;case\\\"i64\\\":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case\\\"float\\\":HEAPF32[ptr>>2]=value;break;case\\\"double\\\":HEAPF64[ptr>>3]=value;break;default:abort(\\\"invalid type for setValue: \\\"+type)}}var wasmMemory;var wasmTable=new WebAssembly.Table({\\\"initial\\\":244,\\\"maximum\\\":244+0,\\\"element\\\":\\\"anyfunc\\\"});var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort(\\\"Assertion failed: \\\"+text)}}function getCFunc(ident){var func=Module[\\\"_\\\"+ident];assert(func,\\\"Cannot call unknown function \\\"+ident+\\\", make sure it is exported\\\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\\\"string\\\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\\\"array\\\":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType===\\\"string\\\")return UTF8ToString(ret);if(returnType===\\\"boolean\\\")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str=\\\"\\\";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\\\"\\\"}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\\\"undefined\\\"?new TextDecoder(\\\"utf-16le\\\"):undefined;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\\\"HEAP8\\\"]=HEAP8=new Int8Array(buf);Module[\\\"HEAP16\\\"]=HEAP16=new Int16Array(buf);Module[\\\"HEAP32\\\"]=HEAP32=new Int32Array(buf);Module[\\\"HEAPU8\\\"]=HEAPU8=new Uint8Array(buf);Module[\\\"HEAPU16\\\"]=HEAPU16=new Uint16Array(buf);Module[\\\"HEAPU32\\\"]=HEAPU32=new Uint32Array(buf);Module[\\\"HEAPF32\\\"]=HEAPF32=new Float32Array(buf);Module[\\\"HEAPF64\\\"]=HEAPF64=new Float64Array(buf)}var STACK_BASE=5507664,DYNAMIC_BASE=5507664,DYNAMICTOP_PTR=264624;var INITIAL_TOTAL_MEMORY=Module[\\\"TOTAL_MEMORY\\\"]||157286400;if(Module[\\\"wasmMemory\\\"]){wasmMemory=Module[\\\"wasmMemory\\\"]}else{wasmMemory=new WebAssembly.Memory({\\\"initial\\\":INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_TOTAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\\\"function\\\"){callback();continue}var func=callback.func;if(typeof func===\\\"number\\\"){if(callback.arg===undefined){Module[\\\"dynCall_v\\\"](func)}else{Module[\\\"dynCall_vi\\\"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module[\\\"preRun\\\"]){if(typeof Module[\\\"preRun\\\"]==\\\"function\\\")Module[\\\"preRun\\\"]=[Module[\\\"preRun\\\"]];while(Module[\\\"preRun\\\"].length){addOnPreRun(Module[\\\"preRun\\\"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module[\\\"postRun\\\"]){if(typeof Module[\\\"postRun\\\"]==\\\"function\\\")Module[\\\"postRun\\\"]=[Module[\\\"postRun\\\"]];while(Module[\\\"postRun\\\"].length){addOnPostRun(Module[\\\"postRun\\\"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module[\\\"monitorRunDependencies\\\"]){Module[\\\"monitorRunDependencies\\\"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module[\\\"monitorRunDependencies\\\"]){Module[\\\"monitorRunDependencies\\\"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\\\"preloadedImages\\\"]={};Module[\\\"preloadedAudios\\\"]={};function abort(what){if(Module[\\\"onAbort\\\"]){Module[\\\"onAbort\\\"](what)}what+=\\\"\\\";out(what);err(what);ABORT=true;EXITSTATUS=1;what=\\\"abort(\\\"+what+\\\"). Build with -s ASSERTIONS=1 for more info.\\\";throw new WebAssembly.RuntimeError(what)}var dataURIPrefix=\\\"data:application/octet-stream;base64,\\\";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile=\\\"onigasm.wasm\\\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(wasmBinaryFile)}else{throw\\\"both async and sync fetching of the wasm failed\\\"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch===\\\"function\\\"){return fetch(wasmBinaryFile,{credentials:\\\"same-origin\\\"}).then(function(response){if(!response[\\\"ok\\\"]){throw\\\"failed to load wasm binary file at '\\\"+wasmBinaryFile+\\\"'\\\"}return response[\\\"arrayBuffer\\\"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(){var info={\\\"env\\\":asmLibraryArg,\\\"wasi_unstable\\\":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module[\\\"asm\\\"]=exports;removeRunDependency(\\\"wasm-instantiate\\\")}addRunDependency(\\\"wasm-instantiate\\\");function receiveInstantiatedSource(output){receiveInstance(output[\\\"instance\\\"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err(\\\"failed to asynchronously prepare wasm: \\\"+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming===\\\"function\\\"&&!isDataURI(wasmBinaryFile)&&typeof fetch===\\\"function\\\"){fetch(wasmBinaryFile,{credentials:\\\"same-origin\\\"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err(\\\"wasm streaming compile failed: \\\"+reason);err(\\\"falling back to ArrayBuffer instantiation\\\");instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module[\\\"instantiateWasm\\\"]){try{var exports=Module[\\\"instantiateWasm\\\"](info,receiveInstance);return exports}catch(e){err(\\\"Module.instantiateWasm callback failed with error: \\\"+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;__ATINIT__.push({func:function(){___wasm_call_ctors()}});function demangle(func){var __cxa_demangle_func=Module[\\\"___cxa_demangle\\\"]||Module[\\\"__cxa_demangle\\\"];assert(__cxa_demangle_func);try{var s=func;if(s.startsWith(\\\"__Z\\\"))s=s.substr(1);var len=lengthBytesUTF8(s)+1;var buf=_malloc(len);stringToUTF8(s,buf,len);var status=_malloc(4);var ret=__cxa_demangle_func(buf,0,0,status);if(HEAP32[status>>2]===0&&ret){return UTF8ToString(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}return func}function demangleAll(text){var regex=/\\\\b_Z[\\\\w\\\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\\\" [\\\"+x+\\\"]\\\"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return\\\"(no stack trace available)\\\"}}return err.stack.toString()}function _abort(){abort()}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_sbrk_ptr(){return 264624}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize=0;i--){var last=parts[i];if(last===\\\".\\\"){parts.splice(i,1)}else if(last===\\\"..\\\"){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift(\\\"..\\\")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)===\\\"/\\\",trailingSlash=path.substr(-1)===\\\"/\\\";path=PATH.normalizeArray(path.split(\\\"/\\\").filter(function(p){return!!p}),!isAbsolute).join(\\\"/\\\");if(!path&&!isAbsolute){path=\\\".\\\"}if(path&&trailingSlash){path+=\\\"/\\\"}return(isAbsolute?\\\"/\\\":\\\"\\\")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return\\\".\\\"}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path===\\\"/\\\")return\\\"/\\\";var lastSlash=path.lastIndexOf(\\\"/\\\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\\\"/\\\"))},join2:function(l,r){return PATH.normalize(l+\\\"/\\\"+r)}};var SYSCALLS={buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function _fd_close(fd){try{return 0}catch(e){if(typeof FS===\\\"undefined\\\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{return 0}catch(e){if(typeof FS===\\\"undefined\\\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var num=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=num;return 0}catch(e){if(typeof FS===\\\"undefined\\\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _setTempRet0($i){setTempRet0($i|0)}var ASSERTIONS=false;var asmLibraryArg={\\\"abort\\\":_abort,\\\"emscripten_get_sbrk_ptr\\\":_emscripten_get_sbrk_ptr,\\\"emscripten_memcpy_big\\\":_emscripten_memcpy_big,\\\"emscripten_resize_heap\\\":_emscripten_resize_heap,\\\"fd_close\\\":_fd_close,\\\"fd_seek\\\":_fd_seek,\\\"fd_write\\\":_fd_write,\\\"memory\\\":wasmMemory,\\\"setTempRet0\\\":_setTempRet0,\\\"table\\\":wasmTable};var asm=createWasm();Module[\\\"asm\\\"]=asm;var ___wasm_call_ctors=Module[\\\"___wasm_call_ctors\\\"]=function(){return Module[\\\"asm\\\"][\\\"__wasm_call_ctors\\\"].apply(null,arguments)};var _malloc=Module[\\\"_malloc\\\"]=function(){return Module[\\\"asm\\\"][\\\"malloc\\\"].apply(null,arguments)};var _free=Module[\\\"_free\\\"]=function(){return Module[\\\"asm\\\"][\\\"free\\\"].apply(null,arguments)};var _getLastError=Module[\\\"_getLastError\\\"]=function(){return Module[\\\"asm\\\"][\\\"getLastError\\\"].apply(null,arguments)};var _compilePattern=Module[\\\"_compilePattern\\\"]=function(){return Module[\\\"asm\\\"][\\\"compilePattern\\\"].apply(null,arguments)};var _disposeCompiledPatterns=Module[\\\"_disposeCompiledPatterns\\\"]=function(){return Module[\\\"asm\\\"][\\\"disposeCompiledPatterns\\\"].apply(null,arguments)};var _findBestMatch=Module[\\\"_findBestMatch\\\"]=function(){return Module[\\\"asm\\\"][\\\"findBestMatch\\\"].apply(null,arguments)};var ___cxa_demangle=Module[\\\"___cxa_demangle\\\"]=function(){return Module[\\\"asm\\\"][\\\"__cxa_demangle\\\"].apply(null,arguments)};var _setThrew=Module[\\\"_setThrew\\\"]=function(){return Module[\\\"asm\\\"][\\\"setThrew\\\"].apply(null,arguments)};var stackSave=Module[\\\"stackSave\\\"]=function(){return Module[\\\"asm\\\"][\\\"stackSave\\\"].apply(null,arguments)};var stackAlloc=Module[\\\"stackAlloc\\\"]=function(){return Module[\\\"asm\\\"][\\\"stackAlloc\\\"].apply(null,arguments)};var stackRestore=Module[\\\"stackRestore\\\"]=function(){return Module[\\\"asm\\\"][\\\"stackRestore\\\"].apply(null,arguments)};var __growWasmMemory=Module[\\\"__growWasmMemory\\\"]=function(){return Module[\\\"asm\\\"][\\\"__growWasmMemory\\\"].apply(null,arguments)};var dynCall_vi=Module[\\\"dynCall_vi\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_vi\\\"].apply(null,arguments)};var dynCall_iiii=Module[\\\"dynCall_iiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iiii\\\"].apply(null,arguments)};var dynCall_iiiii=Module[\\\"dynCall_iiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iiiii\\\"].apply(null,arguments)};var dynCall_iii=Module[\\\"dynCall_iii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iii\\\"].apply(null,arguments)};var dynCall_iidiiii=Module[\\\"dynCall_iidiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iidiiii\\\"].apply(null,arguments)};var dynCall_vii=Module[\\\"dynCall_vii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_vii\\\"].apply(null,arguments)};var dynCall_ii=Module[\\\"dynCall_ii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_ii\\\"].apply(null,arguments)};var dynCall_i=Module[\\\"dynCall_i\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_i\\\"].apply(null,arguments)};var dynCall_v=Module[\\\"dynCall_v\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_v\\\"].apply(null,arguments)};var dynCall_viiiiii=Module[\\\"dynCall_viiiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_viiiiii\\\"].apply(null,arguments)};var dynCall_viiiii=Module[\\\"dynCall_viiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_viiiii\\\"].apply(null,arguments)};var dynCall_viiii=Module[\\\"dynCall_viiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_viiii\\\"].apply(null,arguments)};var dynCall_jiji=Module[\\\"dynCall_jiji\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_jiji\\\"].apply(null,arguments)};Module[\\\"asm\\\"]=asm;Module[\\\"ccall\\\"]=ccall;var calledRun;Module[\\\"then\\\"]=function(func){if(calledRun){func(Module)}else{var old=Module[\\\"onRuntimeInitialized\\\"];Module[\\\"onRuntimeInitialized\\\"]=function(){if(old)old();func(Module)}}return Module};function ExitStatus(status){this.name=\\\"ExitStatus\\\";this.message=\\\"Program terminated with exit(\\\"+status+\\\")\\\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;if(ABORT)return;initRuntime();preMain();if(Module[\\\"onRuntimeInitialized\\\"])Module[\\\"onRuntimeInitialized\\\"]();postRun()}if(Module[\\\"setStatus\\\"]){Module[\\\"setStatus\\\"](\\\"Running...\\\");setTimeout(function(){setTimeout(function(){Module[\\\"setStatus\\\"](\\\"\\\")},1);doRun()},1)}else{doRun()}}Module[\\\"run\\\"]=run;if(Module[\\\"preInit\\\"]){if(typeof Module[\\\"preInit\\\"]==\\\"function\\\")Module[\\\"preInit\\\"]=[Module[\\\"preInit\\\"]];while(Module[\\\"preInit\\\"].length>0){Module[\\\"preInit\\\"].pop()()}}noExitRuntime=true;run();\\n\\n\\n return Onigasm\\n}\\n);\\n})();\\nif (true)\\n module.exports = Onigasm;\\n else {}\\n \\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/onigasm.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/onigasmH.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/onigasm/lib/onigasmH.js ***!\n \\**********************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst OnigasmModuleFactory = __webpack_require__(/*! ./onigasm.js */ \\\"./node_modules/onigasm/lib/onigasm.js\\\" /** when TS is compiled to JS, this will mean `lib/onigasm.js` (emitted by `emcc`) */);\\nasync function initModule(bytes) {\\n return new Promise((resolve, reject) => {\\n const { log, warn, error } = console;\\n OnigasmModuleFactory({\\n instantiateWasm(imports, successCallback) {\\n WebAssembly.instantiate(bytes, imports)\\n .then((output) => {\\n successCallback(output.instance);\\n })\\n .catch((e) => {\\n throw e;\\n });\\n return {};\\n },\\n })\\n .then(moduleH => {\\n exports.onigasmH = moduleH;\\n resolve();\\n });\\n if (typeof print !== 'undefined') {\\n // can be removed when https://github.com/emscripten-core/emscripten/issues/9829 is fixed.\\n // tslint:disable-next-line:no-console\\n console.log = log;\\n // tslint:disable-next-line:no-console\\n console.error = error;\\n // tslint:disable-next-line:no-console\\n console.warn = warn;\\n }\\n });\\n}\\nlet isInitialized = false;\\n/**\\n * Mount the .wasm file that will act as library's \\\"backend\\\"\\n * @param data Path to .wasm file or it's ArrayBuffer\\n */\\nasync function loadWASM(data) {\\n if (isInitialized) {\\n throw new Error(`Onigasm#init has been called and was succesful, subsequent calls are not allowed once initialized`);\\n }\\n if (typeof data === 'string') {\\n const arrayBuffer = await (await fetch(data)).arrayBuffer();\\n await initModule(arrayBuffer);\\n }\\n else if (data instanceof ArrayBuffer) {\\n await initModule(data);\\n }\\n else {\\n throw new TypeError(`Expected a string (URL of .wasm file) or ArrayBuffer (.wasm file itself) as first parameter`);\\n }\\n isInitialized = true;\\n}\\nexports.loadWASM = loadWASM;\\n//# sourceMappingURL=onigasmH.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/onigasmH.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/node_modules/lru-cache/index.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/onigasm/node_modules/lru-cache/index.js ***!\n \\**************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n\\n// A linked list to keep track of recently-used-ness\\nconst Yallist = __webpack_require__(/*! yallist */ \\\"./node_modules/onigasm/node_modules/yallist/yallist.js\\\")\\n\\nconst MAX = Symbol('max')\\nconst LENGTH = Symbol('length')\\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\\nconst ALLOW_STALE = Symbol('allowStale')\\nconst MAX_AGE = Symbol('maxAge')\\nconst DISPOSE = Symbol('dispose')\\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\\nconst LRU_LIST = Symbol('lruList')\\nconst CACHE = Symbol('cache')\\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\\n\\nconst naiveLength = () => 1\\n\\n// lruList is a yallist where the head is the youngest\\n// item, and the tail is the oldest. the list contains the Hit\\n// objects as the entries.\\n// Each Hit object has a reference to its Yallist.Node. This\\n// never changes.\\n//\\n// cache is a Map (or PseudoMap) that matches the keys to\\n// the Yallist.Node object.\\nclass LRUCache {\\n constructor (options) {\\n if (typeof options === 'number')\\n options = { max: options }\\n\\n if (!options)\\n options = {}\\n\\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\\n throw new TypeError('max must be a non-negative number')\\n // Kind of weird to have a default max of Infinity, but oh well.\\n const max = this[MAX] = options.max || Infinity\\n\\n const lc = options.length || naiveLength\\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\\n this[ALLOW_STALE] = options.stale || false\\n if (options.maxAge && typeof options.maxAge !== 'number')\\n throw new TypeError('maxAge must be a number')\\n this[MAX_AGE] = options.maxAge || 0\\n this[DISPOSE] = options.dispose\\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\\n this.reset()\\n }\\n\\n // resize the cache when the max changes.\\n set max (mL) {\\n if (typeof mL !== 'number' || mL < 0)\\n throw new TypeError('max must be a non-negative number')\\n\\n this[MAX] = mL || Infinity\\n trim(this)\\n }\\n get max () {\\n return this[MAX]\\n }\\n\\n set allowStale (allowStale) {\\n this[ALLOW_STALE] = !!allowStale\\n }\\n get allowStale () {\\n return this[ALLOW_STALE]\\n }\\n\\n set maxAge (mA) {\\n if (typeof mA !== 'number')\\n throw new TypeError('maxAge must be a non-negative number')\\n\\n this[MAX_AGE] = mA\\n trim(this)\\n }\\n get maxAge () {\\n return this[MAX_AGE]\\n }\\n\\n // resize the cache when the lengthCalculator changes.\\n set lengthCalculator (lC) {\\n if (typeof lC !== 'function')\\n lC = naiveLength\\n\\n if (lC !== this[LENGTH_CALCULATOR]) {\\n this[LENGTH_CALCULATOR] = lC\\n this[LENGTH] = 0\\n this[LRU_LIST].forEach(hit => {\\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\\n this[LENGTH] += hit.length\\n })\\n }\\n trim(this)\\n }\\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\\n\\n get length () { return this[LENGTH] }\\n get itemCount () { return this[LRU_LIST].length }\\n\\n rforEach (fn, thisp) {\\n thisp = thisp || this\\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\\n const prev = walker.prev\\n forEachStep(this, fn, walker, thisp)\\n walker = prev\\n }\\n }\\n\\n forEach (fn, thisp) {\\n thisp = thisp || this\\n for (let walker = this[LRU_LIST].head; walker !== null;) {\\n const next = walker.next\\n forEachStep(this, fn, walker, thisp)\\n walker = next\\n }\\n }\\n\\n keys () {\\n return this[LRU_LIST].toArray().map(k => k.key)\\n }\\n\\n values () {\\n return this[LRU_LIST].toArray().map(k => k.value)\\n }\\n\\n reset () {\\n if (this[DISPOSE] &&\\n this[LRU_LIST] &&\\n this[LRU_LIST].length) {\\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\\n }\\n\\n this[CACHE] = new Map() // hash of items by key\\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\\n this[LENGTH] = 0 // length of items in the list\\n }\\n\\n dump () {\\n return this[LRU_LIST].map(hit =>\\n isStale(this, hit) ? false : {\\n k: hit.key,\\n v: hit.value,\\n e: hit.now + (hit.maxAge || 0)\\n }).toArray().filter(h => h)\\n }\\n\\n dumpLru () {\\n return this[LRU_LIST]\\n }\\n\\n set (key, value, maxAge) {\\n maxAge = maxAge || this[MAX_AGE]\\n\\n if (maxAge && typeof maxAge !== 'number')\\n throw new TypeError('maxAge must be a number')\\n\\n const now = maxAge ? Date.now() : 0\\n const len = this[LENGTH_CALCULATOR](value, key)\\n\\n if (this[CACHE].has(key)) {\\n if (len > this[MAX]) {\\n del(this, this[CACHE].get(key))\\n return false\\n }\\n\\n const node = this[CACHE].get(key)\\n const item = node.value\\n\\n // dispose of the old one before overwriting\\n // split out into 2 ifs for better coverage tracking\\n if (this[DISPOSE]) {\\n if (!this[NO_DISPOSE_ON_SET])\\n this[DISPOSE](key, item.value)\\n }\\n\\n item.now = now\\n item.maxAge = maxAge\\n item.value = value\\n this[LENGTH] += len - item.length\\n item.length = len\\n this.get(key)\\n trim(this)\\n return true\\n }\\n\\n const hit = new Entry(key, value, len, now, maxAge)\\n\\n // oversized objects fall out of cache automatically.\\n if (hit.length > this[MAX]) {\\n if (this[DISPOSE])\\n this[DISPOSE](key, value)\\n\\n return false\\n }\\n\\n this[LENGTH] += hit.length\\n this[LRU_LIST].unshift(hit)\\n this[CACHE].set(key, this[LRU_LIST].head)\\n trim(this)\\n return true\\n }\\n\\n has (key) {\\n if (!this[CACHE].has(key)) return false\\n const hit = this[CACHE].get(key).value\\n return !isStale(this, hit)\\n }\\n\\n get (key) {\\n return get(this, key, true)\\n }\\n\\n peek (key) {\\n return get(this, key, false)\\n }\\n\\n pop () {\\n const node = this[LRU_LIST].tail\\n if (!node)\\n return null\\n\\n del(this, node)\\n return node.value\\n }\\n\\n del (key) {\\n del(this, this[CACHE].get(key))\\n }\\n\\n load (arr) {\\n // reset the cache\\n this.reset()\\n\\n const now = Date.now()\\n // A previous serialized cache has the most recent items first\\n for (let l = arr.length - 1; l >= 0; l--) {\\n const hit = arr[l]\\n const expiresAt = hit.e || 0\\n if (expiresAt === 0)\\n // the item was created without expiration in a non aged cache\\n this.set(hit.k, hit.v)\\n else {\\n const maxAge = expiresAt - now\\n // dont add already expired items\\n if (maxAge > 0) {\\n this.set(hit.k, hit.v, maxAge)\\n }\\n }\\n }\\n }\\n\\n prune () {\\n this[CACHE].forEach((value, key) => get(this, key, false))\\n }\\n}\\n\\nconst get = (self, key, doUse) => {\\n const node = self[CACHE].get(key)\\n if (node) {\\n const hit = node.value\\n if (isStale(self, hit)) {\\n del(self, node)\\n if (!self[ALLOW_STALE])\\n return undefined\\n } else {\\n if (doUse) {\\n if (self[UPDATE_AGE_ON_GET])\\n node.value.now = Date.now()\\n self[LRU_LIST].unshiftNode(node)\\n }\\n }\\n return hit.value\\n }\\n}\\n\\nconst isStale = (self, hit) => {\\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\\n return false\\n\\n const diff = Date.now() - hit.now\\n return hit.maxAge ? diff > hit.maxAge\\n : self[MAX_AGE] && (diff > self[MAX_AGE])\\n}\\n\\nconst trim = self => {\\n if (self[LENGTH] > self[MAX]) {\\n for (let walker = self[LRU_LIST].tail;\\n self[LENGTH] > self[MAX] && walker !== null;) {\\n // We know that we're about to delete this one, and also\\n // what the next least recently used key will be, so just\\n // go ahead and set it now.\\n const prev = walker.prev\\n del(self, walker)\\n walker = prev\\n }\\n }\\n}\\n\\nconst del = (self, node) => {\\n if (node) {\\n const hit = node.value\\n if (self[DISPOSE])\\n self[DISPOSE](hit.key, hit.value)\\n\\n self[LENGTH] -= hit.length\\n self[CACHE].delete(hit.key)\\n self[LRU_LIST].removeNode(node)\\n }\\n}\\n\\nclass Entry {\\n constructor (key, value, length, now, maxAge) {\\n this.key = key\\n this.value = value\\n this.length = length\\n this.now = now\\n this.maxAge = maxAge || 0\\n }\\n}\\n\\nconst forEachStep = (self, fn, node, thisp) => {\\n let hit = node.value\\n if (isStale(self, hit)) {\\n del(self, node)\\n if (!self[ALLOW_STALE])\\n hit = undefined\\n }\\n if (hit)\\n fn.call(thisp, hit.value, hit.key, self)\\n}\\n\\nmodule.exports = LRUCache\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/node_modules/lru-cache/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/node_modules/yallist/iterator.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/onigasm/node_modules/yallist/iterator.js ***!\n \\***************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\nmodule.exports = function (Yallist) {\\n Yallist.prototype[Symbol.iterator] = function* () {\\n for (let walker = this.head; walker; walker = walker.next) {\\n yield walker.value\\n }\\n }\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/node_modules/yallist/iterator.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/node_modules/yallist/yallist.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/onigasm/node_modules/yallist/yallist.js ***!\n \\**************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nmodule.exports = Yallist\\n\\nYallist.Node = Node\\nYallist.create = Yallist\\n\\nfunction Yallist (list) {\\n var self = this\\n if (!(self instanceof Yallist)) {\\n self = new Yallist()\\n }\\n\\n self.tail = null\\n self.head = null\\n self.length = 0\\n\\n if (list && typeof list.forEach === 'function') {\\n list.forEach(function (item) {\\n self.push(item)\\n })\\n } else if (arguments.length > 0) {\\n for (var i = 0, l = arguments.length; i < l; i++) {\\n self.push(arguments[i])\\n }\\n }\\n\\n return self\\n}\\n\\nYallist.prototype.removeNode = function (node) {\\n if (node.list !== this) {\\n throw new Error('removing node which does not belong to this list')\\n }\\n\\n var next = node.next\\n var prev = node.prev\\n\\n if (next) {\\n next.prev = prev\\n }\\n\\n if (prev) {\\n prev.next = next\\n }\\n\\n if (node === this.head) {\\n this.head = next\\n }\\n if (node === this.tail) {\\n this.tail = prev\\n }\\n\\n node.list.length--\\n node.next = null\\n node.prev = null\\n node.list = null\\n\\n return next\\n}\\n\\nYallist.prototype.unshiftNode = function (node) {\\n if (node === this.head) {\\n return\\n }\\n\\n if (node.list) {\\n node.list.removeNode(node)\\n }\\n\\n var head = this.head\\n node.list = this\\n node.next = head\\n if (head) {\\n head.prev = node\\n }\\n\\n this.head = node\\n if (!this.tail) {\\n this.tail = node\\n }\\n this.length++\\n}\\n\\nYallist.prototype.pushNode = function (node) {\\n if (node === this.tail) {\\n return\\n }\\n\\n if (node.list) {\\n node.list.removeNode(node)\\n }\\n\\n var tail = this.tail\\n node.list = this\\n node.prev = tail\\n if (tail) {\\n tail.next = node\\n }\\n\\n this.tail = node\\n if (!this.head) {\\n this.head = node\\n }\\n this.length++\\n}\\n\\nYallist.prototype.push = function () {\\n for (var i = 0, l = arguments.length; i < l; i++) {\\n push(this, arguments[i])\\n }\\n return this.length\\n}\\n\\nYallist.prototype.unshift = function () {\\n for (var i = 0, l = arguments.length; i < l; i++) {\\n unshift(this, arguments[i])\\n }\\n return this.length\\n}\\n\\nYallist.prototype.pop = function () {\\n if (!this.tail) {\\n return undefined\\n }\\n\\n var res = this.tail.value\\n this.tail = this.tail.prev\\n if (this.tail) {\\n this.tail.next = null\\n } else {\\n this.head = null\\n }\\n this.length--\\n return res\\n}\\n\\nYallist.prototype.shift = function () {\\n if (!this.head) {\\n return undefined\\n }\\n\\n var res = this.head.value\\n this.head = this.head.next\\n if (this.head) {\\n this.head.prev = null\\n } else {\\n this.tail = null\\n }\\n this.length--\\n return res\\n}\\n\\nYallist.prototype.forEach = function (fn, thisp) {\\n thisp = thisp || this\\n for (var walker = this.head, i = 0; walker !== null; i++) {\\n fn.call(thisp, walker.value, i, this)\\n walker = walker.next\\n }\\n}\\n\\nYallist.prototype.forEachReverse = function (fn, thisp) {\\n thisp = thisp || this\\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\\n fn.call(thisp, walker.value, i, this)\\n walker = walker.prev\\n }\\n}\\n\\nYallist.prototype.get = function (n) {\\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\\n // abort out of the list early if we hit a cycle\\n walker = walker.next\\n }\\n if (i === n && walker !== null) {\\n return walker.value\\n }\\n}\\n\\nYallist.prototype.getReverse = function (n) {\\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\\n // abort out of the list early if we hit a cycle\\n walker = walker.prev\\n }\\n if (i === n && walker !== null) {\\n return walker.value\\n }\\n}\\n\\nYallist.prototype.map = function (fn, thisp) {\\n thisp = thisp || this\\n var res = new Yallist()\\n for (var walker = this.head; walker !== null;) {\\n res.push(fn.call(thisp, walker.value, this))\\n walker = walker.next\\n }\\n return res\\n}\\n\\nYallist.prototype.mapReverse = function (fn, thisp) {\\n thisp = thisp || this\\n var res = new Yallist()\\n for (var walker = this.tail; walker !== null;) {\\n res.push(fn.call(thisp, walker.value, this))\\n walker = walker.prev\\n }\\n return res\\n}\\n\\nYallist.prototype.reduce = function (fn, initial) {\\n var acc\\n var walker = this.head\\n if (arguments.length > 1) {\\n acc = initial\\n } else if (this.head) {\\n walker = this.head.next\\n acc = this.head.value\\n } else {\\n throw new TypeError('Reduce of empty list with no initial value')\\n }\\n\\n for (var i = 0; walker !== null; i++) {\\n acc = fn(acc, walker.value, i)\\n walker = walker.next\\n }\\n\\n return acc\\n}\\n\\nYallist.prototype.reduceReverse = function (fn, initial) {\\n var acc\\n var walker = this.tail\\n if (arguments.length > 1) {\\n acc = initial\\n } else if (this.tail) {\\n walker = this.tail.prev\\n acc = this.tail.value\\n } else {\\n throw new TypeError('Reduce of empty list with no initial value')\\n }\\n\\n for (var i = this.length - 1; walker !== null; i--) {\\n acc = fn(acc, walker.value, i)\\n walker = walker.prev\\n }\\n\\n return acc\\n}\\n\\nYallist.prototype.toArray = function () {\\n var arr = new Array(this.length)\\n for (var i = 0, walker = this.head; walker !== null; i++) {\\n arr[i] = walker.value\\n walker = walker.next\\n }\\n return arr\\n}\\n\\nYallist.prototype.toArrayReverse = function () {\\n var arr = new Array(this.length)\\n for (var i = 0, walker = this.tail; walker !== null; i++) {\\n arr[i] = walker.value\\n walker = walker.prev\\n }\\n return arr\\n}\\n\\nYallist.prototype.slice = function (from, to) {\\n to = to || this.length\\n if (to < 0) {\\n to += this.length\\n }\\n from = from || 0\\n if (from < 0) {\\n from += this.length\\n }\\n var ret = new Yallist()\\n if (to < from || to < 0) {\\n return ret\\n }\\n if (from < 0) {\\n from = 0\\n }\\n if (to > this.length) {\\n to = this.length\\n }\\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\\n walker = walker.next\\n }\\n for (; walker !== null && i < to; i++, walker = walker.next) {\\n ret.push(walker.value)\\n }\\n return ret\\n}\\n\\nYallist.prototype.sliceReverse = function (from, to) {\\n to = to || this.length\\n if (to < 0) {\\n to += this.length\\n }\\n from = from || 0\\n if (from < 0) {\\n from += this.length\\n }\\n var ret = new Yallist()\\n if (to < from || to < 0) {\\n return ret\\n }\\n if (from < 0) {\\n from = 0\\n }\\n if (to > this.length) {\\n to = this.length\\n }\\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\\n walker = walker.prev\\n }\\n for (; walker !== null && i > from; i--, walker = walker.prev) {\\n ret.push(walker.value)\\n }\\n return ret\\n}\\n\\nYallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {\\n if (start > this.length) {\\n start = this.length - 1\\n }\\n if (start < 0) {\\n start = this.length + start;\\n }\\n\\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\\n walker = walker.next\\n }\\n\\n var ret = []\\n for (var i = 0; walker && i < deleteCount; i++) {\\n ret.push(walker.value)\\n walker = this.removeNode(walker)\\n }\\n if (walker === null) {\\n walker = this.tail\\n }\\n\\n if (walker !== this.head && walker !== this.tail) {\\n walker = walker.prev\\n }\\n\\n for (var i = 2; i < arguments.length; i++) {\\n walker = insert(this, walker, arguments[i])\\n }\\n return ret;\\n}\\n\\nYallist.prototype.reverse = function () {\\n var head = this.head\\n var tail = this.tail\\n for (var walker = head; walker !== null; walker = walker.prev) {\\n var p = walker.prev\\n walker.prev = walker.next\\n walker.next = p\\n }\\n this.head = tail\\n this.tail = head\\n return this\\n}\\n\\nfunction insert (self, node, value) {\\n var inserted = node === self.head ?\\n new Node(value, null, node, self) :\\n new Node(value, node, node.next, self)\\n\\n if (inserted.next === null) {\\n self.tail = inserted\\n }\\n if (inserted.prev === null) {\\n self.head = inserted\\n }\\n\\n self.length++\\n\\n return inserted\\n}\\n\\nfunction push (self, item) {\\n self.tail = new Node(item, self.tail, null, self)\\n if (!self.head) {\\n self.head = self.tail\\n }\\n self.length++\\n}\\n\\nfunction unshift (self, item) {\\n self.head = new Node(item, null, self.head, self)\\n if (!self.tail) {\\n self.tail = self.head\\n }\\n self.length++\\n}\\n\\nfunction Node (value, prev, next, list) {\\n if (!(this instanceof Node)) {\\n return new Node(value, prev, next, list)\\n }\\n\\n this.list = list\\n this.value = value\\n\\n if (prev) {\\n prev.next = this\\n this.prev = prev\\n } else {\\n this.prev = null\\n }\\n\\n if (next) {\\n next.prev = this\\n this.next = next\\n } else {\\n this.next = null\\n }\\n}\\n\\ntry {\\n // add if support for Symbol.iterator is present\\n __webpack_require__(/*! ./iterator.js */ \\\"./node_modules/onigasm/node_modules/yallist/iterator.js\\\")(Yallist)\\n} catch (er) {}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/node_modules/yallist/yallist.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/path/path.js\":\n/*!***********************************!*\\\n !*** ./node_modules/path/path.js ***!\n \\***********************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \\\"./node_modules/process/browser.js\\\");\\n// Copyright Joyent, Inc. and other Node contributors.\\r\\n//\\r\\n// Permission is hereby granted, free of charge, to any person obtaining a\\r\\n// copy of this software and associated documentation files (the\\r\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\r\\n// without limitation the rights to use, copy, modify, merge, publish,\\r\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\r\\n// persons to whom the Software is furnished to do so, subject to the\\r\\n// following conditions:\\r\\n//\\r\\n// The above copyright notice and this permission notice shall be included\\r\\n// in all copies or substantial portions of the Software.\\r\\n//\\r\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\r\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\r\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\r\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\r\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\r\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\r\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\r\\n\\r\\n\\r\\n\\r\\n\\r\\nvar isWindows = process.platform === 'win32';\\r\\nvar util = __webpack_require__(/*! util */ \\\"./node_modules/util/util.js\\\");\\r\\n\\r\\n\\r\\n// resolves . and .. elements in a path array with directory names there\\r\\n// must be no slashes or device names (c:\\\\) in the array\\r\\n// (so also no leading and trailing slashes - it does not distinguish\\r\\n// relative and absolute paths)\\r\\nfunction normalizeArray(parts, allowAboveRoot) {\\r\\n var res = [];\\r\\n for (var i = 0; i < parts.length; i++) {\\r\\n var p = parts[i];\\r\\n\\r\\n // ignore empty parts\\r\\n if (!p || p === '.')\\r\\n continue;\\r\\n\\r\\n if (p === '..') {\\r\\n if (res.length && res[res.length - 1] !== '..') {\\r\\n res.pop();\\r\\n } else if (allowAboveRoot) {\\r\\n res.push('..');\\r\\n }\\r\\n } else {\\r\\n res.push(p);\\r\\n }\\r\\n }\\r\\n\\r\\n return res;\\r\\n}\\r\\n\\r\\n// returns an array with empty elements removed from either end of the input\\r\\n// array or the original array if no elements need to be removed\\r\\nfunction trimArray(arr) {\\r\\n var lastIndex = arr.length - 1;\\r\\n var start = 0;\\r\\n for (; start <= lastIndex; start++) {\\r\\n if (arr[start])\\r\\n break;\\r\\n }\\r\\n\\r\\n var end = lastIndex;\\r\\n for (; end >= 0; end--) {\\r\\n if (arr[end])\\r\\n break;\\r\\n }\\r\\n\\r\\n if (start === 0 && end === lastIndex)\\r\\n return arr;\\r\\n if (start > end)\\r\\n return [];\\r\\n return arr.slice(start, end + 1);\\r\\n}\\r\\n\\r\\n// Regex to split a windows path into three parts: [*, device, slash,\\r\\n// tail] windows-only\\r\\nvar splitDeviceRe =\\r\\n /^([a-zA-Z]:|[\\\\\\\\\\\\/]{2}[^\\\\\\\\\\\\/]+[\\\\\\\\\\\\/]+[^\\\\\\\\\\\\/]+)?([\\\\\\\\\\\\/])?([\\\\s\\\\S]*?)$/;\\r\\n\\r\\n// Regex to split the tail part of the above into [*, dir, basename, ext]\\r\\nvar splitTailRe =\\r\\n /^([\\\\s\\\\S]*?)((?:\\\\.{1,2}|[^\\\\\\\\\\\\/]+?|)(\\\\.[^.\\\\/\\\\\\\\]*|))(?:[\\\\\\\\\\\\/]*)$/;\\r\\n\\r\\nvar win32 = {};\\r\\n\\r\\n// Function to split a filename into [root, dir, basename, ext]\\r\\nfunction win32SplitPath(filename) {\\r\\n // Separate device+slash from tail\\r\\n var result = splitDeviceRe.exec(filename),\\r\\n device = (result[1] || '') + (result[2] || ''),\\r\\n tail = result[3] || '';\\r\\n // Split the tail into dir, basename and extension\\r\\n var result2 = splitTailRe.exec(tail),\\r\\n dir = result2[1],\\r\\n basename = result2[2],\\r\\n ext = result2[3];\\r\\n return [device, dir, basename, ext];\\r\\n}\\r\\n\\r\\nfunction win32StatPath(path) {\\r\\n var result = splitDeviceRe.exec(path),\\r\\n device = result[1] || '',\\r\\n isUnc = !!device && device[1] !== ':';\\r\\n return {\\r\\n device: device,\\r\\n isUnc: isUnc,\\r\\n isAbsolute: isUnc || !!result[2], // UNC paths are always absolute\\r\\n tail: result[3]\\r\\n };\\r\\n}\\r\\n\\r\\nfunction normalizeUNCRoot(device) {\\r\\n return '\\\\\\\\\\\\\\\\' + device.replace(/^[\\\\\\\\\\\\/]+/, '').replace(/[\\\\\\\\\\\\/]+/g, '\\\\\\\\');\\r\\n}\\r\\n\\r\\n// path.resolve([from ...], to)\\r\\nwin32.resolve = function() {\\r\\n var resolvedDevice = '',\\r\\n resolvedTail = '',\\r\\n resolvedAbsolute = false;\\r\\n\\r\\n for (var i = arguments.length - 1; i >= -1; i--) {\\r\\n var path;\\r\\n if (i >= 0) {\\r\\n path = arguments[i];\\r\\n } else if (!resolvedDevice) {\\r\\n path = process.cwd();\\r\\n } else {\\r\\n // Windows has the concept of drive-specific current working\\r\\n // directories. If we've resolved a drive letter but not yet an\\r\\n // absolute path, get cwd for that drive. We're sure the device is not\\r\\n // an unc path at this points, because unc paths are always absolute.\\r\\n path = process.env['=' + resolvedDevice];\\r\\n // Verify that a drive-local cwd was found and that it actually points\\r\\n // to our drive. If not, default to the drive's root.\\r\\n if (!path || path.substr(0, 3).toLowerCase() !==\\r\\n resolvedDevice.toLowerCase() + '\\\\\\\\') {\\r\\n path = resolvedDevice + '\\\\\\\\';\\r\\n }\\r\\n }\\r\\n\\r\\n // Skip empty and invalid entries\\r\\n if (!util.isString(path)) {\\r\\n throw new TypeError('Arguments to path.resolve must be strings');\\r\\n } else if (!path) {\\r\\n continue;\\r\\n }\\r\\n\\r\\n var result = win32StatPath(path),\\r\\n device = result.device,\\r\\n isUnc = result.isUnc,\\r\\n isAbsolute = result.isAbsolute,\\r\\n tail = result.tail;\\r\\n\\r\\n if (device &&\\r\\n resolvedDevice &&\\r\\n device.toLowerCase() !== resolvedDevice.toLowerCase()) {\\r\\n // This path points to another device so it is not applicable\\r\\n continue;\\r\\n }\\r\\n\\r\\n if (!resolvedDevice) {\\r\\n resolvedDevice = device;\\r\\n }\\r\\n if (!resolvedAbsolute) {\\r\\n resolvedTail = tail + '\\\\\\\\' + resolvedTail;\\r\\n resolvedAbsolute = isAbsolute;\\r\\n }\\r\\n\\r\\n if (resolvedDevice && resolvedAbsolute) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n // Convert slashes to backslashes when `resolvedDevice` points to an UNC\\r\\n // root. Also squash multiple slashes into a single one where appropriate.\\r\\n if (isUnc) {\\r\\n resolvedDevice = normalizeUNCRoot(resolvedDevice);\\r\\n }\\r\\n\\r\\n // At this point the path should be resolved to a full absolute path,\\r\\n // but handle relative paths to be safe (might happen when process.cwd()\\r\\n // fails)\\r\\n\\r\\n // Normalize the tail path\\r\\n resolvedTail = normalizeArray(resolvedTail.split(/[\\\\\\\\\\\\/]+/),\\r\\n !resolvedAbsolute).join('\\\\\\\\');\\r\\n\\r\\n return (resolvedDevice + (resolvedAbsolute ? '\\\\\\\\' : '') + resolvedTail) ||\\r\\n '.';\\r\\n};\\r\\n\\r\\n\\r\\nwin32.normalize = function(path) {\\r\\n var result = win32StatPath(path),\\r\\n device = result.device,\\r\\n isUnc = result.isUnc,\\r\\n isAbsolute = result.isAbsolute,\\r\\n tail = result.tail,\\r\\n trailingSlash = /[\\\\\\\\\\\\/]$/.test(tail);\\r\\n\\r\\n // Normalize the tail path\\r\\n tail = normalizeArray(tail.split(/[\\\\\\\\\\\\/]+/), !isAbsolute).join('\\\\\\\\');\\r\\n\\r\\n if (!tail && !isAbsolute) {\\r\\n tail = '.';\\r\\n }\\r\\n if (tail && trailingSlash) {\\r\\n tail += '\\\\\\\\';\\r\\n }\\r\\n\\r\\n // Convert slashes to backslashes when `device` points to an UNC root.\\r\\n // Also squash multiple slashes into a single one where appropriate.\\r\\n if (isUnc) {\\r\\n device = normalizeUNCRoot(device);\\r\\n }\\r\\n\\r\\n return device + (isAbsolute ? '\\\\\\\\' : '') + tail;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.isAbsolute = function(path) {\\r\\n return win32StatPath(path).isAbsolute;\\r\\n};\\r\\n\\r\\nwin32.join = function() {\\r\\n var paths = [];\\r\\n for (var i = 0; i < arguments.length; i++) {\\r\\n var arg = arguments[i];\\r\\n if (!util.isString(arg)) {\\r\\n throw new TypeError('Arguments to path.join must be strings');\\r\\n }\\r\\n if (arg) {\\r\\n paths.push(arg);\\r\\n }\\r\\n }\\r\\n\\r\\n var joined = paths.join('\\\\\\\\');\\r\\n\\r\\n // Make sure that the joined path doesn't start with two slashes, because\\r\\n // normalize() will mistake it for an UNC path then.\\r\\n //\\r\\n // This step is skipped when it is very clear that the user actually\\r\\n // intended to point at an UNC path. This is assumed when the first\\r\\n // non-empty string arguments starts with exactly two slashes followed by\\r\\n // at least one more non-slash character.\\r\\n //\\r\\n // Note that for normalize() to treat a path as an UNC path it needs to\\r\\n // have at least 2 components, so we don't filter for that here.\\r\\n // This means that the user can use join to construct UNC paths from\\r\\n // a server name and a share name; for example:\\r\\n // path.join('//server', 'share') -> '\\\\\\\\\\\\\\\\server\\\\\\\\share\\\\')\\r\\n if (!/^[\\\\\\\\\\\\/]{2}[^\\\\\\\\\\\\/]/.test(paths[0])) {\\r\\n joined = joined.replace(/^[\\\\\\\\\\\\/]{2,}/, '\\\\\\\\');\\r\\n }\\r\\n\\r\\n return win32.normalize(joined);\\r\\n};\\r\\n\\r\\n\\r\\n// path.relative(from, to)\\r\\n// it will solve the relative path from 'from' to 'to', for instance:\\r\\n// from = 'C:\\\\\\\\orandea\\\\\\\\test\\\\\\\\aaa'\\r\\n// to = 'C:\\\\\\\\orandea\\\\\\\\impl\\\\\\\\bbb'\\r\\n// The output of the function should be: '..\\\\\\\\..\\\\\\\\impl\\\\\\\\bbb'\\r\\nwin32.relative = function(from, to) {\\r\\n from = win32.resolve(from);\\r\\n to = win32.resolve(to);\\r\\n\\r\\n // windows is not case sensitive\\r\\n var lowerFrom = from.toLowerCase();\\r\\n var lowerTo = to.toLowerCase();\\r\\n\\r\\n var toParts = trimArray(to.split('\\\\\\\\'));\\r\\n\\r\\n var lowerFromParts = trimArray(lowerFrom.split('\\\\\\\\'));\\r\\n var lowerToParts = trimArray(lowerTo.split('\\\\\\\\'));\\r\\n\\r\\n var length = Math.min(lowerFromParts.length, lowerToParts.length);\\r\\n var samePartsLength = length;\\r\\n for (var i = 0; i < length; i++) {\\r\\n if (lowerFromParts[i] !== lowerToParts[i]) {\\r\\n samePartsLength = i;\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n if (samePartsLength == 0) {\\r\\n return to;\\r\\n }\\r\\n\\r\\n var outputParts = [];\\r\\n for (var i = samePartsLength; i < lowerFromParts.length; i++) {\\r\\n outputParts.push('..');\\r\\n }\\r\\n\\r\\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\\r\\n\\r\\n return outputParts.join('\\\\\\\\');\\r\\n};\\r\\n\\r\\n\\r\\nwin32._makeLong = function(path) {\\r\\n // Note: this will *probably* throw somewhere.\\r\\n if (!util.isString(path))\\r\\n return path;\\r\\n\\r\\n if (!path) {\\r\\n return '';\\r\\n }\\r\\n\\r\\n var resolvedPath = win32.resolve(path);\\r\\n\\r\\n if (/^[a-zA-Z]\\\\:\\\\\\\\/.test(resolvedPath)) {\\r\\n // path is local filesystem path, which needs to be converted\\r\\n // to long UNC path.\\r\\n return '\\\\\\\\\\\\\\\\?\\\\\\\\' + resolvedPath;\\r\\n } else if (/^\\\\\\\\\\\\\\\\[^?.]/.test(resolvedPath)) {\\r\\n // path is network UNC path, which needs to be converted\\r\\n // to long UNC path.\\r\\n return '\\\\\\\\\\\\\\\\?\\\\\\\\UNC\\\\\\\\' + resolvedPath.substring(2);\\r\\n }\\r\\n\\r\\n return path;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.dirname = function(path) {\\r\\n var result = win32SplitPath(path),\\r\\n root = result[0],\\r\\n dir = result[1];\\r\\n\\r\\n if (!root && !dir) {\\r\\n // No dirname whatsoever\\r\\n return '.';\\r\\n }\\r\\n\\r\\n if (dir) {\\r\\n // It has a dirname, strip trailing slash\\r\\n dir = dir.substr(0, dir.length - 1);\\r\\n }\\r\\n\\r\\n return root + dir;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.basename = function(path, ext) {\\r\\n var f = win32SplitPath(path)[2];\\r\\n // TODO: make this comparison case-insensitive on windows?\\r\\n if (ext && f.substr(-1 * ext.length) === ext) {\\r\\n f = f.substr(0, f.length - ext.length);\\r\\n }\\r\\n return f;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.extname = function(path) {\\r\\n return win32SplitPath(path)[3];\\r\\n};\\r\\n\\r\\n\\r\\nwin32.format = function(pathObject) {\\r\\n if (!util.isObject(pathObject)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathObject' must be an object, not \\\" + typeof pathObject\\r\\n );\\r\\n }\\r\\n\\r\\n var root = pathObject.root || '';\\r\\n\\r\\n if (!util.isString(root)) {\\r\\n throw new TypeError(\\r\\n \\\"'pathObject.root' must be a string or undefined, not \\\" +\\r\\n typeof pathObject.root\\r\\n );\\r\\n }\\r\\n\\r\\n var dir = pathObject.dir;\\r\\n var base = pathObject.base || '';\\r\\n if (!dir) {\\r\\n return base;\\r\\n }\\r\\n if (dir[dir.length - 1] === win32.sep) {\\r\\n return dir + base;\\r\\n }\\r\\n return dir + win32.sep + base;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.parse = function(pathString) {\\r\\n if (!util.isString(pathString)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathString' must be a string, not \\\" + typeof pathString\\r\\n );\\r\\n }\\r\\n var allParts = win32SplitPath(pathString);\\r\\n if (!allParts || allParts.length !== 4) {\\r\\n throw new TypeError(\\\"Invalid path '\\\" + pathString + \\\"'\\\");\\r\\n }\\r\\n return {\\r\\n root: allParts[0],\\r\\n dir: allParts[0] + allParts[1].slice(0, -1),\\r\\n base: allParts[2],\\r\\n ext: allParts[3],\\r\\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\\r\\n };\\r\\n};\\r\\n\\r\\n\\r\\nwin32.sep = '\\\\\\\\';\\r\\nwin32.delimiter = ';';\\r\\n\\r\\n\\r\\n// Split a filename into [root, dir, basename, ext], unix version\\r\\n// 'root' is just a slash, or nothing.\\r\\nvar splitPathRe =\\r\\n /^(\\\\/?|)([\\\\s\\\\S]*?)((?:\\\\.{1,2}|[^\\\\/]+?|)(\\\\.[^.\\\\/]*|))(?:[\\\\/]*)$/;\\r\\nvar posix = {};\\r\\n\\r\\n\\r\\nfunction posixSplitPath(filename) {\\r\\n return splitPathRe.exec(filename).slice(1);\\r\\n}\\r\\n\\r\\n\\r\\n// path.resolve([from ...], to)\\r\\n// posix version\\r\\nposix.resolve = function() {\\r\\n var resolvedPath = '',\\r\\n resolvedAbsolute = false;\\r\\n\\r\\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\\r\\n var path = (i >= 0) ? arguments[i] : process.cwd();\\r\\n\\r\\n // Skip empty and invalid entries\\r\\n if (!util.isString(path)) {\\r\\n throw new TypeError('Arguments to path.resolve must be strings');\\r\\n } else if (!path) {\\r\\n continue;\\r\\n }\\r\\n\\r\\n resolvedPath = path + '/' + resolvedPath;\\r\\n resolvedAbsolute = path[0] === '/';\\r\\n }\\r\\n\\r\\n // At this point the path should be resolved to a full absolute path, but\\r\\n // handle relative paths to be safe (might happen when process.cwd() fails)\\r\\n\\r\\n // Normalize the path\\r\\n resolvedPath = normalizeArray(resolvedPath.split('/'),\\r\\n !resolvedAbsolute).join('/');\\r\\n\\r\\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\\r\\n};\\r\\n\\r\\n// path.normalize(path)\\r\\n// posix version\\r\\nposix.normalize = function(path) {\\r\\n var isAbsolute = posix.isAbsolute(path),\\r\\n trailingSlash = path && path[path.length - 1] === '/';\\r\\n\\r\\n // Normalize the path\\r\\n path = normalizeArray(path.split('/'), !isAbsolute).join('/');\\r\\n\\r\\n if (!path && !isAbsolute) {\\r\\n path = '.';\\r\\n }\\r\\n if (path && trailingSlash) {\\r\\n path += '/';\\r\\n }\\r\\n\\r\\n return (isAbsolute ? '/' : '') + path;\\r\\n};\\r\\n\\r\\n// posix version\\r\\nposix.isAbsolute = function(path) {\\r\\n return path.charAt(0) === '/';\\r\\n};\\r\\n\\r\\n// posix version\\r\\nposix.join = function() {\\r\\n var path = '';\\r\\n for (var i = 0; i < arguments.length; i++) {\\r\\n var segment = arguments[i];\\r\\n if (!util.isString(segment)) {\\r\\n throw new TypeError('Arguments to path.join must be strings');\\r\\n }\\r\\n if (segment) {\\r\\n if (!path) {\\r\\n path += segment;\\r\\n } else {\\r\\n path += '/' + segment;\\r\\n }\\r\\n }\\r\\n }\\r\\n return posix.normalize(path);\\r\\n};\\r\\n\\r\\n\\r\\n// path.relative(from, to)\\r\\n// posix version\\r\\nposix.relative = function(from, to) {\\r\\n from = posix.resolve(from).substr(1);\\r\\n to = posix.resolve(to).substr(1);\\r\\n\\r\\n var fromParts = trimArray(from.split('/'));\\r\\n var toParts = trimArray(to.split('/'));\\r\\n\\r\\n var length = Math.min(fromParts.length, toParts.length);\\r\\n var samePartsLength = length;\\r\\n for (var i = 0; i < length; i++) {\\r\\n if (fromParts[i] !== toParts[i]) {\\r\\n samePartsLength = i;\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n var outputParts = [];\\r\\n for (var i = samePartsLength; i < fromParts.length; i++) {\\r\\n outputParts.push('..');\\r\\n }\\r\\n\\r\\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\\r\\n\\r\\n return outputParts.join('/');\\r\\n};\\r\\n\\r\\n\\r\\nposix._makeLong = function(path) {\\r\\n return path;\\r\\n};\\r\\n\\r\\n\\r\\nposix.dirname = function(path) {\\r\\n var result = posixSplitPath(path),\\r\\n root = result[0],\\r\\n dir = result[1];\\r\\n\\r\\n if (!root && !dir) {\\r\\n // No dirname whatsoever\\r\\n return '.';\\r\\n }\\r\\n\\r\\n if (dir) {\\r\\n // It has a dirname, strip trailing slash\\r\\n dir = dir.substr(0, dir.length - 1);\\r\\n }\\r\\n\\r\\n return root + dir;\\r\\n};\\r\\n\\r\\n\\r\\nposix.basename = function(path, ext) {\\r\\n var f = posixSplitPath(path)[2];\\r\\n // TODO: make this comparison case-insensitive on windows?\\r\\n if (ext && f.substr(-1 * ext.length) === ext) {\\r\\n f = f.substr(0, f.length - ext.length);\\r\\n }\\r\\n return f;\\r\\n};\\r\\n\\r\\n\\r\\nposix.extname = function(path) {\\r\\n return posixSplitPath(path)[3];\\r\\n};\\r\\n\\r\\n\\r\\nposix.format = function(pathObject) {\\r\\n if (!util.isObject(pathObject)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathObject' must be an object, not \\\" + typeof pathObject\\r\\n );\\r\\n }\\r\\n\\r\\n var root = pathObject.root || '';\\r\\n\\r\\n if (!util.isString(root)) {\\r\\n throw new TypeError(\\r\\n \\\"'pathObject.root' must be a string or undefined, not \\\" +\\r\\n typeof pathObject.root\\r\\n );\\r\\n }\\r\\n\\r\\n var dir = pathObject.dir ? pathObject.dir + posix.sep : '';\\r\\n var base = pathObject.base || '';\\r\\n return dir + base;\\r\\n};\\r\\n\\r\\n\\r\\nposix.parse = function(pathString) {\\r\\n if (!util.isString(pathString)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathString' must be a string, not \\\" + typeof pathString\\r\\n );\\r\\n }\\r\\n var allParts = posixSplitPath(pathString);\\r\\n if (!allParts || allParts.length !== 4) {\\r\\n throw new TypeError(\\\"Invalid path '\\\" + pathString + \\\"'\\\");\\r\\n }\\r\\n allParts[1] = allParts[1] || '';\\r\\n allParts[2] = allParts[2] || '';\\r\\n allParts[3] = allParts[3] || '';\\r\\n\\r\\n return {\\r\\n root: allParts[0],\\r\\n dir: allParts[0] + allParts[1].slice(0, -1),\\r\\n base: allParts[2],\\r\\n ext: allParts[3],\\r\\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\\r\\n };\\r\\n};\\r\\n\\r\\n\\r\\nposix.sep = '/';\\r\\nposix.delimiter = ':';\\r\\n\\r\\n\\r\\nif (isWindows)\\r\\n module.exports = win32;\\r\\nelse /* posix */\\r\\n module.exports = posix;\\r\\n\\r\\nmodule.exports.posix = posix;\\r\\nmodule.exports.win32 = win32;\\r\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/path/path.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/process/browser.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/process/browser.js ***!\n \\*****************************************/\n/***/ ((module) => {\n\neval(\"// shim for using process in browser\\nvar process = module.exports = {};\\n\\n// cached from whatever global is present so that test runners that stub it\\n// don't break things. But we need to wrap it in a try catch in case it is\\n// wrapped in strict mode code which doesn't define any globals. It's inside a\\n// function because try/catches deoptimize in certain engines.\\n\\nvar cachedSetTimeout;\\nvar cachedClearTimeout;\\n\\nfunction defaultSetTimout() {\\n throw new Error('setTimeout has not been defined');\\n}\\nfunction defaultClearTimeout () {\\n throw new Error('clearTimeout has not been defined');\\n}\\n(function () {\\n try {\\n if (typeof setTimeout === 'function') {\\n cachedSetTimeout = setTimeout;\\n } else {\\n cachedSetTimeout = defaultSetTimout;\\n }\\n } catch (e) {\\n cachedSetTimeout = defaultSetTimout;\\n }\\n try {\\n if (typeof clearTimeout === 'function') {\\n cachedClearTimeout = clearTimeout;\\n } else {\\n cachedClearTimeout = defaultClearTimeout;\\n }\\n } catch (e) {\\n cachedClearTimeout = defaultClearTimeout;\\n }\\n} ())\\nfunction runTimeout(fun) {\\n if (cachedSetTimeout === setTimeout) {\\n //normal enviroments in sane situations\\n return setTimeout(fun, 0);\\n }\\n // if setTimeout wasn't available but was latter defined\\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\\n cachedSetTimeout = setTimeout;\\n return setTimeout(fun, 0);\\n }\\n try {\\n // when when somebody has screwed with setTimeout but no I.E. maddness\\n return cachedSetTimeout(fun, 0);\\n } catch(e){\\n try {\\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n return cachedSetTimeout.call(null, fun, 0);\\n } catch(e){\\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\\n return cachedSetTimeout.call(this, fun, 0);\\n }\\n }\\n\\n\\n}\\nfunction runClearTimeout(marker) {\\n if (cachedClearTimeout === clearTimeout) {\\n //normal enviroments in sane situations\\n return clearTimeout(marker);\\n }\\n // if clearTimeout wasn't available but was latter defined\\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\\n cachedClearTimeout = clearTimeout;\\n return clearTimeout(marker);\\n }\\n try {\\n // when when somebody has screwed with setTimeout but no I.E. maddness\\n return cachedClearTimeout(marker);\\n } catch (e){\\n try {\\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n return cachedClearTimeout.call(null, marker);\\n } catch (e){\\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\\n return cachedClearTimeout.call(this, marker);\\n }\\n }\\n\\n\\n\\n}\\nvar queue = [];\\nvar draining = false;\\nvar currentQueue;\\nvar queueIndex = -1;\\n\\nfunction cleanUpNextTick() {\\n if (!draining || !currentQueue) {\\n return;\\n }\\n draining = false;\\n if (currentQueue.length) {\\n queue = currentQueue.concat(queue);\\n } else {\\n queueIndex = -1;\\n }\\n if (queue.length) {\\n drainQueue();\\n }\\n}\\n\\nfunction drainQueue() {\\n if (draining) {\\n return;\\n }\\n var timeout = runTimeout(cleanUpNextTick);\\n draining = true;\\n\\n var len = queue.length;\\n while(len) {\\n currentQueue = queue;\\n queue = [];\\n while (++queueIndex < len) {\\n if (currentQueue) {\\n currentQueue[queueIndex].run();\\n }\\n }\\n queueIndex = -1;\\n len = queue.length;\\n }\\n currentQueue = null;\\n draining = false;\\n runClearTimeout(timeout);\\n}\\n\\nprocess.nextTick = function (fun) {\\n var args = new Array(arguments.length - 1);\\n if (arguments.length > 1) {\\n for (var i = 1; i < arguments.length; i++) {\\n args[i - 1] = arguments[i];\\n }\\n }\\n queue.push(new Item(fun, args));\\n if (queue.length === 1 && !draining) {\\n runTimeout(drainQueue);\\n }\\n};\\n\\n// v8 likes predictible objects\\nfunction Item(fun, array) {\\n this.fun = fun;\\n this.array = array;\\n}\\nItem.prototype.run = function () {\\n this.fun.apply(null, this.array);\\n};\\nprocess.title = 'browser';\\nprocess.browser = true;\\nprocess.env = {};\\nprocess.argv = [];\\nprocess.version = ''; // empty string to avoid regexp issues\\nprocess.versions = {};\\n\\nfunction noop() {}\\n\\nprocess.on = noop;\\nprocess.addListener = noop;\\nprocess.once = noop;\\nprocess.off = noop;\\nprocess.removeListener = noop;\\nprocess.removeAllListeners = noop;\\nprocess.emit = noop;\\nprocess.prependListener = noop;\\nprocess.prependOnceListener = noop;\\n\\nprocess.listeners = function (name) { return [] }\\n\\nprocess.binding = function (name) {\\n throw new Error('process.binding is not supported');\\n};\\n\\nprocess.cwd = function () { return '/' };\\nprocess.chdir = function (dir) {\\n throw new Error('process.chdir is not supported');\\n};\\nprocess.umask = function() { return 0; };\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/process/browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/react/cjs/react-jsx-runtime.development.js\":\n/*!*****************************************************************!*\\\n !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!\n \\*****************************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"/** @license React v17.0.2\\n * react-jsx-runtime.development.js\\n *\\n * Copyright (c) Facebook, Inc. and its affiliates.\\n *\\n * This source code is licensed under the MIT license found in the\\n * LICENSE file in the root directory of this source tree.\\n */\\n\\n\\n\\nif (true) {\\n (function() {\\n'use strict';\\n\\nvar React = __webpack_require__(/*! react */ \\\"react\\\");\\nvar _assign = __webpack_require__(/*! object-assign */ \\\"./node_modules/object-assign/index.js\\\");\\n\\n// ATTENTION\\n// When adding new symbols to this file,\\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\\n// nor polyfill, then a plain number is used for performance.\\nvar REACT_ELEMENT_TYPE = 0xeac7;\\nvar REACT_PORTAL_TYPE = 0xeaca;\\nexports.Fragment = 0xeacb;\\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\\nvar REACT_PROFILER_TYPE = 0xead2;\\nvar REACT_PROVIDER_TYPE = 0xeacd;\\nvar REACT_CONTEXT_TYPE = 0xeace;\\nvar REACT_FORWARD_REF_TYPE = 0xead0;\\nvar REACT_SUSPENSE_TYPE = 0xead1;\\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\\nvar REACT_MEMO_TYPE = 0xead3;\\nvar REACT_LAZY_TYPE = 0xead4;\\nvar REACT_BLOCK_TYPE = 0xead9;\\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\\nvar REACT_SCOPE_TYPE = 0xead7;\\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\\n\\nif (typeof Symbol === 'function' && Symbol.for) {\\n var symbolFor = Symbol.for;\\n REACT_ELEMENT_TYPE = symbolFor('react.element');\\n REACT_PORTAL_TYPE = symbolFor('react.portal');\\n exports.Fragment = symbolFor('react.fragment');\\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\\n REACT_CONTEXT_TYPE = symbolFor('react.context');\\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\\n REACT_MEMO_TYPE = symbolFor('react.memo');\\n REACT_LAZY_TYPE = symbolFor('react.lazy');\\n REACT_BLOCK_TYPE = symbolFor('react.block');\\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\\n REACT_SCOPE_TYPE = symbolFor('react.scope');\\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\\n}\\n\\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\\nfunction getIteratorFn(maybeIterable) {\\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\\n return null;\\n }\\n\\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\\n\\n if (typeof maybeIterator === 'function') {\\n return maybeIterator;\\n }\\n\\n return null;\\n}\\n\\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\\n\\nfunction error(format) {\\n {\\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n args[_key2 - 1] = arguments[_key2];\\n }\\n\\n printWarning('error', format, args);\\n }\\n}\\n\\nfunction printWarning(level, format, args) {\\n // When changing this logic, you might want to also\\n // update consoleWithStackDev.www.js as well.\\n {\\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\\n var stack = ReactDebugCurrentFrame.getStackAddendum();\\n\\n if (stack !== '') {\\n format += '%s';\\n args = args.concat([stack]);\\n }\\n\\n var argsWithFormat = args.map(function (item) {\\n return '' + item;\\n }); // Careful: RN currently depends on this prefix\\n\\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\\n // breaks IE9: https://github.com/facebook/react/issues/13610\\n // eslint-disable-next-line react-internal/no-production-logging\\n\\n Function.prototype.apply.call(console[level], console, argsWithFormat);\\n }\\n}\\n\\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\\n\\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\\n\\nfunction isValidElementType(type) {\\n if (typeof type === 'string' || typeof type === 'function') {\\n return true;\\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\\n\\n\\n if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {\\n return true;\\n }\\n\\n if (typeof type === 'object' && type !== null) {\\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {\\n return true;\\n }\\n }\\n\\n return false;\\n}\\n\\nfunction getWrappedName(outerType, innerType, wrapperName) {\\n var functionName = innerType.displayName || innerType.name || '';\\n return outerType.displayName || (functionName !== '' ? wrapperName + \\\"(\\\" + functionName + \\\")\\\" : wrapperName);\\n}\\n\\nfunction getContextName(type) {\\n return type.displayName || 'Context';\\n}\\n\\nfunction getComponentName(type) {\\n if (type == null) {\\n // Host root, text node or just invalid type.\\n return null;\\n }\\n\\n {\\n if (typeof type.tag === 'number') {\\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\\n }\\n }\\n\\n if (typeof type === 'function') {\\n return type.displayName || type.name || null;\\n }\\n\\n if (typeof type === 'string') {\\n return type;\\n }\\n\\n switch (type) {\\n case exports.Fragment:\\n return 'Fragment';\\n\\n case REACT_PORTAL_TYPE:\\n return 'Portal';\\n\\n case REACT_PROFILER_TYPE:\\n return 'Profiler';\\n\\n case REACT_STRICT_MODE_TYPE:\\n return 'StrictMode';\\n\\n case REACT_SUSPENSE_TYPE:\\n return 'Suspense';\\n\\n case REACT_SUSPENSE_LIST_TYPE:\\n return 'SuspenseList';\\n }\\n\\n if (typeof type === 'object') {\\n switch (type.$$typeof) {\\n case REACT_CONTEXT_TYPE:\\n var context = type;\\n return getContextName(context) + '.Consumer';\\n\\n case REACT_PROVIDER_TYPE:\\n var provider = type;\\n return getContextName(provider._context) + '.Provider';\\n\\n case REACT_FORWARD_REF_TYPE:\\n return getWrappedName(type, type.render, 'ForwardRef');\\n\\n case REACT_MEMO_TYPE:\\n return getComponentName(type.type);\\n\\n case REACT_BLOCK_TYPE:\\n return getComponentName(type._render);\\n\\n case REACT_LAZY_TYPE:\\n {\\n var lazyComponent = type;\\n var payload = lazyComponent._payload;\\n var init = lazyComponent._init;\\n\\n try {\\n return getComponentName(init(payload));\\n } catch (x) {\\n return null;\\n }\\n }\\n }\\n }\\n\\n return null;\\n}\\n\\n// Helpers to patch console.logs to avoid logging during side-effect free\\n// replaying on render function. This currently only patches the object\\n// lazily which won't cover if the log function was extracted eagerly.\\n// We could also eagerly patch the method.\\nvar disabledDepth = 0;\\nvar prevLog;\\nvar prevInfo;\\nvar prevWarn;\\nvar prevError;\\nvar prevGroup;\\nvar prevGroupCollapsed;\\nvar prevGroupEnd;\\n\\nfunction disabledLog() {}\\n\\ndisabledLog.__reactDisabledLog = true;\\nfunction disableLogs() {\\n {\\n if (disabledDepth === 0) {\\n /* eslint-disable react-internal/no-production-logging */\\n prevLog = console.log;\\n prevInfo = console.info;\\n prevWarn = console.warn;\\n prevError = console.error;\\n prevGroup = console.group;\\n prevGroupCollapsed = console.groupCollapsed;\\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\\n\\n var props = {\\n configurable: true,\\n enumerable: true,\\n value: disabledLog,\\n writable: true\\n }; // $FlowFixMe Flow thinks console is immutable.\\n\\n Object.defineProperties(console, {\\n info: props,\\n log: props,\\n warn: props,\\n error: props,\\n group: props,\\n groupCollapsed: props,\\n groupEnd: props\\n });\\n /* eslint-enable react-internal/no-production-logging */\\n }\\n\\n disabledDepth++;\\n }\\n}\\nfunction reenableLogs() {\\n {\\n disabledDepth--;\\n\\n if (disabledDepth === 0) {\\n /* eslint-disable react-internal/no-production-logging */\\n var props = {\\n configurable: true,\\n enumerable: true,\\n writable: true\\n }; // $FlowFixMe Flow thinks console is immutable.\\n\\n Object.defineProperties(console, {\\n log: _assign({}, props, {\\n value: prevLog\\n }),\\n info: _assign({}, props, {\\n value: prevInfo\\n }),\\n warn: _assign({}, props, {\\n value: prevWarn\\n }),\\n error: _assign({}, props, {\\n value: prevError\\n }),\\n group: _assign({}, props, {\\n value: prevGroup\\n }),\\n groupCollapsed: _assign({}, props, {\\n value: prevGroupCollapsed\\n }),\\n groupEnd: _assign({}, props, {\\n value: prevGroupEnd\\n })\\n });\\n /* eslint-enable react-internal/no-production-logging */\\n }\\n\\n if (disabledDepth < 0) {\\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\\n }\\n }\\n}\\n\\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\\nvar prefix;\\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\\n {\\n if (prefix === undefined) {\\n // Extract the VM specific prefix used by each line.\\n try {\\n throw Error();\\n } catch (x) {\\n var match = x.stack.trim().match(/\\\\n( *(at )?)/);\\n prefix = match && match[1] || '';\\n }\\n } // We use the prefix to ensure our stacks line up with native stack frames.\\n\\n\\n return '\\\\n' + prefix + name;\\n }\\n}\\nvar reentry = false;\\nvar componentFrameCache;\\n\\n{\\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\\n componentFrameCache = new PossiblyWeakMap();\\n}\\n\\nfunction describeNativeComponentFrame(fn, construct) {\\n // If something asked for a stack inside a fake render, it should get ignored.\\n if (!fn || reentry) {\\n return '';\\n }\\n\\n {\\n var frame = componentFrameCache.get(fn);\\n\\n if (frame !== undefined) {\\n return frame;\\n }\\n }\\n\\n var control;\\n reentry = true;\\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\\n\\n Error.prepareStackTrace = undefined;\\n var previousDispatcher;\\n\\n {\\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\\n // for warnings.\\n\\n ReactCurrentDispatcher.current = null;\\n disableLogs();\\n }\\n\\n try {\\n // This should throw.\\n if (construct) {\\n // Something should be setting the props in the constructor.\\n var Fake = function () {\\n throw Error();\\n }; // $FlowFixMe\\n\\n\\n Object.defineProperty(Fake.prototype, 'props', {\\n set: function () {\\n // We use a throwing setter instead of frozen or non-writable props\\n // because that won't throw in a non-strict mode function.\\n throw Error();\\n }\\n });\\n\\n if (typeof Reflect === 'object' && Reflect.construct) {\\n // We construct a different control for this case to include any extra\\n // frames added by the construct call.\\n try {\\n Reflect.construct(Fake, []);\\n } catch (x) {\\n control = x;\\n }\\n\\n Reflect.construct(fn, [], Fake);\\n } else {\\n try {\\n Fake.call();\\n } catch (x) {\\n control = x;\\n }\\n\\n fn.call(Fake.prototype);\\n }\\n } else {\\n try {\\n throw Error();\\n } catch (x) {\\n control = x;\\n }\\n\\n fn();\\n }\\n } catch (sample) {\\n // This is inlined manually because closure doesn't do it for us.\\n if (sample && control && typeof sample.stack === 'string') {\\n // This extracts the first frame from the sample that isn't also in the control.\\n // Skipping one frame that we assume is the frame that calls the two.\\n var sampleLines = sample.stack.split('\\\\n');\\n var controlLines = control.stack.split('\\\\n');\\n var s = sampleLines.length - 1;\\n var c = controlLines.length - 1;\\n\\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\\n // We expect at least one stack frame to be shared.\\n // Typically this will be the root most one. However, stack frames may be\\n // cut off due to maximum stack limits. In this case, one maybe cut off\\n // earlier than the other. We assume that the sample is longer or the same\\n // and there for cut off earlier. So we should find the root most frame in\\n // the sample somewhere in the control.\\n c--;\\n }\\n\\n for (; s >= 1 && c >= 0; s--, c--) {\\n // Next we find the first one that isn't the same which should be the\\n // frame that called our sample function and the control.\\n if (sampleLines[s] !== controlLines[c]) {\\n // In V8, the first line is describing the message but other VMs don't.\\n // If we're about to return the first line, and the control is also on the same\\n // line, that's a pretty good indicator that our sample threw at same line as\\n // the control. I.e. before we entered the sample frame. So we ignore this result.\\n // This can happen if you passed a class to function component, or non-function.\\n if (s !== 1 || c !== 1) {\\n do {\\n s--;\\n c--; // We may still have similar intermediate frames from the construct call.\\n // The next one that isn't the same should be our match though.\\n\\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\\n // V8 adds a \\\"new\\\" prefix for native classes. Let's remove it to make it prettier.\\n var _frame = '\\\\n' + sampleLines[s].replace(' at new ', ' at ');\\n\\n {\\n if (typeof fn === 'function') {\\n componentFrameCache.set(fn, _frame);\\n }\\n } // Return the line we found.\\n\\n\\n return _frame;\\n }\\n } while (s >= 1 && c >= 0);\\n }\\n\\n break;\\n }\\n }\\n }\\n } finally {\\n reentry = false;\\n\\n {\\n ReactCurrentDispatcher.current = previousDispatcher;\\n reenableLogs();\\n }\\n\\n Error.prepareStackTrace = previousPrepareStackTrace;\\n } // Fallback to just using the name if we couldn't make it throw.\\n\\n\\n var name = fn ? fn.displayName || fn.name : '';\\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\\n\\n {\\n if (typeof fn === 'function') {\\n componentFrameCache.set(fn, syntheticFrame);\\n }\\n }\\n\\n return syntheticFrame;\\n}\\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\\n {\\n return describeNativeComponentFrame(fn, false);\\n }\\n}\\n\\nfunction shouldConstruct(Component) {\\n var prototype = Component.prototype;\\n return !!(prototype && prototype.isReactComponent);\\n}\\n\\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\\n\\n if (type == null) {\\n return '';\\n }\\n\\n if (typeof type === 'function') {\\n {\\n return describeNativeComponentFrame(type, shouldConstruct(type));\\n }\\n }\\n\\n if (typeof type === 'string') {\\n return describeBuiltInComponentFrame(type);\\n }\\n\\n switch (type) {\\n case REACT_SUSPENSE_TYPE:\\n return describeBuiltInComponentFrame('Suspense');\\n\\n case REACT_SUSPENSE_LIST_TYPE:\\n return describeBuiltInComponentFrame('SuspenseList');\\n }\\n\\n if (typeof type === 'object') {\\n switch (type.$$typeof) {\\n case REACT_FORWARD_REF_TYPE:\\n return describeFunctionComponentFrame(type.render);\\n\\n case REACT_MEMO_TYPE:\\n // Memo may contain any component type so we recursively resolve it.\\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\\n\\n case REACT_BLOCK_TYPE:\\n return describeFunctionComponentFrame(type._render);\\n\\n case REACT_LAZY_TYPE:\\n {\\n var lazyComponent = type;\\n var payload = lazyComponent._payload;\\n var init = lazyComponent._init;\\n\\n try {\\n // Lazy may contain any component type so we recursively resolve it.\\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\\n } catch (x) {}\\n }\\n }\\n }\\n\\n return '';\\n}\\n\\nvar loggedTypeFailures = {};\\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\\n\\nfunction setCurrentlyValidatingElement(element) {\\n {\\n if (element) {\\n var owner = element._owner;\\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\\n } else {\\n ReactDebugCurrentFrame.setExtraStackFrame(null);\\n }\\n }\\n}\\n\\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\\n {\\n // $FlowFixMe This is okay but Flow doesn't know it.\\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\\n\\n for (var typeSpecName in typeSpecs) {\\n if (has(typeSpecs, typeSpecName)) {\\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\\n // fail the render phase where it didn't fail before. So we log it.\\n // After these have been cleaned up, we'll let them throw.\\n\\n try {\\n // This is intentionally an invariant that gets caught. It's the same\\n // behavior as without this statement except with a better message.\\n if (typeof typeSpecs[typeSpecName] !== 'function') {\\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\\n err.name = 'Invariant Violation';\\n throw err;\\n }\\n\\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\\n } catch (ex) {\\n error$1 = ex;\\n }\\n\\n if (error$1 && !(error$1 instanceof Error)) {\\n setCurrentlyValidatingElement(element);\\n\\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\\n\\n setCurrentlyValidatingElement(null);\\n }\\n\\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\\n // Only monitor this failure once because there tends to be a lot of the\\n // same error.\\n loggedTypeFailures[error$1.message] = true;\\n setCurrentlyValidatingElement(element);\\n\\n error('Failed %s type: %s', location, error$1.message);\\n\\n setCurrentlyValidatingElement(null);\\n }\\n }\\n }\\n }\\n}\\n\\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\nvar RESERVED_PROPS = {\\n key: true,\\n ref: true,\\n __self: true,\\n __source: true\\n};\\nvar specialPropKeyWarningShown;\\nvar specialPropRefWarningShown;\\nvar didWarnAboutStringRefs;\\n\\n{\\n didWarnAboutStringRefs = {};\\n}\\n\\nfunction hasValidRef(config) {\\n {\\n if (hasOwnProperty.call(config, 'ref')) {\\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\\n\\n if (getter && getter.isReactWarning) {\\n return false;\\n }\\n }\\n }\\n\\n return config.ref !== undefined;\\n}\\n\\nfunction hasValidKey(config) {\\n {\\n if (hasOwnProperty.call(config, 'key')) {\\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\\n\\n if (getter && getter.isReactWarning) {\\n return false;\\n }\\n }\\n }\\n\\n return config.key !== undefined;\\n}\\n\\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\\n {\\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\\n var componentName = getComponentName(ReactCurrentOwner.current.type);\\n\\n if (!didWarnAboutStringRefs[componentName]) {\\n error('Component \\\"%s\\\" contains the string ref \\\"%s\\\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);\\n\\n didWarnAboutStringRefs[componentName] = true;\\n }\\n }\\n }\\n}\\n\\nfunction defineKeyPropWarningGetter(props, displayName) {\\n {\\n var warnAboutAccessingKey = function () {\\n if (!specialPropKeyWarningShown) {\\n specialPropKeyWarningShown = true;\\n\\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\\n }\\n };\\n\\n warnAboutAccessingKey.isReactWarning = true;\\n Object.defineProperty(props, 'key', {\\n get: warnAboutAccessingKey,\\n configurable: true\\n });\\n }\\n}\\n\\nfunction defineRefPropWarningGetter(props, displayName) {\\n {\\n var warnAboutAccessingRef = function () {\\n if (!specialPropRefWarningShown) {\\n specialPropRefWarningShown = true;\\n\\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\\n }\\n };\\n\\n warnAboutAccessingRef.isReactWarning = true;\\n Object.defineProperty(props, 'ref', {\\n get: warnAboutAccessingRef,\\n configurable: true\\n });\\n }\\n}\\n/**\\n * Factory method to create a new React element. This no longer adheres to\\n * the class pattern, so do not use new to call it. Also, instanceof check\\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\\n * if something is a React Element.\\n *\\n * @param {*} type\\n * @param {*} props\\n * @param {*} key\\n * @param {string|object} ref\\n * @param {*} owner\\n * @param {*} self A *temporary* helper to detect places where `this` is\\n * different from the `owner` when React.createElement is called, so that we\\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\\n * functions, and as long as `this` and owner are the same, there will be no\\n * change in behavior.\\n * @param {*} source An annotation object (added by a transpiler or otherwise)\\n * indicating filename, line number, and/or other information.\\n * @internal\\n */\\n\\n\\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\\n var element = {\\n // This tag allows us to uniquely identify this as a React Element\\n $$typeof: REACT_ELEMENT_TYPE,\\n // Built-in properties that belong on the element\\n type: type,\\n key: key,\\n ref: ref,\\n props: props,\\n // Record the component responsible for creating this element.\\n _owner: owner\\n };\\n\\n {\\n // The validation flag is currently mutative. We put it on\\n // an external backing store so that we can freeze the whole object.\\n // This can be replaced with a WeakMap once they are implemented in\\n // commonly used development environments.\\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\\n // the validation flag non-enumerable (where possible, which should\\n // include every environment we run tests in), so the test framework\\n // ignores it.\\n\\n Object.defineProperty(element._store, 'validated', {\\n configurable: false,\\n enumerable: false,\\n writable: true,\\n value: false\\n }); // self and source are DEV only properties.\\n\\n Object.defineProperty(element, '_self', {\\n configurable: false,\\n enumerable: false,\\n writable: false,\\n value: self\\n }); // Two elements created in two different places should be considered\\n // equal for testing purposes and therefore we hide it from enumeration.\\n\\n Object.defineProperty(element, '_source', {\\n configurable: false,\\n enumerable: false,\\n writable: false,\\n value: source\\n });\\n\\n if (Object.freeze) {\\n Object.freeze(element.props);\\n Object.freeze(element);\\n }\\n }\\n\\n return element;\\n};\\n/**\\n * https://github.com/reactjs/rfcs/pull/107\\n * @param {*} type\\n * @param {object} props\\n * @param {string} key\\n */\\n\\nfunction jsxDEV(type, config, maybeKey, source, self) {\\n {\\n var propName; // Reserved names are extracted\\n\\n var props = {};\\n var key = null;\\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\\n // issue if key is also explicitly declared (ie.
\\n // or
). We want to deprecate key spread,\\n // but as an intermediary step, we will use jsxDEV for everything except\\n //
, because we aren't currently able to tell if\\n // key is explicitly declared to be undefined or not.\\n\\n if (maybeKey !== undefined) {\\n key = '' + maybeKey;\\n }\\n\\n if (hasValidKey(config)) {\\n key = '' + config.key;\\n }\\n\\n if (hasValidRef(config)) {\\n ref = config.ref;\\n warnIfStringRefCannotBeAutoConverted(config, self);\\n } // Remaining properties are added to a new props object\\n\\n\\n for (propName in config) {\\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\\n props[propName] = config[propName];\\n }\\n } // Resolve default props\\n\\n\\n if (type && type.defaultProps) {\\n var defaultProps = type.defaultProps;\\n\\n for (propName in defaultProps) {\\n if (props[propName] === undefined) {\\n props[propName] = defaultProps[propName];\\n }\\n }\\n }\\n\\n if (key || ref) {\\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\\n\\n if (key) {\\n defineKeyPropWarningGetter(props, displayName);\\n }\\n\\n if (ref) {\\n defineRefPropWarningGetter(props, displayName);\\n }\\n }\\n\\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\\n }\\n}\\n\\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\\n\\nfunction setCurrentlyValidatingElement$1(element) {\\n {\\n if (element) {\\n var owner = element._owner;\\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\\n } else {\\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\\n }\\n }\\n}\\n\\nvar propTypesMisspellWarningShown;\\n\\n{\\n propTypesMisspellWarningShown = false;\\n}\\n/**\\n * Verifies the object is a ReactElement.\\n * See https://reactjs.org/docs/react-api.html#isvalidelement\\n * @param {?object} object\\n * @return {boolean} True if `object` is a ReactElement.\\n * @final\\n */\\n\\nfunction isValidElement(object) {\\n {\\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\\n }\\n}\\n\\nfunction getDeclarationErrorAddendum() {\\n {\\n if (ReactCurrentOwner$1.current) {\\n var name = getComponentName(ReactCurrentOwner$1.current.type);\\n\\n if (name) {\\n return '\\\\n\\\\nCheck the render method of `' + name + '`.';\\n }\\n }\\n\\n return '';\\n }\\n}\\n\\nfunction getSourceInfoErrorAddendum(source) {\\n {\\n if (source !== undefined) {\\n var fileName = source.fileName.replace(/^.*[\\\\\\\\\\\\/]/, '');\\n var lineNumber = source.lineNumber;\\n return '\\\\n\\\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\\n }\\n\\n return '';\\n }\\n}\\n/**\\n * Warn if there's no key explicitly set on dynamic arrays of children or\\n * object keys are not valid. This allows us to keep track of children between\\n * updates.\\n */\\n\\n\\nvar ownerHasKeyUseWarning = {};\\n\\nfunction getCurrentComponentErrorInfo(parentType) {\\n {\\n var info = getDeclarationErrorAddendum();\\n\\n if (!info) {\\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\\n\\n if (parentName) {\\n info = \\\"\\\\n\\\\nCheck the top-level render call using <\\\" + parentName + \\\">.\\\";\\n }\\n }\\n\\n return info;\\n }\\n}\\n/**\\n * Warn if the element doesn't have an explicit key assigned to it.\\n * This element is in an array. The array could grow and shrink or be\\n * reordered. All children that haven't already been validated are required to\\n * have a \\\"key\\\" property assigned to it. Error statuses are cached so a warning\\n * will only be shown once.\\n *\\n * @internal\\n * @param {ReactElement} element Element that requires a key.\\n * @param {*} parentType element's parent's type.\\n */\\n\\n\\nfunction validateExplicitKey(element, parentType) {\\n {\\n if (!element._store || element._store.validated || element.key != null) {\\n return;\\n }\\n\\n element._store.validated = true;\\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\\n\\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\\n return;\\n }\\n\\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\\n // property, it may be the creator of the child that's responsible for\\n // assigning it a key.\\n\\n var childOwner = '';\\n\\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\\n // Give the component that originally created this child.\\n childOwner = \\\" It was passed a child from \\\" + getComponentName(element._owner.type) + \\\".\\\";\\n }\\n\\n setCurrentlyValidatingElement$1(element);\\n\\n error('Each child in a list should have a unique \\\"key\\\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\\n\\n setCurrentlyValidatingElement$1(null);\\n }\\n}\\n/**\\n * Ensure that every element either is passed in a static location, in an\\n * array with an explicit keys property defined, or in an object literal\\n * with valid key property.\\n *\\n * @internal\\n * @param {ReactNode} node Statically passed child of any type.\\n * @param {*} parentType node's parent's type.\\n */\\n\\n\\nfunction validateChildKeys(node, parentType) {\\n {\\n if (typeof node !== 'object') {\\n return;\\n }\\n\\n if (Array.isArray(node)) {\\n for (var i = 0; i < node.length; i++) {\\n var child = node[i];\\n\\n if (isValidElement(child)) {\\n validateExplicitKey(child, parentType);\\n }\\n }\\n } else if (isValidElement(node)) {\\n // This element was passed in a valid location.\\n if (node._store) {\\n node._store.validated = true;\\n }\\n } else if (node) {\\n var iteratorFn = getIteratorFn(node);\\n\\n if (typeof iteratorFn === 'function') {\\n // Entry iterators used to provide implicit keys,\\n // but now we print a separate warning for them later.\\n if (iteratorFn !== node.entries) {\\n var iterator = iteratorFn.call(node);\\n var step;\\n\\n while (!(step = iterator.next()).done) {\\n if (isValidElement(step.value)) {\\n validateExplicitKey(step.value, parentType);\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n/**\\n * Given an element, validate that its props follow the propTypes definition,\\n * provided by the type.\\n *\\n * @param {ReactElement} element\\n */\\n\\n\\nfunction validatePropTypes(element) {\\n {\\n var type = element.type;\\n\\n if (type === null || type === undefined || typeof type === 'string') {\\n return;\\n }\\n\\n var propTypes;\\n\\n if (typeof type === 'function') {\\n propTypes = type.propTypes;\\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\\n // Inner props are checked in the reconciler.\\n type.$$typeof === REACT_MEMO_TYPE)) {\\n propTypes = type.propTypes;\\n } else {\\n return;\\n }\\n\\n if (propTypes) {\\n // Intentionally inside to avoid triggering lazy initializers:\\n var name = getComponentName(type);\\n checkPropTypes(propTypes, element.props, 'prop', name, element);\\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\\n\\n var _name = getComponentName(type);\\n\\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\\n }\\n\\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\\n }\\n }\\n}\\n/**\\n * Given a fragment, validate that it can only be provided with fragment props\\n * @param {ReactElement} fragment\\n */\\n\\n\\nfunction validateFragmentProps(fragment) {\\n {\\n var keys = Object.keys(fragment.props);\\n\\n for (var i = 0; i < keys.length; i++) {\\n var key = keys[i];\\n\\n if (key !== 'children' && key !== 'key') {\\n setCurrentlyValidatingElement$1(fragment);\\n\\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\\n\\n setCurrentlyValidatingElement$1(null);\\n break;\\n }\\n }\\n\\n if (fragment.ref !== null) {\\n setCurrentlyValidatingElement$1(fragment);\\n\\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\\n\\n setCurrentlyValidatingElement$1(null);\\n }\\n }\\n}\\n\\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\\n {\\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\\n // succeed and there will likely be errors in render.\\n\\n if (!validType) {\\n var info = '';\\n\\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\\n info += ' You likely forgot to export your component from the file ' + \\\"it's defined in, or you might have mixed up default and named imports.\\\";\\n }\\n\\n var sourceInfo = getSourceInfoErrorAddendum(source);\\n\\n if (sourceInfo) {\\n info += sourceInfo;\\n } else {\\n info += getDeclarationErrorAddendum();\\n }\\n\\n var typeString;\\n\\n if (type === null) {\\n typeString = 'null';\\n } else if (Array.isArray(type)) {\\n typeString = 'array';\\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\\n typeString = \\\"<\\\" + (getComponentName(type.type) || 'Unknown') + \\\" />\\\";\\n info = ' Did you accidentally export a JSX literal instead of a component?';\\n } else {\\n typeString = typeof type;\\n }\\n\\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\\n }\\n\\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\\n // TODO: Drop this when these are no longer allowed as the type argument.\\n\\n if (element == null) {\\n return element;\\n } // Skip key warning if the type isn't valid since our key validation logic\\n // doesn't expect a non-string/function type and can throw confusing errors.\\n // We don't want exception behavior to differ between dev and prod.\\n // (Rendering will throw with a helpful message and as soon as the type is\\n // fixed, the key warnings will appear.)\\n\\n\\n if (validType) {\\n var children = props.children;\\n\\n if (children !== undefined) {\\n if (isStaticChildren) {\\n if (Array.isArray(children)) {\\n for (var i = 0; i < children.length; i++) {\\n validateChildKeys(children[i], type);\\n }\\n\\n if (Object.freeze) {\\n Object.freeze(children);\\n }\\n } else {\\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\\n }\\n } else {\\n validateChildKeys(children, type);\\n }\\n }\\n }\\n\\n if (type === exports.Fragment) {\\n validateFragmentProps(element);\\n } else {\\n validatePropTypes(element);\\n }\\n\\n return element;\\n }\\n} // These two functions exist to still get child warnings in dev\\n// even with the prod transform. This means that jsxDEV is purely\\n// opt-in behavior for better messages but that we won't stop\\n// giving you warnings if you use production apis.\\n\\nfunction jsxWithValidationStatic(type, props, key) {\\n {\\n return jsxWithValidation(type, props, key, true);\\n }\\n}\\nfunction jsxWithValidationDynamic(type, props, key) {\\n {\\n return jsxWithValidation(type, props, key, false);\\n }\\n}\\n\\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\\n// for now we can ship identical prod functions\\n\\nvar jsxs = jsxWithValidationStatic ;\\n\\nexports.jsx = jsx;\\nexports.jsxs = jsxs;\\n })();\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/react/cjs/react-jsx-runtime.development.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/react/jsx-runtime.js\":\n/*!*******************************************!*\\\n !*** ./node_modules/react/jsx-runtime.js ***!\n \\*******************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n\\nif (false) {} else {\\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ \\\"./node_modules/react/cjs/react-jsx-runtime.development.js\\\");\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/react/jsx-runtime.js?\");\n\n/***/ }),\n\n/***/ \"./src/components/button/index.less\":\n/*!******************************************!*\\\n !*** ./src/components/button/index.less ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/button/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/button/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/filelist/index.less\":\n/*!********************************************!*\\\n !*** ./src/components/filelist/index.less ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/filelist/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/index.less\":\n/*!*****************************************!*\\\n !*** ./src/components/icons/index.less ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/icons/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/modal/index.less\":\n/*!*****************************************!*\\\n !*** ./src/components/modal/index.less ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/modal/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/modal/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/openedtab/index.less\":\n/*!*********************************************!*\\\n !*** ./src/components/openedtab/index.less ***!\n \\*********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/openedtab/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/prettier/index.less\":\n/*!********************************************!*\\\n !*** ./src/components/prettier/index.less ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/prettier/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/prettier/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchfile/index.less\":\n/*!**********************************************!*\\\n !*** ./src/components/searchfile/index.less ***!\n \\**********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/searchfile/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchfile/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchtext/search-text.less\":\n/*!****************************************************!*\\\n !*** ./src/components/searchtext/search-text.less ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_search_text_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./search-text.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/searchtext/search-text.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_search_text_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_search_text_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_search_text_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_search_text_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchtext/search-text.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/index.less\":\n/*!******************************************!*\\\n !*** ./src/components/select/index.less ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/select/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/multi/index.less\":\n/*!******************************!*\\\n !*** ./src/multi/index.less ***!\n \\******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/multi/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/single/index.less\":\n/*!*******************************!*\\\n !*** ./src/single/index.less ***!\n \\*******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/single/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/index.less?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\":\n/*!****************************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!\n \\****************************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\nvar stylesInDOM = [];\\n\\nfunction getIndexByIdentifier(identifier) {\\n var result = -1;\\n\\n for (var i = 0; i < stylesInDOM.length; i++) {\\n if (stylesInDOM[i].identifier === identifier) {\\n result = i;\\n break;\\n }\\n }\\n\\n return result;\\n}\\n\\nfunction modulesToDom(list, options) {\\n var idCountMap = {};\\n var identifiers = [];\\n\\n for (var i = 0; i < list.length; i++) {\\n var item = list[i];\\n var id = options.base ? item[0] + options.base : item[0];\\n var count = idCountMap[id] || 0;\\n var identifier = \\\"\\\".concat(id, \\\" \\\").concat(count);\\n idCountMap[id] = count + 1;\\n var indexByIdentifier = getIndexByIdentifier(identifier);\\n var obj = {\\n css: item[1],\\n media: item[2],\\n sourceMap: item[3],\\n supports: item[4],\\n layer: item[5]\\n };\\n\\n if (indexByIdentifier !== -1) {\\n stylesInDOM[indexByIdentifier].references++;\\n stylesInDOM[indexByIdentifier].updater(obj);\\n } else {\\n var updater = addElementStyle(obj, options);\\n options.byIndex = i;\\n stylesInDOM.splice(i, 0, {\\n identifier: identifier,\\n updater: updater,\\n references: 1\\n });\\n }\\n\\n identifiers.push(identifier);\\n }\\n\\n return identifiers;\\n}\\n\\nfunction addElementStyle(obj, options) {\\n var api = options.domAPI(options);\\n api.update(obj);\\n\\n var updater = function updater(newObj) {\\n if (newObj) {\\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\\n return;\\n }\\n\\n api.update(obj = newObj);\\n } else {\\n api.remove();\\n }\\n };\\n\\n return updater;\\n}\\n\\nmodule.exports = function (list, options) {\\n options = options || {};\\n list = list || [];\\n var lastIdentifiers = modulesToDom(list, options);\\n return function update(newList) {\\n newList = newList || [];\\n\\n for (var i = 0; i < lastIdentifiers.length; i++) {\\n var identifier = lastIdentifiers[i];\\n var index = getIndexByIdentifier(identifier);\\n stylesInDOM[index].references--;\\n }\\n\\n var newLastIdentifiers = modulesToDom(newList, options);\\n\\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\\n var _identifier = lastIdentifiers[_i];\\n\\n var _index = getIndexByIdentifier(_identifier);\\n\\n if (stylesInDOM[_index].references === 0) {\\n stylesInDOM[_index].updater();\\n\\n stylesInDOM.splice(_index, 1);\\n }\\n }\\n\\n lastIdentifiers = newLastIdentifiers;\\n };\\n};\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\":\n/*!********************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!\n \\********************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\nvar memo = {};\\n/* istanbul ignore next */\\n\\nfunction getTarget(target) {\\n if (typeof memo[target] === \\\"undefined\\\") {\\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\\n\\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\\n try {\\n // This will throw an exception if access to iframe is blocked\\n // due to cross-origin restrictions\\n styleTarget = styleTarget.contentDocument.head;\\n } catch (e) {\\n // istanbul ignore next\\n styleTarget = null;\\n }\\n }\\n\\n memo[target] = styleTarget;\\n }\\n\\n return memo[target];\\n}\\n/* istanbul ignore next */\\n\\n\\nfunction insertBySelector(insert, style) {\\n var target = getTarget(insert);\\n\\n if (!target) {\\n throw new Error(\\\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\\\");\\n }\\n\\n target.appendChild(style);\\n}\\n\\nmodule.exports = insertBySelector;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/insertBySelector.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\":\n/*!**********************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!\n \\**********************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction insertStyleElement(options) {\\n var element = document.createElement(\\\"style\\\");\\n options.setAttributes(element, options.attributes);\\n options.insert(element, options.options);\\n return element;\\n}\\n\\nmodule.exports = insertStyleElement;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/insertStyleElement.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\":\n/*!**********************************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!\n \\**********************************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction setAttributesWithoutAttributes(styleElement) {\\n var nonce = true ? __webpack_require__.nc : 0;\\n\\n if (nonce) {\\n styleElement.setAttribute(\\\"nonce\\\", nonce);\\n }\\n}\\n\\nmodule.exports = setAttributesWithoutAttributes;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!\n \\***************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction apply(styleElement, options, obj) {\\n var css = \\\"\\\";\\n\\n if (obj.supports) {\\n css += \\\"@supports (\\\".concat(obj.supports, \\\") {\\\");\\n }\\n\\n if (obj.media) {\\n css += \\\"@media \\\".concat(obj.media, \\\" {\\\");\\n }\\n\\n var needLayer = typeof obj.layer !== \\\"undefined\\\";\\n\\n if (needLayer) {\\n css += \\\"@layer\\\".concat(obj.layer.length > 0 ? \\\" \\\".concat(obj.layer) : \\\"\\\", \\\" {\\\");\\n }\\n\\n css += obj.css;\\n\\n if (needLayer) {\\n css += \\\"}\\\";\\n }\\n\\n if (obj.media) {\\n css += \\\"}\\\";\\n }\\n\\n if (obj.supports) {\\n css += \\\"}\\\";\\n }\\n\\n var sourceMap = obj.sourceMap;\\n\\n if (sourceMap && typeof btoa !== \\\"undefined\\\") {\\n css += \\\"\\\\n/*# sourceMappingURL=data:application/json;base64,\\\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \\\" */\\\");\\n } // For old IE\\n\\n /* istanbul ignore if */\\n\\n\\n options.styleTagTransform(css, styleElement, options.options);\\n}\\n\\nfunction removeStyleElement(styleElement) {\\n // istanbul ignore if\\n if (styleElement.parentNode === null) {\\n return false;\\n }\\n\\n styleElement.parentNode.removeChild(styleElement);\\n}\\n/* istanbul ignore next */\\n\\n\\nfunction domAPI(options) {\\n var styleElement = options.insertStyleElement(options);\\n return {\\n update: function update(obj) {\\n apply(styleElement, options, obj);\\n },\\n remove: function remove() {\\n removeStyleElement(styleElement);\\n }\\n };\\n}\\n\\nmodule.exports = domAPI;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/styleDomAPI.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\":\n/*!*********************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!\n \\*********************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction styleTagTransform(css, styleElement) {\\n if (styleElement.styleSheet) {\\n styleElement.styleSheet.cssText = css;\\n } else {\\n while (styleElement.firstChild) {\\n styleElement.removeChild(styleElement.firstChild);\\n }\\n\\n styleElement.appendChild(document.createTextNode(css));\\n }\\n}\\n\\nmodule.exports = styleTagTransform;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/styleTagTransform.js?\");\n\n/***/ }),\n\n/***/ \"./src/components/Setting/index.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/Setting/index.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _components_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/select */ \\\"./src/components/select/index.tsx\\\");\\n/* harmony import */ var _components_icons_close__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/icons/close */ \\\"./src/components/icons/close.tsx\\\");\\n/* harmony import */ var _components_icons_setting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @components/icons/setting */ \\\"./src/components/icons/setting.tsx\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @utils/consts */ \\\"./src/utils/consts.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\nvar Setting = function (_a) {\\n var getTarget = _a.getTarget, autoPrettier = _a.autoPrettier, onAutoPrettierChange = _a.onAutoPrettierChange, _b = _a.defaultTheme, defaultTheme = _b === void 0 ? 'GithubLightDefault' : _b, _c = _a.disablePrettier, disablePrettier = _c === void 0 ? false : _c;\\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), visible = _d[0], setVisible = _d[1];\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultTheme), theme = _e[0], setTheme = _e[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_6__.configTheme)(defaultTheme);\\n }, []);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting-button\\\", onClick: function () { return setVisible(true); } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_setting__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { style: {\\n width: '16px',\\n height: '16px',\\n } }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_modal__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], __assign({ destroyOnClose: true, onClose: function () { return setVisible(false); }, visible: visible, getTarget: getTarget }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting-header\\\" }, { children: [\\\"\\\\u8BBE\\\\u7F6E\\\", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () { return setVisible(false); }, className: \\\"music-monaco-editor-setting-header-close\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_close__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], { style: {\\n width: '12px',\\n height: '12px',\\n } }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting-content\\\" }, { children: [disablePrettier ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-row\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-name\\\" }, { children: \\\"prettier\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-value\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"input\\\", { defaultChecked: autoPrettier, type: \\\"checkbox\\\", onChange: onAutoPrettierChange }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"label\\\", { children: \\\"prettier on save\\\" })] }))] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-row\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-name\\\" }, { children: \\\"\\\\u4E3B\\\\u9898\\\\u9009\\\\u62E9\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-value\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_select__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], __assign({ value: theme, getContainer: getTarget, onChange: function (v) {\\n setTheme(v);\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_6__.configTheme)(v);\\n } }, { children: _utils_consts__WEBPACK_IMPORTED_MODULE_7__.THEMES.map(function (theme) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_select__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"].Menu, { label: theme, value: theme }, theme)); }) })) }))] }))] }))] })) }))] }));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Setting);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/Setting/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/button/index.tsx\":\n/*!*****************************************!*\\\n !*** ./src/components/button/index.tsx ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/button/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\nvar Button = function (_a) {\\n var _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, children = _a.children, _d = _a.onClick, onClick = _d === void 0 ? function () { return null; } : _d, style = _a.style;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: onClick, style: style, className: \\\"music-monaco-editor-button\\\\n music-monaco-editor-button-\\\".concat(type, \\\"\\\\n \\\").concat(className) }, { children: children })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Button);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/button/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/filelist/file.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/filelist/file.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons */ \\\"./src/components/icons/index.tsx\\\");\\n/* harmony import */ var _components_icons_arrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/arrow */ \\\"./src/components/icons/arrow.tsx\\\");\\n/* harmony import */ var _components_icons_delete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/icons/delete */ \\\"./src/components/icons/delete.tsx\\\");\\n/* harmony import */ var _components_icons_edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @components/icons/edit */ \\\"./src/components/icons/edit.tsx\\\");\\n/* harmony import */ var _components_icons_addfile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @components/icons/addfile */ \\\"./src/components/icons/addfile.tsx\\\");\\n/* harmony import */ var _components_icons_addfolder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @components/icons/addfolder */ \\\"./src/components/icons/addfolder.tsx\\\");\\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @utils */ \\\"./src/utils/index.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar File = function (_a) {\\n var getAllFiles = _a.getAllFiles, _b = _a.disableFileOps, disableFileOps = _b === void 0 ? {} : _b, _c = _a.disableFolderOps, disableFolderOps = _c === void 0 ? {} : _c, file = _a.file, onPathChange = _a.onPathChange, _d = _a.currentPath, currentPath = _d === void 0 ? '' : _d, root = _a.root, onAddFile = _a.onAddFile, onConfirmAddFile = _a.onConfirmAddFile, onDeleteFile = _a.onDeleteFile, onEditFileName = _a.onEditFileName, onConfirmAddFolder = _a.onConfirmAddFolder, onAddFolder = _a.onAddFolder, onDeleteFolder = _a.onDeleteFolder, onEditFolderName = _a.onEditFolderName;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), showChild = _e[0], setShowChild = _e[1];\\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), editing = _f[0], setEditing = _f[1];\\n var nameRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n setShowChild(function (pre) { return !pre; });\\n }, []);\\n var handlePathChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n var key = e.currentTarget.dataset.src;\\n onPathChange(key);\\n }, [onPathChange]);\\n var _g = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), showError = _g[0], setShowError = _g[1];\\n var handleBlur = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var _a;\\n setShowError('');\\n var name = (_a = nameRef.current) === null || _a === void 0 ? void 0 : _a.textContent;\\n if (editing) {\\n setEditing(false);\\n if (file.name !== name) {\\n if (file._isDirectory) {\\n onEditFolderName(file.path, name);\\n }\\n else if (name) {\\n var newpath = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getOldNewPath)(file.path, name).newpath;\\n var files = getAllFiles();\\n if (!files[newpath]) {\\n onEditFileName(file.path, name);\\n }\\n }\\n }\\n }\\n else {\\n if (file._isDirectory) {\\n onConfirmAddFolder(__assign(__assign({}, file), { name: name }));\\n }\\n else {\\n onConfirmAddFile(__assign(__assign({}, file), { name: name }));\\n }\\n }\\n }, [\\n getAllFiles,\\n editing,\\n file,\\n onEditFileName,\\n onConfirmAddFile,\\n onConfirmAddFolder,\\n onEditFolderName,\\n ]);\\n var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var _a;\\n var name = (_a = nameRef.current) === null || _a === void 0 ? void 0 : _a.textContent;\\n if (!name) {\\n return setShowError('文件名不能为空');\\n }\\n if (file.name === name) {\\n return setShowError('');\\n }\\n var newpath = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getOldNewPath)(file.path, name).newpath;\\n var filenames = Object.keys(getAllFiles());\\n for (var i = 0; i < filenames.length; i++) {\\n if (newpath === filenames[i]) {\\n return setShowError('文件名已存在');\\n }\\n else if (filenames[i].startsWith(newpath + '/')) {\\n return setShowError('文件名已存在');\\n }\\n }\\n setShowError('');\\n }, [getAllFiles, file]);\\n var handleKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n if (e.keyCode === 13) {\\n e.preventDefault();\\n handleBlur();\\n }\\n }, [handleBlur]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (!root && !file.name) {\\n nameRef.current.focus();\\n }\\n }, [file, root]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a, _b;\\n if (editing) {\\n var dotIndex = file.name.indexOf('.');\\n nameRef.current.textContent = file.name;\\n nameRef.current.focus();\\n var selection = window.getSelection();\\n var range = document.createRange();\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\\n // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\\n range.setStart((_a = nameRef.current) === null || _a === void 0 ? void 0 : _a.firstChild, 0);\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\\n // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\\n range.setEnd((_b = nameRef.current) === null || _b === void 0 ? void 0 : _b.firstChild, dotIndex > 0 ? dotIndex : file.name.length);\\n selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();\\n selection === null || selection === void 0 ? void 0 : selection.addRange(range);\\n }\\n }, [editing, file]);\\n var keys = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {\\n if (file._isFile)\\n return [];\\n var childs = file.children;\\n var folders = Object.keys(childs).filter(function (key) { return !childs[key]._isFile; }).sort();\\n var files = Object.keys(childs).filter(function (key) { return childs[key]._isFile; }).sort();\\n return folders.concat(files);\\n }, [file]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (currentPath && currentPath.startsWith(file.path + '/')) {\\n setShowChild(true);\\n }\\n }, [currentPath, file.path]);\\n if (file._isFile) {\\n var fileType = void 0;\\n if (file.name && file.name.indexOf('.') !== -1) {\\n fileType = \\\"file_type_\\\".concat(file.name.split('.').slice(-1));\\n }\\n else {\\n fileType = 'default_file';\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ \\\"data-src\\\": file.path, title: file.path, onClick: handlePathChange, className: \\\"music-monaco-editor-list-file-item-row \\\".concat(currentPath === file.path ? 'music-monaco-editor-list-file-item-row-focused' : '') }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { type: fileType, style: {\\n marginLeft: '14px',\\n marginRight: '5px',\\n } }), (file.name && !editing) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1 }, className: \\\"music-monaco-editor-list-file-item-row-name\\\" }, { children: file.name })), disableFileOps.rename ? null : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_edit__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setEditing(true);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" }), disableFileOps.delete ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_delete__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n onDeleteFile(file.path);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" }))] })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { onClick: function (e) {\\n e.stopPropagation();\\n }, onInput: handleChange, spellCheck: false, onKeyDown: handleKeyDown, onBlur: handleBlur, ref: nameRef, className: \\\"music-monaco-editor-list-file-item-new\\\\n \\\".concat(showError ? 'music-monaco-editor-list-file-item-new-error' : ''), contentEditable: true }) }))] }), file.path));\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-file-item\\\" }, { children: [file._isDirectory && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ onClick: handleClick, className: \\\"music-monaco-editor-list-file-item-row\\\", title: file.path }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_arrow__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { collpase: !showChild }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { style: {\\n marginRight: '5px',\\n }, type: showChild ? 'default_folder_opened' : 'default_folder' }), (file.name && !editing) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1 }, className: \\\"music-monaco-editor-list-file-item-row-name\\\" }, { children: file.name })), disableFolderOps.rename ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_edit__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setEditing(true);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" })), disableFolderOps.delete ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_delete__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n onDeleteFolder(file.path);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" })), disableFileOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfile__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setShowChild(true);\\n onAddFile(file.path + '/');\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" })), disableFolderOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfolder__WEBPACK_IMPORTED_MODULE_7__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setShowChild(true);\\n onAddFolder(file.path + '/');\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" }))] })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { onClick: function (e) {\\n e.stopPropagation();\\n }, onInput: handleChange, spellCheck: false, onKeyDown: handleKeyDown, onBlur: handleBlur, ref: nameRef, className: \\\"music-monaco-editor-list-file-item-new\\\\n \\\".concat(showError ? 'music-monaco-editor-list-file-item-new-error' : ''), contentEditable: true }))] }))), (showChild || root) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ style: { paddingLeft: file._isDirectory ? '7px' : '0' } }, { children: keys.map(function (item) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(File, { getAllFiles: getAllFiles, disableFileOps: disableFileOps, disableFolderOps: disableFolderOps, onEditFileName: onEditFileName, onEditFolderName: onEditFolderName, onDeleteFile: onDeleteFile, onDeleteFolder: onDeleteFolder, onConfirmAddFile: onConfirmAddFile, onConfirmAddFolder: onConfirmAddFolder, onAddFile: onAddFile, onAddFolder: onAddFolder, currentPath: currentPath, root: false, file: file.children[item], onPathChange: onPathChange }, item)); }) })))] })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (File);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/file.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/filelist/index.tsx\":\n/*!*******************************************!*\\\n !*** ./src/components/filelist/index.tsx ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons_addfile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons/addfile */ \\\"./src/components/icons/addfile.tsx\\\");\\n/* harmony import */ var _components_icons_addfolder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/addfolder */ \\\"./src/components/icons/addfolder.tsx\\\");\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @utils/index */ \\\"./src/utils/index.ts\\\");\\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./file */ \\\"./src/components/filelist/file.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/filelist/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\nvar FileTree = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_a, ref) {\\n var defaultFiles = _a.defaultFiles, getAllFiles = _a.getAllFiles, onPathChange = _a.onPathChange, title = _a.title, _b = _a.currentPath, currentPath = _b === void 0 ? '' : _b, style = _a.style, onAddFile = _a.onAddFile, onDeleteFile = _a.onDeleteFile, onEditFileName = _a.onEditFileName, onAddFolder = _a.onAddFolder, onDeleteFolder = _a.onDeleteFolder, onEditFolderName = _a.onEditFolderName, rootEl = _a.rootEl, _c = _a.disableFileOps, disableFileOps = _c === void 0 ? {} : _c, _d = _a.disableFolderOps, disableFolderOps = _d === void 0 ? {} : _d;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(function () { return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.generateFileTree)(defaultFiles); }), filetree = _e[0], setFiletree = _e[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () { return ({\\n refresh: function (files) { return setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.generateFileTree)(files)); },\\n }); });\\n var addFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFile)(filetree, path));\\n }, [filetree]);\\n var deleteFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n _components_modal__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"].confirm({\\n target: rootEl.current,\\n okText: '删除',\\n onOk: function (close) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, path));\\n onDeleteFile(path);\\n close();\\n },\\n title: '是否确实要删除本文件',\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u5220\\\\u9664\\\\u540E\\\\u4E0D\\\\u53EF\\\\u6062\\\\u590D\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [\\\"\\\\u5F53\\\\u524D\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84: \\\", path] })] })); }\\n });\\n }, [filetree, onDeleteFile, rootEl]);\\n var editFileName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.editSourceFileName)(filetree, path, name));\\n onEditFileName(path, name);\\n }, [filetree, onEditFileName]);\\n var handleConfirmAddFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (file) {\\n var tree = {};\\n if (file.name) {\\n var newpath = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.getOldNewPath)(file.path, file.name).newpath;\\n var files = getAllFiles();\\n if (files[newpath] || files[newpath] === '') {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, file.path);\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, file.path);\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFile)(tree, file.path + file.name);\\n setTimeout(function () {\\n onAddFile(file.path + file.name);\\n }, 500);\\n }\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, file.path);\\n }\\n setFiletree(tree);\\n }, [filetree, onAddFile, getAllFiles]);\\n var addFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFolder)(filetree, path));\\n }, [filetree]);\\n var deleteFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n _components_modal__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"].confirm({\\n target: rootEl.current,\\n okText: '删除',\\n onOk: function (close) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, path));\\n onDeleteFolder(path);\\n close();\\n },\\n title: '是否确实要删除此文件夹',\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u6587\\\\u4EF6\\\\u5939\\\\u5220\\\\u9664\\\\u540E\\\\u4E0D\\\\u53EF\\\\u6062\\\\u590D\\\\uFF0C\\\\u540C\\\\u65F6\\\\u4F1A\\\\u5220\\\\u9664\\\\u5B50\\\\u6587\\\\u4EF6\\\\u5939\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [\\\"\\\\u5F53\\\\u524D\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84: \\\", path] })] })); }\\n });\\n }, [filetree, onDeleteFolder, rootEl]);\\n var editFolderName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.editSourceFolderName)(filetree, path, name));\\n onEditFolderName(path, name);\\n }, [filetree, onEditFolderName]);\\n var handleConfirmAddFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (file) {\\n var tree = {};\\n if (file.name) {\\n var newpath = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.getOldNewPath)(file.path, file.name).newpath;\\n var filenames = Object.keys(getAllFiles());\\n var exist = false;\\n for (var i = 0; i < filenames.length; i++) {\\n if (newpath === filenames[i]) {\\n exist = true;\\n break;\\n }\\n else if (filenames[i].startsWith(newpath + '/')) {\\n exist = true;\\n break;\\n }\\n }\\n if (exist) {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, file.path);\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, file.path);\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFolder)(tree, file.path + file.name);\\n onAddFolder(file.path + file.name);\\n }\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, file.path);\\n }\\n setFiletree(tree);\\n }, [filetree, onAddFolder]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-wrapper\\\", style: style }, { children: [title && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-title\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1 }, className: \\\"music-monaco-editor-list-title-name\\\" }, { children: title })), disableFileOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfile__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n addFile('/');\\n }, className: \\\"music-monaco-editor-list-title-icon\\\" })), disableFolderOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfolder__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n addFolder('/');\\n }, className: \\\"music-monaco-editor-list-title-icon\\\" }))] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-files\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_file__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], { getAllFiles: getAllFiles, disableFileOps: disableFileOps, disableFolderOps: disableFolderOps, onEditFileName: editFileName, onEditFolderName: editFolderName, onDeleteFile: deleteFile, onDeleteFolder: deleteFolder, onAddFile: addFile, onAddFolder: addFolder, onConfirmAddFile: handleConfirmAddFile, onConfirmAddFolder: handleConfirmAddFolder, currentPath: currentPath, root: true, file: filetree, onPathChange: onPathChange }) }))] })));\\n});\\nFileTree.displayName = 'filetree';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (react__WEBPACK_IMPORTED_MODULE_1___default().memo(FileTree));\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/addfile.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/icons/addfile.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar AddFileIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ onClick: onClick, className: className, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fillRule: \\\"evenodd\\\", clipRule: \\\"evenodd\\\", d: \\\"M4 7H3V4H0V3h3V0h1v3h3v1H4v3zm6.5-5.9l3.4 3.5.1.4v8.5l-.5.5h-10l-.5-.5V8h1v5h9V6H9V2H5V1h5.2l.3.1zM10 2v3h2.9L10 2z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddFileIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/addfile.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/addfolder.tsx\":\n/*!********************************************!*\\\n !*** ./src/components/icons/addfolder.tsx ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar AddFolderIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ className: className, onClick: onClick, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fillRule: \\\"evenodd\\\", clipRule: \\\"evenodd\\\", d: \\\"M7 3H4V0H3v3H0v1h3v3h1V4h3V3zM5.5 7H5V6h.3l.8-.9.4-.1H14V4H8V3h6.5l.5.5v10l-.5.5h-13l-.5-.5V5h1v8h12V6H6.7l-.8.9-.4.1z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddFolderIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/addfolder.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/arrow.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/icons/arrow.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar Arrow = function (_a) {\\n var _b = _a.collpase, collpase = _b === void 0 ? true : _b;\\n return collpase ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"currentColor\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5 5v.7l-5 5z\\\" }) }))) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"currentColor\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M7.976 10.072l4.357-4.357.619.618L8.285 11h-.618L3 6.333l.619-.618 4.357 4.357z\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Arrow);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/arrow.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/close.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/icons/close.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar Close = function (props) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ width: \\\"24px\\\", height: \\\"24px\\\", viewBox: \\\"0 0 24 24\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, props, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fill: \\\"none\\\", stroke: \\\"currentColor\\\", strokeWidth: 2, d: \\\"M3,3 L21,21 M3,21 L21,3\\\" }) }))); };\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Close);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/close.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/delete.tsx\":\n/*!*****************************************!*\\\n !*** ./src/components/icons/delete.tsx ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar DeleteIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ onClick: onClick, className: className, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fillRule: \\\"evenodd\\\", clipRule: \\\"evenodd\\\", d: \\\"M10 3h3v1h-1v9l-1 1H4l-1-1V4H2V3h3V2a1 1 0 011-1h3a1 1 0 011 1v1zM9 2H6v1h3V2zM4 13h7V4H4v9zm2-8H5v7h1V5zm1 0h1v7H7V5zm2 0h1v7H9V5z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DeleteIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/delete.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/edit.tsx\":\n/*!***************************************!*\\\n !*** ./src/components/icons/edit.tsx ***!\n \\***************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar EditIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ onClick: onClick, className: className, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M13.23 1h-1.46L3.52 9.25l-.16.22L1 13.59 2.41 15l4.12-2.36.22-.16L15 4.23V2.77L13.23 1zM2.41 13.59l1.51-3 1.45 1.45-2.96 1.55zm3.83-2.06L4.47 9.76l8-8 1.77 1.77-8 8z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EditIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/edit.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/index.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/icons/index.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @utils/consts */ \\\"./src/utils/consts.ts\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/icons/index.less\\\");\\n\\n\\n\\n\\nvar fileTypeMap = function (fileType) {\\n var type = fileType.split('_').slice(-1)[0];\\n var config = {\\n ts: 'typescript',\\n js: 'js',\\n tsx: 'reactts',\\n jsx: 'reactjs',\\n md: 'markdown',\\n };\\n return config[type] ? \\\"file_type_\\\".concat(config[type]) : fileType;\\n};\\nvar Icon = function (_a) {\\n var _b = _a.type, type = _b === void 0 ? 'default_file' : _b, _c = _a.style, style = _c === void 0 ? {} : _c, _d = _a.className, className = _d === void 0 ? '' : _d;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\\\"\\\".concat(_utils_consts__WEBPACK_IMPORTED_MODULE_2__.ASSETSPATH, \\\"icons/\\\").concat(fileTypeMap(type), \\\".svg\\\")), src = _e[0], setSrc = _e[1];\\n var handleError = function (e) {\\n setSrc(\\\"\\\".concat(_utils_consts__WEBPACK_IMPORTED_MODULE_2__.ASSETSPATH, \\\"icons/default_file.svg\\\"));\\n };\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { onError: handleError, style: style, src: src, className: \\\"music-monaco-icons \\\".concat(className) }));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/prettier.tsx\":\n/*!*******************************************!*\\\n !*** ./src/components/icons/prettier.tsx ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar PrettierIcon = function (_a) {\\n var className = _a.className;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ className: className, xmlns: \\\"http://www.w3.org/2000/svg\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"currentColor\\\", width: \\\"1em\\\", height: \\\"1em\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M10.33 1.67h-8c-.45-.02-.43-.67 0-.67h8c.44 0 .46.64 0 .67zm-8 2.66c-.45-.02-.43-.66 0-.66H7c.44 0 .45.64 0 .66H2.33zM5.67 3c-.46-.02-.44-.66 0-.67h6.66c.44.01.46.65 0 .67H5.67zm5.33.67c.44 0 .45.64 0 .66H8.33c-.45-.02-.43-.66 0-.66H11zm1.33.66c-.45-.02-.43-.66 0-.66H13c.44 0 .45.64 0 .66h-.67zm-10 1.34c-.45-.02-.43-.67 0-.67h1.34c.43 0 .45.64 0 .67H2.33zm8 0c-.45-.02-.43-.67 0-.67h3.34c.43 0 .45.64 0 .67h-3.34zM5 5.67C4.55 5.65 4.57 5 5 5h.67c.43 0 .45.64 0 .67H5zm-2.67 8c-.45-.02-.43-.67 0-.67h1.34c.43 0 .45.64 0 .67H2.33zm2.67 0c-.45-.02-.43-.67 0-.67h.67c.43 0 .45.64 0 .67H5zM10.33 7c-.45-.02-.43-.66 0-.67h3.34c.43.01.45.65 0 .67h-3.34zm-8 0c-.45-.02-.43-.66 0-.67h3.34c.43.01.45.65 0 .67H2.33zm0 5.33c-.45-.02-.43-.66 0-.66h3.34c.43 0 .45.64 0 .66H2.33zm0 2.67c-.45-.02-.43-.66 0-.67h3.34c.43.01.45.65 0 .67H2.33zm0-6.67c-.45-.02-.43-.66 0-.66H3c.44 0 .45.64 0 .66h-.67zm2 0c-.45-.02-.43-.66 0-.66h2c.44 0 .46.64 0 .66h-2zm3.34 0c-.46-.02-.44-.66 0-.66H13c.44 0 .45.64 0 .66H7.67zm2.66 1.34c-.45-.02-.43-.67 0-.67h2c.44 0 .46.64 0 .67h-2zm-4 0c-.45-.02-.43-.67 0-.67H9c.44 0 .45.64 0 .67H6.33zm-4 0c-.45-.02-.43-.67 0-.67H5c.44 0 .45.64 0 .67H2.33zm0 1.33c-.45-.02-.43-.66 0-.67H3c.44.01.45.65 0 .67h-.67zm2 0c-.45-.02-.43-.66 0-.67h6c.44.01.46.65 0 .67h-6zm-2-8c-.45-.02-.43-.66 0-.67h2c.44.01.46.65 0 .67h-2z\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PrettierIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/prettier.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/setting.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/icons/setting.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar SettingIcon = function (props) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"svg\\\", __assign({ width: \\\"32px\\\", height: \\\"32px\\\", viewBox: \\\"0 0 32 32\\\", enableBackground: \\\"new 0 0 32 32\\\", id: \\\"Stock_cut\\\", xmlSpace: \\\"preserve\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\", xmlnsXlink: \\\"http://www.w3.org/1999/xlink\\\" }, props, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"desc\\\", {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"g\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M31,19v-6h-4.425 c-0.252-0.888-0.611-1.729-1.065-2.51L29,7l-4-4l-3.49,3.49C21.028,6.21,20.525,5.967,20,5.761V1h-8v4.761 c-0.525,0.205-1.028,0.449-1.51,0.728L7,3L3,7l3.49,3.49C6.036,11.271,5.676,12.112,5.425,13H1v6h4.425 c0.252,0.888,0.611,1.729,1.065,2.51L3,25l4,4l3.49-3.49c0.482,0.28,0.986,0.523,1.51,0.728V31h8v-4.761 c0.525-0.205,1.028-0.449,1.51-0.728L25,29l4-4l-3.49-3.49c0.454-0.781,0.813-1.622,1.065-2.51H31z\\\", fill: \\\"none\\\", stroke: \\\"currentColor\\\", strokeLinejoin: \\\"round\\\", strokeMiterlimit: 10, strokeWidth: 2 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"circle\\\", { cx: 16, cy: 16, fill: \\\"none\\\", r: 5, stroke: \\\"currentColor\\\", strokeLinejoin: \\\"round\\\", strokeMiterlimit: 10, strokeWidth: 2 })] })] }))); };\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/setting.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/modal/index.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/modal/index.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \\\"react-dom\\\");\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _components_icons_close__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/close */ \\\"./src/components/icons/close.tsx\\\");\\n/* harmony import */ var _components_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/button */ \\\"./src/components/button/index.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/modal/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\nvar Modal = function (props) {\\n var elRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(document.createElement('div'));\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var rootEl = props.getTarget() || document.body;\\n if (props.visible) {\\n rootEl && rootEl.appendChild(elRef.current);\\n }\\n else {\\n rootEl && rootEl.contains(elRef.current) && rootEl.removeChild(elRef.current);\\n }\\n }, [props.visible]);\\n return react_dom__WEBPACK_IMPORTED_MODULE_2___default().createPortal((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { className: \\\"music-monaco-editor-modal-mask\\\", onClick: function () { return props.onClose && props.onClose(); } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content\\\" }, { children: (props.destroyOnClose && !props.visible) ? null : props.children }))] })), elRef.current);\\n};\\nModal.create = function (props) {\\n var el = document.createElement('div');\\n function close() {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n react_dom__WEBPACK_IMPORTED_MODULE_2___default().render((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal \\\".concat(props.className || '') }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { className: \\\"music-monaco-editor-modal-mask\\\", onClick: close }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content\\\" }, { children: props.content(close) }))] })), el);\\n var rootEl = props.target || document.body;\\n rootEl && rootEl.appendChild(el);\\n return {\\n close: function () {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n };\\n};\\nModal.confirm = function (props) {\\n var el = document.createElement('div');\\n function close() {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n react_dom__WEBPACK_IMPORTED_MODULE_2___default().render((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal \\\".concat(props.className || '') }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { className: \\\"music-monaco-editor-modal-mask\\\", onClick: close }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content music-monaco-editor-modal-content-confirm\\\" }, { children: [props.title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-title\\\" }, { children: props.title })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-content\\\" }, { children: props.content(close) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-footer\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_button__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], __assign({ onClick: function () {\\n if (props.onCancel) {\\n props.onCancel(close);\\n }\\n else {\\n close();\\n }\\n } }, { children: props.cancelText || '取消' })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_button__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], __assign({ onClick: function () { props.onOk && props.onOk(close); }, type: \\\"primary\\\", style: { marginLeft: '4px' } }, { children: props.okText || '确认' }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-close\\\", onClick: close }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_close__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { style: {\\n width: '12px',\\n height: '12px'\\n } }) }))] }))] })), el);\\n var rootEl = props.target || document.body;\\n rootEl && rootEl.appendChild(el);\\n return {\\n close: function () {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n };\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Modal);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/modal/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/openedtab/index.tsx\":\n/*!********************************************!*\\\n !*** ./src/components/openedtab/index.tsx ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var _tabitem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tabitem */ \\\"./src/components/openedtab/tabitem.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/openedtab/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\nfunction dealFiles(files) {\\n var count = {};\\n var resolvedFiles = files.map(function (file) {\\n var path = file.path;\\n var paths = path.split('/');\\n var name = paths.slice(-1)[0];\\n var pre = paths.slice(-2, -1)[0];\\n var prefix = pre ? \\\".../\\\".concat(pre) : './';\\n return __assign({ name: name, prefix: prefix }, file);\\n });\\n resolvedFiles.forEach(function (file) {\\n if (count[file.name]) {\\n count[file.name] += 1;\\n }\\n else {\\n count[file.name] = 1;\\n }\\n });\\n return resolvedFiles.map(function (v) { return (__assign(__assign({}, v), { showPrefix: count[v.name] > 1 })); });\\n}\\nvar OpenedTab = function (_a) {\\n var openedFiles = _a.openedFiles, onPathChange = _a.onPathChange, currentPath = _a.currentPath, onCloseFile = _a.onCloseFile, rootEl = _a.rootEl, onSaveFile = _a.onSaveFile, onAbortSave = _a.onAbortSave, onCloseOtherFiles = _a.onCloseOtherFiles;\\n var files = dealFiles(openedFiles);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-opened-tab-wrapper\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-opened-tab\\\" }, { children: files.map(function (file) {\\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabitem__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"], { onSaveFile: onSaveFile, onAbortSave: onAbortSave, rootEl: rootEl, onCloseFile: onCloseFile, file: file, onPathChange: onPathChange, currentPath: currentPath, onCloseOtherFiles: onCloseOtherFiles }, file.path);\\n }) })) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenedTab);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/openedtab/tabitem.tsx\":\n/*!**********************************************!*\\\n !*** ./src/components/openedtab/tabitem.tsx ***!\n \\**********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons */ \\\"./src/components/icons/index.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\nvar TabItem = function (_a) {\\n var file = _a.file, onPathChange = _a.onPathChange, currentPath = _a.currentPath, onCloseFile = _a.onCloseFile, rootEl = _a.rootEl, onSaveFile = _a.onSaveFile, onAbortSave = _a.onAbortSave, onCloseOtherFiles = _a.onCloseOtherFiles;\\n var itemRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var name = file.path.split('/').slice(-1)[0];\\n var fileType;\\n if (file.path && file.path.indexOf('.') !== -1) {\\n fileType = \\\"file_type_\\\".concat(file.path.split('.').slice(-1));\\n }\\n else {\\n fileType = 'default_file';\\n }\\n var active = currentPath === file.path;\\n var handlePathChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n var key = e.currentTarget.dataset.src;\\n if (onPathChange) {\\n onPathChange(key);\\n }\\n }, [onPathChange]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n if (active) {\\n (_a = itemRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({\\n block: 'nearest',\\n });\\n }\\n }, [active]);\\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), hover = _b[0], setHover = _b[1];\\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), hoverRight = _c[0], setHoverRight = _c[1];\\n var handleOver = function (e) {\\n if (e.target instanceof HTMLElement) {\\n if (e.target.dataset.name === 'editing') {\\n setHoverRight(true);\\n }\\n else {\\n setHoverRight(false);\\n }\\n }\\n setHover(true);\\n };\\n var handleLeave = function () {\\n setHover(false);\\n setHoverRight(false);\\n };\\n var handleClose = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n e.stopPropagation();\\n if (file.status === 'editing') {\\n setTimeout(function () {\\n _components_modal__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"].confirm({\\n title: '是否要保存对本文件的修改',\\n target: rootEl.current,\\n okText: '保存',\\n cancelText: '不保存',\\n onCancel: function (close) {\\n close();\\n onAbortSave(file.path);\\n },\\n onOk: function (close) {\\n close();\\n onCloseFile(file.path);\\n onSaveFile(file.path);\\n },\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u5982\\\\u679C\\\\u4E0D\\\\u4FDD\\\\u5B58\\\\uFF0C\\\\u4F60\\\\u7684\\\\u66F4\\\\u6539\\\\u5C06\\\\u4E22\\\\u5931\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [\\\"\\\\u5F53\\\\u524D\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84: \\\", file.path] })] })); },\\n });\\n });\\n }\\n else {\\n onCloseFile(file.path);\\n }\\n }, [file, onCloseFile, onAbortSave, rootEl, onSaveFile]);\\n var handleMouseDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n if (e.button !== 2) {\\n return;\\n }\\n var position = {\\n x: e.clientX,\\n y: e.clientY,\\n };\\n setTimeout(function () {\\n _components_modal__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"].create({\\n title: '是否确认删除?',\\n target: rootEl.current,\\n onOk: function (close) {\\n close();\\n },\\n content: function (close) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ style: {\\n top: \\\"\\\".concat(position.y, \\\"px\\\"),\\n left: \\\"\\\".concat(position.x, \\\"px\\\"),\\n }, className: \\\"music-monaco-editor-rightclick-panel\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function (e) {\\n close();\\n handleClose(e);\\n }, className: \\\"music-monaco-editor-rightclick-panel-item\\\" }, { children: \\\"Close\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () {\\n close();\\n onCloseOtherFiles(file.path);\\n }, className: \\\"music-monaco-editor-rightclick-panel-item\\\" }, { children: \\\"Close others\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () {\\n close();\\n onCloseOtherFiles('');\\n }, className: \\\"music-monaco-editor-rightclick-panel-item\\\" }, { children: \\\"Close all\\\" }))] }))); },\\n className: 'music-monaco-editor-modal-rightclick'\\n });\\n });\\n }, [handleClose, onCloseOtherFiles, file.path, rootEl]);\\n var closeVisible = true;\\n if (file.status === 'editing' && !hoverRight) {\\n closeVisible = false;\\n }\\n else if (file.status !== 'editing' && !hover && !active) {\\n closeVisible = false;\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ ref: itemRef, onContextMenu: function (e) { return e.preventDefault(); }, onMouseDown: handleMouseDown, onMouseOver: handleOver, onMouseLeave: handleLeave, \\\"data-src\\\": file.path, className: \\\"music-monaco-editor-opened-tab-item \\\".concat(active ? 'music-monaco-editor-opened-tab-item-focused' : ''), onClick: handlePathChange }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { type: fileType, style: { marginRight: '2px' } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1, paddingRight: '5px' } }, { children: name })), file.showPrefix && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ className: \\\"music-monaco-editor-opened-tab-item-prefix\\\" }, { children: file.prefix }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", { \\\"data-name\\\": \\\"editing\\\", className: \\\"music-monaco-editor-opened-tab-item-editing\\\", style: {\\n visibility: (file.status === 'editing' && !hoverRight) ? 'visible' : 'hidden'\\n } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ \\\"data-name\\\": \\\"editing\\\", onClick: handleClose, style: {\\n visibility: closeVisible ? 'visible' : 'hidden'\\n }, className: \\\"music-monaco-editor-opened-tab-item-close\\\" }, { children: \\\"x\\\" }))] })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TabItem);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/tabitem.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/prettier/index.tsx\":\n/*!*******************************************!*\\\n !*** ./src/components/prettier/index.tsx ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _icons_prettier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icons/prettier */ \\\"./src/components/icons/prettier.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/prettier/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\n\\n\\n\\nvar Prettier = function (props) {\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n function loadPrettier() {\\n return __awaiter(this, void 0, void 0, function () {\\n function provideDocumentFormattingEdits(model) {\\n var p = window.require('prettier');\\n if (!p.prettier)\\n return;\\n try {\\n var text = p.prettier.format(model.getValue(), {\\n filepath: model.uri.path,\\n plugins: p.prettierPlugins,\\n singleQuote: true,\\n tabWidth: 4,\\n });\\n return [\\n {\\n range: model.getFullModelRange(),\\n text: text,\\n },\\n ];\\n }\\n catch (e) {\\n console.log(new Error('prettier format error'));\\n }\\n }\\n return __generator(this, function (_a) {\\n window.monaco.languages.registerDocumentFormattingEditProvider('javascript', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n window.monaco.languages.registerDocumentFormattingEditProvider('typescript', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n setTimeout(function () {\\n window.monaco.languages.registerDocumentFormattingEditProvider('html', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n }, 3000);\\n window.monaco.languages.registerDocumentFormattingEditProvider('css', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n window.monaco.languages.registerDocumentFormattingEditProvider('less', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n return [2 /*return*/];\\n });\\n });\\n }\\n loadPrettier();\\n }, []);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({}, props, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons_prettier__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { className: \\\"music-monaco-editor-prettier-icon\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Prettier);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/prettier/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchfile/index.tsx\":\n/*!*********************************************!*\\\n !*** ./src/components/searchfile/index.tsx ***!\n \\*********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _search_file_body__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./search-file-body */ \\\"./src/components/searchfile/search-file-body.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/searchfile/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\\n if (ar || !(i in from)) {\\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\\n ar[i] = from[i];\\n }\\n }\\n return to.concat(ar || Array.prototype.slice.call(from));\\n};\\n\\n\\n\\n\\nvar SearchFile = function (props) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]), searchResults = _a[0], setSearchResults = _a[1];\\n var filenames = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(Array.isArray(props.list) ? __spreadArray([], props.list, true) : [])[0];\\n var onSelectFile = props.onSelectFile;\\n var handleSearch = function (query) {\\n if (!query || query.length === 0) {\\n setSearchResults([]);\\n return;\\n }\\n var results = filenames.filter(function (file) {\\n return file.toLowerCase().includes(query.toLowerCase());\\n });\\n setSearchResults(results);\\n };\\n var onExecute = function (filename) {\\n onSelectFile && onSelectFile(filename);\\n };\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: 'search-file-background' }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: 'search-file-body-back' }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_search_file_body__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { onSearch: handleSearch, searchResults: searchResults, onExecute: onExecute }) })) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchFile);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchfile/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchfile/search-file-body.tsx\":\n/*!********************************************************!*\\\n !*** ./src/components/searchfile/search-file-body.tsx ***!\n \\********************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons */ \\\"./src/components/icons/index.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\nvar SearchModal = function (_a) {\\n var onSearch = _a.onSearch, searchResults = _a.searchResults, onExecute = _a.onExecute;\\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), searchQuery = _b[0], setSearchQuery = _b[1];\\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0), selectedItem = _c[0], setSelectedItem = _c[1];\\n var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var modalRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();\\n }, [inputRef]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (searchResults.length > 0 && modalRef.current) {\\n var selectedItemElement = modalRef.current.childNodes[selectedItem];\\n if (selectedItemElement) {\\n selectedItemElement.scrollIntoView({ behavior: 'smooth', block: 'center' });\\n }\\n }\\n }, [selectedItem, searchResults]);\\n var handleKeyDown = function (e) {\\n var target = e.target;\\n if (target.id === 'file-search-input') {\\n if (e.key === 'ArrowDown') {\\n e.preventDefault();\\n setSelectedItem(function (prev) { return (prev + 1) % searchResults.length; });\\n }\\n else if (e.key === 'ArrowUp') {\\n e.preventDefault();\\n setSelectedItem(function (prev) { return (prev - 1 + searchResults.length) % searchResults.length; });\\n }\\n else if (e.key === 'Enter') {\\n e.preventDefault();\\n onExecute(searchResults[selectedItem]);\\n }\\n }\\n };\\n var onClickLine = function (index) {\\n setSelectedItem(index);\\n onExecute(searchResults[index]);\\n };\\n var getFileType = function (filename) {\\n var fileName = filename.split('/').pop();\\n var fileType;\\n if (fileName && fileName.indexOf('.') !== -1) {\\n fileType = \\\"file_type_\\\".concat(fileName.split('.').slice(-1));\\n }\\n else {\\n fileType = 'default_file';\\n }\\n return fileType;\\n };\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"search-file-modal-overlay\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"search-file-modal\\\", onClick: function (e) { return e.stopPropagation(); } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"input\\\", { ref: inputRef, className: 'search-file-input', id: \\\"file-search-input\\\", type: \\\"text\\\", value: searchQuery, onChange: function (e) {\\n setSearchQuery(e.target.value);\\n setSelectedItem(0);\\n onSearch(e.target.value);\\n }, onKeyDown: handleKeyDown, placeholder: \\\"Search for files...\\\" }), searchResults.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"ul\\\", __assign({ ref: modalRef, style: { listStyleType: 'none', padding: 0, maxHeight: '500px', overflowY: 'auto' } }, { children: searchResults.map(function (result, index) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"li\\\", __assign({ className: index === selectedItem ? 'search-file-result-item-selected' : 'search-file-result-item', onClick: function () { return onClickLine(index); } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { type: getFileType(result), style: {\\n marginLeft: '5px',\\n marginRight: '5px',\\n } }), result] }), index)); }) })))] })) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchModal);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchfile/search-file-body.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchtext/index.tsx\":\n/*!*********************************************!*\\\n !*** ./src/components/searchtext/index.tsx ***!\n \\*********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _search_input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./search-input */ \\\"./src/components/searchtext/search-input.tsx\\\");\\n/* harmony import */ var _search_result__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./search-result */ \\\"./src/components/searchtext/search-result.tsx\\\");\\n/* harmony import */ var _search_text_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./search-text.less */ \\\"./src/components/searchtext/search-text.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\nvar SearchAndReplace = function (_a) {\\n var onSelectedLine = _a.onSelectedLine, listFiles = _a.listFiles, style = _a.style, onClose = _a.onClose;\\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), searchText = _b[0], setSearchText = _b[1];\\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]), searchResults = _c[0], setSearchResults = _c[1];\\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({}), unExpandedTitles = _d[0], setUnExpandedTitles = _d[1];\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({ titleIndex: -1, rowIndex: -1 }), selectedRow = _e[0], setSelectedRow = _e[1];\\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]), allSelectResults = _f[0], setAllSelectResults = _f[1];\\n var innerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n handleSearch();\\n }, [searchText, listFiles]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n smoothSelectedResults();\\n }, [searchResults, unExpandedTitles]);\\n var clear = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n setSearchResults([]);\\n setUnExpandedTitles({});\\n }, []);\\n var handleSearch = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var _a;\\n if (searchText.length === 0) {\\n clear();\\n return;\\n }\\n var lsearchResults = [];\\n for (var _i = 0, _b = Object.entries(listFiles); _i < _b.length; _i++) {\\n var _c = _b[_i], key = _c[0], value = _c[1];\\n var matches = value.split(\\\"\\\\n\\\");\\n if (matches) {\\n var matchingSubstrings = [];\\n for (var i = 0; i < matches.length; i++) {\\n var lineStr = matches[i];\\n if (lineStr.toLowerCase().includes(searchText.toLowerCase())) {\\n matchingSubstrings.push({ code: lineStr, line: i + 1 });\\n }\\n }\\n if (matchingSubstrings.length > 0) {\\n //[key]\\n lsearchResults.push((_a = {}, _a[key] = matchingSubstrings, _a));\\n }\\n }\\n }\\n setSearchResults(lsearchResults);\\n }, [searchText, listFiles]);\\n var smoothSelectedResults = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var selectedResults = [];\\n searchResults.forEach(function (result, titleIndex) {\\n if (!unExpandedTitles[titleIndex] && searchText) {\\n Object.keys(result !== null && result !== void 0 ? result : {}).forEach(function (title) {\\n result[title].forEach(function (row, rowIndex) {\\n selectedResults.push({ titleIndex: titleIndex, rowIndex: rowIndex });\\n });\\n });\\n }\\n });\\n setAllSelectResults(selectedResults);\\n }, [unExpandedTitles, searchText, searchResults]);\\n var preRow = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (titleIndex, rowIndex) {\\n var index = allSelectResults.findIndex(function (item) {\\n return item.titleIndex === titleIndex && item.rowIndex === rowIndex;\\n });\\n if (index - 1 >= 0) {\\n return allSelectResults[index - 1];\\n }\\n return { titleIndex: titleIndex, rowIndex: rowIndex };\\n }, [allSelectResults]);\\n var nextRow = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (titleIndex, rowIndex) {\\n var index = allSelectResults.findIndex(function (item) { return item.titleIndex === titleIndex && item.rowIndex === rowIndex; });\\n if (allSelectResults.length > index + 1) {\\n return allSelectResults[index + 1];\\n }\\n return { titleIndex: titleIndex, rowIndex: rowIndex };\\n }, [allSelectResults]);\\n var handleKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (event) {\\n if (event.key === 'ArrowDown') {\\n event.preventDefault();\\n setSelectedRow(function (pre) { return nextRow(pre.titleIndex, pre.rowIndex); });\\n }\\n else if (event.key === 'ArrowUp') {\\n event.preventDefault();\\n setSelectedRow(function (pre) { return preRow(pre.titleIndex, pre.rowIndex); });\\n }\\n }, [selectedRow, allSelectResults]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var current = innerRef === null || innerRef === void 0 ? void 0 : innerRef.current;\\n if (current) {\\n current.addEventListener('keydown', handleKeyDown);\\n return function () {\\n current.removeEventListener('keydown', handleKeyDown);\\n };\\n }\\n }, [innerRef, handleKeyDown]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (selectedRow.titleIndex >= 0 && searchResults && searchResults.length > selectedRow.titleIndex) {\\n var keys = Object.keys(searchResults[selectedRow.titleIndex]);\\n if (keys && keys.length > 0) {\\n var title = keys[0];\\n var entry = searchResults[selectedRow.titleIndex][title][selectedRow.rowIndex];\\n onSelectedLine && onSelectedLine(title, entry.line);\\n }\\n }\\n }, [selectedRow]);\\n var toggleExpand = function (expanded, titleIndex) {\\n setUnExpandedTitles(function (prev) {\\n var _a;\\n return (__assign(__assign({}, prev), (_a = {}, _a[titleIndex] = !expanded, _a)));\\n });\\n setSelectedRow({ titleIndex: -1, rowIndex: -1 });\\n };\\n var handleRowSelection = function (titleIndex, title, rowIndex, row) {\\n setSelectedRow({ titleIndex: titleIndex, rowIndex: rowIndex });\\n };\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ ref: innerRef, className: \\\"music-monaco-editor-list-wrapper\\\", style: __assign(__assign({}, style), { overflow: 'auto', background: 'var(--monaco-editor-background)', display: 'flex', flexDirection: 'column' }), tabIndex: 0 }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_search_input__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { searchText: searchText, setSearchText: setSearchText, onClose: onClose }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_search_result__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { searchResults: searchResults, unExpandedTitles: unExpandedTitles, searchText: searchText, selectedRow: selectedRow, handleRowSelection: handleRowSelection, toggleExpand: toggleExpand })] })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchAndReplace);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchtext/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchtext/search-file-title.tsx\":\n/*!*********************************************************!*\\\n !*** ./src/components/searchtext/search-file-title.tsx ***!\n \\*********************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons */ \\\"./src/components/icons/index.tsx\\\");\\n/* harmony import */ var _components_icons_arrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/arrow */ \\\"./src/components/icons/arrow.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\nvar SearchFileTitle = function (props) {\\n var title = props.title, onExpanded = props.onExpanded;\\n // 默认展开\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), expanded = _a[0], setExpanded = _a[1];\\n var renderTitle = function (titleText) {\\n var fileName = titleText.split('/').pop();\\n var fileType;\\n if (fileName && fileName.indexOf('.') !== -1) {\\n fileType = \\\"file_type_\\\".concat(fileName.split('.').slice(-1));\\n }\\n else {\\n fileType = 'default_file';\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"search-results-title\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_arrow__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { collpase: !expanded }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { type: fileType, style: {\\n marginLeft: '5px',\\n marginRight: '5px',\\n } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { color: 'var(--monaco-list-focusForeground)', marginRight: 5 } }, { children: fileName })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { color: 'var(--monaco-list-focusForeground)' } }, { children: titleText }))] })));\\n };\\n var toggleExpand = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n setExpanded(function (prevExpanded) { return !prevExpanded; });\\n onExpanded && onExpanded(!expanded);\\n }, [expanded, onExpanded]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"search-results-title\\\", onClick: toggleExpand }, { children: renderTitle(title) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchFileTitle);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchtext/search-file-title.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchtext/search-input.tsx\":\n/*!****************************************************!*\\\n !*** ./src/components/searchtext/search-input.tsx ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons_close__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons/close */ \\\"./src/components/icons/close.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\nvar SearchInput = function (_a) {\\n var searchText = _a.searchText, setSearchText = _a.setSearchText, onClose = _a.onClose;\\n var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();\\n }, [inputRef]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: 'search-result-top-search' }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"input\\\", { className: 'search-result-input', type: \\\"text\\\", ref: inputRef, value: searchText, onChange: function (e) { return setSearchText(e.target.value); }, placeholder: \\\"\\\\u641C\\\\u7D22\\\\uFF08\\\\u4E0A\\\\u4E0B\\\\u952E\\\\u5207\\\\u6362\\\\uFF09\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () { return onClose(false); }, className: \\\"music-monaco-editor--close\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_close__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { style: {\\n width: '12px',\\n height: '12px',\\n } }) }))] })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchInput);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchtext/search-input.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/searchtext/search-result.tsx\":\n/*!*****************************************************!*\\\n !*** ./src/components/searchtext/search-result.tsx ***!\n \\*****************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var _search_file_title__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./search-file-title */ \\\"./src/components/searchtext/search-file-title.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\nvar SearchResult = function (_a) {\\n var searchResults = _a.searchResults, unExpandedTitles = _a.unExpandedTitles, searchText = _a.searchText, selectedRow = _a.selectedRow, handleRowSelection = _a.handleRowSelection, toggleExpand = _a.toggleExpand;\\n var renderStringWithHighlight = function (str, highlight) {\\n var parts = str.split(highlight);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", { children: parts.map(function (part, index) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"span\\\", { children: [part, index !== parts.length - 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { backgroundColor: '#E9C4AA' } }, { children: highlight }))] }, index)); }) }));\\n };\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"ul\\\", __assign({ className: 'search-result-list' }, { children: searchResults.map(function (result, titleIndex) {\\n return Object.keys(result !== null && result !== void 0 ? result : {}).map(function (title) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"li\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_search_file_title__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"], { title: title, onExpanded: function (expanded) { return toggleExpand(expanded, titleIndex); } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"ul\\\", __assign({ style: {\\n listStyleType: 'none',\\n paddingLeft: 10,\\n display: !unExpandedTitles[titleIndex] ? 'block' : 'none',\\n overflow: 'auto'\\n } }, { children: searchText && result[title].map(function (row, rowIndex) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"li\\\", __assign({ className: titleIndex === selectedRow.titleIndex && rowIndex === selectedRow.rowIndex ? 'search-results-item-selected' : 'search-results-item', onClick: function () { return handleRowSelection(titleIndex, title, rowIndex, row); } }, { children: renderStringWithHighlight(row.code, searchText) }), rowIndex)); }) }))] }, titleIndex)); });\\n }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchResult);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/searchtext/search-result.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/components/menu.tsx\":\n/*!***************************************************!*\\\n !*** ./src/components/select/components/menu.tsx ***!\n \\***************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\nvar Menu = function (_a) {\\n var _b = _a.label, label = _b === void 0 ? '' : _b, value = _a.value, className = _a.className, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, _d = _a.handleSelect, handleSelect = _d === void 0 ? function () { return ({}); } : _d;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), selected = _e[0], setSelected = _e[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (defaultValue === value) {\\n setSelected(true);\\n }\\n }, [value, defaultValue]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () {\\n handleSelect({ value: value, label: label });\\n }, className: \\\"music-monaco-editor-select-item \\\".concat(selected ? 'music-monaco-editor-select-item-selected' : '') }, { children: label })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Menu);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/components/menu.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/components/position.tsx\":\n/*!*******************************************************!*\\\n !*** ./src/components/select/components/position.tsx ***!\n \\*******************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \\\"react-dom\\\");\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\\n\\n\\nvar Position = function (_a) {\\n var instance = _a.instance, targetRef = _a.targetRef, _b = _a.children, children = _b === void 0 ? null : _b, getContainer = _a.getContainer, _c = _a.onNotVisibleArea, onNotVisibleArea = _c === void 0 ? function () { return ({}); } : _c;\\n var container = getContainer && getContainer() || document.body;\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n container.appendChild(instance);\\n return function () {\\n if (container.contains(instance)) {\\n container.removeChild(instance);\\n }\\n };\\n }, [instance, container]);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n function setInstanceStyle() {\\n var _a = targetRef.current.getBoundingClientRect(), top = _a.top, left = _a.left, height = _a.height, width = _a.width;\\n var _b = container.getBoundingClientRect(), top1 = _b.top, left1 = _b.left;\\n var style = {\\n top: container.scrollTop + (top - top1) + height + 1 + 'px',\\n left: container.scrollLeft + (left - left1) + 'px',\\n };\\n instance.style.top = style.top;\\n instance.style.left = style.left;\\n instance.style.width = width + 'px';\\n return { top: top, left: left, height: height };\\n }\\n setInstanceStyle();\\n function handleScroll() {\\n var _a = setInstanceStyle(), top = _a.top, height = _a.height;\\n if (container.offsetTop > top) {\\n onNotVisibleArea();\\n }\\n if (top - container.offsetTop + height > container.offsetHeight) {\\n onNotVisibleArea();\\n }\\n }\\n container.addEventListener('scroll', handleScroll);\\n return function () {\\n container.removeEventListener('scroll', handleScroll);\\n };\\n }, [targetRef, container]);\\n return react_dom__WEBPACK_IMPORTED_MODULE_1___default().createPortal(children, instance);\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Position);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/components/position.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/index.tsx\":\n/*!*****************************************!*\\\n !*** ./src/components/select/index.tsx ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons_arrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons/arrow */ \\\"./src/components/icons/arrow.tsx\\\");\\n/* harmony import */ var _components_menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/menu */ \\\"./src/components/select/components/menu.tsx\\\");\\n/* harmony import */ var _components_position__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/position */ \\\"./src/components/select/components/position.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/select/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\nvar instance = document.createElement('div');\\ninstance.className = \\\"music-monaco-editor-select-items\\\";\\nvar Select = function (_a) {\\n var defaultValue = _a.defaultValue, _b = _a.onChange, onChange = _b === void 0 ? function () { return ({}); } : _b, getContainer = _a.getContainer, children = _a.children, valueFromProps = _a.value;\\n var isControlled = typeof valueFromProps !== 'undefined';\\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultValue || ''), internalValue = _c[0], setInternalValue = _c[1];\\n var value = isControlled ? valueFromProps : internalValue;\\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), visible = _d[0], setVisible = _d[1];\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({ value: defaultValue, label: '' }), data = _e[0], setData = _e[1];\\n var targetRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var container = (getContainer && getContainer()) || document.body;\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (!children)\\n return;\\n var childs = react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(children);\\n for (var i = 0; i < childs.length; i++) {\\n var child = childs[i];\\n if (react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(child)) {\\n if (child.props.value === value) {\\n setData(child.props);\\n break;\\n }\\n }\\n }\\n }, [value, children]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n return function () {\\n if (container.contains(instance)) {\\n container.removeChild(instance);\\n }\\n };\\n }, [container]);\\n var handleSelect = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (data) {\\n if (!isControlled) {\\n setInternalValue(data.value);\\n }\\n setData(data);\\n setVisible(false);\\n onChange && onChange(data.value);\\n }, [onChange, isControlled]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ ref: targetRef, className: \\\"music-monaco-editor-select\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-select-content\\\", onClick: function (e) {\\n e.stopPropagation();\\n setVisible(function (pre) { return !pre; });\\n } }, { children: [data.label, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-select-content-arrow\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_arrow__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { collpase: !visible }) }))] })) })), visible && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_position__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], __assign({ instance: instance, targetRef: targetRef, getContainer: getContainer }, { children: react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(children).map(function (child) { return (react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(child) ? react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(child, {\\n // @ts-ignore\\n defaultValue: data.value,\\n handleSelect: handleSelect,\\n }) : child); }) })))] }));\\n};\\nSelect.Menu = _components_menu__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"];\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Select);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/index.ts\":\n/*!**********************!*\\\n !*** ./src/index.ts ***!\n \\**********************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"MultiEditor\\\": () => (/* reexport safe */ _multi__WEBPACK_IMPORTED_MODULE_0__.MultiEditor),\\n/* harmony export */ \\\"SingleEditor\\\": () => (/* reexport safe */ _single__WEBPACK_IMPORTED_MODULE_1__.SingleEditor)\\n/* harmony export */ });\\n/* harmony import */ var _multi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multi */ \\\"./src/multi/index.tsx\\\");\\n/* harmony import */ var _single__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./single */ \\\"./src/single/index.tsx\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\n\\n\\n\\n// 准备monaco-editor主题等\\n(0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.startUp)();\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/index.ts?\");\n\n/***/ }),\n\n/***/ \"./src/multi/Editor.tsx\":\n/*!******************************!*\\\n !*** ./src/multi/Editor.tsx ***!\n \\******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"MultiEditorComp\\\": () => (/* binding */ MultiEditorComp),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_openedtab__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/openedtab */ \\\"./src/components/openedtab/index.tsx\\\");\\n/* harmony import */ var _components_filelist__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/filelist */ \\\"./src/components/filelist/index.tsx\\\");\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _components_prettier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @components/prettier */ \\\"./src/components/prettier/index.tsx\\\");\\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @utils */ \\\"./src/utils/index.ts\\\");\\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @utils/consts */ \\\"./src/utils/consts.ts\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\n/* harmony import */ var _components_Setting__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @components/Setting */ \\\"./src/components/Setting/index.tsx\\\");\\n/* harmony import */ var _hook__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hook */ \\\"./src/multi/hook.ts\\\");\\n/* harmony import */ var _components_searchfile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @components/searchfile */ \\\"./src/components/searchfile/index.tsx\\\");\\n/* harmony import */ var _components_searchtext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @components/searchtext */ \\\"./src/components/searchtext/index.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\\n if (ar || !(i in from)) {\\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\\n ar[i] = from[i];\\n }\\n }\\n return to.concat(ar || Array.prototype.slice.call(from));\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n// eslint-disable-next-line @typescript-eslint/no-empty-function\\nvar noop = function () { };\\nvar MultiEditorComp = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_a, ref) {\\n var defaultPath = _a.defaultPath, _b = _a.defaultTheme, defaultTheme = _b === void 0 ? 'OneDarkPro' : _b, onPathChange = _a.onPathChange, onValueChange = _a.onValueChange, onRenameFile = _a.onRenameFile, _c = _a.defaultFiles, defaultFiles = _c === void 0 ? {} : _c, onFileChange = _a.onFileChange, onFileSave = _a.onFileSave, _d = _a.ideConfig, ideConfig = _d === void 0 ? {\\n disableFileOps: {},\\n disableFolderOps: {},\\n disableEslint: false,\\n disableSetting: false,\\n disablePrettier: false,\\n saveWhenBlur: false,\\n disableSearch: false\\n } : _d, options = _a.options, title = _a.title;\\n var onPathChangeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onPathChange);\\n var onValueChangeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onValueChange);\\n var onFileChangeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onFileChange);\\n var onFileSaveRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onFileSave);\\n var optionsRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(options);\\n var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var filelistRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var editorRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var prePath = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');\\n var filesRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(__assign({}, defaultFiles));\\n var valueLisenerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\\n var editorStatesRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(new Map());\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), searchTextVisible = _e[0], setSearchTextVisible = _e[1];\\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), searchFileVisible = _f[0], setSearchFileVisible = _f[1];\\n var _g = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultPath && filesRef.current[defaultPath]\\n ? [\\n {\\n path: defaultPath,\\n },\\n ]\\n : []), openedFiles = _g[0], setOpenedFiles = _g[1];\\n var _h = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultPath || ''), curPath = _h[0], setCurPath = _h[1];\\n var curPathRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(defaultPath || '');\\n var curValueRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');\\n var _j = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.usePrettier)(editorRef), autoPrettierRef = _j[0], handleSetAutoPrettier = _j[1], handleFromat = _j[2];\\n var _k = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useDragLine)(180), styles = _k[0], handleMoveStart = _k[1], handleMove = _k[2], handleMoveEnd = _k[3];\\n var disableEslintRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(ideConfig.disableEslint);\\n disableEslintRef.current = ideConfig.disableEslint;\\n if (!ideConfig.disableSearch) {\\n var handleKeyDown_1 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (event) {\\n var _a;\\n if (event.metaKey && event.shiftKey && (event.key === 'f' || event.key === 'F') && !searchTextVisible) {\\n event.preventDefault();\\n setSearchTextVisible(true);\\n }\\n else if (event.metaKey && event.key === 'p') {\\n event.preventDefault();\\n setSearchFileVisible(function (pre) { return !pre; });\\n (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();\\n }\\n }, [searchTextVisible, searchFileVisible]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var refCurrent = rootRef.current;\\n ;\\n refCurrent === null || refCurrent === void 0 ? void 0 : refCurrent.addEventListener('keydown', handleKeyDown_1);\\n return function () {\\n refCurrent === null || refCurrent === void 0 ? void 0 : refCurrent.removeEventListener('keydown', handleKeyDown_1);\\n };\\n }, [rootRef]); // 当 ref 改变时更新\\n }\\n var restoreModel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var _a, _b;\\n var editorStates = editorStatesRef.current;\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === path; });\\n if (path !== prePath.current && prePath.current) {\\n editorStates.set(prePath.current, (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.saveViewState());\\n }\\n if (model && editorRef.current) {\\n editorRef.current.setModel(model);\\n // 如果path改变,那么恢复上一次的状态\\n if (path !== prePath.current) {\\n // 取消上次的监听\\n if (valueLisenerRef.current && valueLisenerRef.current.dispose) {\\n valueLisenerRef.current.dispose();\\n }\\n var editorState = editorStates.get(path);\\n if (editorState) {\\n (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.restoreViewState(editorState);\\n }\\n // 聚焦editor\\n // editorRef.current?.focus();\\n var timer_1 = null;\\n var v = model.getValue();\\n curValueRef.current = v;\\n valueLisenerRef.current = model.onDidChangeContent(function () {\\n var v = model.getValue();\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path === path) {\\n v.status = 'editing';\\n }\\n return v;\\n });\\n });\\n curValueRef.current = v;\\n if (onValueChangeRef.current) {\\n onValueChangeRef.current(v, path);\\n }\\n // eslint解析需要消抖,延迟500ms消抖即可\\n if (timer_1)\\n clearTimeout(timer_1);\\n timer_1 = setTimeout(function () {\\n timer_1 = null;\\n _utils__WEBPACK_IMPORTED_MODULE_6__.worker.then(function (res) {\\n if (!disableEslintRef.current) {\\n res.postMessage({\\n code: model.getValue(),\\n version: model.getVersionId(),\\n path: path,\\n });\\n }\\n });\\n }, 500);\\n });\\n }\\n _utils__WEBPACK_IMPORTED_MODULE_6__.worker.then(function (res) {\\n if (!disableEslintRef.current) {\\n res.postMessage({\\n code: model.getValue(),\\n version: model.getVersionId(),\\n path: path,\\n });\\n }\\n });\\n prePath.current = path;\\n return model;\\n }\\n else {\\n // 如果当前model不存在,那么取消监听\\n if (valueLisenerRef.current && valueLisenerRef.current.dispose) {\\n valueLisenerRef.current.dispose();\\n }\\n }\\n return false;\\n }, [onValueChangeRef]);\\n var seCurPathAndNotify = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n if (path !== curPathRef.current) {\\n curPathRef.current = path;\\n if (onPathChangeRef.current && path && notify) {\\n onPathChangeRef.current(path);\\n }\\n setCurPath(path);\\n }\\n }, [onPathChangeRef]);\\n var openOrFocusPath = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n setOpenedFiles(function (pre) {\\n var exist = false;\\n pre.forEach(function (v) {\\n if (v.path === path) {\\n exist = true;\\n }\\n });\\n if (exist) {\\n return pre;\\n }\\n else {\\n return __spreadArray(__spreadArray([], pre, true), [{ path: path }], false);\\n }\\n });\\n seCurPathAndNotify(path, notify);\\n }, [seCurPathAndNotify]);\\n var handlePathChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, nofity) {\\n if (nofity === void 0) { nofity = true; }\\n var model = restoreModel(path);\\n if (model) {\\n openOrFocusPath(path, nofity);\\n }\\n }, [restoreModel, openOrFocusPath]);\\n (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useInit)(filesRef, editorRef, options, handlePathChange, defaultPath, ideConfig.disableEslint);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n setTimeout(function () {\\n if (defaultPath) {\\n handlePathChange(defaultPath);\\n }\\n });\\n }, []);\\n var saveFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, model) {\\n var _a;\\n if (autoPrettierRef.current && !ideConfig.disablePrettier) {\\n var realpath_1 = path || curPathRef.current;\\n (_a = handleFromat()) === null || _a === void 0 ? void 0 : _a.then(function () {\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path === realpath_1) {\\n v.status = 'saved';\\n }\\n return v;\\n });\\n });\\n var val = (model === null || model === void 0 ? void 0 : model.getValue()) || curValueRef.current;\\n filesRef.current[realpath_1] = val;\\n if (onFileSaveRef.current) {\\n onFileSaveRef.current(realpath_1, val);\\n }\\n });\\n }\\n else {\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path === curPathRef.current) {\\n v.status = 'saved';\\n }\\n return v;\\n });\\n });\\n filesRef.current[curPathRef.current] = curValueRef.current;\\n if (onFileSaveRef.current) {\\n onFileSaveRef.current(curPathRef.current, curValueRef.current);\\n }\\n }\\n }, [handleFromat, autoPrettierRef, ideConfig.disablePrettier, onFileSaveRef]);\\n var editorNodeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useEditor)(editorRef, optionsRef, openOrFocusPath, ideConfig.saveWhenBlur ? saveFile : noop);\\n var onCloseFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var targetPath = '';\\n if (openedFiles.length) {\\n var res = openedFiles.filter(function (v, index) {\\n if (v.path === path) {\\n if (index === 0) {\\n if (openedFiles[index + 1]) {\\n targetPath = openedFiles[index + 1].path;\\n }\\n }\\n else {\\n targetPath = openedFiles[index - 1].path;\\n }\\n }\\n return v.path !== path;\\n });\\n // 目标文件是当前文件,且存在下一激活文件时,执行model及path切换的逻辑\\n if (targetPath && curPathRef.current === path) {\\n restoreModel(targetPath);\\n seCurPathAndNotify(targetPath);\\n }\\n if (res.length === 0) {\\n restoreModel('');\\n seCurPathAndNotify('');\\n prePath.current = '';\\n }\\n setOpenedFiles(res);\\n }\\n }, [restoreModel, openedFiles, seCurPathAndNotify]);\\n var closeOtherFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var unSavedFiles = openedFiles.filter(function (v) { return v.status === 'editing'; });\\n if (unSavedFiles.length) {\\n _components_modal__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"].confirm({\\n title: '是否要保留未保存文件的修改',\\n target: rootRef.current,\\n okText: '保存',\\n cancelText: '不保存',\\n onCancel: function (close) {\\n close();\\n setOpenedFiles(function (pre) { return pre.filter(function (p) { return p.path === path; }); });\\n restoreModel(path);\\n seCurPathAndNotify(path);\\n // 恢复文件的数值修改\\n unSavedFiles.forEach(function (v) {\\n var value = filesRef.current[v.path] || '';\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(v.path, value);\\n });\\n prePath.current = path;\\n },\\n onOk: function (close) {\\n close();\\n unSavedFiles.forEach(function (v) {\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === v.path; });\\n if (autoPrettierRef.current) {\\n var p = window.require('prettier');\\n if (!p.prettier)\\n return;\\n var text = p.prettier.format(model === null || model === void 0 ? void 0 : model.getValue(), {\\n filepath: model === null || model === void 0 ? void 0 : model.uri.path,\\n plugins: p.prettierPlugins,\\n singleQuote: true,\\n tabWidth: 4,\\n });\\n filesRef.current[v.path] = text;\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(v.path, text);\\n }\\n else {\\n filesRef.current[v.path] = (model === null || model === void 0 ? void 0 : model.getValue()) || '';\\n }\\n });\\n setOpenedFiles(function (pre) { return pre.filter(function (p) { return p.path === path; }); });\\n restoreModel(path);\\n seCurPathAndNotify(path);\\n prePath.current = path;\\n },\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u5982\\\\u679C\\\\u4E0D\\\\u4FDD\\\\u5B58\\\\uFF0C\\\\u4F60\\\\u7684\\\\u66F4\\\\u6539\\\\u5C06\\\\u4E22\\\\u5931\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u672A\\\\u4FDD\\\\u5B58\\\\u7684\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84:\\\" }), unSavedFiles.map(function (v) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: v.path }, v.path)); })] })); },\\n });\\n }\\n else {\\n setOpenedFiles(function (pre) { return pre.filter(function (p) { return p.path === path; }); });\\n restoreModel(path);\\n seCurPathAndNotify(path);\\n prePath.current = path;\\n }\\n }, [restoreModel, openedFiles, autoPrettierRef, seCurPathAndNotify]);\\n var abortFileChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var value = filesRef.current[path] || '';\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(path, value);\\n onCloseFile(path);\\n }, [onCloseFile]);\\n var dealKey = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n var ctrlKey = e.ctrlKey || e.metaKey;\\n var keyCode = e.keyCode;\\n if (ctrlKey && keyCode === 83) {\\n e.preventDefault();\\n saveFile();\\n }\\n }, [saveFile]);\\n // useEffect(() => {\\n // if (onPathChangeRef.current && curPath) {\\n // onPathChangeRef.current(curPath);\\n // }\\n // curPathRef.current = curPath;\\n // }, [curPath, onPathChangeRef]);\\n var addFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, value, notify) {\\n if (notify === void 0) { notify = true; }\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(path, value || '');\\n filesRef.current[path] = value || '';\\n handlePathChange(path);\\n if (notify && onFileChangeRef.current) {\\n onFileChangeRef.current('addFile', {\\n path: path,\\n value: '',\\n });\\n }\\n }, [handlePathChange, onFileChangeRef]);\\n var deleteFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n onCloseFile(path);\\n setTimeout(function () {\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.deleteModel)(path);\\n }, 50);\\n delete filesRef.current[path];\\n if (onFileChangeRef.current && notify) {\\n onFileChangeRef.current('deleteFile', {\\n path: path,\\n });\\n }\\n }, [onCloseFile, onFileChangeRef]);\\n var editFileName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n var value = filesRef.current[path] || '';\\n deleteFile(path, false);\\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_6__.getOldNewPath)(path, name), oldpath = _a.oldpath, newpath = _a.newpath;\\n addFile(newpath, value, false);\\n if (onFileChangeRef.current) {\\n onFileChangeRef.current('renameFile', {\\n path: oldpath,\\n newpath: newpath,\\n });\\n }\\n if (onRenameFile) {\\n onRenameFile(oldpath, newpath);\\n }\\n }, [deleteFile, addFile, onFileChangeRef, onRenameFile]);\\n var addFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n var hasChild = false;\\n Object.keys(filesRef.current).forEach(function (p) {\\n if (p.startsWith(path + '/')) {\\n hasChild = true;\\n }\\n });\\n if (!hasChild) {\\n filesRef.current[path] = null;\\n }\\n if (onFileChangeRef.current && notify) {\\n onFileChangeRef.current('addFolder', {\\n path: path,\\n });\\n }\\n }, [onFileChangeRef]);\\n var deleteFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n // 删除目录引用\\n delete filesRef.current[path];\\n // 删除子路径下的子文件和文件夹\\n Object.keys(filesRef.current).forEach(function (p) {\\n if (p.startsWith(path + '/')) {\\n var value = filesRef.current[p];\\n if (typeof value === 'string') {\\n deleteFile(p, false);\\n }\\n }\\n });\\n if (onFileChangeRef.current) {\\n onFileChangeRef.current('deleteFolder', {\\n path: path,\\n });\\n }\\n }, [deleteFile, onFileChangeRef]);\\n var editFolderName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n var paths = (path || '/').slice(1).split('/');\\n var newPath = '/' + paths.slice(0, -1).concat(name).join('/');\\n // 删除文件夹引用\\n delete filesRef.current[path];\\n // 新建文件夹引用\\n addFolder(newPath, false);\\n // 删除子路径下的子文件和文件夹\\n Object.keys(filesRef.current).forEach(function (p) {\\n if (p.startsWith(path + '/')) {\\n var value_1 = filesRef.current[p];\\n if (typeof value_1 === 'string') {\\n setTimeout(function () {\\n // 子文件需要删除原model\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.deleteModel)(p);\\n // 重新创建新model\\n var finalPath = p.replace(path + '/', newPath + '/');\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(finalPath, value_1 || '');\\n filesRef.current[finalPath] = value_1 || '';\\n }, 50);\\n }\\n delete filesRef.current[p];\\n }\\n });\\n // 对已打开的涉事文件进行路径替换处理\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path.startsWith(path + '/')) {\\n v.path = v.path.replace(path + '/', newPath + '/');\\n }\\n return v;\\n });\\n });\\n // 如果涉及当前激活的model,则需要重新打开\\n if (curPathRef.current.startsWith(path + '/')) {\\n setTimeout(function () {\\n handlePathChange(curPathRef.current.replace(path + '/', newPath + '/'));\\n }, 50);\\n }\\n if (onFileChangeRef.current) {\\n onFileChangeRef.current('renameFolder', {\\n path: path,\\n newpath: newPath,\\n });\\n }\\n }, [handlePathChange, addFolder, onFileChangeRef]);\\n var decorcations = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var locModel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (loc) {\\n var _a, _b;\\n var start = loc.start, end = loc.end;\\n decorcations.current = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.deltaDecorations(decorcations.current || [], [\\n {\\n range: new window.monaco.Range(start.line, start.column, end.line, end.column),\\n options: {\\n className: 'music-monaco-editor-highlight',\\n isWholeLine: true,\\n },\\n },\\n ]);\\n (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.revealLineInCenter(start.line);\\n }, []);\\n var refreshFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (files, path, loc) {\\n // 初始化文件列表\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.initFiles)(files);\\n // 删除多余文件\\n Object.keys(filesRef.current).forEach(function (file) {\\n if (files[file]) {\\n filesRef.current[file] = files[file];\\n }\\n else {\\n // deleteFile(file); // FIXME: 为什么这么写\\n delete filesRef.current[file];\\n }\\n });\\n // 保存新的打开文件列表\\n filesRef.current = __assign({}, files);\\n // 重置openedTab\\n setOpenedFiles(function (pre) {\\n return pre\\n .filter(function (v) { return files[v.path]; })\\n .map(function (v) { return (__assign(__assign({}, v), { status: 'saved' })); });\\n });\\n if (path !== curPathRef.current) {\\n // 重置当前tab\\n var res = files[curPathRef.current] ? curPathRef.current : '';\\n if (path && files[path]) {\\n res = path;\\n }\\n handlePathChange(res);\\n }\\n loc && locModel(loc);\\n // 更新文件列表\\n filelistRef.current.refresh(files);\\n }, [deleteFile, handlePathChange, locModel]);\\n var getAllFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () { return (0,_utils__WEBPACK_IMPORTED_MODULE_6__.filterNull)(filesRef.current); }, []);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () { return ({\\n getValue: function (path) { return filesRef.current[path]; },\\n getAllValue: getAllFiles,\\n getSupportThemes: function () { return _utils_consts__WEBPACK_IMPORTED_MODULE_7__.THEMES; },\\n setTheme: function (name) { return (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_8__.configTheme)(name); },\\n refresh: refreshFiles,\\n }); });\\n var onSelectFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var _a;\\n refreshFiles(getAllFiles(), path);\\n setSearchFileVisible(false);\\n (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();\\n }, [editorRef]);\\n var onSelectedLine = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, line) {\\n refreshFiles(getAllFiles(), path, {\\n start: {\\n line: line,\\n column: 1,\\n },\\n end: {\\n line: line,\\n column: 1,\\n },\\n });\\n }, []);\\n var configListFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var obj = getAllFiles();\\n var convertedObj = {};\\n for (var key in obj) {\\n if (obj[key] !== null) {\\n convertedObj[key] = obj[key];\\n }\\n }\\n return convertedObj;\\n }, [getAllFiles]);\\n var configFileNames = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var obj = getAllFiles();\\n return Object.keys(obj);\\n ;\\n }, [getAllFiles]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ ref: rootRef, id: \\\"music-monaco-editor-root\\\", tabIndex: 0, onKeyDown: dealKey, onMouseMove: handleMove, onMouseUp: handleMoveEnd, className: \\\"music-monaco-editor\\\" }, { children: [!ideConfig.disableSearch && searchFileVisible &&\\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_searchfile__WEBPACK_IMPORTED_MODULE_11__[\\\"default\\\"], { list: configFileNames(), onSelectFile: onSelectFile }), !ideConfig.disableSearch && searchTextVisible &&\\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_searchtext__WEBPACK_IMPORTED_MODULE_12__[\\\"default\\\"], { style: styles, onSelectedLine: onSelectedLine, listFiles: configListFiles(), onClose: function () { return setSearchTextVisible(false); } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_filelist__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { getAllFiles: getAllFiles, title: title, disableFileOps: ideConfig.disableFileOps, disableFolderOps: ideConfig.disableFolderOps, ref: filelistRef, rootEl: rootRef, onEditFileName: editFileName, onDeleteFile: deleteFile, onAddFile: addFile, onAddFolder: addFolder, onDeleteFolder: deleteFolder, onEditFolderName: editFolderName, style: __assign(__assign({}, styles), { display: !searchTextVisible ? 'block' : 'none' }), currentPath: curPath, defaultFiles: defaultFiles, onPathChange: handlePathChange }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { onMouseDown: handleMoveStart, className: \\\"music-monaco-editor-drag\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-area\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_openedtab__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { onCloseOtherFiles: closeOtherFiles, onSaveFile: saveFile, onAbortSave: abortFileChange, rootEl: rootRef, currentPath: curPath, openedFiles: openedFiles, onCloseFile: onCloseFile, onPathChange: handlePathChange }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { ref: editorNodeRef, style: { flex: 1, width: '100%' } }), openedFiles.length === 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-area-empty\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { src: \\\"//p5.music.126.net/obj/wo3DlcOGw6DClTvDisK1/5759801316/fb85/e193/a256/03a81ea60cf94212bbc814f2c82b6940.png\\\", className: \\\"music-monaco-editor-area-empty-icon\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: title })] })))] })), ideConfig.disablePrettier ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_prettier__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { onClick: handleFromat, className: \\\"music-monaco-editor-prettier\\\" })), ideConfig.disableSetting ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_Setting__WEBPACK_IMPORTED_MODULE_9__[\\\"default\\\"], { disablePrettier: ideConfig.disablePrettier, defaultTheme: defaultTheme, getTarget: function () { return rootRef.current; }, autoPrettier: autoPrettierRef.current, onAutoPrettierChange: handleSetAutoPrettier }))] })));\\n});\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiEditorComp);\\nMultiEditorComp.displayName = 'MultiEditorComp';\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/Editor.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/multi/hook.ts\":\n/*!***************************!*\\\n !*** ./src/multi/hook.ts ***!\n \\***************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"useDragLine\\\": () => (/* binding */ useDragLine),\\n/* harmony export */ \\\"usePrettier\\\": () => (/* binding */ usePrettier),\\n/* harmony export */ \\\"useInit\\\": () => (/* binding */ useInit),\\n/* harmony export */ \\\"useEditor\\\": () => (/* binding */ useEditor),\\n/* harmony export */ \\\"useVarRef\\\": () => (/* binding */ useVarRef)\\n/* harmony export */ });\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @utils */ \\\"./src/utils/index.ts\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\n\\n\\nfunction useDragLine(num) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(num), filelistWidth = _a[0], setFilelistWidth = _a[1];\\n var dragStartRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({\\n pageX: 0,\\n width: 0,\\n start: false,\\n });\\n var handleMoveStart = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n dragStartRef.current = {\\n pageX: e.pageX,\\n width: filelistWidth,\\n start: true,\\n };\\n }, [filelistWidth]);\\n var handleMove = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n if (dragStartRef.current.start) {\\n var width = dragStartRef.current.width + (e.pageX - dragStartRef.current.pageX);\\n setFilelistWidth(width > 140 ? width : 0);\\n }\\n }, []);\\n var handleMoveEnd = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n dragStartRef.current = {\\n pageX: e.pageX,\\n width: 0,\\n start: false,\\n };\\n }, []);\\n var styles = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return ({\\n width: \\\"\\\".concat(filelistWidth, \\\"px\\\"),\\n }); }, [filelistWidth]);\\n return [styles, handleMoveStart, handleMove, handleMoveEnd];\\n}\\nfunction usePrettier(editorRef) {\\n var autoPrettierRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true);\\n var handleSetAutoPrettier = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n autoPrettierRef.current = e.target.checked;\\n }, []);\\n var handleFromat = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\\n var _a;\\n // @ts-ignore\\n return (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getAction('editor.action.formatDocument').run();\\n }, [editorRef]);\\n return [autoPrettierRef, handleSetAutoPrettier, handleFromat];\\n}\\nfunction useInit(filesRef, editorRef, options, handlePathChange, defaultPath, disableEslint) {\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n (0,_utils__WEBPACK_IMPORTED_MODULE_1__.initFiles)(filesRef.current);\\n if (defaultPath) {\\n handlePathChange(defaultPath || '');\\n }\\n }, []);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n if (editorRef.current) {\\n if (options.theme) {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.configTheme)(options.theme);\\n }\\n editorRef.current.updateOptions(options);\\n }\\n }, [options, editorRef]);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n _utils__WEBPACK_IMPORTED_MODULE_1__.worker.then(function (res) {\\n return (res.onmessage = function (event) {\\n var _a;\\n if (!disableEslint) {\\n var _b = event.data, markers = _b.markers, version = _b.version;\\n var model = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel();\\n if (model && model.getVersionId() === version) {\\n window.monaco.editor.setModelMarkers(model, 'eslint', markers);\\n }\\n }\\n });\\n });\\n }, [editorRef, disableEslint]);\\n}\\nfunction useEditor(editorRef, optionsRef, openOrFocusPath, saveFile) {\\n var _this = this;\\n var editorNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n // 创建editor 实例\\n editorRef.current = window.monaco.editor.create(editorNodeRef.current, __assign(__assign({}, optionsRef.current), { model: null }));\\n var editorService = editorRef.current._codeEditorService;\\n var openEditorBase = editorService.openCodeEditor.bind(editorService);\\n editorService.openCodeEditor = function (input, source, sideBySide) { return __awaiter(_this, void 0, void 0, function () {\\n var result, fullPath;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, openEditorBase(input, source)];\\n case 1:\\n result = _a.sent();\\n if (result === null) {\\n fullPath = input.resource.path;\\n source.setModel(window.monaco.editor.getModel(input.resource));\\n openOrFocusPath(fullPath);\\n source.setSelection(input.options.selection);\\n source.revealLine(input.options.selection.startLineNumber);\\n }\\n return [2 /*return*/, result]; // always return the base result\\n }\\n });\\n }); };\\n editorRef.current.onDidBlurEditorText(function () {\\n var _a;\\n var model = ((_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel()) || undefined;\\n var path = model === null || model === void 0 ? void 0 : model.uri.path;\\n saveFile(path, model);\\n });\\n return function () {\\n // 销毁实例\\n if (editorRef.current) {\\n editorRef.current.dispose();\\n }\\n };\\n // eslint-disable-next-line react-hooks/exhaustive-deps\\n }, [openOrFocusPath, editorRef, optionsRef]);\\n return editorNodeRef;\\n}\\nvar useVarRef = function (param) {\\n var varRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(param);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n varRef.current = param;\\n }, [param]);\\n return varRef;\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/hook.ts?\");\n\n/***/ }),\n\n/***/ \"./src/multi/index.tsx\":\n/*!*****************************!*\\\n !*** ./src/multi/index.tsx ***!\n \\*****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"MultiEditor\\\": () => (/* binding */ MultiEditor),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _Editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Editor */ \\\"./src/multi/Editor.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/multi/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\nvar MultiEditor = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0), setCount = _a[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var interval = setInterval(function () {\\n setCount(function (pre) { return pre + 1; });\\n if (window.monaco) {\\n clearInterval(interval);\\n }\\n }, 100);\\n return function () {\\n clearInterval(interval);\\n };\\n }, []);\\n if (window.monaco) {\\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Editor__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], __assign({}, props, { ref: ref }));\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-loading\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { className: \\\"music-monaco-editor-loading-icon\\\", src: \\\"https://p6.music.126.net/obj/wo3DlcOGw6DClTvDisK1/9879093207/2dbb/873a/9e97/e817279537a0417d042f62fbb1b99eea.gif\\\" }) })));\\n});\\nMultiEditor.displayName = 'MultiEditorEntry';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiEditor);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/single/Editor.tsx\":\n/*!*******************************!*\\\n !*** ./src/single/Editor.tsx ***!\n \\*******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"INITIAL_OPTIONS\\\": () => (/* binding */ INITIAL_OPTIONS),\\n/* harmony export */ \\\"SingleEditor\\\": () => (/* binding */ SingleEditor),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\nvar INITIAL_OPTIONS = {\\n theme: 'GithubDarkDefault',\\n fontSize: 14,\\n tabSize: 2,\\n fontFamily: 'Menlo, Monaco, Courier New, monospace',\\n folding: true,\\n minimap: {\\n enabled: false,\\n },\\n autoIndent: 'advanced',\\n contextmenu: true,\\n useTabStops: true,\\n wordBasedSuggestions: true,\\n formatOnPaste: true,\\n automaticLayout: true,\\n lineNumbers: 'on',\\n wordWrap: 'off',\\n scrollBeyondLastLine: false,\\n fixedOverflowWidgets: false,\\n snippetSuggestions: 'top',\\n scrollbar: {\\n vertical: 'auto',\\n horizontal: 'auto',\\n verticalScrollbarSize: 10,\\n horizontalScrollbarSize: 10,\\n },\\n};\\nfunction getStringValue(value) {\\n if (typeof value === 'undefined') {\\n return value;\\n }\\n return String(value);\\n}\\nvar SingleEditor = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_a, ref) {\\n var value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, onBlur = _a.onBlur, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, loc = _a.loc, _d = _a.style, style = _d === void 0 ? {} : _d, _e = _a.options, options = _e === void 0 ? {} : _e;\\n var editorRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var editorNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var valueRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(value);\\n valueRef.current = value;\\n var onChangeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(onChange);\\n onChangeRef.current = onChange;\\n var onBlurRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(onBlur);\\n onBlurRef.current = onBlur;\\n var modelRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () { return ({\\n getEditor: function () { return editorRef === null || editorRef === void 0 ? void 0 : editorRef.current; },\\n }); });\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n editorRef.current = window.monaco.editor.create(editorNodeRef.current, __assign(__assign({}, options), INITIAL_OPTIONS));\\n var model = window.monaco.editor.createModel(\\n // value如果是number, 会报错\\n getStringValue(valueRef.current) || getStringValue(defaultValue) || '', (options === null || options === void 0 ? void 0 : options.language) || 'javascript');\\n editorRef.current.setModel(model);\\n modelRef.current = model;\\n var sub = model.onDidChangeContent(function () {\\n var v = model.getValue();\\n if (v !== valueRef.current && onChangeRef.current) {\\n onChangeRef.current(v);\\n }\\n });\\n var blurSub = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.onDidBlurEditorText(function () {\\n var _a, _b, _c;\\n var v = ((_b = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel()) === null || _b === void 0 ? void 0 : _b.getValue()) || '';\\n (_c = onBlurRef.current) === null || _c === void 0 ? void 0 : _c.call(onBlurRef, v);\\n });\\n return function () {\\n if (editorRef.current) {\\n editorRef.current.dispose();\\n }\\n sub.dispose();\\n blurSub.dispose();\\n model.dispose();\\n };\\n // eslint-disable-next-line react-hooks/exhaustive-deps\\n }, []);\\n // 更新options\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (editorRef.current) {\\n editorRef.current.updateOptions(options || {});\\n }\\n }, [options]);\\n // 更新高亮区域\\n var decorcations = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var locModel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (loc, forceCenter) {\\n var _a, _b;\\n if (loc) {\\n var start = loc.start, end = loc.end;\\n decorcations.current = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.deltaDecorations(decorcations.current || [], [\\n {\\n range: new window.monaco.Range(start.line, start.column, end.line, end.column),\\n options: {\\n className: 'music-monaco-editor-highlight',\\n isWholeLine: true,\\n },\\n },\\n ]);\\n if (forceCenter) {\\n (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.revealLineInCenter(start.line);\\n }\\n }\\n }, []);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n // 默认高亮用户选中的行\\n locModel(loc, false);\\n }, [loc, locModel]);\\n // 更新model 语言\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (options.language && modelRef.current) {\\n window.monaco.editor.setModelLanguage(modelRef.current, options.language);\\n }\\n }, [options.language]);\\n // 控制主题\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (options.theme) {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.configTheme)(options.theme);\\n }\\n else {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.configTheme)('GithubLightDefault');\\n }\\n }, [options.theme]);\\n // 受控,外部改变,同步monaco\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n // undefined,表示外界不受控,不做处理\\n if (value === undefined)\\n return;\\n var model = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel();\\n if (value !== (model === null || model === void 0 ? void 0 : model.getValue())) {\\n // const viewState = editorRef.current?.saveViewState();\\n // model?.pushEditOperations(\\n // [],\\n // [\\n // {\\n // range: model?.getFullModelRange(),\\n // text: value || '',\\n // },\\n // ],\\n // () => null\\n // );\\n model === null || model === void 0 ? void 0 : model.setValue(getStringValue(value) || '');\\n // if (viewState) {\\n // editorRef.current?.restoreViewState(viewState);\\n // }\\n locModel(loc, true);\\n }\\n // eslint-disable-next-line react-hooks/exhaustive-deps\\n }, [value, locModel]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { ref: editorNodeRef, style: __assign({ width: width, height: height }, style) }));\\n});\\nSingleEditor.displayName = 'SingleEditor';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SingleEditor);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/Editor.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/single/index.tsx\":\n/*!******************************!*\\\n !*** ./src/single/index.tsx ***!\n \\******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"SingleEditor\\\": () => (/* binding */ SingleEditor),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _Editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Editor */ \\\"./src/single/Editor.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/single/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n// @ts-nocheck\\n\\n\\n\\nvar SingleEditor = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0), setCount = _a[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var interval = setInterval(function () {\\n setCount(function (pre) { return pre + 1; });\\n if (window.monaco) {\\n clearInterval(interval);\\n }\\n }, 100);\\n }, []);\\n if (window.monaco) {\\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Editor__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], __assign({}, props, { ref: ref }));\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-loading\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { className: \\\"music-monaco-editor-loading-icon\\\", src: \\\"https://p6.music.126.net/obj/wo3DlcOGw6DClTvDisK1/9879093207/2dbb/873a/9e97/e817279537a0417d042f62fbb1b99eea.gif\\\" }) })));\\n});\\nSingleEditor.displayName = 'SingleEditor';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SingleEditor);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/utils/consts.ts\":\n/*!*****************************!*\\\n !*** ./src/utils/consts.ts ***!\n \\*****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"ASSETSPATH\\\": () => (/* binding */ ASSETSPATH),\\n/* harmony export */ \\\"THEMES\\\": () => (/* binding */ THEMES),\\n/* harmony export */ \\\"ESLINTCONFIG\\\": () => (/* binding */ ESLINTCONFIG)\\n/* harmony export */ });\\n// @ts-ignore\\nvar ASSETSPATH = \\\"https://s9.music.126.net/musicst/npm/react-monaco-editor-lite/1.2.3/\\\";\\nvar DARKTHEMES = [\\n 'GithubDarkDefault',\\n // 'AtlanticNight',\\n // 'Nebula',\\n // 'ShadesOfPurple',\\n // 'AtomOneDark',\\n // 'NoctisAzureus',\\n // 'AuroraX', // bad\\n // 'Hopscotch',\\n // 'NoctisBordo',\\n // 'SnazzyOperator',\\n // 'NoctisLux',\\n // 'SublimeMaterialThemeDark',\\n // 'HybridNext',\\n // 'OneDarkPro',\\n // 'SynthWave84',\\n // 'KimbieDark',\\n // 'OneMonokai',\\n // 'TokyoNightStorm',\\n // 'CodeSandBox',\\n // 'Lucario',\\n // 'Panda',\\n // 'TomorrowNightBlue',\\n // 'Darktooth',\\n // 'MonokaiDimmed',\\n // 'ReUI',\\n // 'Twilight',\\n // 'MonokaiPro',\\n // 'RemedyDark',\\n];\\nvar LIGHTTHEMES = [\\n 'GithubLightDefault',\\n // 'EvaLight',\\n // 'FlatUI',\\n // 'SnazzyLight', // bad\\n // 'AyuLight',\\n // 'BlulocoLight', // bad\\n // 'HorlaLightTheme', // bad\\n];\\nvar THEMES = DARKTHEMES.concat(LIGHTTHEMES);\\nvar ESLINTCONFIG = {\\n parserOptions: {\\n ecmaVersion: 'latest',\\n sourceType: 'module',\\n ecmaFeatures: {\\n jsx: true,\\n },\\n },\\n plugins: ['react'],\\n extends: ['eslint:recommended', 'plugin:react/recommended'],\\n rules: {\\n 'jsx-uses-react': 'error',\\n 'react/jsx-uses-vars': 'error',\\n 'constructor-super': 2,\\n 'for-direction': 2,\\n 'getter-return': 2,\\n 'no-async-promise-executor': 2,\\n 'no-case-declarations': 2,\\n 'no-class-assign': 2,\\n 'no-compare-neg-zero': 2,\\n 'no-cond-assign': 2,\\n 'no-const-assign': 2,\\n 'no-constant-condition': 2,\\n 'no-control-regex': 2,\\n 'no-debugger': 2,\\n 'no-delete-var': 2,\\n 'no-dupe-args': 2,\\n 'no-dupe-class-members': 2,\\n 'no-dupe-else-if': 2,\\n 'no-dupe-keys': 2,\\n 'no-duplicate-case': 2,\\n 'no-empty': 2,\\n 'no-empty-character-class': 2,\\n 'no-empty-pattern': 2,\\n 'no-ex-assign': 2,\\n 'no-extra-boolean-cast': 2,\\n 'no-extra-semi': 2,\\n 'no-fallthrough': 2,\\n 'no-func-assign': 2,\\n 'no-global-assign': 2,\\n 'no-import-assign': 2,\\n 'no-inner-declarations': 2,\\n 'no-invalid-regexp': 2,\\n 'no-irregular-whitespace': 2,\\n 'no-loss-of-precision': 2,\\n 'no-misleading-character-class': 2,\\n 'no-mixed-spaces-and-tabs': 2,\\n 'no-new-symbol': 2,\\n 'no-nonoctal-decimal-escape': 2,\\n 'no-obj-calls': 2,\\n 'no-octal': 2,\\n 'no-prototype-builtins': 2,\\n 'no-redeclare': 2,\\n 'no-regex-spaces': 2,\\n 'no-self-assign': 2,\\n 'no-setter-return': 2,\\n 'no-shadow-restricted-names': 2,\\n 'no-sparse-arrays': 2,\\n 'no-this-before-super': 2,\\n 'no-undef': 2,\\n 'no-unexpected-multiline': 2,\\n 'no-unreachable': 2,\\n 'no-unsafe-finally': 2,\\n 'no-unsafe-negation': 2,\\n 'no-unsafe-optional-chaining': 2,\\n 'no-unused-labels': 2,\\n 'no-unused-vars': 2,\\n 'no-useless-backreference': 2,\\n 'no-useless-catch': 2,\\n 'no-useless-escape': 2,\\n 'no-with': 2,\\n 'require-yield': 2,\\n 'use-isnan': 2,\\n 'valid-typeof': 2,\\n 'no-console': 2,\\n },\\n env: {\\n browser: true,\\n },\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/utils/consts.ts?\");\n\n/***/ }),\n\n/***/ \"./src/utils/index.ts\":\n/*!****************************!*\\\n !*** ./src/utils/index.ts ***!\n \\****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"deepCopy\\\": () => (/* binding */ deepCopy),\\n/* harmony export */ \\\"generateFileTree\\\": () => (/* binding */ generateFileTree),\\n/* harmony export */ \\\"addSourceFile\\\": () => (/* binding */ addSourceFile),\\n/* harmony export */ \\\"deleteSourceFile\\\": () => (/* binding */ deleteSourceFile),\\n/* harmony export */ \\\"editSourceFileName\\\": () => (/* binding */ editSourceFileName),\\n/* harmony export */ \\\"addSourceFolder\\\": () => (/* binding */ addSourceFolder),\\n/* harmony export */ \\\"deleteSourceFolder\\\": () => (/* binding */ deleteSourceFolder),\\n/* harmony export */ \\\"editSourceFolderName\\\": () => (/* binding */ editSourceFolderName),\\n/* harmony export */ \\\"getOldNewPath\\\": () => (/* binding */ getOldNewPath),\\n/* harmony export */ \\\"createOrUpdateModel\\\": () => (/* binding */ createOrUpdateModel),\\n/* harmony export */ \\\"initFiles\\\": () => (/* binding */ initFiles),\\n/* harmony export */ \\\"deleteModel\\\": () => (/* binding */ deleteModel),\\n/* harmony export */ \\\"copyDataToClipBoard\\\": () => (/* binding */ copyDataToClipBoard),\\n/* harmony export */ \\\"worker\\\": () => (/* binding */ worker),\\n/* harmony export */ \\\"setMonacoSyntasValidation\\\": () => (/* binding */ setMonacoSyntasValidation),\\n/* harmony export */ \\\"filterNull\\\": () => (/* binding */ filterNull)\\n/* harmony export */ });\\n/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ \\\"./src/utils/consts.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\nfunction deepCopy(obj) {\\n return JSON.parse(JSON.stringify(obj));\\n}\\n// 生成文件树\\nfunction generateFileTree(files) {\\n var keys = Object.keys(files);\\n var tree = {\\n isDirectory: true,\\n children: {},\\n path: '/',\\n };\\n keys.forEach(function (key) {\\n var path = key.slice(1).split('/');\\n var temp = tree.children;\\n path.forEach(function (v, index) {\\n if (index === path.length - 1) {\\n temp[v] = {\\n name: v,\\n path: key,\\n value: files[key],\\n _isFile: true,\\n };\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + path.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n });\\n return tree;\\n}\\n// 在文件树中添加文件\\nfunction addSourceFile(sourcetree, path, value) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var name = paths[paths.length - 1];\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[v] = {\\n name: name,\\n value: value || '',\\n path: path,\\n _isFile: true,\\n };\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中删除文件\\nfunction deleteSourceFile(sourcetree, path) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中修改文件名称\\nfunction editSourceFileName(sourcetree, path, name) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[name] = {\\n name: name,\\n path: '/' + paths.slice(0, index).concat(name).join('/'),\\n value: temp[v].value,\\n _isFile: true,\\n };\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中增加文件夹\\nfunction addSourceFolder(sourcetree, path, value) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[v] = {\\n children: {},\\n path: path,\\n _isDirectory: true,\\n name: v,\\n };\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中删除文件夹\\nfunction deleteSourceFolder(sourcetree, path) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\nfunction editSubFolder(tree, oldPath, newPath) {\\n tree.path = tree.path.replace(oldPath, newPath);\\n if (tree._isDirectory) {\\n Object.keys(tree.children).forEach(function (v) {\\n return editSubFolder(tree.children[v], oldPath, newPath);\\n });\\n }\\n}\\n// 在文件树中修改文件夹名称\\nfunction editSourceFolderName(sourcetree, path, name) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n var newPath = '/' + paths.slice(0, -1).concat(name).join('/');\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[name] = {\\n name: name,\\n path: newPath,\\n children: temp[v].children,\\n _isDirectory: true,\\n };\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n // 修改文件夹名称后,修改子路径下所有文件及文件夹的路径\\n editSubFolder(temp[name], path + '/', newPath + '/');\\n return copy;\\n}\\nfunction getOldNewPath(oldpath, newname) {\\n var paths = oldpath.split('/');\\n paths.splice(-1);\\n paths.push(newname);\\n var newpath = paths.join('/');\\n return {\\n oldpath: oldpath,\\n newpath: newpath,\\n };\\n}\\nfunction createOrUpdateModel(path, value) {\\n // model 是否存在\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === path; });\\n if (model) {\\n if (model.getValue() !== value) {\\n model.pushEditOperations([], [\\n {\\n range: model === null || model === void 0 ? void 0 : model.getFullModelRange(),\\n text: value,\\n },\\n ], function () { return []; });\\n }\\n }\\n else if (path) {\\n var type = '';\\n if (path.indexOf('.') !== -1) {\\n type = path.split('.').slice(-1)[0];\\n }\\n else {\\n type = 'javascript';\\n }\\n var config = {\\n js: 'javascript',\\n ts: 'typescript',\\n less: 'less',\\n jsx: 'javascript',\\n tsx: 'typescript',\\n };\\n model = window.monaco.editor.createModel(value, config[type] || type, new window.monaco.Uri().with({ path: path, scheme: 'music' }));\\n // model.updateOptions({\\n // tabSize: 4,\\n // });\\n }\\n}\\nfunction initFiles(files) {\\n Object.keys(files).forEach(function (key) {\\n var value = files[key];\\n if (typeof value === 'string') {\\n createOrUpdateModel(key, value);\\n }\\n });\\n}\\n// TODO:删除model\\nfunction deleteModel(path) {\\n // model 是否存在\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === path; });\\n if (model) {\\n model.dispose();\\n }\\n else {\\n console.warn('要删除的model不存在');\\n }\\n}\\n// TODO:重命名model\\nvar copyDataToClipBoard = function (data, callback) {\\n var input = document.createElement('input');\\n document.body.appendChild(input);\\n input.setAttribute('value', data);\\n input.select();\\n if (document.execCommand('copy')) {\\n document.execCommand('copy');\\n callback && callback(true);\\n }\\n else {\\n callback && callback(false);\\n }\\n document.body.removeChild(input);\\n};\\nvar worker = new Promise(function (resolve) { return __awaiter(void 0, void 0, void 0, function () {\\n var codeString, localWorkerUrl;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_0__.ASSETSPATH, \\\"eslint.worker.js\\\")).then(function (res) {\\n return res.text();\\n })];\\n case 1:\\n codeString = _a.sent();\\n localWorkerUrl = window.URL.createObjectURL(new Blob([codeString], {\\n type: 'application/javascript',\\n }));\\n resolve(new Worker(localWorkerUrl));\\n return [2 /*return*/];\\n }\\n });\\n}); });\\n//\\nvar setMonacoSyntasValidation = function (disable) {\\n window.monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({\\n noSemanticValidation: disable,\\n noSyntaxValidation: disable,\\n });\\n};\\nvar filterNull = function (obj) {\\n if (obj === void 0) { obj = {}; }\\n var newobj = {};\\n Object.keys(obj).forEach(function (key) {\\n if (obj[key] !== null) {\\n newobj[key] = obj[key];\\n }\\n });\\n return newobj;\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/utils/index.ts?\");\n\n/***/ }),\n\n/***/ \"./src/utils/initEditor.ts\":\n/*!*********************************!*\\\n !*** ./src/utils/initEditor.ts ***!\n \\*********************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"themes\\\": () => (/* binding */ themes),\\n/* harmony export */ \\\"configTheme\\\": () => (/* binding */ configTheme),\\n/* harmony export */ \\\"startUp\\\": () => (/* binding */ startUp)\\n/* harmony export */ });\\n/* harmony import */ var onigasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! onigasm */ \\\"./node_modules/onigasm/lib/index.js\\\");\\n/* harmony import */ var monaco_textmate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! monaco-textmate */ \\\"./node_modules/monaco-textmate/dist/main.js\\\");\\n/* harmony import */ var monaco_textmate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(monaco_textmate__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var monaco_editor_textmate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! monaco-editor-textmate */ \\\"./node_modules/monaco-editor-textmate/dist/index.js\\\");\\n/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consts */ \\\"./src/utils/consts.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\n\\n\\n\\nfunction loadScript(url, cb) {\\n var script = document.createElement('script');\\n script.src = url;\\n document.getElementsByTagName('body')[0].appendChild(script);\\n script.onload = cb;\\n}\\n// function loadCode(code: string) {\\n// const script = document.createElement('script');\\n// script.type = ' text/javascript';\\n// script.appendChild(document.createTextNode(code));\\n// document.getElementsByTagName('body')[0].appendChild(script);\\n// }\\nvar execed = false;\\nvar grammerMap = {\\n 'source.ts': 'Typescript.tmLanguage.json',\\n 'source.js': 'Javascript.tmLanguage.json',\\n 'source.js.jsx': 'JavaScriptReact.tmLanguage.json',\\n 'source.ts.tsx': 'TypesSriptReact.tmLanguage.json',\\n 'source.css': 'css.tmLanguage.json',\\n 'source.less': 'less.tmLanguage.json',\\n 'text.html.basic': 'html.tmLanguage.json',\\n};\\nvar themes = {};\\nfunction configTheme(name) {\\n return __awaiter(this, void 0, void 0, function () {\\n var theme, _a, _b, prefix, style, res;\\n return __generator(this, function (_c) {\\n switch (_c.label) {\\n case 0:\\n theme = themes[name];\\n if (!!theme) return [3 /*break*/, 3];\\n _b = (_a = JSON).parse;\\n return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"themes/\\\").concat(name, \\\".json?v=0\\\"))];\\n case 1: return [4 /*yield*/, (_c.sent()).text()];\\n case 2:\\n theme = _b.apply(_a, [_c.sent()]);\\n themes[name] = theme;\\n // 定义主题\\n window.monaco.editor.defineTheme(name, theme);\\n _c.label = 3;\\n case 3:\\n prefix = '--monaco-';\\n style = document.getElementById('monaco-editor-theme-style');\\n if (!style) {\\n style = document.createElement('style');\\n style.id = 'monaco-editor-theme-style';\\n document.getElementsByTagName('head')[0].appendChild(style);\\n }\\n res = '#music-monaco-editor-root {';\\n Object.keys(theme.colors).forEach(function (v) {\\n res += \\\"\\\".concat(prefix).concat(v.replace('.', '-'), \\\": \\\").concat(theme.colors[v] || 'rgba(0, 0, 0, 0)', \\\";\\\");\\n });\\n res += '}';\\n style.innerHTML = res;\\n // 设置主题\\n window.monaco.editor.setTheme(name);\\n return [2 /*return*/];\\n }\\n });\\n });\\n}\\nfunction addExtraLib() {\\n return __awaiter(this, void 0, void 0, function () {\\n var res;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"@types/react/index.d.ts\\\"))];\\n case 1: return [4 /*yield*/, (_a.sent()).text()];\\n case 2:\\n res = _a.sent();\\n window.monaco.languages.typescript.javascriptDefaults.setCompilerOptions({\\n allowJs: true,\\n allowNonTsExtensions: true,\\n allowSyntheticDefaultImports: true, // for use of import React from 'react' ranther than import * as React from 'react'\\n });\\n window.monaco.languages.typescript.javascriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react/index.d.ts');\\n window.monaco.languages.typescript.typescriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react/index.d.ts');\\n return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"@types/react/global.d.ts\\\"))];\\n case 3: return [4 /*yield*/, (_a.sent()).text()];\\n case 4:\\n res = _a.sent();\\n window.monaco.languages.typescript.javascriptDefaults.addExtraLib(res, 'music:/node_modules/%40types/react/global.d.ts');\\n window.monaco.languages.typescript.typescriptDefaults.addExtraLib(res, 'music:/node_modules/%40types/react/global.d.ts');\\n return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"@types/react-dom/index.d.ts\\\"))];\\n case 5: return [4 /*yield*/, (_a.sent()).text()];\\n case 6:\\n res = _a.sent();\\n window.monaco.languages.typescript.javascriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react-dom/index.d.ts');\\n window.monaco.languages.typescript.typescriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react-dom/index.d.ts');\\n return [2 /*return*/];\\n }\\n });\\n });\\n}\\nfunction configMonaco() {\\n var _this = this;\\n var init = function () { return __awaiter(_this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n window.monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true);\\n // 加载textmate语义解析webassembly文件\\n return [4 /*yield*/, (0,onigasm__WEBPACK_IMPORTED_MODULE_0__.loadWASM)(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"onigasm.wasm\\\"))];\\n case 1:\\n // 加载textmate语义解析webassembly文件\\n _a.sent();\\n addExtraLib();\\n return [2 /*return*/];\\n }\\n });\\n }); };\\n init();\\n window.monaco.languages.register({ id: 'JavascriptReact' });\\n window.monaco.languages.register({ id: 'TypescriptReact' });\\n // 创建语法映射\\n var grammars = new Map();\\n grammars.set('typescript', 'source.ts');\\n grammars.set('javascript', 'source.js');\\n grammars.set('JavascriptReact', 'source.js.jsx');\\n grammars.set('TypescriptReact', 'source.ts.tsx');\\n grammars.set('less', 'source.less');\\n grammars.set('css', 'source.css');\\n grammars.set('html', 'text.html.basic');\\n // 创建一个注册表,可以从作用域名称来加载对应的语法文件\\n var registry = new monaco_textmate__WEBPACK_IMPORTED_MODULE_1__.Registry({\\n getGrammarDefinition: function (scopeName) { return __awaiter(_this, void 0, void 0, function () {\\n var res;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"Grammars/\\\").concat(grammerMap[scopeName]))];\\n case 1: return [4 /*yield*/, (_a.sent()).text()];\\n case 2:\\n res = _a.sent();\\n return [2 /*return*/, {\\n format: 'json',\\n content: res,\\n }];\\n }\\n });\\n }); },\\n });\\n // 将语法映射揉进monaco\\n function wireMonacoGrammars() {\\n (0,monaco_editor_textmate__WEBPACK_IMPORTED_MODULE_2__.wireTmGrammars)(window.monaco, registry, grammars);\\n }\\n // 延迟语法解析的修改,防止monaco在加载后覆盖次语法映射\\n setTimeout(function () {\\n wireMonacoGrammars();\\n }, 3000);\\n}\\nvar startUp = function () {\\n if (execed)\\n return;\\n execed = true;\\n loadScript('https://g.alicdn.com/code/lib/monaco-editor/0.31.1/min/vs/loader.min.js', function () {\\n window.require.config({\\n paths: {\\n vs: 'https://g.alicdn.com/code/lib/monaco-editor/0.31.1/min/vs',\\n },\\n });\\n // eslint-disable-next-line @typescript-eslint/no-empty-function\\n window.require(['vs/editor/editor.main'], function () { });\\n // window.define(\\n // 'prettier',\\n // [\\n // 'https://unpkg.com/prettier@2.5.1/standalone.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-babel.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-html.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-postcss.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-typescript.js',\\n // ],\\n // (prettier: any, ...args: any[]) => {\\n // const prettierPlugins = {\\n // babel: args[0],\\n // html: args[1],\\n // postcss: args[2],\\n // typescript: args[3],\\n // };\\n // return {\\n // prettier,\\n // prettierPlugins,\\n // };\\n // }\\n // );\\n });\\n var interval = setInterval(function () {\\n if (window.monaco) {\\n configMonaco();\\n clearInterval(interval);\\n }\\n }, 100);\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/utils/initEditor.ts?\");\n\n/***/ }),\n\n/***/ \"./node_modules/util/node_modules/inherits/inherits_browser.js\":\n/*!*********************************************************************!*\\\n !*** ./node_modules/util/node_modules/inherits/inherits_browser.js ***!\n \\*********************************************************************/\n/***/ ((module) => {\n\neval(\"if (typeof Object.create === 'function') {\\n // implementation from standard node.js 'util' module\\n module.exports = function inherits(ctor, superCtor) {\\n ctor.super_ = superCtor\\n ctor.prototype = Object.create(superCtor.prototype, {\\n constructor: {\\n value: ctor,\\n enumerable: false,\\n writable: true,\\n configurable: true\\n }\\n });\\n };\\n} else {\\n // old school shim for old browsers\\n module.exports = function inherits(ctor, superCtor) {\\n ctor.super_ = superCtor\\n var TempCtor = function () {}\\n TempCtor.prototype = superCtor.prototype\\n ctor.prototype = new TempCtor()\\n ctor.prototype.constructor = ctor\\n }\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/util/node_modules/inherits/inherits_browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/util/support/isBufferBrowser.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/util/support/isBufferBrowser.js ***!\n \\******************************************************/\n/***/ ((module) => {\n\neval(\"module.exports = function isBuffer(arg) {\\n return arg && typeof arg === 'object'\\n && typeof arg.copy === 'function'\\n && typeof arg.fill === 'function'\\n && typeof arg.readUInt8 === 'function';\\n}\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/util/support/isBufferBrowser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/util/util.js\":\n/*!***********************************!*\\\n !*** ./node_modules/util/util.js ***!\n \\***********************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\neval(\"/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \\\"./node_modules/process/browser.js\\\");\\n// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\nvar formatRegExp = /%[sdj%]/g;\\nexports.format = function(f) {\\n if (!isString(f)) {\\n var objects = [];\\n for (var i = 0; i < arguments.length; i++) {\\n objects.push(inspect(arguments[i]));\\n }\\n return objects.join(' ');\\n }\\n\\n var i = 1;\\n var args = arguments;\\n var len = args.length;\\n var str = String(f).replace(formatRegExp, function(x) {\\n if (x === '%%') return '%';\\n if (i >= len) return x;\\n switch (x) {\\n case '%s': return String(args[i++]);\\n case '%d': return Number(args[i++]);\\n case '%j':\\n try {\\n return JSON.stringify(args[i++]);\\n } catch (_) {\\n return '[Circular]';\\n }\\n default:\\n return x;\\n }\\n });\\n for (var x = args[i]; i < len; x = args[++i]) {\\n if (isNull(x) || !isObject(x)) {\\n str += ' ' + x;\\n } else {\\n str += ' ' + inspect(x);\\n }\\n }\\n return str;\\n};\\n\\n\\n// Mark that a method should not be used.\\n// Returns a modified function which warns once by default.\\n// If --no-deprecation is set, then it is a no-op.\\nexports.deprecate = function(fn, msg) {\\n // Allow for deprecating things in the process of starting up.\\n if (isUndefined(__webpack_require__.g.process)) {\\n return function() {\\n return exports.deprecate(fn, msg).apply(this, arguments);\\n };\\n }\\n\\n if (process.noDeprecation === true) {\\n return fn;\\n }\\n\\n var warned = false;\\n function deprecated() {\\n if (!warned) {\\n if (process.throwDeprecation) {\\n throw new Error(msg);\\n } else if (process.traceDeprecation) {\\n console.trace(msg);\\n } else {\\n console.error(msg);\\n }\\n warned = true;\\n }\\n return fn.apply(this, arguments);\\n }\\n\\n return deprecated;\\n};\\n\\n\\nvar debugs = {};\\nvar debugEnviron;\\nexports.debuglog = function(set) {\\n if (isUndefined(debugEnviron))\\n debugEnviron = process.env.NODE_DEBUG || '';\\n set = set.toUpperCase();\\n if (!debugs[set]) {\\n if (new RegExp('\\\\\\\\b' + set + '\\\\\\\\b', 'i').test(debugEnviron)) {\\n var pid = process.pid;\\n debugs[set] = function() {\\n var msg = exports.format.apply(exports, arguments);\\n console.error('%s %d: %s', set, pid, msg);\\n };\\n } else {\\n debugs[set] = function() {};\\n }\\n }\\n return debugs[set];\\n};\\n\\n\\n/**\\n * Echos the value of a value. Trys to print the value out\\n * in the best way possible given the different types.\\n *\\n * @param {Object} obj The object to print out.\\n * @param {Object} opts Optional options object that alters the output.\\n */\\n/* legacy: obj, showHidden, depth, colors*/\\nfunction inspect(obj, opts) {\\n // default options\\n var ctx = {\\n seen: [],\\n stylize: stylizeNoColor\\n };\\n // legacy...\\n if (arguments.length >= 3) ctx.depth = arguments[2];\\n if (arguments.length >= 4) ctx.colors = arguments[3];\\n if (isBoolean(opts)) {\\n // legacy...\\n ctx.showHidden = opts;\\n } else if (opts) {\\n // got an \\\"options\\\" object\\n exports._extend(ctx, opts);\\n }\\n // set default options\\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\\n if (isUndefined(ctx.depth)) ctx.depth = 2;\\n if (isUndefined(ctx.colors)) ctx.colors = false;\\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\\n if (ctx.colors) ctx.stylize = stylizeWithColor;\\n return formatValue(ctx, obj, ctx.depth);\\n}\\nexports.inspect = inspect;\\n\\n\\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\\ninspect.colors = {\\n 'bold' : [1, 22],\\n 'italic' : [3, 23],\\n 'underline' : [4, 24],\\n 'inverse' : [7, 27],\\n 'white' : [37, 39],\\n 'grey' : [90, 39],\\n 'black' : [30, 39],\\n 'blue' : [34, 39],\\n 'cyan' : [36, 39],\\n 'green' : [32, 39],\\n 'magenta' : [35, 39],\\n 'red' : [31, 39],\\n 'yellow' : [33, 39]\\n};\\n\\n// Don't use 'blue' not visible on cmd.exe\\ninspect.styles = {\\n 'special': 'cyan',\\n 'number': 'yellow',\\n 'boolean': 'yellow',\\n 'undefined': 'grey',\\n 'null': 'bold',\\n 'string': 'green',\\n 'date': 'magenta',\\n // \\\"name\\\": intentionally not styling\\n 'regexp': 'red'\\n};\\n\\n\\nfunction stylizeWithColor(str, styleType) {\\n var style = inspect.styles[styleType];\\n\\n if (style) {\\n return '\\\\u001b[' + inspect.colors[style][0] + 'm' + str +\\n '\\\\u001b[' + inspect.colors[style][1] + 'm';\\n } else {\\n return str;\\n }\\n}\\n\\n\\nfunction stylizeNoColor(str, styleType) {\\n return str;\\n}\\n\\n\\nfunction arrayToHash(array) {\\n var hash = {};\\n\\n array.forEach(function(val, idx) {\\n hash[val] = true;\\n });\\n\\n return hash;\\n}\\n\\n\\nfunction formatValue(ctx, value, recurseTimes) {\\n // Provide a hook for user-specified inspect functions.\\n // Check that value is an object with an inspect function on it\\n if (ctx.customInspect &&\\n value &&\\n isFunction(value.inspect) &&\\n // Filter out the util module, it's inspect function is special\\n value.inspect !== exports.inspect &&\\n // Also filter out any prototype objects using the circular check.\\n !(value.constructor && value.constructor.prototype === value)) {\\n var ret = value.inspect(recurseTimes, ctx);\\n if (!isString(ret)) {\\n ret = formatValue(ctx, ret, recurseTimes);\\n }\\n return ret;\\n }\\n\\n // Primitive types cannot have properties\\n var primitive = formatPrimitive(ctx, value);\\n if (primitive) {\\n return primitive;\\n }\\n\\n // Look up the keys of the object.\\n var keys = Object.keys(value);\\n var visibleKeys = arrayToHash(keys);\\n\\n if (ctx.showHidden) {\\n keys = Object.getOwnPropertyNames(value);\\n }\\n\\n // IE doesn't make error fields non-enumerable\\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\\n if (isError(value)\\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\\n return formatError(value);\\n }\\n\\n // Some type of object without properties can be shortcutted.\\n if (keys.length === 0) {\\n if (isFunction(value)) {\\n var name = value.name ? ': ' + value.name : '';\\n return ctx.stylize('[Function' + name + ']', 'special');\\n }\\n if (isRegExp(value)) {\\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\\n }\\n if (isDate(value)) {\\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\\n }\\n if (isError(value)) {\\n return formatError(value);\\n }\\n }\\n\\n var base = '', array = false, braces = ['{', '}'];\\n\\n // Make Array say that they are Array\\n if (isArray(value)) {\\n array = true;\\n braces = ['[', ']'];\\n }\\n\\n // Make functions say that they are functions\\n if (isFunction(value)) {\\n var n = value.name ? ': ' + value.name : '';\\n base = ' [Function' + n + ']';\\n }\\n\\n // Make RegExps say that they are RegExps\\n if (isRegExp(value)) {\\n base = ' ' + RegExp.prototype.toString.call(value);\\n }\\n\\n // Make dates with properties first say the date\\n if (isDate(value)) {\\n base = ' ' + Date.prototype.toUTCString.call(value);\\n }\\n\\n // Make error with message first say the error\\n if (isError(value)) {\\n base = ' ' + formatError(value);\\n }\\n\\n if (keys.length === 0 && (!array || value.length == 0)) {\\n return braces[0] + base + braces[1];\\n }\\n\\n if (recurseTimes < 0) {\\n if (isRegExp(value)) {\\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\\n } else {\\n return ctx.stylize('[Object]', 'special');\\n }\\n }\\n\\n ctx.seen.push(value);\\n\\n var output;\\n if (array) {\\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\\n } else {\\n output = keys.map(function(key) {\\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\\n });\\n }\\n\\n ctx.seen.pop();\\n\\n return reduceToSingleString(output, base, braces);\\n}\\n\\n\\nfunction formatPrimitive(ctx, value) {\\n if (isUndefined(value))\\n return ctx.stylize('undefined', 'undefined');\\n if (isString(value)) {\\n var simple = '\\\\'' + JSON.stringify(value).replace(/^\\\"|\\\"$/g, '')\\n .replace(/'/g, \\\"\\\\\\\\'\\\")\\n .replace(/\\\\\\\\\\\"/g, '\\\"') + '\\\\'';\\n return ctx.stylize(simple, 'string');\\n }\\n if (isNumber(value))\\n return ctx.stylize('' + value, 'number');\\n if (isBoolean(value))\\n return ctx.stylize('' + value, 'boolean');\\n // For some reason typeof null is \\\"object\\\", so special case here.\\n if (isNull(value))\\n return ctx.stylize('null', 'null');\\n}\\n\\n\\nfunction formatError(value) {\\n return '[' + Error.prototype.toString.call(value) + ']';\\n}\\n\\n\\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\\n var output = [];\\n for (var i = 0, l = value.length; i < l; ++i) {\\n if (hasOwnProperty(value, String(i))) {\\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\\n String(i), true));\\n } else {\\n output.push('');\\n }\\n }\\n keys.forEach(function(key) {\\n if (!key.match(/^\\\\d+$/)) {\\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\\n key, true));\\n }\\n });\\n return output;\\n}\\n\\n\\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\\n var name, str, desc;\\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\\n if (desc.get) {\\n if (desc.set) {\\n str = ctx.stylize('[Getter/Setter]', 'special');\\n } else {\\n str = ctx.stylize('[Getter]', 'special');\\n }\\n } else {\\n if (desc.set) {\\n str = ctx.stylize('[Setter]', 'special');\\n }\\n }\\n if (!hasOwnProperty(visibleKeys, key)) {\\n name = '[' + key + ']';\\n }\\n if (!str) {\\n if (ctx.seen.indexOf(desc.value) < 0) {\\n if (isNull(recurseTimes)) {\\n str = formatValue(ctx, desc.value, null);\\n } else {\\n str = formatValue(ctx, desc.value, recurseTimes - 1);\\n }\\n if (str.indexOf('\\\\n') > -1) {\\n if (array) {\\n str = str.split('\\\\n').map(function(line) {\\n return ' ' + line;\\n }).join('\\\\n').substr(2);\\n } else {\\n str = '\\\\n' + str.split('\\\\n').map(function(line) {\\n return ' ' + line;\\n }).join('\\\\n');\\n }\\n }\\n } else {\\n str = ctx.stylize('[Circular]', 'special');\\n }\\n }\\n if (isUndefined(name)) {\\n if (array && key.match(/^\\\\d+$/)) {\\n return str;\\n }\\n name = JSON.stringify('' + key);\\n if (name.match(/^\\\"([a-zA-Z_][a-zA-Z_0-9]*)\\\"$/)) {\\n name = name.substr(1, name.length - 2);\\n name = ctx.stylize(name, 'name');\\n } else {\\n name = name.replace(/'/g, \\\"\\\\\\\\'\\\")\\n .replace(/\\\\\\\\\\\"/g, '\\\"')\\n .replace(/(^\\\"|\\\"$)/g, \\\"'\\\");\\n name = ctx.stylize(name, 'string');\\n }\\n }\\n\\n return name + ': ' + str;\\n}\\n\\n\\nfunction reduceToSingleString(output, base, braces) {\\n var numLinesEst = 0;\\n var length = output.reduce(function(prev, cur) {\\n numLinesEst++;\\n if (cur.indexOf('\\\\n') >= 0) numLinesEst++;\\n return prev + cur.replace(/\\\\u001b\\\\[\\\\d\\\\d?m/g, '').length + 1;\\n }, 0);\\n\\n if (length > 60) {\\n return braces[0] +\\n (base === '' ? '' : base + '\\\\n ') +\\n ' ' +\\n output.join(',\\\\n ') +\\n ' ' +\\n braces[1];\\n }\\n\\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\\n}\\n\\n\\n// NOTE: These type checking functions intentionally don't use `instanceof`\\n// because it is fragile and can be easily faked with `Object.create()`.\\nfunction isArray(ar) {\\n return Array.isArray(ar);\\n}\\nexports.isArray = isArray;\\n\\nfunction isBoolean(arg) {\\n return typeof arg === 'boolean';\\n}\\nexports.isBoolean = isBoolean;\\n\\nfunction isNull(arg) {\\n return arg === null;\\n}\\nexports.isNull = isNull;\\n\\nfunction isNullOrUndefined(arg) {\\n return arg == null;\\n}\\nexports.isNullOrUndefined = isNullOrUndefined;\\n\\nfunction isNumber(arg) {\\n return typeof arg === 'number';\\n}\\nexports.isNumber = isNumber;\\n\\nfunction isString(arg) {\\n return typeof arg === 'string';\\n}\\nexports.isString = isString;\\n\\nfunction isSymbol(arg) {\\n return typeof arg === 'symbol';\\n}\\nexports.isSymbol = isSymbol;\\n\\nfunction isUndefined(arg) {\\n return arg === void 0;\\n}\\nexports.isUndefined = isUndefined;\\n\\nfunction isRegExp(re) {\\n return isObject(re) && objectToString(re) === '[object RegExp]';\\n}\\nexports.isRegExp = isRegExp;\\n\\nfunction isObject(arg) {\\n return typeof arg === 'object' && arg !== null;\\n}\\nexports.isObject = isObject;\\n\\nfunction isDate(d) {\\n return isObject(d) && objectToString(d) === '[object Date]';\\n}\\nexports.isDate = isDate;\\n\\nfunction isError(e) {\\n return isObject(e) &&\\n (objectToString(e) === '[object Error]' || e instanceof Error);\\n}\\nexports.isError = isError;\\n\\nfunction isFunction(arg) {\\n return typeof arg === 'function';\\n}\\nexports.isFunction = isFunction;\\n\\nfunction isPrimitive(arg) {\\n return arg === null ||\\n typeof arg === 'boolean' ||\\n typeof arg === 'number' ||\\n typeof arg === 'string' ||\\n typeof arg === 'symbol' || // ES6 symbol\\n typeof arg === 'undefined';\\n}\\nexports.isPrimitive = isPrimitive;\\n\\nexports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ \\\"./node_modules/util/support/isBufferBrowser.js\\\");\\n\\nfunction objectToString(o) {\\n return Object.prototype.toString.call(o);\\n}\\n\\n\\nfunction pad(n) {\\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\\n}\\n\\n\\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\\n 'Oct', 'Nov', 'Dec'];\\n\\n// 26 Feb 16:19:34\\nfunction timestamp() {\\n var d = new Date();\\n var time = [pad(d.getHours()),\\n pad(d.getMinutes()),\\n pad(d.getSeconds())].join(':');\\n return [d.getDate(), months[d.getMonth()], time].join(' ');\\n}\\n\\n\\n// log is just a thin wrapper to console.log that prepends a timestamp\\nexports.log = function() {\\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\\n};\\n\\n\\n/**\\n * Inherit the prototype methods from one constructor into another.\\n *\\n * The Function.prototype.inherits from lang.js rewritten as a standalone\\n * function (not on Function.prototype). NOTE: If this file is to be loaded\\n * during bootstrapping this function needs to be rewritten using some native\\n * functions as prototype setup using normal JavaScript does not work as\\n * expected during bootstrapping (see mirror.js in r114903).\\n *\\n * @param {function} ctor Constructor function which needs to inherit the\\n * prototype.\\n * @param {function} superCtor Constructor function to inherit prototype from.\\n */\\nexports.inherits = __webpack_require__(/*! inherits */ \\\"./node_modules/util/node_modules/inherits/inherits_browser.js\\\");\\n\\nexports._extend = function(origin, add) {\\n // Don't do anything if add isn't an object\\n if (!add || !isObject(add)) return origin;\\n\\n var keys = Object.keys(add);\\n var i = keys.length;\\n while (i--) {\\n origin[keys[i]] = add[keys[i]];\\n }\\n return origin;\\n};\\n\\nfunction hasOwnProperty(obj, prop) {\\n return Object.prototype.hasOwnProperty.call(obj, prop);\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/util/util.js?\");\n\n/***/ }),\n\n/***/ \"react\":\n/*!************************!*\\\n !*** external \"react\" ***!\n \\************************/\n/***/ ((module) => {\n\n\"use strict\";\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react__;\n\n/***/ }),\n\n/***/ \"react-dom\":\n/*!****************************!*\\\n !*** external \"react-dom\" ***!\n \\****************************/\n/***/ ((module) => {\n\n\"use strict\";\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t(() => {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = (module) => {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\t() => (module['default']) :\n/******/ \t\t\t\t() => (module);\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/global */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.g = (function() {\n/******/ \t\t\tif (typeof globalThis === 'object') return globalThis;\n/******/ \t\t\ttry {\n/******/ \t\t\t\treturn this || new Function('return this')();\n/******/ \t\t\t} catch (e) {\n/******/ \t\t\t\tif (typeof window === 'object') return window;\n/******/ \t\t\t}\n/******/ \t\t})();\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t(() => {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = (exports) => {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module can't be inlined because the eval devtool is used.\n/******/ \tvar __webpack_exports__ = __webpack_require__(\"./src/index.ts\");\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});","'use strict';\nconst colorConvert = require('color-convert');\n\nconst wrapAnsi16 = (fn, offset) => function () {\n\tconst code = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => function () {\n\tconst code = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => function () {\n\tconst rgb = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\t\t\tgray: [90, 39],\n\n\t\t\t// Bright color\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Fix humans\n\tstyles.color.grey = styles.color.gray;\n\n\tfor (const groupName of Object.keys(styles)) {\n\t\tconst group = styles[groupName];\n\n\t\tfor (const styleName of Object.keys(group)) {\n\t\t\tconst style = group[styleName];\n\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\n\t\tObject.defineProperty(styles, 'codes', {\n\t\t\tvalue: codes,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tconst ansi2ansi = n => n;\n\tconst rgb2rgb = (r, g, b) => [r, g, b];\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = {\n\t\tansi: wrapAnsi16(ansi2ansi, 0)\n\t};\n\tstyles.color.ansi256 = {\n\t\tansi256: wrapAnsi256(ansi2ansi, 0)\n\t};\n\tstyles.color.ansi16m = {\n\t\trgb: wrapAnsi16m(rgb2rgb, 0)\n\t};\n\n\tstyles.bgColor.ansi = {\n\t\tansi: wrapAnsi16(ansi2ansi, 10)\n\t};\n\tstyles.bgColor.ansi256 = {\n\t\tansi256: wrapAnsi256(ansi2ansi, 10)\n\t};\n\tstyles.bgColor.ansi16m = {\n\t\trgb: wrapAnsi16m(rgb2rgb, 10)\n\t};\n\n\tfor (let key of Object.keys(colorConvert)) {\n\t\tif (typeof colorConvert[key] !== 'object') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst suite = colorConvert[key];\n\n\t\tif (key === 'ansi16') {\n\t\t\tkey = 'ansi';\n\t\t}\n\n\t\tif ('ansi16' in suite) {\n\t\t\tstyles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);\n\t\t\tstyles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);\n\t\t}\n\n\t\tif ('ansi256' in suite) {\n\t\t\tstyles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);\n\t\t\tstyles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);\n\t\t}\n\n\t\tif ('rgb' in suite) {\n\t\t\tstyles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);\n\t\t\tstyles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);\n\t\t}\n\t}\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nconst escapeStringRegexp = require('escape-string-regexp');\nconst ansiStyles = require('ansi-styles');\nconst stdoutColor = require('supports-color').stdout;\n\nconst template = require('./templates.js');\n\nconst isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];\n\n// `color-convert` models to exclude from the Chalk API due to conflicts and such\nconst skipModels = new Set(['gray']);\n\nconst styles = Object.create(null);\n\nfunction applyOptions(obj, options) {\n\toptions = options || {};\n\n\t// Detect level if not set manually\n\tconst scLevel = stdoutColor ? stdoutColor.level : 0;\n\tobj.level = options.level === undefined ? scLevel : options.level;\n\tobj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;\n}\n\nfunction Chalk(options) {\n\t// We check for this.template here since calling `chalk.constructor()`\n\t// by itself will have a `this` of a previously constructed chalk object\n\tif (!this || !(this instanceof Chalk) || this.template) {\n\t\tconst chalk = {};\n\t\tapplyOptions(chalk, options);\n\n\t\tchalk.template = function () {\n\t\t\tconst args = [].slice.call(arguments);\n\t\t\treturn chalkTag.apply(null, [chalk.template].concat(args));\n\t\t};\n\n\t\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\t\tObject.setPrototypeOf(chalk.template, chalk);\n\n\t\tchalk.template.constructor = Chalk;\n\n\t\treturn chalk.template;\n\t}\n\n\tapplyOptions(this, options);\n}\n\n// Use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001B[94m';\n}\n\nfor (const key of Object.keys(ansiStyles)) {\n\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\tstyles[key] = {\n\t\tget() {\n\t\t\tconst codes = ansiStyles[key];\n\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\treturn build.call(this, this._styles || [], true, 'visible');\n\t}\n};\n\nansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');\nfor (const model of Object.keys(ansiStyles.color.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.color.close,\n\t\t\t\t\tcloseRe: ansiStyles.color.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');\nfor (const model of Object.keys(ansiStyles.bgColor.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.bgColor.close,\n\t\t\t\t\tcloseRe: ansiStyles.bgColor.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, styles);\n\nfunction build(_styles, _empty, key) {\n\tconst builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder._empty = _empty;\n\n\tconst self = this;\n\n\tObject.defineProperty(builder, 'level', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.level;\n\t\t},\n\t\tset(level) {\n\t\t\tself.level = level;\n\t\t}\n\t});\n\n\tObject.defineProperty(builder, 'enabled', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.enabled;\n\t\t},\n\t\tset(enabled) {\n\t\t\tself.enabled = enabled;\n\t\t}\n\t});\n\n\t// See below for fix regarding invisible grey/dim combination on Windows\n\tbuilder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';\n\n\t// `__proto__` is used because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tbuilder.__proto__ = proto; // eslint-disable-line no-proto\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// Support varags, but simply cast to string in case there's only one arg\n\tconst args = arguments;\n\tconst argsLen = args.length;\n\tlet str = String(arguments[0]);\n\n\tif (argsLen === 0) {\n\t\treturn '';\n\t}\n\n\tif (argsLen > 1) {\n\t\t// Don't slice `arguments`, it prevents V8 optimizations\n\t\tfor (let a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || this.level <= 0 || !str) {\n\t\treturn this._empty ? '' : str;\n\t}\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tconst originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && this.hasGrey) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\tfor (const code of this._styles.slice().reverse()) {\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\n\t\t// Close the styling before a linebreak and reopen\n\t\t// after next line to fix a bleed issue on macOS\n\t\t// https://github.com/chalk/chalk/pull/92\n\t\tstr = str.replace(/\\r?\\n/g, `${code.close}$&${code.open}`);\n\t}\n\n\t// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction chalkTag(chalk, strings) {\n\tif (!Array.isArray(strings)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn [].slice.call(arguments, 1).join(' ');\n\t}\n\n\tconst args = [].slice.call(arguments, 2);\n\tconst parts = [strings.raw[0]];\n\n\tfor (let i = 1; i < strings.length; i++) {\n\t\tparts.push(String(args[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'));\n\t\tparts.push(String(strings.raw[i]));\n\t}\n\n\treturn template(chalk, parts.join(''));\n}\n\nObject.defineProperties(Chalk.prototype, styles);\n\nmodule.exports = Chalk(); // eslint-disable-line new-cap\nmodule.exports.supportsColor = stdoutColor;\nmodule.exports.default = module.exports; // For TypeScript\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tif ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, args) {\n\tconst results = [];\n\tconst chunks = args.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tif (!isNaN(chunk)) {\n\t\t\tresults.push(Number(chunk));\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const styleName of Object.keys(enabled)) {\n\t\tif (Array.isArray(enabled[styleName])) {\n\t\t\tif (!(styleName in current)) {\n\t\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t\t}\n\n\t\t\tif (enabled[styleName].length > 0) {\n\t\t\t\tcurrent = current[styleName].apply(current, enabled[styleName]);\n\t\t\t} else {\n\t\t\t\tcurrent = current[styleName];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, tmp) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {\n\t\tif (escapeChar) {\n\t\t\tchunk.push(unescape(escapeChar));\n\t\t} else if (style) {\n\t\t\tconst str = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(chr);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMsg);\n\t}\n\n\treturn chunks.join('');\n};\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","'use strict';\nmodule.exports = {\n\tstdout: false,\n\tstderr: false\n};\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _zh_CN = _interopRequireDefault(require(\"../../date-picker/locale/zh_CN\"));\nvar _default = _zh_CN[\"default\"];\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _zh_CN = _interopRequireDefault(require(\"rc-picker/lib/locale/zh_CN\"));\nvar _zh_CN2 = _interopRequireDefault(require(\"../../time-picker/locale/zh_CN\"));\n// 统一合并为完整的 Locale\nvar locale = {\n lang: (0, _extends2[\"default\"])({\n placeholder: '请选择日期',\n yearPlaceholder: '请选择年份',\n quarterPlaceholder: '请选择季度',\n monthPlaceholder: '请选择月份',\n weekPlaceholder: '请选择周',\n rangePlaceholder: ['开始日期', '结束日期'],\n rangeYearPlaceholder: ['开始年份', '结束年份'],\n rangeMonthPlaceholder: ['开始月份', '结束月份'],\n rangeQuarterPlaceholder: ['开始季度', '结束季度'],\n rangeWeekPlaceholder: ['开始周', '结束周']\n }, _zh_CN[\"default\"]),\n timePickerLocale: (0, _extends2[\"default\"])({}, _zh_CN2[\"default\"])\n};\n// should add whitespace between char in Button\nlocale.lang.ok = '确定';\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nvar _default = locale;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _zh_CN = _interopRequireDefault(require(\"rc-pagination/lib/locale/zh_CN\"));\nvar _zh_CN2 = _interopRequireDefault(require(\"../calendar/locale/zh_CN\"));\nvar _zh_CN3 = _interopRequireDefault(require(\"../date-picker/locale/zh_CN\"));\nvar _zh_CN4 = _interopRequireDefault(require(\"../time-picker/locale/zh_CN\"));\n/* eslint-disable no-template-curly-in-string */\n\nvar typeTemplate = '${label}不是一个有效的${type}';\nvar localeValues = {\n locale: 'zh-cn',\n Pagination: _zh_CN[\"default\"],\n DatePicker: _zh_CN3[\"default\"],\n TimePicker: _zh_CN4[\"default\"],\n Calendar: _zh_CN2[\"default\"],\n // locales for all components\n global: {\n placeholder: '请选择'\n },\n Table: {\n filterTitle: '筛选',\n filterConfirm: '确定',\n filterReset: '重置',\n filterEmptyText: '无筛选项',\n filterCheckall: '全选',\n filterSearchPlaceholder: '在筛选项中搜索',\n selectAll: '全选当页',\n selectInvert: '反选当页',\n selectNone: '清空所有',\n selectionAll: '全选所有',\n sortTitle: '排序',\n expand: '展开行',\n collapse: '关闭行',\n triggerDesc: '点击降序',\n triggerAsc: '点击升序',\n cancelSort: '取消排序'\n },\n Modal: {\n okText: '确定',\n cancelText: '取消',\n justOkText: '知道了'\n },\n Popconfirm: {\n cancelText: '取消',\n okText: '确定'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: '请输入搜索内容',\n itemUnit: '项',\n itemsUnit: '项',\n remove: '删除',\n selectCurrent: '全选当页',\n removeCurrent: '删除当页',\n selectAll: '全选所有',\n removeAll: '删除全部',\n selectInvert: '反选当页'\n },\n Upload: {\n uploading: '文件上传中',\n removeFile: '删除文件',\n uploadError: '上传错误',\n previewFile: '预览文件',\n downloadFile: '下载文件'\n },\n Empty: {\n description: '暂无数据'\n },\n Icon: {\n icon: '图标'\n },\n Text: {\n edit: '编辑',\n copy: '复制',\n copied: '复制成功',\n expand: '展开'\n },\n PageHeader: {\n back: '返回'\n },\n Form: {\n optional: '(可选)',\n defaultValidateMessages: {\n \"default\": '字段验证错误${label}',\n required: '请输入${label}',\n \"enum\": '${label}必须是其中一个[${enum}]',\n whitespace: '${label}不能为空字符',\n date: {\n format: '${label}日期格式无效',\n parse: '${label}不能转换为日期',\n invalid: '${label}是一个无效日期'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n \"boolean\": typeTemplate,\n integer: typeTemplate,\n \"float\": typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label}须为${len}个字符',\n min: '${label}最少${min}个字符',\n max: '${label}最多${max}个字符',\n range: '${label}须在${min}-${max}字符之间'\n },\n number: {\n len: '${label}必须等于${len}',\n min: '${label}最小值为${min}',\n max: '${label}最大值为${max}',\n range: '${label}须在${min}-${max}之间'\n },\n array: {\n len: '须为${len}个${label}',\n min: '最少${min}个${label}',\n max: '最多${max}个${label}',\n range: '${label}数量须在${min}-${max}之间'\n },\n pattern: {\n mismatch: '${label}与模式不匹配${pattern}'\n }\n }\n },\n Image: {\n preview: '预览'\n }\n};\nvar _default = localeValues;\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar locale = {\n placeholder: '请选择时间',\n rangePlaceholder: ['开始时间', '结束时间']\n};\nvar _default = locale;\nexports[\"default\"] = _default;","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","(function(){\n\"use strict\";\nvar doc = document;\nvar win = window;\nvar docEle = doc.documentElement;\nvar createElement = doc.createElement.bind(doc);\nvar div = createElement('div');\nvar table = createElement('table');\nvar tbody = createElement('tbody');\nvar tr = createElement('tr');\nvar isArray = Array.isArray, ArrayPrototype = Array.prototype;\nvar concat = ArrayPrototype.concat, filter = ArrayPrototype.filter, indexOf = ArrayPrototype.indexOf, map = ArrayPrototype.map, push = ArrayPrototype.push, slice = ArrayPrototype.slice, some = ArrayPrototype.some, splice = ArrayPrototype.splice;\nvar idRe = /^#(?:[\\w-]|\\\\.|[^\\x00-\\xa0])*$/;\nvar classRe = /^\\.(?:[\\w-]|\\\\.|[^\\x00-\\xa0])*$/;\nvar htmlRe = /<.+>/;\nvar tagRe = /^\\w+$/;\n// @require ./variables.ts\nfunction find(selector, context) {\n var isFragment = isDocumentFragment(context);\n return !selector || (!isFragment && !isDocument(context) && !isElement(context))\n ? []\n : !isFragment && classRe.test(selector)\n ? context.getElementsByClassName(selector.slice(1).replace(/\\\\/g, ''))\n : !isFragment && tagRe.test(selector)\n ? context.getElementsByTagName(selector)\n : context.querySelectorAll(selector);\n}\n// @require ./find.ts\n// @require ./variables.ts\nvar Cash = /** @class */ (function () {\n function Cash(selector, context) {\n if (!selector)\n return;\n if (isCash(selector))\n return selector;\n var eles = selector;\n if (isString(selector)) {\n var ctx = context || doc;\n eles = idRe.test(selector) && isDocument(ctx)\n ? ctx.getElementById(selector.slice(1).replace(/\\\\/g, ''))\n : htmlRe.test(selector)\n ? parseHTML(selector)\n : isCash(ctx)\n ? ctx.find(selector)\n : isString(ctx)\n ? cash(ctx).find(selector)\n : find(selector, ctx);\n if (!eles)\n return;\n }\n else if (isFunction(selector)) {\n return this.ready(selector); //FIXME: `fn.ready` is not included in `core`, but it's actually a core functionality\n }\n if (eles.nodeType || eles === win)\n eles = [eles];\n this.length = eles.length;\n for (var i = 0, l = this.length; i < l; i++) {\n this[i] = eles[i];\n }\n }\n Cash.prototype.init = function (selector, context) {\n return new Cash(selector, context);\n };\n return Cash;\n}());\nvar fn = Cash.prototype;\nvar cash = fn.init;\ncash.fn = cash.prototype = fn; // Ensuring that `cash () instanceof cash`\nfn.length = 0;\nfn.splice = splice; // Ensuring a cash collection gets printed as array-like in Chrome's devtools\nif (typeof Symbol === 'function') { // Ensuring a cash collection is iterable\n fn[Symbol['iterator']] = ArrayPrototype[Symbol['iterator']];\n}\nfunction isCash(value) {\n return value instanceof Cash;\n}\nfunction isWindow(value) {\n return !!value && value === value.window;\n}\nfunction isDocument(value) {\n return !!value && value.nodeType === 9;\n}\nfunction isDocumentFragment(value) {\n return !!value && value.nodeType === 11;\n}\nfunction isElement(value) {\n return !!value && value.nodeType === 1;\n}\nfunction isText(value) {\n return !!value && value.nodeType === 3;\n}\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isString(value) {\n return typeof value === 'string';\n}\nfunction isUndefined(value) {\n return value === undefined;\n}\nfunction isNull(value) {\n return value === null;\n}\nfunction isNumeric(value) {\n return !isNaN(parseFloat(value)) && isFinite(value);\n}\nfunction isPlainObject(value) {\n if (typeof value !== 'object' || value === null)\n return false;\n var proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\ncash.isWindow = isWindow;\ncash.isFunction = isFunction;\ncash.isArray = isArray;\ncash.isNumeric = isNumeric;\ncash.isPlainObject = isPlainObject;\nfunction each(arr, callback, _reverse) {\n if (_reverse) {\n var i = arr.length;\n while (i--) {\n if (callback.call(arr[i], i, arr[i]) === false)\n return arr;\n }\n }\n else if (isPlainObject(arr)) {\n var keys = Object.keys(arr);\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n if (callback.call(arr[key], key, arr[key]) === false)\n return arr;\n }\n }\n else {\n for (var i = 0, l = arr.length; i < l; i++) {\n if (callback.call(arr[i], i, arr[i]) === false)\n return arr;\n }\n }\n return arr;\n}\ncash.each = each;\nfn.each = function (callback) {\n return each(this, callback);\n};\nfn.empty = function () {\n return this.each(function (i, ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild);\n }\n });\n};\nfunction extend() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var deep = isBoolean(sources[0]) ? sources.shift() : false;\n var target = sources.shift();\n var length = sources.length;\n if (!target)\n return {};\n if (!length)\n return extend(deep, cash, target);\n for (var i = 0; i < length; i++) {\n var source = sources[i];\n for (var key in source) {\n if (deep && (isArray(source[key]) || isPlainObject(source[key]))) {\n if (!target[key] || target[key].constructor !== source[key].constructor)\n target[key] = new source[key].constructor();\n extend(deep, target[key], source[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n }\n return target;\n}\ncash.extend = extend;\nfn.extend = function (plugins) {\n return extend(fn, plugins);\n};\n// @require ./type_checking.ts\nvar splitValuesRe = /\\S+/g;\nfunction getSplitValues(str) {\n return isString(str) ? str.match(splitValuesRe) || [] : [];\n}\nfn.toggleClass = function (cls, force) {\n var classes = getSplitValues(cls);\n var isForce = !isUndefined(force);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n each(classes, function (i, c) {\n if (isForce) {\n force ? ele.classList.add(c) : ele.classList.remove(c);\n }\n else {\n ele.classList.toggle(c);\n }\n });\n });\n};\nfn.addClass = function (cls) {\n return this.toggleClass(cls, true);\n};\nfn.removeAttr = function (attr) {\n var attrs = getSplitValues(attr);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n each(attrs, function (i, a) {\n ele.removeAttribute(a);\n });\n });\n};\nfunction attr(attr, value) {\n if (!attr)\n return;\n if (isString(attr)) {\n if (arguments.length < 2) {\n if (!this[0] || !isElement(this[0]))\n return;\n var value_1 = this[0].getAttribute(attr);\n return isNull(value_1) ? undefined : value_1;\n }\n if (isUndefined(value))\n return this;\n if (isNull(value))\n return this.removeAttr(attr);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n ele.setAttribute(attr, value);\n });\n }\n for (var key in attr) {\n this.attr(key, attr[key]);\n }\n return this;\n}\nfn.attr = attr;\nfn.removeClass = function (cls) {\n if (arguments.length)\n return this.toggleClass(cls, false);\n return this.attr('class', '');\n};\nfn.hasClass = function (cls) {\n return !!cls && some.call(this, function (ele) { return isElement(ele) && ele.classList.contains(cls); });\n};\nfn.get = function (index) {\n if (isUndefined(index))\n return slice.call(this);\n index = Number(index);\n return this[index < 0 ? index + this.length : index];\n};\nfn.eq = function (index) {\n return cash(this.get(index));\n};\nfn.first = function () {\n return this.eq(0);\n};\nfn.last = function () {\n return this.eq(-1);\n};\nfunction text(text) {\n if (isUndefined(text)) {\n return this.get().map(function (ele) { return isElement(ele) || isText(ele) ? ele.textContent : ''; }).join('');\n }\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n ele.textContent = text;\n });\n}\nfn.text = text;\n// @require core/type_checking.ts\n// @require core/variables.ts\nfunction computeStyle(ele, prop, isVariable) {\n if (!isElement(ele))\n return;\n var style = win.getComputedStyle(ele, null);\n return isVariable ? style.getPropertyValue(prop) || undefined : style[prop] || ele.style[prop];\n}\n// @require ./compute_style.ts\nfunction computeStyleInt(ele, prop) {\n return parseInt(computeStyle(ele, prop), 10) || 0;\n}\n// @require css/helpers/compute_style_int.ts\nfunction getExtraSpace(ele, xAxis) {\n return computeStyleInt(ele, \"border\".concat(xAxis ? 'Left' : 'Top', \"Width\")) + computeStyleInt(ele, \"padding\".concat(xAxis ? 'Left' : 'Top')) + computeStyleInt(ele, \"padding\".concat(xAxis ? 'Right' : 'Bottom')) + computeStyleInt(ele, \"border\".concat(xAxis ? 'Right' : 'Bottom', \"Width\"));\n}\n// @require css/helpers/compute_style.ts\nvar defaultDisplay = {};\nfunction getDefaultDisplay(tagName) {\n if (defaultDisplay[tagName])\n return defaultDisplay[tagName];\n var ele = createElement(tagName);\n doc.body.insertBefore(ele, null);\n var display = computeStyle(ele, 'display');\n doc.body.removeChild(ele);\n return defaultDisplay[tagName] = display !== 'none' ? display : 'block';\n}\n// @require css/helpers/compute_style.ts\nfunction isHidden(ele) {\n return computeStyle(ele, 'display') === 'none';\n}\n// @require ./cash.ts\nfunction matches(ele, selector) {\n var matches = ele && (ele['matches'] || ele['webkitMatchesSelector'] || ele['msMatchesSelector']);\n return !!matches && !!selector && matches.call(ele, selector);\n}\n// @require ./matches.ts\n// @require ./type_checking.ts\nfunction getCompareFunction(comparator) {\n return isString(comparator)\n ? function (i, ele) { return matches(ele, comparator); }\n : isFunction(comparator)\n ? comparator\n : isCash(comparator)\n ? function (i, ele) { return comparator.is(ele); }\n : !comparator\n ? function () { return false; }\n : function (i, ele) { return ele === comparator; };\n}\nfn.filter = function (comparator) {\n var compare = getCompareFunction(comparator);\n return cash(filter.call(this, function (ele, i) { return compare.call(ele, i, ele); }));\n};\n// @require collection/filter.ts\nfunction filtered(collection, comparator) {\n return !comparator ? collection : collection.filter(comparator);\n}\nfn.detach = function (comparator) {\n filtered(this, comparator).each(function (i, ele) {\n if (ele.parentNode) {\n ele.parentNode.removeChild(ele);\n }\n });\n return this;\n};\nvar fragmentRe = /^\\s*<(\\w+)[^>]*>/;\nvar singleTagRe = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/;\nvar containers = {\n '*': div,\n tr: tbody,\n td: tr,\n th: tr,\n thead: table,\n tbody: table,\n tfoot: table\n};\n//TODO: Create elements inside a document fragment, in order to prevent inline event handlers from firing\n//TODO: Ensure the created elements have the fragment as their parent instead of null, this also ensures we can deal with detatched nodes more reliably\nfunction parseHTML(html) {\n if (!isString(html))\n return [];\n if (singleTagRe.test(html))\n return [createElement(RegExp.$1)];\n var fragment = fragmentRe.test(html) && RegExp.$1;\n var container = containers[fragment] || containers['*'];\n container.innerHTML = html;\n return cash(container.childNodes).detach().get();\n}\ncash.parseHTML = parseHTML;\nfn.has = function (selector) {\n var comparator = isString(selector)\n ? function (i, ele) { return find(selector, ele).length; }\n : function (i, ele) { return ele.contains(selector); };\n return this.filter(comparator);\n};\nfn.not = function (comparator) {\n var compare = getCompareFunction(comparator);\n return this.filter(function (i, ele) { return (!isString(comparator) || isElement(ele)) && !compare.call(ele, i, ele); });\n};\nfunction pluck(arr, prop, deep, until) {\n var plucked = [];\n var isCallback = isFunction(prop);\n var compare = until && getCompareFunction(until);\n for (var i = 0, l = arr.length; i < l; i++) {\n if (isCallback) {\n var val_1 = prop(arr[i]);\n if (val_1.length)\n push.apply(plucked, val_1);\n }\n else {\n var val_2 = arr[i][prop];\n while (val_2 != null) {\n if (until && compare(-1, val_2))\n break;\n plucked.push(val_2);\n val_2 = deep ? val_2[prop] : null;\n }\n }\n }\n return plucked;\n}\n// @require core/pluck.ts\n// @require core/variables.ts\nfunction getValue(ele) {\n if (ele.multiple && ele.options)\n return pluck(filter.call(ele.options, function (option) { return option.selected && !option.disabled && !option.parentNode.disabled; }), 'value');\n return ele.value || '';\n}\nfunction val(value) {\n if (!arguments.length)\n return this[0] && getValue(this[0]);\n return this.each(function (i, ele) {\n var isSelect = ele.multiple && ele.options;\n if (isSelect || checkableRe.test(ele.type)) {\n var eleValue_1 = isArray(value) ? map.call(value, String) : (isNull(value) ? [] : [String(value)]);\n if (isSelect) {\n each(ele.options, function (i, option) {\n option.selected = eleValue_1.indexOf(option.value) >= 0;\n }, true);\n }\n else {\n ele.checked = eleValue_1.indexOf(ele.value) >= 0;\n }\n }\n else {\n ele.value = isUndefined(value) || isNull(value) ? '' : value;\n }\n });\n}\nfn.val = val;\nfn.is = function (comparator) {\n var compare = getCompareFunction(comparator);\n return some.call(this, function (ele, i) { return compare.call(ele, i, ele); });\n};\ncash.guid = 1;\nfunction unique(arr) {\n return arr.length > 1 ? filter.call(arr, function (item, index, self) { return indexOf.call(self, item) === index; }) : arr;\n}\ncash.unique = unique;\nfn.add = function (selector, context) {\n return cash(unique(this.get().concat(cash(selector, context).get())));\n};\nfn.children = function (comparator) {\n return filtered(cash(unique(pluck(this, function (ele) { return ele.children; }))), comparator);\n};\nfn.parent = function (comparator) {\n return filtered(cash(unique(pluck(this, 'parentNode'))), comparator);\n};\nfn.index = function (selector) {\n var child = selector ? cash(selector)[0] : this[0];\n var collection = selector ? this : cash(child).parent().children();\n return indexOf.call(collection, child);\n};\nfn.closest = function (comparator) {\n var filtered = this.filter(comparator);\n if (filtered.length)\n return filtered;\n var $parent = this.parent();\n if (!$parent.length)\n return filtered;\n return $parent.closest(comparator);\n};\nfn.siblings = function (comparator) {\n return filtered(cash(unique(pluck(this, function (ele) { return cash(ele).parent().children().not(ele); }))), comparator);\n};\nfn.find = function (selector) {\n return cash(unique(pluck(this, function (ele) { return find(selector, ele); })));\n};\n// @require core/variables.ts\n// @require collection/filter.ts\n// @require traversal/find.ts\nvar HTMLCDATARe = /^\\s*\\s*$/g;\nvar scriptTypeRe = /^$|^module$|\\/(java|ecma)script/i;\nvar scriptAttributes = ['type', 'src', 'nonce', 'noModule'];\nfunction evalScripts(node, doc) {\n var collection = cash(node);\n collection.filter('script').add(collection.find('script')).each(function (i, ele) {\n if (scriptTypeRe.test(ele.type) && docEle.contains(ele)) { // The script type is supported // The element is attached to the DOM // Using `documentElement` for broader browser support\n var script_1 = createElement('script');\n script_1.text = ele.textContent.replace(HTMLCDATARe, '');\n each(scriptAttributes, function (i, attr) {\n if (ele[attr])\n script_1[attr] = ele[attr];\n });\n doc.head.insertBefore(script_1, null);\n doc.head.removeChild(script_1);\n }\n });\n}\n// @require ./eval_scripts.ts\nfunction insertElement(anchor, target, left, inside, evaluate) {\n if (inside) { // prepend/append\n anchor.insertBefore(target, left ? anchor.firstChild : null);\n }\n else { // before/after\n if (anchor.nodeName === 'HTML') {\n anchor.parentNode.replaceChild(target, anchor);\n }\n else {\n anchor.parentNode.insertBefore(target, left ? anchor : anchor.nextSibling);\n }\n }\n if (evaluate) {\n evalScripts(target, anchor.ownerDocument);\n }\n}\n// @require ./insert_element.ts\nfunction insertSelectors(selectors, anchors, inverse, left, inside, reverseLoop1, reverseLoop2, reverseLoop3) {\n each(selectors, function (si, selector) {\n each(cash(selector), function (ti, target) {\n each(cash(anchors), function (ai, anchor) {\n var anchorFinal = inverse ? target : anchor;\n var targetFinal = inverse ? anchor : target;\n var indexFinal = inverse ? ti : ai;\n insertElement(anchorFinal, !indexFinal ? targetFinal : targetFinal.cloneNode(true), left, inside, !indexFinal);\n }, reverseLoop3);\n }, reverseLoop2);\n }, reverseLoop1);\n return anchors;\n}\nfn.after = function () {\n return insertSelectors(arguments, this, false, false, false, true, true);\n};\nfn.append = function () {\n return insertSelectors(arguments, this, false, false, true);\n};\nfunction html(html) {\n if (!arguments.length)\n return this[0] && this[0].innerHTML;\n if (isUndefined(html))\n return this;\n var hasScript = /]/.test(html);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n if (hasScript) {\n cash(ele).empty().append(html);\n }\n else {\n ele.innerHTML = html;\n }\n });\n}\nfn.html = html;\nfn.appendTo = function (selector) {\n return insertSelectors(arguments, this, true, false, true);\n};\nfn.wrapInner = function (selector) {\n return this.each(function (i, ele) {\n var $ele = cash(ele);\n var contents = $ele.contents();\n contents.length ? contents.wrapAll(selector) : $ele.append(selector);\n });\n};\nfn.before = function () {\n return insertSelectors(arguments, this, false, true);\n};\nfn.wrapAll = function (selector) {\n var structure = cash(selector);\n var wrapper = structure[0];\n while (wrapper.children.length)\n wrapper = wrapper.firstElementChild;\n this.first().before(structure);\n return this.appendTo(wrapper);\n};\nfn.wrap = function (selector) {\n return this.each(function (i, ele) {\n var wrapper = cash(selector)[0];\n cash(ele).wrapAll(!i ? wrapper : wrapper.cloneNode(true));\n });\n};\nfn.insertAfter = function (selector) {\n return insertSelectors(arguments, this, true, false, false, false, false, true);\n};\nfn.insertBefore = function (selector) {\n return insertSelectors(arguments, this, true, true);\n};\nfn.prepend = function () {\n return insertSelectors(arguments, this, false, true, true, true, true);\n};\nfn.prependTo = function (selector) {\n return insertSelectors(arguments, this, true, true, true, false, false, true);\n};\nfn.contents = function () {\n return cash(unique(pluck(this, function (ele) { return ele.tagName === 'IFRAME' ? [ele.contentDocument] : (ele.tagName === 'TEMPLATE' ? ele.content.childNodes : ele.childNodes); })));\n};\nfn.next = function (comparator, _all, _until) {\n return filtered(cash(unique(pluck(this, 'nextElementSibling', _all, _until))), comparator);\n};\nfn.nextAll = function (comparator) {\n return this.next(comparator, true);\n};\nfn.nextUntil = function (until, comparator) {\n return this.next(comparator, true, until);\n};\nfn.parents = function (comparator, _until) {\n return filtered(cash(unique(pluck(this, 'parentElement', true, _until))), comparator);\n};\nfn.parentsUntil = function (until, comparator) {\n return this.parents(comparator, until);\n};\nfn.prev = function (comparator, _all, _until) {\n return filtered(cash(unique(pluck(this, 'previousElementSibling', _all, _until))), comparator);\n};\nfn.prevAll = function (comparator) {\n return this.prev(comparator, true);\n};\nfn.prevUntil = function (until, comparator) {\n return this.prev(comparator, true, until);\n};\nfn.map = function (callback) {\n return cash(concat.apply([], map.call(this, function (ele, i) { return callback.call(ele, i, ele); })));\n};\nfn.clone = function () {\n return this.map(function (i, ele) { return ele.cloneNode(true); });\n};\nfn.offsetParent = function () {\n return this.map(function (i, ele) {\n var offsetParent = ele.offsetParent;\n while (offsetParent && computeStyle(offsetParent, 'position') === 'static') {\n offsetParent = offsetParent.offsetParent;\n }\n return offsetParent || docEle;\n });\n};\nfn.slice = function (start, end) {\n return cash(slice.call(this, start, end));\n};\n// @require ./cash.ts\nvar dashAlphaRe = /-([a-z])/g;\nfunction camelCase(str) {\n return str.replace(dashAlphaRe, function (match, letter) { return letter.toUpperCase(); });\n}\nfn.ready = function (callback) {\n var cb = function () { return setTimeout(callback, 0, cash); };\n if (doc.readyState !== 'loading') {\n cb();\n }\n else {\n doc.addEventListener('DOMContentLoaded', cb);\n }\n return this;\n};\nfn.unwrap = function () {\n this.parent().each(function (i, ele) {\n if (ele.tagName === 'BODY')\n return;\n var $ele = cash(ele);\n $ele.replaceWith($ele.children());\n });\n return this;\n};\nfn.offset = function () {\n var ele = this[0];\n if (!ele)\n return;\n var rect = ele.getBoundingClientRect();\n return {\n top: rect.top + win.pageYOffset,\n left: rect.left + win.pageXOffset\n };\n};\nfn.position = function () {\n var ele = this[0];\n if (!ele)\n return;\n var isFixed = (computeStyle(ele, 'position') === 'fixed');\n var offset = isFixed ? ele.getBoundingClientRect() : this.offset();\n if (!isFixed) {\n var doc_1 = ele.ownerDocument;\n var offsetParent = ele.offsetParent || doc_1.documentElement;\n while ((offsetParent === doc_1.body || offsetParent === doc_1.documentElement) && computeStyle(offsetParent, 'position') === 'static') {\n offsetParent = offsetParent.parentNode;\n }\n if (offsetParent !== ele && isElement(offsetParent)) {\n var parentOffset = cash(offsetParent).offset();\n offset.top -= parentOffset.top + computeStyleInt(offsetParent, 'borderTopWidth');\n offset.left -= parentOffset.left + computeStyleInt(offsetParent, 'borderLeftWidth');\n }\n }\n return {\n top: offset.top - computeStyleInt(ele, 'marginTop'),\n left: offset.left - computeStyleInt(ele, 'marginLeft')\n };\n};\nvar propMap = {\n /* GENERAL */\n class: 'className',\n contenteditable: 'contentEditable',\n /* LABEL */\n for: 'htmlFor',\n /* INPUT */\n readonly: 'readOnly',\n maxlength: 'maxLength',\n tabindex: 'tabIndex',\n /* TABLE */\n colspan: 'colSpan',\n rowspan: 'rowSpan',\n /* IMAGE */\n usemap: 'useMap'\n};\nfn.prop = function (prop, value) {\n if (!prop)\n return;\n if (isString(prop)) {\n prop = propMap[prop] || prop;\n if (arguments.length < 2)\n return this[0] && this[0][prop];\n return this.each(function (i, ele) { ele[prop] = value; });\n }\n for (var key in prop) {\n this.prop(key, prop[key]);\n }\n return this;\n};\nfn.removeProp = function (prop) {\n return this.each(function (i, ele) { delete ele[propMap[prop] || prop]; });\n};\nvar cssVariableRe = /^--/;\n// @require ./variables.ts\nfunction isCSSVariable(prop) {\n return cssVariableRe.test(prop);\n}\n// @require core/camel_case.ts\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/variables.ts\n// @require ./is_css_variable.ts\nvar prefixedProps = {};\nvar style = div.style;\nvar vendorsPrefixes = ['webkit', 'moz', 'ms'];\nfunction getPrefixedProp(prop, isVariable) {\n if (isVariable === void 0) { isVariable = isCSSVariable(prop); }\n if (isVariable)\n return prop;\n if (!prefixedProps[prop]) {\n var propCC = camelCase(prop);\n var propUC = \"\".concat(propCC[0].toUpperCase()).concat(propCC.slice(1));\n var props = (\"\".concat(propCC, \" \").concat(vendorsPrefixes.join(\"\".concat(propUC, \" \"))).concat(propUC)).split(' ');\n each(props, function (i, p) {\n if (p in style) {\n prefixedProps[prop] = p;\n return false;\n }\n });\n }\n return prefixedProps[prop];\n}\n// @require core/type_checking.ts\n// @require ./is_css_variable.ts\nvar numericProps = {\n animationIterationCount: true,\n columnCount: true,\n flexGrow: true,\n flexShrink: true,\n fontWeight: true,\n gridArea: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnStart: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowStart: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n widows: true,\n zIndex: true\n};\nfunction getSuffixedValue(prop, value, isVariable) {\n if (isVariable === void 0) { isVariable = isCSSVariable(prop); }\n return !isVariable && !numericProps[prop] && isNumeric(value) ? \"\".concat(value, \"px\") : value;\n}\nfunction css(prop, value) {\n if (isString(prop)) {\n var isVariable_1 = isCSSVariable(prop);\n prop = getPrefixedProp(prop, isVariable_1);\n if (arguments.length < 2)\n return this[0] && computeStyle(this[0], prop, isVariable_1);\n if (!prop)\n return this;\n value = getSuffixedValue(prop, value, isVariable_1);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n if (isVariable_1) {\n ele.style.setProperty(prop, value);\n }\n else {\n ele.style[prop] = value;\n }\n });\n }\n for (var key in prop) {\n this.css(key, prop[key]);\n }\n return this;\n}\n;\nfn.css = css;\nfunction attempt(fn, arg) {\n try {\n return fn(arg);\n }\n catch (_a) {\n return arg;\n }\n}\n// @require core/attempt.ts\n// @require core/camel_case.ts\nvar JSONStringRe = /^\\s+|\\s+$/;\nfunction getData(ele, key) {\n var value = ele.dataset[key] || ele.dataset[camelCase(key)];\n if (JSONStringRe.test(value))\n return value;\n return attempt(JSON.parse, value);\n}\n// @require core/attempt.ts\n// @require core/camel_case.ts\nfunction setData(ele, key, value) {\n value = attempt(JSON.stringify, value);\n ele.dataset[camelCase(key)] = value;\n}\nfunction data(name, value) {\n if (!name) {\n if (!this[0])\n return;\n var datas = {};\n for (var key in this[0].dataset) {\n datas[key] = getData(this[0], key);\n }\n return datas;\n }\n if (isString(name)) {\n if (arguments.length < 2)\n return this[0] && getData(this[0], name);\n if (isUndefined(value))\n return this;\n return this.each(function (i, ele) { setData(ele, name, value); });\n }\n for (var key in name) {\n this.data(key, name[key]);\n }\n return this;\n}\nfn.data = data;\nfunction getDocumentDimension(doc, dimension) {\n var docEle = doc.documentElement;\n return Math.max(doc.body[\"scroll\".concat(dimension)], docEle[\"scroll\".concat(dimension)], doc.body[\"offset\".concat(dimension)], docEle[\"offset\".concat(dimension)], docEle[\"client\".concat(dimension)]);\n}\neach([true, false], function (i, outer) {\n each(['Width', 'Height'], function (i, prop) {\n var name = \"\".concat(outer ? 'outer' : 'inner').concat(prop);\n fn[name] = function (includeMargins) {\n if (!this[0])\n return;\n if (isWindow(this[0]))\n return outer ? this[0][\"inner\".concat(prop)] : this[0].document.documentElement[\"client\".concat(prop)];\n if (isDocument(this[0]))\n return getDocumentDimension(this[0], prop);\n return this[0][\"\".concat(outer ? 'offset' : 'client').concat(prop)] + (includeMargins && outer ? computeStyleInt(this[0], \"margin\".concat(i ? 'Top' : 'Left')) + computeStyleInt(this[0], \"margin\".concat(i ? 'Bottom' : 'Right')) : 0);\n };\n });\n});\neach(['Width', 'Height'], function (index, prop) {\n var propLC = prop.toLowerCase();\n fn[propLC] = function (value) {\n if (!this[0])\n return isUndefined(value) ? undefined : this;\n if (!arguments.length) {\n if (isWindow(this[0]))\n return this[0].document.documentElement[\"client\".concat(prop)];\n if (isDocument(this[0]))\n return getDocumentDimension(this[0], prop);\n return this[0].getBoundingClientRect()[propLC] - getExtraSpace(this[0], !index);\n }\n var valueNumber = parseInt(value, 10);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n var boxSizing = computeStyle(ele, 'boxSizing');\n ele.style[propLC] = getSuffixedValue(propLC, valueNumber + (boxSizing === 'border-box' ? getExtraSpace(ele, !index) : 0));\n });\n };\n});\nvar displayProperty = '___cd';\nfn.toggle = function (force) {\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n var hidden = isHidden(ele);\n var show = isUndefined(force) ? hidden : force;\n if (show) {\n ele.style.display = ele[displayProperty] || '';\n if (isHidden(ele)) {\n ele.style.display = getDefaultDisplay(ele.tagName);\n }\n }\n else if (!hidden) {\n ele[displayProperty] = computeStyle(ele, 'display');\n ele.style.display = 'none';\n }\n });\n};\nfn.hide = function () {\n return this.toggle(false);\n};\nfn.show = function () {\n return this.toggle(true);\n};\nvar eventsNamespace = '___ce';\nvar eventsNamespacesSeparator = '.';\nvar eventsFocus = { focus: 'focusin', blur: 'focusout' };\nvar eventsHover = { mouseenter: 'mouseover', mouseleave: 'mouseout' };\nvar eventsMouseRe = /^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;\n// @require ./variables.ts\nfunction getEventNameBubbling(name) {\n return eventsHover[name] || eventsFocus[name] || name;\n}\n// @require ./variables.ts\nfunction parseEventName(eventName) {\n var parts = eventName.split(eventsNamespacesSeparator);\n return [parts[0], parts.slice(1).sort()]; // [name, namespace[]]\n}\nfn.trigger = function (event, data) {\n if (isString(event)) {\n var _a = parseEventName(event), nameOriginal = _a[0], namespaces = _a[1];\n var name_1 = getEventNameBubbling(nameOriginal);\n if (!name_1)\n return this;\n var type = eventsMouseRe.test(name_1) ? 'MouseEvents' : 'HTMLEvents';\n event = doc.createEvent(type);\n event.initEvent(name_1, true, true);\n event.namespace = namespaces.join(eventsNamespacesSeparator);\n event.___ot = nameOriginal;\n }\n event.___td = data;\n var isEventFocus = (event.___ot in eventsFocus);\n return this.each(function (i, ele) {\n if (isEventFocus && isFunction(ele[event.___ot])) {\n ele[\"___i\".concat(event.type)] = true; // Ensuring the native event is ignored\n ele[event.___ot]();\n ele[\"___i\".concat(event.type)] = false; // Ensuring the custom event is not ignored\n }\n ele.dispatchEvent(event);\n });\n};\n// @require ./variables.ts\nfunction getEventsCache(ele) {\n return ele[eventsNamespace] = (ele[eventsNamespace] || {});\n}\n// @require core/guid.ts\n// @require events/helpers/get_events_cache.ts\nfunction addEvent(ele, name, namespaces, selector, callback) {\n var eventCache = getEventsCache(ele);\n eventCache[name] = (eventCache[name] || []);\n eventCache[name].push([namespaces, selector, callback]);\n ele.addEventListener(name, callback);\n}\nfunction hasNamespaces(ns1, ns2) {\n return !ns2 || !some.call(ns2, function (ns) { return ns1.indexOf(ns) < 0; });\n}\n// @require ./get_events_cache.ts\n// @require ./has_namespaces.ts\n// @require ./parse_event_name.ts\nfunction removeEvent(ele, name, namespaces, selector, callback) {\n var cache = getEventsCache(ele);\n if (!name) {\n for (name in cache) {\n removeEvent(ele, name, namespaces, selector, callback);\n }\n }\n else if (cache[name]) {\n cache[name] = cache[name].filter(function (_a) {\n var ns = _a[0], sel = _a[1], cb = _a[2];\n if ((callback && cb.guid !== callback.guid) || !hasNamespaces(ns, namespaces) || (selector && selector !== sel))\n return true;\n ele.removeEventListener(name, cb);\n });\n }\n}\nfn.off = function (eventFullName, selector, callback) {\n var _this = this;\n if (isUndefined(eventFullName)) {\n this.each(function (i, ele) {\n if (!isElement(ele) && !isDocument(ele) && !isWindow(ele))\n return;\n removeEvent(ele);\n });\n }\n else if (!isString(eventFullName)) {\n for (var key in eventFullName) {\n this.off(key, eventFullName[key]);\n }\n }\n else {\n if (isFunction(selector)) {\n callback = selector;\n selector = '';\n }\n each(getSplitValues(eventFullName), function (i, eventFullName) {\n var _a = parseEventName(eventFullName), nameOriginal = _a[0], namespaces = _a[1];\n var name = getEventNameBubbling(nameOriginal);\n _this.each(function (i, ele) {\n if (!isElement(ele) && !isDocument(ele) && !isWindow(ele))\n return;\n removeEvent(ele, name, namespaces, selector, callback);\n });\n });\n }\n return this;\n};\nfn.remove = function (comparator) {\n filtered(this, comparator).detach().off();\n return this;\n};\nfn.replaceWith = function (selector) {\n return this.before(selector).remove();\n};\nfn.replaceAll = function (selector) {\n cash(selector).replaceWith(this);\n return this;\n};\nfunction on(eventFullName, selector, data, callback, _one) {\n var _this = this;\n if (!isString(eventFullName)) {\n for (var key in eventFullName) {\n this.on(key, selector, data, eventFullName[key], _one);\n }\n return this;\n }\n if (!isString(selector)) {\n if (isUndefined(selector) || isNull(selector)) {\n selector = '';\n }\n else if (isUndefined(data)) {\n data = selector;\n selector = '';\n }\n else {\n callback = data;\n data = selector;\n selector = '';\n }\n }\n if (!isFunction(callback)) {\n callback = data;\n data = undefined;\n }\n if (!callback)\n return this;\n each(getSplitValues(eventFullName), function (i, eventFullName) {\n var _a = parseEventName(eventFullName), nameOriginal = _a[0], namespaces = _a[1];\n var name = getEventNameBubbling(nameOriginal);\n var isEventHover = (nameOriginal in eventsHover);\n var isEventFocus = (nameOriginal in eventsFocus);\n if (!name)\n return;\n _this.each(function (i, ele) {\n if (!isElement(ele) && !isDocument(ele) && !isWindow(ele))\n return;\n var finalCallback = function (event) {\n if (event.target[\"___i\".concat(event.type)])\n return event.stopImmediatePropagation(); // Ignoring native event in favor of the upcoming custom one\n if (event.namespace && !hasNamespaces(namespaces, event.namespace.split(eventsNamespacesSeparator)))\n return;\n if (!selector && ((isEventFocus && (event.target !== ele || event.___ot === name)) || (isEventHover && event.relatedTarget && ele.contains(event.relatedTarget))))\n return;\n var thisArg = ele;\n if (selector) {\n var target = event.target;\n while (!matches(target, selector)) {\n if (target === ele)\n return;\n target = target.parentNode;\n if (!target)\n return;\n }\n thisArg = target;\n }\n Object.defineProperty(event, 'currentTarget', {\n configurable: true,\n get: function () {\n return thisArg;\n }\n });\n Object.defineProperty(event, 'delegateTarget', {\n configurable: true,\n get: function () {\n return ele;\n }\n });\n Object.defineProperty(event, 'data', {\n configurable: true,\n get: function () {\n return data;\n }\n });\n var returnValue = callback.call(thisArg, event, event.___td);\n if (_one) {\n removeEvent(ele, name, namespaces, selector, finalCallback);\n }\n if (returnValue === false) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n finalCallback.guid = callback.guid = (callback.guid || cash.guid++);\n addEvent(ele, name, namespaces, selector, finalCallback);\n });\n });\n return this;\n}\nfn.on = on;\nfunction one(eventFullName, selector, data, callback) {\n return this.on(eventFullName, selector, data, callback, true);\n}\n;\nfn.one = one;\nvar queryEncodeCRLFRe = /\\r?\\n/g;\nfunction queryEncode(prop, value) {\n return \"&\".concat(encodeURIComponent(prop), \"=\").concat(encodeURIComponent(value.replace(queryEncodeCRLFRe, '\\r\\n')));\n}\nvar skippableRe = /file|reset|submit|button|image/i;\nvar checkableRe = /radio|checkbox/i;\nfn.serialize = function () {\n var query = '';\n this.each(function (i, ele) {\n each(ele.elements || [ele], function (i, ele) {\n if (ele.disabled || !ele.name || ele.tagName === 'FIELDSET' || skippableRe.test(ele.type) || (checkableRe.test(ele.type) && !ele.checked))\n return;\n var value = getValue(ele);\n if (!isUndefined(value)) {\n var values = isArray(value) ? value : [value];\n each(values, function (i, value) {\n query += queryEncode(ele.name, value);\n });\n }\n });\n });\n return query.slice(1);\n};\n// @require core/types.ts\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require core/each.ts\n// @require core/extend.ts\n// @require core/find.ts\n// @require core/get_compare_function.ts\n// @require core/get_split_values.ts\n// @require core/guid.ts\n// @require core/parse_html.ts\n// @require core/unique.ts\n// @require attributes/add_class.ts\n// @require attributes/attr.ts\n// @require attributes/has_class.ts\n// @require attributes/prop.ts\n// @require attributes/remove_attr.ts\n// @require attributes/remove_class.ts\n// @require attributes/remove_prop.ts\n// @require attributes/toggle_class.ts\n// @require collection/add.ts\n// @require collection/each.ts\n// @require collection/eq.ts\n// @require collection/filter.ts\n// @require collection/first.ts\n// @require collection/get.ts\n// @require collection/index.ts\n// @require collection/last.ts\n// @require collection/map.ts\n// @require collection/slice.ts\n// @require css/css.ts\n// @require data/data.ts\n// @require dimensions/inner_outer.ts\n// @require dimensions/normal.ts\n// @require effects/hide.ts\n// @require effects/show.ts\n// @require effects/toggle.ts\n// @require events/off.ts\n// @require events/on.ts\n// @require events/one.ts\n// @require events/ready.ts\n// @require events/trigger.ts\n// @require forms/serialize.ts\n// @require forms/val.ts\n// @require manipulation/after.ts\n// @require manipulation/append.ts\n// @require manipulation/append_to.ts\n// @require manipulation/before.ts\n// @require manipulation/clone.ts\n// @require manipulation/detach.ts\n// @require manipulation/empty.ts\n// @require manipulation/html.ts\n// @require manipulation/insert_after.ts\n// @require manipulation/insert_before.ts\n// @require manipulation/prepend.ts\n// @require manipulation/prepend_to.ts\n// @require manipulation/remove.ts\n// @require manipulation/replace_all.ts\n// @require manipulation/replace_with.ts\n// @require manipulation/text.ts\n// @require manipulation/unwrap.ts\n// @require manipulation/wrap.ts\n// @require manipulation/wrap_all.ts\n// @require manipulation/wrap_inner.ts\n// @require offset/offset.ts\n// @require offset/offset_parent.ts\n// @require offset/position.ts\n// @require traversal/children.ts\n// @require traversal/closest.ts\n// @require traversal/contents.ts\n// @require traversal/find.ts\n// @require traversal/has.ts\n// @require traversal/is.ts\n// @require traversal/next.ts\n// @require traversal/next_all.ts\n// @require traversal/next_until.ts\n// @require traversal/not.ts\n// @require traversal/parent.ts\n// @require traversal/parents.ts\n// @require traversal/parents_until.ts\n// @require traversal/prev.ts\n// @require traversal/prev_all.ts\n// @require traversal/prev_until.ts\n// @require traversal/siblings.ts\n// @no-require extras/get_script.ts\n// @no-require extras/shorthands.ts\n// @require methods.ts\nif (typeof exports !== 'undefined') { // Node.js\n module.exports = cash;\n}\nelse { // Browser\n win['cash'] = win['$'] = cash;\n}\n})();","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\nvar hasOwnProperty = Object.hasOwnProperty;\n\nvar reverseNames = Object.create(null);\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (hasOwnProperty.call(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar keyword = /^(\\w+)$/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!hasOwnProperty.call(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = Math.round(num).toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","const colorString = require('color-string');\nconst convert = require('color-convert');\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...args) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (args.length > 0) {\n\t\t\treturn new Color(args, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...args) {\n\t\tlet color = args[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(args, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nmodule.exports = Color;\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import { mergeWith } from 'lodash';\nexport const defaultTheme = {\n colors: {\n // 主色序列\n primary: {\n 10: '#f0f5ff',\n 20: '#d6e4ff',\n 30: '#adc6ff',\n 40: '#85a5ff',\n 50: '#597ef7',\n 60: '#2f54eb',\n 70: '#1d39c4',\n 80: '#10239e',\n 90: '#061178',\n 100: '#030852',\n },\n // 灰色序列\n gray: {\n 10: '#f5f5f5',\n 20: '#f0f0f0',\n 30: '#dddddd',\n 40: '#bfbfbf',\n 50: '#8c8c8c',\n 60: '#595959',\n 70: '#434343',\n 80: '#262626',\n 90: '#1f1f1f',\n 100: '#141414',\n },\n // 警告色序列\n error: {\n 10: '#fff2f0',\n 20: '#ffedeb',\n 30: '#ffc8c2',\n 40: '#ffa099',\n 50: '#f7716d',\n 60: '#eb4141',\n 70: '#c42d32',\n 80: '#9e1c25',\n 90: '#78101a',\n 100: '#520A13',\n },\n // 成功色序列\n success: {\n 10: '#e4f2e5',\n 20: '#d3e6d6',\n 30: '#a5d9ae',\n 40: '#7acc8c',\n 50: '#54bfcf',\n 60: '#32b357',\n 70: '#208c42',\n 80: '#126630',\n 90: '#08401e',\n 100: '#031a0c',\n },\n // 警告色序列\n warning: {\n 10: '#fffbe6',\n 20: '#ffeda3',\n 30: '#ffe07a',\n 40: '#ffd152',\n 50: '#ffbf29',\n 60: '#ffa900',\n 70: '#d98900',\n 80: '#b36b00',\n 90: '#8c4f00',\n 100: '#663600',\n },\n // 品牌色\n black: '#000',\n white: '#FFF',\n brand: 'colors.primary.60',\n highlight: 'colors.error.50',\n text: {\n normal: 'colors.gray.90',\n secondary: 'colors.gray.80',\n disabled: 'colors.gray.40',\n title: 'colors.gray.100',\n body: 'colors.gray.80',\n note: 'colors.gray.70',\n placeholder: 'colors.gray.40', // 占位,禁用\n },\n link: {\n link: 'colors.primary.60',\n focus: 'colors.primary.60',\n hover: 'colors.primary.50',\n active: 'colors.primary.70',\n disabled: 'colors.primary.10',\n },\n background: {\n normal: 'colors.gray.10',\n secondary: 'colors.gray.20',\n disabled: 'colors.gray.10',\n },\n line: {\n normal: 'colors.gray.30',\n secondary: 'colors.gray.40',\n disabled: 'colors.gray.30',\n },\n line1: '#f2f3f5',\n line2: '#e5e6eb',\n line3: '#c9cdd4',\n line4: '#86909c',\n fill1: '#f7f8fa',\n fill2: '#f2f3f5',\n fill3: '#e5e6eb',\n fill4: '#c9cdd4',\n fill5: '#4e5969',\n text1: '#1d2129',\n text2: '#4e5969',\n text3: '#86909c',\n text4: '#c9cdd4',\n text5: '#ffffff',\n },\n space: {\n s: '4px',\n m: '8px',\n l: '12px',\n xl: '16px',\n xxl: '20px',\n },\n fontSizes: {\n note: '12px',\n body: '12px',\n subtitle: '14px',\n title: '16px',\n subheader: '20px',\n header: '24px',\n },\n borders: {\n solid: '1px solid',\n dashed: '1px dashed',\n },\n radii: {\n s: '2px',\n m: '4px',\n l: '8px',\n xl: '12px',\n xxl: '24px',\n },\n shadows: {\n lowUp: '0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03)',\n lowDown: '0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03)',\n lowLeft: '-6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03)',\n lowRight: '6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03)',\n medianUp: '0px -4px 8px -4px rgba(0,0,0,0.12),0px -8px 16px 0px rgba(0,0,0,0.08),0px -12px 24px 8px rgba(0,0,0,0.04)',\n medianRight: '4px 0px 8px -4px rgba(0,0,0,0.12),8px 0px 16px 0px rgba(0,0,0,0.08),12px 0px 24px 8px rgba(0,0,0,0.04)',\n medianDown: '0px 4px 8px -4px rgba(0,0,0,0.12),0px 8px 16px 0px rgba(0,0,0,0.08),0px 12px 24px 8px rgba(0,0,0,0.04)',\n medianLeft: '-4px 0px 8px -4px rgba(0,0,0,0.12),-8px 0px 16px 0px rgba(0,0,0,0.08),-12px 0px 24px 8px rgba(0,0,0,0.04)',\n highUp: '0px -8px 16px -8px rgba(0,0,0,0.08),0px -12px 24px 12px rgba(0,0,0,0.04),0px -16px 48px 16px rgba(0,0,0,0.02)',\n highRight: '8px 0px 16px -8px rgba(0,0,0,0.08),12px 0px 24px 12px rgba(0,0,0,0.04),16px 0px 48px 16px rgba(0,0,0,0.02)',\n highDown: '0px 8px 16px -8px rgba(0,0,0,0.08),0px 12px 24px 12px rgba(0,0,0,0.04),0px 16px 48px 16px rgba(0,0,0,0.02)',\n highLeft: '-8px 0px 16px -8px rgba(0,0,0,0.08),-12px 0px 24px 12px rgba(0,0,0,0.04),-16px 0px 48px 16px rgba(0,0,0,0.02)',\n },\n};\n/**\n * 修改默认主题\n * @param overrides\n * @param baseTheme\n * @returns\n */\nexport function extendTheme(overrides, baseTheme = defaultTheme) {\n return mergeWith({}, baseTheme, overrides);\n}\n","import { get, hasIn, isNil } from 'lodash';\nimport { defaultTheme } from '../theme';\nexport const DEFAULT_PREFIX = '--coral';\nconst hexRegex = /^#[a-fA-F0-9]{3,6}$/;\nconst rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/;\nconst rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nfunction parseToRGB(color) {\n if (color.match(hexRegex)) {\n return {\n red: parseInt(`${color[1]}${color[2]}`, 16),\n green: parseInt(`${color[3]}${color[4]}`, 16),\n blue: parseInt(`${color[5]}${color[6]}`, 16),\n };\n }\n throw new Error('color is not a valid hex value');\n}\n/**\n * background: ${rgba('#ffffff', 0.4)};\n * @param hexColor\n * @param alpha\n */\nexport function rgba(hexColor, alpha) {\n if (!hexColor) {\n return;\n }\n const rgbValue = parseToRGB(hexColor);\n return `rgba(${rgbValue.red},${rgbValue.green},${rgbValue.blue},${alpha})`;\n}\nconst THEME_TOKEN_PATTERN = /^(colors|fontSizes|lineHeights|borders|radii|shadows|space|sizes|zIndices|components)./;\nconst CSS_FUNCTION_PATTERN = /^[a-z]+(-[a-z]*)?\\(.+\\)$/;\n/**\n * 是否为有效的 token path\n * @param token\n */\nexport function isValidTokenPath(token) {\n if (token && THEME_TOKEN_PATTERN.test(token)) {\n return true;\n }\n return false;\n}\nconst tokenPathToVariable = (token, prefix) => {\n return `var(${prefix}-${token.split('.').join('-')})`;\n};\nfunction tokenGetterFactory(scale, getter) {\n return (token, prefix = DEFAULT_PREFIX) => {\n if (isNil(token)) {\n return;\n }\n if (getter && typeof getter === 'function') {\n const temp = getter(token);\n if (!isNil(temp)) {\n return temp;\n }\n }\n if (typeof token === 'number') {\n return token;\n }\n // 优先检查符合 tokenPath 规范,符合规范的直接转换,不检查有效性\n if (isValidTokenPath(token)) {\n return tokenPathToVariable(token, prefix);\n }\n // 再检查是不是 css function,如果是,直接返回\n if (CSS_FUNCTION_PATTERN.test(token)) {\n return token;\n }\n // 最后尝试加入 scale 在 theme 中寻找\n if (scale) {\n const themedToken = [scale, token].join('.');\n // TODO: 暂不支持解析到扩展 theme token,最好的做法是放到 ThemeProvider 里通过 context 找\n if (hasIn(defaultTheme, themedToken)) {\n return tokenPathToVariable(themedToken, prefix);\n }\n }\n // 不符合条件的直接返回\n return token;\n };\n}\n/**\n * 获取对应的 css variable token\n */\nexport const getToken = tokenGetterFactory();\n/**\n * color token to css variables\n */\nexport const colors = tokenGetterFactory('colors', (token) => {\n if (hexRegex.test(token) || rgbRegex.test(token) || rgbaRegex.test(token)) {\n return token;\n }\n return;\n});\nexport const borders = tokenGetterFactory('borders', (token) => {\n if (Number(token) === 0) {\n return 0;\n }\n if (token.split(' ').length > 1) {\n return token;\n }\n return;\n});\nexport const shadows = tokenGetterFactory('shadows', (token) => {\n if (token && token.split(' ').length > 4) {\n return token;\n }\n return;\n});\n/**\n * 正则:匹配是否为有效的单位数值\n * @example\n * 22px, 22.2%, 33vw, 44vh\n */\nconst SIZE_UNIT_VALUE = /^\\d+(\\.\\d+)?(px|vw|vh|%)$/;\nconst sizeGetter = (token) => {\n if (typeof token === 'number') {\n return `${token}px`;\n }\n if (typeof token === 'string' && SIZE_UNIT_VALUE.test(token)) {\n return token;\n }\n return;\n};\nexport const sizes = tokenGetterFactory('sizes', sizeGetter);\nexport const space = tokenGetterFactory('space', sizeGetter);\nexport const radii = tokenGetterFactory('radii', sizeGetter);\nexport const fontSizes = tokenGetterFactory('fontSizes', sizeGetter);\nexport const lineHeights = tokenGetterFactory('lineHeights', (token) => {\n if (typeof token === 'number') {\n return token;\n }\n if (typeof token === 'string' && SIZE_UNIT_VALUE.test(token)) {\n return token;\n }\n return;\n});\n/**\n * 获取 value 的真实值\n * @param token\n * @param themeObject\n */\nexport function getTokenValue(token, themeObject = {}) {\n let val = token;\n while (isValidTokenPath(val)) {\n val = get(themeObject, val);\n }\n return val;\n}\n","import { assign } from 'lodash';\nimport { getToken, sizes, space, radii, fontSizes, lineHeights, colors, shadows, borders, DEFAULT_PREFIX, } from '../helpers';\nconst getRawValue = (value) => value;\nconst getValueMap = {\n colors,\n fontSizes,\n lineHeights,\n space,\n sizes,\n borders,\n radii,\n shadows,\n zIndices: getToken,\n};\nexport const system = (args) => {\n const config = {};\n const keys = Object.keys(args);\n for (const key of keys) {\n const conf = args[key];\n if (conf === true) {\n config[key] = createStyleFunction({\n property: key,\n getValue: getRawValue,\n });\n }\n else {\n // conf is a object\n config[key] = createStyleFunction(conf);\n }\n }\n const parser = createParser(config);\n return parser;\n};\nexport const compose = (...parsers) => {\n const config = {};\n for (const parser of parsers) {\n if (!parser || !parser.config) {\n continue;\n }\n assign(config, parser.config);\n }\n const parser = createParser(config);\n return parser;\n};\nfunction createParser(config) {\n const parse = (props) => {\n var _a;\n const styles = {};\n const prefix = props.prefix || ((_a = props.theme) === null || _a === void 0 ? void 0 : _a.prefix) || DEFAULT_PREFIX;\n for (const key in props) {\n if (key === 'theme')\n continue;\n if (key === 'prefix')\n continue;\n if (!config[key])\n continue;\n const sx = config[key];\n const raw = props[key];\n // const scale = sx.scale;\n // TODO: raw is object\n // TODO: raw is responsive object\n assign(styles, sx(raw, prefix));\n }\n return styles;\n };\n parse.config = config;\n parse.propNames = Object.keys(config);\n return parse;\n}\nfunction createStyleFunction({ properties: propertiesProp, property, scale, getValue: getValueProp, }) {\n const properties = propertiesProp || [property];\n const getValue = getValueProp || getValueMap[scale] || getRawValue;\n const sx = (value, prefix) => {\n const result = {};\n const n = getValue(value, prefix);\n if (n === null) {\n return;\n }\n properties.forEach((prop) => {\n result[prop] = n;\n });\n return result;\n };\n sx.scale = scale;\n return sx;\n}\n","import { system } from './core';\nconst config = {\n display: true,\n overflow: true,\n overflowX: true,\n overflowY: true,\n verticalAlign: true,\n width: {\n property: 'width',\n scale: 'sizes',\n },\n height: {\n property: 'height',\n scale: 'sizes',\n },\n minWidth: {\n property: 'minWidth',\n scale: 'sizes',\n },\n minHeight: {\n property: 'minHeight',\n scale: 'sizes',\n },\n maxWidth: {\n property: 'maxWidth',\n scale: 'sizes',\n },\n maxHeight: {\n property: 'maxHeight',\n scale: 'sizes',\n },\n size: {\n properties: ['width', 'height'],\n scale: 'sizes',\n },\n};\nexport const layout = system(config);\n","import { system } from './core';\nconst config = {\n fontFamily: true,\n fontStyle: true,\n letterSpacing: true,\n textAlign: true,\n fontSize: {\n property: 'fontSize',\n scale: 'fontSizes',\n },\n fontWeight: {\n property: 'fontWeight',\n scale: 'fontWeights',\n },\n lineHeight: {\n property: 'lineHeight',\n scale: 'lineHeights',\n },\n};\nexport const typography = system(config);\n","import { system } from './core';\nconst config = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: true,\n columnGap: {\n property: 'columnGap',\n scale: 'space',\n },\n rowGap: {\n property: 'rowGap',\n scale: 'space',\n },\n gap: {\n property: 'gap',\n scale: 'space',\n },\n // item\n flex: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: true,\n justifySelf: true,\n alignSelf: true,\n order: true,\n};\nexport const flexbox = system(config);\n","import { system } from './core';\nconst config = {\n gridGap: {\n property: 'gridGap',\n scale: 'space',\n },\n gridColumnGap: {\n property: 'gridColumnGap',\n scale: 'space',\n },\n gridRowGap: {\n property: 'gridRowGap',\n scale: 'space',\n },\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridAutoRows: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridRowSpan: true,\n};\nexport const grid = system(config);\n","import { system } from './core';\nconst config = {\n position: true,\n zIndex: {\n property: 'zIndex',\n scale: 'zIndices',\n },\n top: {\n property: 'top',\n scale: 'space',\n },\n right: {\n property: 'right',\n scale: 'space',\n },\n bottom: {\n property: 'bottom',\n scale: 'space',\n },\n left: {\n property: 'left',\n scale: 'space',\n },\n};\nexport const position = system(config);\n","import { system } from './core';\nconst config = {\n color: {\n property: 'color',\n scale: 'colors',\n },\n backgroundColor: {\n property: 'backgroundColor',\n scale: 'colors',\n },\n background: {\n property: 'background',\n scale: 'colors',\n },\n backgroundImage: true,\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n opacity: true,\n};\nconfig.bg = config.background;\nconfig.bgImage = config.backgroundImage;\nconfig.bgSize = config.backgroundSize;\nconfig.bgPosition = config.backgroundPosition;\nconfig.bgRepeat = config.backgroundRepeat;\nconfig.bgAttachment = config.backgroundAttachment;\nexport const color = system(config);\n","import { system } from './core';\nconst config = {\n borderStyle: true,\n borderTopStyle: true,\n borderRightStyle: true,\n borderBottomStyle: true,\n borderLeftStyle: true,\n border: {\n property: 'border',\n scale: 'borders',\n },\n borderWidth: {\n property: 'borderWidth',\n scale: 'sizes',\n },\n borderColor: {\n property: 'borderColor',\n scale: 'colors',\n },\n borderRadius: {\n property: 'borderRadius',\n scale: 'radii',\n },\n borderTop: {\n property: 'borderTop',\n scale: 'borders',\n },\n borderTopLeftRadius: {\n property: 'borderTopLeftRadius',\n scale: 'radii',\n },\n borderTopRightRadius: {\n property: 'borderTopRightRadius',\n scale: 'radii',\n },\n borderRight: {\n property: 'borderRight',\n scale: 'borders',\n },\n borderBottom: {\n property: 'borderBottom',\n scale: 'borders',\n },\n borderBottomLeftRadius: {\n property: 'borderBottomLeftRadius',\n scale: 'radii',\n },\n borderBottomRightRadius: {\n property: 'borderBottomRightRadius',\n scale: 'radii',\n },\n borderLeft: {\n property: 'borderLeft',\n scale: 'borders',\n },\n borderX: {\n properties: ['borderLeft', 'borderRight'],\n scale: 'borders',\n },\n borderY: {\n properties: ['borderTop', 'borderBottom'],\n scale: 'borders',\n },\n borderTopWidth: {\n property: 'borderTopWidth',\n scale: 'sizes',\n },\n borderTopColor: {\n property: 'borderTopColor',\n scale: 'colors',\n },\n borderBottomWidth: {\n property: 'borderBottomWidth',\n scale: 'sizes',\n },\n borderBottomColor: {\n property: 'borderBottomColor',\n scale: 'colors',\n },\n borderLeftWidth: {\n property: 'borderLeftWidth',\n scale: 'sizes',\n },\n borderLeftColor: {\n property: 'borderLeftColor',\n scale: 'colors',\n },\n borderRightWidth: {\n property: 'borderRightWidth',\n scale: 'sizes',\n },\n borderRightColor: {\n property: 'borderRightColor',\n scale: 'colors',\n },\n};\nexport const border = system(config);\n","import { system } from './core';\nconst configs = {\n margin: {\n property: 'margin',\n scale: 'space',\n },\n marginTop: {\n property: 'marginTop',\n scale: 'space',\n },\n marginRight: {\n property: 'marginRight',\n scale: 'space',\n },\n marginBottom: {\n property: 'marginBottom',\n scale: 'space',\n },\n marginLeft: {\n property: 'marginLeft',\n scale: 'space',\n },\n marginX: {\n properties: ['marginLeft', 'marginRight'],\n scale: 'space',\n },\n marginY: {\n properties: ['marginTop', 'marginBottom'],\n scale: 'space',\n },\n padding: {\n property: 'padding',\n scale: 'space',\n },\n paddingTop: {\n property: 'paddingTop',\n scale: 'space',\n },\n paddingRight: {\n property: 'paddingRight',\n scale: 'space',\n },\n paddingBottom: {\n property: 'paddingBottom',\n scale: 'space',\n },\n paddingLeft: {\n property: 'paddingLeft',\n scale: 'space',\n },\n paddingX: {\n properties: ['paddingLeft', 'paddingRight'],\n scale: 'space',\n },\n paddingY: {\n properties: ['paddingTop', 'paddingBottom'],\n scale: 'space',\n },\n};\nconfigs.m = configs.margin;\nconfigs.mt = configs.marginTop;\nconfigs.mr = configs.marginRight;\nconfigs.mb = configs.marginBottom;\nconfigs.ml = configs.marginLeft;\nconfigs.mx = configs.marginX;\nconfigs.my = configs.marginY;\nconfigs.p = configs.padding;\nconfigs.pt = configs.paddingTop;\nconfigs.pr = configs.paddingRight;\nconfigs.pb = configs.paddingBottom;\nconfigs.pl = configs.paddingLeft;\nconfigs.px = configs.paddingX;\nconfigs.py = configs.paddingY;\nexport const space = system(configs);\n","import { system } from './core';\nconst config = {\n boxShadow: {\n property: 'boxShadow',\n scale: 'shadows',\n },\n textShadow: {\n property: 'textShadow',\n scale: 'shadows',\n },\n};\nexport const shadow = system(config);\n","import { system } from './core';\nexport const base = system({\n // visible: {\n // property: 'visibility',\n // scale: 'base',\n // getValue: (val: boolean) => (!!val ? 'visible' : 'hidden'),\n // },\n visibility: true,\n whiteSpace: true,\n userSelect: true,\n pointerEvents: true,\n overflowWrap: true,\n textOverflow: true,\n cursor: true,\n outline: true,\n});\n","import memoize from '@emotion/memoize';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { compose } from './core';\nimport { layout } from './layout';\nimport { typography } from './typography';\nimport { flexbox } from './flexbox';\nimport { grid } from './grid';\nimport { position } from './position';\nimport { color } from './color';\nimport { border } from './border';\nimport { space } from './space';\nimport { shadow } from './shadows';\nimport { base } from './base';\nconst createShouldForwardProp = (props) => {\n const regex = new RegExp(`^(${props.join('|')})$`);\n return memoize((prop) => isPropValid(prop) && !regex.test(prop));\n};\nexport const cssProps = (props) => {\n if (Array.isArray(props.css)) {\n return props.css.join('');\n }\n return props.css;\n};\n// 基础属性\nconst common = {\n config: {\n prefix: true,\n theme: true,\n },\n};\nexport const allStyledProps = compose(common, base, layout, typography, flexbox, grid, position, color, border, space, shadow);\nexport const textStyledProps = compose(common, base, typography, color);\nexport const allStyledPropNames = allStyledProps.propNames;\nexport const shouldForwardProp = createShouldForwardProp(allStyledPropNames);\nexport * from './core';\nexport * from './base';\nexport * from './layout';\nexport * from './typography';\nexport * from './flexbox';\nexport * from './grid';\nexport * from './position';\nexport * from './color';\nexport * from './border';\nexport * from './space';\nexport * from './shadows';\n","import styled from 'styled-components';\nimport { shouldForwardProp, cssProps, allStyledProps } from './core';\n/**\n * 创建一个 System Component\n * @param component HTML 标签\n * @param initCss 初始化的 CSS 样式\n * @param options 自定义选项\n * @returns react component\n */\nexport function coral(component, initCss, options) {\n const attrs = typeof (options === null || options === void 0 ? void 0 : options.attrs) === 'function' ? options === null || options === void 0 ? void 0 : options.attrs : () => options === null || options === void 0 ? void 0 : options.attrs;\n const shouldForward = (options === null || options === void 0 ? void 0 : options.shouldForwardProp) || shouldForwardProp;\n return styled(component)\n .attrs((props) => ({\n prefix: props.prefix || (options === null || options === void 0 ? void 0 : options.prefix),\n ...attrs(props),\n }))\n .withConfig({\n shouldForwardProp: shouldForward,\n }) `\n ${initCss}\n ${allStyledProps}\n ${cssProps}\n `;\n}\n","import { coral } from '../coral';\nexport const Box = coral('div');\nexport const Button = coral('button');\nexport const Center = coral('div', undefined, {\n attrs: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n","import { createGlobalStyle } from 'styled-components';\nexport const CssVariables = createGlobalStyle `\n :root {\n ${(props) => props.variables.map((item) => item.join(':')).join(';')}\n }\n`;\n","import React, { createContext, useContext, useMemo } from 'react';\nimport { ThemeProvider } from 'styled-components';\nimport { assign } from 'lodash';\nimport { defaultTheme } from '../theme';\nimport { getTokenValue, isValidTokenPath, getToken, DEFAULT_PREFIX } from '../helpers';\nimport { CssVariables } from './global-styles';\nconst SystemContext = createContext({\n prefix: DEFAULT_PREFIX,\n theme: defaultTheme,\n});\nexport const useSystem = () => useContext(SystemContext);\nexport const useTheme = () => {\n const { theme } = useSystem();\n const getValue = (path) => getTokenValue(path);\n return {\n theme,\n getValue,\n };\n};\n/**\n * 获取 css variable 的根节点,例如 --tango-colors-brand 返回 --tango\n * @param str\n * @returns\n */\nconst getRootPrefix = (str) => {\n const input = str.startsWith('--') ? str.slice(2) : str;\n return ['--', input.split('-')[0]].join('');\n};\nfunction themeToVariables(obj, prefix) {\n let paths = [];\n Object.keys(obj).forEach((key) => {\n const keypath = prefix ? [prefix, key].join('-') : key;\n if (typeof obj[key] === 'string') {\n let val = obj[key];\n if (isValidTokenPath(val)) {\n const rootPrefix = getRootPrefix(prefix);\n val = getToken(val, rootPrefix);\n }\n paths.push([keypath, val]);\n }\n else {\n paths = paths.concat(themeToVariables(obj[key], keypath));\n }\n });\n return paths;\n}\nexport function SystemProvider({ prefix = DEFAULT_PREFIX, theme = defaultTheme, children }) {\n const context = useMemo(() => ({ theme, prefix }), [theme, prefix]);\n const variables = useMemo(() => themeToVariables(theme, prefix), [theme, prefix]);\n const mergedTheme = useMemo(() => assign({}, theme, { prefix }), [theme, prefix]);\n return (React.createElement(SystemContext.Provider, { value: context },\n React.createElement(ThemeProvider, { theme: mergedTheme },\n React.createElement(CssVariables, { variables: variables }),\n children)));\n}\n","import React from 'react';\nexport function forwardRef(component) {\n return React.forwardRef(component);\n}\n","import React from 'react';\nimport { css } from 'styled-components';\nimport { Box } from './box';\nimport { space, toPercent, toNumber } from '../helpers';\nimport { useSystem } from '../provider';\nimport { forwardRef } from '../forward-ref';\nconst FlexStyle = css `\n & > *:not(style) ~ *:not(style) {\n margin-top: ${(props) => props.flexDirection === 'column' && props['data-gap']};\n margin-left: ${(props) => props.flexDirection === 'row' && props['data-gap']};\n margin-bottom: ${(props) => props.flexDirection === 'column-reverse' && props['data-gap']};\n margin-right: ${(props) => props.flexDirection === 'row-reverse' && props['data-gap']};\n }\n`;\nexport const Flex = forwardRef((props, ref) => {\n const { direction = 'row', spacing, align, justify, wrap, flex, basis, grow, shrink, css, ...rest } = props;\n const { prefix } = useSystem();\n const gap = space(spacing, prefix);\n return (React.createElement(Box, { ref: ref, display: \"flex\", flexDirection: direction, alignItems: align, justifyContent: justify, flexWrap: wrap, flexBasis: basis, flexGrow: grow, flexShrink: shrink, css: [FlexStyle, css], \"data-gap\": gap, ...rest }));\n});\n// TODO: 待定\nconst COLS_TOTAL = 12;\nconst getWidth = (span) => {\n if (span === 'auto') {\n return span;\n }\n return toPercent(toNumber(span) / COLS_TOTAL);\n};\nexport const FlexItem = forwardRef((props, ref) => {\n const { span, flex: flexProp, ...rest } = props;\n const width = span ? getWidth(span) : undefined;\n const flex = width ? '0 0 auto' : '1 0 0%';\n return React.createElement(Box, { ref: ref, width: width, flex: flexProp || flex, ...rest });\n});\n","export function isNumber(value) {\n return typeof value === 'number';\n}\nexport function toNumber(value) {\n if (typeof value === 'number') {\n return value;\n }\n const num = parseFloat(value);\n return isNaN(num) ? 0 : num;\n}\nexport function toPercent(value) {\n return `${value * 100}%`;\n}\n","import React from 'react';\nimport { Box } from './box';\nimport { isNumber, space } from '../helpers';\nimport { useSystem } from '../provider';\nimport { forwardRef } from '../forward-ref';\nexport const Grid = forwardRef((props, ref) => {\n const { columns, spacingX, spacingY, spacing, minChildWidth, templateColumns: templateColumnsProp, templateRows, area, templateArea, ...rest } = props;\n const { prefix } = useSystem();\n const templateColumns = minChildWidth ? widthToColumns(minChildWidth) : countToColumns(columns);\n return (React.createElement(Box, { display: \"grid\", gridGap: space(spacing, prefix), gridColumnGap: space(spacingX, prefix), gridRowGap: space(spacingY, prefix), gridTemplateColumns: templateColumnsProp || templateColumns, gridTemplateRows: templateRows, gridArea: area, gridTemplateAreas: templateArea, ref: ref, ...rest }));\n});\nexport const GridItem = forwardRef((props, ref) => {\n const { colSpan = 'auto', colStart, colEnd, rowEnd, rowSpan = 'auto', rowStart, ...rest } = props;\n return (React.createElement(Box, { ref: ref, gridColumn: toSpan(colSpan), gridColumnStart: colStart, gridColumnEnd: colEnd, gridRow: toSpan(rowSpan), gridRowStart: rowStart, gridRowEnd: rowEnd, ...rest }));\n});\nfunction toSpan(span) {\n return span === 'auto' ? 'auto' : `span ${span}/span ${span}`;\n}\nfunction toPx(n) {\n return isNumber(n) ? `${n}px` : n;\n}\nfunction widthToColumns(width) {\n return `repeat(auto-fit, minmax(${toPx(width)}, 1fr))`;\n}\nfunction countToColumns(count) {\n return `repeat(${count}, 1fr)`;\n}\n","import { css } from 'styled-components';\nimport { coral } from '../coral';\nconst truncatedStyle = css `\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\nconst textClampStyle = css `\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ${(props) => props.$lineClamp};\n`;\nconst textStyle = css `\n ${(props) => props.$lineClamp > 0 && textClampStyle};\n ${(props) => props.$truncated && truncatedStyle};\n`;\nexport const Text = coral('span', textStyle, {\n attrs: (props) => ({\n textAlign: props.align,\n $truncated: props.truncated,\n $lineClamp: props.lineClamp,\n }),\n});\n","import React from 'react';\nimport { css } from 'styled-components';\nimport { coral } from '../coral';\nimport { forwardRef } from '../forward-ref';\nimport { useSystem } from '../provider';\nimport { colors } from '../helpers';\nconst linkStyle = css `\n text-decoration: none;\n color: ${(props) => props.$linkColor};\n\n &:hover {\n color: ${(props) => props.$hoverColor};\n text-decoration: underline;\n }\n\n &:active {\n color: ${(props) => props.$activeColor};\n }\n`;\nconst A = coral('a', linkStyle);\nexport const Link = forwardRef(({ isExternal, ...rest }, ref) => {\n const { prefix } = useSystem();\n const pass = {\n $linkColor: colors('link.link', prefix),\n $hoverColor: colors('link.hover', prefix),\n $activeColor: colors('link.active', prefix),\n };\n return React.createElement(A, { target: isExternal ? '_blank' : undefined, ...rest, ...pass, ref: ref });\n});\n","import React from 'react';\nimport { css } from 'styled-components';\nimport { space } from '../helpers';\nimport { Box } from './box';\nimport { useSystem } from '../provider';\nimport { forwardRef } from '../forward-ref';\nconst attachedStyle = css `\n > *:first-child:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n > *:last-child:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n > *:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n\n > *:not(:last-child) {\n margin-right: -1px;\n }\n`;\nconst normalStyle = css `\n > *:not(:last-child) {\n margin-right: ${(props) => props['data-gapx']};\n margin-bottom: ${(props) => props['data-gapy']};\n }\n`;\nexport const Group = forwardRef((props, ref) => {\n const { block, attached, spacingX = 'm', spacingY = 0, css, children, ...rest } = props;\n const { prefix } = useSystem();\n return (React.createElement(Box, { ref: ref, role: \"group\", display: block ? 'block' : 'inline-block', css: [attached ? attachedStyle : normalStyle, css], \"data-gapx\": space(spacingX, prefix), \"data-gapy\": space(spacingY, prefix), ...rest }, children));\n});\n","/**\r\n * CSS-JSON Converter for JavaScript\r\n * Converts CSS to JSON and back.\r\n * Version 2.1\r\n *\r\n * Released under the MIT license.\r\n *\r\n * Copyright (c) 2013 Aram Kocharyan, http://aramk.com/\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\r\n documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation\r\n the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and\r\n to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be included in all copies or substantial portions\r\n of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r\n THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n THE SOFTWARE.\r\n */\r\n\r\n\r\n/*******************************************************************************\r\n * UMD pattern for exporting module\r\n */\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node. Does not work with strict CommonJS, but\r\n // only CommonJS-like environments that support module.exports,\r\n // like Node.\r\n module.exports = factory();\r\n } else {\r\n // Browser globals (root is window)\r\n root.CSSJSON = factory();\r\n }\r\n}(this, function () {\r\n\r\n var CSSJSON = new function () {\r\n\r\n var base = this;\r\n\r\n base.init = function () {\r\n // String functions\r\n String.prototype.trim = function () {\r\n return this.replace(/^\\s+|\\s+$/g, '');\r\n };\r\n\r\n String.prototype.repeat = function (n) {\r\n return new Array(1 + n).join(this);\r\n };\r\n };\r\n base.init();\r\n\r\n var selX = /([^\\s\\;\\{\\}][^\\;\\{\\}]*)\\{/g;\r\n var endX = /\\}/g;\r\n var lineX = /([^\\;\\{\\}]*)\\;/g;\r\n var commentX = /\\/\\*[\\s\\S]*?\\*\\//g;\r\n var lineAttrX = /([^\\:]+):([^\\;]*);/;\r\n\r\n // This is used, a concatenation of all above. We use alternation to\r\n // capture.\r\n var altX = /(\\/\\*[\\s\\S]*?\\*\\/)|([^\\s\\;\\{\\}][^\\;\\{\\}]*(?=\\{))|(\\})|([^\\;\\{\\}]+\\;(?!\\s*\\*\\/))/gmi;\r\n\r\n // Capture groups\r\n var capComment = 1;\r\n var capSelector = 2;\r\n var capEnd = 3;\r\n var capAttr = 4;\r\n\r\n var isEmpty = function (x) {\r\n return typeof x == 'undefined' || x.length == 0 || x == null;\r\n };\r\n\r\n /**\r\n * Input is css string and current pos, returns JSON object\r\n *\r\n * @param cssString\r\n * The CSS string.\r\n * @param args\r\n * An optional argument object. ordered: Whether order of\r\n * comments and other nodes should be kept in the output. This\r\n * will return an object where all the keys are numbers and the\r\n * values are objects containing \"name\" and \"value\" keys for each\r\n * node. comments: Whether to capture comments. split: Whether to\r\n * split each comma separated list of selectors.\r\n */\r\n base.toJSON = function (cssString, args) {\r\n var node = {\r\n children: {},\r\n attributes: {}\r\n };\r\n var match = null;\r\n var count = 0;\r\n\r\n if (typeof args == 'undefined') {\r\n var args = {\r\n ordered: false,\r\n comments: false,\r\n stripComments: false,\r\n split: false\r\n };\r\n }\r\n if (args.stripComments) {\r\n args.comments = false;\r\n cssString = cssString.replace(commentX, '');\r\n }\r\n\r\n while ((match = altX.exec(cssString)) != null) {\r\n if (!isEmpty(match[capComment]) && args.comments) {\r\n // Comment\r\n var add = match[capComment].trim();\r\n node[count++] = add;\r\n } else if (!isEmpty(match[capSelector])) {\r\n // New node, we recurse\r\n var name = match[capSelector].trim();\r\n // This will return when we encounter a closing brace\r\n var newNode = base.toJSON(cssString, args);\r\n if (args.ordered) {\r\n var obj = {};\r\n obj['name'] = name;\r\n obj['value'] = newNode;\r\n // Since we must use key as index to keep order and not\r\n // name, this will differentiate between a Rule Node and an\r\n // Attribute, since both contain a name and value pair.\r\n obj['type'] = 'rule';\r\n node[count++] = obj;\r\n } else {\r\n if (args.split) {\r\n var bits = name.split(',');\r\n } else {\r\n var bits = [name];\r\n }\r\n for (i in bits) {\r\n var sel = bits[i].trim();\r\n if (sel in node.children) {\r\n for (var att in newNode.attributes) {\r\n node.children[sel].attributes[att] = newNode.attributes[att];\r\n }\r\n } else {\r\n node.children[sel] = newNode;\r\n }\r\n }\r\n }\r\n } else if (!isEmpty(match[capEnd])) {\r\n // Node has finished\r\n return node;\r\n } else if (!isEmpty(match[capAttr])) {\r\n var line = match[capAttr].trim();\r\n var attr = lineAttrX.exec(line);\r\n if (attr) {\r\n // Attribute\r\n var name = attr[1].trim();\r\n var value = attr[2].trim();\r\n if (args.ordered) {\r\n var obj = {};\r\n obj['name'] = name;\r\n obj['value'] = value;\r\n obj['type'] = 'attr';\r\n node[count++] = obj;\r\n } else {\r\n if (name in node.attributes) {\r\n var currVal = node.attributes[name];\r\n if (!(currVal instanceof Array)) {\r\n node.attributes[name] = [currVal];\r\n }\r\n node.attributes[name].push(value);\r\n } else {\r\n node.attributes[name] = value;\r\n }\r\n }\r\n } else {\r\n // Semicolon terminated line\r\n node[count++] = line;\r\n }\r\n }\r\n }\r\n\r\n return node;\r\n };\r\n\r\n /**\r\n * @param node\r\n * A JSON node.\r\n * @param depth\r\n * The depth of the current node; used for indentation and\r\n * optional.\r\n * @param breaks\r\n * Whether to add line breaks in the output.\r\n */\r\n base.toCSS = function (node, depth, breaks) {\r\n var cssString = '';\r\n if (typeof depth == 'undefined') {\r\n depth = 0;\r\n }\r\n if (typeof breaks == 'undefined') {\r\n breaks = false;\r\n }\r\n if (node.attributes) {\r\n for (i in node.attributes) {\r\n var att = node.attributes[i];\r\n if (att instanceof Array) {\r\n for (var j = 0; j < att.length; j++) {\r\n cssString += strAttr(i, att[j], depth);\r\n }\r\n } else {\r\n cssString += strAttr(i, att, depth);\r\n }\r\n }\r\n }\r\n if (node.children) {\r\n var first = true;\r\n for (i in node.children) {\r\n if (breaks && !first) {\r\n cssString += '\\n';\r\n } else {\r\n first = false;\r\n }\r\n cssString += strNode(i, node.children[i], depth);\r\n }\r\n }\r\n return cssString;\r\n };\r\n\r\n // Helpers\r\n\r\n var strAttr = function (name, value, depth) {\r\n return '\\t'.repeat(depth) + name + ': ' + value + ';\\n';\r\n };\r\n\r\n var strNode = function (name, value, depth) {\r\n var cssString = '\\t'.repeat(depth) + name + ' {\\n';\r\n cssString += base.toCSS(value, depth + 1);\r\n cssString += '\\t'.repeat(depth) + '}\\n';\r\n return cssString;\r\n };\r\n\r\n };\r\n\r\n return CSSJSON;\r\n}));\r\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","'use strict';\nmodule.exports = require('./globals.json');\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell\n// License: MIT. (See LICENSE.)\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n})\n\n// This regex comes from regex.coffee, and is inserted here by generate-index.js\n// (run `npm run build`).\nexports.default = /((['\"])(?:(?!\\2|\\\\).|\\\\(?:\\r\\n|[\\s\\S]))*(\\2)?|`(?:[^`\\\\$]|\\\\[\\s\\S]|\\$(?!\\{)|\\$\\{(?:[^{}]|\\{[^}]*\\}?)*\\}?)*(`)?)|(\\/\\/.*)|(\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?)|(\\/(?!\\*)(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\]\\\\]).|\\\\.)+\\/(?:(?!\\s*(?:\\b|[\\u0080-\\uFFFF$\\\\'\"~({]|[+\\-!](?!=)|\\.?\\d))|[gmiyus]{1,6}\\b(?![\\u0080-\\uFFFF$\\\\]|\\s*(?:[+\\-*%&|^<>!=?({]|\\/(?![\\/*])))))|(0[xX][\\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][+-]?\\d+)?)|((?!\\d)(?:(?!\\s)[$\\w\\u0080-\\uFFFF]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+)|(--|\\+\\+|&&|\\|\\||=>|\\.{3}|(?:[+\\-\\/%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\\](){}])|(\\s+)|(^$|[\\s\\S])/g\n\nexports.matchToToken = function(match) {\n var token = {type: \"invalid\", value: match[0], closed: undefined}\n if (match[ 1]) token.type = \"string\" , token.closed = !!(match[3] || match[4])\n else if (match[ 5]) token.type = \"comment\"\n else if (match[ 6]) token.type = \"comment\", token.closed = !!match[7]\n else if (match[ 8]) token.type = \"regex\"\n else if (match[ 9]) token.type = \"number\"\n else if (match[10]) token.type = \"name\"\n else if (match[11]) token.type = \"punctuator\"\n else if (match[12]) token.type = \"whitespace\"\n return token\n}\n","'use strict';\n\nconst object = {};\nconst hasOwnProperty = object.hasOwnProperty;\nconst forOwn = (object, callback) => {\n\tfor (const key in object) {\n\t\tif (hasOwnProperty.call(object, key)) {\n\t\t\tcallback(key, object[key]);\n\t\t}\n\t}\n};\n\nconst extend = (destination, source) => {\n\tif (!source) {\n\t\treturn destination;\n\t}\n\tforOwn(source, (key, value) => {\n\t\tdestination[key] = value;\n\t});\n\treturn destination;\n};\n\nconst forEach = (array, callback) => {\n\tconst length = array.length;\n\tlet index = -1;\n\twhile (++index < length) {\n\t\tcallback(array[index]);\n\t}\n};\n\nconst toString = object.toString;\nconst isArray = Array.isArray;\nconst isBuffer = Buffer.isBuffer;\nconst isObject = (value) => {\n\t// This is a very simple check, but it’s good enough for what we need.\n\treturn toString.call(value) == '[object Object]';\n};\nconst isString = (value) => {\n\treturn typeof value == 'string' ||\n\t\ttoString.call(value) == '[object String]';\n};\nconst isNumber = (value) => {\n\treturn typeof value == 'number' ||\n\t\ttoString.call(value) == '[object Number]';\n};\nconst isFunction = (value) => {\n\treturn typeof value == 'function';\n};\nconst isMap = (value) => {\n\treturn toString.call(value) == '[object Map]';\n};\nconst isSet = (value) => {\n\treturn toString.call(value) == '[object Set]';\n};\n\n/*--------------------------------------------------------------------------*/\n\n// https://mathiasbynens.be/notes/javascript-escapes#single\nconst singleEscapes = {\n\t'\"': '\\\\\"',\n\t'\\'': '\\\\\\'',\n\t'\\\\': '\\\\\\\\',\n\t'\\b': '\\\\b',\n\t'\\f': '\\\\f',\n\t'\\n': '\\\\n',\n\t'\\r': '\\\\r',\n\t'\\t': '\\\\t'\n\t// `\\v` is omitted intentionally, because in IE < 9, '\\v' == 'v'.\n\t// '\\v': '\\\\x0B'\n};\nconst regexSingleEscape = /[\"'\\\\\\b\\f\\n\\r\\t]/;\n\nconst regexDigit = /[0-9]/;\nconst regexWhitelist = /[ !#-&\\(-\\[\\]-_a-~]/;\n\nconst jsesc = (argument, options) => {\n\tconst increaseIndentation = () => {\n\t\toldIndent = indent;\n\t\t++options.indentLevel;\n\t\tindent = options.indent.repeat(options.indentLevel)\n\t};\n\t// Handle options\n\tconst defaults = {\n\t\t'escapeEverything': false,\n\t\t'minimal': false,\n\t\t'isScriptContext': false,\n\t\t'quotes': 'single',\n\t\t'wrap': false,\n\t\t'es6': false,\n\t\t'json': false,\n\t\t'compact': true,\n\t\t'lowercaseHex': false,\n\t\t'numbers': 'decimal',\n\t\t'indent': '\\t',\n\t\t'indentLevel': 0,\n\t\t'__inline1__': false,\n\t\t'__inline2__': false\n\t};\n\tconst json = options && options.json;\n\tif (json) {\n\t\tdefaults.quotes = 'double';\n\t\tdefaults.wrap = true;\n\t}\n\toptions = extend(defaults, options);\n\tif (\n\t\toptions.quotes != 'single' &&\n\t\toptions.quotes != 'double' &&\n\t\toptions.quotes != 'backtick'\n\t) {\n\t\toptions.quotes = 'single';\n\t}\n\tconst quote = options.quotes == 'double' ?\n\t\t'\"' :\n\t\t(options.quotes == 'backtick' ?\n\t\t\t'`' :\n\t\t\t'\\''\n\t\t);\n\tconst compact = options.compact;\n\tconst lowercaseHex = options.lowercaseHex;\n\tlet indent = options.indent.repeat(options.indentLevel);\n\tlet oldIndent = '';\n\tconst inline1 = options.__inline1__;\n\tconst inline2 = options.__inline2__;\n\tconst newLine = compact ? '' : '\\n';\n\tlet result;\n\tlet isEmpty = true;\n\tconst useBinNumbers = options.numbers == 'binary';\n\tconst useOctNumbers = options.numbers == 'octal';\n\tconst useDecNumbers = options.numbers == 'decimal';\n\tconst useHexNumbers = options.numbers == 'hexadecimal';\n\n\tif (json && argument && isFunction(argument.toJSON)) {\n\t\targument = argument.toJSON();\n\t}\n\n\tif (!isString(argument)) {\n\t\tif (isMap(argument)) {\n\t\t\tif (argument.size == 0) {\n\t\t\t\treturn 'new Map()';\n\t\t\t}\n\t\t\tif (!compact) {\n\t\t\t\toptions.__inline1__ = true;\n\t\t\t\toptions.__inline2__ = false;\n\t\t\t}\n\t\t\treturn 'new Map(' + jsesc(Array.from(argument), options) + ')';\n\t\t}\n\t\tif (isSet(argument)) {\n\t\t\tif (argument.size == 0) {\n\t\t\t\treturn 'new Set()';\n\t\t\t}\n\t\t\treturn 'new Set(' + jsesc(Array.from(argument), options) + ')';\n\t\t}\n\t\tif (isBuffer(argument)) {\n\t\t\tif (argument.length == 0) {\n\t\t\t\treturn 'Buffer.from([])';\n\t\t\t}\n\t\t\treturn 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';\n\t\t}\n\t\tif (isArray(argument)) {\n\t\t\tresult = [];\n\t\t\toptions.wrap = true;\n\t\t\tif (inline1) {\n\t\t\t\toptions.__inline1__ = false;\n\t\t\t\toptions.__inline2__ = true;\n\t\t\t}\n\t\t\tif (!inline2) {\n\t\t\t\tincreaseIndentation();\n\t\t\t}\n\t\t\tforEach(argument, (value) => {\n\t\t\t\tisEmpty = false;\n\t\t\t\tif (inline2) {\n\t\t\t\t\toptions.__inline2__ = false;\n\t\t\t\t}\n\t\t\t\tresult.push(\n\t\t\t\t\t(compact || inline2 ? '' : indent) +\n\t\t\t\t\tjsesc(value, options)\n\t\t\t\t);\n\t\t\t});\n\t\t\tif (isEmpty) {\n\t\t\t\treturn '[]';\n\t\t\t}\n\t\t\tif (inline2) {\n\t\t\t\treturn '[' + result.join(', ') + ']';\n\t\t\t}\n\t\t\treturn '[' + newLine + result.join(',' + newLine) + newLine +\n\t\t\t\t(compact ? '' : oldIndent) + ']';\n\t\t} else if (isNumber(argument)) {\n\t\t\tif (json) {\n\t\t\t\t// Some number values (e.g. `Infinity`) cannot be represented in JSON.\n\t\t\t\treturn JSON.stringify(argument);\n\t\t\t}\n\t\t\tif (useDecNumbers) {\n\t\t\t\treturn String(argument);\n\t\t\t}\n\t\t\tif (useHexNumbers) {\n\t\t\t\tlet hexadecimal = argument.toString(16);\n\t\t\t\tif (!lowercaseHex) {\n\t\t\t\t\thexadecimal = hexadecimal.toUpperCase();\n\t\t\t\t}\n\t\t\t\treturn '0x' + hexadecimal;\n\t\t\t}\n\t\t\tif (useBinNumbers) {\n\t\t\t\treturn '0b' + argument.toString(2);\n\t\t\t}\n\t\t\tif (useOctNumbers) {\n\t\t\t\treturn '0o' + argument.toString(8);\n\t\t\t}\n\t\t} else if (!isObject(argument)) {\n\t\t\tif (json) {\n\t\t\t\t// For some values (e.g. `undefined`, `function` objects),\n\t\t\t\t// `JSON.stringify(value)` returns `undefined` (which isn’t valid\n\t\t\t\t// JSON) instead of `'null'`.\n\t\t\t\treturn JSON.stringify(argument) || 'null';\n\t\t\t}\n\t\t\treturn String(argument);\n\t\t} else { // it’s an object\n\t\t\tresult = [];\n\t\t\toptions.wrap = true;\n\t\t\tincreaseIndentation();\n\t\t\tforOwn(argument, (key, value) => {\n\t\t\t\tisEmpty = false;\n\t\t\t\tresult.push(\n\t\t\t\t\t(compact ? '' : indent) +\n\t\t\t\t\tjsesc(key, options) + ':' +\n\t\t\t\t\t(compact ? '' : ' ') +\n\t\t\t\t\tjsesc(value, options)\n\t\t\t\t);\n\t\t\t});\n\t\t\tif (isEmpty) {\n\t\t\t\treturn '{}';\n\t\t\t}\n\t\t\treturn '{' + newLine + result.join(',' + newLine) + newLine +\n\t\t\t\t(compact ? '' : oldIndent) + '}';\n\t\t}\n\t}\n\n\tconst string = argument;\n\t// Loop over each code unit in the string and escape it\n\tlet index = -1;\n\tconst length = string.length;\n\tresult = '';\n\twhile (++index < length) {\n\t\tconst character = string.charAt(index);\n\t\tif (options.es6) {\n\t\t\tconst first = string.charCodeAt(index);\n\t\t\tif ( // check if it’s the start of a surrogate pair\n\t\t\t\tfirst >= 0xD800 && first <= 0xDBFF && // high surrogate\n\t\t\t\tlength > index + 1 // there is a next code unit\n\t\t\t) {\n\t\t\t\tconst second = string.charCodeAt(index + 1);\n\t\t\t\tif (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate\n\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\tconst codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\t\t\t\t\tlet hexadecimal = codePoint.toString(16);\n\t\t\t\t\tif (!lowercaseHex) {\n\t\t\t\t\t\thexadecimal = hexadecimal.toUpperCase();\n\t\t\t\t\t}\n\t\t\t\t\tresult += '\\\\u{' + hexadecimal + '}';\n\t\t\t\t\t++index;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!options.escapeEverything) {\n\t\t\tif (regexWhitelist.test(character)) {\n\t\t\t\t// It’s a printable ASCII character that is not `\"`, `'` or `\\`,\n\t\t\t\t// so don’t escape it.\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character == '\"') {\n\t\t\t\tresult += quote == character ? '\\\\\"' : character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character == '`') {\n\t\t\t\tresult += quote == character ? '\\\\`' : character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character == '\\'') {\n\t\t\t\tresult += quote == character ? '\\\\\\'' : character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\tcharacter == '\\0' &&\n\t\t\t!json &&\n\t\t\t!regexDigit.test(string.charAt(index + 1))\n\t\t) {\n\t\t\tresult += '\\\\0';\n\t\t\tcontinue;\n\t\t}\n\t\tif (regexSingleEscape.test(character)) {\n\t\t\t// no need for a `hasOwnProperty` check here\n\t\t\tresult += singleEscapes[character];\n\t\t\tcontinue;\n\t\t}\n\t\tconst charCode = character.charCodeAt(0);\n\t\tif (options.minimal && charCode != 0x2028 && charCode != 0x2029) {\n\t\t\tresult += character;\n\t\t\tcontinue;\n\t\t}\n\t\tlet hexadecimal = charCode.toString(16);\n\t\tif (!lowercaseHex) {\n\t\t\thexadecimal = hexadecimal.toUpperCase();\n\t\t}\n\t\tconst longhand = hexadecimal.length > 2 || json;\n\t\tconst escaped = '\\\\' + (longhand ? 'u' : 'x') +\n\t\t\t('0000' + hexadecimal).slice(longhand ? -4 : -2);\n\t\tresult += escaped;\n\t\tcontinue;\n\t}\n\tif (options.wrap) {\n\t\tresult = quote + result + quote;\n\t}\n\tif (quote == '`') {\n\t\tresult = result.replace(/\\$\\{/g, '\\\\\\$\\{');\n\t}\n\tif (options.isScriptContext) {\n\t\t// https://mathiasbynens.be/notes/etago\n\t\treturn result\n\t\t\t.replace(/<\\/(script|style)/gi, '<\\\\/$1')\n\t\t\t.replace(/ Date.now\n * @param node\n * @returns\n */\nfunction getNameByMemberExpression(node) {\n let objectName;\n let propertyName;\n if (t.isIdentifier(node.object) || t.isJSXIdentifier(node.object)) {\n objectName = node.object.name;\n }\n if (t.isIdentifier(node.property) || t.isJSXIdentifier(node.property)) {\n propertyName = node.property.name;\n }\n if (t.isMemberExpression(node.object) || t.isJSXMemberExpression(node.object)) {\n objectName = getNameByMemberExpression(node.object);\n }\n if (t.isMemberExpression(node.property) || t.isJSXMemberExpression(node.property)) {\n propertyName = getNameByMemberExpression(node.property);\n }\n return `${objectName}.${propertyName}`;\n}\n/**\n * 将 的 jsxAttributeName 或 objectPropertyKey 转换为 js value\n * @param node jsxAttributeName or objectPropertyKey\n * @returns simple js value\n */\nexport function keyNode2value(node) {\n if (!node) {\n logger.error('invalid property key', node);\n return;\n }\n let ret;\n switch (node.type) {\n case 'Identifier':\n case 'JSXIdentifier':\n ret = node.name;\n break;\n case 'StringLiteral':\n ret = `\"${node.value}\"`;\n break;\n case 'NumericLiteral':\n ret = node.value;\n break;\n case 'MemberExpression':\n ret = getNameByMemberExpression(node);\n break;\n case 'JSXMemberExpression':\n ret = getNameByMemberExpression(node);\n break;\n default:\n logger.error('unknown property key', node);\n break;\n }\n return ret;\n}\n/**\n * 将 t.Node 生成为字符串代码\n * @param node\n * @returns\n */\nexport function node2code(node) {\n let ret = '';\n switch (node.type) {\n case 'StringLiteral':\n case 'NumericLiteral':\n ret = node.extra.raw;\n break;\n case 'BooleanLiteral':\n ret = `${node.value}`;\n break;\n case 'NullLiteral':\n ret = 'null';\n break;\n default:\n ret = expression2code(node);\n break;\n }\n return ret;\n}\n/**\n * 将 t.Node 生成为 js 值\n * @param node ast node\n * @param hasExpressionWrapper 是否包裹表达式\n * @returns a plain javascript value\n */\nexport function node2value(node, hasExpressionWrapper = true) {\n let ret;\n switch (node.type) {\n case 'StringLiteral':\n case 'NumericLiteral':\n case 'BooleanLiteral': {\n ret = node.value;\n break;\n }\n case 'NullLiteral':\n ret = null;\n break;\n case 'Identifier': // {data}\n case 'MemberExpression': // {this.props.data}\n case 'OptionalMemberExpression': // {a?.b}\n case 'UnaryExpression': // {!false}\n case 'ArrowFunctionExpression': // {() => {}}\n case 'TemplateLiteral': // {`hello ${text}`}\n case 'ConditionalExpression': // {a ? 'foo' : 'bar'}\n case 'LogicalExpression': // { a || b}\n case 'BinaryExpression': // { a + b}\n case 'TaggedTemplateExpression': // {css``}\n case 'CallExpression': // {[1,2,3].map(fn)}\n case 'JSXElement': // {hello}\n case 'JSXFragment': // <>\n ret = expression2code(node);\n if (hasExpressionWrapper) {\n ret = `{${ret}}`;\n }\n break;\n case 'ObjectExpression': {\n ret = node.properties.reduce((prev, propertyNode) => {\n if (propertyNode.type === 'ObjectProperty') {\n const key = keyNode2value(propertyNode.key);\n const value = node2value(propertyNode.value, hasExpressionWrapper);\n // key 可能是字符串,也可能是数字\n prev[key] = value;\n }\n // FIXME: property is a SpreadElement\n return prev;\n }, {});\n break;\n }\n case 'ArrayExpression': {\n ret = node.elements.map((elementNode) => node2value(elementNode, hasExpressionWrapper));\n break;\n }\n default:\n logger.error('unknown ast node:', node);\n break;\n }\n return ret;\n}\n/**\n * jsx 属性值节点转为 js value\n */\nexport function jsxAttributeValueNode2value(node) {\n // e.g. 此时没有 value node\n if (!node) {\n return true;\n }\n let ret;\n switch (node.type) {\n case 'JSXExpressionContainer':\n // \n // \n // \n // \n // \n ret = jsxAttributeValueNode2value(node.expression);\n break;\n default:\n ret = node2value(node);\n break;\n }\n return ret;\n}\n","import { isValidExpressionCode } from './ast';\nconst defineServiceHandlerNames = ['defineServices', 'createServices'];\nconst sfHandlerPattern = new RegExp(`^(${defineServiceHandlerNames.join('|')})$`);\n/**\n * 判断给定的函数名是否是 defineServices\n * @param name\n * @returns\n */\nexport function isDefineService(name) {\n return sfHandlerPattern.test(name);\n}\nconst defineStoreHandlerName = 'defineStore';\n/**\n * 判断给定的函数名是否是 defineStore\n * @param name\n * @returns\n */\nexport function isDefineStore(name) {\n return defineStoreHandlerName === name;\n}\n/**\n * 是否是 tango 的变量引用\n * @example tango.stores.app.name\n * @example tango.stores?.app?.name\n *\n * @param name\n * @returns\n */\nexport function isTangoVariable(name) {\n return /^tango\\??\\.(stores|services)\\??\\./.test(name) && name.split('.').length > 2;\n}\nconst templatePattern = /^{(.+)}$/s;\n/**\n * 判断给定字符串是否被表达式容器`{expCode}`包裹\n * @param code\n */\nexport function isWrappedByExpressionContainer(code, isStrict = true) {\n if (isStrict && isValidExpressionCode(code)) {\n return false;\n }\n return templatePattern.test(code);\n}\n","/**\n * code to ast\n */\nimport { parse, parseExpression } from '@babel/parser';\nimport * as t from '@babel/types';\nimport { logger, isValidObjectString, getVariableContent, isPlainObject, } from '@music163/tango-helpers';\nimport { isWrappedByExpressionContainer } from '../assert';\n// @see https://babeljs.io/docs/en/babel-parser#pluginss\nconst babelParserConfig = {\n sourceType: 'module',\n plugins: [\n 'jsx',\n 'doExpressions',\n 'objectRestSpread',\n 'decorators-legacy',\n 'classProperties',\n 'asyncGenerators',\n 'functionBind',\n 'dynamicImport',\n 'optionalChaining',\n ],\n};\n/**\n * 检测代码是否是合法的代码\n * @param code\n * @returns true 为合法代码,false 为非法代码\n */\nexport function isValidCode(code) {\n try {\n parse(code, babelParserConfig);\n }\n catch (err) {\n return false;\n }\n return true;\n}\n/**\n * 检测代码是否是合法的表达式代码\n * 表达式是一组代码的集合,它返回一个值;每一个合法的表达式都能计算成某个值\n * 只要你输入这段代码,可以形成一个值,就算是表达式\n * @example x = 1; // 1\n * @example 1=1\n * @example 'hello'\n * @example { foo: 'bar' }\n * @param code\n * @returns\n */\nexport function isValidExpressionCode(code) {\n try {\n parseExpression(code, babelParserConfig);\n }\n catch (err) {\n return false;\n }\n return true;\n}\n/**\n * 将源代码解析为一棵完整的 ast 树 t.File\n * @param code\n * @returns\n */\nexport function code2ast(code) {\n try {\n return parse(code, babelParserConfig);\n }\n catch (err) {\n logger.error('[code2ast failed!]', err);\n }\n}\n/**\n * 将代码片段解析为 ast 节点\n * @example \n * @example { foo: 'foo' }\n * @example [{ foo: 'bar' }]\n * @example () => {}\n * @param code 输入字符串\n * @returns\n */\nexport function code2expression(code) {\n if (!code) {\n return;\n }\n if (code.endsWith(';')) {\n code = code.slice(0, -1);\n }\n let expNode;\n try {\n expNode = t.cloneNode(parseExpression(code, babelParserConfig), false, true);\n }\n catch (err) {\n logger.error('invalid code', err);\n // expNode = t.identifier('undefined');\n }\n return expNode;\n}\n/**\n * 表达式代码片段转为 ast 树\n * @param code\n * @returns File\n */\nexport function expressionCode2ast(code) {\n if (isWrappedByExpressionContainer(code)) {\n code = getVariableContent(code);\n }\n const node = code2expression(code);\n return t.file(t.program([t.blockStatement([t.expressionStatement(node)])]));\n}\n/**\n * 将 js 值解析为 t.Node\n * @param value\n * @returns\n */\nexport function value2node(value) {\n let ret;\n switch (typeof value) {\n case 'number':\n ret = t.numericLiteral(value);\n break;\n case 'string':\n if (isWrappedByExpressionContainer(value)) {\n // 再检查是否是表达式容器,例如 {this.foo}, {1}\n const innerString = getVariableContent(value);\n ret = code2expression(innerString);\n }\n else {\n ret = t.stringLiteral(value);\n }\n break;\n case 'boolean':\n ret = t.booleanLiteral(value);\n break;\n case 'function':\n ret = code2expression(String(value));\n break;\n case 'object': {\n if (value === null) {\n ret = t.nullLiteral();\n }\n else if (isPlainObject(value)) {\n ret = object2node(value);\n }\n else if (Array.isArray(value)) {\n ret = t.arrayExpression(value.map((val) => value2node(val)));\n }\n else {\n ret = t.identifier('undefined');\n logger.error('value2node: not support value!', ret);\n }\n break;\n }\n case 'undefined':\n ret = t.identifier('undefined');\n break;\n default: {\n logger.error(`value2node: unsupport value <${value}>`);\n break;\n }\n }\n return ret;\n}\n/**\n * 将 js 普通对象解析为 t.Node\n */\nexport function object2node(obj, getValueNode = value2node) {\n if (!isPlainObject(obj)) {\n return value2node(obj);\n }\n return t.objectExpression(Object.keys(obj).map((key) => {\n const valNode = getValueNode(obj[key], key);\n return t.objectProperty(t.identifier(key), valNode);\n }));\n}\nexport function code2jsxAttributeValueNode(code) {\n return t.jsxExpressionContainer(code2expression(code));\n}\nexport function value2jsxAttributeValueNode(value) {\n let ret;\n switch (typeof value) {\n // FIXME: 重构这个逻辑,是不是统一当成 code 处理\n case 'string': {\n if (value.length > 1) {\n value = value.trim();\n }\n if (isValidObjectString(value)) {\n // 先检查是否是对象字符串\n ret = t.jsxExpressionContainer(code2expression(value));\n }\n else if (isWrappedByExpressionContainer(value)) {\n // 再检查是否是表达式容器,例如 {this.foo}, {1}\n const innerString = getVariableContent(value);\n ret = t.jsxExpressionContainer(code2expression(innerString));\n }\n else {\n ret = t.stringLiteral(value);\n }\n break;\n }\n default:\n ret = t.jsxExpressionContainer(value2node(value));\n break;\n }\n return ret;\n}\nexport function value2jsxChildrenValueNode(value) {\n let ret;\n switch (typeof value) {\n case 'string':\n if (isWrappedByExpressionContainer(value)) {\n const innerString = getVariableContent(value);\n ret = t.jsxExpressionContainer(code2expression(innerString));\n }\n else {\n ret = t.jsxText(value);\n }\n break;\n case 'number':\n ret = t.jsxText(String(value));\n break;\n case 'object':\n // value 为 JSXElement[]的情况下直接return\n return value;\n default:\n break;\n }\n return ret ? [ret] : [];\n}\n/**\n * 给定具体的 value 值,生成 JSXAttribute\n * @param name 属性名\n * @param value 属性值代码\n * @returns\n */\nexport function makeJSXAttribute(name, value) {\n return t.jsxAttribute(t.jsxIdentifier(name), value2jsxAttributeValueNode(value));\n}\nexport function makeJSXAttributes(props) {\n return Object.keys(props).map((key) => makeJSXAttribute(key, props[key]));\n}\n/**\n * 给定具体的 value 代码,生成 JSXAttribute\n * @param name 属性名\n * @param valueCode 属性值代码\n * @returns\n */\nexport function makeJSXAttributeByCode(name, valueCode) {\n return t.jsxAttribute(t.jsxIdentifier(name), code2jsxAttributeValueNode(valueCode));\n}\n/**\n * 生成 JSXElement\n * @param name\n * @param attributes\n * @param children\n * @param selfClosing\n * @returns\n */\nexport function makeJSXElement(name, attributes, children, selfClosing) {\n return t.jsxElement(t.jsxOpeningElement(t.jsxIdentifier(name), attributes), t.jsxClosingElement(t.jsxIdentifier(name)), children !== null && children !== void 0 ? children : [], selfClosing);\n}\n","/**\n * 访问,遍历,修改 ast tree\n */\nimport * as t from '@babel/types';\nimport traverse from '@babel/traverse';\nimport { isFunction, SLOT, logger, parseDndId, upperCamelCase, } from '@music163/tango-helpers';\nimport { keyNode2value, jsxAttributeValueNode2value, node2value, node2code } from './generate';\nimport { value2jsxAttributeValueNode, value2jsxChildrenValueNode, value2node, makeJSXAttribute, code2expression, object2node, makeJSXAttributes, } from './parse';\nimport { getFullPath, isValidComponentName } from '../string';\nimport { isDefineService, isDefineStore, isTangoVariable } from '../assert';\n/**\n * 将 Node 节点构造为一棵树,并执行树的遍历操作,此操作会修改原始的节点\n * @param node\n * @param options\n * @returns 返回完整的 File AST\n */\nexport function traverseExpressionNode(node, options) {\n const file = t.file(t.program([t.blockStatement([t.expressionStatement(node)])]));\n traverse(file, options);\n return file;\n}\n/**\n * 遍历 jsxElement 的 attributes 集合\n * @param node\n * @param visitCallback\n */\nfunction visitJSXElementAttributes(node, visitCallback) {\n var _a;\n node.openingElement.attributes.forEach((attrNode) => {\n if (isFunction(visitCallback) && attrNode.type === 'JSXAttribute') {\n const name = keyNode2value(attrNode.name);\n const value = jsxAttributeValueNode2value(attrNode.value);\n visitCallback(name, value, attrNode);\n }\n });\n // TIP: 如果 children 节点为简单数据类型,则也作为属性值\n if (node.children.length === 1) {\n const onlyChild = node.children[0];\n let nodeValue;\n if (t.isJSXText(onlyChild)) {\n nodeValue = (_a = onlyChild.value) === null || _a === void 0 ? void 0 : _a.trim();\n }\n else if (t.isJSXExpressionContainer(onlyChild)) {\n nodeValue = jsxAttributeValueNode2value(onlyChild);\n }\n if (nodeValue) {\n visitCallback('children', nodeValue, node.children);\n }\n }\n}\n/**\n * 删除 jsxElement 的目标属性\n * @param node\n * @param attrName\n */\nfunction removeJSXElementAttributeByName(node, attrName) {\n node.openingElement.attributes = node.openingElement.attributes.filter((attrNode) => {\n if (t.isJSXAttribute(attrNode)) {\n const name = keyNode2value(attrNode.name);\n return name !== attrName;\n }\n return true;\n });\n}\n/**\n * 获取 jsx 节点的属性集\n * @param node\n * @returns\n */\nexport function getJSXElementAttributes(node) {\n const ret = {};\n visitJSXElementAttributes(node, (name, value) => {\n ret[name] = value;\n });\n return ret;\n}\n/**\n * 获取 jsx 结点的子元素名字\n * @param node\n * @returns\n */\nexport function getJSXElementChildrenNames(node) {\n const names = new Set();\n traverseExpressionNode(node, {\n JSXElement(path) {\n const name = getJSXElementName(path.node);\n // invalid name\n if (!name) {\n return;\n }\n // html tags, e.g. div, span...\n if (name.toLowerCase() === name) {\n return;\n }\n const parts = name.split('.');\n // 嵌套类型 Button.Group,只取父级\n if (parts.length) {\n names.add(parts[0]);\n }\n },\n });\n return Array.from(names);\n}\n/**\n * 匹配名字叫 targetName 的组件\n * @param ast\n * @param targetName\n * @param callback\n */\nfunction visitJSXElementByName(ast, targetName, callback) {\n const visitors = {\n JSXElement(path) {\n if (getJSXElementName(path.node) === targetName) {\n callback(path.node);\n }\n },\n };\n switch (ast.type) {\n case 'File':\n traverse(ast, visitors);\n break;\n case 'JSXElement':\n traverseExpressionNode(ast, visitors);\n }\n}\n/**\n * 查询所有XFormItem的字段名\n * @param ast 当前文件AST\n * @returns 所有 XFormItem 的字段名\n */\nexport function queryXFormItemFields(ast) {\n const fields = [];\n visitJSXElementByName(ast, 'XFormItem', (node) => {\n const attrs = getJSXElementAttributes(node);\n if (attrs.name && !fields.includes(attrs.name)) {\n fields.push(attrs.name);\n }\n });\n return fields;\n}\n/**\n * 根据 dnd id 判断是否是目标的 JSXElement\n * @param node\n * @param id\n */\nexport function isJSXElementById(node, jsxElementNodeId) {\n let isTargetJSXElement = false;\n visitJSXElementAttributes(node, (name, value) => {\n if (name === SLOT.dnd && value === jsxElementNodeId) {\n isTargetJSXElement = true;\n }\n });\n return isTargetJSXElement;\n}\n/**\n * 在目标 jsx 元素中添加子元素\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n * @returns\n */\nexport function appendChildToJSXElement(ast, targetJSXElementNodeId, newNode, position) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n // 强制变为非闭合标签 & 避免children添加失败\n if (path.node.openingElement.selfClosing) {\n path.node.openingElement.selfClosing = false;\n path.node.closingElement = t.jSXClosingElement(path.node.openingElement.name);\n }\n if (position === 'last') {\n path.node.children.push(newNode);\n }\n else {\n path.node.children.unshift(newNode);\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 在目标 jsx 元素后添加兄弟节点\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n */\nexport function insertSiblingAfterJSXElement(ast, targetJSXElementNodeId, newNode) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n if (path.parentPath.isJSXElement()) {\n path.insertAfter(newNode);\n }\n else if (path.parentPath.isJSXExpressionContainer()) {\n const fragmentNode = t.jsxFragment(t.jsxOpeningFragment(), t.jsxClosingFragment(), [\n t.cloneDeepWithoutLoc(path.node),\n newNode,\n ]);\n path.replaceWith(fragmentNode);\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 在目标 jsx 元素前添加兄弟节点\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n * @returns\n */\nexport function insertSiblingBeforeJSXElement(ast, targetJSXElementNodeId, newNode) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n path.insertBefore(newNode);\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 替换目标 jsx 元素为新的元素\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n * @returns\n */\nexport function replaceJSXElement(ast, targetJSXElementNodeId, newNode) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n path.replaceWith(newNode);\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 删除目标 jsx 元素\n * @param ast\n * @param targetJSXElementNodeId\n */\nexport function removeJSXElement(ast, targetJSXElementNodeId) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n const { parentPath } = path;\n const ancestorPath = path.parentPath.parentPath;\n if (t.isJSXElement(parentPath.node)) {\n path.remove();\n }\n else if (t.isJSXAttribute(ancestorPath.node)) {\n // 如果祖先节点在 jsxAttribute 上,则删除该属性\n ancestorPath.remove();\n }\n else {\n logger.error('removeJSXElement failed', path.node);\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 替换跟结点的子元素\n * @example 例如替换 `return (empty block)` 的子元素\n * @param ast\n * @param nodes\n */\nexport function replaceRootJSXElementChildren(ast, nodes) {\n traverse(ast, {\n JSXElement(path) {\n path.node.children = nodes;\n path.stop();\n },\n });\n return ast;\n}\n/**\n * 新增 JSXElement 的属性节点\n * @param node\n * @param name\n * @param value\n */\nfunction addJSXElementAttribute(node, name, value) {\n if (name === 'children' && node.children) {\n // jsx children 的情况\n node.children = value2jsxChildrenValueNode(value);\n }\n else {\n // basic attributes\n const jsxAttributeNode = t.jsxAttribute(t.jsxIdentifier(name), value2jsxAttributeValueNode(value));\n node.openingElement.attributes.push(jsxAttributeNode);\n }\n return node;\n}\nexport function updateJSXElementAttribute(node, attrName, attrValue) {\n const isUndefinedValue = attrValue === undefined;\n let isExist = false;\n if (isUndefinedValue) {\n // 清空该属性\n removeJSXElementAttributeByName(node, attrName);\n }\n else {\n // 更新该属性\n visitJSXElementAttributes(node, (name, prevValue, jsxAttributeNode) => {\n if (name === attrName) {\n isExist = true;\n // @ts-ignore\n if (t.isJSXAttribute(jsxAttributeNode)) {\n jsxAttributeNode.value = value2jsxAttributeValueNode(attrValue);\n }\n else if (name === 'children') {\n node.children = value2jsxChildrenValueNode(attrValue);\n }\n }\n });\n }\n if (!isExist && !isUndefinedValue) {\n // 添加该属性\n addJSXElementAttribute(node, attrName, attrValue);\n }\n return node;\n}\nexport function updateJSXAttributes(ast, nodeId, config) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, nodeId)) {\n Object.keys(config).forEach((attrName) => {\n updateJSXElementAttribute(path.node, attrName, config[attrName]);\n });\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 从 ast 中找到最后一次 import 的位置的序号\n */\nfunction getLastImportDeclarationIndex(node) {\n let lastImportIndex = 0;\n node.body.forEach((item, index) => {\n if (item.type === 'ImportDeclaration') {\n lastImportIndex = index + 1;\n }\n });\n return lastImportIndex;\n}\n/**\n * 从 ast 中找到最后一次 export 的位置的序号\n */\nfunction getLastExportDeclarationIndex(node) {\n let lastExportIndex = 0;\n node.body.forEach((item, index) => {\n if (item.type === 'ExportNamedDeclaration') {\n lastExportIndex = index + 1;\n }\n });\n return lastExportIndex;\n}\n/**\n * 生成新的 ImportDeclaration\n * @deprecated 使用 makeImportDeclaration2 代替\n * @param importedModule\n * @param importedSourcePath\n * @returns\n */\nexport function makeImportDeclarationLegacy(importedModule) {\n var _a;\n const specifierNodes = ((_a = importedModule.specifiers) === null || _a === void 0 ? void 0 : _a.map((localName) => t.importSpecifier(t.identifier(localName), t.identifier(localName)))) || [];\n let defaultSpecifierNode;\n if (importedModule.defaultSpecifier) {\n defaultSpecifierNode = t.importDefaultSpecifier(t.identifier(importedModule.defaultSpecifier));\n }\n const newSpecifierNodes = [defaultSpecifierNode, ...specifierNodes].filter((spec) => !!spec);\n return t.importDeclaration(newSpecifierNodes, t.stringLiteral(importedModule.sourcePath));\n}\nfunction specifierData2node(data) {\n switch (data.type) {\n case 'ImportDefaultSpecifier':\n return t.importDefaultSpecifier(t.identifier(data.localName));\n case 'ImportSpecifier':\n return t.importSpecifier(t.identifier(data.importedName || data.localName), t.identifier(data.localName));\n case 'ImportNamespaceSpecifier':\n return t.importNamespaceSpecifier(t.identifier(data.localName));\n default:\n return;\n }\n}\nfunction specifierDataList2nodes(specifiers) {\n return specifiers.map((item) => specifierData2node(item)).filter((item) => !!item);\n}\nexport function makeImportDeclaration(source, specifiers) {\n const specifierNodes = specifierDataList2nodes(specifiers);\n return t.importDeclaration(specifierNodes, t.stringLiteral(source));\n}\n/**\n * @deprecated 使用 parseImportDeclaration 代替\n * @param node\n * @returns\n */\nfunction getImportDeclarationData(node) {\n const sourcePath = node2value(node.source);\n let defaultSpecifier;\n const specifiers = [];\n node.specifiers.forEach((specifier) => {\n if (specifier.type === 'ImportDefaultSpecifier') {\n defaultSpecifier = keyNode2value(specifier.local);\n }\n else if (specifier.type === 'ImportSpecifier') {\n specifiers.push(keyNode2value(specifier.local));\n }\n });\n return {\n defaultSpecifier,\n specifiers,\n sourcePath,\n };\n}\n/**\n * 添加新的导入语句\n * @deprecated 使用 addImportDeclaration2 代替\n * @param ast\n * @param importedModule\n * @param importedSourcePath\n * @returns\n */\nexport function addImportDeclarationLegacy(ast, importedModule) {\n traverse(ast, {\n Program(path) {\n const lastIndex = getLastImportDeclarationIndex(path.node);\n const newImportDeclaration = makeImportDeclarationLegacy(importedModule);\n path.node.body.splice(lastIndex, 0, newImportDeclaration);\n path.stop();\n },\n });\n return ast;\n}\nexport function addImportDeclaration(ast, source, specifiers) {\n traverse(ast, {\n Program(path) {\n const lastIndex = getLastImportDeclarationIndex(path.node);\n const newImportDeclaration = makeImportDeclaration(source, specifiers);\n path.node.body.splice(lastIndex, 0, newImportDeclaration);\n path.stop();\n },\n });\n return ast;\n}\n/**\n * 更新已有的导入语句\n * @deprecated 使用 updateImportDeclaration2 代替\n * @param ast\n * @param importedModule\n * @param importedSourcePath\n * @returns\n */\nexport function updateImportDeclarationLegacy(ast, importedModule) {\n traverse(ast, {\n ImportDeclaration(path) {\n const currentSourcePath = node2value(path.node.source);\n if (currentSourcePath === importedModule.sourcePath) {\n const newImportDeclaration = makeImportDeclarationLegacy(importedModule);\n path.replaceWith(newImportDeclaration);\n path.stop(); // 只修改匹配到的第一条\n }\n },\n });\n return ast;\n}\nexport function updateImportDeclaration(ast, source, specifiers) {\n traverse(ast, {\n ImportDeclaration(path) {\n const currentSourcePath = node2value(path.node.source);\n if (currentSourcePath === source) {\n const newImportDeclaration = makeImportDeclaration(source, specifiers);\n path.replaceWith(newImportDeclaration);\n path.stop(); // 只修改匹配到的第一条\n }\n },\n });\n return ast;\n}\n/**\n * 再已有的导入语句中添加新的导入符号\n * @param ast\n * @param source\n * @param newSpecifiers\n * @returns\n */\nexport function insertImportSpecifiers(ast, source, newSpecifiers) {\n traverse(ast, {\n ImportDeclaration(path) {\n const currentSourcePath = node2value(path.node.source);\n if (currentSourcePath === source) {\n const nodes = specifierDataList2nodes(newSpecifiers);\n path.node.specifiers.push(...nodes);\n // 只在匹配到的第一个导入声明语句添加即可,不再重复执行\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 新增类属性\n * @param ast\n * @param classPropertyNode\n * @returns\n */\nexport function addClassProperty(ast, classPropertyNode) {\n traverse(ast, {\n ClassBody(path) {\n path.node.body.push(classPropertyNode);\n path.stop();\n },\n });\n return ast;\n}\n/**\n * 更新类属性\n * @param ast\n * @param targetPropertyName\n * @param propertyValueNode\n * @returns\n */\nexport function updateClassProperty(ast, targetPropertyName, propertyValueNode) {\n traverse(ast, {\n ClassProperty(path) {\n const name = keyNode2value(path.node.key);\n if (name === targetPropertyName) {\n path.node.value = propertyValueNode;\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 在 routes.js 中添加新的路由规则\n * @param ast\n * @param pageName\n * @returns\n */\nexport function addRouteToRouteFile(ast, routePath, importFilePath) {\n if (/.jsx?$/.test(importFilePath)) {\n importFilePath = importFilePath.split('.')[0];\n }\n const component = upperCamelCase(routePath.split('/').join('-'));\n traverse(ast, {\n Program(path) {\n const lastImportIndex = getLastImportDeclarationIndex(path.node);\n path.node.body.splice(lastImportIndex, 0, t.importDeclaration([t.importDefaultSpecifier(t.identifier(component))], t.stringLiteral(importFilePath.replace('/src', '.'))));\n },\n ArrayExpression(path) {\n const newNode = t.objectExpression([\n t.objectProperty(t.identifier('path'), t.stringLiteral(routePath)),\n t.objectProperty(t.identifier('component'), t.identifier(component)),\n t.objectProperty(t.identifier('exact'), t.booleanLiteral(true)),\n ]);\n path.node.elements.push(newNode);\n },\n });\n return ast;\n}\n/**\n * 更新页面路由\n * @param ast\n * @param oldRoutePath\n * @param newRoutePath\n * @returns\n */\nexport function updateRouteToRouteFile(ast, oldRoutePath, newRoutePath) {\n traverse(ast, {\n ObjectExpression(path) {\n path.node.properties.forEach((prop) => {\n if (t.isObjectProperty(prop) &&\n node2value(prop.key, false) === 'path' &&\n node2value(prop.value, false) === oldRoutePath) {\n prop.value = t.stringLiteral(newRoutePath);\n }\n });\n },\n });\n return ast;\n}\nexport function removeRouteFromRouteFile(ast, routePath, importPath) {\n traverse(ast, {\n ArrayExpression(path) {\n path.node.elements = path.node.elements.filter((element) => {\n if (element.type === 'ObjectExpression') {\n const properties = node2value(element);\n if (properties.path === routePath) {\n return false;\n }\n }\n return true;\n });\n },\n ImportDeclaration(path) {\n const sourceValue = node2value(path.node.source);\n if (sourceValue === importPath) {\n path.remove();\n }\n },\n });\n return ast;\n}\nexport function traverseRouteFile(ast) {\n const routes = [];\n const importMap = {};\n traverse(ast, {\n ImportDeclaration(path) {\n const { defaultSpecifier, sourcePath } = getImportDeclarationData(path.node);\n if (defaultSpecifier) {\n importMap[defaultSpecifier] = sourcePath;\n }\n },\n ObjectExpression(path) {\n const { node } = path;\n const route = node2value(node, false);\n routes.push(route);\n },\n });\n routes.forEach((item) => {\n if (item.component && importMap[item.component]) {\n item.importPath = importMap[item.component];\n }\n });\n return routes;\n}\n/**\n * 在 stores/index.js 中添加新的store\n * @param ast\n * @param storeName\n * @returns\n */\nexport function addStoreToEntryFile(ast, storeName) {\n const filepath = `./${storeName}`;\n const component = storeName;\n traverse(ast, {\n Program(path) {\n const lastExportIndex = getLastExportDeclarationIndex(path.node);\n path.node.body.splice(lastExportIndex, 0, t.exportNamedDeclaration(null, [t.exportSpecifier(t.identifier('default'), t.identifier(component))], t.stringLiteral(filepath)));\n },\n });\n return ast;\n}\n/**\n * 在 stores/index.js 中移除一行导出语句\n * @example export { default as app } from \"./app\";\n * @param ast\n * @param storeName\n * @returns\n */\nexport function removeStoreToEntryFile(ast, storeName) {\n traverse(ast, {\n ExportNamedDeclaration(path) {\n var _a;\n const name = keyNode2value((_a = path.node.specifiers) === null || _a === void 0 ? void 0 : _a[0].exported);\n if (name === storeName) {\n path.remove();\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function traverseStoreEntryFile(ast) {\n const stores = [];\n traverse(ast, {\n ExportSpecifier(path) {\n const name = keyNode2value(path.node.exported);\n stores.push(name);\n },\n });\n return stores;\n}\nexport function addStoreState(ast, stateName, initValue) {\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n node.arguments[0].properties.push(t.objectProperty(t.identifier(stateName), code2expression(initValue)));\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function removeStoreState(ast, stateName) {\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n let { properties } = node.arguments[0];\n properties = properties.filter((prop) => {\n if (prop.type === 'SpreadElement') {\n return true;\n }\n const propName = keyNode2value(prop.key);\n return propName !== stateName;\n });\n node.arguments[0].properties = properties;\n }\n },\n });\n return ast;\n}\nexport function updateStoreState(ast, stateName, code) {\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n const { properties } = node.arguments[0];\n for (const prop of properties) {\n if (prop.type === 'SpreadElement') {\n continue;\n }\n const propName = keyNode2value(prop.key);\n if (propName === stateName) {\n // TIP: 仅支持对象属性,方法必须需要写为箭头函数\n if (prop.type === 'ObjectProperty') {\n prop.value = code2expression(code);\n break;\n }\n }\n }\n }\n },\n });\n return ast;\n}\nexport function traverseStoreFile(ast) {\n let namespace;\n const actions = [];\n const states = [];\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n node.arguments[0].properties.forEach((item) => {\n switch (item.type) {\n case 'ObjectMethod': {\n actions.push({\n name: keyNode2value(item.key),\n type: 'method',\n });\n break;\n }\n case 'ObjectProperty': {\n const name = keyNode2value(item.key);\n if (t.isArrowFunctionExpression(item.value)) {\n actions.push({\n name,\n type: 'method',\n code: node2code(item.value),\n });\n }\n else if (t.isFunctionExpression(item.value)) {\n actions.push({\n name,\n type: 'method',\n code: node2code(item.value),\n });\n }\n else {\n states.push({\n name,\n type: 'property',\n code: node2code(item.value),\n });\n }\n break;\n }\n default:\n }\n });\n if (node.arguments[1]) {\n namespace = node2value(node.arguments[1], false);\n }\n path.stop();\n }\n },\n });\n return {\n namespace,\n states,\n actions,\n };\n}\nexport function deleteServiceConfigFromServiceFile(ast, serviceFunctionName) {\n traverse(ast, {\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName)) {\n if (path.node.arguments.length) {\n const configNode = path.node.arguments[0];\n if (t.isObjectExpression(configNode)) {\n const index = configNode.properties.findIndex((property) => {\n if (t.isObjectProperty(property)) {\n return keyNode2value(property.key) === serviceFunctionName;\n }\n return false;\n });\n configNode.properties.splice(index, 1);\n }\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 将服务函数的配置参数转为 ast 节点\n * @param payload\n * @returns\n */\nexport function serviceConfig2Node(payload) {\n return object2node(payload, (value, key) => {\n if (key === 'formatter' && value) {\n return code2expression(value);\n }\n return value2node(value);\n });\n}\nexport function updateServiceConfigToServiceFile(ast, config) {\n traverse(ast, {\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName) && path.node.arguments.length) {\n const configNode = path.node.arguments[0];\n if (t.isObjectExpression(configNode)) {\n const newPropertiesNodeMap = Object.keys(config).reduce((properties, key) => {\n const serviceConfig = config[key];\n const property = t.objectProperty(t.identifier(key), serviceConfig2Node(serviceConfig));\n properties[key] = property;\n return properties;\n }, {});\n Object.keys(newPropertiesNodeMap).forEach((nodeKey) => {\n // 如果已存在, 找到原来的 propertyNode 进行替换\n const targetIndex = configNode.properties.findIndex((propNode) => {\n if (t.isObjectProperty(propNode)) {\n return keyNode2value(propNode.key) === nodeKey;\n }\n return false;\n });\n if (targetIndex !== -1) {\n configNode.properties[targetIndex] = newPropertiesNodeMap[nodeKey];\n }\n else {\n // 不存在,直接塞到最后边\n configNode.properties.push(newPropertiesNodeMap[nodeKey]);\n }\n });\n }\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function updateBaseConfigToServiceFile(ast, config) {\n traverse(ast, {\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName)) {\n switch (path.node.arguments.length) {\n case 1:\n // 没有 baseConfig,直接创建新的参数即可\n path.node.arguments.push(value2node(config));\n break;\n case 2: {\n // 已存在 baseConfig,需要进行参数的合并\n const baseConfigNode = path.node.arguments[1];\n if (t.isObjectExpression(baseConfigNode)) {\n const baseConfig = node2value(baseConfigNode);\n path.node.arguments[1] = value2node(Object.assign(Object.assign({}, baseConfig), config));\n }\n break;\n }\n default:\n break;\n }\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function traverseServiceFile(ast) {\n let services;\n const baseConfig = {\n encryptFetch: false,\n };\n const imports = {};\n traverse(ast, {\n ImportDeclaration(path) {\n const { source, specifiers } = parseImportDeclaration(path.node);\n imports[source] = specifiers;\n },\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName)) {\n if (path.node.arguments.length) {\n services = node2value(path.node.arguments[0], false);\n if (path.node.arguments[1]) {\n const config = node2value(path.node.arguments[1]);\n baseConfig.encryptFetch = !!config.encryptFetch;\n baseConfig.namespace = config.namespace || 'index';\n }\n }\n path.stop();\n }\n },\n });\n return {\n imports,\n services,\n baseConfig,\n };\n}\nfunction getJSXElementName(node) {\n return keyNode2value(node.openingElement.name);\n}\nfunction createJSXElementAttributesFilter(filter) {\n return (node) => {\n const attributes = node.openingElement.attributes.filter((attrNode) => {\n if (t.isJSXAttribute(attrNode)) {\n const attrName = keyNode2value(attrNode.name);\n return filter(attrName, attrNode);\n }\n return true;\n });\n node.openingElement.attributes = attributes;\n return node;\n };\n}\n/**\n * 清楚 JSXElement 的追踪属性\n * @param node\n * @returns\n */\nconst removeTrackingAttributes = createJSXElementAttributesFilter((attrName) => {\n return attrName !== SLOT.dnd;\n});\n/**\n * 从文件中移除所有 JSXElement 的追踪属性\n * @param ast\n * @returns\n */\nfunction clearTrackingData(ast) {\n traverse(ast, {\n JSXElement(path) {\n path.node = removeTrackingAttributes(path.node);\n },\n });\n return ast;\n}\n/**\n * 从 JSXElement 中移除追踪属性\n * @param node\n * @returns\n */\nfunction clearJSXElementTrackingData(node, overrideProps) {\n traverseExpressionNode(node, {\n JSXElement(path) {\n const newNode = createJSXElementAttributesFilter((attrName) => {\n if (attrName === SLOT.dnd) {\n return false;\n }\n if (overrideProps && attrName in overrideProps) {\n return false;\n }\n return true;\n })(path.node);\n if (overrideProps) {\n const overrideAttributes = makeJSXAttributes(overrideProps);\n newNode.openingElement.attributes = [\n ...overrideAttributes,\n ...path.node.openingElement.attributes,\n ];\n }\n path.node = newNode;\n },\n });\n return node;\n}\n/**\n * 清除文件中的无效导入代码\n * @param ast\n * @returns\n */\nexport function removeUnusedImportSpecifiers(ast) {\n traverse(ast, {\n ImportDeclaration(path) {\n const sourceValue = path.node.source.value;\n // e.g. import 'style.less'; import './index.css'\n if (!path.node.specifiers.length && /\\.(css|less|scss|js)$/.test(sourceValue)) {\n return;\n }\n // e.g. import {} from 'pkg';\n if (!path.node.specifiers.length) {\n path.remove();\n return;\n }\n const specifiers = path.node.specifiers.filter((specifier) => {\n const name = keyNode2value(specifier.local);\n const binding = path.scope.getBinding(name);\n return binding === null || binding === void 0 ? void 0 : binding.referenced;\n });\n if (!specifiers.length) {\n path.remove();\n }\n else if (specifiers.length !== path.node.specifiers.length) {\n path.node.specifiers = specifiers;\n }\n },\n });\n return ast;\n}\n/**\n * 克隆一个全新的 JSXElement 节点\n * @param node\n * @returns\n */\nexport function cloneJSXElement(node, overrideProps) {\n let cloned = t.cloneNode(node, true, true);\n cloned = clearJSXElementTrackingData(cloned, overrideProps);\n return cloned;\n}\nexport function traverseViewFile(ast, idGenerator) {\n const imports = {};\n const importedModules = {};\n const nodes = [];\n const cloneAst = t.cloneNode(ast, true, true);\n const cleanAst = clearTrackingData(cloneAst);\n const variables = []; // 使用的 tango 变量\n traverse(ast, {\n ImportDeclaration(path) {\n const { source, specifiers } = parseImportDeclaration(path.node);\n if (imports[source]) {\n // 存在重复的导入语句,合并导入符号列表\n imports[source] = imports[source].concat(specifiers);\n }\n else {\n imports[source] = specifiers;\n }\n // FIXME: 下面的逻辑兼容旧的逻辑,后续需要移除掉\n const declarationData = specifiers.reduce((prev, cur) => {\n switch (cur.type) {\n case 'ImportDefaultSpecifier':\n prev.defaultSpecifier = cur.localName;\n break;\n case 'ImportSpecifier':\n prev.specifiers.push(cur.localName);\n break;\n case 'ImportNamespaceSpecifier':\n prev.specifiers.push(cur.localName);\n break;\n default:\n break;\n }\n return prev;\n }, {\n defaultSpecifier: undefined,\n specifiers: [],\n sourcePath: source,\n });\n const exist = importedModules[source];\n if (!exist) {\n importedModules[source] = declarationData;\n }\n else {\n importedModules[source] = Array.isArray(exist)\n ? exist.concat([declarationData])\n : [exist, declarationData];\n }\n },\n MemberExpression(path) {\n const variable = node2value(path.node, false);\n const parentNode = path.parentPath.node;\n if (!t.isMemberExpression(parentNode) &&\n isTangoVariable(variable) &&\n !variables.includes(variable)) {\n variables.push(variable);\n }\n },\n OptionalMemberExpression(path) {\n const variable = node2value(path.node, false);\n if (isTangoVariable(variable) && !variables.includes(variable)) {\n variables.push(variable);\n }\n },\n JSXElement(path) {\n const attributes = getJSXElementAttributes(path.node);\n // 获取组件的追踪属性\n const trackDnd = attributes[SLOT.dnd];\n // 用户代码中的 id 标记\n const codeId = attributes.tid;\n let { component, id } = parseDndId(trackDnd);\n component = component || getJSXElementName(path.node);\n if (!isValidComponentName(component)) {\n return;\n }\n // 如果没有 ID,生成组件的追踪 ID\n if (!trackDnd) {\n id = idGenerator.generateId(component, codeId).fullId;\n }\n // 在组件属性中添加追踪标记\n if (!attributes[SLOT.dnd]) {\n path.node.openingElement.attributes.unshift(makeJSXAttribute(SLOT.dnd, id));\n }\n // parentId 用于追溯上下游关系\n let parentId;\n let parentCodeId;\n const parentNode = path.findParent((p) => p.isJSXElement());\n if (t.isJSXElement(parentNode === null || parentNode === void 0 ? void 0 : parentNode.node)) {\n const parentAttributes = getJSXElementAttributes(parentNode.node);\n parentId = parentAttributes[SLOT.dnd];\n parentCodeId = parentAttributes.tid;\n }\n nodes.push({\n id,\n codeId,\n parentId,\n parentCodeId,\n component,\n rawNode: path.node,\n });\n },\n });\n return {\n ast,\n cleanAst,\n nodes,\n imports,\n importedModules,\n variables,\n };\n}\nexport function traverseComponentsEntryFile(ast, baseDir) {\n const exportMap = {};\n traverse(ast, {\n ExportNamedDeclaration(path) {\n const node = path.node;\n let source = node2value(node.source);\n if (baseDir) {\n // fix relative source path\n source = getFullPath(baseDir, source);\n }\n node.specifiers.forEach((specifier) => {\n if (t.isExportSpecifier(specifier)) {\n const name = keyNode2value(specifier.exported);\n if (name) {\n exportMap[name] = {\n source,\n exportedName: name,\n };\n }\n }\n });\n },\n });\n return { ast, exportMap };\n}\n/**\n * 解析导入语句\n */\nfunction parseImportDeclaration(node) {\n const source = node2value(node.source);\n const specifiers = [];\n node.specifiers.forEach((specifierNode) => {\n const data = {\n localName: keyNode2value(specifierNode.local),\n type: specifierNode.type,\n };\n if (specifierNode.type === 'ImportSpecifier') {\n data.importedName = keyNode2value(specifierNode.imported);\n }\n specifiers.push(data);\n });\n return {\n source,\n specifiers,\n };\n}\n/**\n * 基本的文件解析过程\n * @param ast\n */\nexport function traverseFile(ast) {\n const imports = {};\n traverse(ast, {\n ImportDeclaration(path) {\n const { source, specifiers } = parseImportDeclaration(path.node);\n imports[source] = specifiers;\n },\n });\n return {\n imports,\n };\n}\n","import { getVariableContent } from '@music163/tango-helpers';\nimport { value2node, expression2code, isValidExpressionCode } from './ast';\nimport { isWrappedByExpressionContainer } from './assert';\n/**\n * 将 js value 转换为代码字符串\n */\nexport function value2code(value) {\n const node = value2node(value);\n const code = expression2code(node);\n return code;\n}\n/**\n * 是否是字符串代码\n * @param code\n * @returns\n */\nfunction isStringCode(code) {\n return /^\".*\"$/.test(code === null || code === void 0 ? void 0 : code.trim());\n}\n/**\n * js value 转为表达式代码\n * @example 1 => 1\n * @example hello => \"hello\"\n * @example { foo: bar } => {{ foo: bar }}\n * @example [1,2,3] => {[1,2,3]}\n *\n * @param val js value\n * @returns 表达式代码\n */\nexport function value2expressionCode(val) {\n if (!val)\n return '';\n let ret;\n switch (typeof val) {\n case 'string': {\n if (isValidExpressionCode(val)) {\n ret = val;\n }\n else if (isWrappedByExpressionContainer(val, false)) {\n ret = getVariableContent(val);\n }\n else if (isStringCode(val)) {\n ret = val;\n }\n else {\n ret = `\"${val}\"`;\n }\n break;\n }\n case 'number':\n ret = String(val);\n break;\n case 'object':\n ret = value2code(val);\n break;\n default:\n ret = '';\n break;\n }\n return ret;\n}\n","import { isNil, logger, uuid, } from '@music163/tango-helpers';\nimport { getRelativePath, isFilepath } from './string';\nimport { code2expression } from './ast';\nimport { isWrappedByExpressionContainer } from './assert';\nexport function prototype2importDeclarationData(prototype, relativeFilepath) {\n let source = prototype.package;\n if (relativeFilepath && isFilepath(source)) {\n source = getRelativePath(relativeFilepath, source);\n }\n if (source.endsWith('.js')) {\n source = source.slice(0, -3);\n }\n const specifiers = [];\n if (prototype.exportType === 'defaultExport') {\n specifiers.push({\n localName: prototype.name,\n type: 'ImportDefaultSpecifier',\n });\n }\n else {\n [prototype.name, ...(prototype.relatedImports || [])].forEach((item) => {\n specifiers.push({\n localName: item,\n type: 'ImportSpecifier',\n });\n });\n }\n return {\n source,\n specifiers,\n };\n}\n/**\n * 根据组件的 prototype 生成 ImportDeclarationPayload\n * @deprecated\n */\nexport function getImportDeclarationPayloadByPrototype(prototype, relativeFilepath) {\n let defaultSpecifier;\n let specifiers;\n if (prototype.exportType === 'defaultExport') {\n defaultSpecifier = prototype.name;\n specifiers = prototype.relatedImports || [];\n }\n else {\n specifiers = [...(prototype.relatedImports || [])];\n if (prototype.type !== 'snippet') {\n specifiers.push(prototype.name);\n }\n }\n let sourcePath = prototype.package;\n if (relativeFilepath && isFilepath(sourcePath)) {\n sourcePath = getRelativePath(relativeFilepath, sourcePath);\n }\n if (sourcePath.endsWith('.js')) {\n sourcePath = sourcePath.slice(0, -3);\n }\n return {\n defaultSpecifier,\n specifiers,\n sourcePath,\n };\n}\n/**\n * 基于 key-value 生成 prop={value} 字符串\n * @param key\n * @param value\n * @returns\n */\nfunction getPropKeyValuePair(item, generateValue) {\n const key = item.name;\n let value = item.initValue;\n if (!value && item.autoInitValue) {\n value = generateValue(3);\n }\n if (isNil(value)) {\n return;\n }\n switch (typeof value) {\n case 'number':\n case 'boolean': {\n value = `{${value}}`;\n break;\n }\n case 'object': {\n // TIP: bugfix 如果 object 里有 jsx 或者 function 会失败\n try {\n value = `{${JSON.stringify(value)}}`;\n }\n catch (err) {\n logger.error(err);\n }\n break;\n }\n case 'function': {\n value = `{${value.toString()}}`;\n break;\n }\n case 'string': {\n if (!isWrappedByExpressionContainer(value)) {\n // 不是变量字符串\n value = `\"${value}\"`;\n }\n else {\n // 如果是变量字符串,无需处理\n }\n break;\n }\n default:\n break;\n }\n return `${key}=${value}`;\n}\n/**\n * Button prototype -> \n *\n * @param prototype\n * @param extraProps\n */\nexport function prototype2code(prototype, extraProps) {\n let code;\n switch (prototype.type) {\n case 'snippet':\n code = prototype.initChildren || prototype.defaultChildren;\n break;\n default: {\n const propList = extraProps\n ? Object.keys(extraProps).map((key) => ({\n name: key,\n initValue: extraProps[key],\n }))\n : [];\n // merge extraProps to props\n const props = [...prototype.props, ...propList];\n const keys = props.reduce((acc, item) => {\n const pair = getPropKeyValuePair(item, (fractionDigits) => uuid(prototype.name, fractionDigits));\n return pair ? ` ${acc} ${pair}` : acc;\n }, '') || '';\n if (prototype.hasChildren) {\n code = `<${prototype.name} ${keys}>${prototype.initChildren || prototype.defaultChildren || ''}`;\n }\n else {\n code = `<${prototype.name} ${keys.trim()} />`;\n }\n break;\n }\n }\n return code;\n}\n/**\n * 基于 prototype 信息生成 t.JSXElement\n * @example ButtonPrototype -> -> t.JSXElement\n *\n * @param prototype 组件的配置信息\n * @param props 额外的属性集\n */\nexport function prototype2jsxElement(prototype, props) {\n const code = prototype2code(prototype, props);\n return code2expression(code);\n}\n","import { camelCase } from '@music163/tango-helpers';\n/**\n * ID 生成器\n */\nexport class IdGenerator {\n constructor(options) {\n /**\n * 记录组件 ID 记录\n */\n this.map = new Map();\n this.prefix = (options === null || options === void 0 ? void 0 : options.prefix) ? encodeURIComponent(options.prefix) : undefined;\n }\n /**\n * 更新组件记录\n * @param component\n */\n setItem(component, id) {\n if (this.map.has(component)) {\n const record = this.map.get(component);\n if (id && !record.includes(id)) {\n record.push(id);\n }\n this.map.set(component, record);\n }\n else {\n const value = id ? [id] : [];\n this.map.set(component, value);\n }\n }\n /**\n * 获取组件 ID\n * @param component 组件名, 如 Button, DatePicker\n * @param codeId 用户自定义的 ID\n * @returns\n */\n generateId(component, codeId) {\n var _a;\n // FIXME: 使用 size 这里可能存在冲突的风险\n const size = ((_a = this.map.get(component)) === null || _a === void 0 ? void 0 : _a.length) + 1 || 1;\n const id = codeId || `${camelCase(component)}${size}`;\n this.setItem(component, id);\n let fullId = `${component}:${id}`;\n if (this.prefix) {\n fullId = `${this.prefix}:${fullId}`;\n }\n return { id, fullId };\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nexport var DropMethod;\n(function (DropMethod) {\n DropMethod[\"ReplaceNode\"] = \"replaceNode\";\n DropMethod[\"InsertBefore\"] = \"insertBefore\";\n DropMethod[\"InsertAfter\"] = \"insertAfter\";\n DropMethod[\"InsertChild\"] = \"insertChild\";\n DropMethod[\"InsertFirstChild\"] = \"insertFirstChild\";\n})(DropMethod || (DropMethod = {}));\n/**\n * 放置目标类\n */\nexport class DropTarget {\n get node() {\n return this.workspace.getNode(this.data.id, this.data.filename);\n }\n /**\n * 获取对应的 prototype\n */\n get prototype() {\n var _a, _b;\n return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.name) ? this.workspace.getPrototype((_b = this.data) === null || _b === void 0 ? void 0 : _b.name) : null;\n }\n get id() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.id;\n }\n get bounding() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.bounding;\n }\n get display() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.display;\n }\n constructor(workspace) {\n this.workspace = workspace;\n this.method = DropMethod.InsertAfter;\n this.data = null;\n makeObservable(this, {\n method: observable,\n data: observable,\n set: action,\n clear: action,\n node: computed,\n });\n }\n set(data, method) {\n this.data = data;\n this.method = method;\n }\n /**\n * 重置\n */\n clear() {\n this.data = null;\n }\n /**\n * 获取对应的 node\n * @deprecated\n */\n getNode() {\n return this.node;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nexport var HistoryMessage;\n(function (HistoryMessage) {\n HistoryMessage[\"InitView\"] = \"initView\";\n HistoryMessage[\"AddFile\"] = \"addFile\";\n HistoryMessage[\"RemoveFile\"] = \"removeFile\";\n HistoryMessage[\"UpdateDependency\"] = \"updateDependency\";\n HistoryMessage[\"RemoveDependency\"] = \"removeDependency\";\n HistoryMessage[\"RemoveNode\"] = \"removeNode\";\n HistoryMessage[\"ReplaceNode\"] = \"replaceNode\";\n HistoryMessage[\"CloneNode\"] = \"cloneNode\";\n HistoryMessage[\"InsertNode\"] = \"insertNode\";\n HistoryMessage[\"InsertBeforeNode\"] = \"insertBeforeNode\";\n HistoryMessage[\"InsertAfterNode\"] = \"insertAfterNode\";\n HistoryMessage[\"DropNode\"] = \"dropNode\";\n HistoryMessage[\"UpdateAttribute\"] = \"updateAttribute\";\n HistoryMessage[\"UpdateCode\"] = \"updateCode\";\n})(HistoryMessage || (HistoryMessage = {}));\n/**\n * 工作区的历史记录记录\n */\nexport class TangoHistory {\n get index() {\n return this._index;\n }\n get length() {\n return this._records.length;\n }\n get list() {\n return toJS(this._records);\n }\n get couldBack() {\n return this._records.length > 0 && this._index > -1;\n }\n get couldForward() {\n return this._records.length > this._index + 1;\n }\n constructor(workspace) {\n // 历史记录\n this._records = [];\n // 当前记录指针\n this._index = 0;\n // 最多记录数\n this._maxSize = 100;\n this.workspace = workspace;\n makeObservable(this, {\n _records: observable,\n _index: observable,\n back: action,\n forward: action,\n go: action,\n push: action,\n couldBack: computed,\n couldForward: computed,\n });\n }\n _sync(data) {\n if (data) {\n Object.keys(data).forEach((filename) => {\n this.workspace.getFile(filename).update(data[filename]);\n });\n }\n }\n /**\n * 上一步\n */\n back() {\n if (this.couldBack) {\n const item = this._records[this._index - 1];\n this._sync(item.data);\n this._index--;\n }\n }\n /**\n * 下一步\n */\n forward() {\n if (this.couldForward) {\n const item = this._records[this._index + 1];\n this._sync(item.data);\n this._index++;\n }\n }\n /**\n * 通过相对位置从历史记录加载记录\n */\n go(index) {\n const item = this._records[index];\n if (item) {\n this._sync(item.data);\n this._index = index;\n }\n }\n /**\n * push 数据进入历史记录堆栈\n */\n push(data) {\n if (this._index < this._records.length - 1) {\n this._records = this._records.slice(0, this._index + 1);\n }\n this._index = this._records.length;\n this._records.push(Object.assign({ time: Date.now() }, data));\n const overCount = this._records.length - this._maxSize;\n if (overCount > 0) {\n this._records.splice(0, overCount);\n this._index = this._records.length - 1;\n }\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { getValue, isNil, logger, setValue } from '@music163/tango-helpers';\nimport { formatCode } from '../helpers';\n/**\n * 普通文件,不进行 AST 解析\n */\nexport class TangoFile {\n get code() {\n return this._code;\n }\n get cleanCode() {\n return this._cleanCode;\n }\n constructor(workspace, props, isSyncCode = true) {\n this.workspace = workspace;\n this.filename = props.filename;\n this.type = props.type;\n this.lastModified = Date.now();\n // 这里主要是为了解决 umi ts 编译错误的问题,@see https://github.com/umijs/umi/issues/7594\n if (isSyncCode) {\n this.update(props.code);\n }\n }\n /**\n * 更新文件内容\n */\n update(code) {\n if (!isNil(code)) {\n this.lastModified = Date.now();\n this._code = code;\n this._cleanCode = code;\n }\n this.workspace.onFilesChange([this.filename]);\n }\n}\nexport class TangoLessFile extends TangoFile {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n}\nexport class TangoJsonFile extends TangoFile {\n /**\n * @deprecated 使用 file.json 代替\n */\n get object() {\n return toJS(this._object);\n }\n get json() {\n return toJS(this._object);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this._object = {};\n this.update(props.code);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n _object: observable,\n code: computed,\n cleanCode: computed,\n object: computed,\n json: computed,\n update: action,\n setValue: action,\n });\n }\n update(code) {\n this.lastModified = Date.now();\n if (isNil(code)) {\n // 基于最新的 json 同步代码\n let newCode = JSON.stringify(this._object);\n try {\n newCode = formatCode(newCode, 'json');\n }\n catch (err) {\n logger.error(err);\n return;\n }\n this._code = newCode;\n this._cleanCode = newCode;\n }\n else {\n try {\n // 基于传入的代码,同步 json 对象\n code = formatCode(code, 'json');\n }\n catch (err) {\n logger.error(err);\n return;\n }\n this._code = code;\n this._cleanCode = code;\n try {\n const json = JSON.parse(code);\n this._object = json;\n }\n catch (err) {\n logger.error(err);\n }\n }\n this.workspace.onFilesChange([this.filename]);\n }\n /**\n * 根据路径取值\n * @param valuePath\n * @returns\n */\n getValue(valuePath) {\n return getValue(this.json, valuePath);\n }\n /**\n * 根据路径设置值\n * @param valuePath\n * @param visitor\n */\n setValue(valuePath, visitor) {\n const target = this.getValue(valuePath);\n let next;\n if (typeof visitor === 'function') {\n next = visitor === null || visitor === void 0 ? void 0 : visitor(target);\n }\n else {\n next = visitor;\n }\n if (next !== undefined) {\n setValue(this._object, valuePath, next);\n }\n return this;\n }\n /**\n * 根据路径删除值\n * @param valuePath\n * @param visitor\n */\n deleteValue(valuePath) {\n const pathList = valuePath.split('.');\n const lastPath = pathList.pop();\n const parentPath = pathList.join('.');\n let target;\n if (parentPath) {\n target = this.getValue(parentPath);\n }\n else {\n target = this.json;\n }\n if (!target) {\n return this;\n }\n delete target[lastPath];\n if (parentPath) {\n this.setValue(parentPath, target);\n }\n else {\n this._object = target;\n }\n return this;\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nimport { isNil } from '@music163/tango-helpers';\nimport { code2ast, ast2code, formatCode, traverseFile, addImportDeclaration, updateImportDeclaration, } from '../helpers';\nimport { TangoFile } from './file';\n/**\n * JS 模块实现规范\n * - ast 操纵类方法,统一返回 this,支持外层链式调用\n * - observable state 统一用 _foo 格式,并提供 getter 方法\n */\nexport class TangoModule extends TangoFile {\n constructor(workspace, props, isSyncCode = true) {\n super(workspace, props, isSyncCode);\n }\n /**\n * 基于最新的 ast 进行同步\n * @param code 如果传入 code,则基于 code 进行同步\n * @param isFormatCode 是否格式化代码\n * @param refreshWorkspace 是否刷新 workspace\n */\n update(code, isFormatCode = true, refreshWorkspace = true) {\n this.lastModified = Date.now();\n if (isNil(code)) {\n this._syncByAst();\n }\n else {\n this._syncByCode(code, isFormatCode);\n }\n this._analysisAst();\n this.workspace.onFilesChange([this.filename]);\n if (refreshWorkspace) {\n this.workspace.refresh([this.filename]);\n }\n }\n addImportDeclaration(source, specifiers) {\n this.ast = addImportDeclaration(this.ast, source, specifiers);\n return this;\n }\n updateImportDeclaration(source, specifiers) {\n this.ast = updateImportDeclaration(this.ast, source, specifiers);\n return this;\n }\n /**\n * 基于最新的 ast 进行源码同步\n */\n _syncByAst() {\n const code = ast2code(this.ast);\n this._code = code;\n this._cleanCode = code;\n }\n /**\n * 基于输入的源码进行同步\n * @param code 源码\n * @param isFormatCode 是否格式化代码\n * @returns\n */\n _syncByCode(code, isFormatCode = true) {\n if (code === this._code) {\n return;\n }\n // 提前格式化代码\n if (isFormatCode) {\n code = formatCode(code);\n }\n this._code = code;\n this._cleanCode = code;\n this.ast = code2ast(code);\n }\n _analysisAst() {\n const { imports } = traverseFile(this.ast);\n this.importList = imports;\n }\n}\n/**\n * 普通 JS 文件\n */\nexport class TangoJsModule extends TangoModule {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code, false, false);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nexport class SelectSource {\n get start() {\n return toJS(this._start);\n }\n get first() {\n if (this._items.length)\n return this._items[0];\n return;\n }\n get firstNode() {\n if (!this.first)\n return;\n return this.workspace.getNode(this.first.id, this.first.filename);\n }\n get size() {\n return this._items.length;\n }\n /**\n * 选中的结点数据 NodeData\n */\n get selected() {\n return toJS(this._items);\n }\n /**\n * 是否选中了结点\n */\n get isSelected() {\n return !!this.selected.length;\n }\n /**\n * 选中结点位于的文件\n */\n get file() {\n var _a;\n return (_a = this.firstNode) === null || _a === void 0 ? void 0 : _a.file;\n }\n /**\n * 选中的结点 Nodes\n */\n get nodes() {\n return this._items\n .map((item) => this.workspace.getNode(item.id, item.filename))\n .filter((node) => !!node);\n }\n constructor(workspace) {\n /**\n * 选中元素列表\n */\n this._items = [];\n /**\n * 用户选择的起点\n */\n this._start = {\n point: {\n x: 0,\n y: 0,\n },\n element: null,\n };\n this.workspace = workspace;\n makeObservable(this, {\n _items: observable,\n _start: observable,\n select: action,\n setStart: action,\n clear: action,\n start: computed,\n selected: computed,\n first: computed,\n firstNode: computed,\n size: computed,\n isSelected: computed,\n file: computed,\n nodes: computed,\n });\n }\n // 增加一个选中项\n add() { }\n // 移除一个选中项\n remove() { }\n select(items) {\n if (!items) {\n this._items = [];\n }\n else {\n this._items = Array.isArray(items) ? items : [items];\n }\n // 选中后清空起点位置信息\n this._start = null;\n }\n setStart(data) {\n this._start = data;\n }\n clear() {\n this._items = [];\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nimport { DropTarget } from './drop-target';\n/**\n * 拖拽来源类,被拖拽的物体\n */\nexport class DragSource {\n get node() {\n var _a, _b;\n return this.workspace.getNode((_a = this.data) === null || _a === void 0 ? void 0 : _a.id, (_b = this.data) === null || _b === void 0 ? void 0 : _b.filename);\n }\n /**\n * 获取对应的 prototype\n */\n get prototype() {\n var _a;\n return this.workspace.getPrototype((_a = this.data) === null || _a === void 0 ? void 0 : _a.name);\n }\n get id() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.id;\n }\n get name() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.name;\n }\n get bounding() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.bounding;\n }\n constructor(workspace) {\n this.workspace = workspace;\n this.data = null;\n this.isDragging = false;\n this.dropTarget = new DropTarget(workspace);\n makeObservable(this, {\n data: observable,\n isDragging: observable,\n set: action,\n clear: action,\n node: computed,\n prototype: computed,\n });\n }\n /**\n * 更新选中数据\n * @param props\n */\n set(data) {\n this.data = data;\n this.isDragging = !!data;\n }\n /**\n * 重置\n */\n clear() {\n this.data = null;\n this.isDragging = false;\n this.dropTarget.clear();\n }\n /**\n * 获取对应的 node\n * @deprecated\n */\n getNode() {\n return this.node;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { traverseRouteFile, addRouteToRouteFile, removeRouteFromRouteFile, updateRouteToRouteFile, } from '../helpers';\nimport { TangoModule } from './module';\n/**\n * 路由配置模块\n */\nexport class TangoRouteModule extends TangoModule {\n get routes() {\n return toJS(this._routes);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code, true, false);\n makeObservable(this, {\n _routes: observable,\n _code: observable,\n _cleanCode: observable,\n routes: computed,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n /**\n * 根据路由地址获取 route 对象\n */\n getRouteByRoutePath(route) {\n let record;\n for (const item of this.routes) {\n if (item.path === route) {\n record = item;\n break;\n }\n }\n return record;\n }\n /**\n * 添加一条新路由\n * @param name\n */\n addRoute(routePath, importFilePath) {\n this.ast = addRouteToRouteFile(this.ast, routePath, importFilePath);\n return this;\n }\n /**\n * 更新页面路由\n * @param oldRoutePath\n * @param newRoutePath\n * @returns\n */\n updateRoute(oldRoutePath, newRoutePath) {\n this.ast = updateRouteToRouteFile(this.ast, oldRoutePath, newRoutePath);\n return this;\n }\n /**\n * 删除一条路由\n * @param route 路由地址\n */\n removeRoute(route) {\n if (route === '/') {\n console.warn('index route should not be removed!');\n return;\n }\n const record = this.getRouteByRoutePath(route);\n this.ast = removeRouteFromRouteFile(this.ast, route, record.importPath);\n return this;\n }\n _analysisAst() {\n this._routes = traverseRouteFile(this.ast);\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { traverseStoreFile, traverseStoreEntryFile, addStoreToEntryFile, getModuleNameByFilename, addStoreState, updateStoreState, removeStoreState, removeStoreToEntryFile, } from '../helpers';\nimport { TangoModule } from './module';\n/**\n * 入口配置模块\n */\nexport class TangoStoreEntryModule extends TangoModule {\n get stores() {\n return toJS(this._stores);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this._stores = [];\n this.update(props.code, true, false);\n makeObservable(this, {\n _stores: observable,\n _code: observable,\n _cleanCode: observable,\n stores: computed,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n _analysisAst() {\n this._stores = traverseStoreEntryFile(this.ast);\n }\n /**\n * 新建模型\n * @param name\n */\n addStore(name) {\n this.ast = addStoreToEntryFile(this.ast, name);\n return this;\n }\n /**\n * 删除模型\n * @param name\n */\n removeStore(name) {\n this.ast = removeStoreToEntryFile(this.ast, name);\n return this;\n }\n}\n/**\n * 状态模型模块\n */\nexport class TangoStoreModule extends TangoModule {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.name = getModuleNameByFilename(props.filename);\n this.update(props.code, true, false);\n makeObservable(this, {\n states: observable,\n actions: observable,\n _code: observable,\n _cleanCode: observable,\n cleanCode: computed,\n code: computed,\n update: action,\n });\n }\n /**\n * 添加状态属性\n * @param stateName\n * @param initValue\n */\n addState(stateName, initValue) {\n this.ast = addStoreState(this.ast, stateName, initValue);\n return this;\n }\n /**\n * 移除状态\n */\n removeState(stateName) {\n this.ast = removeStoreState(this.ast, stateName);\n return this;\n }\n /**\n * 更新状态代码\n * @param stateName 状态名\n * @param code 代码\n */\n updateState(stateName, code) {\n this.ast = updateStoreState(this.ast, stateName, code);\n return this;\n }\n _analysisAst() {\n const { namespace, states, actions } = traverseStoreFile(this.ast);\n this.namespace = namespace || this.name;\n this.states = states;\n this.actions = actions;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { clone, logger } from '@music163/tango-helpers';\nimport { traverseServiceFile, updateServiceConfigToServiceFile, getModuleNameByFilename, deleteServiceConfigFromServiceFile, updateBaseConfigToServiceFile, } from '../helpers';\nimport { TangoModule } from './module';\n/**\n * 数据服务模块\n */\nexport class TangoServiceModule extends TangoModule {\n get serviceFunctions() {\n return toJS(this._serviceFunctions);\n }\n get baseConfig() {\n return toJS(this._baseConfig);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this.name = getModuleNameByFilename(props.filename);\n this.update(props.code, true, false);\n makeObservable(this, {\n _serviceFunctions: observable,\n _baseConfig: observable,\n _code: observable,\n _cleanCode: observable,\n serviceFunctions: computed,\n baseConfig: computed,\n cleanCode: computed,\n code: computed,\n update: action,\n });\n }\n _analysisAst() {\n const { imports, services, baseConfig } = traverseServiceFile(this.ast);\n this.importList = imports;\n this._serviceFunctions = services;\n this._baseConfig = baseConfig;\n if (baseConfig.namespace) {\n this.name = baseConfig.namespace;\n }\n }\n addServiceFunction(name, config) {\n this.ast = updateServiceConfigToServiceFile(this.ast, { [name]: clone(config, false) });\n return this;\n }\n /**\n * 批量添加服务函数\n * @param configs { [name: string]: object }\n * @returns\n */\n addServiceFunctions(configs) {\n this.ast = updateServiceConfigToServiceFile(this.ast, configs);\n return this;\n }\n updateServiceFunction(name, payload) {\n this.ast = updateServiceConfigToServiceFile(this.ast, { [name]: clone(payload, false) });\n return this;\n }\n deleteServiceFunction(serviceFunctionName) {\n try {\n this.ast = deleteServiceConfigFromServiceFile(this.ast, serviceFunctionName);\n }\n catch (e) {\n logger.error(e);\n }\n return this;\n }\n /**\n * 更新服务的基础配置\n */\n updateBaseConfig(data) {\n this.ast = updateBaseConfigToServiceFile(this.ast, data);\n return this;\n }\n}\n","import { cloneJSXElement, getJSXElementAttributes } from '../helpers';\n/**\n * 视图节点类\n */\nexport class TangoNode {\n get loc() {\n var _a;\n return (_a = this.rawNode) === null || _a === void 0 ? void 0 : _a.loc;\n }\n constructor(props) {\n this.file = props.file;\n this.id = props.id;\n this.component = props.component;\n this.rawNode = props.rawNode;\n this.props = getJSXElementAttributes(cloneJSXElement(props.rawNode));\n }\n /**\n * 返回克隆后的 ast 节点\n * @param overrideProps 额外设置给克隆节点的属性\n * @returns\n */\n cloneRawNode(overrideProps) {\n return cloneJSXElement(this.rawNode, overrideProps);\n }\n /**\n * 清空节点的指向,交给 GC 去回收\n */\n destroy() {\n this.file = null;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { ast2code, traverseViewFile, removeJSXElement, insertSiblingAfterJSXElement, appendChildToJSXElement, addImportDeclaration, replaceJSXElement, removeUnusedImportSpecifiers, insertSiblingBeforeJSXElement, replaceRootJSXElementChildren, IdGenerator, updateJSXAttributes, queryXFormItemFields, prototype2importDeclarationData, insertImportSpecifiers, addImportDeclarationLegacy, updateImportDeclarationLegacy, } from '../helpers';\nimport { TangoNode } from './node';\nimport { TangoModule } from './module';\n/**\n * 导入信息转为 变量名->来源 的 map 结构\n * @param importedModules\n * @returns\n */\nfunction buildImportMap(importedModules) {\n const map = {};\n Object.keys(importedModules).forEach((source) => {\n const specifiers = importedModules[source];\n specifiers === null || specifiers === void 0 ? void 0 : specifiers.forEach((specifier) => {\n map[specifier.localName] = {\n source,\n isDefault: specifier.type === 'ImportDefaultSpecifier',\n };\n });\n });\n return map;\n}\n/**\n * 将节点列表转换为 tree data 嵌套数组\n * @param list\n */\nfunction nodeListToTreeData(list) {\n const map = {};\n list.forEach((item) => {\n // 如果不存在,则初始化\n if (!map[item.id]) {\n map[item.id] = Object.assign(Object.assign({}, item), { children: [] });\n }\n // 是否找到父节点,找到则塞进去\n if (item.parentId && map[item.parentId]) {\n map[item.parentId].children.push(map[item.id]);\n }\n });\n // 保留根节点\n const ret = Object.values(map).filter((item) => !item.parentId);\n return ret;\n}\n/**\n * 视图模块\n */\nexport class TangoViewModule extends TangoModule {\n get nodes() {\n return this._nodes;\n }\n get nodesTree() {\n return toJS(this._nodesTree);\n }\n get tree() {\n return this.ast;\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n /**\n * codeId 列表\n */\n this._codeIdList = [];\n this._nodes = new Map();\n this.idGenerator = new IdGenerator({ prefix: props.filename });\n this.update(props.code, true, false);\n makeObservable(this, {\n _nodesTree: observable,\n _code: observable,\n _cleanCode: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n _syncByAst() {\n // 空方法,逻辑合并到 this._analysisAst\n }\n _analysisAst() {\n const { ast: newAst, cleanAst, nodes, imports, importedModules, variables, } = traverseViewFile(this.ast, this.idGenerator);\n this.ast = newAst;\n this._code = ast2code(newAst);\n this._cleanCode = ast2code(cleanAst);\n this._importedModules = importedModules;\n this.importList = imports;\n this.importMap = buildImportMap(imports);\n this.variables = variables;\n this._nodes.clear();\n this._codeIdList = [];\n nodes.forEach((cur) => {\n const node = new TangoNode(Object.assign(Object.assign({}, cur), { file: this }));\n this._nodes.set(cur.id, node);\n if (cur.codeId) {\n this._codeIdList.push(cur.codeId);\n }\n });\n this._nodesTree = nodeListToTreeData(nodes);\n }\n hasNodeByCodeId(codeId) {\n return this._codeIdList.includes(codeId);\n }\n /**\n * 依赖列表\n */\n listImportSources() {\n return Object.keys(this.importList);\n }\n /**\n * 弹窗列表\n */\n listModals() {\n const modals = [];\n const activeViewNodes = this.nodes || new Map();\n Array.from(activeViewNodes.values()).forEach((node) => {\n if (['Modal', 'Drawer'].includes(node.component) && node.props.id) {\n modals.push({\n label: `${node.component}(${node.props.id})`,\n value: node.props.id,\n });\n }\n });\n return modals;\n }\n /**\n * 表单列表\n */\n listForms() {\n const forms = {};\n const activeViewNodes = this.nodes;\n Array.from(activeViewNodes.values()).forEach((node) => {\n if (['XAction', 'XColumnAction', 'XForm', 'XStepForm', 'XSearchForm', 'XFormList'].includes(node.component)) {\n forms[node.id] = queryXFormItemFields(node.rawNode);\n }\n });\n return forms;\n }\n /**\n * 添加导入符号\n * @param source\n * @param newSpecifiers\n * @returns\n */\n addImportSpecifiers(source, newSpecifiers) {\n const existSpecifiers = this.importList[source];\n if (existSpecifiers) {\n const insertedSpecifiers = newSpecifiers.filter((item) => {\n return !existSpecifiers.find((existItem) => existItem.localName === item.localName);\n });\n this.ast = insertImportSpecifiers(this.ast, source, insertedSpecifiers);\n }\n else {\n // 不存在导入来源,直接添加新的导入语句\n this.ast = addImportDeclaration(this.ast, source, newSpecifiers);\n }\n return this;\n }\n /**\n * 更新导入的变量\n * @deprecated 使用 updateImportDeclaration 代替\n */\n updateImportSpecifiersLegacy(importDeclaration) {\n const mods = this._importedModules[importDeclaration.sourcePath];\n let ast;\n // 如果模块已存在,需要去重\n if (mods) {\n const targetMod = Array.isArray(mods) ? mods[0] : mods;\n const specifiers = Array.isArray(mods)\n ? mods.reduce((prev, cur) => prev.concat(cur.specifiers || []), [])\n : mods.specifiers;\n // 去掉已存在的导入声明\n const newSpecifiers = importDeclaration.specifiers.filter((name) => !specifiers.includes(name));\n ast = updateImportDeclarationLegacy(this.ast, Object.assign(Object.assign({}, importDeclaration), { specifiers: newSpecifiers.concat(targetMod.specifiers) }));\n }\n else {\n ast = addImportDeclarationLegacy(this.ast, importDeclaration);\n }\n this.ast = ast;\n return this;\n }\n /**\n * 清除无效的导入声明\n */\n removeUnusedImportSpecifiers() {\n this.ast = removeUnusedImportSpecifiers(this.ast);\n return this;\n }\n getNode(nodeId) {\n return this._nodes.get(nodeId);\n }\n /**\n * 删除节点\n * @param nodeId\n */\n removeNode(nodeId) {\n this.ast = removeJSXElement(this.ast, nodeId);\n return this;\n }\n /**\n * 更新节点的属性\n * @deprecated 使用 updateNodeAttributes 代替\n */\n updateNodeAttribute(nodeId, attrName, attrValue, relatedImports) {\n return this.updateNodeAttributes(nodeId, { [attrName]: attrValue }, relatedImports);\n }\n updateNodeAttributes(nodeId, config, relatedImports) {\n if (relatedImports && relatedImports.length) {\n // 导入依赖的组件\n const newImportData = relatedImports.reduce((prev, name) => {\n const proto = this.workspace.getPrototype(name);\n const { source, specifiers } = prototype2importDeclarationData(proto, this.filename);\n const existSpecifiers = prev[source];\n if (existSpecifiers) {\n // merge specifiers\n specifiers.forEach((item) => {\n if (!existSpecifiers.find((existItem) => existItem.localName === item.localName)) {\n existSpecifiers.push(item);\n }\n });\n }\n else {\n prev[source] = specifiers;\n }\n return prev;\n }, {});\n Object.keys(newImportData).forEach((source) => {\n this.addImportSpecifiers(source, newImportData[source]);\n });\n }\n this.ast = updateJSXAttributes(this.ast, nodeId, config);\n return this;\n }\n /**\n * 插入子节点的最后面\n * @param targetNodeId\n * @param newNode\n * @param position\n * @returns\n */\n insertChild(targetNodeId, newNode, position = 'last') {\n this.ast = appendChildToJSXElement(this.ast, targetNodeId, newNode, position);\n return this;\n }\n insertAfter(targetNodeId, newNode) {\n this.ast = insertSiblingAfterJSXElement(this.ast, targetNodeId, newNode);\n return this;\n }\n insertBefore(targetNodeId, newNode) {\n this.ast = insertSiblingBeforeJSXElement(this.ast, targetNodeId, newNode);\n return this;\n }\n /**\n * 替换目标节点为新节点\n * @param targetNodeId\n * @param newNode\n */\n replaceNode(targetNodeId, newNode) {\n this.ast = replaceJSXElement(this.ast, targetNodeId, newNode);\n return this;\n }\n /**\n * 替换 jsx 跟结点的子元素\n * @deprecated 不推荐使用\n */\n replaceViewChildren(childrenNodes, importDeclarations) {\n if (childrenNodes.length) {\n this.ast = replaceRootJSXElementChildren(this.ast, childrenNodes);\n }\n if (importDeclarations === null || importDeclarations === void 0 ? void 0 : importDeclarations.length) {\n importDeclarations.forEach((item) => {\n this.updateImportSpecifiersLegacy(item);\n });\n }\n return this;\n }\n}\n","import path from 'path';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { TangoModule } from './module';\nimport { traverseComponentsEntryFile } from '../helpers';\n/**\n * 本地组件目录的入口文件,例如 '/components/index.js' 或 `/blocks/index.js`\n */\nexport class TangoComponentsEntryModule extends TangoModule {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code, false, false);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n exportList: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n _analysisAst() {\n const baseDir = path.dirname(this.filename);\n const { exportMap } = traverseComponentsEntryFile(this.ast, baseDir);\n this.exportList = exportMap;\n Object.keys(this.exportList).forEach((key) => {\n this.workspace.componentPrototypes.set(key, {\n name: key,\n exportType: 'namedExport',\n package: baseDir,\n type: 'element',\n });\n });\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nimport { hasFileExtension, isStoreVariablePath, isString, logger, parseServiceVariablePath, parseStoreVariablePath, uniq, } from '@music163/tango-helpers';\nimport { prototype2jsxElement, inferFileType, getFilepath, isPathnameMatchRoute, getJSXElementChildrenNames, namesToImportDeclarations, prototype2importDeclarationData, } from '../helpers';\nimport { DropMethod } from './drop-target';\nimport { HistoryMessage, TangoHistory } from './history';\nimport { TangoJsModule } from './module';\nimport { TangoFile, TangoJsonFile, TangoLessFile } from './file';\nimport { FileType } from '../types';\nimport { SelectSource } from './select-source';\nimport { DragSource } from './drag-source';\nimport { TangoRouteModule } from './route-module';\nimport { TangoStoreEntryModule, TangoStoreModule } from './store-module';\nimport { TangoServiceModule } from './service-module';\nimport { TangoViewModule } from './view-module';\nimport { TangoComponentsEntryModule } from './component-module';\n/**\n * 工作区\n */\nexport class Workspace extends EventTarget {\n /**\n * 项目配置,返回解析后的 tango.config.json 文件\n */\n get projectConfig() {\n var _a;\n return (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.json;\n }\n /**\n * 当前激活的视图模块\n */\n get activeViewModule() {\n if (!this.activeViewFile) {\n this.setActiveViewFile(this.activeRoute);\n }\n return this.files.get(this.activeViewFile);\n }\n /**\n * 获取页面列表\n */\n get pages() {\n var _a;\n const ret = [];\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.routes.forEach((item) => {\n if (item.path !== '*') {\n ret.push({\n path: item.path,\n name: item.component,\n });\n }\n });\n return ret;\n }\n get bizComps() {\n var _a, _b;\n const packages = (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.getValue('packages');\n let list = ((_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.getValue('bizDependencies')) || [];\n if (packages) {\n list = [\n ...new Set([\n ...list,\n ...Object.keys(packages).filter((e) => packages[e].type === 'bizDependency'),\n ]),\n ];\n }\n return list;\n }\n get baseComps() {\n var _a, _b;\n const packages = (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.getValue('packages');\n let list = ((_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.getValue('baseDependencies')) || [];\n if (packages) {\n list = [\n ...new Set([\n ...list,\n ...Object.keys(packages).filter((e) => packages[e].type === 'baseDependency'),\n ]),\n ];\n }\n return list;\n }\n get localComps() {\n var _a;\n return Object.keys(((_a = this.componentsEntryModule) === null || _a === void 0 ? void 0 : _a.exportList) || {});\n }\n constructor(options) {\n super();\n this.storeModules = {};\n this.serviceModules = {};\n /**\n * 绑定事件\n * TODO: 是否需要自己来管理 listeners,并及时进行 gc\n */\n this.on = this.addEventListener;\n /**\n * 移除事件\n */\n this.off = this.removeEventListener;\n this.history = new TangoHistory(this);\n this.selectSource = new SelectSource(this);\n this.dragSource = new DragSource(this);\n this.componentPrototypes = new Map();\n this.entry = options === null || options === void 0 ? void 0 : options.entry;\n this.activeRoute = (options === null || options === void 0 ? void 0 : options.defaultActiveRoute) || '/';\n this.activeFile = options === null || options === void 0 ? void 0 : options.entry;\n this.activeViewFile = '';\n this.files = new Map();\n this.isReady = false;\n if (options === null || options === void 0 ? void 0 : options.onFilesChange) {\n // 使用用户提供的 onFilesChange\n this.onFilesChange = options.onFilesChange;\n }\n if (options === null || options === void 0 ? void 0 : options.files) {\n this.addFiles(options.files);\n }\n if (options === null || options === void 0 ? void 0 : options.prototypes) {\n this.setComponentPrototypes(options.prototypes);\n }\n makeObservable(this, {\n files: observable,\n activeRoute: observable,\n activeFile: observable,\n activeViewFile: observable,\n pages: computed,\n bizComps: computed,\n setActiveRoute: action,\n setActiveFile: action,\n addFile: action,\n removeFile: action,\n });\n }\n getPrototype(name) {\n if (isString(name)) {\n return this.componentPrototypes.get(name);\n }\n return name;\n }\n /**\n * 设置当前路由\n * @param routePath 路由路径\n */\n setActiveRoute(routePath) {\n if (routePath === this.activeRoute) {\n return;\n }\n this.selectSource.clear();\n this.activeRoute = routePath;\n this.setActiveViewFile(routePath);\n }\n /**\n * 设置当前选中的文件\n * @param filename\n */\n setActiveFile(filename, isViewFile = false) {\n this.activeFile = filename;\n if (isViewFile) {\n this.activeViewFile = filename;\n }\n }\n /**\n * 根据当前的路由计算当前的视图模块\n */\n setActiveViewFile(routePath) {\n let filename = this.getFilenameByRoutePath(routePath);\n if (!filename) {\n // 没有找到 route 对应的文件,使用默认的 entry\n for (const [key, file] of this.files) {\n if (file.type === FileType.JsxViewModule) {\n filename = file.filename;\n break;\n }\n }\n }\n if (filename) {\n this.setActiveFile(filename, true);\n }\n }\n setComponentPrototypes(prototypes) {\n Object.keys(prototypes).forEach((name) => {\n this.componentPrototypes.set(name, prototypes[name]);\n });\n }\n /**\n * 添加一组文件到工作区,如果文件同名,后面的文件会覆盖前面的文件\n * @param files\n */\n addFiles(files = []) {\n files.forEach((file) => {\n this.addFile(file.filename, file.code, file.type);\n });\n }\n /**\n * 添加文件到工作区\n * @param filename 文件名\n * @param code 代码片段\n * @param fileType 模块类型\n */\n addFile(filename, code, fileType) {\n var _a;\n const moduleType = fileType || inferFileType(filename);\n const props = {\n filename,\n code,\n type: moduleType,\n };\n let module;\n switch (moduleType) {\n case FileType.StoreEntryModule:\n module = new TangoStoreEntryModule(this, props);\n this.storeEntryModule = module;\n break;\n case FileType.ComponentsEntryModule:\n module = new TangoComponentsEntryModule(this, props);\n this.componentsEntryModule = module;\n break;\n case FileType.RouteModule: {\n module = new TangoRouteModule(this, props);\n this.routeModule = module;\n // check if activeRoute exists\n const route = module.routes.find((item) => item.path === this.activeRoute);\n if (!route) {\n this.setActiveRoute((_a = module.routes[0]) === null || _a === void 0 ? void 0 : _a.path);\n }\n break;\n }\n case FileType.JsxViewModule:\n module = new TangoViewModule(this, props);\n break;\n case FileType.ServiceModule:\n module = new TangoServiceModule(this, props);\n this.serviceModules[module.name] = module;\n break;\n case FileType.StoreModule:\n module = new TangoStoreModule(this, props);\n this.storeModules[module.name] = module;\n break;\n case FileType.Module:\n module = new TangoJsModule(this, props);\n break;\n case FileType.Less:\n module = new TangoLessFile(this, props);\n break;\n case FileType.PackageJson:\n module = new TangoJsonFile(this, props);\n this.packageJson = module;\n break;\n case FileType.TangoConfigJson:\n module = new TangoJsonFile(this, props);\n this.tangoConfigJson = module;\n break;\n case FileType.Json:\n module = new TangoJsonFile(this, props);\n break;\n default:\n module = new TangoFile(this, props);\n }\n this.files.set(filename, module);\n }\n addServiceFile(serviceName, code) {\n const filename = `/src/services/${serviceName}.js`;\n this.addFile(filename, code, FileType.ServiceModule);\n const indexServiceModule = this.serviceModules.index;\n indexServiceModule === null || indexServiceModule === void 0 ? void 0 : indexServiceModule.addImportDeclaration(`./${serviceName}`, []).update();\n }\n addStoreFile(storeName, code) {\n const filename = `/src/stores/${storeName}.js`;\n this.addFile(filename, code);\n if (!this.storeEntryModule) {\n this.addFile('/src/stores/index.js', '');\n }\n this.storeEntryModule.addStore(storeName).update();\n }\n /**\n * 添加视图文件\n * @param viewName 文件名\n * @param code 代码\n */\n addViewFile(viewName, code) {\n const viewRoute = viewName.startsWith('/') ? viewName : `/${viewName}`;\n const filename = `/src/pages/${viewName}.js`;\n this.addFile(filename, code);\n this.addRoute({\n name: viewName,\n path: viewRoute,\n }, filename);\n }\n updateFile(filename, code, shouldFormatCode = false) {\n const file = this.getFile(filename);\n file.update(code);\n if (shouldFormatCode && file instanceof TangoViewModule) {\n file.removeUnusedImportSpecifiers().update();\n }\n this.history.push({\n message: HistoryMessage.UpdateCode,\n data: {\n [filename]: code,\n },\n });\n }\n /**\n * 删除工作区的文件\n * @param filename\n */\n removeFile(filename) {\n // TODO: refactor visitFile to share this logic\n if (this.files.get(filename)) {\n // 如果是文件,直接删除\n this.files.delete(filename);\n }\n else {\n // 没有匹配到,就是一个目录,直接删除整个目录\n // FIXME: 可能存在风险,如果文件夹中的模块被复用,则会导致误删除\n Array.from(this.files.keys()).forEach((key) => {\n if (key.startsWith(`${filename}/`)) {\n this.files.delete(key);\n }\n });\n }\n }\n /**\n * 重命名文件\n * @param oldFilename\n * @param newFilename\n */\n renameFile(oldFilename, newFilename) {\n const file = this.files.get(oldFilename);\n if (file) {\n this.removeFile(oldFilename);\n this.addFile(newFilename, file.code);\n }\n }\n /**\n * 重命名文件夹\n * @param oldFoldername 旧文件夹名\n * @param newFoldername 新文件夹名\n */\n renameFolder(oldFoldername, newFoldername) {\n Array.from(this.files.keys()).forEach((key) => {\n if (key.startsWith(`${oldFoldername}/`)) {\n const newKey = key.replace(oldFoldername, newFoldername);\n this.renameFile(key, newKey);\n }\n });\n }\n /**\n * 根据文件名获取文件对象\n * @param filename\n * @returns\n */\n getFile(filename) {\n return this.files.get(filename);\n }\n /**\n * 获取文件列表\n * @returns { [filename]: fileCode }\n */\n listFiles() {\n const ret = {};\n this.files.forEach((file) => {\n ret[file.filename] = file.cleanCode;\n });\n return ret;\n }\n /**\n * 删除视图模块\n * @param route 路由名称\n */\n removeViewModule(routePath) {\n var _a;\n // get filename first\n const filename = this.getFilenameByRoutePath(routePath);\n if (this.routeModule) {\n this.routeModule.removeRoute(routePath).update();\n this.setActiveRoute(((_a = this.routeModule.routes[0]) === null || _a === void 0 ? void 0 : _a.path) || '/');\n }\n this.removeFile(filename);\n }\n /**\n * 添加新的路由\n */\n addRoute(routeData, importFilePath) {\n var _a;\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.addRoute(routeData.path, importFilePath).update();\n }\n /**\n * 更新页面路由配置\n * @param sourceRoutePath\n * @param targetPageData\n */\n updateRoute(sourceRoutePath, targetPageData) {\n var _a;\n if (sourceRoutePath !== targetPageData.path) {\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.updateRoute(sourceRoutePath, targetPageData.path).update();\n }\n }\n /**\n * 复制视图文件\n * @param sourceRoute\n * @param targetRouteConfig\n */\n copyViewPage(sourceRoutePath, targetPageData) {\n const sourceFilePath = this.getRealViewFilePath(this.getFilenameByRoutePath(sourceRoutePath));\n const targetFilePath = getFilepath(targetPageData.path, '/src/pages');\n this.copyFiles(sourceFilePath, targetFilePath);\n this.addRoute(targetPageData, targetFilePath);\n }\n getNode(id, filename) {\n const file = filename ? this.getFile(filename) : this.activeViewModule;\n if (file instanceof TangoViewModule) {\n return file.getNode(id);\n }\n }\n /**\n * 应用代码初始化完成\n */\n ready() {\n var _a, _b;\n if (!this.isReady) {\n this.isReady = true;\n this.history.push({\n message: HistoryMessage.InitView,\n data: {\n [(_a = this.activeViewModule) === null || _a === void 0 ? void 0 : _a.filename]: (_b = this.activeViewModule) === null || _b === void 0 ? void 0 : _b.code,\n },\n });\n }\n }\n /**\n * 添加新的模型文件\n * @deprecated 使用 addStoreFile 代替\n */\n addStoreModule(name, code) {\n this.addStoreFile(name, code);\n }\n /**\n * 删除模型文件\n * @param name\n */\n removeStoreModule(name) {\n const filename = getFilepath(name, '/src/stores', '.js');\n this.storeEntryModule.removeStore(name).update();\n this.removeFile(filename);\n }\n /**\n * 添加模型属性\n * @param storeName\n * @param stateName\n * @param initValue\n */\n addStoreState(storeName, stateName, initValue) {\n var _a;\n (_a = this.storeModules[storeName]) === null || _a === void 0 ? void 0 : _a.addState(stateName, initValue).update();\n }\n /**\n * 删除模型属性\n * @param storeName\n * @param stateName\n */\n removeStoreState(storeName, stateName) {\n var _a;\n (_a = this.storeModules[storeName]) === null || _a === void 0 ? void 0 : _a.removeState(stateName).update();\n }\n /**\n * 根据变量路径删除状态变量\n * @param variablePath\n */\n removeStoreVariable(variablePath) {\n const { storeName, variableName } = parseStoreVariablePath(variablePath);\n this.removeStoreState(storeName, variableName);\n }\n /**\n * 根据变量路径更新状态变量的值\n * @param variablePath 变量路径\n * @param code 变量代码\n */\n updateStoreVariable(variablePath, code) {\n var _a;\n if (isStoreVariablePath(variablePath)) {\n const { storeName, variableName } = parseStoreVariablePath(variablePath);\n (_a = this.storeModules[storeName]) === null || _a === void 0 ? void 0 : _a.updateState(variableName, code).update();\n }\n }\n /**\n * 获取服务函数的详情\n * TODO: 不要 services 前缀\n * @param serviceKey `services.list` 或 `services.sub.list`\n * @returns\n */\n getServiceFunction(serviceKey) {\n var _a;\n const { name, moduleName } = parseServiceVariablePath(serviceKey);\n if (!name) {\n return;\n }\n return {\n name,\n moduleName,\n config: (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.serviceFunctions[name],\n };\n }\n /**\n * 获取服务函数的列表\n * @returns 返回服务函数的列表 { [serviceKey: string]: Dict }\n */\n listServiceFunctions() {\n const ret = {};\n Object.keys(this.serviceModules).forEach((moduleName) => {\n const module = this.serviceModules[moduleName];\n Object.keys(module.serviceFunctions).forEach((name) => {\n const serviceKey = moduleName === 'index' ? name : [moduleName, name].join('.');\n ret[serviceKey] = module.serviceFunctions[name];\n });\n });\n return ret;\n }\n /**\n * 更新服务函数\n */\n updateServiceFunction(serviceName, payload, moduleName = 'index') {\n this.serviceModules[moduleName].updateServiceFunction(serviceName, payload).update();\n }\n /**\n * 新增服务函数,支持批量添加\n */\n addServiceFunction(name, config, moduleName = 'index') {\n var _a;\n (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.addServiceFunction(name, config).update();\n }\n addServiceFunctions(configs, modName = 'index') {\n var _a;\n (_a = this.serviceModules[modName]) === null || _a === void 0 ? void 0 : _a.addServiceFunctions(configs).update();\n }\n /**\n * 删除服务函数\n * @param name\n */\n removeServiceFunction(serviceKey) {\n var _a;\n const { moduleName, name } = parseServiceVariablePath(serviceKey);\n (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.deleteServiceFunction(name).update();\n }\n /**\n * 更新服务的基础配置\n */\n updateServiceBaseConfig(config, moduleName = 'index') {\n var _a;\n (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.updateBaseConfig(config).update();\n }\n addDependency(data) {\n // TODO: implement it to replace addBizComp & addServiceComp\n }\n /**\n * 获取 package.json 中的依赖列表\n * @returns\n * TODO: fix this logic to merge dependencies from package.json and tango.config.json\n */\n listDependencies() {\n var _a;\n return (_a = this.packageJson) === null || _a === void 0 ? void 0 : _a.getValue('dependencies');\n }\n getDependency(pkgName) {\n var _a, _b;\n const packages = (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.getValue('packages');\n const dependencies = (_b = this.packageJson) === null || _b === void 0 ? void 0 : _b.getValue('dependencies'); // 兼容老版本\n const detail = Object.assign({ version: dependencies === null || dependencies === void 0 ? void 0 : dependencies[pkgName] }, ((packages === null || packages === void 0 ? void 0 : packages[pkgName]) || {}));\n return detail;\n }\n /**\n * 更新依赖,没有就添加\n * @param name\n * @param version\n */\n updateDependency(name, version, options) {\n var _a, _b;\n (_a = this.packageJson) === null || _a === void 0 ? void 0 : _a.setValue('dependencies', (deps = {}) => {\n deps[name] = version;\n return deps;\n }).update();\n (_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.setValue('packages', (packages) => {\n var _a;\n // 兼容以前的逻辑,只在拥有 package 参数时,才会更新 packages 字段\n if (!packages) {\n return undefined;\n }\n if ((options === null || options === void 0 ? void 0 : options.package) || packages[name]) {\n packages[name] = Object.assign(Object.assign({ type: (_a = packages[name]) === null || _a === void 0 ? void 0 : _a.type }, ((options === null || options === void 0 ? void 0 : options.package) || packages[name])), { version });\n }\n return packages;\n }).update();\n this.history.push({\n message: HistoryMessage.UpdateDependency,\n data: {\n [this.packageJson.filename]: this.packageJson.code,\n },\n });\n }\n /**\n * 移除依赖\n * @param name\n */\n removeDependency(name) {\n var _a, _b;\n (_a = this.packageJson) === null || _a === void 0 ? void 0 : _a.setValue('dependencies', (deps) => {\n if (deps[name]) {\n delete deps[name];\n }\n return deps;\n }).update();\n (_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.setValue('packages', (packages = {}) => {\n if (packages === null || packages === void 0 ? void 0 : packages[name]) {\n delete packages[name];\n }\n return packages;\n }).update();\n this.history.push({\n message: HistoryMessage.RemoveDependency,\n data: {\n [this.packageJson.filename]: this.packageJson.code,\n },\n });\n }\n /**\n * 删除业务组件\n * @param name\n */\n removeBizComp(name) {\n var _a;\n (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.setValue('bizDependencies', (deps) => {\n if (!deps) {\n return undefined;\n }\n return deps.filter((dep) => dep !== name);\n }).update();\n this.removeDependency(name);\n }\n /**\n * 添加业务组件\n * @param name\n */\n addBizComp(name, version, options) {\n var _a;\n const packages = this.tangoConfigJson.getValue('packages');\n this.updateDependency(name, version, Object.assign(Object.assign({}, options), (!!packages && {\n package: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.package), { type: 'bizDependency' }),\n })));\n // 兼容以前的逻辑\n if (!(options === null || options === void 0 ? void 0 : options.package) && !packages) {\n // TODO: if tangoConfigJson not found, init this file\n (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.setValue('bizDependencies', (deps = []) => {\n if (!deps.includes(name)) {\n deps.push(name);\n }\n return deps;\n }).update();\n }\n this.tangoConfigJson &&\n this.history.push({\n message: HistoryMessage.UpdateDependency,\n data: {\n [this.tangoConfigJson.filename]: this.tangoConfigJson.code,\n },\n });\n }\n /**\n * 删除选中节点\n */\n removeSelectedNode() {\n const file = this.selectSource.file;\n if (!file)\n return;\n // 选中的结点一定位于相同的文件中\n this.selectSource.nodes.forEach((node) => {\n file.removeNode(node.id);\n });\n file.update();\n this.selectSource.clear();\n this.history.push({\n message: HistoryMessage.RemoveNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 复制选中结点\n */\n copySelectedNode() {\n this.copyTempNodes = this.selectSource.nodes;\n }\n /**\n * 粘贴选中结点\n * @deprecated 考虑废弃\n * TODO: 重构该逻辑,抽离出公共的方法\n */\n pasteSelectedNode() {\n if (this.selectSource.size !== 1)\n return;\n if (!this.copyTempNodes)\n return;\n // TODO: 潜在隐患,如果跨页的话,代码里的逻辑调用也要处理\n const importDeclarations = this.getImportDeclarationByNodes(this.copyTempNodes.map((node) => node.rawNode));\n importDeclarations.forEach((importDeclaration) => {\n this.activeViewModule.updateImportSpecifiersLegacy(importDeclaration);\n });\n this.copyTempNodes.forEach((node) => {\n this.activeViewModule.insertAfter(this.selectSource.first.id, node.cloneRawNode());\n });\n this.activeViewModule.update();\n this.history.push({\n message: HistoryMessage.CloneNode,\n data: {\n [this.activeViewModule.filename]: this.activeViewModule.code,\n },\n });\n }\n /**\n * 克隆选中节点,追加到当前结点的后方\n */\n cloneSelectedNode() {\n var _a, _b;\n const file = this.selectSource.file;\n let injectedProps;\n if ((_b = (_a = this.projectConfig) === null || _a === void 0 ? void 0 : _a.designerConfig) === null || _b === void 0 ? void 0 : _b.autoGenerateComponentId) {\n // 生成新的组件 id\n injectedProps = {\n tid: file.idGenerator.generateId(this.selectSource.firstNode.component).id,\n };\n }\n file\n .insertAfter(this.selectSource.first.id, this.selectSource.firstNode.cloneRawNode(injectedProps))\n .update();\n this.history.push({\n message: HistoryMessage.CloneNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 在目标节点中插入子节点\n * @param targetNodeId 目标节点dnd-id\n * @param sourceName 插入的组件名称\n * @returns\n */\n insertToNode(targetNodeId, sourceName) {\n if (!targetNodeId || !sourceName) {\n return;\n }\n const sourcePrototype = this.getPrototype(sourceName);\n const newNode = prototype2jsxElement(sourcePrototype);\n const file = this.getNode(targetNodeId).file;\n const { source, specifiers } = prototype2importDeclarationData(sourcePrototype, file.filename);\n file\n .insertChild(targetNodeId, newNode, 'last')\n .addImportSpecifiers(source, specifiers)\n .update();\n this.history.push({\n message: HistoryMessage.InsertNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 替换目标节点\n */\n replaceNode(targetNodeId, sourceName) {\n if (!targetNodeId || !sourceName) {\n return;\n }\n const sourcePrototype = this.getPrototype(sourceName);\n const newNode = prototype2jsxElement(sourcePrototype);\n const file = this.getNode(targetNodeId).file;\n const { source, specifiers } = prototype2importDeclarationData(sourcePrototype, file.filename);\n file.replaceNode(targetNodeId, newNode).addImportSpecifiers(source, specifiers).update();\n this.history.push({\n message: HistoryMessage.ReplaceNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 在选中节点中插入子节点\n * @param childName 节点名\n */\n insertToSelectedNode(childName) {\n const insertedPrototype = this.getPrototype(childName);\n if (insertedPrototype) {\n const newNode = prototype2jsxElement(insertedPrototype);\n const file = this.selectSource.file;\n const { source, specifiers } = prototype2importDeclarationData(insertedPrototype, file.filename);\n file\n .insertChild(this.selectSource.first.id, newNode, 'last')\n .addImportSpecifiers(source, specifiers)\n .update();\n this.history.push({\n message: HistoryMessage.InsertNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n }\n insertBeforeSelectedNode(sourceName) {\n if (!sourceName) {\n return;\n }\n const targetNodeId = this.selectSource.first.id;\n const sourcePrototype = this.getPrototype(sourceName);\n const newNode = prototype2jsxElement(sourcePrototype);\n const file = this.getNode(targetNodeId).file;\n const { source, specifiers } = prototype2importDeclarationData(sourcePrototype, file.filename);\n file.insertBefore(targetNodeId, newNode).addImportSpecifiers(source, specifiers).update();\n this.history.push({\n message: HistoryMessage.InsertBeforeNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n insertAfterSelectedNode(sourceName) {\n if (!sourceName) {\n return;\n }\n const targetNodeId = this.selectSource.first.id;\n const sourcePrototype = this.getPrototype(sourceName);\n const newNode = prototype2jsxElement(sourcePrototype);\n const file = this.getNode(targetNodeId).file;\n const { source, specifiers } = prototype2importDeclarationData(sourcePrototype, file.filename);\n file.insertAfter(targetNodeId, newNode).addImportSpecifiers(source, specifiers).update();\n this.history.push({\n message: HistoryMessage.InsertAfterNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n updateSelectedNodeAttributes(attributes = {}, relatedImports = []) {\n const file = this.selectSource.file;\n file.updateNodeAttributes(this.selectSource.first.id, attributes, relatedImports).update();\n this.history.push({\n message: HistoryMessage.UpdateAttribute,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 将节点拽入视图中\n */\n dropNode() {\n var _a, _b, _c, _d;\n const dragSource = this.dragSource;\n const dropTarget = dragSource.dropTarget;\n if (!dragSource.prototype || !dropTarget.id) {\n // 无效的 drag source 或 drop target,提前退出\n logger.error('invalid dragSource or dropTarget');\n return;\n }\n // TODO: 这里需要一个额外的信息,DropTarget 的最近容器节点,用于判断目标元素是否可以被置入容器中\n const dragSourcePrototype = dragSource.prototype;\n let injectedProps; // 额外注入给节点的属性\n if ((_b = (_a = this.projectConfig) === null || _a === void 0 ? void 0 : _a.designerConfig) === null || _b === void 0 ? void 0 : _b.autoGenerateComponentId) {\n injectedProps = {\n tid: this.activeViewModule.idGenerator.generateId(dragSource.prototype.name).id,\n };\n }\n let newNode;\n if (dragSource.id) {\n // 来自画布,完整的克隆该节点\n newNode = dragSource.getNode().cloneRawNode();\n }\n else {\n // 来自物料面板,创建新的初始化节点\n newNode = prototype2jsxElement(dragSource.prototype, injectedProps);\n }\n if (!newNode) {\n return;\n }\n const targetFile = (_c = dropTarget.node) === null || _c === void 0 ? void 0 : _c.file;\n const sourceFile = (_d = dragSource.node) === null || _d === void 0 ? void 0 : _d.file;\n // dragSourcePrototype to importDeclarations\n const { source, specifiers } = prototype2importDeclarationData(dragSourcePrototype, targetFile.filename);\n let isValidOperation = true;\n switch (dropTarget.method) {\n // 直接往目标节点的 children 里添加一个节点\n case DropMethod.InsertChild: {\n targetFile\n .insertChild(dropTarget.id, newNode, 'last')\n .addImportSpecifiers(source, specifiers);\n break;\n }\n case DropMethod.InsertFirstChild: {\n targetFile\n .insertChild(dropTarget.id, newNode, 'first')\n .addImportSpecifiers(source, specifiers);\n break;\n }\n // 往目标节点的后边插入一个节点\n case DropMethod.InsertAfter: {\n targetFile.insertAfter(dropTarget.id, newNode).addImportSpecifiers(source, specifiers);\n break;\n }\n // 往目标节点的前方插入一个节点\n case DropMethod.InsertBefore: {\n targetFile.insertBefore(dropTarget.id, newNode).addImportSpecifiers(source, specifiers);\n break;\n }\n // 替换目标节点\n case DropMethod.ReplaceNode: {\n targetFile.replaceNode(dropTarget.id, newNode).addImportSpecifiers(source, specifiers);\n break;\n }\n default:\n isValidOperation = false;\n break;\n }\n // 如果拖拽来源有 ID,表示来自画布\n const isDraggingFromView = !!dragSource.id;\n if (isValidOperation) {\n if (isDraggingFromView) {\n sourceFile.removeNode(dragSource.id);\n }\n this.selectSource.clear();\n }\n targetFile.update();\n if (isDraggingFromView && sourceFile.filename !== targetFile.filename) {\n sourceFile.update();\n }\n dragSource.clear();\n if (isValidOperation) {\n this.history.push({\n message: HistoryMessage.DropNode,\n data: {\n [targetFile.filename]: targetFile.code,\n },\n });\n }\n }\n onFilesChange(filenams) {\n // do nothing\n }\n /**\n * 刷新目标文件\n * @param filenames\n */\n refresh(filenames) {\n this.dispatchEvent(new CustomEvent('refresh', {\n detail: {\n filenames,\n entry: this.entry,\n },\n }));\n }\n /**\n * 基于输入结点获得结点依赖的导入声明信息\n * @param nodes\n */\n getImportDeclarationByNodes(nodes) {\n let names = nodes.reduce((prev, cur) => {\n prev = prev.concat(getJSXElementChildrenNames(cur));\n return prev;\n }, []);\n names = uniq(names);\n const importDeclarations = namesToImportDeclarations(names, this.selectSource.file.importMap);\n return importDeclarations;\n }\n /**\n * 根据路由路径获取文件名\n * @param routePath\n * @returns\n */\n getFilenameByRoutePath(routePath) {\n var _a;\n let filename;\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.routes.forEach((route) => {\n if (isPathnameMatchRoute(routePath, route.path) && route.importPath) {\n const absolutePath = route.importPath.replace('.', '/src');\n filename = this.getRealViewFilePath(absolutePath);\n }\n });\n return filename;\n }\n getRealViewFilePath(filePath) {\n // 如果有后缀名直接返回\n if (hasFileExtension(filePath)) {\n return filePath;\n }\n const possiblePaths = [\n `${filePath}.js`,\n `${filePath}.jsx`,\n `${filePath}/index.js`,\n `${filePath}/index.jsx`,\n ];\n for (const filepath of possiblePaths) {\n if (this.files.has(filepath)) {\n return filepath;\n }\n }\n }\n /**\n * 文件拷贝\n * @param sourcePath\n * @param targetPath\n */\n copyFiles(sourceFilePath, targetFilePath) {\n if (this.files.has(sourceFilePath)) {\n // 来源是文件\n const file = this.files.get(sourceFilePath);\n this.addFile(`${targetFilePath}.js`, file.cleanCode, file.type);\n }\n else if (this.files.has(`${sourceFilePath}/index.js`)) {\n // 来源是目录\n Array.from(this.files.keys()).forEach((key) => {\n if (key.startsWith(`${sourceFilePath}/`)) {\n const sourceFile = this.getFile(key);\n this.addFile(targetFilePath + key.slice(sourceFilePath.length), sourceFile.cleanCode, sourceFile.type);\n }\n });\n }\n else {\n logger.error('copyFiles failed, source: %s, target: %s', sourceFilePath, targetFilePath);\n }\n }\n}\n","/**\n * 导入列表解析为导入声明对象\n * @param names\n * @param nameMap\n * @returns\n */\nexport function namesToImportDeclarations(names, nameMap) {\n const map = {};\n names.forEach((name) => {\n const mod = nameMap[name];\n if (mod) {\n updateMod(map, mod.source, name, mod.isDefault, !map[mod.source]);\n }\n });\n return Object.keys(map).map((sourcePath) => (Object.assign({ sourcePath }, map[sourcePath])));\n}\nfunction updateMod(map, fromPackage, specifier, isDefault = false, shouldInit = true) {\n if (shouldInit) {\n map[fromPackage] = {};\n }\n if (isDefault) {\n map[fromPackage].defaultSpecifier = specifier;\n }\n else if (map[fromPackage].specifiers) {\n map[fromPackage].specifiers.push(specifier);\n }\n else {\n map[fromPackage].specifiers = [specifier];\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nconst ISimulatorTypes = {\n desktop: {\n name: 'desktop',\n width: 1366,\n height: 800,\n },\n phone: {\n name: 'phone',\n width: 375,\n height: 812,\n },\n};\nexport class Designer {\n get simulator() {\n return toJS(this._simulator);\n }\n get viewport() {\n return toJS(this._viewport);\n }\n get activeView() {\n return this._activeView;\n }\n get isPreview() {\n return this._isPreview;\n }\n get showSmartWizard() {\n return this._showSmartWizard;\n }\n get activeSidebarPanel() {\n return this._activeSidebarPanel;\n }\n get showRightPanel() {\n return this._showRightPanel;\n }\n constructor(options) {\n /**\n * 当前的沙箱模拟器类型\n */\n this._simulator = ISimulatorTypes.desktop;\n /**\n * 当前的视图尺寸\n */\n this._viewport = {\n width: 1366,\n height: 800,\n };\n /**\n * 当前激活的视图\n */\n this._activeView = 'design';\n /**\n * 当前选中的侧边栏面板\n */\n this._activeSidebarPanel = '';\n /**\n * 是否显示智能引导\n */\n this._showSmartWizard = false;\n /**\n * 是否显示右侧面板\n */\n this._showRightPanel = true;\n /**\n * 是否预览模式\n */\n this._isPreview = false;\n this.workspace = options.workspace;\n const { simulator, activeSidebarPanel: defaultActiveSidebarPanel } = options;\n // 默认设计器模式\n if (simulator) {\n this.setSimulator(simulator);\n }\n // 默认展开的侧边栏\n if (defaultActiveSidebarPanel) {\n this.setActiveSidebarPanel(defaultActiveSidebarPanel);\n }\n makeObservable(this, {\n _simulator: observable,\n _viewport: observable,\n _activeView: observable,\n _activeSidebarPanel: observable,\n _showSmartWizard: observable,\n _showRightPanel: observable,\n _isPreview: observable,\n simulator: computed,\n viewport: computed,\n activeView: computed,\n activeSidebarPanel: computed,\n isPreview: computed,\n showRightPanel: computed,\n showSmartWizard: computed,\n setSimulator: action,\n setViewport: action,\n setActiveView: action,\n setActiveSidebarPanel: action,\n closeSidebarPanel: action,\n toggleRightPanel: action,\n toggleSmartWizard: action,\n toggleIsPreview: action,\n });\n }\n setSimulator(value) {\n if (typeof value === 'string') {\n this._simulator = ISimulatorTypes[value];\n }\n else {\n this._simulator = value;\n }\n }\n setViewport(value) {\n this._viewport = value;\n }\n setActiveView(view) {\n this._activeView = view;\n }\n setActiveSidebarPanel(panel) {\n if (panel && panel !== this.activeSidebarPanel) {\n this._activeSidebarPanel = panel;\n }\n else {\n this._activeSidebarPanel = '';\n }\n }\n closeSidebarPanel() {\n this._activeSidebarPanel = '';\n }\n toggleSmartWizard(value) {\n this._showSmartWizard = value;\n }\n toggleRightPanel(value) {\n this._showRightPanel = value !== null && value !== void 0 ? value : !this._showRightPanel;\n }\n toggleIsPreview(value) {\n this._isPreview = value !== null && value !== void 0 ? value : !this._isPreview;\n if (value) {\n this.workspace.selectSource.clear();\n }\n }\n}\n","import { Designer, Engine } from './models';\n/**\n * Designer 实例化工厂函数\n * @param options\n * @returns\n */\nexport function createEngine({ workspace, defaultSimulatorMode = 'desktop', defaultActiveSidebarPanel = '', }) {\n const engine = new Engine({\n workspace,\n designer: new Designer({\n workspace,\n simulator: defaultSimulatorMode,\n activeSidebarPanel: defaultActiveSidebarPanel,\n }),\n });\n return engine;\n}\n","import React from 'react';\nexport { default as hoistNonReactStatics } from 'hoist-non-react-statics';\n/**\n * 创建一个命名的 Context 附赠 Provider, Hook\n * @param options\n */\nexport function createContext(options = {}) {\n const { strict = true, errorMessage = 'useContext: `context` is undefined. Seems you forgot to wrap component within the Provider', name, } = options;\n const Context = React.createContext(undefined);\n Context.displayName = name;\n function useContext() {\n const context = React.useContext(Context);\n if (!context && strict) {\n throw new Error(errorMessage);\n }\n return context;\n }\n return [Context.Provider, useContext, Context];\n}\n/**\n * 获取组件的 displayName\n * @param Component\n * @returns\n */\nexport const getDisplayName = (Component) => {\n if (typeof Component === 'string') {\n return Component;\n }\n if (!Component) {\n return undefined;\n }\n return Component.displayName || Component.name || 'Component';\n};\n/**\n * 包裹 DisplayName\n * @param Component\n * @param hocName\n * @returns\n */\nexport const wrapDisplayName = (Component, hocName) => `${hocName}(${getDisplayName(Component)})`;\n/**\n * 判断组件是否是函数组件\n * @returns 类组件和 forwardRef 返回 false,函数组件返回 true\n */\nexport const isFunctionComponent = (Comp) => {\n // class component\n if (Comp.prototype && Comp.prototype.isReactComponent) {\n return false;\n }\n // forwardRef component\n if (typeof Comp === 'object' && Comp.render) {\n return false;\n }\n // function component\n return typeof Comp === 'function';\n};\n","import { createContext } from '@music163/tango-helpers';\nconst [DesignerProvider, useDesigner] = createContext({\n name: 'DesignerContext',\n});\nexport { DesignerProvider };\nexport const useSandboxQuery = () => {\n var _a;\n return (_a = useDesigner()) === null || _a === void 0 ? void 0 : _a.sandboxQuery;\n};\nexport const useRemoteServices = () => {\n var _a;\n return (_a = useDesigner()) === null || _a === void 0 ? void 0 : _a.remoteServices;\n};\n","import { makeObservable } from \"mobx\";\nimport { useState } from \"react\";\nif (!useState) {\n throw new Error(\"mobx-react-lite requires React with Hooks support\");\n}\nif (!makeObservable) {\n throw new Error(\"mobx-react-lite@3 requires mobx at least version 6 to be available\");\n}\n//# sourceMappingURL=assertEnvironment.js.map","import { configure } from \"mobx\";\nexport function defaultNoopBatch(callback) {\n callback();\n}\nexport function observerBatching(reactionScheduler) {\n if (!reactionScheduler) {\n reactionScheduler = defaultNoopBatch;\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Failed to get unstable_batched updates from react-dom / react-native\");\n }\n }\n configure({ reactionScheduler: reactionScheduler });\n}\nexport var isObserverBatched = function () {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Deprecated\");\n }\n return true;\n};\n//# sourceMappingURL=observerBatching.js.map","import { getDependencyTree } from \"mobx\";\nexport function printDebugValue(v) {\n return getDependencyTree(v);\n}\n//# sourceMappingURL=printDebugValue.js.map","var globalIsUsingStaticRendering = false;\nexport function enableStaticRendering(enable) {\n globalIsUsingStaticRendering = enable;\n}\nexport function isUsingStaticRendering() {\n return globalIsUsingStaticRendering;\n}\n//# sourceMappingURL=staticRendering.js.map","export var REGISTRY_FINALIZE_AFTER = 10000;\nexport var REGISTRY_SWEEP_INTERVAL = 10000;\nvar TimerBasedFinalizationRegistry = /** @class */ (function () {\n function TimerBasedFinalizationRegistry(finalize) {\n var _this = this;\n Object.defineProperty(this, \"finalize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: finalize\n });\n Object.defineProperty(this, \"registrations\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"sweepTimeout\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // Bound so it can be used directly as setTimeout callback.\n Object.defineProperty(this, \"sweep\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (maxAge) {\n if (maxAge === void 0) { maxAge = REGISTRY_FINALIZE_AFTER; }\n // cancel timeout so we can force sweep anytime\n clearTimeout(_this.sweepTimeout);\n _this.sweepTimeout = undefined;\n var now = Date.now();\n _this.registrations.forEach(function (registration, token) {\n if (now - registration.registeredAt >= maxAge) {\n _this.finalize(registration.value);\n _this.registrations.delete(token);\n }\n });\n if (_this.registrations.size > 0) {\n _this.scheduleSweep();\n }\n }\n });\n // Bound so it can be exported directly as clearTimers test utility.\n Object.defineProperty(this, \"finalizeAllImmediately\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function () {\n _this.sweep(0);\n }\n });\n }\n // Token is actually required with this impl\n Object.defineProperty(TimerBasedFinalizationRegistry.prototype, \"register\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (target, value, token) {\n this.registrations.set(token, {\n value: value,\n registeredAt: Date.now()\n });\n this.scheduleSweep();\n }\n });\n Object.defineProperty(TimerBasedFinalizationRegistry.prototype, \"unregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (token) {\n this.registrations.delete(token);\n }\n });\n Object.defineProperty(TimerBasedFinalizationRegistry.prototype, \"scheduleSweep\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this.sweepTimeout === undefined) {\n this.sweepTimeout = setTimeout(this.sweep, REGISTRY_SWEEP_INTERVAL);\n }\n }\n });\n return TimerBasedFinalizationRegistry;\n}());\nexport { TimerBasedFinalizationRegistry };\nexport var UniversalFinalizationRegistry = typeof FinalizationRegistry !== \"undefined\"\n ? FinalizationRegistry\n : TimerBasedFinalizationRegistry;\n//# sourceMappingURL=UniversalFinalizationRegistry.js.map","import { UniversalFinalizationRegistry } from \"./UniversalFinalizationRegistry\";\nexport var observerFinalizationRegistry = new UniversalFinalizationRegistry(function (adm) {\n var _a;\n (_a = adm.reaction) === null || _a === void 0 ? void 0 : _a.dispose();\n adm.reaction = null;\n});\n//# sourceMappingURL=observerFinalizationRegistry.js.map","import { Reaction } from \"mobx\";\nimport React from \"react\";\nimport { printDebugValue } from \"./utils/printDebugValue\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { observerFinalizationRegistry } from \"./utils/observerFinalizationRegistry\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\n// Required by SSR when hydrating #3669\nvar getServerSnapshot = function () { };\nfunction createReaction(adm) {\n adm.reaction = new Reaction(\"observer\".concat(adm.name), function () {\n var _a;\n adm.stateVersion = Symbol();\n // onStoreChange won't be available until the component \"mounts\".\n // If state changes in between initial render and mount,\n // `useSyncExternalStore` should handle that by checking the state version and issuing update.\n (_a = adm.onStoreChange) === null || _a === void 0 ? void 0 : _a.call(adm);\n });\n}\nexport function useObserver(render, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (isUsingStaticRendering()) {\n return render();\n }\n var admRef = React.useRef(null);\n if (!admRef.current) {\n // First render\n var adm_1 = {\n reaction: null,\n onStoreChange: null,\n stateVersion: Symbol(),\n name: baseComponentName,\n subscribe: function (onStoreChange) {\n // Do NOT access admRef here!\n observerFinalizationRegistry.unregister(adm_1);\n adm_1.onStoreChange = onStoreChange;\n if (!adm_1.reaction) {\n // We've lost our reaction and therefore all subscriptions, occurs when:\n // 1. Timer based finalization registry disposed reaction before component mounted.\n // 2. React \"re-mounts\" same component without calling render in between (typically ).\n // We have to recreate reaction and schedule re-render to recreate subscriptions,\n // even if state did not change.\n createReaction(adm_1);\n // `onStoreChange` won't force update if subsequent `getSnapshot` returns same value.\n // So we make sure that is not the case\n adm_1.stateVersion = Symbol();\n }\n return function () {\n var _a;\n // Do NOT access admRef here!\n adm_1.onStoreChange = null;\n (_a = adm_1.reaction) === null || _a === void 0 ? void 0 : _a.dispose();\n adm_1.reaction = null;\n };\n },\n getSnapshot: function () {\n // Do NOT access admRef here!\n return adm_1.stateVersion;\n }\n };\n admRef.current = adm_1;\n }\n var adm = admRef.current;\n if (!adm.reaction) {\n // First render or reaction was disposed by registry before subscribe\n createReaction(adm);\n // StrictMode/ConcurrentMode/Suspense may mean that our component is\n // rendered and abandoned multiple times, so we need to track leaked\n // Reactions.\n observerFinalizationRegistry.register(admRef, adm, adm);\n }\n React.useDebugValue(adm.reaction, printDebugValue);\n useSyncExternalStore(\n // Both of these must be stable, otherwise it would keep resubscribing every render.\n adm.subscribe, adm.getSnapshot, getServerSnapshot);\n // render the original component, but have the\n // reaction track the observables, so that rendering\n // can be invalidated (see above) once a dependency changes\n var renderResult;\n var exception;\n adm.reaction.track(function () {\n try {\n renderResult = render();\n }\n catch (e) {\n exception = e;\n }\n });\n if (exception) {\n throw exception; // re-throw any exceptions caught during rendering\n }\n return renderResult;\n}\n//# sourceMappingURL=useObserver.js.map","import { forwardRef, memo } from \"react\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { useObserver } from \"./useObserver\";\nvar warnObserverOptionsDeprecated = true;\nvar hasSymbol = typeof Symbol === \"function\" && Symbol.for;\n// Using react-is had some issues (and operates on elements, not on types), see #608 / #609\nvar ReactForwardRefSymbol = hasSymbol\n ? Symbol.for(\"react.forward_ref\")\n : typeof forwardRef === \"function\" && forwardRef(function (props) { return null; })[\"$$typeof\"];\nvar ReactMemoSymbol = hasSymbol\n ? Symbol.for(\"react.memo\")\n : typeof memo === \"function\" && memo(function (props) { return null; })[\"$$typeof\"];\n// n.b. base case is not used for actual typings or exported in the typing files\nexport function observer(baseComponent, \n// TODO remove in next major\noptions) {\n var _a;\n if (process.env.NODE_ENV !== \"production\" && warnObserverOptionsDeprecated && options) {\n warnObserverOptionsDeprecated = false;\n console.warn(\"[mobx-react-lite] `observer(fn, { forwardRef: true })` is deprecated, use `observer(React.forwardRef(fn))`\");\n }\n if (ReactMemoSymbol && baseComponent[\"$$typeof\"] === ReactMemoSymbol) {\n throw new Error(\"[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.\");\n }\n // The working of observer is explained step by step in this talk: https://www.youtube.com/watch?v=cPF4iBedoF0&feature=youtu.be&t=1307\n if (isUsingStaticRendering()) {\n return baseComponent;\n }\n var useForwardRef = (_a = options === null || options === void 0 ? void 0 : options.forwardRef) !== null && _a !== void 0 ? _a : false;\n var render = baseComponent;\n var baseComponentName = baseComponent.displayName || baseComponent.name;\n // If already wrapped with forwardRef, unwrap,\n // so we can patch render and apply memo\n if (ReactForwardRefSymbol && baseComponent[\"$$typeof\"] === ReactForwardRefSymbol) {\n useForwardRef = true;\n render = baseComponent[\"render\"];\n if (typeof render !== \"function\") {\n throw new Error(\"[mobx-react-lite] `render` property of ForwardRef was not a function\");\n }\n }\n var observerComponent = function (props, ref) {\n return useObserver(function () { return render(props, ref); }, baseComponentName);\n };\n observerComponent.displayName = baseComponent.displayName;\n Object.defineProperty(observerComponent, \"name\", {\n value: baseComponent.name,\n writable: true,\n configurable: true\n });\n // Support legacy context: `contextTypes` must be applied before `memo`\n if (baseComponent.contextTypes) {\n ;\n observerComponent.contextTypes = baseComponent.contextTypes;\n }\n if (useForwardRef) {\n // `forwardRef` must be applied prior `memo`\n // `forwardRef(observer(cmp))` throws:\n // \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))\"\n observerComponent = forwardRef(observerComponent);\n }\n // memo; we are not interested in deep updates\n // in props; we assume that if deep objects are changed,\n // this is in observables, which would have been tracked anyway\n observerComponent = memo(observerComponent);\n copyStaticProperties(baseComponent, observerComponent);\n if (\"production\" !== process.env.NODE_ENV) {\n Object.defineProperty(observerComponent, \"contextTypes\", {\n set: function () {\n var _a, _b;\n throw new Error(\"[mobx-react-lite] `\".concat(this.displayName || ((_a = this.type) === null || _a === void 0 ? void 0 : _a.displayName) || ((_b = this.type) === null || _b === void 0 ? void 0 : _b.name) || \"Component\", \".contextTypes` must be set before applying `observer`.\"));\n }\n });\n }\n return observerComponent;\n}\n// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\nvar hoistBlackList = {\n $$typeof: true,\n render: true,\n compare: true,\n type: true,\n // Don't redefine `displayName`,\n // it's defined as getter-setter pair on `memo` (see #3192).\n displayName: true\n};\nfunction copyStaticProperties(base, target) {\n Object.keys(base).forEach(function (key) {\n if (!hoistBlackList[key]) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n//# sourceMappingURL=observer.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { useDeprecated } from \"./utils/utils\";\nimport { observable, runInAction } from \"mobx\";\nimport { useState } from \"react\";\nexport function useAsObservableSource(current) {\n if (\"production\" !== process.env.NODE_ENV)\n useDeprecated(\"[mobx-react-lite] 'useAsObservableSource' is deprecated, please store the values directly in an observable, for example by using 'useLocalObservable', and sync future updates using 'useEffect' when needed. See the README for examples.\");\n var _a = __read(useState(function () { return observable(current, {}, { deep: false }); }), 1), res = _a[0];\n runInAction(function () {\n Object.assign(res, current);\n });\n return res;\n}\n//# sourceMappingURL=useAsObservableSource.js.map","var _a;\nimport \"./utils/assertEnvironment\";\nimport { unstable_batchedUpdates as batch } from \"./utils/reactBatchedUpdates\";\nimport { observerBatching } from \"./utils/observerBatching\";\nimport { useDeprecated } from \"./utils/utils\";\nimport { useObserver as useObserverOriginal } from \"./useObserver\";\nimport { enableStaticRendering } from \"./staticRendering\";\nimport { observerFinalizationRegistry } from \"./utils/observerFinalizationRegistry\";\nobserverBatching(batch);\nexport { isUsingStaticRendering, enableStaticRendering } from \"./staticRendering\";\nexport { observer } from \"./observer\";\nexport { Observer } from \"./ObserverComponent\";\nexport { useLocalObservable } from \"./useLocalObservable\";\nexport { useLocalStore } from \"./useLocalStore\";\nexport { useAsObservableSource } from \"./useAsObservableSource\";\nexport { observerFinalizationRegistry as _observerFinalizationRegistry };\nexport var clearTimers = (_a = observerFinalizationRegistry[\"finalizeAllImmediately\"]) !== null && _a !== void 0 ? _a : (function () { });\nexport function useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (\"production\" !== process.env.NODE_ENV) {\n useDeprecated(\"[mobx-react-lite] 'useObserver(fn)' is deprecated. Use `{fn}` instead, or wrap the entire component in `observer`.\");\n }\n return useObserverOriginal(fn, baseComponentName);\n}\nexport { isObserverBatched, observerBatching } from \"./utils/observerBatching\";\nexport function useStaticRendering(enable) {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[mobx-react-lite] 'useStaticRendering' is deprecated, use 'enableStaticRendering' instead\");\n }\n enableStaticRendering(enable);\n}\n//# sourceMappingURL=index.js.map","import { createContext } from '@music163/tango-helpers';\nconst [TangoEngineProvider, useTangoEngine] = createContext({\n name: 'TangoEngineContext',\n});\nexport { TangoEngineProvider };\nexport const useWorkspace = () => {\n var _a;\n return (_a = useTangoEngine()) === null || _a === void 0 ? void 0 : _a.engine.workspace;\n};\nexport const useDesigner = () => {\n var _a;\n return (_a = useTangoEngine()) === null || _a === void 0 ? void 0 : _a.engine.designer;\n};\nexport const useWorkspaceData = () => {\n var _a, _b, _c, _d, _e;\n const ctx = useTangoEngine();\n const workspace = useWorkspace();\n const modelVariables = []; // 绑定变量列表\n const storeActionVariables = []; // 模型中的所有 actions\n const storeVariables = []; // 模型中的所有变量\n const serviceVariables = []; // 服务中的所有变量\n Object.values(workspace.storeModules).forEach((file) => {\n const prefix = `stores.${file.name}`;\n const states = file.states.map((item) => ({\n title: item.name,\n key: `${prefix}.${item.name}`,\n raw: item.code,\n showRemoveButton: true,\n }));\n const actions = file.actions.map((item) => ({\n title: item.name,\n key: `${prefix}.${item.name}`,\n type: 'function',\n raw: item.code,\n showRemoveButton: true,\n }));\n modelVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n children: states,\n showAddButton: true,\n });\n storeActionVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n children: actions,\n });\n storeVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n children: [...states, ...actions],\n showAddButton: true,\n });\n });\n Object.values(workspace.serviceModules).forEach((file) => {\n const prefix = file.name !== 'index' ? `services.${file.name}` : 'services';\n serviceVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n showAddButton: true,\n children: Object.keys(file.serviceFunctions || {}).map((key) => ({\n title: key,\n key: [prefix, key].join('.'),\n type: 'function',\n showRemoveButton: true,\n })),\n });\n });\n // 路由选项列表\n const routeOptions = (_a = workspace.pages) === null || _a === void 0 ? void 0 : _a.map((item) => ({\n label: `${item.name} (${item.path})`,\n value: item.path,\n }));\n let actionVariables = [\n buildVariableOptions('数据模型', '$stores', storeActionVariables),\n buildVariableOptions('服务函数', '$services', serviceVariables),\n ];\n if ((_b = ctx.config) === null || _b === void 0 ? void 0 : _b.customActionVariables) {\n actionVariables = actionVariables.concat((_c = ctx.config) === null || _c === void 0 ? void 0 : _c.customActionVariables);\n }\n let expressionVariables = [\n buildVariableOptions('数据模型', '$stores', storeVariables),\n buildVariableOptions('服务函数', '$services', serviceVariables),\n ];\n if ((_d = ctx.config) === null || _d === void 0 ? void 0 : _d.customExpressionVariables) {\n expressionVariables = expressionVariables.concat((_e = ctx.config) === null || _e === void 0 ? void 0 : _e.customExpressionVariables);\n }\n return {\n modelVariables: [buildVariableOptions('数据模型', 'stores', modelVariables)],\n actionVariables,\n storeVariables,\n serviceVariables,\n expressionVariables,\n routeOptions,\n };\n};\nfunction buildVariableOptions(title, key, children) {\n return {\n key,\n title,\n children,\n };\n}\n","import { extendTheme } from 'coral-system';\nexport default extendTheme({\n colors: {\n primary: {\n 10: '#e8f3ff',\n 20: '#bedaff',\n 30: '#94bfff',\n 40: '#6aa1ff',\n 50: '#4080ff',\n 60: '#165dff',\n 70: '#0e42d2',\n },\n line: {\n normal: '#e5e6eb',\n },\n background: {\n normal: '#f3f3f4',\n secondary: '#e5e6eb',\n },\n text: {\n title: '#1d2129',\n body: '#4e5969',\n note: '#86909c',\n placeholder: '#c9cdd4',\n },\n custom: {\n topNavBg: '#222',\n topNavColor: '#fff',\n topNavBorderColor: '#222',\n toolbarDividerColor: 'gray.60',\n toolbarButtonBg: 'rgba(223, 223, 223, 0.08)',\n toolbarButtonBgHover: '#4080ff',\n toolbarButtonBgDisabled: 'rgba(223,223,223, 0.08)',\n toolbarButtonBgActive: '#4080ff',\n toolbarButtonTextColor: '#FFF',\n toolbarButtonTextColorHover: '#FFF',\n toolbarButtonTextColorDisabled: 'hsla(0,0%,100%,0.3)',\n toolbarButtonTextColorActive: '#fff',\n sidebarBg: '#fff',\n sidebarExpandBg: '#fff',\n sidebarItemActiveBg: '#f2f3f5',\n sidebarItemHoverBg: '#f2f3f5',\n viewportBg: '#f0f2f5',\n },\n },\n radii: {\n s: '2px',\n m: '2px',\n l: '4px',\n xl: '8px',\n xxl: '16px',\n },\n});\n","import React, { useMemo } from 'react';\nimport { SystemProvider, extendTheme } from 'coral-system';\nimport { ConfigProvider } from 'antd';\nimport { TangoEngineProvider } from '@music163/tango-context';\nimport zhCN from 'antd/lib/locale/zh_CN';\nimport { DesignerProvider } from './context';\nimport defaultTheme from './themes/default';\n/**\n * 设计器状态和设置容器\n * @param props\n * @returns\n */\nexport function Designer(props) {\n const { engine, config, theme: themeProp, sandboxQuery, remoteServices = {}, children } = props;\n const theme = useMemo(() => extendTheme(themeProp, defaultTheme), [themeProp]);\n return (React.createElement(SystemProvider, { theme: theme, prefix: \"--tango\" },\n React.createElement(ConfigProvider, { locale: zhCN },\n React.createElement(TangoEngineProvider, { value: { engine, config } },\n React.createElement(DesignerProvider, { value: { sandboxQuery, remoteServices } }, children)))));\n}\n","import React from 'react';\nimport { Box } from 'coral-system';\n/**\n * 设计器面板\n */\nexport function DesignerPanel(props) {\n const { header, logo, description, actions, children } = props;\n return (React.createElement(Box, { height: \"100vh\", overflow: \"hidden\", className: \"DesignerPanel\" }, header !== null && header !== void 0 ? header : (React.createElement(Box, { display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", height: \"48px\", bg: \"colors.custom.topNavBg\", color: \"colors.custom.topNavColor\", borderBottom: \"solid\", borderColor: \"colors.custom.topNavBorderColor\", className: \"DesignerPanelHeader\" },\n React.createElement(Box, { display: \"flex\", alignItems: \"center\" },\n logo,\n description),\n React.createElement(Box, { flex: \"1\" }, actions))),\n React.createElement(Box, { display: \"flex\", height: \"calc(100vh - 48px)\", overflow: \"hidden\", className: \"DesignerPanelBody\" }, children)));\n}\n","import React from 'react';\nimport { Box } from 'coral-system';\nexport function WorkspacePanel({ children }) {\n return (React.createElement(Box, { flex: \"1\", display: \"flex\", flexDirection: \"column\", overflow: \"hidden\", bg: \"colors.custom.viewportBg\", position: \"relative\", className: \"WorkspacePanel\" }, children));\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { isFunction } from './assert';\nexport function noop(...args) { }\nexport function runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nexport function callAll(...fns) {\n return function mergedFn(...args) {\n fns.forEach((fn) => {\n if (isFunction(fn)) {\n fn === null || fn === void 0 ? void 0 : fn(...args);\n }\n });\n };\n}\n","import React from 'react';\nimport Icon from '@ant-design/icons';\nexport function createIcon(component, displayName) {\n const CustomIcon = (props) => (React.createElement(Icon, Object.assign({ component: component }, props)));\n if (displayName) {\n CustomIcon.displayName = displayName;\n }\n return CustomIcon;\n}\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst CodeOutlinedSvg = () => (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"m31 16-7 7-1.41-1.41 5.58-5.59-5.58-5.59 1.41-1.41z\" }),\n React.createElement(\"path\", { d: \"m1 16 7-7 1.41 1.41-5.58 5.59 5.58 5.59-1.41 1.41z\" }),\n React.createElement(\"path\", { d: \"m5.91 15h20.17v2h-20.17z\", transform: \"matrix(.25881905 -.96592583 .96592583 .25881905 -3.6 27.31)\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\", transform: \"matrix(0 -1 1 0 0 32)\" })));\nexport const CodeOutlined = createIcon(CodeOutlinedSvg, 'CodeOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst LineDashedOutlinedSvg = () => (React.createElement(\"svg\", { viewBox: \"0 0 1025 1024\", version: \"1.1\", xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"M212.8 468.8H43.2C17.6 468.8 0 486.4 0 512s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM980.8 468.8H811.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM596.8 468.8H427.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2z\" })));\nexport const LineDashedOutlined = createIcon(LineDashedOutlinedSvg, 'LineSolidOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst LineSolidOutlinedSvg = () => (React.createElement(\"svg\", { viewBox: \"0 0 1024 1024\", version: \"1.1\", xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"M141.21142578 496.55047632h741.57714844v30.89904736H141.21142578z\" })));\nexport const LineSolidOutlined = createIcon(LineSolidOutlinedSvg, 'LineSolidOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelFilledLeftOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm0 22h-16v-20h16z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelFilledLeftOutlined = createIcon(OpenPanelFilledLeftOutlinedSvg, 'OpenPanelFilledLeftOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelFilledRightOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelFilledRightOutlined = createIcon(OpenPanelFilledRightOutlinedSvg, 'OpenPanelFilledRightOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelLeftOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h6v20h-6zm24 20h-16v-20h16z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelLeftOutlined = createIcon(OpenPanelLeftOutlinedSvg, 'OpenPanelLeftOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelRightOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16zm24 20h-6v-20h6z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelRightOutlined = createIcon(OpenPanelRightOutlinedSvg, 'OpenPanelRightOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst UndoOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m20 10h-12.1851l3.5874-3.5859-1.4023-1.4141-6 6 6 6 1.4023-1.4146-3.5844-3.5854h12.1821a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16z\" })));\nexport const UndoOutlined = createIcon(UndoOutlinedSvg, 'UndoOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst RedoOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m12 10h12.1851l-3.5874-3.5859 1.4023-1.4141 6 6-6 6-1.4023-1.4146 3.5844-3.5854h-12.1821a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16z\" })));\nexport const RedoOutlined = createIcon(RedoOutlinedSvg, 'RedoOutlined');\n","import { __rest } from \"tslib\";\nimport { Tooltip } from 'antd';\nimport React from 'react';\nimport { css, Button, Link } from 'coral-system';\nimport cx from 'classnames';\nconst actionStyle = css `\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n outline: none;\n border: 0;\n border-radius: var(--tango-radii-s);\n color: var(--tango-colors-text2);\n background-color: transparent;\n\n &:hover {\n background-color: var(--tango-colors-fill2);\n }\n\n &.small {\n width: 24px;\n height: 24px;\n }\n\n &.outline {\n background-color: var(--tango-colors-fill1);\n }\n\n &.outline:hover {\n background-color: var(--tango-colors-fill3);\n }\n\n &.disabled {\n pointer-events: none;\n color: var(--tango-colors-text4);\n }\n`;\nexport function Action(_a) {\n var { icon, tooltip, href, size, shape, disabled, className, children } = _a, rest = __rest(_a, [\"icon\", \"tooltip\", \"href\", \"size\", \"shape\", \"disabled\", \"className\", \"children\"]);\n const classNames = cx({\n 'tango-action': true,\n 'link-action': !!href,\n small: size === 'small',\n outline: shape === 'outline',\n disabled,\n }, className);\n let ret;\n if (href) {\n ret = (React.createElement(Link, Object.assign({ className: classNames, css: actionStyle, href: href, isExternal: true }, rest), icon !== null && icon !== void 0 ? icon : children));\n }\n else {\n ret = (React.createElement(Button, Object.assign({ type: \"button\", className: classNames, css: actionStyle }, rest), icon !== null && icon !== void 0 ? icon : children));\n }\n if (tooltip) {\n return React.createElement(Tooltip, { title: tooltip }, ret);\n }\n return ret;\n}\n","// This icon file is generated automatically.\nvar PlusSquareOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z\" } }] }, \"name\": \"plus-square\", \"theme\": \"outlined\" };\nexport default PlusSquareOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport PlusSquareOutlinedSvg from \"@ant-design/icons-svg/es/asn/PlusSquareOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar PlusSquareOutlined = function PlusSquareOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: PlusSquareOutlinedSvg\n }));\n};\nPlusSquareOutlined.displayName = 'PlusSquareOutlined';\nexport default /*#__PURE__*/React.forwardRef(PlusSquareOutlined);","// This icon file is generated automatically.\nvar DownOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" } }] }, \"name\": \"down\", \"theme\": \"outlined\" };\nexport default DownOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport DownOutlinedSvg from \"@ant-design/icons-svg/es/asn/DownOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar DownOutlined = function DownOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: DownOutlinedSvg\n }));\n};\nDownOutlined.displayName = 'DownOutlined';\nexport default /*#__PURE__*/React.forwardRef(DownOutlined);","import React from 'react';\nimport { Box, css, Text } from 'coral-system';\nimport { Button, Dropdown, Input, Menu } from 'antd';\nimport { DownOutlined, PlusSquareOutlined } from '@ant-design/icons';\nconst actionInputStyle = css `\n overflow: auto;\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n cursor: pointer;\n user-select: none;\n\n display: flex;\n align-items: center;\n\n .action-input-text {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--tango-colors-text3);\n\n &:hover {\n color: var(--tango-colors-text2);\n }\n }\n\n .anticon-down {\n color: var(--tango-colors-text-placeholder);\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\nconst inputStyle = { width: 'calc(100% - 82px)' };\nexport function ActionSelect({ showInput = false, defaultInputValue, text, options = [], onSelect, onInputChange, }) {\n const menu = (React.createElement(Menu, { onClick: ({ key }) => onSelect(key) }, options.map((item) => (React.createElement(Menu.Item, { key: item.value },\n React.createElement(Box, { display: \"flex\", alignItems: \"center\", minWidth: 200, columnGap: \"m\" },\n React.createElement(Box, { flex: \"1\" }, item.label),\n React.createElement(Text, { fontSize: \"12px\", color: \"text.note\" }, item.value)))))));\n if (showInput) {\n return (React.createElement(Input.Group, { compact: true },\n React.createElement(Input, { placeholder: \"\\u8BF7\\u8F93\\u5165\\u6587\\u672C\", defaultValue: defaultInputValue, style: inputStyle, onBlur: (e) => {\n onInputChange && onInputChange(e.target.value);\n }, allowClear: true }),\n React.createElement(Dropdown, { overlay: menu },\n React.createElement(Button, { icon: React.createElement(PlusSquareOutlined, null) }, \"\\u9884\\u8BBE\"))));\n }\n return (React.createElement(Dropdown, { overlay: menu, trigger: ['click'] },\n React.createElement(Box, { border: \"solid\", borderColor: \"line.normal\", borderRadius: \"s\", height: \"32px\", lineHeight: \"32px\", px: \"m\", mb: \"m\", css: actionInputStyle },\n React.createElement(Box, { className: \"action-input-text\", color: \"text.body\" }, text),\n React.createElement(DownOutlined, null))));\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { SingleEditor } from 'react-monaco-editor-lite';\nimport { Box } from 'coral-system';\nexport function SingleMonacoEditor(props) {\n const { language, options: optionsProp = {}, height = '100%', width = '100%', hasBorder = false } = props, rest = __rest(props, [\"language\", \"options\", \"height\", \"width\", \"hasBorder\"]);\n const options = Object.assign({ language }, optionsProp);\n const boxProps = hasBorder\n ? {\n border: 'solid',\n borderColor: 'line.normal',\n borderRadius: 's',\n }\n : {};\n return (React.createElement(Box, Object.assign({ width: width, height: height }, boxProps),\n React.createElement(SingleEditor, Object.assign({ options: options }, rest))));\n}\nexport { MultiEditor } from 'react-monaco-editor-lite';\n","import { __awaiter } from \"tslib\";\nimport React, { useState } from 'react';\nimport { Button, Input } from 'antd';\nimport { Box, Text, css } from 'coral-system';\nimport { CloseOutlined, RobotOutlined } from '@ant-design/icons';\nconst chatBoxStyle = css `\n position: relative;\n .ant-btn {\n position: absolute;\n bottom: 6px;\n right: 6px;\n }\n textarea {\n border: 0;\n }\n`;\nexport function ChatInput({ title = '智能编程助手', showCloseIcon = true, placeholder = '请简单描述你要执行的动作', onGenerate, onApply, onClose, }) {\n const [text, setText] = useState('');\n const [preview, setPreview] = useState('');\n const [loading, setLoading] = useState(false);\n return (React.createElement(Box, { border: \"solid\", borderColor: \"line2\", borderRadius: \"m\", position: \"relative\" },\n React.createElement(Box, { display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", bg: \"fill2\", px: \"m\", py: \"s\", borderBottom: \"solid\", borderBottomColor: \"line2\" },\n React.createElement(Box, { fontSize: \"14px\" },\n React.createElement(RobotOutlined, null),\n React.createElement(Text, { ml: \"m\", userSelect: \"none\" }, title)),\n showCloseIcon && React.createElement(CloseOutlined, { onClick: onClose })),\n React.createElement(Box, { css: chatBoxStyle },\n React.createElement(Input.TextArea, { rows: 3, value: text, onChange: (e) => setText(e.target.value), placeholder: placeholder }),\n React.createElement(Button, { disabled: !text, size: \"small\", loading: loading, onClick: () => __awaiter(this, void 0, void 0, function* () {\n setLoading(true);\n const ret = yield onGenerate(text);\n setLoading(false);\n ret && setPreview(ret);\n }) }, \"\\u751F\\u6210\")),\n React.createElement(Box, { minHeight: 48, background: \"fill2\", p: \"m\", fontSize: \"12px\", css: chatBoxStyle },\n React.createElement(Text, { as: \"code\" },\n \"\\u7ED3\\u679C\\uFF1A\",\n preview || '暂无'),\n React.createElement(Button, { size: \"small\", disabled: !preview, onClick: () => onApply(preview) }, \"\\u5E94\\u7528\"))));\n}\n","import React from 'react';\nimport { Box } from 'coral-system';\nimport { logger } from '@music163/tango-helpers';\nexport class ErrorBoundary extends React.Component {\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n logger.error(error);\n return { hasError: true };\n }\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error, errorInfo);\n }\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (React.createElement(Box, { as: \"h1\", color: \"red\" }, \"Something went wrong.\"));\n }\n return this.props.children;\n }\n}\n","// This icon file is generated automatically.\nvar FileOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z\" } }] }, \"name\": \"file\", \"theme\": \"outlined\" };\nexport default FileOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport FileOutlinedSvg from \"@ant-design/icons-svg/es/asn/FileOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar FileOutlined = function FileOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: FileOutlinedSvg\n }));\n};\nFileOutlined.displayName = 'FileOutlined';\nexport default /*#__PURE__*/React.forwardRef(FileOutlined);","// This icon file is generated automatically.\nvar FolderOpenOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z\" } }] }, \"name\": \"folder-open\", \"theme\": \"outlined\" };\nexport default FolderOpenOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport FolderOpenOutlinedSvg from \"@ant-design/icons-svg/es/asn/FolderOpenOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar FolderOpenOutlined = function FolderOpenOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: FolderOpenOutlinedSvg\n }));\n};\nFolderOpenOutlined.displayName = 'FolderOpenOutlined';\nexport default /*#__PURE__*/React.forwardRef(FolderOpenOutlined);","// This icon file is generated automatically.\nvar FolderOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z\" } }] }, \"name\": \"folder\", \"theme\": \"outlined\" };\nexport default FolderOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport FolderOutlinedSvg from \"@ant-design/icons-svg/es/asn/FolderOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar FolderOutlined = function FolderOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: FolderOutlinedSvg\n }));\n};\nFolderOutlined.displayName = 'FolderOutlined';\nexport default /*#__PURE__*/React.forwardRef(FolderOutlined);","import React from 'react';\nimport { css, Box } from 'coral-system';\nimport { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons';\nconst fileItemStyle = css `\n user-select: none;\n transition: all 0.15s ease-in-out;\n\n > .anticon {\n margin-right: 4px;\n }\n\n &:hover {\n background-color: var(--tango-colors-gray-10);\n }\n\n &[data-active='true'] {\n background-color: var(--tango-colors-gray-30);\n }\n`;\nexport class File extends React.PureComponent {\n constructor() {\n super(...arguments);\n this.selectFile = () => {\n if (this.props.selectFile) {\n this.props.selectFile(this.props.path);\n }\n };\n }\n render() {\n const fileName = this.props.path.split('/').filter(Boolean).pop();\n return (React.createElement(Box, { as: \"li\", \"data-active\": this.props.active, onClick: this.props.selectFile ? this.selectFile : this.props.onClick, display: \"flex\", alignItems: \"center\", height: \"28px\", py: \"4px\", pr: \"12px\", pl: 16 * this.props.depth, css: fileItemStyle },\n this.props.selectFile ? React.createElement(FileOutlined, null) : React.createElement(DirectoryIcon, { isOpen: this.props.isDirOpen }),\n fileName));\n }\n}\nfunction DirectoryIcon({ isOpen }) {\n return isOpen ? React.createElement(FolderOpenOutlined, null) : React.createElement(FolderOutlined, null);\n}\n","import React from 'react';\nimport { File } from './file';\nimport { ModuleList } from './module-list';\nexport class Directory extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n open: true,\n };\n this.toggleOpen = () => {\n this.setState((state) => ({ open: !state.open }));\n };\n }\n render() {\n const { prefixedPath, files, selectFile, activePath, depth } = this.props;\n return (React.createElement(\"div\", { key: prefixedPath },\n React.createElement(File, { depth: depth, isDirOpen: this.state.open, onClick: this.toggleOpen, path: prefixedPath + '/' }),\n this.state.open ? (React.createElement(ModuleList, { activePath: activePath, depth: depth, files: files, prefixedPath: prefixedPath, selectFile: selectFile })) : null));\n }\n}\n","import React from 'react';\nimport { Directory } from './directory';\nimport { File } from './file';\nexport class ModuleList extends React.PureComponent {\n render() {\n const { depth = 0, activePath, selectFile, prefixedPath, files } = this.props;\n const fileListWithoutPrefix = files\n .filter((file) => file.startsWith(prefixedPath))\n .map((file) => file.substring(prefixedPath.length));\n const directoriesToShow = new Set(fileListWithoutPrefix\n .filter((file) => file.includes('/'))\n .map((file) => `${prefixedPath}${file.split('/')[0]}/`));\n const filesToShow = fileListWithoutPrefix\n .filter((file) => !file.includes('/'))\n .map((file) => ({ path: `${prefixedPath}${file}` }));\n return (React.createElement(\"div\", null,\n Array.from(directoriesToShow).map((dir) => (React.createElement(Directory, { key: dir, activePath: activePath, depth: depth + 1, files: files, prefixedPath: dir, selectFile: selectFile }))),\n filesToShow.map((file) => (React.createElement(File, { key: file.path, active: activePath === file.path, depth: depth + 1, path: file.path, selectFile: this.props.selectFile })))));\n }\n}\n","// This icon file is generated automatically.\nvar UpOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" } }] }, \"name\": \"up\", \"theme\": \"outlined\" };\nexport default UpOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport UpOutlinedSvg from \"@ant-design/icons-svg/es/asn/UpOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar UpOutlined = function UpOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: UpOutlinedSvg\n }));\n};\nUpOutlined.displayName = 'UpOutlined';\nexport default /*#__PURE__*/React.forwardRef(UpOutlined);","import { useCallback, useEffect, useRef } from 'react';\n/**\n * @param callback\n * @param deps\n * @returns\n */\nexport function useCallbackRef(callback, deps = []) {\n const callbackRef = useRef(callback);\n useEffect(() => {\n callbackRef.current = callback;\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useCallback(((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), deps);\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Box, css } from 'coral-system';\nimport { UpOutlined } from '@ant-design/icons';\nimport { useControllableState } from '@music163/tango-helpers';\nconst headerStyle = css `\n user-select: none;\n\n .anticon-up {\n margin-right: 8px;\n color: var(--tango-colors-text2);\n transition: transform 0.2s ease 0s;\n }\n`;\nexport function CollapsePanel(props) {\n const { title, extra, children, collapsed: collapsedProp, defaultCollapsed = false, onCollapse, stickyHeader, showBottomBorder = true, headerProps, bodyProps } = props, rest = __rest(props, [\"title\", \"extra\", \"children\", \"collapsed\", \"defaultCollapsed\", \"onCollapse\", \"stickyHeader\", \"showBottomBorder\", \"headerProps\", \"bodyProps\"]);\n const [collapsed, setCollapsed] = useControllableState({\n value: collapsedProp,\n defaultValue: defaultCollapsed,\n onChange: onCollapse,\n });\n const iconStyle = {\n transform: collapsed ? undefined : 'rotate(-180deg)',\n };\n const stickHeaderProps = stickyHeader\n ? {\n position: 'sticky',\n top: '0px',\n zIndex: 1,\n bg: 'white',\n }\n : {};\n const CollapsePanelBorderStyle = showBottomBorder\n ? {\n borderBottom: 'solid',\n borderBottomColor: 'line2',\n }\n : {};\n return (React.createElement(Box, Object.assign({ className: \"CollapsePanel\" }, CollapsePanelBorderStyle, rest),\n React.createElement(Box, Object.assign({ display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\", className: \"CollapsePanelHeader\", onClick: () => setCollapsed(!collapsed), p: \"m\" }, stickHeaderProps, headerProps, { css: headerStyle }),\n React.createElement(Box, { display: \"flex\", alignItems: \"center\", fontSize: \"14px\", fontWeight: \"500\" },\n React.createElement(UpOutlined, { style: iconStyle }),\n title),\n React.createElement(Box, null, extra)),\n React.createElement(Box, Object.assign({ className: \"CollapsePanelBody\", display: collapsed ? 'none' : 'block' }, bodyProps), children)));\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { useCallbackRef } from './use-callback-ref';\nexport function useControllableProp(prop, state) {\n const controlled = typeof prop !== 'undefined';\n const value = controlled ? prop : state;\n return useMemo(() => [controlled, value], [controlled, value]);\n}\nexport function useControllableState(props) {\n const { value: valueProp, defaultValue, onChange, shouldUpdate = (prev, next) => prev !== next, } = props;\n const onChangeProp = useCallbackRef(onChange);\n const shouldUpdateProp = useCallbackRef(shouldUpdate);\n const [uncontrolledState, setUncontrolledState] = useState(defaultValue);\n const controlled = valueProp !== undefined;\n const value = controlled ? valueProp : uncontrolledState;\n const setValue = useCallback((next) => {\n const setter = next;\n const nextValue = typeof next === 'function' ? setter(value) : next;\n if (!shouldUpdateProp(value, nextValue)) {\n return;\n }\n if (!controlled) {\n setUncontrolledState(nextValue);\n }\n onChangeProp(nextValue);\n }, [controlled, onChangeProp, value, shouldUpdateProp]);\n return [value, setValue];\n}\n","import { __rest } from \"tslib\";\nimport { Tag, Tooltip } from 'antd';\nimport React from 'react';\nexport function ColorTag(_a) {\n var { tooltip, children } = _a, rest = __rest(_a, [\"tooltip\", \"children\"]);\n const tag = React.createElement(Tag, Object.assign({}, rest), children);\n if (tooltip) {\n return React.createElement(Tooltip, { title: tooltip }, tag);\n }\n return tag;\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport Icon from '@ant-design/icons';\n/**\n * 只能在 Designer 里面用,其他地方用不了,依赖 iconfont 脚本提前载入\n */\nexport function IconFont(props) {\n const { type, children } = props, restProps = __rest(props, [\"type\", \"children\"]);\n // children > type\n let content = null;\n if (props.type) {\n content = React.createElement(\"use\", { xlinkHref: `#${type}` });\n }\n if (children) {\n content = children;\n }\n return React.createElement(Icon, Object.assign({}, restProps), content);\n}\nIconFont.displayName = 'IconFont';\n","import React from 'react';\nimport cx from 'classnames';\nimport { css, Box, coral, Text } from 'coral-system';\nimport { EditOutlined, DeleteOutlined } from '@ant-design/icons';\nimport { noop } from '@music163/tango-helpers';\nimport { Popconfirm } from 'antd';\nconst menuStyle = css `\n font-family: Consolas, Menlo, Courier, monospace;\n font-size: 14px;\n`;\nconst MenuItem = coral('div', css `\n display: flex;\n justify-content: space-between;\n align-items: center;\n user-select: none;\n height: 28px;\n padding: 0 12px;\n cursor: pointer;\n\n button {\n display: none;\n background: transparent;\n border: 0;\n cursor: pointer;\n }\n\n .tango-menu-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 90%;\n }\n\n &:hover button {\n display: inline-block;\n }\n\n &:hover {\n background-color: var(--tango-colors-gray-10);\n }\n\n &.active {\n background-color: var(--tango-colors-primary-10);\n }\n `);\nexport function Menu({ items = [], activeKey, onItemClick = noop, onEdit = noop, onDelete = noop, }) {\n return (React.createElement(Box, { className: \"tango-menu\", css: menuStyle }, items.map((item) => (React.createElement(MenuItem, { key: item.key, className: cx({ active: activeKey === item.key }), onClick: () => onItemClick(item.key) },\n React.createElement(\"div\", { className: \"tango-menu-label\" },\n React.createElement(Text, { color: \"text.body\", title: item.label }, item.label),\n React.createElement(Text, { ml: \"m\", color: \"text.placeholder\" }, item.note)),\n React.createElement(\"div\", { className: \"tango-menu-actions\" },\n item.editable && (React.createElement(\"button\", { onClick: () => onEdit(item.key) },\n React.createElement(EditOutlined, null))),\n item.deletable && (React.createElement(Popconfirm, { title: item.deletableConfirm || '确定执行此操作吗?', okText: \"\\u786E\\u5B9A\", cancelText: \"\\u53D6\\u6D88\", onConfirm: (e) => {\n // 阻止冒泡,否则删除的时候会有 Bug\n e.stopPropagation();\n onDelete(item.key);\n } },\n React.createElement(\"button\", null,\n React.createElement(DeleteOutlined, null))))))))));\n}\n","import { __rest } from \"tslib\";\nimport React, { useMemo } from 'react';\nimport cx from 'classnames';\nimport { css, Box, Text } from 'coral-system';\nimport { merge } from '@music163/tango-helpers';\nconst headerStyle = css `\n user-select: none;\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\nexport function Panel(_a) {\n var { shape = 'light', title, subTitle: subTitleProp, extra, headerProps: headerPropsProp, bodyProps: bodyPropsProp, children, className } = _a, rest = __rest(_a, [\"shape\", \"title\", \"subTitle\", \"extra\", \"headerProps\", \"bodyProps\", \"children\", \"className\"]);\n const systemProps = useMemo(() => {\n let rootProps;\n let headerProps;\n let bodyProps;\n if (shape === 'solid') {\n rootProps = {\n border: 'solid',\n borderColor: 'line.normal',\n };\n headerProps = {\n borderBottom: 'solid',\n borderBottomColor: 'line.normal',\n p: 'm',\n lineHeight: '24px',\n };\n bodyProps = {\n p: 'm',\n };\n }\n return {\n rootProps,\n headerProps: merge(headerProps, headerPropsProp),\n bodyProps: merge(bodyProps, bodyPropsProp),\n };\n }, [shape, headerPropsProp, bodyPropsProp]);\n const subTitle = typeof subTitleProp === 'string' && subTitleProp ? (React.createElement(Text, { ml: \"m\", fontSize: \"note\" }, subTitleProp)) : (subTitleProp);\n const showHeader = !!(title || subTitle || extra);\n return (React.createElement(Box, Object.assign({ display: \"flex\", flexDirection: \"column\", overflow: \"auto\", bg: \"white\" }, systemProps.rootProps, { className: cx('Panel', className) }, rest),\n showHeader && (React.createElement(Box, Object.assign({ flex: \"0\", px: \"m\", py: \"s\" }, systemProps.headerProps, { css: headerStyle, className: \"PanelHeader\" }),\n React.createElement(Box, null,\n React.createElement(Text, { color: \"text.title\", fontWeight: \"500\" }, title),\n subTitle && React.createElement(Text, { ml: \"s\" }, subTitle)),\n extra)),\n React.createElement(Box, Object.assign({ flex: \"1\", overflowY: \"auto\" }, systemProps.bodyProps, { className: \"PanelBody\" }), children)));\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport cx from 'classnames';\nimport { css, Button, Box } from 'coral-system';\nimport { Dropdown, Tooltip } from 'antd';\nimport { DownOutlined } from '@ant-design/icons';\nconst buttonStyle = css `\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n user-select: none;\n cursor: pointer;\n color: var(--tango-colors-gray-50);\n padding: 0 8px;\n\n .anticon-down {\n font-size: 12px !important;\n margin-left: 4px;\n }\n\n &.size-s {\n height: 24px;\n font-size: 14px;\n }\n\n &.size-m {\n height: 32px;\n font-size: 14px;\n }\n\n &.size-l {\n height: 40px;\n font-size: 16px;\n }\n\n &.size-xl {\n height: 40px;\n font-size: 20px;\n }\n\n &.shape-text {\n padding: 0px 4px;\n height: auto;\n border: 0;\n border-radius: var(--tango-radii-s);\n color: var(--tango-colors-text2);\n background: transparent;\n\n &.selected.type-normal {\n color: var(--tango-colors-white);\n }\n\n &.selected.type-primary {\n color: var(--tango-colors-white);\n background-color: var(--tango-colors-brand);\n }\n\n &:hover {\n background-color: rgba(197, 197, 197, 0.16);\n }\n\n &.disabled {\n color: var(--tango-colors-gray-60);\n }\n }\n\n &.shape-outline {\n background-color: #fff;\n border: 1px solid var(--tango-colors-line2);\n border-radius: var(--tango-radii-s);\n\n &.disabled {\n color: var(--tango-colors-text4);\n background-color: var(--tango-colors-fill1);\n }\n\n &.selected.type-normal {\n color: var(--tango-colors-gray-100);\n background-color: var(--tango-colors-fill3);\n border-color: var(--tango-colors-line2);\n }\n\n &.selected.type-primary {\n color: #fff;\n background-color: var(--tango-colors-brand);\n border-color: var(--tango-colors-brand);\n }\n }\n\n &.shape-ghost {\n background-color: var(--tango-colors-custom-toolbarButtonBg, rgba(223, 223, 223, 0.08));\n color: var(--tango-colors-custom-toolbarButtonTextColor, #999);\n border: 0;\n border-radius: var(--tango-radii-m);\n\n &:hover {\n color: var(--tango-colors-custom-toolbarButtonTextColorHover, #fff);\n background-color: var(--tango-colors-custom-toolbarButtonBgHover, rgba(197, 197, 197, 0.16));\n }\n\n &.disabled {\n color: var(--tango-colors-custom-toolbarButtonTextColorDisabled, rgb(201, 205, 212));\n background-color: var(--tango-colors-custom-toolbarButtonBgDisabled, rgb(247, 248, 250));\n }\n\n &.selected {\n color: var(--tango-colors-custom-toolbarButtonTextColorActive);\n background-color: var(--tango-colors-custom-toolbarButtonBgActive);\n }\n }\n\n &.disabled {\n pointer-events: none;\n }\n`;\n/**\n * TODO: 使用 Action 重构\n */\nexport function ToggleButton(props) {\n const { size = 'm', shape = 'outline', type = 'normal', disabled, selected, children, icon, tip, tooltip = tip, tooltipPlacement = 'bottom', items, overlay, overlayStyle, onItemClick, dropdownProps = {} } = props, rest = __rest(props, [\"size\", \"shape\", \"type\", \"disabled\", \"selected\", \"children\", \"icon\", \"tip\", \"tooltip\", \"tooltipPlacement\", \"items\", \"overlay\", \"overlayStyle\", \"onItemClick\", \"dropdownProps\"]);\n const clazz = cx({\n [`size-${size}`]: size,\n [`shape-${shape}`]: shape,\n [`type-${type}`]: type,\n disabled,\n selected,\n });\n const showDropdown = !!items || !!overlay;\n let btn = (React.createElement(Button, Object.assign({ css: buttonStyle, className: clazz, type: \"button\" }, rest),\n React.createElement(Box, { as: \"span\" },\n icon && (React.createElement(Box, { as: \"span\", className: \"buttonIcon\", mr: \"s\" }, icon)),\n children),\n showDropdown ? React.createElement(DownOutlined, null) : null));\n if (tooltip) {\n btn = (React.createElement(Tooltip, { title: tooltip, placement: tooltipPlacement }, btn));\n }\n if (showDropdown) {\n btn = (React.createElement(Dropdown, Object.assign({}, dropdownProps, { overlay: overlay, overlayStyle: overlayStyle, menu: { items, onClick: onItemClick } }), btn));\n }\n return btn;\n}\n","/**\nThe data structure for documents. @nonabstract\n*/\nclass Text {\n /**\n Get the line description around the given position.\n */\n lineAt(pos) {\n if (pos < 0 || pos > this.length)\n throw new RangeError(`Invalid position ${pos} in document of length ${this.length}`);\n return this.lineInner(pos, false, 1, 0);\n }\n /**\n Get the description for the given (1-based) line number.\n */\n line(n) {\n if (n < 1 || n > this.lines)\n throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);\n return this.lineInner(n, true, 1, 0);\n }\n /**\n Replace a range of the text with the given content.\n */\n replace(from, to, text) {\n [from, to] = clip(this, from, to);\n let parts = [];\n this.decompose(0, from, parts, 2 /* Open.To */);\n if (text.length)\n text.decompose(0, text.length, parts, 1 /* Open.From */ | 2 /* Open.To */);\n this.decompose(to, this.length, parts, 1 /* Open.From */);\n return TextNode.from(parts, this.length - (to - from) + text.length);\n }\n /**\n Append another document to this one.\n */\n append(other) {\n return this.replace(this.length, this.length, other);\n }\n /**\n Retrieve the text between the given points.\n */\n slice(from, to = this.length) {\n [from, to] = clip(this, from, to);\n let parts = [];\n this.decompose(from, to, parts, 0);\n return TextNode.from(parts, to - from);\n }\n /**\n Test whether this text is equal to another instance.\n */\n eq(other) {\n if (other == this)\n return true;\n if (other.length != this.length || other.lines != this.lines)\n return false;\n let start = this.scanIdentical(other, 1), end = this.length - this.scanIdentical(other, -1);\n let a = new RawTextCursor(this), b = new RawTextCursor(other);\n for (let skip = start, pos = start;;) {\n a.next(skip);\n b.next(skip);\n skip = 0;\n if (a.lineBreak != b.lineBreak || a.done != b.done || a.value != b.value)\n return false;\n pos += a.value.length;\n if (a.done || pos >= end)\n return true;\n }\n }\n /**\n Iterate over the text. When `dir` is `-1`, iteration happens\n from end to start. This will return lines and the breaks between\n them as separate strings.\n */\n iter(dir = 1) { return new RawTextCursor(this, dir); }\n /**\n Iterate over a range of the text. When `from` > `to`, the\n iterator will run in reverse.\n */\n iterRange(from, to = this.length) { return new PartialTextCursor(this, from, to); }\n /**\n Return a cursor that iterates over the given range of lines,\n _without_ returning the line breaks between, and yielding empty\n strings for empty lines.\n \n When `from` and `to` are given, they should be 1-based line numbers.\n */\n iterLines(from, to) {\n let inner;\n if (from == null) {\n inner = this.iter();\n }\n else {\n if (to == null)\n to = this.lines + 1;\n let start = this.line(from).from;\n inner = this.iterRange(start, Math.max(start, to == this.lines + 1 ? this.length : to <= 1 ? 0 : this.line(to - 1).to));\n }\n return new LineCursor(inner);\n }\n /**\n Return the document as a string, using newline characters to\n separate lines.\n */\n toString() { return this.sliceString(0); }\n /**\n Convert the document to an array of lines (which can be\n deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).\n */\n toJSON() {\n let lines = [];\n this.flatten(lines);\n return lines;\n }\n /**\n @internal\n */\n constructor() { }\n /**\n Create a `Text` instance for the given array of lines.\n */\n static of(text) {\n if (text.length == 0)\n throw new RangeError(\"A document must have at least one line\");\n if (text.length == 1 && !text[0])\n return Text.empty;\n return text.length <= 32 /* Tree.Branch */ ? new TextLeaf(text) : TextNode.from(TextLeaf.split(text, []));\n }\n}\n// Leaves store an array of line strings. There are always line breaks\n// between these strings. Leaves are limited in size and have to be\n// contained in TextNode instances for bigger documents.\nclass TextLeaf extends Text {\n constructor(text, length = textLength(text)) {\n super();\n this.text = text;\n this.length = length;\n }\n get lines() { return this.text.length; }\n get children() { return null; }\n lineInner(target, isLine, line, offset) {\n for (let i = 0;; i++) {\n let string = this.text[i], end = offset + string.length;\n if ((isLine ? line : end) >= target)\n return new Line(offset, end, line, string);\n offset = end + 1;\n line++;\n }\n }\n decompose(from, to, target, open) {\n let text = from <= 0 && to >= this.length ? this\n : new TextLeaf(sliceText(this.text, from, to), Math.min(to, this.length) - Math.max(0, from));\n if (open & 1 /* Open.From */) {\n let prev = target.pop();\n let joined = appendText(text.text, prev.text.slice(), 0, text.length);\n if (joined.length <= 32 /* Tree.Branch */) {\n target.push(new TextLeaf(joined, prev.length + text.length));\n }\n else {\n let mid = joined.length >> 1;\n target.push(new TextLeaf(joined.slice(0, mid)), new TextLeaf(joined.slice(mid)));\n }\n }\n else {\n target.push(text);\n }\n }\n replace(from, to, text) {\n if (!(text instanceof TextLeaf))\n return super.replace(from, to, text);\n [from, to] = clip(this, from, to);\n let lines = appendText(this.text, appendText(text.text, sliceText(this.text, 0, from)), to);\n let newLen = this.length + text.length - (to - from);\n if (lines.length <= 32 /* Tree.Branch */)\n return new TextLeaf(lines, newLen);\n return TextNode.from(TextLeaf.split(lines, []), newLen);\n }\n sliceString(from, to = this.length, lineSep = \"\\n\") {\n [from, to] = clip(this, from, to);\n let result = \"\";\n for (let pos = 0, i = 0; pos <= to && i < this.text.length; i++) {\n let line = this.text[i], end = pos + line.length;\n if (pos > from && i)\n result += lineSep;\n if (from < end && to > pos)\n result += line.slice(Math.max(0, from - pos), to - pos);\n pos = end + 1;\n }\n return result;\n }\n flatten(target) {\n for (let line of this.text)\n target.push(line);\n }\n scanIdentical() { return 0; }\n static split(text, target) {\n let part = [], len = -1;\n for (let line of text) {\n part.push(line);\n len += line.length + 1;\n if (part.length == 32 /* Tree.Branch */) {\n target.push(new TextLeaf(part, len));\n part = [];\n len = -1;\n }\n }\n if (len > -1)\n target.push(new TextLeaf(part, len));\n return target;\n }\n}\n// Nodes provide the tree structure of the `Text` type. They store a\n// number of other nodes or leaves, taking care to balance themselves\n// on changes. There are implied line breaks _between_ the children of\n// a node (but not before the first or after the last child).\nclass TextNode extends Text {\n constructor(children, length) {\n super();\n this.children = children;\n this.length = length;\n this.lines = 0;\n for (let child of children)\n this.lines += child.lines;\n }\n lineInner(target, isLine, line, offset) {\n for (let i = 0;; i++) {\n let child = this.children[i], end = offset + child.length, endLine = line + child.lines - 1;\n if ((isLine ? endLine : end) >= target)\n return child.lineInner(target, isLine, line, offset);\n offset = end + 1;\n line = endLine + 1;\n }\n }\n decompose(from, to, target, open) {\n for (let i = 0, pos = 0; pos <= to && i < this.children.length; i++) {\n let child = this.children[i], end = pos + child.length;\n if (from <= end && to >= pos) {\n let childOpen = open & ((pos <= from ? 1 /* Open.From */ : 0) | (end >= to ? 2 /* Open.To */ : 0));\n if (pos >= from && end <= to && !childOpen)\n target.push(child);\n else\n child.decompose(from - pos, to - pos, target, childOpen);\n }\n pos = end + 1;\n }\n }\n replace(from, to, text) {\n [from, to] = clip(this, from, to);\n if (text.lines < this.lines)\n for (let i = 0, pos = 0; i < this.children.length; i++) {\n let child = this.children[i], end = pos + child.length;\n // Fast path: if the change only affects one child and the\n // child's size remains in the acceptable range, only update\n // that child\n if (from >= pos && to <= end) {\n let updated = child.replace(from - pos, to - pos, text);\n let totalLines = this.lines - child.lines + updated.lines;\n if (updated.lines < (totalLines >> (5 /* Tree.BranchShift */ - 1)) &&\n updated.lines > (totalLines >> (5 /* Tree.BranchShift */ + 1))) {\n let copy = this.children.slice();\n copy[i] = updated;\n return new TextNode(copy, this.length - (to - from) + text.length);\n }\n return super.replace(pos, end, updated);\n }\n pos = end + 1;\n }\n return super.replace(from, to, text);\n }\n sliceString(from, to = this.length, lineSep = \"\\n\") {\n [from, to] = clip(this, from, to);\n let result = \"\";\n for (let i = 0, pos = 0; i < this.children.length && pos <= to; i++) {\n let child = this.children[i], end = pos + child.length;\n if (pos > from && i)\n result += lineSep;\n if (from < end && to > pos)\n result += child.sliceString(from - pos, to - pos, lineSep);\n pos = end + 1;\n }\n return result;\n }\n flatten(target) {\n for (let child of this.children)\n child.flatten(target);\n }\n scanIdentical(other, dir) {\n if (!(other instanceof TextNode))\n return 0;\n let length = 0;\n let [iA, iB, eA, eB] = dir > 0 ? [0, 0, this.children.length, other.children.length]\n : [this.children.length - 1, other.children.length - 1, -1, -1];\n for (;; iA += dir, iB += dir) {\n if (iA == eA || iB == eB)\n return length;\n let chA = this.children[iA], chB = other.children[iB];\n if (chA != chB)\n return length + chA.scanIdentical(chB, dir);\n length += chA.length + 1;\n }\n }\n static from(children, length = children.reduce((l, ch) => l + ch.length + 1, -1)) {\n let lines = 0;\n for (let ch of children)\n lines += ch.lines;\n if (lines < 32 /* Tree.Branch */) {\n let flat = [];\n for (let ch of children)\n ch.flatten(flat);\n return new TextLeaf(flat, length);\n }\n let chunk = Math.max(32 /* Tree.Branch */, lines >> 5 /* Tree.BranchShift */), maxChunk = chunk << 1, minChunk = chunk >> 1;\n let chunked = [], currentLines = 0, currentLen = -1, currentChunk = [];\n function add(child) {\n let last;\n if (child.lines > maxChunk && child instanceof TextNode) {\n for (let node of child.children)\n add(node);\n }\n else if (child.lines > minChunk && (currentLines > minChunk || !currentLines)) {\n flush();\n chunked.push(child);\n }\n else if (child instanceof TextLeaf && currentLines &&\n (last = currentChunk[currentChunk.length - 1]) instanceof TextLeaf &&\n child.lines + last.lines <= 32 /* Tree.Branch */) {\n currentLines += child.lines;\n currentLen += child.length + 1;\n currentChunk[currentChunk.length - 1] = new TextLeaf(last.text.concat(child.text), last.length + 1 + child.length);\n }\n else {\n if (currentLines + child.lines > chunk)\n flush();\n currentLines += child.lines;\n currentLen += child.length + 1;\n currentChunk.push(child);\n }\n }\n function flush() {\n if (currentLines == 0)\n return;\n chunked.push(currentChunk.length == 1 ? currentChunk[0] : TextNode.from(currentChunk, currentLen));\n currentLen = -1;\n currentLines = currentChunk.length = 0;\n }\n for (let child of children)\n add(child);\n flush();\n return chunked.length == 1 ? chunked[0] : new TextNode(chunked, length);\n }\n}\nText.empty = /*@__PURE__*/new TextLeaf([\"\"], 0);\nfunction textLength(text) {\n let length = -1;\n for (let line of text)\n length += line.length + 1;\n return length;\n}\nfunction appendText(text, target, from = 0, to = 1e9) {\n for (let pos = 0, i = 0, first = true; i < text.length && pos <= to; i++) {\n let line = text[i], end = pos + line.length;\n if (end >= from) {\n if (end > to)\n line = line.slice(0, to - pos);\n if (pos < from)\n line = line.slice(from - pos);\n if (first) {\n target[target.length - 1] += line;\n first = false;\n }\n else\n target.push(line);\n }\n pos = end + 1;\n }\n return target;\n}\nfunction sliceText(text, from, to) {\n return appendText(text, [\"\"], from, to);\n}\nclass RawTextCursor {\n constructor(text, dir = 1) {\n this.dir = dir;\n this.done = false;\n this.lineBreak = false;\n this.value = \"\";\n this.nodes = [text];\n this.offsets = [dir > 0 ? 1 : (text instanceof TextLeaf ? text.text.length : text.children.length) << 1];\n }\n nextInner(skip, dir) {\n this.done = this.lineBreak = false;\n for (;;) {\n let last = this.nodes.length - 1;\n let top = this.nodes[last], offsetValue = this.offsets[last], offset = offsetValue >> 1;\n let size = top instanceof TextLeaf ? top.text.length : top.children.length;\n if (offset == (dir > 0 ? size : 0)) {\n if (last == 0) {\n this.done = true;\n this.value = \"\";\n return this;\n }\n if (dir > 0)\n this.offsets[last - 1]++;\n this.nodes.pop();\n this.offsets.pop();\n }\n else if ((offsetValue & 1) == (dir > 0 ? 0 : 1)) {\n this.offsets[last] += dir;\n if (skip == 0) {\n this.lineBreak = true;\n this.value = \"\\n\";\n return this;\n }\n skip--;\n }\n else if (top instanceof TextLeaf) {\n // Move to the next string\n let next = top.text[offset + (dir < 0 ? -1 : 0)];\n this.offsets[last] += dir;\n if (next.length > Math.max(0, skip)) {\n this.value = skip == 0 ? next : dir > 0 ? next.slice(skip) : next.slice(0, next.length - skip);\n return this;\n }\n skip -= next.length;\n }\n else {\n let next = top.children[offset + (dir < 0 ? -1 : 0)];\n if (skip > next.length) {\n skip -= next.length;\n this.offsets[last] += dir;\n }\n else {\n if (dir < 0)\n this.offsets[last]--;\n this.nodes.push(next);\n this.offsets.push(dir > 0 ? 1 : (next instanceof TextLeaf ? next.text.length : next.children.length) << 1);\n }\n }\n }\n }\n next(skip = 0) {\n if (skip < 0) {\n this.nextInner(-skip, (-this.dir));\n skip = this.value.length;\n }\n return this.nextInner(skip, this.dir);\n }\n}\nclass PartialTextCursor {\n constructor(text, start, end) {\n this.value = \"\";\n this.done = false;\n this.cursor = new RawTextCursor(text, start > end ? -1 : 1);\n this.pos = start > end ? text.length : 0;\n this.from = Math.min(start, end);\n this.to = Math.max(start, end);\n }\n nextInner(skip, dir) {\n if (dir < 0 ? this.pos <= this.from : this.pos >= this.to) {\n this.value = \"\";\n this.done = true;\n return this;\n }\n skip += Math.max(0, dir < 0 ? this.pos - this.to : this.from - this.pos);\n let limit = dir < 0 ? this.pos - this.from : this.to - this.pos;\n if (skip > limit)\n skip = limit;\n limit -= skip;\n let { value } = this.cursor.next(skip);\n this.pos += (value.length + skip) * dir;\n this.value = value.length <= limit ? value : dir < 0 ? value.slice(value.length - limit) : value.slice(0, limit);\n this.done = !this.value;\n return this;\n }\n next(skip = 0) {\n if (skip < 0)\n skip = Math.max(skip, this.from - this.pos);\n else if (skip > 0)\n skip = Math.min(skip, this.to - this.pos);\n return this.nextInner(skip, this.cursor.dir);\n }\n get lineBreak() { return this.cursor.lineBreak && this.value != \"\"; }\n}\nclass LineCursor {\n constructor(inner) {\n this.inner = inner;\n this.afterBreak = true;\n this.value = \"\";\n this.done = false;\n }\n next(skip = 0) {\n let { done, lineBreak, value } = this.inner.next(skip);\n if (done && this.afterBreak) {\n this.value = \"\";\n this.afterBreak = false;\n }\n else if (done) {\n this.done = true;\n this.value = \"\";\n }\n else if (lineBreak) {\n if (this.afterBreak) {\n this.value = \"\";\n }\n else {\n this.afterBreak = true;\n this.next();\n }\n }\n else {\n this.value = value;\n this.afterBreak = false;\n }\n return this;\n }\n get lineBreak() { return false; }\n}\nif (typeof Symbol != \"undefined\") {\n Text.prototype[Symbol.iterator] = function () { return this.iter(); };\n RawTextCursor.prototype[Symbol.iterator] = PartialTextCursor.prototype[Symbol.iterator] =\n LineCursor.prototype[Symbol.iterator] = function () { return this; };\n}\n/**\nThis type describes a line in the document. It is created\non-demand when lines are [queried](https://codemirror.net/6/docs/ref/#state.Text.lineAt).\n*/\nclass Line {\n /**\n @internal\n */\n constructor(\n /**\n The position of the start of the line.\n */\n from, \n /**\n The position at the end of the line (_before_ the line break,\n or at the end of document for the last line).\n */\n to, \n /**\n This line's line number (1-based).\n */\n number, \n /**\n The line's content.\n */\n text) {\n this.from = from;\n this.to = to;\n this.number = number;\n this.text = text;\n }\n /**\n The length of the line (not including any line break after it).\n */\n get length() { return this.to - this.from; }\n}\nfunction clip(text, from, to) {\n from = Math.max(0, Math.min(text.length, from));\n return [from, Math.max(from, Math.min(text.length, to))];\n}\n\n// Compressed representation of the Grapheme_Cluster_Break=Extend\n// information from\n// http://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n// Each pair of elements represents a range, as an offet from the\n// previous range and a length. Numbers are in base-36, with the empty\n// string being a shorthand for 1.\nlet extend = /*@__PURE__*/\"lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o\".split(\",\").map(s => s ? parseInt(s, 36) : 1);\n// Convert offsets into absolute values\nfor (let i = 1; i < extend.length; i++)\n extend[i] += extend[i - 1];\nfunction isExtendingChar(code) {\n for (let i = 1; i < extend.length; i += 2)\n if (extend[i] > code)\n return extend[i - 1] <= code;\n return false;\n}\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF;\n}\nconst ZWJ = 0x200d;\n/**\nReturns a next grapheme cluster break _after_ (not equal to)\n`pos`, if `forward` is true, or before otherwise. Returns `pos`\nitself if no further cluster break is available in the string.\nMoves across surrogate pairs, extending characters (when\n`includeExtending` is true), characters joined with zero-width\njoiners, and flag emoji.\n*/\nfunction findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(str, pos, includeExtending);\n}\nfunction nextClusterBreak(str, pos, includeExtending) {\n if (pos == str.length)\n return pos;\n // If pos is in the middle of a surrogate pair, move to its start\n if (pos && surrogateLow(str.charCodeAt(pos)) && surrogateHigh(str.charCodeAt(pos - 1)))\n pos--;\n let prev = codePointAt(str, pos);\n pos += codePointSize(prev);\n while (pos < str.length) {\n let next = codePointAt(str, pos);\n if (prev == ZWJ || next == ZWJ || includeExtending && isExtendingChar(next)) {\n pos += codePointSize(next);\n prev = next;\n }\n else if (isRegionalIndicator(next)) {\n let countBefore = 0, i = pos - 2;\n while (i >= 0 && isRegionalIndicator(codePointAt(str, i))) {\n countBefore++;\n i -= 2;\n }\n if (countBefore % 2 == 0)\n break;\n else\n pos += 2;\n }\n else {\n break;\n }\n }\n return pos;\n}\nfunction prevClusterBreak(str, pos, includeExtending) {\n while (pos > 0) {\n let found = nextClusterBreak(str, pos - 2, includeExtending);\n if (found < pos)\n return found;\n pos--;\n }\n return 0;\n}\nfunction surrogateLow(ch) { return ch >= 0xDC00 && ch < 0xE000; }\nfunction surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00; }\n/**\nFind the code point at the given position in a string (like the\n[`codePointAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)\nstring method).\n*/\nfunction codePointAt(str, pos) {\n let code0 = str.charCodeAt(pos);\n if (!surrogateHigh(code0) || pos + 1 == str.length)\n return code0;\n let code1 = str.charCodeAt(pos + 1);\n if (!surrogateLow(code1))\n return code0;\n return ((code0 - 0xd800) << 10) + (code1 - 0xdc00) + 0x10000;\n}\n/**\nGiven a Unicode codepoint, return the JavaScript string that\nrespresents it (like\n[`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)).\n*/\nfunction fromCodePoint(code) {\n if (code <= 0xffff)\n return String.fromCharCode(code);\n code -= 0x10000;\n return String.fromCharCode((code >> 10) + 0xd800, (code & 1023) + 0xdc00);\n}\n/**\nThe amount of positions a character takes up a JavaScript string.\n*/\nfunction codePointSize(code) { return code < 0x10000 ? 1 : 2; }\n\nconst DefaultSplit = /\\r\\n?|\\n/;\n/**\nDistinguishes different ways in which positions can be mapped.\n*/\nvar MapMode = /*@__PURE__*/(function (MapMode) {\n /**\n Map a position to a valid new position, even when its context\n was deleted.\n */\n MapMode[MapMode[\"Simple\"] = 0] = \"Simple\";\n /**\n Return null if deletion happens across the position.\n */\n MapMode[MapMode[\"TrackDel\"] = 1] = \"TrackDel\";\n /**\n Return null if the character _before_ the position is deleted.\n */\n MapMode[MapMode[\"TrackBefore\"] = 2] = \"TrackBefore\";\n /**\n Return null if the character _after_ the position is deleted.\n */\n MapMode[MapMode[\"TrackAfter\"] = 3] = \"TrackAfter\";\nreturn MapMode})(MapMode || (MapMode = {}));\n/**\nA change description is a variant of [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet)\nthat doesn't store the inserted text. As such, it can't be\napplied, but is cheaper to store and manipulate.\n*/\nclass ChangeDesc {\n // Sections are encoded as pairs of integers. The first is the\n // length in the current document, and the second is -1 for\n // unaffected sections, and the length of the replacement content\n // otherwise. So an insertion would be (0, n>0), a deletion (n>0,\n // 0), and a replacement two positive numbers.\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n sections) {\n this.sections = sections;\n }\n /**\n The length of the document before the change.\n */\n get length() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2)\n result += this.sections[i];\n return result;\n }\n /**\n The length of the document after the change.\n */\n get newLength() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2) {\n let ins = this.sections[i + 1];\n result += ins < 0 ? this.sections[i] : ins;\n }\n return result;\n }\n /**\n False when there are actual changes in this set.\n */\n get empty() { return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0; }\n /**\n Iterate over the unchanged parts left by these changes. `posA`\n provides the position of the range in the old document, `posB`\n the new position in the changed document.\n */\n iterGaps(f) {\n for (let i = 0, posA = 0, posB = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n if (ins < 0) {\n f(posA, posB, len);\n posB += len;\n }\n else {\n posB += ins;\n }\n posA += len;\n }\n }\n /**\n Iterate over the ranges changed by these changes. (See\n [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a\n variant that also provides you with the inserted text.)\n `fromA`/`toA` provides the extent of the change in the starting\n document, `fromB`/`toB` the extent of the replacement in the\n changed document.\n \n When `individual` is true, adjacent changes (which are kept\n separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are\n reported separately.\n */\n iterChangedRanges(f, individual = false) {\n iterChanges(this, f, individual);\n }\n /**\n Get a description of the inverted form of these changes.\n */\n get invertedDesc() {\n let sections = [];\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n if (ins < 0)\n sections.push(len, ins);\n else\n sections.push(ins, len);\n }\n return new ChangeDesc(sections);\n }\n /**\n Compute the combined effect of applying another set of changes\n after this one. The length of the document after this set should\n match the length before `other`.\n */\n composeDesc(other) { return this.empty ? other : other.empty ? this : composeSets(this, other); }\n /**\n Map this description, which should start with the same document\n as `other`, over another set of changes, so that it can be\n applied after it. When `before` is true, map as if the changes\n in `other` happened before the ones in `this`.\n */\n mapDesc(other, before = false) { return other.empty ? this : mapSet(this, other, before); }\n mapPos(pos, assoc = -1, mode = MapMode.Simple) {\n let posA = 0, posB = 0;\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++], endA = posA + len;\n if (ins < 0) {\n if (endA > pos)\n return posB + (pos - posA);\n posB += len;\n }\n else {\n if (mode != MapMode.Simple && endA >= pos &&\n (mode == MapMode.TrackDel && posA < pos && endA > pos ||\n mode == MapMode.TrackBefore && posA < pos ||\n mode == MapMode.TrackAfter && endA > pos))\n return null;\n if (endA > pos || endA == pos && assoc < 0 && !len)\n return pos == posA || assoc < 0 ? posB : posB + ins;\n posB += ins;\n }\n posA = endA;\n }\n if (pos > posA)\n throw new RangeError(`Position ${pos} is out of range for changeset of length ${posA}`);\n return posB;\n }\n /**\n Check whether these changes touch a given range. When one of the\n changes entirely covers the range, the string `\"cover\"` is\n returned.\n */\n touchesRange(from, to = from) {\n for (let i = 0, pos = 0; i < this.sections.length && pos <= to;) {\n let len = this.sections[i++], ins = this.sections[i++], end = pos + len;\n if (ins >= 0 && pos <= to && end >= from)\n return pos < from && end > to ? \"cover\" : true;\n pos = end;\n }\n return false;\n }\n /**\n @internal\n */\n toString() {\n let result = \"\";\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n result += (result ? \" \" : \"\") + len + (ins >= 0 ? \":\" + ins : \"\");\n }\n return result;\n }\n /**\n Serialize this change desc to a JSON-representable value.\n */\n toJSON() { return this.sections; }\n /**\n Create a change desc from its JSON representation (as produced\n by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).\n */\n static fromJSON(json) {\n if (!Array.isArray(json) || json.length % 2 || json.some(a => typeof a != \"number\"))\n throw new RangeError(\"Invalid JSON representation of ChangeDesc\");\n return new ChangeDesc(json);\n }\n /**\n @internal\n */\n static create(sections) { return new ChangeDesc(sections); }\n}\n/**\nA change set represents a group of modifications to a document. It\nstores the document length, and can only be applied to documents\nwith exactly that length.\n*/\nclass ChangeSet extends ChangeDesc {\n constructor(sections, \n /**\n @internal\n */\n inserted) {\n super(sections);\n this.inserted = inserted;\n }\n /**\n Apply the changes to a document, returning the modified\n document.\n */\n apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }\n mapDesc(other, before = false) { return mapSet(this, other, before, true); }\n /**\n Given the document as it existed _before_ the changes, return a\n change set that represents the inverse of this set, which could\n be used to go from the document created by the changes back to\n the document as it existed before the changes.\n */\n invert(doc) {\n let sections = this.sections.slice(), inserted = [];\n for (let i = 0, pos = 0; i < sections.length; i += 2) {\n let len = sections[i], ins = sections[i + 1];\n if (ins >= 0) {\n sections[i] = ins;\n sections[i + 1] = len;\n let index = i >> 1;\n while (inserted.length < index)\n inserted.push(Text.empty);\n inserted.push(len ? doc.slice(pos, pos + len) : Text.empty);\n }\n pos += len;\n }\n return new ChangeSet(sections, inserted);\n }\n /**\n Combine two subsequent change sets into a single set. `other`\n must start in the document produced by `this`. If `this` goes\n `docA` → `docB` and `other` represents `docB` → `docC`, the\n returned value will represent the change `docA` → `docC`.\n */\n compose(other) { return this.empty ? other : other.empty ? this : composeSets(this, other, true); }\n /**\n Given another change set starting in the same document, maps this\n change set over the other, producing a new change set that can be\n applied to the document produced by applying `other`. When\n `before` is `true`, order changes as if `this` comes before\n `other`, otherwise (the default) treat `other` as coming first.\n \n Given two changes `A` and `B`, `A.compose(B.map(A))` and\n `B.compose(A.map(B, true))` will produce the same document. This\n provides a basic form of [operational\n transformation](https://en.wikipedia.org/wiki/Operational_transformation),\n and can be used for collaborative editing.\n */\n map(other, before = false) { return other.empty ? this : mapSet(this, other, before, true); }\n /**\n Iterate over the changed ranges in the document, calling `f` for\n each, with the range in the original document (`fromA`-`toA`)\n and the range that replaces it in the new document\n (`fromB`-`toB`).\n \n When `individual` is true, adjacent changes are reported\n separately.\n */\n iterChanges(f, individual = false) {\n iterChanges(this, f, individual);\n }\n /**\n Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change\n set.\n */\n get desc() { return ChangeDesc.create(this.sections); }\n /**\n @internal\n */\n filter(ranges) {\n let resultSections = [], resultInserted = [], filteredSections = [];\n let iter = new SectionIter(this);\n done: for (let i = 0, pos = 0;;) {\n let next = i == ranges.length ? 1e9 : ranges[i++];\n while (pos < next || pos == next && iter.len == 0) {\n if (iter.done)\n break done;\n let len = Math.min(iter.len, next - pos);\n addSection(filteredSections, len, -1);\n let ins = iter.ins == -1 ? -1 : iter.off == 0 ? iter.ins : 0;\n addSection(resultSections, len, ins);\n if (ins > 0)\n addInsert(resultInserted, resultSections, iter.text);\n iter.forward(len);\n pos += len;\n }\n let end = ranges[i++];\n while (pos < end) {\n if (iter.done)\n break done;\n let len = Math.min(iter.len, end - pos);\n addSection(resultSections, len, -1);\n addSection(filteredSections, len, iter.ins == -1 ? -1 : iter.off == 0 ? iter.ins : 0);\n iter.forward(len);\n pos += len;\n }\n }\n return { changes: new ChangeSet(resultSections, resultInserted),\n filtered: ChangeDesc.create(filteredSections) };\n }\n /**\n Serialize this change set to a JSON-representable value.\n */\n toJSON() {\n let parts = [];\n for (let i = 0; i < this.sections.length; i += 2) {\n let len = this.sections[i], ins = this.sections[i + 1];\n if (ins < 0)\n parts.push(len);\n else if (ins == 0)\n parts.push([len]);\n else\n parts.push([len].concat(this.inserted[i >> 1].toJSON()));\n }\n return parts;\n }\n /**\n Create a change set for the given changes, for a document of the\n given length, using `lineSep` as line separator.\n */\n static of(changes, length, lineSep) {\n let sections = [], inserted = [], pos = 0;\n let total = null;\n function flush(force = false) {\n if (!force && !sections.length)\n return;\n if (pos < length)\n addSection(sections, length - pos, -1);\n let set = new ChangeSet(sections, inserted);\n total = total ? total.compose(set.map(total)) : set;\n sections = [];\n inserted = [];\n pos = 0;\n }\n function process(spec) {\n if (Array.isArray(spec)) {\n for (let sub of spec)\n process(sub);\n }\n else if (spec instanceof ChangeSet) {\n if (spec.length != length)\n throw new RangeError(`Mismatched change set length (got ${spec.length}, expected ${length})`);\n flush();\n total = total ? total.compose(spec.map(total)) : spec;\n }\n else {\n let { from, to = from, insert } = spec;\n if (from > to || from < 0 || to > length)\n throw new RangeError(`Invalid change range ${from} to ${to} (in doc of length ${length})`);\n let insText = !insert ? Text.empty : typeof insert == \"string\" ? Text.of(insert.split(lineSep || DefaultSplit)) : insert;\n let insLen = insText.length;\n if (from == to && insLen == 0)\n return;\n if (from < pos)\n flush();\n if (from > pos)\n addSection(sections, from - pos, -1);\n addSection(sections, to - from, insLen);\n addInsert(inserted, sections, insText);\n pos = to;\n }\n }\n process(changes);\n flush(!total);\n return total;\n }\n /**\n Create an empty changeset of the given length.\n */\n static empty(length) {\n return new ChangeSet(length ? [length, -1] : [], []);\n }\n /**\n Create a changeset from its JSON representation (as produced by\n [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).\n */\n static fromJSON(json) {\n if (!Array.isArray(json))\n throw new RangeError(\"Invalid JSON representation of ChangeSet\");\n let sections = [], inserted = [];\n for (let i = 0; i < json.length; i++) {\n let part = json[i];\n if (typeof part == \"number\") {\n sections.push(part, -1);\n }\n else if (!Array.isArray(part) || typeof part[0] != \"number\" || part.some((e, i) => i && typeof e != \"string\")) {\n throw new RangeError(\"Invalid JSON representation of ChangeSet\");\n }\n else if (part.length == 1) {\n sections.push(part[0], 0);\n }\n else {\n while (inserted.length < i)\n inserted.push(Text.empty);\n inserted[i] = Text.of(part.slice(1));\n sections.push(part[0], inserted[i].length);\n }\n }\n return new ChangeSet(sections, inserted);\n }\n /**\n @internal\n */\n static createSet(sections, inserted) {\n return new ChangeSet(sections, inserted);\n }\n}\nfunction addSection(sections, len, ins, forceJoin = false) {\n if (len == 0 && ins <= 0)\n return;\n let last = sections.length - 2;\n if (last >= 0 && ins <= 0 && ins == sections[last + 1])\n sections[last] += len;\n else if (len == 0 && sections[last] == 0)\n sections[last + 1] += ins;\n else if (forceJoin) {\n sections[last] += len;\n sections[last + 1] += ins;\n }\n else\n sections.push(len, ins);\n}\nfunction addInsert(values, sections, value) {\n if (value.length == 0)\n return;\n let index = (sections.length - 2) >> 1;\n if (index < values.length) {\n values[values.length - 1] = values[values.length - 1].append(value);\n }\n else {\n while (values.length < index)\n values.push(Text.empty);\n values.push(value);\n }\n}\nfunction iterChanges(desc, f, individual) {\n let inserted = desc.inserted;\n for (let posA = 0, posB = 0, i = 0; i < desc.sections.length;) {\n let len = desc.sections[i++], ins = desc.sections[i++];\n if (ins < 0) {\n posA += len;\n posB += len;\n }\n else {\n let endA = posA, endB = posB, text = Text.empty;\n for (;;) {\n endA += len;\n endB += ins;\n if (ins && inserted)\n text = text.append(inserted[(i - 2) >> 1]);\n if (individual || i == desc.sections.length || desc.sections[i + 1] < 0)\n break;\n len = desc.sections[i++];\n ins = desc.sections[i++];\n }\n f(posA, endA, posB, endB, text);\n posA = endA;\n posB = endB;\n }\n }\n}\nfunction mapSet(setA, setB, before, mkSet = false) {\n // Produce a copy of setA that applies to the document after setB\n // has been applied (assuming both start at the same document).\n let sections = [], insert = mkSet ? [] : null;\n let a = new SectionIter(setA), b = new SectionIter(setB);\n // Iterate over both sets in parallel. inserted tracks, for changes\n // in A that have to be processed piece-by-piece, whether their\n // content has been inserted already, and refers to the section\n // index.\n for (let inserted = -1;;) {\n if (a.ins == -1 && b.ins == -1) {\n // Move across ranges skipped by both sets.\n let len = Math.min(a.len, b.len);\n addSection(sections, len, -1);\n a.forward(len);\n b.forward(len);\n }\n else if (b.ins >= 0 && (a.ins < 0 || inserted == a.i || a.off == 0 && (b.len < a.len || b.len == a.len && !before))) {\n // If there's a change in B that comes before the next change in\n // A (ordered by start pos, then len, then before flag), skip\n // that (and process any changes in A it covers).\n let len = b.len;\n addSection(sections, b.ins, -1);\n while (len) {\n let piece = Math.min(a.len, len);\n if (a.ins >= 0 && inserted < a.i && a.len <= piece) {\n addSection(sections, 0, a.ins);\n if (insert)\n addInsert(insert, sections, a.text);\n inserted = a.i;\n }\n a.forward(piece);\n len -= piece;\n }\n b.next();\n }\n else if (a.ins >= 0) {\n // Process the part of a change in A up to the start of the next\n // non-deletion change in B (if overlapping).\n let len = 0, left = a.len;\n while (left) {\n if (b.ins == -1) {\n let piece = Math.min(left, b.len);\n len += piece;\n left -= piece;\n b.forward(piece);\n }\n else if (b.ins == 0 && b.len < left) {\n left -= b.len;\n b.next();\n }\n else {\n break;\n }\n }\n addSection(sections, len, inserted < a.i ? a.ins : 0);\n if (insert && inserted < a.i)\n addInsert(insert, sections, a.text);\n inserted = a.i;\n a.forward(a.len - left);\n }\n else if (a.done && b.done) {\n return insert ? ChangeSet.createSet(sections, insert) : ChangeDesc.create(sections);\n }\n else {\n throw new Error(\"Mismatched change set lengths\");\n }\n }\n}\nfunction composeSets(setA, setB, mkSet = false) {\n let sections = [];\n let insert = mkSet ? [] : null;\n let a = new SectionIter(setA), b = new SectionIter(setB);\n for (let open = false;;) {\n if (a.done && b.done) {\n return insert ? ChangeSet.createSet(sections, insert) : ChangeDesc.create(sections);\n }\n else if (a.ins == 0) { // Deletion in A\n addSection(sections, a.len, 0, open);\n a.next();\n }\n else if (b.len == 0 && !b.done) { // Insertion in B\n addSection(sections, 0, b.ins, open);\n if (insert)\n addInsert(insert, sections, b.text);\n b.next();\n }\n else if (a.done || b.done) {\n throw new Error(\"Mismatched change set lengths\");\n }\n else {\n let len = Math.min(a.len2, b.len), sectionLen = sections.length;\n if (a.ins == -1) {\n let insB = b.ins == -1 ? -1 : b.off ? 0 : b.ins;\n addSection(sections, len, insB, open);\n if (insert && insB)\n addInsert(insert, sections, b.text);\n }\n else if (b.ins == -1) {\n addSection(sections, a.off ? 0 : a.len, len, open);\n if (insert)\n addInsert(insert, sections, a.textBit(len));\n }\n else {\n addSection(sections, a.off ? 0 : a.len, b.off ? 0 : b.ins, open);\n if (insert && !b.off)\n addInsert(insert, sections, b.text);\n }\n open = (a.ins > len || b.ins >= 0 && b.len > len) && (open || sections.length > sectionLen);\n a.forward2(len);\n b.forward(len);\n }\n }\n}\nclass SectionIter {\n constructor(set) {\n this.set = set;\n this.i = 0;\n this.next();\n }\n next() {\n let { sections } = this.set;\n if (this.i < sections.length) {\n this.len = sections[this.i++];\n this.ins = sections[this.i++];\n }\n else {\n this.len = 0;\n this.ins = -2;\n }\n this.off = 0;\n }\n get done() { return this.ins == -2; }\n get len2() { return this.ins < 0 ? this.len : this.ins; }\n get text() {\n let { inserted } = this.set, index = (this.i - 2) >> 1;\n return index >= inserted.length ? Text.empty : inserted[index];\n }\n textBit(len) {\n let { inserted } = this.set, index = (this.i - 2) >> 1;\n return index >= inserted.length && !len ? Text.empty\n : inserted[index].slice(this.off, len == null ? undefined : this.off + len);\n }\n forward(len) {\n if (len == this.len)\n this.next();\n else {\n this.len -= len;\n this.off += len;\n }\n }\n forward2(len) {\n if (this.ins == -1)\n this.forward(len);\n else if (len == this.ins)\n this.next();\n else {\n this.ins -= len;\n this.off += len;\n }\n }\n}\n\n/**\nA single selection range. When\n[`allowMultipleSelections`](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)\nis enabled, a [selection](https://codemirror.net/6/docs/ref/#state.EditorSelection) may hold\nmultiple ranges. By default, selections hold exactly one range.\n*/\nclass SelectionRange {\n constructor(\n /**\n The lower boundary of the range.\n */\n from, \n /**\n The upper boundary of the range.\n */\n to, flags) {\n this.from = from;\n this.to = to;\n this.flags = flags;\n }\n /**\n The anchor of the range—the side that doesn't move when you\n extend it.\n */\n get anchor() { return this.flags & 32 /* RangeFlag.Inverted */ ? this.to : this.from; }\n /**\n The head of the range, which is moved when the range is\n [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).\n */\n get head() { return this.flags & 32 /* RangeFlag.Inverted */ ? this.from : this.to; }\n /**\n True when `anchor` and `head` are at the same position.\n */\n get empty() { return this.from == this.to; }\n /**\n If this is a cursor that is explicitly associated with the\n character on one of its sides, this returns the side. -1 means\n the character before its position, 1 the character after, and 0\n means no association.\n */\n get assoc() { return this.flags & 8 /* RangeFlag.AssocBefore */ ? -1 : this.flags & 16 /* RangeFlag.AssocAfter */ ? 1 : 0; }\n /**\n The bidirectional text level associated with this cursor, if\n any.\n */\n get bidiLevel() {\n let level = this.flags & 7 /* RangeFlag.BidiLevelMask */;\n return level == 7 ? null : level;\n }\n /**\n The goal column (stored vertical offset) associated with a\n cursor. This is used to preserve the vertical position when\n [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across\n lines of different length.\n */\n get goalColumn() {\n let value = this.flags >> 6 /* RangeFlag.GoalColumnOffset */;\n return value == 16777215 /* RangeFlag.NoGoalColumn */ ? undefined : value;\n }\n /**\n Map this range through a change, producing a valid range in the\n updated document.\n */\n map(change, assoc = -1) {\n let from, to;\n if (this.empty) {\n from = to = change.mapPos(this.from, assoc);\n }\n else {\n from = change.mapPos(this.from, 1);\n to = change.mapPos(this.to, -1);\n }\n return from == this.from && to == this.to ? this : new SelectionRange(from, to, this.flags);\n }\n /**\n Extend this range to cover at least `from` to `to`.\n */\n extend(from, to = from) {\n if (from <= this.anchor && to >= this.anchor)\n return EditorSelection.range(from, to);\n let head = Math.abs(from - this.anchor) > Math.abs(to - this.anchor) ? from : to;\n return EditorSelection.range(this.anchor, head);\n }\n /**\n Compare this range to another range.\n */\n eq(other, includeAssoc = false) {\n return this.anchor == other.anchor && this.head == other.head &&\n (!includeAssoc || !this.empty || this.assoc == other.assoc);\n }\n /**\n Return a JSON-serializable object representing the range.\n */\n toJSON() { return { anchor: this.anchor, head: this.head }; }\n /**\n Convert a JSON representation of a range to a `SelectionRange`\n instance.\n */\n static fromJSON(json) {\n if (!json || typeof json.anchor != \"number\" || typeof json.head != \"number\")\n throw new RangeError(\"Invalid JSON representation for SelectionRange\");\n return EditorSelection.range(json.anchor, json.head);\n }\n /**\n @internal\n */\n static create(from, to, flags) {\n return new SelectionRange(from, to, flags);\n }\n}\n/**\nAn editor selection holds one or more selection ranges.\n*/\nclass EditorSelection {\n constructor(\n /**\n The ranges in the selection, sorted by position. Ranges cannot\n overlap (but they may touch, if they aren't empty).\n */\n ranges, \n /**\n The index of the _main_ range in the selection (which is\n usually the range that was added last).\n */\n mainIndex) {\n this.ranges = ranges;\n this.mainIndex = mainIndex;\n }\n /**\n Map a selection through a change. Used to adjust the selection\n position for changes.\n */\n map(change, assoc = -1) {\n if (change.empty)\n return this;\n return EditorSelection.create(this.ranges.map(r => r.map(change, assoc)), this.mainIndex);\n }\n /**\n Compare this selection to another selection. By default, ranges\n are compared only by position. When `includeAssoc` is true,\n cursor ranges must also have the same\n [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.\n */\n eq(other, includeAssoc = false) {\n if (this.ranges.length != other.ranges.length ||\n this.mainIndex != other.mainIndex)\n return false;\n for (let i = 0; i < this.ranges.length; i++)\n if (!this.ranges[i].eq(other.ranges[i], includeAssoc))\n return false;\n return true;\n }\n /**\n Get the primary selection range. Usually, you should make sure\n your code applies to _all_ ranges, by using methods like\n [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).\n */\n get main() { return this.ranges[this.mainIndex]; }\n /**\n Make sure the selection only has one range. Returns a selection\n holding only the main range from this selection.\n */\n asSingle() {\n return this.ranges.length == 1 ? this : new EditorSelection([this.main], 0);\n }\n /**\n Extend this selection with an extra range.\n */\n addRange(range, main = true) {\n return EditorSelection.create([range].concat(this.ranges), main ? 0 : this.mainIndex + 1);\n }\n /**\n Replace a given range with another range, and then normalize the\n selection to merge and sort ranges if necessary.\n */\n replaceRange(range, which = this.mainIndex) {\n let ranges = this.ranges.slice();\n ranges[which] = range;\n return EditorSelection.create(ranges, this.mainIndex);\n }\n /**\n Convert this selection to an object that can be serialized to\n JSON.\n */\n toJSON() {\n return { ranges: this.ranges.map(r => r.toJSON()), main: this.mainIndex };\n }\n /**\n Create a selection from a JSON representation.\n */\n static fromJSON(json) {\n if (!json || !Array.isArray(json.ranges) || typeof json.main != \"number\" || json.main >= json.ranges.length)\n throw new RangeError(\"Invalid JSON representation for EditorSelection\");\n return new EditorSelection(json.ranges.map((r) => SelectionRange.fromJSON(r)), json.main);\n }\n /**\n Create a selection holding a single range.\n */\n static single(anchor, head = anchor) {\n return new EditorSelection([EditorSelection.range(anchor, head)], 0);\n }\n /**\n Sort and merge the given set of ranges, creating a valid\n selection.\n */\n static create(ranges, mainIndex = 0) {\n if (ranges.length == 0)\n throw new RangeError(\"A selection needs at least one range\");\n for (let pos = 0, i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n if (range.empty ? range.from <= pos : range.from < pos)\n return EditorSelection.normalized(ranges.slice(), mainIndex);\n pos = range.to;\n }\n return new EditorSelection(ranges, mainIndex);\n }\n /**\n Create a cursor selection range at the given position. You can\n safely ignore the optional arguments in most situations.\n */\n static cursor(pos, assoc = 0, bidiLevel, goalColumn) {\n return SelectionRange.create(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 8 /* RangeFlag.AssocBefore */ : 16 /* RangeFlag.AssocAfter */) |\n (bidiLevel == null ? 7 : Math.min(6, bidiLevel)) |\n ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */));\n }\n /**\n Create a selection range.\n */\n static range(anchor, head, goalColumn, bidiLevel) {\n let flags = ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */) |\n (bidiLevel == null ? 7 : Math.min(6, bidiLevel));\n return head < anchor ? SelectionRange.create(head, anchor, 32 /* RangeFlag.Inverted */ | 16 /* RangeFlag.AssocAfter */ | flags)\n : SelectionRange.create(anchor, head, (head > anchor ? 8 /* RangeFlag.AssocBefore */ : 0) | flags);\n }\n /**\n @internal\n */\n static normalized(ranges, mainIndex = 0) {\n let main = ranges[mainIndex];\n ranges.sort((a, b) => a.from - b.from);\n mainIndex = ranges.indexOf(main);\n for (let i = 1; i < ranges.length; i++) {\n let range = ranges[i], prev = ranges[i - 1];\n if (range.empty ? range.from <= prev.to : range.from < prev.to) {\n let from = prev.from, to = Math.max(range.to, prev.to);\n if (i <= mainIndex)\n mainIndex--;\n ranges.splice(--i, 2, range.anchor > range.head ? EditorSelection.range(to, from) : EditorSelection.range(from, to));\n }\n }\n return new EditorSelection(ranges, mainIndex);\n }\n}\nfunction checkSelection(selection, docLength) {\n for (let range of selection.ranges)\n if (range.to > docLength)\n throw new RangeError(\"Selection points outside of document\");\n}\n\nlet nextID = 0;\n/**\nA facet is a labeled value that is associated with an editor\nstate. It takes inputs from any number of extensions, and combines\nthose into a single output value.\n\nExamples of uses of facets are the [tab\nsize](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize), [editor\nattributes](https://codemirror.net/6/docs/ref/#view.EditorView^editorAttributes), and [update\nlisteners](https://codemirror.net/6/docs/ref/#view.EditorView^updateListener).\n\nNote that `Facet` instances can be used anywhere where\n[`FacetReader`](https://codemirror.net/6/docs/ref/#state.FacetReader) is expected.\n*/\nclass Facet {\n constructor(\n /**\n @internal\n */\n combine, \n /**\n @internal\n */\n compareInput, \n /**\n @internal\n */\n compare, isStatic, enables) {\n this.combine = combine;\n this.compareInput = compareInput;\n this.compare = compare;\n this.isStatic = isStatic;\n /**\n @internal\n */\n this.id = nextID++;\n this.default = combine([]);\n this.extensions = typeof enables == \"function\" ? enables(this) : enables;\n }\n /**\n Returns a facet reader for this facet, which can be used to\n [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.\n */\n get reader() { return this; }\n /**\n Define a new facet.\n */\n static define(config = {}) {\n return new Facet(config.combine || ((a) => a), config.compareInput || ((a, b) => a === b), config.compare || (!config.combine ? sameArray : (a, b) => a === b), !!config.static, config.enables);\n }\n /**\n Returns an extension that adds the given value to this facet.\n */\n of(value) {\n return new FacetProvider([], this, 0 /* Provider.Static */, value);\n }\n /**\n Create an extension that computes a value for the facet from a\n state. You must take care to declare the parts of the state that\n this value depends on, since your function is only called again\n for a new state when one of those parts changed.\n \n In cases where your value depends only on a single field, you'll\n want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.\n */\n compute(deps, get) {\n if (this.isStatic)\n throw new Error(\"Can't compute a static facet\");\n return new FacetProvider(deps, this, 1 /* Provider.Single */, get);\n }\n /**\n Create an extension that computes zero or more values for this\n facet from a state.\n */\n computeN(deps, get) {\n if (this.isStatic)\n throw new Error(\"Can't compute a static facet\");\n return new FacetProvider(deps, this, 2 /* Provider.Multi */, get);\n }\n from(field, get) {\n if (!get)\n get = x => x;\n return this.compute([field], state => get(state.field(field)));\n }\n}\nfunction sameArray(a, b) {\n return a == b || a.length == b.length && a.every((e, i) => e === b[i]);\n}\nclass FacetProvider {\n constructor(dependencies, facet, type, value) {\n this.dependencies = dependencies;\n this.facet = facet;\n this.type = type;\n this.value = value;\n this.id = nextID++;\n }\n dynamicSlot(addresses) {\n var _a;\n let getter = this.value;\n let compare = this.facet.compareInput;\n let id = this.id, idx = addresses[id] >> 1, multi = this.type == 2 /* Provider.Multi */;\n let depDoc = false, depSel = false, depAddrs = [];\n for (let dep of this.dependencies) {\n if (dep == \"doc\")\n depDoc = true;\n else if (dep == \"selection\")\n depSel = true;\n else if ((((_a = addresses[dep.id]) !== null && _a !== void 0 ? _a : 1) & 1) == 0)\n depAddrs.push(addresses[dep.id]);\n }\n return {\n create(state) {\n state.values[idx] = getter(state);\n return 1 /* SlotStatus.Changed */;\n },\n update(state, tr) {\n if ((depDoc && tr.docChanged) || (depSel && (tr.docChanged || tr.selection)) || ensureAll(state, depAddrs)) {\n let newVal = getter(state);\n if (multi ? !compareArray(newVal, state.values[idx], compare) : !compare(newVal, state.values[idx])) {\n state.values[idx] = newVal;\n return 1 /* SlotStatus.Changed */;\n }\n }\n return 0;\n },\n reconfigure: (state, oldState) => {\n let newVal, oldAddr = oldState.config.address[id];\n if (oldAddr != null) {\n let oldVal = getAddr(oldState, oldAddr);\n if (this.dependencies.every(dep => {\n return dep instanceof Facet ? oldState.facet(dep) === state.facet(dep) :\n dep instanceof StateField ? oldState.field(dep, false) == state.field(dep, false) : true;\n }) || (multi ? compareArray(newVal = getter(state), oldVal, compare) : compare(newVal = getter(state), oldVal))) {\n state.values[idx] = oldVal;\n return 0;\n }\n }\n else {\n newVal = getter(state);\n }\n state.values[idx] = newVal;\n return 1 /* SlotStatus.Changed */;\n }\n };\n }\n}\nfunction compareArray(a, b, compare) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compare(a[i], b[i]))\n return false;\n return true;\n}\nfunction ensureAll(state, addrs) {\n let changed = false;\n for (let addr of addrs)\n if (ensureAddr(state, addr) & 1 /* SlotStatus.Changed */)\n changed = true;\n return changed;\n}\nfunction dynamicFacetSlot(addresses, facet, providers) {\n let providerAddrs = providers.map(p => addresses[p.id]);\n let providerTypes = providers.map(p => p.type);\n let dynamic = providerAddrs.filter(p => !(p & 1));\n let idx = addresses[facet.id] >> 1;\n function get(state) {\n let values = [];\n for (let i = 0; i < providerAddrs.length; i++) {\n let value = getAddr(state, providerAddrs[i]);\n if (providerTypes[i] == 2 /* Provider.Multi */)\n for (let val of value)\n values.push(val);\n else\n values.push(value);\n }\n return facet.combine(values);\n }\n return {\n create(state) {\n for (let addr of providerAddrs)\n ensureAddr(state, addr);\n state.values[idx] = get(state);\n return 1 /* SlotStatus.Changed */;\n },\n update(state, tr) {\n if (!ensureAll(state, dynamic))\n return 0;\n let value = get(state);\n if (facet.compare(value, state.values[idx]))\n return 0;\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n },\n reconfigure(state, oldState) {\n let depChanged = ensureAll(state, providerAddrs);\n let oldProviders = oldState.config.facets[facet.id], oldValue = oldState.facet(facet);\n if (oldProviders && !depChanged && sameArray(providers, oldProviders)) {\n state.values[idx] = oldValue;\n return 0;\n }\n let value = get(state);\n if (facet.compare(value, oldValue)) {\n state.values[idx] = oldValue;\n return 0;\n }\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n }\n };\n}\nconst initField = /*@__PURE__*/Facet.define({ static: true });\n/**\nFields can store additional information in an editor state, and\nkeep it in sync with the rest of the state.\n*/\nclass StateField {\n constructor(\n /**\n @internal\n */\n id, createF, updateF, compareF, \n /**\n @internal\n */\n spec) {\n this.id = id;\n this.createF = createF;\n this.updateF = updateF;\n this.compareF = compareF;\n this.spec = spec;\n /**\n @internal\n */\n this.provides = undefined;\n }\n /**\n Define a state field.\n */\n static define(config) {\n let field = new StateField(nextID++, config.create, config.update, config.compare || ((a, b) => a === b), config);\n if (config.provide)\n field.provides = config.provide(field);\n return field;\n }\n create(state) {\n let init = state.facet(initField).find(i => i.field == this);\n return ((init === null || init === void 0 ? void 0 : init.create) || this.createF)(state);\n }\n /**\n @internal\n */\n slot(addresses) {\n let idx = addresses[this.id] >> 1;\n return {\n create: (state) => {\n state.values[idx] = this.create(state);\n return 1 /* SlotStatus.Changed */;\n },\n update: (state, tr) => {\n let oldVal = state.values[idx];\n let value = this.updateF(oldVal, tr);\n if (this.compareF(oldVal, value))\n return 0;\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n },\n reconfigure: (state, oldState) => {\n if (oldState.config.address[this.id] != null) {\n state.values[idx] = oldState.field(this);\n return 0;\n }\n state.values[idx] = this.create(state);\n return 1 /* SlotStatus.Changed */;\n }\n };\n }\n /**\n Returns an extension that enables this field and overrides the\n way it is initialized. Can be useful when you need to provide a\n non-default starting value for the field.\n */\n init(create) {\n return [this, initField.of({ field: this, create })];\n }\n /**\n State field instances can be used as\n [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a\n given state.\n */\n get extension() { return this; }\n}\nconst Prec_ = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };\nfunction prec(value) {\n return (ext) => new PrecExtension(ext, value);\n}\n/**\nBy default extensions are registered in the order they are found\nin the flattened form of nested array that was provided.\nIndividual extension values can be assigned a precedence to\noverride this. Extensions that do not have a precedence set get\nthe precedence of the nearest parent with a precedence, or\n[`default`](https://codemirror.net/6/docs/ref/#state.Prec.default) if there is no such parent. The\nfinal ordering of extensions is determined by first sorting by\nprecedence and then by order within each precedence.\n*/\nconst Prec = {\n /**\n The highest precedence level, for extensions that should end up\n near the start of the precedence ordering.\n */\n highest: /*@__PURE__*/prec(Prec_.highest),\n /**\n A higher-than-default precedence, for extensions that should\n come before those with default precedence.\n */\n high: /*@__PURE__*/prec(Prec_.high),\n /**\n The default precedence, which is also used for extensions\n without an explicit precedence.\n */\n default: /*@__PURE__*/prec(Prec_.default),\n /**\n A lower-than-default precedence.\n */\n low: /*@__PURE__*/prec(Prec_.low),\n /**\n The lowest precedence level. Meant for things that should end up\n near the end of the extension order.\n */\n lowest: /*@__PURE__*/prec(Prec_.lowest)\n};\nclass PrecExtension {\n constructor(inner, prec) {\n this.inner = inner;\n this.prec = prec;\n }\n}\n/**\nExtension compartments can be used to make a configuration\ndynamic. By [wrapping](https://codemirror.net/6/docs/ref/#state.Compartment.of) part of your\nconfiguration in a compartment, you can later\n[replace](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure) that part through a\ntransaction.\n*/\nclass Compartment {\n /**\n Create an instance of this compartment to add to your [state\n configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).\n */\n of(ext) { return new CompartmentInstance(this, ext); }\n /**\n Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that\n reconfigures this compartment.\n */\n reconfigure(content) {\n return Compartment.reconfigure.of({ compartment: this, extension: content });\n }\n /**\n Get the current content of the compartment in the state, or\n `undefined` if it isn't present.\n */\n get(state) {\n return state.config.compartments.get(this);\n }\n}\nclass CompartmentInstance {\n constructor(compartment, inner) {\n this.compartment = compartment;\n this.inner = inner;\n }\n}\nclass Configuration {\n constructor(base, compartments, dynamicSlots, address, staticValues, facets) {\n this.base = base;\n this.compartments = compartments;\n this.dynamicSlots = dynamicSlots;\n this.address = address;\n this.staticValues = staticValues;\n this.facets = facets;\n this.statusTemplate = [];\n while (this.statusTemplate.length < dynamicSlots.length)\n this.statusTemplate.push(0 /* SlotStatus.Unresolved */);\n }\n staticFacet(facet) {\n let addr = this.address[facet.id];\n return addr == null ? facet.default : this.staticValues[addr >> 1];\n }\n static resolve(base, compartments, oldState) {\n let fields = [];\n let facets = Object.create(null);\n let newCompartments = new Map();\n for (let ext of flatten(base, compartments, newCompartments)) {\n if (ext instanceof StateField)\n fields.push(ext);\n else\n (facets[ext.facet.id] || (facets[ext.facet.id] = [])).push(ext);\n }\n let address = Object.create(null);\n let staticValues = [];\n let dynamicSlots = [];\n for (let field of fields) {\n address[field.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => field.slot(a));\n }\n let oldFacets = oldState === null || oldState === void 0 ? void 0 : oldState.config.facets;\n for (let id in facets) {\n let providers = facets[id], facet = providers[0].facet;\n let oldProviders = oldFacets && oldFacets[id] || [];\n if (providers.every(p => p.type == 0 /* Provider.Static */)) {\n address[facet.id] = (staticValues.length << 1) | 1;\n if (sameArray(oldProviders, providers)) {\n staticValues.push(oldState.facet(facet));\n }\n else {\n let value = facet.combine(providers.map(p => p.value));\n staticValues.push(oldState && facet.compare(value, oldState.facet(facet)) ? oldState.facet(facet) : value);\n }\n }\n else {\n for (let p of providers) {\n if (p.type == 0 /* Provider.Static */) {\n address[p.id] = (staticValues.length << 1) | 1;\n staticValues.push(p.value);\n }\n else {\n address[p.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => p.dynamicSlot(a));\n }\n }\n address[facet.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => dynamicFacetSlot(a, facet, providers));\n }\n }\n let dynamic = dynamicSlots.map(f => f(address));\n return new Configuration(base, newCompartments, dynamic, address, staticValues, facets);\n }\n}\nfunction flatten(extension, compartments, newCompartments) {\n let result = [[], [], [], [], []];\n let seen = new Map();\n function inner(ext, prec) {\n let known = seen.get(ext);\n if (known != null) {\n if (known <= prec)\n return;\n let found = result[known].indexOf(ext);\n if (found > -1)\n result[known].splice(found, 1);\n if (ext instanceof CompartmentInstance)\n newCompartments.delete(ext.compartment);\n }\n seen.set(ext, prec);\n if (Array.isArray(ext)) {\n for (let e of ext)\n inner(e, prec);\n }\n else if (ext instanceof CompartmentInstance) {\n if (newCompartments.has(ext.compartment))\n throw new RangeError(`Duplicate use of compartment in extensions`);\n let content = compartments.get(ext.compartment) || ext.inner;\n newCompartments.set(ext.compartment, content);\n inner(content, prec);\n }\n else if (ext instanceof PrecExtension) {\n inner(ext.inner, ext.prec);\n }\n else if (ext instanceof StateField) {\n result[prec].push(ext);\n if (ext.provides)\n inner(ext.provides, prec);\n }\n else if (ext instanceof FacetProvider) {\n result[prec].push(ext);\n if (ext.facet.extensions)\n inner(ext.facet.extensions, Prec_.default);\n }\n else {\n let content = ext.extension;\n if (!content)\n throw new Error(`Unrecognized extension value in extension set (${ext}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);\n inner(content, prec);\n }\n }\n inner(extension, Prec_.default);\n return result.reduce((a, b) => a.concat(b));\n}\nfunction ensureAddr(state, addr) {\n if (addr & 1)\n return 2 /* SlotStatus.Computed */;\n let idx = addr >> 1;\n let status = state.status[idx];\n if (status == 4 /* SlotStatus.Computing */)\n throw new Error(\"Cyclic dependency between fields and/or facets\");\n if (status & 2 /* SlotStatus.Computed */)\n return status;\n state.status[idx] = 4 /* SlotStatus.Computing */;\n let changed = state.computeSlot(state, state.config.dynamicSlots[idx]);\n return state.status[idx] = 2 /* SlotStatus.Computed */ | changed;\n}\nfunction getAddr(state, addr) {\n return addr & 1 ? state.config.staticValues[addr >> 1] : state.values[addr >> 1];\n}\n\nconst languageData = /*@__PURE__*/Facet.define();\nconst allowMultipleSelections = /*@__PURE__*/Facet.define({\n combine: values => values.some(v => v),\n static: true\n});\nconst lineSeparator = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : undefined,\n static: true\n});\nconst changeFilter = /*@__PURE__*/Facet.define();\nconst transactionFilter = /*@__PURE__*/Facet.define();\nconst transactionExtender = /*@__PURE__*/Facet.define();\nconst readOnly = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : false\n});\n\n/**\nAnnotations are tagged values that are used to add metadata to\ntransactions in an extensible way. They should be used to model\nthings that effect the entire transaction (such as its [time\nstamp](https://codemirror.net/6/docs/ref/#state.Transaction^time) or information about its\n[origin](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent)). For effects that happen\n_alongside_ the other changes made by the transaction, [state\neffects](https://codemirror.net/6/docs/ref/#state.StateEffect) are more appropriate.\n*/\nclass Annotation {\n /**\n @internal\n */\n constructor(\n /**\n The annotation type.\n */\n type, \n /**\n The value of this annotation.\n */\n value) {\n this.type = type;\n this.value = value;\n }\n /**\n Define a new type of annotation.\n */\n static define() { return new AnnotationType(); }\n}\n/**\nMarker that identifies a type of [annotation](https://codemirror.net/6/docs/ref/#state.Annotation).\n*/\nclass AnnotationType {\n /**\n Create an instance of this annotation.\n */\n of(value) { return new Annotation(this, value); }\n}\n/**\nRepresentation of a type of state effect. Defined with\n[`StateEffect.define`](https://codemirror.net/6/docs/ref/#state.StateEffect^define).\n*/\nclass StateEffectType {\n /**\n @internal\n */\n constructor(\n // The `any` types in these function types are there to work\n // around TypeScript issue #37631, where the type guard on\n // `StateEffect.is` mysteriously stops working when these properly\n // have type `Value`.\n /**\n @internal\n */\n map) {\n this.map = map;\n }\n /**\n Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this\n type.\n */\n of(value) { return new StateEffect(this, value); }\n}\n/**\nState effects can be used to represent additional effects\nassociated with a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction.effects). They\nare often useful to model changes to custom [state\nfields](https://codemirror.net/6/docs/ref/#state.StateField), when those changes aren't implicit in\ndocument or selection changes.\n*/\nclass StateEffect {\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n type, \n /**\n The value of this effect.\n */\n value) {\n this.type = type;\n this.value = value;\n }\n /**\n Map this effect through a position mapping. Will return\n `undefined` when that ends up deleting the effect.\n */\n map(mapping) {\n let mapped = this.type.map(this.value, mapping);\n return mapped === undefined ? undefined : mapped == this.value ? this : new StateEffect(this.type, mapped);\n }\n /**\n Tells you whether this effect object is of a given\n [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).\n */\n is(type) { return this.type == type; }\n /**\n Define a new effect type. The type parameter indicates the type\n of values that his effect holds. It should be a type that\n doesn't include `undefined`, since that is used in\n [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is\n removed.\n */\n static define(spec = {}) {\n return new StateEffectType(spec.map || (v => v));\n }\n /**\n Map an array of effects through a change set.\n */\n static mapEffects(effects, mapping) {\n if (!effects.length)\n return effects;\n let result = [];\n for (let effect of effects) {\n let mapped = effect.map(mapping);\n if (mapped)\n result.push(mapped);\n }\n return result;\n }\n}\n/**\nThis effect can be used to reconfigure the root extensions of\nthe editor. Doing this will discard any extensions\n[appended](https://codemirror.net/6/docs/ref/#state.StateEffect^appendConfig), but does not reset\nthe content of [reconfigured](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure)\ncompartments.\n*/\nStateEffect.reconfigure = /*@__PURE__*/StateEffect.define();\n/**\nAppend extensions to the top-level configuration of the editor.\n*/\nStateEffect.appendConfig = /*@__PURE__*/StateEffect.define();\n/**\nChanges to the editor state are grouped into transactions.\nTypically, a user action creates a single transaction, which may\ncontain any number of document changes, may change the selection,\nor have other effects. Create a transaction by calling\n[`EditorState.update`](https://codemirror.net/6/docs/ref/#state.EditorState.update), or immediately\ndispatch one by calling\n[`EditorView.dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch).\n*/\nclass Transaction {\n constructor(\n /**\n The state from which the transaction starts.\n */\n startState, \n /**\n The document changes made by this transaction.\n */\n changes, \n /**\n The selection set by this transaction, or undefined if it\n doesn't explicitly set a selection.\n */\n selection, \n /**\n The effects added to the transaction.\n */\n effects, \n /**\n @internal\n */\n annotations, \n /**\n Whether the selection should be scrolled into view after this\n transaction is dispatched.\n */\n scrollIntoView) {\n this.startState = startState;\n this.changes = changes;\n this.selection = selection;\n this.effects = effects;\n this.annotations = annotations;\n this.scrollIntoView = scrollIntoView;\n /**\n @internal\n */\n this._doc = null;\n /**\n @internal\n */\n this._state = null;\n if (selection)\n checkSelection(selection, changes.newLength);\n if (!annotations.some((a) => a.type == Transaction.time))\n this.annotations = annotations.concat(Transaction.time.of(Date.now()));\n }\n /**\n @internal\n */\n static create(startState, changes, selection, effects, annotations, scrollIntoView) {\n return new Transaction(startState, changes, selection, effects, annotations, scrollIntoView);\n }\n /**\n The new document produced by the transaction. Contrary to\n [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't\n force the entire new state to be computed right away, so it is\n recommended that [transaction\n filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter\n when they need to look at the new document.\n */\n get newDoc() {\n return this._doc || (this._doc = this.changes.apply(this.startState.doc));\n }\n /**\n The new selection produced by the transaction. If\n [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,\n this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's\n current selection through the changes made by the transaction.\n */\n get newSelection() {\n return this.selection || this.startState.selection.map(this.changes);\n }\n /**\n The new state created by the transaction. Computed on demand\n (but retained for subsequent access), so it is recommended not to\n access it in [transaction\n filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.\n */\n get state() {\n if (!this._state)\n this.startState.applyTransaction(this);\n return this._state;\n }\n /**\n Get the value of the given annotation type, if any.\n */\n annotation(type) {\n for (let ann of this.annotations)\n if (ann.type == type)\n return ann.value;\n return undefined;\n }\n /**\n Indicates whether the transaction changed the document.\n */\n get docChanged() { return !this.changes.empty; }\n /**\n Indicates whether this transaction reconfigures the state\n (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or\n with a top-level configuration\n [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).\n */\n get reconfigured() { return this.startState.config != this.state.config; }\n /**\n Returns true if the transaction has a [user\n event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to\n or more specific than `event`. For example, if the transaction\n has `\"select.pointer\"` as user event, `\"select\"` and\n `\"select.pointer\"` will match it.\n */\n isUserEvent(event) {\n let e = this.annotation(Transaction.userEvent);\n return !!(e && (e == event || e.length > event.length && e.slice(0, event.length) == event && e[event.length] == \".\"));\n }\n}\n/**\nAnnotation used to store transaction timestamps. Automatically\nadded to every transaction, holding `Date.now()`.\n*/\nTransaction.time = /*@__PURE__*/Annotation.define();\n/**\nAnnotation used to associate a transaction with a user interface\nevent. Holds a string identifying the event, using a\ndot-separated format to support attaching more specific\ninformation. The events used by the core libraries are:\n\n - `\"input\"` when content is entered\n - `\"input.type\"` for typed input\n - `\"input.type.compose\"` for composition\n - `\"input.paste\"` for pasted input\n - `\"input.drop\"` when adding content with drag-and-drop\n - `\"input.complete\"` when autocompleting\n - `\"delete\"` when the user deletes content\n - `\"delete.selection\"` when deleting the selection\n - `\"delete.forward\"` when deleting forward from the selection\n - `\"delete.backward\"` when deleting backward from the selection\n - `\"delete.cut\"` when cutting to the clipboard\n - `\"move\"` when content is moved\n - `\"move.drop\"` when content is moved within the editor through drag-and-drop\n - `\"select\"` when explicitly changing the selection\n - `\"select.pointer\"` when selecting with a mouse or other pointing device\n - `\"undo\"` and `\"redo\"` for history actions\n\nUse [`isUserEvent`](https://codemirror.net/6/docs/ref/#state.Transaction.isUserEvent) to check\nwhether the annotation matches a given event.\n*/\nTransaction.userEvent = /*@__PURE__*/Annotation.define();\n/**\nAnnotation indicating whether a transaction should be added to\nthe undo history or not.\n*/\nTransaction.addToHistory = /*@__PURE__*/Annotation.define();\n/**\nAnnotation indicating (when present and true) that a transaction\nrepresents a change made by some other actor, not the user. This\nis used, for example, to tag other people's changes in\ncollaborative editing.\n*/\nTransaction.remote = /*@__PURE__*/Annotation.define();\nfunction joinRanges(a, b) {\n let result = [];\n for (let iA = 0, iB = 0;;) {\n let from, to;\n if (iA < a.length && (iB == b.length || b[iB] >= a[iA])) {\n from = a[iA++];\n to = a[iA++];\n }\n else if (iB < b.length) {\n from = b[iB++];\n to = b[iB++];\n }\n else\n return result;\n if (!result.length || result[result.length - 1] < from)\n result.push(from, to);\n else if (result[result.length - 1] < to)\n result[result.length - 1] = to;\n }\n}\nfunction mergeTransaction(a, b, sequential) {\n var _a;\n let mapForA, mapForB, changes;\n if (sequential) {\n mapForA = b.changes;\n mapForB = ChangeSet.empty(b.changes.length);\n changes = a.changes.compose(b.changes);\n }\n else {\n mapForA = b.changes.map(a.changes);\n mapForB = a.changes.mapDesc(b.changes, true);\n changes = a.changes.compose(mapForA);\n }\n return {\n changes,\n selection: b.selection ? b.selection.map(mapForB) : (_a = a.selection) === null || _a === void 0 ? void 0 : _a.map(mapForA),\n effects: StateEffect.mapEffects(a.effects, mapForA).concat(StateEffect.mapEffects(b.effects, mapForB)),\n annotations: a.annotations.length ? a.annotations.concat(b.annotations) : b.annotations,\n scrollIntoView: a.scrollIntoView || b.scrollIntoView\n };\n}\nfunction resolveTransactionInner(state, spec, docSize) {\n let sel = spec.selection, annotations = asArray(spec.annotations);\n if (spec.userEvent)\n annotations = annotations.concat(Transaction.userEvent.of(spec.userEvent));\n return {\n changes: spec.changes instanceof ChangeSet ? spec.changes\n : ChangeSet.of(spec.changes || [], docSize, state.facet(lineSeparator)),\n selection: sel && (sel instanceof EditorSelection ? sel : EditorSelection.single(sel.anchor, sel.head)),\n effects: asArray(spec.effects),\n annotations,\n scrollIntoView: !!spec.scrollIntoView\n };\n}\nfunction resolveTransaction(state, specs, filter) {\n let s = resolveTransactionInner(state, specs.length ? specs[0] : {}, state.doc.length);\n if (specs.length && specs[0].filter === false)\n filter = false;\n for (let i = 1; i < specs.length; i++) {\n if (specs[i].filter === false)\n filter = false;\n let seq = !!specs[i].sequential;\n s = mergeTransaction(s, resolveTransactionInner(state, specs[i], seq ? s.changes.newLength : state.doc.length), seq);\n }\n let tr = Transaction.create(state, s.changes, s.selection, s.effects, s.annotations, s.scrollIntoView);\n return extendTransaction(filter ? filterTransaction(tr) : tr);\n}\n// Finish a transaction by applying filters if necessary.\nfunction filterTransaction(tr) {\n let state = tr.startState;\n // Change filters\n let result = true;\n for (let filter of state.facet(changeFilter)) {\n let value = filter(tr);\n if (value === false) {\n result = false;\n break;\n }\n if (Array.isArray(value))\n result = result === true ? value : joinRanges(result, value);\n }\n if (result !== true) {\n let changes, back;\n if (result === false) {\n back = tr.changes.invertedDesc;\n changes = ChangeSet.empty(state.doc.length);\n }\n else {\n let filtered = tr.changes.filter(result);\n changes = filtered.changes;\n back = filtered.filtered.mapDesc(filtered.changes).invertedDesc;\n }\n tr = Transaction.create(state, changes, tr.selection && tr.selection.map(back), StateEffect.mapEffects(tr.effects, back), tr.annotations, tr.scrollIntoView);\n }\n // Transaction filters\n let filters = state.facet(transactionFilter);\n for (let i = filters.length - 1; i >= 0; i--) {\n let filtered = filters[i](tr);\n if (filtered instanceof Transaction)\n tr = filtered;\n else if (Array.isArray(filtered) && filtered.length == 1 && filtered[0] instanceof Transaction)\n tr = filtered[0];\n else\n tr = resolveTransaction(state, asArray(filtered), false);\n }\n return tr;\n}\nfunction extendTransaction(tr) {\n let state = tr.startState, extenders = state.facet(transactionExtender), spec = tr;\n for (let i = extenders.length - 1; i >= 0; i--) {\n let extension = extenders[i](tr);\n if (extension && Object.keys(extension).length)\n spec = mergeTransaction(spec, resolveTransactionInner(state, extension, tr.changes.newLength), true);\n }\n return spec == tr ? tr : Transaction.create(state, tr.changes, tr.selection, spec.effects, spec.annotations, spec.scrollIntoView);\n}\nconst none = [];\nfunction asArray(value) {\n return value == null ? none : Array.isArray(value) ? value : [value];\n}\n\n/**\nThe categories produced by a [character\ncategorizer](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer). These are used\ndo things like selecting by word.\n*/\nvar CharCategory = /*@__PURE__*/(function (CharCategory) {\n /**\n Word characters.\n */\n CharCategory[CharCategory[\"Word\"] = 0] = \"Word\";\n /**\n Whitespace.\n */\n CharCategory[CharCategory[\"Space\"] = 1] = \"Space\";\n /**\n Anything else.\n */\n CharCategory[CharCategory[\"Other\"] = 2] = \"Other\";\nreturn CharCategory})(CharCategory || (CharCategory = {}));\nconst nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\nlet wordChar;\ntry {\n wordChar = /*@__PURE__*/new RegExp(\"[\\\\p{Alphabetic}\\\\p{Number}_]\", \"u\");\n}\ncatch (_) { }\nfunction hasWordChar(str) {\n if (wordChar)\n return wordChar.test(str);\n for (let i = 0; i < str.length; i++) {\n let ch = str[i];\n if (/\\w/.test(ch) || ch > \"\\x80\" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)))\n return true;\n }\n return false;\n}\nfunction makeCategorizer(wordChars) {\n return (char) => {\n if (!/\\S/.test(char))\n return CharCategory.Space;\n if (hasWordChar(char))\n return CharCategory.Word;\n for (let i = 0; i < wordChars.length; i++)\n if (char.indexOf(wordChars[i]) > -1)\n return CharCategory.Word;\n return CharCategory.Other;\n };\n}\n\n/**\nThe editor state class is a persistent (immutable) data structure.\nTo update a state, you [create](https://codemirror.net/6/docs/ref/#state.EditorState.update) a\n[transaction](https://codemirror.net/6/docs/ref/#state.Transaction), which produces a _new_ state\ninstance, without modifying the original object.\n\nAs such, _never_ mutate properties of a state directly. That'll\njust break things.\n*/\nclass EditorState {\n constructor(\n /**\n @internal\n */\n config, \n /**\n The current document.\n */\n doc, \n /**\n The current selection.\n */\n selection, \n /**\n @internal\n */\n values, computeSlot, tr) {\n this.config = config;\n this.doc = doc;\n this.selection = selection;\n this.values = values;\n this.status = config.statusTemplate.slice();\n this.computeSlot = computeSlot;\n // Fill in the computed state immediately, so that further queries\n // for it made during the update return this state\n if (tr)\n tr._state = this;\n for (let i = 0; i < this.config.dynamicSlots.length; i++)\n ensureAddr(this, i << 1);\n this.computeSlot = null;\n }\n field(field, require = true) {\n let addr = this.config.address[field.id];\n if (addr == null) {\n if (require)\n throw new RangeError(\"Field is not present in this state\");\n return undefined;\n }\n ensureAddr(this, addr);\n return getAddr(this, addr);\n }\n /**\n Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this\n state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)\n can be passed. Unless\n [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the\n [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec\n are assumed to start in the _current_ document (not the document\n produced by previous specs), and its\n [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and\n [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer\n to the document created by its _own_ changes. The resulting\n transaction contains the combined effect of all the different\n specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later\n specs take precedence over earlier ones.\n */\n update(...specs) {\n return resolveTransaction(this, specs, true);\n }\n /**\n @internal\n */\n applyTransaction(tr) {\n let conf = this.config, { base, compartments } = conf;\n for (let effect of tr.effects) {\n if (effect.is(Compartment.reconfigure)) {\n if (conf) {\n compartments = new Map;\n conf.compartments.forEach((val, key) => compartments.set(key, val));\n conf = null;\n }\n compartments.set(effect.value.compartment, effect.value.extension);\n }\n else if (effect.is(StateEffect.reconfigure)) {\n conf = null;\n base = effect.value;\n }\n else if (effect.is(StateEffect.appendConfig)) {\n conf = null;\n base = asArray(base).concat(effect.value);\n }\n }\n let startValues;\n if (!conf) {\n conf = Configuration.resolve(base, compartments, this);\n let intermediateState = new EditorState(conf, this.doc, this.selection, conf.dynamicSlots.map(() => null), (state, slot) => slot.reconfigure(state, this), null);\n startValues = intermediateState.values;\n }\n else {\n startValues = tr.startState.values.slice();\n }\n let selection = tr.startState.facet(allowMultipleSelections) ? tr.newSelection : tr.newSelection.asSingle();\n new EditorState(conf, tr.newDoc, selection, startValues, (state, slot) => slot.update(state, tr), tr);\n }\n /**\n Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that\n replaces every selection range with the given content.\n */\n replaceSelection(text) {\n if (typeof text == \"string\")\n text = this.toText(text);\n return this.changeByRange(range => ({ changes: { from: range.from, to: range.to, insert: text },\n range: EditorSelection.cursor(range.from + text.length) }));\n }\n /**\n Create a set of changes and a new selection by running the given\n function for each range in the active selection. The function\n can return an optional set of changes (in the coordinate space\n of the start document), plus an updated range (in the coordinate\n space of the document produced by the call's own changes). This\n method will merge all the changes and ranges into a single\n changeset and selection, and return it as a [transaction\n spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to\n [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).\n */\n changeByRange(f) {\n let sel = this.selection;\n let result1 = f(sel.ranges[0]);\n let changes = this.changes(result1.changes), ranges = [result1.range];\n let effects = asArray(result1.effects);\n for (let i = 1; i < sel.ranges.length; i++) {\n let result = f(sel.ranges[i]);\n let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);\n for (let j = 0; j < i; j++)\n ranges[j] = ranges[j].map(newMapped);\n let mapBy = changes.mapDesc(newChanges, true);\n ranges.push(result.range.map(mapBy));\n changes = changes.compose(newMapped);\n effects = StateEffect.mapEffects(effects, newMapped).concat(StateEffect.mapEffects(asArray(result.effects), mapBy));\n }\n return {\n changes,\n selection: EditorSelection.create(ranges, sel.mainIndex),\n effects\n };\n }\n /**\n Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change\n description, taking the state's document length and line\n separator into account.\n */\n changes(spec = []) {\n if (spec instanceof ChangeSet)\n return spec;\n return ChangeSet.of(spec, this.doc.length, this.facet(EditorState.lineSeparator));\n }\n /**\n Using the state's [line\n separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a\n [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.\n */\n toText(string) {\n return Text.of(string.split(this.facet(EditorState.lineSeparator) || DefaultSplit));\n }\n /**\n Return the given range of the document as a string.\n */\n sliceDoc(from = 0, to = this.doc.length) {\n return this.doc.sliceString(from, to, this.lineBreak);\n }\n /**\n Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).\n */\n facet(facet) {\n let addr = this.config.address[facet.id];\n if (addr == null)\n return facet.default;\n ensureAddr(this, addr);\n return getAddr(this, addr);\n }\n /**\n Convert this state to a JSON-serializable object. When custom\n fields should be serialized, you can pass them in as an object\n mapping property names (in the resulting object, which should\n not use `doc` or `selection`) to fields.\n */\n toJSON(fields) {\n let result = {\n doc: this.sliceDoc(),\n selection: this.selection.toJSON()\n };\n if (fields)\n for (let prop in fields) {\n let value = fields[prop];\n if (value instanceof StateField && this.config.address[value.id] != null)\n result[prop] = value.spec.toJSON(this.field(fields[prop]), this);\n }\n return result;\n }\n /**\n Deserialize a state from its JSON representation. When custom\n fields should be deserialized, pass the same object you passed\n to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as\n third argument.\n */\n static fromJSON(json, config = {}, fields) {\n if (!json || typeof json.doc != \"string\")\n throw new RangeError(\"Invalid JSON representation for EditorState\");\n let fieldInit = [];\n if (fields)\n for (let prop in fields) {\n if (Object.prototype.hasOwnProperty.call(json, prop)) {\n let field = fields[prop], value = json[prop];\n fieldInit.push(field.init(state => field.spec.fromJSON(value, state)));\n }\n }\n return EditorState.create({\n doc: json.doc,\n selection: EditorSelection.fromJSON(json.selection),\n extensions: config.extensions ? fieldInit.concat([config.extensions]) : fieldInit\n });\n }\n /**\n Create a new state. You'll usually only need this when\n initializing an editor—updated states are created by applying\n transactions.\n */\n static create(config = {}) {\n let configuration = Configuration.resolve(config.extensions || [], new Map);\n let doc = config.doc instanceof Text ? config.doc\n : Text.of((config.doc || \"\").split(configuration.staticFacet(EditorState.lineSeparator) || DefaultSplit));\n let selection = !config.selection ? EditorSelection.single(0)\n : config.selection instanceof EditorSelection ? config.selection\n : EditorSelection.single(config.selection.anchor, config.selection.head);\n checkSelection(selection, doc.length);\n if (!configuration.staticFacet(allowMultipleSelections))\n selection = selection.asSingle();\n return new EditorState(configuration, doc, selection, configuration.dynamicSlots.map(() => null), (state, slot) => slot.create(state), null);\n }\n /**\n The size (in columns) of a tab in the document, determined by\n the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.\n */\n get tabSize() { return this.facet(EditorState.tabSize); }\n /**\n Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)\n string for this state.\n */\n get lineBreak() { return this.facet(EditorState.lineSeparator) || \"\\n\"; }\n /**\n Returns true when the editor is\n [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.\n */\n get readOnly() { return this.facet(readOnly); }\n /**\n Look up a translation for the given phrase (via the\n [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the\n original string if no translation is found.\n \n If additional arguments are passed, they will be inserted in\n place of markers like `$1` (for the first value) and `$2`, etc.\n A single `$` is equivalent to `$1`, and `$$` will produce a\n literal dollar sign.\n */\n phrase(phrase, ...insert) {\n for (let map of this.facet(EditorState.phrases))\n if (Object.prototype.hasOwnProperty.call(map, phrase)) {\n phrase = map[phrase];\n break;\n }\n if (insert.length)\n phrase = phrase.replace(/\\$(\\$|\\d*)/g, (m, i) => {\n if (i == \"$\")\n return \"$\";\n let n = +(i || 1);\n return !n || n > insert.length ? m : insert[n - 1];\n });\n return phrase;\n }\n /**\n Find the values for a given language data field, provided by the\n the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.\n \n Examples of language data fields are...\n \n - [`\"commentTokens\"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying\n comment syntax.\n - [`\"autocomplete\"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)\n for providing language-specific completion sources.\n - [`\"wordChars\"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding\n characters that should be considered part of words in this\n language.\n - [`\"closeBrackets\"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls\n bracket closing behavior.\n */\n languageDataAt(name, pos, side = -1) {\n let values = [];\n for (let provider of this.facet(languageData)) {\n for (let result of provider(this, pos, side)) {\n if (Object.prototype.hasOwnProperty.call(result, name))\n values.push(result[name]);\n }\n }\n return values;\n }\n /**\n Return a function that can categorize strings (expected to\n represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))\n into one of:\n \n - Word (contains an alphanumeric character or a character\n explicitly listed in the local language's `\"wordChars\"`\n language data, which should be a string)\n - Space (contains only whitespace)\n - Other (anything else)\n */\n charCategorizer(at) {\n return makeCategorizer(this.languageDataAt(\"wordChars\", at).join(\"\"));\n }\n /**\n Find the word at the given position, meaning the range\n containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters\n around it. If no word characters are adjacent to the position,\n this returns null.\n */\n wordAt(pos) {\n let { text, from, length } = this.doc.lineAt(pos);\n let cat = this.charCategorizer(pos);\n let start = pos - from, end = pos - from;\n while (start > 0) {\n let prev = findClusterBreak(text, start, false);\n if (cat(text.slice(prev, start)) != CharCategory.Word)\n break;\n start = prev;\n }\n while (end < length) {\n let next = findClusterBreak(text, end);\n if (cat(text.slice(end, next)) != CharCategory.Word)\n break;\n end = next;\n }\n return start == end ? null : EditorSelection.range(start + from, end + from);\n }\n}\n/**\nA facet that, when enabled, causes the editor to allow multiple\nranges to be selected. Be careful though, because by default the\neditor relies on the native DOM selection, which cannot handle\nmultiple selections. An extension like\n[`drawSelection`](https://codemirror.net/6/docs/ref/#view.drawSelection) can be used to make\nsecondary selections visible to the user.\n*/\nEditorState.allowMultipleSelections = allowMultipleSelections;\n/**\nConfigures the tab size to use in this state. The first\n(highest-precedence) value of the facet is used. If no value is\ngiven, this defaults to 4.\n*/\nEditorState.tabSize = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : 4\n});\n/**\nThe line separator to use. By default, any of `\"\\n\"`, `\"\\r\\n\"`\nand `\"\\r\"` is treated as a separator when splitting lines, and\nlines are joined with `\"\\n\"`.\n\nWhen you configure a value here, only that precise separator\nwill be used, allowing you to round-trip documents through the\neditor without normalizing line separators.\n*/\nEditorState.lineSeparator = lineSeparator;\n/**\nThis facet controls the value of the\n[`readOnly`](https://codemirror.net/6/docs/ref/#state.EditorState.readOnly) getter, which is\nconsulted by commands and extensions that implement editing\nfunctionality to determine whether they should apply. It\ndefaults to false, but when its highest-precedence value is\n`true`, such functionality disables itself.\n\nNot to be confused with\n[`EditorView.editable`](https://codemirror.net/6/docs/ref/#view.EditorView^editable), which\ncontrols whether the editor's DOM is set to be editable (and\nthus focusable).\n*/\nEditorState.readOnly = readOnly;\n/**\nRegisters translation phrases. The\n[`phrase`](https://codemirror.net/6/docs/ref/#state.EditorState.phrase) method will look through\nall objects registered with this facet to find translations for\nits argument.\n*/\nEditorState.phrases = /*@__PURE__*/Facet.define({\n compare(a, b) {\n let kA = Object.keys(a), kB = Object.keys(b);\n return kA.length == kB.length && kA.every(k => a[k] == b[k]);\n }\n});\n/**\nA facet used to register [language\ndata](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt) providers.\n*/\nEditorState.languageData = languageData;\n/**\nFacet used to register change filters, which are called for each\ntransaction (unless explicitly\n[disabled](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter)), and can suppress\npart of the transaction's changes.\n\nSuch a function can return `true` to indicate that it doesn't\nwant to do anything, `false` to completely stop the changes in\nthe transaction, or a set of ranges in which changes should be\nsuppressed. Such ranges are represented as an array of numbers,\nwith each pair of two numbers indicating the start and end of a\nrange. So for example `[10, 20, 100, 110]` suppresses changes\nbetween 10 and 20, and between 100 and 110.\n*/\nEditorState.changeFilter = changeFilter;\n/**\nFacet used to register a hook that gets a chance to update or\nreplace transaction specs before they are applied. This will\nonly be applied for transactions that don't have\n[`filter`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter) set to `false`. You\ncan either return a single transaction spec (possibly the input\ntransaction), or an array of specs (which will be combined in\nthe same way as the arguments to\n[`EditorState.update`](https://codemirror.net/6/docs/ref/#state.EditorState.update)).\n\nWhen possible, it is recommended to avoid accessing\n[`Transaction.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state) in a filter,\nsince it will force creation of a state that will then be\ndiscarded again, if the transaction is actually filtered.\n\n(This functionality should be used with care. Indiscriminately\nmodifying transaction is likely to break something or degrade\nthe user experience.)\n*/\nEditorState.transactionFilter = transactionFilter;\n/**\nThis is a more limited form of\n[`transactionFilter`](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter),\nwhich can only add\n[annotations](https://codemirror.net/6/docs/ref/#state.TransactionSpec.annotations) and\n[effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects). _But_, this type\nof filter runs even if the transaction has disabled regular\n[filtering](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter), making it suitable\nfor effects that don't need to touch the changes or selection,\nbut do want to process every transaction.\n\nExtenders run _after_ filters, when both are present.\n*/\nEditorState.transactionExtender = transactionExtender;\nCompartment.reconfigure = /*@__PURE__*/StateEffect.define();\n\n/**\nUtility function for combining behaviors to fill in a config\nobject from an array of provided configs. `defaults` should hold\ndefault values for all optional fields in `Config`.\n\nThe function will, by default, error\nwhen a field gets two values that aren't `===`-equal, but you can\nprovide combine functions per field to do something else.\n*/\nfunction combineConfig(configs, defaults, // Should hold only the optional properties of Config, but I haven't managed to express that\ncombine = {}) {\n let result = {};\n for (let config of configs)\n for (let key of Object.keys(config)) {\n let value = config[key], current = result[key];\n if (current === undefined)\n result[key] = value;\n else if (current === value || value === undefined) ; // No conflict\n else if (Object.hasOwnProperty.call(combine, key))\n result[key] = combine[key](current, value);\n else\n throw new Error(\"Config merge conflict for field \" + key);\n }\n for (let key in defaults)\n if (result[key] === undefined)\n result[key] = defaults[key];\n return result;\n}\n\n/**\nEach range is associated with a value, which must inherit from\nthis class.\n*/\nclass RangeValue {\n /**\n Compare this value with another value. Used when comparing\n rangesets. The default implementation compares by identity.\n Unless you are only creating a fixed number of unique instances\n of your value type, it is a good idea to implement this\n properly.\n */\n eq(other) { return this == other; }\n /**\n Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.\n */\n range(from, to = from) { return Range.create(from, to, this); }\n}\nRangeValue.prototype.startSide = RangeValue.prototype.endSide = 0;\nRangeValue.prototype.point = false;\nRangeValue.prototype.mapMode = MapMode.TrackDel;\n/**\nA range associates a value with a range of positions.\n*/\nclass Range {\n constructor(\n /**\n The range's start position.\n */\n from, \n /**\n Its end position.\n */\n to, \n /**\n The value associated with this range.\n */\n value) {\n this.from = from;\n this.to = to;\n this.value = value;\n }\n /**\n @internal\n */\n static create(from, to, value) {\n return new Range(from, to, value);\n }\n}\nfunction cmpRange(a, b) {\n return a.from - b.from || a.value.startSide - b.value.startSide;\n}\nclass Chunk {\n constructor(from, to, value, \n // Chunks are marked with the largest point that occurs\n // in them (or -1 for no points), so that scans that are\n // only interested in points (such as the\n // heightmap-related logic) can skip range-only chunks.\n maxPoint) {\n this.from = from;\n this.to = to;\n this.value = value;\n this.maxPoint = maxPoint;\n }\n get length() { return this.to[this.to.length - 1]; }\n // Find the index of the given position and side. Use the ranges'\n // `from` pos when `end == false`, `to` when `end == true`.\n findIndex(pos, side, end, startAt = 0) {\n let arr = end ? this.to : this.from;\n for (let lo = startAt, hi = arr.length;;) {\n if (lo == hi)\n return lo;\n let mid = (lo + hi) >> 1;\n let diff = arr[mid] - pos || (end ? this.value[mid].endSide : this.value[mid].startSide) - side;\n if (mid == lo)\n return diff >= 0 ? lo : hi;\n if (diff >= 0)\n hi = mid;\n else\n lo = mid + 1;\n }\n }\n between(offset, from, to, f) {\n for (let i = this.findIndex(from, -1000000000 /* C.Far */, true), e = this.findIndex(to, 1000000000 /* C.Far */, false, i); i < e; i++)\n if (f(this.from[i] + offset, this.to[i] + offset, this.value[i]) === false)\n return false;\n }\n map(offset, changes) {\n let value = [], from = [], to = [], newPos = -1, maxPoint = -1;\n for (let i = 0; i < this.value.length; i++) {\n let val = this.value[i], curFrom = this.from[i] + offset, curTo = this.to[i] + offset, newFrom, newTo;\n if (curFrom == curTo) {\n let mapped = changes.mapPos(curFrom, val.startSide, val.mapMode);\n if (mapped == null)\n continue;\n newFrom = newTo = mapped;\n if (val.startSide != val.endSide) {\n newTo = changes.mapPos(curFrom, val.endSide);\n if (newTo < newFrom)\n continue;\n }\n }\n else {\n newFrom = changes.mapPos(curFrom, val.startSide);\n newTo = changes.mapPos(curTo, val.endSide);\n if (newFrom > newTo || newFrom == newTo && val.startSide > 0 && val.endSide <= 0)\n continue;\n }\n if ((newTo - newFrom || val.endSide - val.startSide) < 0)\n continue;\n if (newPos < 0)\n newPos = newFrom;\n if (val.point)\n maxPoint = Math.max(maxPoint, newTo - newFrom);\n value.push(val);\n from.push(newFrom - newPos);\n to.push(newTo - newPos);\n }\n return { mapped: value.length ? new Chunk(from, to, value, maxPoint) : null, pos: newPos };\n }\n}\n/**\nA range set stores a collection of [ranges](https://codemirror.net/6/docs/ref/#state.Range) in a\nway that makes them efficient to [map](https://codemirror.net/6/docs/ref/#state.RangeSet.map) and\n[update](https://codemirror.net/6/docs/ref/#state.RangeSet.update). This is an immutable data\nstructure.\n*/\nclass RangeSet {\n constructor(\n /**\n @internal\n */\n chunkPos, \n /**\n @internal\n */\n chunk, \n /**\n @internal\n */\n nextLayer, \n /**\n @internal\n */\n maxPoint) {\n this.chunkPos = chunkPos;\n this.chunk = chunk;\n this.nextLayer = nextLayer;\n this.maxPoint = maxPoint;\n }\n /**\n @internal\n */\n static create(chunkPos, chunk, nextLayer, maxPoint) {\n return new RangeSet(chunkPos, chunk, nextLayer, maxPoint);\n }\n /**\n @internal\n */\n get length() {\n let last = this.chunk.length - 1;\n return last < 0 ? 0 : Math.max(this.chunkEnd(last), this.nextLayer.length);\n }\n /**\n The number of ranges in the set.\n */\n get size() {\n if (this.isEmpty)\n return 0;\n let size = this.nextLayer.size;\n for (let chunk of this.chunk)\n size += chunk.value.length;\n return size;\n }\n /**\n @internal\n */\n chunkEnd(index) {\n return this.chunkPos[index] + this.chunk[index].length;\n }\n /**\n Update the range set, optionally adding new ranges or filtering\n out existing ones.\n \n (Note: The type parameter is just there as a kludge to work\n around TypeScript variance issues that prevented `RangeSet`\n from being a subtype of `RangeSet` when `X` is a subtype of\n `Y`.)\n */\n update(updateSpec) {\n let { add = [], sort = false, filterFrom = 0, filterTo = this.length } = updateSpec;\n let filter = updateSpec.filter;\n if (add.length == 0 && !filter)\n return this;\n if (sort)\n add = add.slice().sort(cmpRange);\n if (this.isEmpty)\n return add.length ? RangeSet.of(add) : this;\n let cur = new LayerCursor(this, null, -1).goto(0), i = 0, spill = [];\n let builder = new RangeSetBuilder();\n while (cur.value || i < add.length) {\n if (i < add.length && (cur.from - add[i].from || cur.startSide - add[i].value.startSide) >= 0) {\n let range = add[i++];\n if (!builder.addInner(range.from, range.to, range.value))\n spill.push(range);\n }\n else if (cur.rangeIndex == 1 && cur.chunkIndex < this.chunk.length &&\n (i == add.length || this.chunkEnd(cur.chunkIndex) < add[i].from) &&\n (!filter || filterFrom > this.chunkEnd(cur.chunkIndex) || filterTo < this.chunkPos[cur.chunkIndex]) &&\n builder.addChunk(this.chunkPos[cur.chunkIndex], this.chunk[cur.chunkIndex])) {\n cur.nextChunk();\n }\n else {\n if (!filter || filterFrom > cur.to || filterTo < cur.from || filter(cur.from, cur.to, cur.value)) {\n if (!builder.addInner(cur.from, cur.to, cur.value))\n spill.push(Range.create(cur.from, cur.to, cur.value));\n }\n cur.next();\n }\n }\n return builder.finishInner(this.nextLayer.isEmpty && !spill.length ? RangeSet.empty\n : this.nextLayer.update({ add: spill, filter, filterFrom, filterTo }));\n }\n /**\n Map this range set through a set of changes, return the new set.\n */\n map(changes) {\n if (changes.empty || this.isEmpty)\n return this;\n let chunks = [], chunkPos = [], maxPoint = -1;\n for (let i = 0; i < this.chunk.length; i++) {\n let start = this.chunkPos[i], chunk = this.chunk[i];\n let touch = changes.touchesRange(start, start + chunk.length);\n if (touch === false) {\n maxPoint = Math.max(maxPoint, chunk.maxPoint);\n chunks.push(chunk);\n chunkPos.push(changes.mapPos(start));\n }\n else if (touch === true) {\n let { mapped, pos } = chunk.map(start, changes);\n if (mapped) {\n maxPoint = Math.max(maxPoint, mapped.maxPoint);\n chunks.push(mapped);\n chunkPos.push(pos);\n }\n }\n }\n let next = this.nextLayer.map(changes);\n return chunks.length == 0 ? next : new RangeSet(chunkPos, chunks, next || RangeSet.empty, maxPoint);\n }\n /**\n Iterate over the ranges that touch the region `from` to `to`,\n calling `f` for each. There is no guarantee that the ranges will\n be reported in any specific order. When the callback returns\n `false`, iteration stops.\n */\n between(from, to, f) {\n if (this.isEmpty)\n return;\n for (let i = 0; i < this.chunk.length; i++) {\n let start = this.chunkPos[i], chunk = this.chunk[i];\n if (to >= start && from <= start + chunk.length &&\n chunk.between(start, from - start, to - start, f) === false)\n return;\n }\n this.nextLayer.between(from, to, f);\n }\n /**\n Iterate over the ranges in this set, in order, including all\n ranges that end at or after `from`.\n */\n iter(from = 0) {\n return HeapCursor.from([this]).goto(from);\n }\n /**\n @internal\n */\n get isEmpty() { return this.nextLayer == this; }\n /**\n Iterate over the ranges in a collection of sets, in order,\n starting from `from`.\n */\n static iter(sets, from = 0) {\n return HeapCursor.from(sets).goto(from);\n }\n /**\n Iterate over two groups of sets, calling methods on `comparator`\n to notify it of possible differences.\n */\n static compare(oldSets, newSets, \n /**\n This indicates how the underlying data changed between these\n ranges, and is needed to synchronize the iteration.\n */\n textDiff, comparator, \n /**\n Can be used to ignore all non-point ranges, and points below\n the given size. When -1, all ranges are compared.\n */\n minPointSize = -1) {\n let a = oldSets.filter(set => set.maxPoint > 0 || !set.isEmpty && set.maxPoint >= minPointSize);\n let b = newSets.filter(set => set.maxPoint > 0 || !set.isEmpty && set.maxPoint >= minPointSize);\n let sharedChunks = findSharedChunks(a, b, textDiff);\n let sideA = new SpanCursor(a, sharedChunks, minPointSize);\n let sideB = new SpanCursor(b, sharedChunks, minPointSize);\n textDiff.iterGaps((fromA, fromB, length) => compare(sideA, fromA, sideB, fromB, length, comparator));\n if (textDiff.empty && textDiff.length == 0)\n compare(sideA, 0, sideB, 0, 0, comparator);\n }\n /**\n Compare the contents of two groups of range sets, returning true\n if they are equivalent in the given range.\n */\n static eq(oldSets, newSets, from = 0, to) {\n if (to == null)\n to = 1000000000 /* C.Far */ - 1;\n let a = oldSets.filter(set => !set.isEmpty && newSets.indexOf(set) < 0);\n let b = newSets.filter(set => !set.isEmpty && oldSets.indexOf(set) < 0);\n if (a.length != b.length)\n return false;\n if (!a.length)\n return true;\n let sharedChunks = findSharedChunks(a, b);\n let sideA = new SpanCursor(a, sharedChunks, 0).goto(from), sideB = new SpanCursor(b, sharedChunks, 0).goto(from);\n for (;;) {\n if (sideA.to != sideB.to ||\n !sameValues(sideA.active, sideB.active) ||\n sideA.point && (!sideB.point || !sideA.point.eq(sideB.point)))\n return false;\n if (sideA.to > to)\n return true;\n sideA.next();\n sideB.next();\n }\n }\n /**\n Iterate over a group of range sets at the same time, notifying\n the iterator about the ranges covering every given piece of\n content. Returns the open count (see\n [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end\n of the iteration.\n */\n static spans(sets, from, to, iterator, \n /**\n When given and greater than -1, only points of at least this\n size are taken into account.\n */\n minPointSize = -1) {\n let cursor = new SpanCursor(sets, null, minPointSize).goto(from), pos = from;\n let openRanges = cursor.openStart;\n for (;;) {\n let curTo = Math.min(cursor.to, to);\n if (cursor.point) {\n let active = cursor.activeForPoint(cursor.to);\n let openCount = cursor.pointFrom < from ? active.length + 1\n : cursor.point.startSide < 0 ? active.length\n : Math.min(active.length, openRanges);\n iterator.point(pos, curTo, cursor.point, active, openCount, cursor.pointRank);\n openRanges = Math.min(cursor.openEnd(curTo), active.length);\n }\n else if (curTo > pos) {\n iterator.span(pos, curTo, cursor.active, openRanges);\n openRanges = cursor.openEnd(curTo);\n }\n if (cursor.to > to)\n return openRanges + (cursor.point && cursor.to > to ? 1 : 0);\n pos = cursor.to;\n cursor.next();\n }\n }\n /**\n Create a range set for the given range or array of ranges. By\n default, this expects the ranges to be _sorted_ (by start\n position and, if two start at the same position,\n `value.startSide`). You can pass `true` as second argument to\n cause the method to sort them.\n */\n static of(ranges, sort = false) {\n let build = new RangeSetBuilder();\n for (let range of ranges instanceof Range ? [ranges] : sort ? lazySort(ranges) : ranges)\n build.add(range.from, range.to, range.value);\n return build.finish();\n }\n /**\n Join an array of range sets into a single set.\n */\n static join(sets) {\n if (!sets.length)\n return RangeSet.empty;\n let result = sets[sets.length - 1];\n for (let i = sets.length - 2; i >= 0; i--) {\n for (let layer = sets[i]; layer != RangeSet.empty; layer = layer.nextLayer)\n result = new RangeSet(layer.chunkPos, layer.chunk, result, Math.max(layer.maxPoint, result.maxPoint));\n }\n return result;\n }\n}\n/**\nThe empty set of ranges.\n*/\nRangeSet.empty = /*@__PURE__*/new RangeSet([], [], null, -1);\nfunction lazySort(ranges) {\n if (ranges.length > 1)\n for (let prev = ranges[0], i = 1; i < ranges.length; i++) {\n let cur = ranges[i];\n if (cmpRange(prev, cur) > 0)\n return ranges.slice().sort(cmpRange);\n prev = cur;\n }\n return ranges;\n}\nRangeSet.empty.nextLayer = RangeSet.empty;\n/**\nA range set builder is a data structure that helps build up a\n[range set](https://codemirror.net/6/docs/ref/#state.RangeSet) directly, without first allocating\nan array of [`Range`](https://codemirror.net/6/docs/ref/#state.Range) objects.\n*/\nclass RangeSetBuilder {\n finishChunk(newArrays) {\n this.chunks.push(new Chunk(this.from, this.to, this.value, this.maxPoint));\n this.chunkPos.push(this.chunkStart);\n this.chunkStart = -1;\n this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint);\n this.maxPoint = -1;\n if (newArrays) {\n this.from = [];\n this.to = [];\n this.value = [];\n }\n }\n /**\n Create an empty builder.\n */\n constructor() {\n this.chunks = [];\n this.chunkPos = [];\n this.chunkStart = -1;\n this.last = null;\n this.lastFrom = -1000000000 /* C.Far */;\n this.lastTo = -1000000000 /* C.Far */;\n this.from = [];\n this.to = [];\n this.value = [];\n this.maxPoint = -1;\n this.setMaxPoint = -1;\n this.nextLayer = null;\n }\n /**\n Add a range. Ranges should be added in sorted (by `from` and\n `value.startSide`) order.\n */\n add(from, to, value) {\n if (!this.addInner(from, to, value))\n (this.nextLayer || (this.nextLayer = new RangeSetBuilder)).add(from, to, value);\n }\n /**\n @internal\n */\n addInner(from, to, value) {\n let diff = from - this.lastTo || value.startSide - this.last.endSide;\n if (diff <= 0 && (from - this.lastFrom || value.startSide - this.last.startSide) < 0)\n throw new Error(\"Ranges must be added sorted by `from` position and `startSide`\");\n if (diff < 0)\n return false;\n if (this.from.length == 250 /* C.ChunkSize */)\n this.finishChunk(true);\n if (this.chunkStart < 0)\n this.chunkStart = from;\n this.from.push(from - this.chunkStart);\n this.to.push(to - this.chunkStart);\n this.last = value;\n this.lastFrom = from;\n this.lastTo = to;\n this.value.push(value);\n if (value.point)\n this.maxPoint = Math.max(this.maxPoint, to - from);\n return true;\n }\n /**\n @internal\n */\n addChunk(from, chunk) {\n if ((from - this.lastTo || chunk.value[0].startSide - this.last.endSide) < 0)\n return false;\n if (this.from.length)\n this.finishChunk(true);\n this.setMaxPoint = Math.max(this.setMaxPoint, chunk.maxPoint);\n this.chunks.push(chunk);\n this.chunkPos.push(from);\n let last = chunk.value.length - 1;\n this.last = chunk.value[last];\n this.lastFrom = chunk.from[last] + from;\n this.lastTo = chunk.to[last] + from;\n return true;\n }\n /**\n Finish the range set. Returns the new set. The builder can't be\n used anymore after this has been called.\n */\n finish() { return this.finishInner(RangeSet.empty); }\n /**\n @internal\n */\n finishInner(next) {\n if (this.from.length)\n this.finishChunk(false);\n if (this.chunks.length == 0)\n return next;\n let result = RangeSet.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(next) : next, this.setMaxPoint);\n this.from = null; // Make sure further `add` calls produce errors\n return result;\n }\n}\nfunction findSharedChunks(a, b, textDiff) {\n let inA = new Map();\n for (let set of a)\n for (let i = 0; i < set.chunk.length; i++)\n if (set.chunk[i].maxPoint <= 0)\n inA.set(set.chunk[i], set.chunkPos[i]);\n let shared = new Set();\n for (let set of b)\n for (let i = 0; i < set.chunk.length; i++) {\n let known = inA.get(set.chunk[i]);\n if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i] &&\n !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set.chunk[i].length)))\n shared.add(set.chunk[i]);\n }\n return shared;\n}\nclass LayerCursor {\n constructor(layer, skip, minPoint, rank = 0) {\n this.layer = layer;\n this.skip = skip;\n this.minPoint = minPoint;\n this.rank = rank;\n }\n get startSide() { return this.value ? this.value.startSide : 0; }\n get endSide() { return this.value ? this.value.endSide : 0; }\n goto(pos, side = -1000000000 /* C.Far */) {\n this.chunkIndex = this.rangeIndex = 0;\n this.gotoInner(pos, side, false);\n return this;\n }\n gotoInner(pos, side, forward) {\n while (this.chunkIndex < this.layer.chunk.length) {\n let next = this.layer.chunk[this.chunkIndex];\n if (!(this.skip && this.skip.has(next) ||\n this.layer.chunkEnd(this.chunkIndex) < pos ||\n next.maxPoint < this.minPoint))\n break;\n this.chunkIndex++;\n forward = false;\n }\n if (this.chunkIndex < this.layer.chunk.length) {\n let rangeIndex = this.layer.chunk[this.chunkIndex].findIndex(pos - this.layer.chunkPos[this.chunkIndex], side, true);\n if (!forward || this.rangeIndex < rangeIndex)\n this.setRangeIndex(rangeIndex);\n }\n this.next();\n }\n forward(pos, side) {\n if ((this.to - pos || this.endSide - side) < 0)\n this.gotoInner(pos, side, true);\n }\n next() {\n for (;;) {\n if (this.chunkIndex == this.layer.chunk.length) {\n this.from = this.to = 1000000000 /* C.Far */;\n this.value = null;\n break;\n }\n else {\n let chunkPos = this.layer.chunkPos[this.chunkIndex], chunk = this.layer.chunk[this.chunkIndex];\n let from = chunkPos + chunk.from[this.rangeIndex];\n this.from = from;\n this.to = chunkPos + chunk.to[this.rangeIndex];\n this.value = chunk.value[this.rangeIndex];\n this.setRangeIndex(this.rangeIndex + 1);\n if (this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)\n break;\n }\n }\n }\n setRangeIndex(index) {\n if (index == this.layer.chunk[this.chunkIndex].value.length) {\n this.chunkIndex++;\n if (this.skip) {\n while (this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]))\n this.chunkIndex++;\n }\n this.rangeIndex = 0;\n }\n else {\n this.rangeIndex = index;\n }\n }\n nextChunk() {\n this.chunkIndex++;\n this.rangeIndex = 0;\n this.next();\n }\n compare(other) {\n return this.from - other.from || this.startSide - other.startSide || this.rank - other.rank ||\n this.to - other.to || this.endSide - other.endSide;\n }\n}\nclass HeapCursor {\n constructor(heap) {\n this.heap = heap;\n }\n static from(sets, skip = null, minPoint = -1) {\n let heap = [];\n for (let i = 0; i < sets.length; i++) {\n for (let cur = sets[i]; !cur.isEmpty; cur = cur.nextLayer) {\n if (cur.maxPoint >= minPoint)\n heap.push(new LayerCursor(cur, skip, minPoint, i));\n }\n }\n return heap.length == 1 ? heap[0] : new HeapCursor(heap);\n }\n get startSide() { return this.value ? this.value.startSide : 0; }\n goto(pos, side = -1000000000 /* C.Far */) {\n for (let cur of this.heap)\n cur.goto(pos, side);\n for (let i = this.heap.length >> 1; i >= 0; i--)\n heapBubble(this.heap, i);\n this.next();\n return this;\n }\n forward(pos, side) {\n for (let cur of this.heap)\n cur.forward(pos, side);\n for (let i = this.heap.length >> 1; i >= 0; i--)\n heapBubble(this.heap, i);\n if ((this.to - pos || this.value.endSide - side) < 0)\n this.next();\n }\n next() {\n if (this.heap.length == 0) {\n this.from = this.to = 1000000000 /* C.Far */;\n this.value = null;\n this.rank = -1;\n }\n else {\n let top = this.heap[0];\n this.from = top.from;\n this.to = top.to;\n this.value = top.value;\n this.rank = top.rank;\n if (top.value)\n top.next();\n heapBubble(this.heap, 0);\n }\n }\n}\nfunction heapBubble(heap, index) {\n for (let cur = heap[index];;) {\n let childIndex = (index << 1) + 1;\n if (childIndex >= heap.length)\n break;\n let child = heap[childIndex];\n if (childIndex + 1 < heap.length && child.compare(heap[childIndex + 1]) >= 0) {\n child = heap[childIndex + 1];\n childIndex++;\n }\n if (cur.compare(child) < 0)\n break;\n heap[childIndex] = cur;\n heap[index] = child;\n index = childIndex;\n }\n}\nclass SpanCursor {\n constructor(sets, skip, minPoint) {\n this.minPoint = minPoint;\n this.active = [];\n this.activeTo = [];\n this.activeRank = [];\n this.minActive = -1;\n // A currently active point range, if any\n this.point = null;\n this.pointFrom = 0;\n this.pointRank = 0;\n this.to = -1000000000 /* C.Far */;\n this.endSide = 0;\n // The amount of open active ranges at the start of the iterator.\n // Not including points.\n this.openStart = -1;\n this.cursor = HeapCursor.from(sets, skip, minPoint);\n }\n goto(pos, side = -1000000000 /* C.Far */) {\n this.cursor.goto(pos, side);\n this.active.length = this.activeTo.length = this.activeRank.length = 0;\n this.minActive = -1;\n this.to = pos;\n this.endSide = side;\n this.openStart = -1;\n this.next();\n return this;\n }\n forward(pos, side) {\n while (this.minActive > -1 && (this.activeTo[this.minActive] - pos || this.active[this.minActive].endSide - side) < 0)\n this.removeActive(this.minActive);\n this.cursor.forward(pos, side);\n }\n removeActive(index) {\n remove(this.active, index);\n remove(this.activeTo, index);\n remove(this.activeRank, index);\n this.minActive = findMinIndex(this.active, this.activeTo);\n }\n addActive(trackOpen) {\n let i = 0, { value, to, rank } = this.cursor;\n // Organize active marks by rank first, then by size\n while (i < this.activeRank.length && (rank - this.activeRank[i] || to - this.activeTo[i]) > 0)\n i++;\n insert(this.active, i, value);\n insert(this.activeTo, i, to);\n insert(this.activeRank, i, rank);\n if (trackOpen)\n insert(trackOpen, i, this.cursor.from);\n this.minActive = findMinIndex(this.active, this.activeTo);\n }\n // After calling this, if `this.point` != null, the next range is a\n // point. Otherwise, it's a regular range, covered by `this.active`.\n next() {\n let from = this.to, wasPoint = this.point;\n this.point = null;\n let trackOpen = this.openStart < 0 ? [] : null;\n for (;;) {\n let a = this.minActive;\n if (a > -1 && (this.activeTo[a] - this.cursor.from || this.active[a].endSide - this.cursor.startSide) < 0) {\n if (this.activeTo[a] > from) {\n this.to = this.activeTo[a];\n this.endSide = this.active[a].endSide;\n break;\n }\n this.removeActive(a);\n if (trackOpen)\n remove(trackOpen, a);\n }\n else if (!this.cursor.value) {\n this.to = this.endSide = 1000000000 /* C.Far */;\n break;\n }\n else if (this.cursor.from > from) {\n this.to = this.cursor.from;\n this.endSide = this.cursor.startSide;\n break;\n }\n else {\n let nextVal = this.cursor.value;\n if (!nextVal.point) { // Opening a range\n this.addActive(trackOpen);\n this.cursor.next();\n }\n else if (wasPoint && this.cursor.to == this.to && this.cursor.from < this.cursor.to) {\n // Ignore any non-empty points that end precisely at the end of the prev point\n this.cursor.next();\n }\n else { // New point\n this.point = nextVal;\n this.pointFrom = this.cursor.from;\n this.pointRank = this.cursor.rank;\n this.to = this.cursor.to;\n this.endSide = nextVal.endSide;\n this.cursor.next();\n this.forward(this.to, this.endSide);\n break;\n }\n }\n }\n if (trackOpen) {\n this.openStart = 0;\n for (let i = trackOpen.length - 1; i >= 0 && trackOpen[i] < from; i--)\n this.openStart++;\n }\n }\n activeForPoint(to) {\n if (!this.active.length)\n return this.active;\n let active = [];\n for (let i = this.active.length - 1; i >= 0; i--) {\n if (this.activeRank[i] < this.pointRank)\n break;\n if (this.activeTo[i] > to || this.activeTo[i] == to && this.active[i].endSide >= this.point.endSide)\n active.push(this.active[i]);\n }\n return active.reverse();\n }\n openEnd(to) {\n let open = 0;\n for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > to; i--)\n open++;\n return open;\n }\n}\nfunction compare(a, startA, b, startB, length, comparator) {\n a.goto(startA);\n b.goto(startB);\n let endB = startB + length;\n let pos = startB, dPos = startB - startA;\n for (;;) {\n let diff = (a.to + dPos) - b.to || a.endSide - b.endSide;\n let end = diff < 0 ? a.to + dPos : b.to, clipEnd = Math.min(end, endB);\n if (a.point || b.point) {\n if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) &&\n sameValues(a.activeForPoint(a.to), b.activeForPoint(b.to))))\n comparator.comparePoint(pos, clipEnd, a.point, b.point);\n }\n else {\n if (clipEnd > pos && !sameValues(a.active, b.active))\n comparator.compareRange(pos, clipEnd, a.active, b.active);\n }\n if (end > endB)\n break;\n pos = end;\n if (diff <= 0)\n a.next();\n if (diff >= 0)\n b.next();\n }\n}\nfunction sameValues(a, b) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (a[i] != b[i] && !a[i].eq(b[i]))\n return false;\n return true;\n}\nfunction remove(array, index) {\n for (let i = index, e = array.length - 1; i < e; i++)\n array[i] = array[i + 1];\n array.pop();\n}\nfunction insert(array, index, value) {\n for (let i = array.length - 1; i >= index; i--)\n array[i + 1] = array[i];\n array[index] = value;\n}\nfunction findMinIndex(value, array) {\n let found = -1, foundPos = 1000000000 /* C.Far */;\n for (let i = 0; i < array.length; i++)\n if ((array[i] - foundPos || value[i].endSide - value[found].endSide) < 0) {\n found = i;\n foundPos = array[i];\n }\n return found;\n}\n\n/**\nCount the column position at the given offset into the string,\ntaking extending characters and tab size into account.\n*/\nfunction countColumn(string, tabSize, to = string.length) {\n let n = 0;\n for (let i = 0; i < to;) {\n if (string.charCodeAt(i) == 9) {\n n += tabSize - (n % tabSize);\n i++;\n }\n else {\n n++;\n i = findClusterBreak(string, i);\n }\n }\n return n;\n}\n/**\nFind the offset that corresponds to the given column position in a\nstring, taking extending characters and tab size into account. By\ndefault, the string length is returned when it is too short to\nreach the column. Pass `strict` true to make it return -1 in that\nsituation.\n*/\nfunction findColumn(string, col, tabSize, strict) {\n for (let i = 0, n = 0;;) {\n if (n >= col)\n return i;\n if (i == string.length)\n break;\n n += string.charCodeAt(i) == 9 ? tabSize - (n % tabSize) : 1;\n i = findClusterBreak(string, i);\n }\n return strict === true ? -1 : string.length;\n}\n\nexport { Annotation, AnnotationType, ChangeDesc, ChangeSet, CharCategory, Compartment, EditorSelection, EditorState, Facet, Line, MapMode, Prec, Range, RangeSet, RangeSetBuilder, RangeValue, SelectionRange, StateEffect, StateEffectType, StateField, Text, Transaction, codePointAt, codePointSize, combineConfig, countColumn, findClusterBreak, findColumn, fromCodePoint };\n","const C = \"\\u037c\"\nconst COUNT = typeof Symbol == \"undefined\" ? \"__\" + C : Symbol.for(C)\nconst SET = typeof Symbol == \"undefined\" ? \"__styleSet\" + Math.floor(Math.random() * 1e8) : Symbol(\"styleSet\")\nconst top = typeof globalThis != \"undefined\" ? globalThis : typeof window != \"undefined\" ? window : {}\n\n// :: - Style modules encapsulate a set of CSS rules defined from\n// JavaScript. Their definitions are only available in a given DOM\n// root after it has been _mounted_ there with `StyleModule.mount`.\n//\n// Style modules should be created once and stored somewhere, as\n// opposed to re-creating them every time you need them. The amount of\n// CSS rules generated for a given DOM root is bounded by the amount\n// of style modules that were used. So to avoid leaking rules, don't\n// create these dynamically, but treat them as one-time allocations.\nexport class StyleModule {\n // :: (Object