0byt3m1n1
Path:
C:
/
Program Files
/
RStudio
/
resources
/
app
/
.webpack
/
main
/
[
Home
]
File: index.js
/*! For license information please see index.js.LICENSE.txt */ (()=>{var __webpack_modules__={1692:(e,t,r)=>{var n={};e.exports=n,n.themes={};var o=r(3837),s=n.styles=r(158),i=Object.defineProperties,a=new RegExp(/[\r\n]+/g);n.supportsColor=r(6697).supportsColor,void 0===n.enabled&&(n.enabled=!1!==n.supportsColor()),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},n.stylize=function(e,t){if(!n.enabled)return e+"";var r=s[t];return!r&&t in n?n[t](e):r.open+e+r.close};var l=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return h.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var u,d=(u={},s.grey=s.gray,Object.keys(s).forEach((function(e){s[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(l,"\\$&")}(s[e].close),"g"),u[e]={get:function(){return c(this._styles.concat(e))}}})),u),p=i((function(){}),d);function h(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:o.inspect(e)})).join(" ");if(!n.enabled||!e)return e;for(var t=-1!=e.indexOf("\n"),r=this._styles,i=r.length;i--;){var l=s[r[i]];e=l.open+e.replace(l.closeRe,l.open)+l.close,t&&(e=e.replace(a,(function(e){return l.close+e+l.open})))}return e}n.setTheme=function(e){if("string"!=typeof e)for(var t in e)!function(t){n[t]=function(r){if("object"==typeof e[t]){var o=r;for(var s in e[t])o=n[e[t][s]](o);return o}return n[e[t]](r)}}(t);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var f=function(e,t){var r=t.split("");return(r=r.map(e)).join("")};for(var g in n.trap=r(2254),n.zalgo=r(2196),n.maps={},n.maps.america=r(9068)(n),n.maps.zebra=r(9852)(n),n.maps.rainbow=r(649)(n),n.maps.random=r(7302)(n),n.maps)!function(e){n[e]=function(t){return f(n.maps[e],t)}}(g);i(n,function(){var e={};return Object.keys(d).forEach((function(t){e[t]={get:function(){return c([t])}}})),e}())},2254:e=>{e.exports=function(e,t){var r="";e=(e=e||"Run the trap, drop the bass").split("");var n={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=n[e]||[" "],o=Math.floor(Math.random()*t.length);r+=void 0!==n[e]?n[e][o]:e})),r}},2196:e=>{e.exports=function(e,t){e=e||" he is here ";var r={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},n=[].concat(r.up,r.down,r.mid);function o(e){return Math.floor(Math.random()*e)}function s(e){var t=!1;return n.filter((function(r){t=r===e})),t}return function(e,t){var n,i,a="";for(i in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!s(i)){switch(a+=e[i],n={up:0,down:0,mid:0},t.size){case"mini":n.up=o(8),n.mid=o(2),n.down=o(8);break;case"maxi":n.up=o(16)+3,n.mid=o(4)+1,n.down=o(64)+3;break;default:n.up=o(8)+1,n.mid=o(6)/2,n.down=o(8)+1}var l=["up","mid","down"];for(var c in l)for(var u=l[c],d=0;d<=n[u];d++)t[u]&&(a+=r[u][o(r[u].length)])}return a}(e,t)}},9068:e=>{e.exports=function(e){return function(t,r,n){if(" "===t)return t;switch(r%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}},649:e=>{e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(r,n,o){return" "===r?r:e[t[n++%t.length]](r)}}},7302:e=>{e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,o){return" "===r?r:e[t[Math.round(Math.random()*(t.length-2))]](r)}}},9852:e=>{e.exports=function(e){return function(t,r,n){return r%2==0?t:e.inverse(t)}}},158:e=>{var t={};e.exports=t;var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(r).forEach((function(e){var n=r[e],o=t[e]=[];o.open="["+n[0]+"m",o.close="["+n[1]+"m"}))},3473:e=>{"use strict";e.exports=function(e,t){var r=(t=t||process.argv||[]).indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",o=t.indexOf(n+e);return-1!==o&&(-1===r||o<r)}},6697:(e,t,r)=>{"use strict";var n=r(2037),o=r(3473),s=process.env,i=void 0;function a(e){var t=function(e){if(!1===i)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!e.isTTY&&!0!==i)return 0;var t=i?1:0;if("win32"===process.platform){var r=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in s}))||"codeship"===s.CI_NAME?1:t;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in s){var a=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:(s.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}o("no-color")||o("no-colors")||o("color=false")?i=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(i=!0),"FORCE_COLOR"in s&&(i=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},3923:(e,t,r)=>{var n=r(1692);e.exports=n},4970:e=>{var t=[],r=[],n=function(){};function o(e){return!~t.indexOf(e)&&(t.push(e),!0)}function s(e){n=e}function i(e){for(var r=[],n=0;n<t.length;n++)if(t[n].async)r.push(t[n]);else if(t[n](e))return!0;return!!r.length&&new Promise((function(t){Promise.all(r.map((function(t){return t(e)}))).then((function(e){t(e.some(Boolean))}))}))}function a(e){return!~r.indexOf(e)&&(r.push(e),!0)}function l(){n.apply(n,arguments)}function c(e){for(var t=0;t<r.length;t++)e=r[t].apply(r[t],arguments);return e}function u(e,t){var r=Object.prototype.hasOwnProperty;for(var n in t)r.call(t,n)&&(e[n]=t[n]);return e}function d(e){return e.enabled=!1,e.modify=a,e.set=s,e.use=o,u((function(){return!1}),e)}function p(e){return e.enabled=!0,e.modify=a,e.set=s,e.use=o,u((function(){var t=Array.prototype.slice.call(arguments,0);return l.call(l,e,c(t,e)),!0}),e)}e.exports=function(e){return e.introduce=u,e.enabled=i,e.process=c,e.modify=a,e.write=l,e.nope=d,e.yep=p,e.set=s,e.use=o,e}},9066:(e,t,r)=>{e.exports=r(1478)},1478:(e,t,r)=>{var n=r(4970)((function e(t,r){return(r=r||{}).namespace=t,r.prod=!0,r.dev=!1,r.force||e.force?e.yep(r):e.nope(r)}));e.exports=n},186:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(s,i),time:r(l,c),"date-time":r((function(e){const t=e.split(u);return 2===t.length&&s(t[0])&&l(t[1],!0)}),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return p.test(e)&&h.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":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[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,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,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:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([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}))|:)))$/i,regex:function(e){if(v.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return f.lastIndex=0,f.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=m&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":r(/^\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,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,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},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],s=+t[2],i=+t[3];return s>=1&&s<=12&&i>=1&&i<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:o[s])}function i(e,t){if(e&&t)return e>t?1:e<t?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(e,t){const r=a.exec(e);if(!r)return!1;const n=+r[1],o=+r[2],s=+r[3],i=r[5];return(n<=23&&o<=59&&s<=59||23===n&&59===o&&60===s)&&(!t||""!==i)}function c(e,t){if(!e||!t)return;const r=a.exec(e),n=a.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const u=/t|\s/i;function d(e,t){if(!e||!t)return;const[r,n]=e.split(u),[o,s]=t.split(u),a=i(r,o);return void 0!==a?a||c(n,s):void 0}const p=/\/|:/,h=/^(?:[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,f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,g=-(2**31),m=2**31-1;function y(){return!0}const v=/[^\\]\\Z/},8240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(186),o=r(8400),s=r(2920),i=new s.Name("fullFormats"),a=new s.Name("fastFormats"),l=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,i),e;const[r,s]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,i];return c(e,t.formats||n.formatNames,r,s),t.keywords&&o.default(e),e};function c(e,t,r,n){var o,i;null!==(o=(i=e.opts.code).formats)&&void 0!==o||(i.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}l.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l},8400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(5154),o=r(2920),s=o.operators,i={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>o.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${i[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:l}=e,{opts:c,self:u}=l;if(!c.validateFormats)return;const d=new n.KeywordCxt(l,u.RULES.all.format.definition,"format");function p(e){return o._`${e}.compare(${r}, ${s}) ${i[a].fail} 0`}d.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:c.code.formats}),n=t.const("fmt",o._`${r}[${d.schemaCode}]`);e.fail$data(o.or(o._`typeof ${n} != "object"`,o._`${n} instanceof RegExp`,o._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=d.schema,n=u.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:n,code:c.code.formats?o._`${c.code.formats}${o.getProperty(r)}`:void 0});e.fail$data(p(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},5154:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=r(6646),o=r(6629),s=r(7527),i=r(98),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=r(2154);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=r(2920);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=r(9596);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var h=r(4198);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},3273:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)l(r,t[n]),r.push(e[++n]);return new o(r)}t._Code=o,t.nil=new o(""),t._=s;const i=new o("+");function a(e,...t){const r=[u(e[0])];let n=0;for(;n<t.length;)r.push(i),l(r,t[n]),r.push(i,u(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===i){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new o(r)}function l(e,t){var r;t instanceof o?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:u(Array.isArray(r)?r.join(","):r))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=l,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):s`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},2920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(3273),o=r(3746);var s=r(3273);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var i=r(3746);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return T(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class g extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(D(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>$(e,t.names)),{})}}class m extends g{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends g{}class v extends m{}v.kind="else";class w extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof w?t:t.nodes:this.nodes.length?this:new w(M(e),t instanceof w?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&$(e,this.else.names),e}}w.kind="if";class _ extends m{}_.kind="for";class b extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return $(super.names,this.iteration.names)}}class S extends _{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${t} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class E extends _{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return $(super.names,this.iterable.names)}}class R extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}R.kind="func";class k extends g{render(e){return"return "+super.render(e)}}k.kind="return";class O extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&$(e,this.catch.names),this.finally&&$(e,this.finally.names),e}}class x extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}x.kind="catch";class P extends m{render(e){return"finally"+super.render(e)}}function $(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function T(e,t){return t instanceof n._CodeOrName?$(e,t.names):e}function I(e,t,r){return e instanceof n.Name?s(e):(o=e)instanceof n._Code&&o._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=s(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function s(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function D(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function M(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}P.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new l(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new w(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new w(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(w,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new b(e),t)}forRange(e,t,r,n,s=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const i=this._scope.toName(e);return this._for(new S(s,i,t,r),(()=>n(i)))}forOf(e,t,r,s=o.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(i,n._`${e}[${t}]`),r(i)}))}return this._for(new E("of",s,i,t),(()=>r(i)))}forIn(e,t,r,s=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const i=this._scope.toName(e);return this._for(new E("in",s,i,t),(()=>r(i)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new O;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new x(e),t(e)}return r&&(this._currNode=n.finally=new P,this.code(r)),this._endBlockNode(x,P)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,o){return this._blockNode(new R(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=M;const C=N(t.operators.AND);t.and=function(...e){return e.reduce(C)};const A=N(t.operators.OR);function N(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(A)}},3746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(3273);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s||(t.UsedValueState=s={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class i{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=i;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const l=n._`\n`;t.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[o];if(i){const e=i.get(s);if(e)return e}else i=this._values[o]=new Map;i.set(s,n);const a=this._scope[o]||(this._scope[o]=[]),l=a.length;return a[l]=t.ref,n.setValue(t,{property:o,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,i={},a){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const d=i[c]=i[c]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,s.Started);let i=r(e);if(i){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(e)))throw new o(e);l=n._`${l}${i}${this.opts._n}`}d.set(e,s.Completed)}))}return l}}},3556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(2920),o=r(4208),s=r(5994);function i(e,t){const r=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,n._`[${r}]`)),n._`${s.default.vErrors}.push(${r})`),e.code(n._`${s.default.errors}++`)}function a(e,t){const{gen:r,validateName:o,schemaEnv:s}=e;s.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,s){const{it:l}=e,{gen:u,compositeRule:d,allErrors:p}=l,h=c(e,r,o);(null!=s?s:d||p)?i(u,h):a(l,n._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:l,compositeRule:u,allErrors:d}=o;i(l,c(e,r,n)),u||d||a(o,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",i,s.default.errors,(i=>{e.const(l,n._`${s.default.vErrors}[${i}]`),e.if(n._`${l}.instancePath === undefined`,(()=>e.assign(n._`${l}.instancePath`,(0,n.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(n._`${l}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,o))}))};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:i}=e,a=[u(i,r),d(e,r)];return function(e,{params:t,message:r},o){const{keyword:i,data:a,schemaValue:c,it:u}=e,{opts:d,propertyName:p,topSchemaRef:h,schemaPath:f}=u;o.push([l.keyword,i],[l.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&o.push([l.message,"function"==typeof r?r(e):r]),d.verbose&&o.push([l.schema,c],[l.parentSchema,n._`${h}${f}`],[s.default.data,a]),p&&o.push([l.propertyName,p])}(e,t,a),o.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let i=s?t:n.str`${t}/${e}`;return r&&(i=n.str`${i}${(0,o.getErrorPath)(r,o.Type.Str)}`),[l.schemaPath,i]}},6172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(2920),o=r(9596),s=r(5994),i=r(5756),a=r(4208),l=r(2154);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,i.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=p.call(this,e);if(t)return t;const r=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let h;e.$async&&(h=d.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const g={gen:d,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let m;try{this._compilations.add(e),(0,l.validateFunctionCode)(g),d.optimize(this.opts.code.optimize);const t=d.toString();m=`${d.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(m=this.opts.code.process(m,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,m)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=g;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,m&&this.logger.error("Error compiling schema, function code:",m),t}finally{this._compilations.delete(e)}}function d(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function p(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||f.call(this,e,t)}function f(e,t){const r=this.opts.uriResolver.parse(t),n=(0,i._getFullPath)(this.opts.uriResolver,r);let o=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return m.call(this,r,e);const s=(0,i.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=f.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return m.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),s===(0,i.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,i.resolveUrl)(this.opts.uriResolver,o,n)),new c({schema:t,schemaId:r,root:e,baseId:o})}return m.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,i.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let s=h.call(this,e,r);if(void 0===s){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:i}=this.opts;o&&(s=new c({schema:o,schemaId:i,root:e,baseId:t}))}return void 0!==s?e.refs[r]=d.call(this,s):void 0},t.getCompilingSchema=p,t.resolveSchema=f;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const o="object"==typeof(r=e)&&r[this.opts.schemaId];!g.has(n)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,i.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=f.call(this,n,e)}const{schemaId:l}=this.opts;return s=s||new c({schema:r,schemaId:l,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},5994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=o},4198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5756);class o extends Error{constructor(e,t,r,o){super(o||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=o},5756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(4208),o=r(7429),s=r(9730),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(l))return!0;if("object"==typeof r&&l(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!i.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=h(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const p=/#\/?$/;function h(e){return e?e.replace(p,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,i=h(e[r]||t),a={"":i},l=u(n,i,!1),c={},d=new Set;return s(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const s=l+t;let i=a[o];function u(t){const r=this.opts.uriResolver.resolve;if(t=h(i?r(i,t):t),d.has(t))throw g(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==h(s)&&("#"===t[0]?(p(e,c[t],t),c[t]=e):this.refs[t]=s),t}function m(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(i=u.call(this,e[r])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),a[t]=i})),c;function p(e,t,r){if(void 0!==t&&!o(e,t))throw g(r)}function g(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},4170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},4208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(2920),o=r(3273);function s(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||f(e,`unknown keyword: "${r}"`)}function i(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(s,i,a,l)=>{const c=void 0===a?i:a instanceof n.Name?(i instanceof n.Name?e(s,i,a):t(s,i,a),a):i instanceof n.Name?(t(s,a,i),i):r(i,a);return l!==n.Name||c instanceof n.Name?c:o(s,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!i(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=i,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(o)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const p={};var h;function f(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h||(t.Type=h={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===h.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},9234:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},3836:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(3556),o=r(2920),s=r(5994),i={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,s={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,i,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(o._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},860:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(4170),o=r(9234),s=r(3556),i=r(2920),a=r(4208);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l||(t.DataType=l={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:s}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(c){const o=p(t,n,s.strictNumbers,l.Wrong);r.if(o,(()=>{a.length?function(e,t,r){const{gen:n,data:o,opts:s}=e,a=n.let("dataType",i._`typeof ${o}`),l=n.let("coerced",i._`undefined`);"array"===s.coerceTypes&&n.if(i._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,i._`${o}[0]`).assign(a,i._`typeof ${o}`).if(p(t,o,s.strictNumbers),(()=>n.assign(l,o))))),n.if(i._`${l} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===s.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(i._`${a} == "number" || ${a} == "boolean"`).assign(l,i._`"" + ${o}`).elseIf(i._`${o} === null`).assign(l,i._`""`);case"number":return void n.elseIf(i._`${a} == "boolean" || ${o} === null || (${a} == "string" && ${o} && ${o} == +${o})`).assign(l,i._`+${o}`);case"integer":return void n.elseIf(i._`${a} === "boolean" || ${o} === null || (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,i._`+${o}`);case"boolean":return void n.elseIf(i._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(i._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return n.elseIf(i._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(l,null);case"array":n.elseIf(i._`${a} === "string" || ${a} === "number" || ${a} === "boolean" || ${o} === null`).assign(l,i._`[${o}]`)}}n.else(),f(e),n.endIf(),n.if(i._`${l} !== undefined`,(()=>{n.assign(o,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(i._`${t} !== undefined`,(()=>e.assign(i._`${t}[${r}]`,n)))}(e,l)}))}(e,t,a):f(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=l.Correct){const o=n===l.Correct?i.operators.EQ:i.operators.NEQ;let s;switch(e){case"null":return i._`${t} ${o} null`;case"array":s=i._`Array.isArray(${t})`;break;case"object":s=i._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(i._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return i._`typeof ${t} ${o} ${e}`}return n===l.Correct?s:(0,i.not)(s);function a(e=i.nil){return(0,i.and)(i._`typeof ${t} == "number"`,e,r?i._`isFinite(${t})`:i.nil)}}function p(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let o;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=i._`typeof ${t} != "object"`;o=s.null?e:i._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(const e in s)o=(0,i.and)(o,d(e,t,r,n));return o}t.checkDataType=d,t.checkDataTypes=p;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?i._`{type: ${e}}`:i._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,h)}t.reportTypeError=f},8313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(2920),o=r(4208);function s(e,t,r){const{gen:s,compositeRule:i,data:a,opts:l}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(i)return void(0,o.checkStrictMode)(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),s.if(u,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)s(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>s(e,r,t.default)))}},2154:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(3836),o=r(860),s=r(9234),i=r(860),a=r(8313),l=r(5777),c=r(1123),u=r(2920),d=r(5994),p=r(5756),h=r(4208),f=r(3556);function g({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${m(r,o)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(s)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,n.$async,(()=>e.code(m(r,o)).code(s)))}function m(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function w(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return S(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);S(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function b({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const s=r.$comment;if(!0===o.$comment)e.code(u._`${d.default.self}.logger.log(${s})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${s}, ${r}, ${o}.schema)`)}}function S(e,t,r,n){const{gen:o,schema:a,data:l,allErrors:c,opts:p,self:f}=e,{RULES:g}=f;function m(h){(0,s.shouldUseGroup)(a,h)&&(h.type?(o.if((0,i.checkDataType)(h.type,l,p.strictNumbers)),E(e,h),1===t.length&&t[0]===h.type&&r&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):E(e,h),c||o.if(u._`${d.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(a,g)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{R(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)R(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&k(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,s.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&k(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of g.rules)m(e);m(g.post)}))):o.block((()=>x(e,"$ref",g.all.$ref.definition)))}function E(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(n,r)&&x(e,r.keyword,r.definition,t.type)}))}function R(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(w(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;g(e,(()=>{r.$comment&&t.$comment&&b(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.let(d.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${o}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):g(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:s}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,i.checkDataTypes)(e,t,o.opts.strictNumbers,i.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(w(e),y(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&b(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",d.default.errors);_(e,s),n.var(t,u._`${s} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function x(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,l.funcKeywordCode)(o,r):"macro"in r?(0,l.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(o,r)}t.KeywordCxt=O;const P=/^\/(?:[^~]|~0|~1)*$/,$=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(""===e)return d.default.rootData;if("/"===e[0]){if(!P.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=d.default.rootData}else{const i=$.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(o=i[2],"#"===o){if(a>=t)throw new Error(l("property/index",a));return n[t-a]}if(a>t)throw new Error(l("data",a));if(s=r[t-a],!o)return s}let i=s;const a=o.split("/");for(const e of a)e&&(s=u._`${s}${(0,u.getProperty)((0,h.unescapeJsonPointer)(e))}`,i=u._`${i} && ${s}`);return i;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=T},5777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(2920),o=r(5994),s=r(9879),i=r(3556);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:s,parentSchema:i,it:a}=e,c=t.macro.call(a.self,s,i,a),u=l(r,o,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const d=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:d,parentSchema:p,$data:h,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const g=!h&&t.compile?t.compile.call(f.self,d,p,f):t.validate,m=l(c,u,g),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const i=f.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!h||!1===t.schema);c.assign(y,n._`${r}${(0,s.callValidateCode)(e,m,i,a)}`,t.modifying)}function w(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),w((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${m}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&a(e),w((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,i.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const i=o.dependencies;if(null==i?void 0:i.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},1123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(2920),o=r(4208);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:s,schemaPath:i,errSchemaPath:a,topSchemaRef:l}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===i||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:i,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:s,data:i,dataTypes:a,propertyName:l}){if(void 0!==i&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:i,dataPathArr:a,opts:l}=t;u(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${i}${(0,o.getErrorPath)(r,s,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==i&&(u(i instanceof n.Name?i:c.let("data",i,!0)),void 0!==l&&(e.propertyName=l)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(2154);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(2920);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const s=r(9596),i=r(4198),a=r(4170),l=r(6172),c=r(2920),u=r(5756),d=r(860),p=r(4208),h=r(4775),f=r(5240),g=(e,t)=>new RegExp(e,t);g.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,n,o,s,i,a,l,c,u,d,p,h,m,y,v,w,_,b,S,E,R,k,O,x;const P=e.strict,$=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===$||void 0===$?1:$||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:g,D=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(i=null!==(s=e.strictSchema)&&void 0!==s?s:P)||void 0===i||i,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:P)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:P)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:P)&&void 0!==p?p:"log",strictRequired:null!==(m=null!==(h=e.strictRequired)&&void 0!==h?h:P)&&void 0!==m&&m,code:e.code?{...e.code,optimize:T,regExp:I}:{optimize:T,regExp:I},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(w=e.meta)||void 0===w||w,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(b=e.inlineRefs)||void 0===b||b,schemaId:null!==(S=e.schemaId)&&void 0!==S?S:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(R=e.validateSchema)||void 0===R||R,validateFormats:null===(k=e.validateFormats)||void 0===k||k,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:D}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return P;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,v,e,"NOT SUPPORTED"),S.call(this,w,e,"DEPRECATED","warn"),this._metaOpts=x.call(this),e.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),R.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=h;"id"===r&&(n={...h},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),s.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=E.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>I.call(this,e))),this;M.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=o[e];n&&s&&(o[e]=A(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s;const{schemaId:i}=this.opts;if("object"==typeof e)s=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(s||r);const c=u.getSchemaRefs.call(this,e,r);return a=new l.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function S(e,t,r,n="error"){for(const o in e){const s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function E(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function R(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function k(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function x(){const e={...this.opts};for(const t of m)delete e[t];return e}b.ValidationError=s.default,b.MissingRefError=i.default,t.default=b;const P={log(){},warn(){},error(){}},$=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!$.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let i=o?s.post:s.rules.find((({type:e})=>e===r));if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?D.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function D(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function M(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=A(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function A(e){return{anyOf:[e,C]}}},3054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7429);n.code='require("ajv/dist/runtime/equal").default',t.default=n},5262:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},5240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4629);n.code='require("ajv/dist/runtime/uri").default',t.default=n},9596:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},1949:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(2920),o=r(4208),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function i(e,t){const{gen:r,schema:s,data:i,keyword:a,it:l}=e;l.items=!0;const c=r.const("len",n._`${i}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof s&&!(0,o.alwaysValidSchema)(l,s)){const s=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(s),(()=>function(s){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},s),l.allErrors||r.if((0,n.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=i,t.default=s},2044:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9879),o=r(2920),s=r(5994),i=r(4208),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:l,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:d,opts:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,i.alwaysValidSchema)(u,r))return;const h=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function g(e){t.code(o._`delete ${l}[${e}]`)}function m(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)g(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,i.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===p.removeAdditional?(y(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),g(n)}))):(y(n,r),d||t.if((0,o.not)(r),(()=>t.break())))}}}function y(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:i.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",l,(r=>{h.length||f.length?t.if(function(r){let s;if(h.length>8){const e=(0,i.schemaRefOrVal)(u,a.properties,"properties");s=(0,n.isOwnProperty)(t,e,r)}else s=h.length?(0,o.or)(...h.map((e=>o._`${r} === ${e}`))):o.nil;return f.length&&(s=(0,o.or)(s,...f.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(s)}(r),(()=>m(r))):m(r)})),e.ok(o._`${c} === ${s.default.errors}`)}};t.default=a},9722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4208),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const i=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(i)}))}};t.default=o},2897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(9879).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},7679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:i,it:a}=e;let l,c;const{minContains:u,maxContains:d}=s;a.opts.next?(l=void 0===u?1:u,c=d):l=1;const p=t.const("len",n._`${i}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${p} <= ${c}`),void e.pass(t)}a.items=!0;const h=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);g(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,(()=>t.assign(h,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(h,!1).break())),1===l?t.assign(h,!0):t.if(n._`${e} >= ${l}`,(()=>t.assign(h,!0))))}(r)))))}function g(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===l?g(h,(()=>t.if(h,(()=>t.break())))):0===l?(t.let(h,!0),void 0!==c&&t.if(n._`${i}.length > 0`,f)):(t.let(h,!1),f()),e.result(h,(()=>e.reset()))}};t.default=s},8809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(2920),o=r(4208),s=r(9879);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e}, missingProperty: ${o}, depsCount: ${t}, deps: ${r}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),l(e,r)}};function a(e,t=e.schema){const{gen:r,data:o,it:i}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,s.propertyInData)(r,o,l,i.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),i.allErrors?r.if(u,(()=>{for(const t of c)(0,s.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,s.checkMissingProp)(e,c,a)})`),(0,s.reportMissingProp)(e,a),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:i,it:a}=e,l=r.name("valid");for(const c in t)(0,o.alwaysValidSchema)(a,t[c])||(r.if((0,s.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>r.var(l,!0))),e.ok(l))}t.validatePropertyDeps=a,t.validateSchemaDeps=l,t.default=i},9728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=i(s,"then"),l=i(s,"else");if(!a&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,d("then",r),d("else",r))}else a?t.if(u,d("then")):t.if((0,n.not)(u),d("else"));function d(r,o){return()=>{const s=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(s,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function i(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=s},7539:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1949),o=r(3577),s=r(826),i=r(6954),a=r(7679),l=r(8809),c=r(7871),u=r(2044),d=r(4615),p=r(2501),h=r(3484),f=r(2897),g=r(3359),m=r(9722),y=r(9728),v=r(5051);t.default=function(e=!1){const t=[h.default,f.default,g.default,m.default,y.default,v.default,c.default,u.default,l.default,d.default,p.default];return e?t.push(o.default,i.default):t.push(n.default,s.default),t.push(a.default),t}},826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(2920),o=r(4208),s=r(9879),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:s,parentSchema:i,data:a,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:s}=c,i=r.length,a=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${l}" is ${i}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,o.checkStrictMode)(c,e,n.strictTuples)}}(i),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(s,r.length,c.items));const u=s.name("valid"),d=s.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(c,t)||(s.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=i},6954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s=r(9879),i=r(1949),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,o.alwaysValidSchema)(n,t)||(a?(0,i.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},3484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4208),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},3359:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&s.discriminator)return;const a=r,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,s)=>{let a;(0,o.alwaysValidSchema)(i,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},u),s>0&&t.if(n._`${u} && ${l}`).assign(l,!1).assign(c,n._`[${c}, ${s}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,s),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},2501:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9879),o=r(2920),s=r(4208),i=r(4208),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:l,it:c}=e,{opts:u}=c,d=(0,n.allSchemaProperties)(r),p=d.filter((e=>(0,s.alwaysValidSchema)(c,r[e])));if(0===d.length||p.length===d.length&&(!c.opts.unevaluated||!0===c.props))return;const h=u.strictSchema&&!u.allowMatchingProperties&&l.properties,f=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,i.evaluatedPropsToName)(t,c.props));const{props:g}=c;function m(e){for(const t in h)new RegExp(e).test(t)&&(0,s.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(s=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${s})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:i.Type.Str},f),c.opts.unevaluated&&!0!==g?t.assign(o._`${g}[${s}]`,!0):n||c.allErrors||t.if((0,o.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)h&&m(e),c.allErrors?y(e):(t.var(f,!0),y(e),t.if(f))}()}};t.default=a},3577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(826),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},4615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2154),o=r(9879),s=r(4208),i=r(2044),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&i.default.code(new n.KeywordCxt(c,i.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(r);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=s.mergeEvaluated.props(t,(0,s.toHash)(u),c.props));const d=u.filter((e=>!(0,s.alwaysValidSchema)(c,r[e])));if(0===d.length)return;const p=t.name("valid");for(const r of d)h(r)?f(r):(t.if((0,o.propertyInData)(t,l,r,c.opts.ownProperties)),f(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function h(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},7871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:i}=e;if((0,o.alwaysValidSchema)(i,r))return;const a=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(a)}};t.default=s},5051:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4208),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},9879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(2920),o=r(4208),s=r(5994),i=r(4208);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function l(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,o){const s=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(s,(0,n.not)(l(e,t,r))):s}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:s}=e;r.if(c(r,o,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,s){return(0,n.or)(...o.map((o=>(0,n.and)(c(e,t,o,r.ownProperties),n._`${s} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=l,t.propertyInData=function(e,t,r,o){const s=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${s} && ${l(e,t,r)}`:s},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:i,errorPath:a},it:l},c,u,d){const p=d?n._`${e}, ${t}, ${o}${i}`:t,h=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,a)],[s.default.parentData,l.parentData],[s.default.parentDataProperty,l.parentDataProperty],[s.default.rootData,s.default.rootData]];l.opts.dynamicRef&&h.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const f=n._`${p}, ${r.object(...h)}`;return u!==n.nil?n._`${c}.call(${u}, ${f})`:n._`${c}(${f})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===s.code?d:(0,i.useFunc)(e,s)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:s,it:i}=e,a=t.name("valid");if(i.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(a,!0),l((()=>t.break())),a;function l(i){const l=t.const("len",n._`${r}.length`);t.forRange("i",0,l,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),i)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:s,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(i,e)))&&!i.opts.unevaluated)return;const a=t.let("valid",!1),l=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const i=e.subschema({keyword:s,schemaProp:o,compositeRule:!0},l);t.assign(a,n._`${a} || ${l}`),e.mergeValidEvaluated(i,l)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},7610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},5627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7610),o=r(3274),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=s},3274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4198),o=r(9879),s=r(2920),i=r(5994),a=r(6172),l=r(4208),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:i,schemaEnv:l,validateName:c,opts:p,self:h}=o,{root:f}=l;if(("#"===r||"#/"===r)&&i===f.baseId)return function(){if(l===f)return d(e,c,l,l.$async);const r=t.scopeValue("root",{ref:f});return d(e,s._`${r}.validate`,f,f.$async)}();const g=a.resolveRef.call(h,f,i,r);if(void 0===g)throw new n.default(o.opts.uriResolver,i,r);return g instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(g):function(n){const o=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),i=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:o,errSchemaPath:r},i);e.mergeEvaluated(a),e.ok(i)}(g)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):s._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:a,it:c}=e,{allErrors:u,schemaEnv:d,opts:p}=c,h=p.passContext?i.default.this:s.nil;function f(e){const t=s._`${e}.errors`;a.assign(i.default.vErrors,s._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),a.assign(i.default.errors,s._`${i.default.vErrors}.length`)}function g(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=l.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",s._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(a,t,c.props,s.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=l.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",s._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(a,t,c.items,s.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(s._`await ${(0,o.callValidateCode)(e,t,h)}`),g(t),u||a.assign(r,!0)}),(e=>{a.if(s._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,h),(()=>g(t)),(()=>f(t)))}t.getValidate=u,t.callRef=d,t.default=c},7527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(7495),s=r(6172),i=r(4208),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:l,it:c}=e,{oneOf:u}=l;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=a.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),h=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);function f(r){const o=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(s,n.Name),o}t.if(n._`typeof ${h} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!0;for(let t=0;t<u.length;t++){let l=u[t];(null==l?void 0:l.$ref)&&!(0,i.schemaHasRulesButRef)(l,c.self.RULES)&&(l=s.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==l?void 0:l.$ref),l instanceof s.SchemaEnv&&(l=l.schema));const p=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[d];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${d}"`);n=n&&(r||o(l)),a(p,t)}if(!n)throw new Error(`discriminator: "${d}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(d)}function a(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${d}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${d}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${h} === ${e}`),t.assign(p,f(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:h,tagName:d}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:h,tagName:d}))),e.ok(p)}};t.default=a},7495:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},6629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5627),o=r(8215),s=r(7539),i=r(4332),a=r(382),l=[n.default,o.default,(0,s.default)(),i.default,a.metadataVocabulary,a.contentVocabulary];t.default=l},1974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:s,schema:i,schemaCode:a,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:d,self:p}=l;c.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),i=r.const("fDef",n._`${s}[${a}]`),l=r.let("fType"),u=r.let("format");r.if(n._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,(()=>r.assign(l,n._`${i}.type || "string"`).assign(u,n._`${i}.validate`)),(()=>r.assign(l,n._`"string"`).assign(u,i))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=d.$async?n._`(${i}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${l} === ${t} && !${r}`}()))}():function(){const s=p.formats[i];if(!s)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===s)return;const[a,l,h]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(i)}`:void 0,o=r.scopeValue("formats",{key:i,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${h}(${o})`}return"function"==typeof l?n._`${h}(${o})`:n._`${h}.test(${o})`}())}())}};t.default=o},4332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(1974).default];t.default=n},382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},1504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s=r(3054),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:i,schemaCode:a,schema:l}=e;i||l&&"object"==typeof l?e.fail$data(n._`!${(0,o.useFunc)(t,s.default)}(${r}, ${a})`):e.fail(n._`${l} !== ${r}`)}};t.default=i},5867:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s=r(3054),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:i,schema:a,schemaCode:l,it:c}=e;if(!i&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=c.opts.loopEnum;let d;const p=()=>null!=d?d:d=(0,o.useFunc)(t,s.default);let h;if(u||i)h=t.let("valid"),e.block$data(h,(function(){t.assign(h,!1),t.forOf("v",l,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(h,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",l);h=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(h)}};t.default=i},8215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4590),o=r(5637),s=r(5931),i=r(7365),a=r(7116),l=r(6273),c=r(9539),u=r(7875),d=r(1504),p=r(5867),h=[n.default,o.default,s.default,i.default,a.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];t.default=h},9539:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${s} ${o}`)}};t.default=o},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=r(4208),s=r(5262),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i,it:a}=e,l="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,s.default)}(${r})`;e.fail$data(n._`${c} ${l} ${i}`)}};t.default=i},4590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o=n.operators,s={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:i,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${s[t].fail} ${o} || isNaN(${r})`)}};t.default=a},7116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${s} ${o}`)}};t.default=o},5637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2920),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:s}=e,i=s.opts.multipleOfPrecision,a=t.let("res"),l=i?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${l}))`)}};t.default=o},7365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9879),o=r(2920),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:i,it:a}=e,l=a.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${i}, ${l}))`:(0,n.usePattern)(e,s);e.fail$data(o._`!${c}.test(${t})`)}};t.default=s},6273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9879),o=r(2920),s=r(4208),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:i,data:a,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===r.length)return;const d=r.length>=u.loopRequired;if(c.allErrors?function(){if(d||l)e.block$data(o.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(d||l){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,i,(()=>{t.assign(s,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,o.not)(s),(()=>{e.error(),t.break()}))}),o.nil)}(s,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,s)),(0,n.reportMissingProp)(e,s),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",i,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=i},7875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(860),o=r(2920),s=r(4208),i=r(3054),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:l,parentSchema:c,schemaCode:u,it:d}=e;if(!a&&!l)return;const p=t.let("valid"),h=c.items?(0,n.getSchemaTypes)(c.items):[];function f(s,i){const a=t.name("item"),l=(0,n.checkDataTypes)(h,a,d.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${s}--;`,(()=>{t.let(a,o._`${r}[${s}]`),t.if(l,o._`continue`),h.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(i,o._`${c}[${a}]`),e.error(),t.assign(p,!1).break()})).code(o._`${c}[${a}] = ${s}`)}))}function g(n,a){const l=(0,s.useFunc)(t,i.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${l}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",o._`${r}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(p,!0),t.if(o._`${n} > 1`,(()=>(h.length>0&&!h.some((e=>"object"===e||"array"===e))?f:g)(n,s)))}),o._`${u} === false`),e.ok(p)}};t.default=a},9004:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,s.isAsync)(e)?function(...t){const r=t.pop();return a(e.apply(this,t),r)}:(0,n.default)((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return a(n,r);r(null,n)}))};var n=i(r(4172)),o=i(r(1469)),s=r(516);function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{l(t,null,e)}),(e=>{l(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function l(e,t,r){try{e(t,r)}catch(e){(0,o.default)((e=>{throw e}),e)}}e.exports=t.default},1409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(9967)),o=u(r(2636)),s=u(r(5850)),i=u(r(5300)),a=u(r(4037)),l=u(r(516)),c=u(r(9981));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){r=(0,i.default)(r);var n=0,s=0,{length:l}=e,c=!1;function u(e,t){!1===e&&(c=!0),!0!==c&&(e?r(e):++s!==l&&t!==o.default||r(null))}for(0===l&&r(null);n<l;n++)t(e[n],n,(0,a.default)(u))}function p(e,t,r){return(0,s.default)(e,1/0,t,r)}t.default=(0,c.default)((function(e,t,r){return((0,n.default)(e)?d:p)(e,(0,l.default)(t),r)}),3),e.exports=t.default},5850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(5635)),o=i(r(516)),s=i(r(9981));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)((function(e,t,r,s){return(0,n.default)(t)(e,(0,o.default)(r),s)}),4),e.exports=t.default},7782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(5850)),o=s(r(9981));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,r){return(0,n.default)(e,1,t,r)}),3),e.exports=t.default},905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(1409)),o=a(r(5179)),s=a(r(516)),i=a(r(9981));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,r){return(0,n.default)(e,(0,o.default)((0,s.default)(t)),r)}),3),e.exports=t.default},8979:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let s=!1,i=!1,a=!1,l=0,c=0;function u(){l>=t||a||s||(a=!0,e.next().then((({value:e,done:t})=>{if(!i&&!s){if(a=!1,t)return s=!0,void(l<=0&&n(null));l++,r(e,c,d),c++,u()}})).catch(p))}function d(e,t){if(l-=1,!i)return e?p(e):!1===e?(s=!0,void(i=!0)):t===o.default||s&&l<=0?(s=!0,n(null)):void u()}function p(e){i||(a=!1,s=!0,n(e))}u()};var n,o=(n=r(2636))&&n.__esModule?n:{default:n};e.exports=t.default},9981:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,o)=>{r[t-1]=(e,...t)=>{if(e)return o(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}},e.exports=t.default},2636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},5635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(5300)),o=c(r(1827)),s=c(r(4037)),i=r(516),a=c(r(8979)),l=c(r(2636));function c(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,r,c)=>{if(c=(0,n.default)(c),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return c(null);if((0,i.isAsyncGenerator)(t))return(0,a.default)(t,e,r,c);if((0,i.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,r,c);var u=(0,o.default)(t),d=!1,p=!1,h=0,f=!1;function g(e,t){if(!p)if(h-=1,e)d=!0,c(e);else if(!1===e)d=!0,p=!0;else{if(t===l.default||d&&h<=0)return d=!0,c(null);f||m()}}function m(){for(f=!0;h<e&&!d;){var t=u();if(null===t)return d=!0,void(h<=0&&c(null));h+=1,r(t.value,t.key,(0,s.default)(g))}f=!1}m()},e.exports=t.default},5552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default},4172:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}},e.exports=t.default},9967:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default},1827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t=(0,o.default)(e);return t?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],r=-1,n=t.length;return function o(){var s=t[++r];return"__proto__"===s?o():r<n?{value:e[s],key:s}:null}}(e)};var n=s(r(9967)),o=s(r(5552));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5300:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default},4037:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}},e.exports=t.default},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(9967)),o=i(r(516)),s=i(r(9981));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)(((e,t,r)=>{var s=(0,n.default)(t)?[]:{};e(t,((e,t,r)=>{(0,o.default)(e)(((e,...n)=>{n.length<2&&([n]=n),s[t]=n,r(e)}))}),(e=>r(e,s)))}),3),e.exports=t.default},1469:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=i,t.wrap=a;var r,n=t.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,o=t.hasSetImmediate="function"==typeof setImmediate&&setImmediate,s=t.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function i(e){setTimeout(e,0)}function a(e){return(t,...r)=>e((()=>t(...r)))}r=n?queueMicrotask:o?setImmediate:s?process.nextTick:i,t.default=a(r)},5179:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,r,n)=>e(t,n)},e.exports=t.default},516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var n,o=(n=r(9004))&&n.__esModule?n:{default:n};function s(e){return"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return s(e)?(0,o.default)(e):e},t.isAsync=s,t.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},t.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]}},360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(o.default,e,t)};var n=s(r(6192)),o=s(r(7782));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},4391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP=t.LIMIT_FILES_DESCRIPTORS=t.LIMIT_BASENAME_LENGTH=t.IS_USER_ROOT=t.IS_POSIX=t.DEFAULT_TIMEOUT_SYNC=t.DEFAULT_TIMEOUT_ASYNC=t.DEFAULT_WRITE_OPTIONS=t.DEFAULT_READ_OPTIONS=t.DEFAULT_FOLDER_MODE=t.DEFAULT_FILE_MODE=t.DEFAULT_ENCODING=void 0,t.DEFAULT_ENCODING="utf8",t.DEFAULT_FILE_MODE=438,t.DEFAULT_FOLDER_MODE=511,t.DEFAULT_READ_OPTIONS={},t.DEFAULT_WRITE_OPTIONS={},t.DEFAULT_TIMEOUT_ASYNC=5e3,t.DEFAULT_TIMEOUT_SYNC=100;const r=!!process.getuid;t.IS_POSIX=r;const n=!!process.getuid&&!process.getuid();t.IS_USER_ROOT=n,t.LIMIT_BASENAME_LENGTH=128,t.LIMIT_FILES_DESCRIPTORS=1e4,t.NOOP=()=>{}},6992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeFileSync=t.writeFile=t.readFileSync=t.readFile=void 0;const n=r(1017),o=r(4391),s=r(1554),i=r(5139),a=r(7485),l=r(3513);t.readFile=function e(t,r=o.DEFAULT_READ_OPTIONS){var n;if(i.default.isString(r))return e(t,{encoding:r});const a=Date.now()+(null!==(n=r.timeout)&&void 0!==n?n:o.DEFAULT_TIMEOUT_ASYNC);return s.default.readFileRetry(a)(t,r)},t.readFileSync=function e(t,r=o.DEFAULT_READ_OPTIONS){var n;if(i.default.isString(r))return e(t,{encoding:r});const a=Date.now()+(null!==(n=r.timeout)&&void 0!==n?n:o.DEFAULT_TIMEOUT_SYNC);return s.default.readFileSyncRetry(a)(t,r)};const c=(e,t,r,n)=>{if(i.default.isFunction(r))return c(e,t,o.DEFAULT_WRITE_OPTIONS,r);const s=u(e,t,r);return n&&s.then(n,n),s};t.writeFile=c;const u=async(e,t,r=o.DEFAULT_WRITE_OPTIONS)=>{var c;if(i.default.isString(r))return u(e,t,{encoding:r});const d=Date.now()+(null!==(c=r.timeout)&&void 0!==c?c:o.DEFAULT_TIMEOUT_ASYNC);let p=null,h=null,f=null,g=null,m=null;try{r.schedule&&(p=await r.schedule(e)),h=await a.default.schedule(e),e=await s.default.realpathAttempt(e)||e,[g,f]=l.default.get(e,r.tmpCreate||l.default.create,!(!1===r.tmpPurge));const c=o.IS_POSIX&&i.default.isUndefined(r.chown),u=i.default.isUndefined(r.mode);if(c||u){const t=await s.default.statAttempt(e);t&&(r={...r},c&&(r.chown={uid:t.uid,gid:t.gid}),u&&(r.mode=t.mode))}const y=n.dirname(e);await s.default.mkdirAttempt(y,{mode:o.DEFAULT_FOLDER_MODE,recursive:!0}),m=await s.default.openRetry(d)(g,"w",r.mode||o.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(g),i.default.isString(t)?await s.default.writeRetry(d)(m,t,0,r.encoding||o.DEFAULT_ENCODING):i.default.isUndefined(t)||await s.default.writeRetry(d)(m,t,0,t.length,0),!1!==r.fsync&&(!1!==r.fsyncWait?await s.default.fsyncRetry(d)(m):s.default.fsyncAttempt(m)),await s.default.closeRetry(d)(m),m=null,r.chown&&await s.default.chownAttempt(g,r.chown.uid,r.chown.gid),r.mode&&await s.default.chmodAttempt(g,r.mode);try{await s.default.renameRetry(d)(g,e)}catch(t){if("ENAMETOOLONG"!==t.code)throw t;await s.default.renameRetry(d)(g,l.default.truncate(e))}f(),g=null}finally{m&&await s.default.closeAttempt(m),g&&l.default.purge(g),p&&p(),h&&h()}},d=(e,t,r=o.DEFAULT_WRITE_OPTIONS)=>{var a;if(i.default.isString(r))return d(e,t,{encoding:r});const c=Date.now()+(null!==(a=r.timeout)&&void 0!==a?a:o.DEFAULT_TIMEOUT_SYNC);let u=null,p=null,h=null;try{e=s.default.realpathSyncAttempt(e)||e,[p,u]=l.default.get(e,r.tmpCreate||l.default.create,!(!1===r.tmpPurge));const a=o.IS_POSIX&&i.default.isUndefined(r.chown),d=i.default.isUndefined(r.mode);if(a||d){const t=s.default.statSyncAttempt(e);t&&(r={...r},a&&(r.chown={uid:t.uid,gid:t.gid}),d&&(r.mode=t.mode))}const f=n.dirname(e);s.default.mkdirSyncAttempt(f,{mode:o.DEFAULT_FOLDER_MODE,recursive:!0}),h=s.default.openSyncRetry(c)(p,"w",r.mode||o.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(p),i.default.isString(t)?s.default.writeSyncRetry(c)(h,t,0,r.encoding||o.DEFAULT_ENCODING):i.default.isUndefined(t)||s.default.writeSyncRetry(c)(h,t,0,t.length,0),!1!==r.fsync&&(!1!==r.fsyncWait?s.default.fsyncSyncRetry(c)(h):s.default.fsyncAttempt(h)),s.default.closeSyncRetry(c)(h),h=null,r.chown&&s.default.chownSyncAttempt(p,r.chown.uid,r.chown.gid),r.mode&&s.default.chmodSyncAttempt(p,r.mode);try{s.default.renameSyncRetry(c)(p,e)}catch(t){if("ENAMETOOLONG"!==t.code)throw t;s.default.renameSyncRetry(c)(p,l.default.truncate(e))}u(),p=null}finally{h&&s.default.closeSyncAttempt(h),p&&l.default.purge(p)}};t.writeFileSync=d},7668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attemptifySync=t.attemptifyAsync=void 0;const n=r(4391);t.attemptifyAsync=(e,t=n.NOOP)=>function(){return e.apply(void 0,arguments).catch(t)},t.attemptifySync=(e,t=n.NOOP)=>function(){try{return e.apply(void 0,arguments)}catch(e){return t(e)}}},1554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7147),o=r(3837),s=r(7668),i=r(9714),a=r(7305),l={chmodAttempt:s.attemptifyAsync(o.promisify(n.chmod),i.default.onChangeError),chownAttempt:s.attemptifyAsync(o.promisify(n.chown),i.default.onChangeError),closeAttempt:s.attemptifyAsync(o.promisify(n.close)),fsyncAttempt:s.attemptifyAsync(o.promisify(n.fsync)),mkdirAttempt:s.attemptifyAsync(o.promisify(n.mkdir)),realpathAttempt:s.attemptifyAsync(o.promisify(n.realpath)),statAttempt:s.attemptifyAsync(o.promisify(n.stat)),unlinkAttempt:s.attemptifyAsync(o.promisify(n.unlink)),closeRetry:a.retryifyAsync(o.promisify(n.close),i.default.isRetriableError),fsyncRetry:a.retryifyAsync(o.promisify(n.fsync),i.default.isRetriableError),openRetry:a.retryifyAsync(o.promisify(n.open),i.default.isRetriableError),readFileRetry:a.retryifyAsync(o.promisify(n.readFile),i.default.isRetriableError),renameRetry:a.retryifyAsync(o.promisify(n.rename),i.default.isRetriableError),statRetry:a.retryifyAsync(o.promisify(n.stat),i.default.isRetriableError),writeRetry:a.retryifyAsync(o.promisify(n.write),i.default.isRetriableError),chmodSyncAttempt:s.attemptifySync(n.chmodSync,i.default.onChangeError),chownSyncAttempt:s.attemptifySync(n.chownSync,i.default.onChangeError),closeSyncAttempt:s.attemptifySync(n.closeSync),mkdirSyncAttempt:s.attemptifySync(n.mkdirSync),realpathSyncAttempt:s.attemptifySync(n.realpathSync),statSyncAttempt:s.attemptifySync(n.statSync),unlinkSyncAttempt:s.attemptifySync(n.unlinkSync),closeSyncRetry:a.retryifySync(n.closeSync,i.default.isRetriableError),fsyncSyncRetry:a.retryifySync(n.fsyncSync,i.default.isRetriableError),openSyncRetry:a.retryifySync(n.openSync,i.default.isRetriableError),readFileSyncRetry:a.retryifySync(n.readFileSync,i.default.isRetriableError),renameSyncRetry:a.retryifySync(n.renameSync,i.default.isRetriableError),statSyncRetry:a.retryifySync(n.statSync,i.default.isRetriableError),writeSyncRetry:a.retryifySync(n.writeSync,i.default.isRetriableError)};t.default=l},9714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4391),o={isChangeErrorOk:e=>{const{code:t}=e;return"ENOSYS"===t||!(n.IS_USER_ROOT||"EINVAL"!==t&&"EPERM"!==t)},isRetriableError:e=>{const{code:t}=e;return"EMFILE"===t||"ENFILE"===t||"EAGAIN"===t||"EBUSY"===t||"EACCESS"===t||"EACCS"===t||"EPERM"===t},onChangeError:e=>{if(!o.isChangeErrorOk(e))throw e}};t.default=o},5139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={isFunction:e=>"function"==typeof e,isString:e=>"string"==typeof e,isUndefined:e=>void 0===e}},7305:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryifySync=t.retryifyAsync=void 0;const n=r(1978);t.retryifyAsync=(e,t)=>function(r){return function o(){return n.default.schedule().then((n=>e.apply(void 0,arguments).then((e=>(n(),e)),(e=>{if(n(),Date.now()>=r)throw e;if(t(e)){const e=Math.round(100+400*Math.random());return new Promise((t=>setTimeout(t,e))).then((()=>o.apply(void 0,arguments)))}throw e}))))}},t.retryifySync=(e,t)=>function(r){return function n(){try{return e.apply(void 0,arguments)}catch(e){if(Date.now()>r)throw e;if(t(e))return n.apply(void 0,arguments);throw e}}}},1978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={interval:25,intervalId:void 0,limit:r(4391).LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{n.intervalId||(n.intervalId=setInterval(n.tick,n.interval))},reset:()=>{n.intervalId&&(clearInterval(n.intervalId),delete n.intervalId)},add:e=>{n.queueWaiting.add(e),n.queueActive.size<n.limit/2?n.tick():n.init()},remove:e=>{n.queueWaiting.delete(e),n.queueActive.delete(e)},schedule:()=>new Promise((e=>{const t=()=>n.remove(r),r=()=>e(t);n.add(r)})),tick:()=>{if(!(n.queueActive.size>=n.limit)){if(!n.queueWaiting.size)return n.reset();for(const e of n.queueWaiting){if(n.queueActive.size>=n.limit)break;n.queueWaiting.delete(e),n.queueActive.add(e),e()}}}};t.default=n},7485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={},n={next:e=>{const t=r[e];if(!t)return;t.shift();const o=t[0];o?o((()=>n.next(e))):delete r[e]},schedule:e=>new Promise((t=>{let o=r[e];o||(o=r[e]=[]),o.push(t),o.length>1||t((()=>n.next(e)))}))};t.default=n},3513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1017),o=r(4391),s=r(1554),i={store:{},create:e=>{const t=`000000${Math.floor(16777215*Math.random()).toString(16)}`.slice(-6);return`${e}.tmp-${Date.now().toString().slice(-10)}${t}`},get:(e,t,r=!0)=>{const n=i.truncate(t(e));return n in i.store?i.get(e,t,r):(i.store[n]=r,[n,()=>delete i.store[n]])},purge:e=>{i.store[e]&&(delete i.store[e],s.default.unlinkAttempt(e))},purgeSync:e=>{i.store[e]&&(delete i.store[e],s.default.unlinkSyncAttempt(e))},purgeSyncAll:()=>{for(const e in i.store)i.purgeSync(e)},truncate:e=>{const t=n.basename(e);if(t.length<=o.LIMIT_BASENAME_LENGTH)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const s=t.length-o.LIMIT_BASENAME_LENGTH;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-s)}${r[3]}`}};process.on("exit",i.purgeSyncAll),t.default=i},4050:function(e,t,r){"use strict";e=r.nmd(e);var n,o,s,i,a,l,c=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},u=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0});const d=r(3837),p=r(7147),h=r(1017),f=r(6113),g=r(9491),m=r(2361),y=r(9941),v=r(6034),w=r(849),_=r(6992),b=r(5154),S=r(8240),E=r(8498),R=r(2261),k=r(8350),O="aes-256-cbc",x=()=>Object.create(null);let P="";try{delete require.cache[__filename],P=h.dirname(null!==(o=null===(n=e.parent)||void 0===n?void 0:n.filename)&&void 0!==o?o:".")}catch(e){}const $="__internal__",T=`${$}.migrations.version`;class I{constructor(e={}){var t;s.set(this,void 0),i.set(this,void 0),a.set(this,void 0),l.set(this,{}),this._deserialize=e=>JSON.parse(e),this._serialize=e=>JSON.stringify(e,void 0,"\t");const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e},n=k((()=>{const e=v.sync({cwd:P}),t=e&&JSON.parse(p.readFileSync(e,"utf8"));return null!=t?t:{}}));if(!r.cwd){if(r.projectName||(r.projectName=n().name),!r.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");r.cwd=w(r.projectName,{suffix:r.projectSuffix}).config}if(c(this,a,r,"f"),r.schema){if("object"!=typeof r.schema)throw new TypeError("The `schema` option must be an object.");const e=new b.default({allErrors:!0,useDefaults:!0});(0,S.default)(e);const t={type:"object",properties:r.schema};c(this,s,e.compile(t),"f");for(const[e,t]of Object.entries(r.schema))(null==t?void 0:t.default)&&(u(this,l,"f")[e]=t.default)}r.defaults&&c(this,l,{...u(this,l,"f"),...r.defaults},"f"),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new m.EventEmitter,c(this,i,r.encryptionKey,"f");const o=r.fileExtension?`.${r.fileExtension}`:"";this.path=h.resolve(r.cwd,`${null!==(t=r.configName)&&void 0!==t?t:"config"}${o}`);const d=this.store,f=Object.assign(x(),r.defaults,d);this._validate(f);try{g.deepEqual(d,f)}catch(e){this.store=f}if(r.watch&&this._watch(),r.migrations){if(r.projectVersion||(r.projectVersion=n().version),!r.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}}get(e,t){if(u(this,a,"f").accessPropertiesByDotNotation)return this._get(e,t);const{store:r}=this;return e in r?r[e]:t}set(e,t){if("string"!=typeof e&&"object"!=typeof e)throw new TypeError("Expected `key` to be of type `string` or `object`, got "+typeof e);if("object"!=typeof e&&void 0===t)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${$} key, as it's used to manage this module internal operations.`);const{store:r}=this,n=(e,t)=>{((e,t)=>{const r=typeof t;if(new Set(["undefined","symbol","function"]).has(r))throw new TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)})(e,t),u(this,a,"f").accessPropertiesByDotNotation?y.set(r,e,t):r[e]=t};if("object"==typeof e){const t=e;for(const[e,r]of Object.entries(t))n(e,r)}else n(e,t);this.store=r}has(e){return u(this,a,"f").accessPropertiesByDotNotation?y.has(this.store,e):e in this.store}reset(...e){for(const t of e)null!=u(this,l,"f")[t]&&this.set(t,u(this,l,"f")[t])}delete(e){const{store:t}=this;u(this,a,"f").accessPropertiesByDotNotation?y.delete(t,e):delete t[e],this.store=t}clear(){this.store=x();for(const e of Object.keys(u(this,l,"f")))this.reset(e)}onDidChange(e,t){if("string"!=typeof e)throw new TypeError("Expected `key` to be of type `string`, got "+typeof e);if("function"!=typeof t)throw new TypeError("Expected `callback` to be of type `function`, got "+typeof t);return this._handleChange((()=>this.get(e)),t)}onDidAnyChange(e){if("function"!=typeof e)throw new TypeError("Expected `callback` to be of type `function`, got "+typeof e);return this._handleChange((()=>this.store),e)}get size(){return Object.keys(this.store).length}get store(){try{const e=p.readFileSync(this.path,u(this,i,"f")?null:"utf8"),t=this._encryptData(e),r=this._deserialize(t);return this._validate(r),Object.assign(x(),r)}catch(e){if("ENOENT"===(null==e?void 0:e.code))return this._ensureDirectory(),x();if(u(this,a,"f").clearInvalidConfig&&"SyntaxError"===e.name)return x();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.emit("change")}*[(s=new WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakMap,Symbol.iterator)](){for(const[e,t]of Object.entries(this.store))yield[e,t]}_encryptData(e){if(!u(this,i,"f"))return e.toString();try{if(u(this,i,"f"))try{if(":"===e.slice(16,17).toString()){const t=e.slice(0,16),r=f.pbkdf2Sync(u(this,i,"f"),t.toString(),1e4,32,"sha512"),n=f.createDecipheriv(O,r,t);e=Buffer.concat([n.update(Buffer.from(e.slice(17))),n.final()]).toString("utf8")}else{const t=f.createDecipher(O,u(this,i,"f"));e=Buffer.concat([t.update(Buffer.from(e)),t.final()]).toString("utf8")}}catch(e){}}catch(e){}return e.toString()}_handleChange(e,t){let r=e();const n=()=>{const n=r,o=e();(0,d.isDeepStrictEqual)(o,n)||(r=o,t.call(this,o,n))};return this.events.on("change",n),()=>this.events.removeListener("change",n)}_validate(e){if(!u(this,s,"f"))return;if(u(this,s,"f").call(this,e)||!u(this,s,"f").errors)return;const t=u(this,s,"f").errors.map((({instancePath:e,message:t=""})=>`\`${e.slice(1)}\` ${t}`));throw new Error("Config schema violation: "+t.join("; "))}_ensureDirectory(){p.mkdirSync(h.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(u(this,i,"f")){const e=f.randomBytes(16),r=f.pbkdf2Sync(u(this,i,"f"),e.toString(),1e4,32,"sha512"),n=f.createCipheriv(O,r,e);t=Buffer.concat([e,Buffer.from(":"),n.update(Buffer.from(t)),n.final()])}if(process.env.SNAP)p.writeFileSync(this.path,t,{mode:u(this,a,"f").configFileMode});else try{_.writeFileSync(this.path,t,{mode:u(this,a,"f").configFileMode})}catch(e){if("EXDEV"===(null==e?void 0:e.code))return void p.writeFileSync(this.path,t,{mode:u(this,a,"f").configFileMode});throw e}}_watch(){this._ensureDirectory(),p.existsSync(this.path)||this._write(x()),"win32"===process.platform?p.watch(this.path,{persistent:!1},E((()=>{this.events.emit("change")}),{wait:100})):p.watchFile(this.path,{persistent:!1},E((()=>{this.events.emit("change")}),{wait:5e3}))}_migrate(e,t,r){let n=this._get(T,"0.0.0");const o=Object.keys(e).filter((e=>this._shouldPerformMigration(e,n,t)));let s={...this.store};for(const i of o)try{r&&r(this,{fromVersion:n,toVersion:i,finalVersion:t,versions:o}),(0,e[i])(this),this._set(T,i),n=i,s={...this.store}}catch(e){throw this.store=s,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${e}`)}!this._isVersionInRangeFormat(n)&&R.eq(n,t)||this._set(T,t)}_containsReservedKey(e){return"object"==typeof e&&Object.keys(e)[0]===$||"string"==typeof e&&!!u(this,a,"f").accessPropertiesByDotNotation&&!!e.startsWith(`${$}.`)}_isVersionInRangeFormat(e){return null===R.clean(e)}_shouldPerformMigration(e,t,r){return this._isVersionInRangeFormat(e)?("0.0.0"===t||!R.satisfies(t,e))&&R.satisfies(r,e):!R.lte(e,t)&&!R.gt(e,r)}_get(e,t){return y.get(this.store,e,t)}_set(e,t){const{store:r}=this;y.set(r,e,t),this.store=r}}t.default=I,e.exports=I,e.exports.default=I},8498:(e,t,r)=>{"use strict";const n=r(1492);e.exports=(e,t={})=>{if("function"!=typeof e)throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,before:o=!1,after:s=!0}=t;if(!o&&!s)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let i,a;const l=function(...t){const n=this,l=o&&!i;return clearTimeout(i),i=setTimeout((()=>{i=void 0,s&&(a=e.apply(n,t))}),r),l&&(a=e.apply(n,t)),a};return n(l,e),l.cancel=()=>{i&&(clearTimeout(i),i=void 0)},l}},9941:(e,t,r)=>{"use strict";const n=r(6178),o=new Set(["__proto__","prototype","constructor"]);function s(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return r.some((e=>o.has(e)))?[]:r}e.exports={get(e,t,r){if(!n(e)||"string"!=typeof t)return void 0===r?e:r;const o=s(t);if(0!==o.length){for(let t=0;t<o.length;t++)if(null==(e=e[o[t]])){if(t!==o.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!n(e)||"string"!=typeof t)return e;const o=e,i=s(t);for(let t=0;t<i.length;t++){const o=i[t];n(e[o])||(e[o]={}),t===i.length-1&&(e[o]=r),e=e[o]}return o},delete(e,t){if(!n(e)||"string"!=typeof t)return!1;const r=s(t);for(let t=0;t<r.length;t++){const o=r[t];if(t===r.length-1)return delete e[o],!0;if(e=e[o],!n(e))return!1}},has(e,t){if(!n(e)||"string"!=typeof t)return!1;const r=s(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!n(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}}},7906:(e,t,r)=>{var n=r(1017),o=r(2081).spawn,s=r(2601)("electron-squirrel-startup"),i=r(2298).app,a=function(e,t){var r=n.resolve(n.dirname(process.execPath),"..","Update.exe");s("Spawning `%s` with args `%s`",r,e),o(r,e,{detached:!0}).on("close",t)};e.exports=function(){if("win32"===process.platform){var e=process.argv[1];s("processing squirrel command `%s`",e);var t=n.basename(process.execPath);if("--squirrel-install"===e||"--squirrel-updated"===e)return a(["--createShortcut="+t],i.quit),!0;if("--squirrel-uninstall"===e)return a(["--removeShortcut="+t],i.quit),!0;if("--squirrel-obsolete"===e)return i.quit(),!0}return!1}()},3084:(e,t,r)=>{function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(6750)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(s=o))})),e.splice(s,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())},6750:(e,t,r)=>{var n;function o(e){function r(){if(r.enabled){var e=r,o=+new Date,s=o-(n||o);e.diff=s,e.prev=n,e.curr=o,n=o;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var l=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;l++;var o=t.formatters[n];if("function"==typeof o){var s=i[l];r=o.call(e,s),i.splice(l,1),l--}return r})),t.formatArgs.call(e,i),(r.log||t.log||console.log.bind(console)).apply(e,i)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&("-"===(e=r[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(4121),t.names=[],t.skips=[],t.formatters={}},2601:(e,t,r)=>{"undefined"!=typeof process&&"renderer"===process.type?e.exports=r(3084):e.exports=r(8536)},8536:(e,t,r)=>{var n=r(6224),o=r(3837);(t=e.exports=r(6750)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return i.write(o.format.apply(o,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace;if(this.useColors){var n=this.color,o=" [3"+n+";1m"+r+" [0m";e[0]=o+e[0].split("\n").join("\n"+o),e.push("[3"+n+"m+"+t.humanize(this.diff)+"[0m")}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=a,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(s)},t.colors=[6,2,3,4,5,1],t.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{});var s=parseInt(process.env.DEBUG_FD,10)||2;1!==s&&2!==s&&o.deprecate((function(){}),"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var i=1===s?process.stdout:2===s?process.stderr:function(e){var t;switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new n.WriteStream(e))._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":(t=new(r(7147).SyncWriteStream)(e,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(t=new(r(1808).Socket)({fd:e,readable:!1,writable:!0})).readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}(s);function a(){return process.env.DEBUG}t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)},t.enable(a())},4121:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,i){i=i||{};var a,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(s){var i=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===l&&!1===isNaN(e))return i.long?s(a=e,o,"day")||s(a,n,"hour")||s(a,r,"minute")||s(a,t,"second")||a+" ms":function(e){return e>=o?Math.round(e/o)+"d":e>=n?Math.round(e/n)+"h":e>=r?Math.round(e/r)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8252:(e,t,r)=>{"use strict";const n=r(1017),{app:o,ipcMain:s,ipcRenderer:i,shell:a}=r(2298),l=r(4050);let c=!1;const u=()=>{if(!s||!o)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");const e={defaultCwd:o.getPath("userData"),appVersion:o.getVersion()};return c||(s.on("electron-store-get-data",(t=>{t.returnValue=e})),c=!0),e};e.exports=class extends l{constructor(e){let t,r;if(i){const e=i.sendSync("electron-store-get-data");if(!e)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:t,appVersion:r}=e)}else s&&o&&({defaultCwd:t,appVersion:r}=u());(e={name:"config",...e}).projectVersion||(e.projectVersion=r),e.cwd?e.cwd=n.isAbsolute(e.cwd)?e.cwd:n.join(t,e.cwd):e.cwd=t,e.configName=e.name,delete e.name,super(e)}static initRenderer(){u()}openInEditor(){a.openPath(this.path)}}},849:(e,t,r)=>{"use strict";const n=r(1017),o=r(2037),s=o.homedir(),i=o.tmpdir(),{env:a}=process,l=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected string, got "+typeof e);return(t=Object.assign({suffix:"nodejs"},t)).suffix&&(e+=`-${t.suffix}`),"darwin"===process.platform?(e=>{const t=n.join(s,"Library");return{data:n.join(t,"Application Support",e),config:n.join(t,"Preferences",e),cache:n.join(t,"Caches",e),log:n.join(t,"Logs",e),temp:n.join(i,e)}})(e):"win32"===process.platform?(e=>{const t=a.APPDATA||n.join(s,"AppData","Roaming"),r=a.LOCALAPPDATA||n.join(s,"AppData","Local");return{data:n.join(r,e,"Data"),config:n.join(t,e,"Config"),cache:n.join(r,e,"Cache"),log:n.join(r,e,"Log"),temp:n.join(i,e)}})(e):(e=>{const t=n.basename(s);return{data:n.join(a.XDG_DATA_HOME||n.join(s,".local","share"),e),config:n.join(a.XDG_CONFIG_HOME||n.join(s,".config"),e),cache:n.join(a.XDG_CACHE_HOME||n.join(s,".cache"),e),log:n.join(a.XDG_STATE_HOME||n.join(s,".local","state"),e),temp:n.join(i,t,e)}})(e)};e.exports=l,e.exports.default=l},7429:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;0!=o--;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r}},900:(e,t,r)=>{"use strict";const n=r(9796);class o{constructor(e,t){e.startsWith("Brotli")?(this._noFlushFlag=n.constants.BROTLI_OPERATION_PROCESS,Number.isInteger(t.flush)||(t.flush=n.constants.BROTLI_OPERATION_FLUSH)):(this._noFlushFlag=n.constants.Z_NO_FLUSH,Number.isInteger(t.flush)||(t.flush=n.constants.Z_SYNC_FLUSH)),this.instance=new n[e](t),this._buffer=[],this._kError=Object.getOwnPropertySymbols(this.instance).find((e=>e.toString().includes("kError"))),this._backups=[this.instance.close,this.instance._handle,this.instance._handle.close]}process(e,t){const r=this.instance,n=this._noFlushFlag,o=this._kError,[s,i,a]=this._backups,l=Number.isInteger(t)?t:r._defaultFlushFlag,c=Buffer.isBuffer(e)?e:Buffer.from(e),u=this._buffer;let d,p;r.close=()=>{},r._handle.close=()=>{};try{d=r._processChunk(c,l)}catch(e){p=e}if(r.close=s,r._handle=i,r._handle.close=a,r.removeAllListeners("error"),p)throw r.reset(),r[o]=null,p;if(d=Buffer.from(d),l===n){if(d.length)return u.push(d),Buffer.allocUnsafe(0)}else u.length&&(u.push(d),d=Buffer.concat(u),this._buffer=[]);return d}close(){this.instance&&(this.instance._handle.close(),this.instance._handle=null,this.instance.close(),this.instance=null,this.process=()=>{})}}t.Inflate=class extends o{constructor(e={}){super("Inflate",e)}},t.Deflate=class extends o{constructor(e={}){super("Deflate",e)}},t.InflateRaw=class extends o{constructor(e={}){super("InflateRaw",e)}},t.DeflateRaw=class extends o{constructor(e={}){super("DeflateRaw",e)}},t.Gzip=class extends o{constructor(e={}){super("Gzip",e)}},t.Gunzip=class extends o{constructor(e={}){super("Gunzip",e)}},t.Unzip=class extends o{constructor(e={}){super("Unzip",e)}},t.BrotliCompress=class extends o{constructor(e={}){super("BrotliCompress",e)}},t.BrotliDecompress=class extends o{constructor(e={}){super("BrotliDecompress",e)}},t.constants=n.constants,t.default=t},6387:(e,t,r)=>{"use strict";r.r(t),r.d(t,{assign:()=>u,default:()=>T,defaultI18n:()=>f,format:()=>P,parse:()=>$,setGlobalDateI18n:()=>m,setGlobalDateMasks:()=>x});var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="\\d\\d?",s="\\d\\d",i="[^\\s]+",a=/\[([^]*?)\]/gm;function l(e,t){for(var r=[],n=0,o=e.length;n<o;n++)r.push(e[n].substr(0,t));return r}var c=function(e){return function(t,r){var n=r[e].map((function(e){return e.toLowerCase()})),o=n.indexOf(t.toLowerCase());return o>-1?o:null}};function u(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++){var s=o[n];for(var i in s)e[i]=s[i]}return e}var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],h=l(p,3),f={dayNamesShort:l(d,3),dayNames:d,monthNamesShort:h,monthNames:p,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},g=u({},f),m=function(e){return g=u(g,e)},y=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},v=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},w={D:function(e){return String(e.getDate())},DD:function(e){return v(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return v(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return v(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return v(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return v(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return v(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return v(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return v(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return v(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return v(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return v(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+v(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+v(Math.floor(Math.abs(t)/60),2)+":"+v(Math.abs(t)%60,2)}},_=function(e){return+e-1},b=[null,o],S=[null,i],E=["isPm",i,function(e,t){var r=e.toLowerCase();return r===t.amPm[0]?0:r===t.amPm[1]?1:null}],R=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var r=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?r:-r}return 0}],k={D:["day",o],DD:["day",s],Do:["day",o+i,function(e){return parseInt(e,10)}],M:["month",o,_],MM:["month",s,_],YY:["year",s,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",o,void 0,"isPm"],hh:["hour",s,void 0,"isPm"],H:["hour",o],HH:["hour",s],m:["minute",o],mm:["minute",s],s:["second",o],ss:["second",s],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",s,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:b,dd:b,ddd:S,dddd:S,MMM:["month",i,c("monthNamesShort")],MMMM:["month",i,c("monthNames")],a:E,A:E,ZZ:R,Z:R},O={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},x=function(e){return u(O,e)},P=function(e,t,r){if(void 0===t&&(t=O.default),void 0===r&&(r={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");t=O[t]||t;var o=[];t=t.replace(a,(function(e,t){return o.push(t),"@@@"}));var s=u(u({},g),r);return(t=t.replace(n,(function(t){return w[t](e,s)}))).replace(/@@@/g,(function(){return o.shift()}))};function $(e,t,r){if(void 0===r&&(r={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=O[t]||t,e.length>1e3)return null;var o={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},s=[],i=[],l=t.replace(a,(function(e,t){return i.push(y(t)),"@@@"})),c={},d={};l=y(l).replace(n,(function(e){var t=k[e],r=t[0],n=t[1],o=t[3];if(c[r])throw new Error("Invalid format. "+r+" specified twice in format");return c[r]=!0,o&&(d[o]=!0),s.push(t),"("+n+")"})),Object.keys(d).forEach((function(e){if(!c[e])throw new Error("Invalid format. "+e+" is required in specified format")})),l=l.replace(/@@@/g,(function(){return i.shift()}));var p=e.match(new RegExp(l,"i"));if(!p)return null;for(var h,f=u(u({},g),r),m=1;m<p.length;m++){var v=s[m-1],w=v[0],_=v[2],b=_?_(p[m],f):+p[m];if(null==b)return null;o[w]=b}if(1===o.isPm&&null!=o.hour&&12!=+o.hour?o.hour=+o.hour+12:0===o.isPm&&12==+o.hour&&(o.hour=0),null==o.timezoneOffset){h=new Date(o.year,o.month,o.day,o.hour,o.minute,o.second,o.millisecond);for(var S=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],E=(m=0,S.length);m<E;m++)if(c[S[m][0]]&&o[S[m][0]]!==h[S[m][1]]())return null}else if(h=new Date(Date.UTC(o.year,o.month,o.day,o.hour,o.minute-o.timezoneOffset,o.second,o.millisecond)),o.month>11||o.month<0||o.day>31||o.day<1||o.hour>23||o.hour<0||o.minute>59||o.minute<0||o.second>59||o.second<0)return null;return h}const T={format:P,parse:$,defaultI18n:f,setGlobalDateI18n:m,setGlobalDateMasks:x}},2824:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){if("string"==typeof e.displayName&&e.constructor.name)return e.displayName;if("string"==typeof e.name&&e.name)return e.name;if("object"==typeof e&&e.constructor&&"string"==typeof e.constructor.name)return e.constructor.name;var r=e.toString(),n=t.call(e).slice(8,-1);return(r="Function"===n?r.substring(r.indexOf("(")+1,r.indexOf(")")):n)||"anonymous"}},2315:(e,t,r)=>{var n=r(4483),o=r(5151);t.Produce=n,t.Parse=o},5151:e=>{var t=["kern","user","mail","daemon","auth","syslog","lpr","news","uucp","clock","sec","ftp","ntp","audit","alert","clock","local0","local1","local2","local3","local4","local5","local6","local7"],r=["emerg","alert","crit","err","warn","notice","info","debug"],n={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},o={hashAlgorithm:[null,"SHA1","SHA256"],keyBlobType:{C:"PKIX Certificate",P:"OpenPGP KeyID",K:"Public Key",N:"No key information",U:"Unknown"}},s=function(){};s.prototype.parse=function(e,t){if("function"==typeof Buffer&&Buffer.isBuffer(e))e=e.toString("utf8",0);else if("string"!=typeof e)return e;var r={originalMessage:e},n=e.split(" ");if(n.length<2)return r;var o,s=this.decodePri(n[0]);if(s)for(var a in s)r[a]=s[a];if(n[0].match(/^(<\d+>\d)$/)){if(n.shift(),o=n.shift(),r.type="RFC5424",r.time=this.parseTimeStamp(o),r.host=this.decideValue(n.shift()),r.appName=this.decideValue(n.shift()),r.pid=this.decideValue(n.shift()),r.msgID=this.decideValue(n.shift()),"-"!==n[0]){var l=0;for(i=n.length-1;i>-1;i--)if("]"===n[i].substr(-1)){l=i,l++;break}if(0!==l){var c=n.splice(0,l).join(" ");r.structuredData=this.parseStructure(c),r.structuredData.ssign?r.structuredData.signedBlock=this.parseSignedBlock(r.structuredData):r.structuredData["ssign-cert"]&&(r.structuredData.signedBlock=this.parseSignedCertificate(r.structuredData))}}else n.shift();r.message=n.join(" ")}else n[0].match(/^(<\d+>\d+:)$/)?(r.type="RFC3164",o=n.splice(0,1).join(" ").replace(/^(<\d+>)/,""),r.time=this.parseBsdTime(o),r.message=n.join(" ")):n[0].match(/^(<\d+>\w+)/)&&(r.type="RFC3164",""===n[1]&&n.splice(1,1),o=n.splice(0,3).join(" ").replace(/^(<\d+>)/,""),r.time=this.parseBsdTime(o),r.host=n.shift(),r.message=n.join(" "));if(!t)return r;t(r)},s.prototype.decideValue=function(e){return"-"===e?null:e},s.prototype.decodePri=function(e){if("string"==typeof e){var n=e.match(/^<(\d+)>/);if(!n)return!1;var o={prival:parseInt(n[1],10)};if(n[2]&&(o.versio=parseInt(n[2],10)),o.prival&&o.prival>=0&&o.prival<=191)o.facilityID=parseInt(o.prival/8,10),o.severityID=o.prival-8*o.facilityID,o.facilityID<24&&o.severityID<8&&(o.facility=t[o.facilityID],o.severity=r[o.severityID]);else if(o.prival>=191)return!1;return o}},s.prototype.parseTimeStamp=function(e){var t;if("string"==typeof e)return(t=this.parse8601(e))||(t=this.parseRfc3339(e))?t:(t=this.parseBsdTime(e))||t},s.prototype.parseRfc3339=function(e){var t,r,n,o=1,s=e.split("T");if(s.length<2)return!1;var i=s[0].split("-"),a=s[1].split(":"),l=a[a.length-1];if(offsetFieldIdentifier=l.charAt(l.length-1),"Z"===offsetFieldIdentifier)t=0,a[a.length-1]=l.substr(0,l.length-2);else{if(-1!=l[l.length-1].indexOf("+")?(r="+",o=1):(r="-",o=-1),(n=l.split(r)).length<2)return!1;a[a.length-1]=n[0],t=60*(t=60*(n=n[1].split(":"))[0]+n[1])*1e3}return new Date(Date.UTC(i[0],i[1]-1,i[2],a[0],a[1],a[2])+t*o)},s.prototype.parseBsdTime=function(e){var t,r=e.match(/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(\d{1,2})\s+(\d{2}):(\d{2}):(\d{2})/);return r&&(currDate=new Date,t=new Date(currDate.getUTCFullYear(),n[r[1]],r[2],r[3],r[4],r[5])),t},s.prototype.parse8601=function(e){var t=new Date(Date.parse(e));if("Invalid Date"!==t.toString())return t},s.prototype.parseStructure=function(e){for(var t={},r=0,n=!1,o="",s="",i="",a=0;a<e.length;a++){var l=e[a];switch(r){case 0:r="["===l?1:0;break;case 1:" "!=l?o+=l:(t[o]={},r=2);break;case 2:"="===l?(t[o][s]="",r=3):"]"===l?(o="",r=0):" "!=l&&(s+=l);break;case 3:r='"'===l?4:null;break;case 4:"\\"!==l||n?'"'!==l||n?(i+=l,n=!1):(t[o][s]=i,s="",i="",r=2):n=!0}}return t},s.prototype.parseSignedBlock=function(e){if("object"!=typeof e)return!1;var t={},r={};if(e.structuredData&&e.structuredData.ssign)t=e.structuredData.ssign;else if(e.ssign)t=e.ssign;else{if(!e.VER)return!1;t=e}var n=t.VER.match(/^(\d{2})(\d|\w)(\d)$/);if(null!==n&&(r.version=n[1],r.hashAlgorithm=parseInt(n[2],10),r.hashAlgoString=o.hashAlgorithm[r.hashAlgorithm],r.sigScheme=parseInt(n[3],10)),r.rebootSessionID=parseInt(t.RSID,10),r.signatureGroup=parseInt(t.SG,10),r.signaturePriority=parseInt(t.SPRI,10),r.globalBlockCount=parseInt(t.GBC,10),r.firstMsgNumber=parseInt(t.FMN,10),r.msgCount=parseInt(t.CNT,10),r.hashBlock=t.HB.split(/\s/),"function"==typeof Buffer){for(var s in r.hashBlock)r.hashBlock[s]=new Buffer(r.hashBlock[s],encoding="base64");r.thisSignature=new Buffer(t.SIGN,encoding="base64")}else r.thisSignature=t.SIGN;return r},s.prototype.parseSignedCertificate=function(e){if("object"!=typeof e)return!1;var t={},r={};if(e.structuredData&&e.structuredData["ssign-cert"])t=e.structuredData["ssign-cert"];else if(e["ssign-cert"])t=e["ssign-cert"];else{if(!e.VER)return!1;t=e}var n=t.VER.match(/^(\d{2})(\d|\w)(\d)$/);null!==n&&(r.version=n[1],r.hashAlgorithm=parseInt(n[2],10),r.hashAlgoString=o.hashAlgorithm[r.hashAlgorithm],r.sigScheme=parseInt(n[3],10)),r.rebootSessionID=parseInt(t.RSID,10),r.signatureGroup=parseInt(t.SG,10),r.signaturePriority=parseInt(t.SPRI,10),r.totalPayloadLength=parseInt(t.TPBL,10),r.payloadIndex=parseInt(t.INDEX,10),r.fragmentLength=parseInt(t.FLEN,10);var s=t.FRAG.split(/\s/);return r.payloadTimestamp=this.parseTimeStamp(s[0]),r.payloadType=s[1],r.payloadName=o.keyBlobType[s[1]],"function"==typeof Buffer?(r.keyBlob=new Buffer(s[2],encoding="base64"),r.thisSignature=new Buffer(t.SIGN,encoding="base64")):(r.keyBlob=s[2],r.thisSignature=t.SIGN),r},e.exports=new s},4483:e=>{var t={kern:0,user:1,mail:2,daemon:3,auth:4,syslog:5,lpr:6,news:7,uucp:8,clock:9,sec:10,ftp:11,ntp:12,audit:13,alert:14,local0:16,local1:17,local2:18,local3:19,local4:20,local5:21,local6:22,local7:23},r={emerg:0,emergency:0,alert:1,crit:2,critical:2,err:3,error:3,warn:4,warning:4,notice:5,info:6,information:6,informational:6,debug:7},n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=function(e){e&&"object"==typeof e&&e.type?this.type=e.type.match(/bsd|3164/i)?"RFC3164":"RFC5424":this.type=e&&"string"==typeof e&&e.match(/bsd|3164/i)?"RFC3164":"RFC5424",e&&e.facility&&t[e.facility]&&(this.facility=e.facility),e&&e.pid&&parseInt(e.pid,10)&&(this.pid=e.pid),e&&e.host&&(this.host=e.host.replace(/\s+/g,"")),e&&e.appName&&(this.appName=e.appName.replace(/\s+/g,"")),e&&e.msgID&&(this.msgID=e.msgID.replace(/\s+/g,""))};function s(e){return"number"!=typeof e?e:e=e<10?"0"+e:e}function i(e){var n={};return"string"!=typeof e.facility||e.facility.match(/^\d+$/)?parseInt(e.facility,10)&&parseInt(e.facility,10)<24&&(n.facility=parseInt(e.facility,10)):n.facility=t[e.facility.toLowerCase()],"string"!=typeof e.severity||e.severity.match(/^\d+$/)?parseInt(e.severity,10)&&parseInt(e.severity,10)<8&&(n.severity=parseInt(e.severity,10)):n.severity=r[e.severity.toLowerCase()],!isNaN(n.severity)&&!isNaN(n.facility)&&(n.prival=8*n.facility+n.severity,n.str=e.version?"<"+n.prival+">"+e.version:"<"+n.prival+">",n.str)}o.prototype.produce=function(e,t){e.time instanceof Date&&!e.date&&(e.date=e.time);var r=[];if(!e.date instanceof Date&&(e.date=new Date(Date())),e.facility||(e.facility=this.facility),"RFC5424"==this.type){if(e.hasOwnProperty("prival")&&e.prival>=0&&e.prival<=191)var o="<"+e.prival+">1";else o=i({facility:e.facility,severity:e.severity,version:1});if(!1===o)return!1;r.push(o),r.push(function(e){e instanceof Date||(e=new Date(Date()));for(var t,r=Math.abs(e.getTimezoneOffset()),n=0;r>=60;)n++,r-=60;return t=e.getTimezoneOffset()<0?"+"+s(n)+":"+s(r):e.getTimezoneOffset()>0?"-"+s(n)+":"+s(r):"Z",formattedDate=e.getUTCFullYear()+"-"+s(e.getUTCMonth()+1)+"-"+s(e.getUTCDate())+"T"+s(e.getUTCHours())+":"+s(e.getUTCMinutes())+":"+s(e.getUTCSeconds())+"."+s(e.getUTCMilliseconds())+t,formattedDate}(e.date)),r.push(e.host||this.host||"-"),r.push(e.appName||this.appName||"-"),r.push(e.pid||this.pid||"-"),r.push(e.msgID||this.msgID||"-"),e.structuredData?r.push(function(e){if("object"!=typeof e)return!1;var t="";for(var r in e){for(var n in sdElement=e[r],t+="["+r,sdElement)sdElement[n]=sdElement[n].toString().replace(/(\]|\\|")/g,"\\$1"),t+=" "+n+'="'+sdElement[n]+'"';t+="]"}return t}(e.structuredData)||"-"):r.push("-"),e.message||(e.message="-")}else if(e.timestamp=function(e){e instanceof Date||(e=new Date(Date()));var t=s(e.getHours()),r=s(e.getMinutes()),o=s(e.getSeconds()),i=e.getMonth(),a=e.getDate();return a<10&&(a=" "+a),n[i]+" "+a+" "+t+":"+r+":"+o}(e.date),r.push(i({facility:e.facility,severity:e.severity})+e.timestamp),r.push(e.host||this.host),r.push(),e.appName||this.appName){var a=e.appName||this.appName,l=e.pid||this.pid;parseInt(l,10)?r.push(a+"["+l+"]:"):r.push(a+":")}var c=r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ");return c+=" "+e.message||0,r.push(c),t?t(c):c},o.prototype.debug=function(e,t){return e.severity="debug",this.produce(e,t)},o.prototype.info=function(e,t){return e.severity="info",this.produce(e,t)},o.prototype.notice=function(e,t){return e.severity="notice",this.produce(e,t)},o.prototype.warn=function(e,t){return e.severity="warn",this.produce(e,t)},o.prototype.crit=function(e,t){return e.severity="crit",this.produce(e,t)},o.prototype.alert=function(e,t){return e.severity="alert",this.produce(e,t)},o.prototype.emergency=function(e,t){return e.severity="emergency",this.produce(e,t)},e.exports=o},4748:e=>{"use strict";const t={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class r{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||t,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new r(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new r(this.logger,e)}}var n=new r;class o{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==t)):delete this.observers[e])}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach((e=>{e(...r)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...r])}))}}function s(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));return r.resolve=e,r.reject=t,r}function i(e){return null==e?"":""+e}function a(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}const s="string"!=typeof t?[].concat(t):t.split(".");for(;s.length>1;){if(o())return{};const t=n(s.shift());!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return o()?{}:{obj:e,k:n(s.shift())}}function l(e,t,r){const{obj:n,k:o}=a(e,t,Object);n[o]=r}function c(e,t){const{obj:r,k:n}=a(e,t);if(r)return r[n]}function u(e,t,r){for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):u(e[n],t[n],r):e[n]=t[n]);return e}function d(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function h(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>p[e])):e}const f=[" ",",","?","!",";"];function g(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let o=e;for(let e=0;e<n.length;++e){if(!o)return;if("string"==typeof o[n[e]]&&e+1<n.length)return;if(void 0===o[n[e]]){let s=2,i=n.slice(e,e+s).join(r),a=o[i];for(;void 0===a&&n.length>e+s;)s++,i=n.slice(e,e+s).join(r),a=o[i];if(void 0===a)return;if(null===a)return null;if(t.endsWith(i)){if("string"==typeof a)return a;if(i&&"string"==typeof a[i])return a[i]}const l=n.slice(e+s).join(r);return l?g(a,l,r):void 0}o=o[n[e]]}return o}function m(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class y extends o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let i=[e,t];r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split("."));const a=c(this.data,i);return a||!s||"string"!=typeof r?a:g(this.data&&this.data[e]&&this.data[e][t],r,o)}addResource(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const s=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let i=[e,t];r&&(i=i.concat(s?r.split(s):r)),e.indexOf(".")>-1&&(i=e.split("."),n=t,t=i[1]),this.addNamespaces(t),l(this.data,i,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const n in r)"string"!=typeof r[n]&&"[object Array]"!==Object.prototype.toString.apply(r[n])||this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),n=r,r=t,t=i[1]),this.addNamespaces(t);let a=c(this.data,i)||{};n?u(a,r,o):a={...a,...r},l(this.data,i,a),s.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var v={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,r,n,o))})),t}};const w={};class _ extends o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,o;super(),r=e,o=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{r[e]&&(o[e]=r[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=n.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const r=this.resolve(e,t);return r&&void 0!==r.res}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=r&&e.indexOf(r)>-1,i=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";const n=f.filter((e=>t.indexOf(e)<0&&r.indexOf(e)<0));if(0===n.length)return!0;const o=new RegExp(`(${n.map((e=>"?"===e?"\\?":e)).join("|")})`);let s=!o.test(e);if(!s){const t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(s=!0)}return s}(e,r,n));if(s&&!i){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const s=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,r){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const n=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:s,namespaces:i}=this.extractFromKey(e[e.length-1],t),a=i[i.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return n?{res:`${a}${e}${s}`,usedKey:s,exactUsedKey:s,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${s}`}return n?{res:s,usedKey:s,exactUsedKey:s,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:s}const u=this.resolve(e,t);let d=u&&u.res;const p=u&&u.usedKey||s,h=u&&u.exactUsedKey||s,f=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&d&&"string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d&&["[object Number]","[object Function]","[object RegExp]"].indexOf(f)<0&&("string"!=typeof g||"[object Array]"!==f)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...t,ns:i}):`key '${s} (${this.language})' returned an object instead of string.`;return n?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e="[object Array]"===f,r=e?[]:{},n=e?h:p;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const s=`${n}${o}${e}`;r[e]=this.translate(s,{...t,joinArrays:!1,ns:i}),r[e]===s&&(r[e]=d[e])}d=r}}else if(m&&"string"==typeof g&&"[object Array]"===f)d=d.join(g),d&&(d=this.extendTranslation(d,e,t,r));else{let n=!1,i=!1;const c=void 0!==t.count&&"string"!=typeof t.count,p=_.hasDefaultValue(t),h=c?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",g=t[`defaultValue${h}`]||t[`defaultValue${f}`]||t.defaultValue;!this.isValidLookup(d)&&p&&(n=!0,d=g),this.isValidLookup(d)||(i=!0,d=s);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:d,y=p&&g!==d&&this.options.updateMissing;if(i||n||y){if(this.logger.log(y?"updateKey":"missingKey",l,a,s,y?g:d),o){const e=this.resolve(s,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const r=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&r&&r[0])for(let t=0;t<r.length;t++)e.push(r[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const n=(e,r,n)=>{const o=p&&n!==d?n:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,r,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,r,o,y,t),this.emit("missingKey",e,a,r,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((r=>{n([e],s+r,t[`defaultValue${r}`]||g)}))})):n(e,s,g))}d=this.extendTranslation(d,e,t,u,r),i&&d===s&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${s}`),(i||n)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${s}`:s,n?d:void 0):this.options.parseMissingKeyHandler(d))}return n?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,r,n,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const i="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return o&&o[0]===n[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${n[0]} in key: ${t[0]}`),null):s.translate(...n,t)}),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,a="string"==typeof i?[i]:i;return null!=e&&a&&a.length&&!1!==r.applyPostProcessor&&(e=v.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t,r,n,o,s,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,i),l=a.key;r=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==i.count&&"string"!=typeof i.count,d=u&&!i.ordinal&&0===i.count&&this.pluralResolver.shouldUseIntlApi(),p=void 0!==i.context&&("string"==typeof i.context||"number"==typeof i.context)&&""!==i.context,h=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(s=e,!w[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(w[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((r=>{if(this.isValidLookup(t))return;o=r;const s=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,i);else{let e;u&&(e=this.pluralResolver.getSuffix(r,i.count,i));const t=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(s.push(l+e),i.ordinal&&0===e.indexOf(n)&&s.push(l+e.replace(n,this.options.pluralSeparator)),d&&s.push(l+t)),p){const r=`${l}${this.options.contextSeparator}${i.context}`;s.push(r),u&&(s.push(r+e),i.ordinal&&0===e.indexOf(n)&&s.push(r+e.replace(n,this.options.pluralSeparator)),d&&s.push(r+t))}}let a;for(;a=s.pop();)this.isValidLookup(t)||(n=a,t=this.getResource(r,e,a,i))})))}))})),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&"string"!=typeof e.replace;let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}function b(e){return e.charAt(0).toUpperCase()+e.slice(1)}class S{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=n.create("languageUtils")}getScriptPartFromCode(e){if(!(e=m(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=m(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map((e=>e.toLowerCase())):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=b(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=b(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=b(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find((e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:0===e.indexOf(r)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((e=>{n.indexOf(e)<0&&o(this.formatLanguageCode(e))})),n}}let E=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const k=["v1","v2","v3"],O=["v4"],x={zero:0,one:1,two:2,few:3,many:4,other:5};class P{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=n.create("pluralResolver"),this.options.compatibilityJSON&&!O.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return E.forEach((t=>{t.lngs.forEach((r=>{e[r]={numbers:t.nr,plurals:R[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(m(e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(((e,t)=>x[e]-x[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):r.numbers.map((r=>this.getSuffix(e,r,t))):[]}getSuffix(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const o=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!k.includes(this.options.compatibilityJSON)}}function $(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=function(e,t,r){const n=c(e,r);return void 0!==n?n:c(t,r)}(e,t,r);return!s&&o&&"string"==typeof r&&(s=g(e,r,n),void 0===s&&(s=g(t,r,n))),s}class T{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=n.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:h,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?d(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?d(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?d(t.nestingPrefix):t.nestingPrefixEscaped||d("$t("),this.nestingSuffix=t.nestingSuffix?d(t.nestingSuffix):t.nestingSuffixEscaped||d(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(e,t,r,n){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=$(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),s=o.shift().trim(),i=o.join(this.formatSeparator).trim();return this.format($(t,l,s,this.options.keySeparator,this.options.ignoreJSONStructure),i,r,{...n,...t,interpolationkey:s})};this.resetRegExp();const d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const r=o[1].trim();if(s=u(r),void 0===s)if("function"==typeof d){const t=d(e,o,n);s="string"==typeof t?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))s="";else{if(p){s=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),s=""}else"string"==typeof s||this.useRawValueToEscape||(s=i(s));const l=t.safeValue(s);if(e=e.replace(o[0],l),p?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let r,n,o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;const n=e.split(new RegExp(`${r}[ ]*{`));let s=`{${n[1]}`;e=n[0],s=this.interpolate(s,o);const i=s.match(/'/g),a=s.match(/"/g);(i&&i.length%2==0&&!a||a.length%2!=0)&&(s=s.replace(/'/g,'"'));try{o=JSON.parse(s),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${s}`}return delete o.defaultValue,e}for(;r=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map((e=>e.trim()));r[1]=e.shift(),l=e,c=!0}if(n=t(a.call(this,r[1].trim(),o),o),n&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=i(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),c&&(n=l.reduce(((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:r[1].trim()})),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}function I(e){const t={};return function(r,n,o){const s=n+JSON.stringify(o);let i=t[s];return i||(i=e(m(n),o),t[s]=i),i(r)}}class D{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=n.create("formatter"),this.options=e,this.formats={number:I(((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)})),currency:I(((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)})),datetime:I(((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)})),relativetime:I(((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")})),list:I(((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=I(t)}format(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:o,formatOptions:s}=function(e){let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);"currency"===t&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach((e=>{if(!e)return;const[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,"");r[t.trim()]||(r[t.trim()]=o),"false"===o&&(r[t.trim()]=!1),"true"===o&&(r[t.trim()]=!0),isNaN(o)||(r[t.trim()]=parseInt(o,10))}))}return{formatName:t,formatOptions:r}}(t);if(this.formats[o]){let t=e;try{const i=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=i.locale||i.lng||n.locale||n.lng||r;t=this.formats[o](e,a,{...s,...n,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class M extends o{constructor(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=n.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(e,t,r,n){const o={},s={},i={},a={};return e.forEach((e=>{let n=!0;t.forEach((t=>{const i=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===s[i]&&(s[i]=!0):(this.state[i]=1,n=!1,void 0===s[i]&&(s[i]=!0),void 0===o[i]&&(o[i]=!0),void 0===a[t]&&(a[t]=!0)))})),n||(i[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(a)}}loaded(e,t,r){const n=e.split("|"),o=n[0],s=n[1];t&&this.emit("failedLoading",o,s,t),r&&this.store.addResourceBundle(o,s,r),this.state[e]=t?-1:2;const i={};this.queue.forEach((r=>{!function(e,t,r,n){const{obj:o,k:s}=a(e,t,Object);o[s]=o[s]||[],o[s].push(r)}(r.loaded,[o],s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((e=>{i[e]||(i[e]={});const t=r.loaded[e];t.length&&t.forEach((t=>{void 0===i[e][t]&&(i[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",i),this.queue=this.queue.filter((e=>!e.done))}read(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:s});this.readingCalls++;const i=(i,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&a&&n<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,r,n+1,2*o,s)}),o):s(i,a)},a=this.backend[r].bind(this.backend);if(2!==a.length)return a(e,t,i);try{const r=a(e,t);r&&"function"==typeof r.then?r.then((e=>i(null,e))).catch(i):i(null,r)}catch(e){i(e)}}prepareLoading(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,((r,s)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&s&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,s),this.loaded(e,r,s)}))}saveMissing(e,t,r,n,o){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=r&&""!==r){if(this.backend&&this.backend.create){const a={...s,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,r,n,a):l(e,t,r,n),o&&"function"==typeof o.then?o.then((e=>i(null,e))).catch(i):i(null,o)}catch(e){i(e)}else l(e,t,r,n,i,a)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}function C(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach((e=>{t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:(e,t,r,n)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function A(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function N(){}class L extends o{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var r;if(super(),this.options=A(e),this.services={},this.logger=n,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const o=C();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...o,...this.options,...A(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?n.init(i(this.modules.logger),this.options):n.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=D);const r=new S(this.options);this.store=new y(this.options.resources,this.options);const s=this.services;s.logger=n,s.resourceStore=this.store,s.languageUtils=r,s.pluralResolver=new P(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(s.formatter=i(t),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new T(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new M(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit(t,...n)})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new _(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit(t,...n)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,r||(r=N),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const a=s(),l=()=>{const e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),r(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N;const r="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],n=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};r?n(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>n(e))),this.options.preload&&this.options.preload.forEach((e=>n(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,r){const n=s();return e||(e=this.languages),t||(t=this.options.ns),r||(r=N),this.services.backendConnector.reload(e,t,(e=>{n.resolve(),r(e)})),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&v.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const n=s();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,s)=>{s?(o(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,n.resolve((function(){return r.t(...arguments)})),t&&t(e,(function(){return r.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const r="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||o(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,(e=>{i(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}getFixedT(e,t,r){var n=this;const o=function(e,t){let s;if("object"!=typeof t){for(var i=arguments.length,a=new Array(i>2?i-2:0),l=2;l<i;l++)a[l-2]=arguments[l];s=n.options.overloadTranslationOptionHandler([e,t].concat(a))}else s={...t};s.lng=s.lng||o.lng,s.lngs=s.lngs||o.lngs,s.ns=s.ns||o.ns,s.keyPrefix=s.keyPrefix||r||o.keyPrefix;const c=n.options.keySeparator||".";let u;return u=s.keyPrefix&&Array.isArray(e)?e.map((e=>`${s.keyPrefix}${c}${e}`)):s.keyPrefix?`${s.keyPrefix}${c}${e}`:e,n.t(u,s)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const s=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||2===r};if(t.precheck){const e=t.precheck(this,s);if(void 0!==e)return e}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!s(r,e)||n&&!s(o,e)))}loadNamespaces(e,t){const r=s();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=s();"string"==typeof e&&(e=[e]);const n=this.options.preload||[],o=e.filter((e=>n.indexOf(e)<0));return o.length?(this.options.preload=n.concat(o),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new S(C());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new L(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},o=new L(n);return void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new y(this.store.data,n),o.services.resourceStore=o.store),o.translator=new _(o.services,n),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit(e,...r)})),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const j=L.createInstance();j.createInstance=L.createInstance,e.exports=j},1547:(e,t,r)=>{try{var n=r(3837);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(9509)}},9509:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6178:e=>{"use strict";e.exports=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)}},9730:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,o,s,i,a,l,c,u,d){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var p in n(s,i,a,l,c,u,d),s){var h=s[p];if(Array.isArray(h)){if(p in t.arrayKeywords)for(var f=0;f<h.length;f++)r(e,n,o,h[f],i+"/"+p+"/"+f,a,i,p,s,f)}else if(p in t.propsKeywords){if(h&&"object"==typeof h)for(var g in h)r(e,n,o,h[g],i+"/"+p+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),a,i,p,s,g)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,o,h,i+"/"+p,a,i,p,s)}o(s,i,a,l,c,u,d)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},8812:(e,t,r)=>{"use strict";var n=r(7147),o=r(1576).StringDecoder;function s(e,t,r){var s;if(t instanceof Function&&(r=t,t=void 0),"function"==typeof e.read)s=e;else{if(!("string"==typeof e||e instanceof String))return void r(new Error("Invalid file argument for LineReader.open. Must be filename or stream."));s=n.createReadStream(e)}s.pause(),function(e,t,r){t instanceof Function&&(r=t,t=void 0),t||(t={});var n,s,i,a=t.encoding||"utf8",l=t.separator||/\r\n?|\n/,c=t.bufferSize||1024,u="",d=new o(a),p=!1,h=!1,f=-1,g=!1;function m(){return e}function y(t){p||(p=!0,"function"==typeof e.close&&e.close(),setImmediate(t))}function v(e){y((function(t){return r(e||t)}))}function w(){return!p}function _(){return p}function b(){s&&(s(),s=null)}function S(t){!function(e){g?e():s=e}((function(){var r;try{r=e.read(c)}catch(e){t(e)}r?u+=d.write(r.slice(0,r.length)):g=!1,t()}))}function E(){return i(),f<0&&!h}function R(e,t,r){e()?t((function(n){n?r(n):setImmediate(R,e,t,r)})):r()}function k(e){R(E,S,e)}function O(){return u.length>0||!h}function x(e){if(p)return e(new Error("LineReader has been closed"));function t(t){if(t)return e(t);f<0&&h&&(f=u.length);var r=u.substring(0,f);u=u.substring(f+n),f=-1,e(void 0,r)}if(i(),f<0)if(h){if(!O())return e(new Error("No more lines to read."));f=u.length,t()}else k(t);else t()}l instanceof RegExp?i=function(){var e=l.exec(u);e&&(e.index+e[0].length<u.length||h)?(f=e.index,n=e[0].length):(f=-1,n=0)}:(n=l.length,i=function(){f=u.indexOf(l)}),e.on("readable",(function(){g=!0,b()})),e.on("end",(function(){h=!0,b()})),e.on("error",v),k((function(e){if(!e)return r(void 0,{hasNextLine:O,nextLine:x,close:y,isOpen:w,isClosed:_,getReadStream:m});v(e)}))}(s,t,r)}e.exports.open=s,e.exports.eachLine=function(e,t,r,n){t instanceof Function&&(n=r,r=t,t=void 0);var o,i,a=3===r.length;return s(e,t,(function(e,t){function s(e){t.close((function(t){n&&n(e||t)}))}function l(){t.hasNextLine()?setImmediate(u):s()}function c(e){!1!==e?l():s()}function u(){t.nextLine((function(e,n){e&&s(e);var o=!t.hasNextLine();a?r(n,o,c):!1!==r(n,o)?l():s()}))}o=t,i&&i(t),e?n&&n(e):l()})),{getReader:function(e){o?e(o):i=e}}}},7323:(e,t,r)=>{var n=r(1243).Symbol;e.exports=n},8085:(e,t,r)=>{var n=r(7323),o=r(465),s=r(7659),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):s(e)}},7974:(e,t,r)=>{var n=r(4253),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},8615:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},465:(e,t,r)=>{var n=r(7323),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[a]=r:delete e[a]),o}},7659:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},1243:(e,t,r)=>{var n=r(8615),o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")();e.exports=s},4253:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},469:(e,t,r)=>{var n=r(7121),o=r(3221),s=r(7934),i=Math.max,a=Math.min;e.exports=function(e,t,r){var l,c,u,d,p,h,f=0,g=!1,m=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=l,n=c;return l=c=void 0,f=t,d=e.apply(n,r)}function w(e){var r=e-h;return void 0===h||r>=t||r<0||m&&e-f>=u}function _(){var e=o();if(w(e))return b(e);p=setTimeout(_,function(e){var r=t-(e-h);return m?a(r,u-(e-f)):r}(e))}function b(e){return p=void 0,y&&l?v(e):(l=c=void 0,d)}function S(){var e=o(),r=w(e);if(l=arguments,c=this,h=e,r){if(void 0===p)return function(e){return f=e,p=setTimeout(_,t),g?v(e):d}(h);if(m)return clearTimeout(p),p=setTimeout(_,t),v(h)}return void 0===p&&(p=setTimeout(_,t)),d}return t=s(t)||0,n(r)&&(g=!!r.leading,u=(m="maxWait"in r)?i(s(r.maxWait)||0,t):u,y="trailing"in r?!!r.trailing:y),S.cancel=function(){void 0!==p&&clearTimeout(p),f=0,l=h=c=p=void 0},S.flush=function(){return void 0===p?d:b(o())},S}},7121:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},9669:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},5182:(e,t,r)=>{var n=r(8085),o=r(9669);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},3221:(e,t,r)=>{var n=r(1243);e.exports=function(){return n.Date.now()}},7934:(e,t,r)=>{var n=r(7974),o=r(7121),s=r(5182),i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):i.test(e)?NaN:+e}},356:(e,t,r)=>{"use strict";const n=r(7966);e.exports=n((e=>(e.message=`\t${e.message}`,e)))},6823:(e,t,r)=>{"use strict";const{Colorizer:n}=r(1267),{Padder:o}=r(1926),{configs:s,MESSAGE:i}=r(1520);class a{constructor(e={}){e.levels||(e.levels=s.cli.levels),this.colorizer=new n(e),this.padder=new o(e),this.options=e}transform(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[i]=`${e.level}:${e.message}`,e}}e.exports=e=>new a(e),e.exports.Format=a},1267:(e,t,r)=>{"use strict";const n=r(3923),{LEVEL:o,MESSAGE:s}=r(1520);n.enabled=!0;const i=/\s+/;class a{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){const t=Object.keys(e).reduce(((t,r)=>(t[r]=i.test(e[r])?e[r].split(i):e[r],t)),{});return a.allColors=Object.assign({},a.allColors||{},t),a.allColors}addColors(e){return a.addColors(e)}colorize(e,t,r){if(void 0===r&&(r=t),!Array.isArray(a.allColors[e]))return n[a.allColors[e]](r);for(let t=0,o=a.allColors[e].length;t<o;t++)r=n[a.allColors[e][t]](r);return r}transform(e,t){return t.all&&"string"==typeof e[s]&&(e[s]=this.colorize(e[o],e.level,e[s])),(t.level||t.all||!t.message)&&(e.level=this.colorize(e[o],e.level)),(t.all||t.message)&&(e.message=this.colorize(e[o],e.level,e.message)),e}}e.exports=e=>new a(e),e.exports.Colorizer=e.exports.Format=a},2074:(e,t,r)=>{"use strict";const n=r(7966);function o(e){if(e.every(s))return t=>{let r=t;for(let t=0;t<e.length;t++)if(r=e[t].transform(r,e[t].options),!r)return!1;return r}}function s(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}e.exports=(...e)=>{const t=n(o(e)),r=t();return r.Format=t.Format,r},e.exports.cascade=o},9094:(e,t,r)=>{"use strict";const n=r(7966),{LEVEL:o,MESSAGE:s}=r(1520);e.exports=n(((e,{stack:t,cause:r})=>{if(e instanceof Error){const n=Object.assign({},e,{level:e.level,[o]:e[o]||e.level,message:e.message,[s]:e[s]||e.message});return t&&(n.stack=e.stack),r&&(n.cause=e.cause),n}if(!(e.message instanceof Error))return e;const n=e.message;return Object.assign(e,n),e.message=n.message,e[s]=n.message,t&&(e.stack=n.stack),r&&(e.cause=n.cause),e}))},7966:e=>{"use strict";class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${e.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,t)}}e.exports=e=>{if(e.length>2)throw new t(e);function r(e={}){this.options=e}function n(e){return new r(e)}return r.prototype.transform=e,n.Format=r,n}},3545:(e,t,r)=>{"use strict";const n=t.format=r(7966);function o(e,t){Object.defineProperty(n,e,{get:()=>t(),configurable:!0})}t.levels=r(3965),o("align",(function(){return r(356)})),o("errors",(function(){return r(9094)})),o("cli",(function(){return r(6823)})),o("combine",(function(){return r(2074)})),o("colorize",(function(){return r(1267)})),o("json",(function(){return r(1528)})),o("label",(function(){return r(171)})),o("logstash",(function(){return r(6282)})),o("metadata",(function(){return r(461)})),o("ms",(function(){return r(6435)})),o("padLevels",(function(){return r(1926)})),o("prettyPrint",(function(){return r(948)})),o("printf",(function(){return r(7712)})),o("simple",(function(){return r(3117)})),o("splat",(function(){return r(547)})),o("timestamp",(function(){return r(8890)})),o("uncolorize",(function(){return r(8937)}))},1528:(e,t,r)=>{"use strict";const n=r(7966),{MESSAGE:o}=r(1520),s=r(1841);function i(e,t){return"bigint"==typeof t?t.toString():t}e.exports=n(((e,t)=>{const r=s.configure(t);return e[o]=r(e,t.replacer||i,t.space),e}))},171:(e,t,r)=>{"use strict";const n=r(7966);e.exports=n(((e,t)=>t.message?(e.message=`[${t.label}] ${e.message}`,e):(e.label=t.label,e)))},3965:(e,t,r)=>{"use strict";const{Colorizer:n}=r(1267);e.exports=e=>(n.addColors(e.colors||e),e)},6282:(e,t,r)=>{"use strict";const n=r(7966),{MESSAGE:o}=r(1520),s=r(1841);e.exports=n((e=>{const t={};return e.message&&(t["@message"]=e.message,delete e.message),e.timestamp&&(t["@timestamp"]=e.timestamp,delete e.timestamp),t["@fields"]=e,e[o]=s(t),e}))},461:(e,t,r)=>{"use strict";const n=r(7966);e.exports=n(((e,t={})=>{let r="metadata";t.key&&(r=t.key);let n=[];return t.fillExcept||t.fillWith||(n.push("level"),n.push("message")),t.fillExcept&&(n=t.fillExcept),n.length>0?function(e,t,r){const n=t.reduce(((t,r)=>(t[r]=e[r],delete e[r],t)),{}),o=Object.keys(e).reduce(((t,r)=>(t[r]=e[r],delete e[r],t)),{});return Object.assign(e,n,{[r]:o}),e}(e,n,r):t.fillWith?function(e,t,r){return e[r]=t.reduce(((t,r)=>(t[r]=e[r],delete e[r],t)),{}),e}(e,t.fillWith,r):e}))},6435:function(e,t,r){"use strict";const n=r(7966),o=r(1773);e.exports=n((e=>{const t=+new Date;return this.diff=t-(this.prevTime||t),this.prevTime=t,e.ms=`+${o(this.diff)}`,e}))},1926:(e,t,r)=>{"use strict";const{configs:n,LEVEL:o,MESSAGE:s}=r(1520);class i{constructor(e={levels:n.npm.levels}){this.paddings=i.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){const t=Object.keys(e).map((e=>e.length));return Math.max(...t)}static paddingForLevel(e,t,r){const n=r+1-e.length,o=Math.floor(n/t.length);return`${t}${t.repeat(o)}`.slice(0,n)}static paddingForLevels(e,t=" "){const r=i.getLongestLevel(e);return Object.keys(e).reduce(((e,n)=>(e[n]=i.paddingForLevel(n,t,r),e)),{})}transform(e,t){return e.message=`${this.paddings[e[o]]}${e.message}`,e[s]&&(e[s]=`${this.paddings[e[o]]}${e[s]}`),e}}e.exports=e=>new i(e),e.exports.Padder=e.exports.Format=i},948:(e,t,r)=>{"use strict";const n=r(3837).inspect,o=r(7966),{LEVEL:s,MESSAGE:i,SPLAT:a}=r(1520);e.exports=o(((e,t={})=>{const r=Object.assign({},e);return delete r[s],delete r[i],delete r[a],e[i]=n(r,!1,t.depth||null,t.colorize),e}))},7712:(e,t,r)=>{"use strict";const{MESSAGE:n}=r(1520);class o{constructor(e){this.template=e}transform(e){return e[n]=this.template(e),e}}e.exports=e=>new o(e),e.exports.Printf=e.exports.Format=o},3117:(e,t,r)=>{"use strict";const n=r(7966),{MESSAGE:o}=r(1520),s=r(1841);e.exports=n((e=>{const t=s(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return e[o]="{}"!==t?`${e.level}:${r} ${e.message} ${t}`:`${e.level}:${r} ${e.message}`,e}))},547:(e,t,r)=>{"use strict";const n=r(3837),{SPLAT:o}=r(1520),s=/%[scdjifoO%]/g,i=/%%/g;class a{constructor(e){this.options=e}_splat(e,t){const r=e.message,s=e[o]||e.splat||[],a=r.match(i),l=a&&a.length||0,c=t.length-l-s.length,u=c<0?s.splice(c,-1*c):[],d=u.length;if(d)for(let t=0;t<d;t++)Object.assign(e,u[t]);return e.message=n.format(r,...s),e}transform(e){const t=e.message,r=e[o]||e.splat;if(!r||!r.length)return e;const n=t&&t.match&&t.match(s);if(!n&&(r||r.length)){const t=r.length>1?r.splice(0):r,n=t.length;if(n)for(let r=0;r<n;r++)Object.assign(e,t[r]);return e}return n?this._splat(e,n):e}}e.exports=e=>new a(e)},8890:(e,t,r)=>{"use strict";const n=r(6387),o=r(7966);e.exports=o(((e,t={})=>(t.format&&(e.timestamp="function"==typeof t.format?t.format():n.format(new Date,t.format)),e.timestamp||(e.timestamp=(new Date).toISOString()),t.alias&&(e[t.alias]=e.timestamp),e)))},8937:(e,t,r)=>{"use strict";const n=r(3923),o=r(7966),{MESSAGE:s}=r(1520);e.exports=o(((e,t)=>(!1!==t.level&&(e.level=n.strip(e.level)),!1!==t.message&&(e.message=n.strip(String(e.message))),!1!==t.raw&&e[s]&&(e[s]=n.strip(String(e[s]))),e)))},1492:e=>{"use strict";const t=(e,t,n,o)=>{if("length"===n||"prototype"===n)return;if("arguments"===n||"caller"===n)return;const s=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!r(s,i)&&o||Object.defineProperty(e,n,i)},r=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},n=(e,t)=>`/* Wrapped ${e}*/\n${t}`,o=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),s=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");e.exports=(e,r,{ignoreNonConfigurable:i=!1}={})=>{const{name:a}=e;for(const n of Reflect.ownKeys(r))t(e,r,n,i);return((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,r),((e,t,r)=>{const i=""===r?"":`with ${r.trim()}() `,a=n.bind(null,i,t.toString());Object.defineProperty(a,"name",s),Object.defineProperty(e,"toString",{...o,value:a})})(e,r,a),e}},706:(e,t,r)=>{const n=r(8520),o=r(8535),{mkdirpNative:s,mkdirpNativeSync:i}=r(624),{mkdirpManual:a,mkdirpManualSync:l}=r(8964),{useNative:c,useNativeSync:u}=r(219),d=(e,t)=>(e=o(e),t=n(t),c(t)?s(e,t):a(e,t));d.sync=(e,t)=>(e=o(e),t=n(t),u(t)?i(e,t):l(e,t)),d.native=(e,t)=>s(o(e),n(t)),d.manual=(e,t)=>a(o(e),n(t)),d.nativeSync=(e,t)=>i(o(e),n(t)),d.manualSync=(e,t)=>l(o(e),n(t)),e.exports=d},9618:(e,t,r)=>{const{dirname:n}=r(1017),o=(e,t,r=void 0)=>r===t?Promise.resolve():e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>"ENOENT"===r.code?o(e,n(t),t):void 0)),s=(e,t,r=void 0)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(r){return"ENOENT"===r.code?s(e,n(t),t):void 0}};e.exports={findMade:o,findMadeSync:s}},8964:(e,t,r)=>{const{dirname:n}=r(1017),o=(e,t,r)=>{t.recursive=!1;const s=n(e);return s===e?t.mkdirAsync(e,t).catch((e=>{if("EISDIR"!==e.code)throw e})):t.mkdirAsync(e,t).then((()=>r||e),(n=>{if("ENOENT"===n.code)return o(s,t).then((r=>o(e,t,r)));if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;return t.statAsync(e).then((e=>{if(e.isDirectory())return r;throw n}),(()=>{throw n}))}))},s=(e,t,r)=>{const o=n(e);if(t.recursive=!1,o===e)try{return t.mkdirSync(e,t)}catch(e){if("EISDIR"!==e.code)throw e;return}try{return t.mkdirSync(e,t),r||e}catch(n){if("ENOENT"===n.code)return s(e,t,s(o,t,r));if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(!t.statSync(e).isDirectory())throw n}catch(e){throw n}}};e.exports={mkdirpManual:o,mkdirpManualSync:s}},624:(e,t,r)=>{const{dirname:n}=r(1017),{findMade:o,findMadeSync:s}=r(9618),{mkdirpManual:i,mkdirpManualSync:a}=r(8964);e.exports={mkdirpNative:(e,t)=>(t.recursive=!0,n(e)===e?t.mkdirAsync(e,t):o(t,e).then((r=>t.mkdirAsync(e,t).then((()=>r)).catch((r=>{if("ENOENT"===r.code)return i(e,t);throw r}))))),mkdirpNativeSync:(e,t)=>{if(t.recursive=!0,n(e)===e)return t.mkdirSync(e,t);const r=s(t,e);try{return t.mkdirSync(e,t),r}catch(r){if("ENOENT"===r.code)return a(e,t);throw r}}}},8520:(e,t,r)=>{const{promisify:n}=r(3837),o=r(7147);e.exports=e=>{if(e)if("object"==typeof e)e={mode:511,fs:o,...e};else if("number"==typeof e)e={mode:e,fs:o};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8),fs:o}}else e={mode:511,fs:o};return e.mkdir=e.mkdir||e.fs.mkdir||o.mkdir,e.mkdirAsync=n(e.mkdir),e.stat=e.stat||e.fs.stat||o.stat,e.statAsync=n(e.stat),e.statSync=e.statSync||e.fs.statSync||o.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||o.mkdirSync,e}},8535:(e,t,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:o,parse:s}=r(1017);e.exports=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=o(e),"win32"===n){const t=/[*|"<>?:]/,{root:r}=s(e);if(t.test(e.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e}},219:(e,t,r)=>{const n=r(7147),o=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),s=+o[0]>10||10==+o[0]&&+o[1]>=12,i=s?e=>e.mkdir===n.mkdir:()=>!1,a=s?e=>e.mkdirSync===n.mkdirSync:()=>!1;e.exports={useNative:i,useNativeSync:a}},1773:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var l,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var a=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===u&&isFinite(e))return a.long?(l=e,(c=Math.abs(l))>=o?i(l,c,o,"day"):c>=n?i(l,c,n,"hour"):c>=r?i(l,c,r,"minute"):c>=t?i(l,c,t,"second"):l+" ms"):function(e){var s=Math.abs(e);return s>=o?Math.round(e/o)+"d":s>=n?Math.round(e/n)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},241:(e,t,r)=>{e.exports=r(5662)(__dirname)},9311:(e,t,r)=>{"use strict";t.Client=r(1625),t.Server=r(8601),t.default=t},1625:(e,t,r)=>{"use strict";const n=r(1808),o=r(4404),s=r(2361),i=r(4149),{Options:a,Events:l,ConnectionEvents:c,MessageTypes:u,ErrorMessages:d,ClientStatus:p}=r(1837);class h extends s{constructor(e={}){if(super(),this.connection=null,this.id=null,this.status=p.IDLE,this.options={path:e.path,host:e.host,port:e.port,options:e.options||{},tls:Boolean(e.tls),handshake:Boolean(e.handshake),compress:Boolean(e.compress),messagepack:Boolean(e.messagepack),reconnect:void 0===e.reconnect||Boolean(e.reconnect),retries:Number(e.retries)>0?Number(e.retries):a.DEFAULT_RETRIES,maxRetryTime:Number(e.maxRetryTime)>=a.RETRY_INCREMENT?Number(e.maxRetryTime):a.DEFAULT_MAXRETRYTIME},this._error=null,this._end=null,this._promise=null,this._retries=0,this._payload=null,"object"!=typeof this.options.options)throw new Error(d.BAD_OPTIONS);if(this.options.path||this.options.host||(this.options.path=a.DEFAULT_PATH),this.options.host&&!this.options.port&&(this.options.port=a.DEFAULT_PORT),this.options.host&&"string"!=typeof this.options.host)throw new Error(d.BAD_URL);if(this.options.path&&"string"!=typeof this.options.path)throw new Error(d.BAD_PATH);this.options.path&&"win32"===process.platform&&(this.options.path=`\\\\.\\pipe\\${this.options.path.replace(/^\//,"").replace(/\//g,"-")}`)}connect(e){return new Promise(((t,r)=>{if(this.status!==p.IDLE)return void r(d.NOT_IDLE);this._closed&&(this._closed=!1),this._promise={resolve:t,reject:r},this._payload=e,this._setStatus(p.CONNECTING);const s=Object.assign({},this.options.options);this.options.host?(s.host=s.servername=this.options.host,s.port=this.options.port):s.path=this.options.path,this.options.tls?this.connection=o.connect(s):this.connection=n.connect(s),this.connection.setKeepAlive(!0),this.connection.on(c.ERROR,this._onerror.bind(this)),this.connection.on(c.CLOSE,this._onclose.bind(this)),this.connection.once(c.READY,this._ready.bind(this))}))}_onerror(e){this._error=e,this._events[l.ERROR]&&this.emit(l.ERROR,e)}_onclose(){this._setStatus(p.DISCONNECTED),this.connection.removeAllListeners(),this.connection.destroy(),this.connection=null;const e=this._error,t=this._end,r=this._promise;this._error=null,this._end=null,this._promise=null,this.options.reconnect&&!this._closed?(this._setStatus(p.RECONNECTING),setTimeout((()=>{this._setStatus(p.IDLE),this._retries>this.options.retries?r?(this._retries=0,r.reject(e||d.UNKNOWN_ERROR)):this.emit(l.CLOSE,t||e):r?r.resolve(this.connect(this._payload)):this.connect(this._payload).catch((e=>{this.emit(l.CLOSE,e)}))}),Math.min(a.RETRY_INCREMENT*++this._retries,this.options.maxRetryTime))):(this._setStatus(p.IDLE),this._retries=0,this.emit(l.CLOSE,t||e))}_ready(){if(this._setStatus(p.CONNECTED),this.options.handshake){const e=this.connection,t=this.options.host||"net-ipc",r=Buffer.from(`GET / HTTP/1.1\r\nHost: ${t}\r\nConnection: Upgrade\r\nUpgrade: net-ipc\r\n\r\n`);e.on(c.DATA,(()=>{const t=e.read(32);if(t)if("HTTP/1.1 101 Switching Protocols"===t.toString()){const t=Buffer.from("\r\n\r\n");let r=e._readableState.buffer.head,n=Buffer.allocUnsafe(0);do{n=Buffer.concat([n,r.data]);const o=n.indexOf(t);if(o>-1){if(!e.read(o+4))continue;return this.connection.removeAllListeners(c.DATA),void this._init()}}while(r=r.next)}else{const e=t.toString();this._error=e.slice(0,e.indexOf("\r\n")),this.connection.destroy()}})),e.write(r)}else this.connection.write(Buffer.from("IPC")),this._init()}_init(){this.connection.on(c.DATA,this._read.bind(this)),this.connection.on(c.DRAIN,this._drain.bind(this)),this.connection.once(c.DONE,(e=>{this.id=e.id,this.options.compress&&!e.compress&&(this.options.compress=!1,console.warn(d.ZLIB_MISSING)),this.options.messagepack&&!e.messagepack&&(this.options.messagepack=!1,console.warn(d.MSGPACK_MISSING)),this._setStatus(p.READY),this._promise.resolve(this),this._promise=null,this._retries=0,this.emit(l.READY,e)}));const e={compress:this.options.compress&&Boolean(this._zlib),messagepack:this.options.messagepack&&Boolean(this._msgpack),extras:this._payload,id:this.id};this._write(u.CONNECTION,e).catch((e=>{this._error=e,this.connection.destroy()}))}_setStatus(e){this.status=e,this.emit(l.STATUS,e)}_parse(e){switch(e.t){case u.CONNECTION:e.d.compress&&(this.connection.zlib={deflate:new this._zlib.DeflateRaw,inflate:new this._zlib.InflateRaw}),e.d.messagepack&&(this.connection.msgpack=this._msgpack),this.connection.emit(c.DONE,e.d);break;case u.MESSAGE:this.emit(l.MESSAGE,e.d);break;case u.REQUEST:this._events[l.REQUEST]?this.emit(l.REQUEST,e.d,(t=>this._tryWrite(u.RESPONSE,t,e.n))):this._tryWrite(u.RESPONSE,void 0,e.n).catch((e=>this.connection.emit(c.ERROR,e)));break;case u.RESPONSE:{const t=this._requests[e.n];t&&(t.timer&&clearTimeout(t.timer),t.resolve(e.d),delete this._requests[e.n]);break}case u.PING:this._tryWrite(u.PONG,e.d,e.n).catch((e=>this.connection.emit(c.ERROR,e)));break;case u.PONG:{const t=this._requests[e.n];t&&(t.timer&&clearTimeout(t.timer),t.resolve(Date.now()-t.date),delete this._requests[e.n]);break}case u.END:e.d&&(this._end=e.d.m,this._closed=!e.d.a)}}async _tryWrite(e,t,r,n=0){if(this._closed)throw new Error(d.CONNECTION_CLOSED);try{if(this.status!==p.READY)throw new Error(d.NOT_READY);return await this._write(e,t,r)}catch(o){if(this.options.reconnect&&this.options.retries>n){const o=n+1;return await new Promise((e=>{setTimeout(e,Math.min(a.RETRY_INCREMENT*o,this.options.maxRetryTime))})),this._tryWrite(e,t,r,o)}return new Error(o)}}}for(const[e,t]of Object.entries(i))h.prototype[e]=t;e.exports=h},7345:(e,t,r)=>{"use strict";const{Events:n,ConnectionEvents:o,MessageTypes:s,ErrorMessages:i,Options:a}=r(1837),l=r(4149);class c{constructor(e,t){this.server=t,this.connection=e,this.connection.on(o.ERROR,this._onerror.bind(this)),this.connection.on(o.CLOSE,this._onclose.bind(this)),this.connection.on(o.DATA,this._init.bind(this)),this.connection.on(o.DRAIN,this._drain.bind(this)),this._error=null,this._end=null,this._retries=this.server.options.retries,this._closed=!1}pause(){this.connection.pause()}resume(){this.connection.resume()}_init(){const e=this.connection,t=e.read(3);if(!t)return;const r=t.toString();if("GET"===r){const t=Buffer.from("\r\n\r\n");let r=e._readableState.buffer.head,n=Buffer.allocUnsafe(0);do{n=Buffer.concat([n,r.data]);const s=n.indexOf(t);if(s>-1){const t=e.read(s+4);if(!t)continue;const r=t.toString();if(r.includes("Connection: Upgrade")&&r.includes("Upgrade: net-ipc"))return e.write("HTTP/1.1 101 Switching Protocols\r\nConnection: Upgrade\r\nUpgrade: net-ipc\r\n\r\n"),e._events[o.DATA]=this._read.bind(this),void this._read();e.end("HTTP/1.1 418 I'm a Teapot")}}while(r=r.next)}else"IPC"===r?(e._events[o.DATA]=this._read.bind(this),this._read()):e.end("HTTP/1.1 418 I'm a Teapot")}_onerror(e){this._error=e,this.server._events[n.ERROR]&&this.server.emit(n.ERROR,e,this),this.server.connections.find((e=>e.id===this.id))||this.close(i.ORPHAN_CONNECTION)}_onclose(){this.connection.removeAllListeners(),this.connection.destroy(),this.connection=null;const e=this.server.connections,t=e.findIndex((e=>e.id===this.id));t>-1&&(this.server.emit(n.DISCONNECT,this,this._end||this._error),e[t]=e[e.length-1],e.pop())}_parse(e){if(this.connectedAt||e.t===s.CONNECTION)switch(e.t){case s.CONNECTION:{e.d.id&&(this.id=e.d.id);const t={id:this.id,compress:e.d.compress&&Boolean(this._zlib),messagepack:e.d.messagepack&&Boolean(this._msgpack)};this._write(s.CONNECTION,t,e.n).catch((e=>{this.connection.emit(o.ERROR,e),this.connection.destroy(e)})),t.compress&&(this.connection.zlib={deflate:new this._zlib.DeflateRaw,inflate:new this._zlib.InflateRaw}),t.messagepack&&(this.connection.msgpack=this._msgpack),this.connection.emit(o.READY,e.d.extras);break}case s.MESSAGE:this.server.emit(n.MESSAGE,e.d,this);break;case s.REQUEST:this.server._events[n.REQUEST]?this.server.emit(n.REQUEST,e.d,(t=>this._tryWrite(s.RESPONSE,t,e.n)),this):this._tryWrite(s.RESPONSE,void 0,e.n).catch((e=>this.connection.emit(o.ERROR,e)));break;case s.RESPONSE:{const t=this._requests[e.n];t&&(t.timer&&clearTimeout(t.timer),t.resolve(e.d),delete this._requests[e.n]);break}case s.PING:this._tryWrite(s.PONG,e.d,e.n).catch((e=>this.connection.emit(o.ERROR,e)));break;case s.PONG:{const t=this._requests[e.n];t&&(t.timer&&clearTimeout(t.timer),t.resolve(Date.now()-t.date),delete this._requests[e.n]);break}case s.END:e.d&&(this._end=e.d.m)}else this.connection.emit(o.ERROR,new Error(i.PREMATURE_PACKET))}async _tryWrite(e,t,r,n=0){if(this._closed)throw new Error(i.CONNECTION_CLOSED);try{return await this._write(e,t,r)}catch(o){if(this._retries&&this._retries>n)for(let o=n;o<this._retries;o++){await new Promise((e=>{setTimeout(e,a.RETRY_INCREMENT*(o+1))}));const n=this.server.connections.find((e=>e.id===this.id));if(n)return n._tryWrite(e,t,r,o)}return new Error(o)}}}for(const[e,t]of Object.entries(l))c.prototype[e]=t;e.exports=c},1837:e=>{"use strict";e.exports={MessageTypes:{CONNECTION:0,MESSAGE:1,REQUEST:2,RESPONSE:3,PING:4,PONG:5,END:6},ErrorMessages:{BAD_TIMEOUT:"invalid timeout",TIMEOUT:"request timed out",PREMATURE_PACKET:"ignored data packet received before connection finished establishing",INVALID_INIT_TAG:"received invalid init tag",BAD_CONNECTIONS:"invalid max number of connections",BAD_PORT:"invalid TCP port",BAD_PATH:"invalid socket path",BAD_URL:"invalid host address",BAD_OPTIONS:"invalid options object",SERVER_EXISTS:"server already exists",EADDRINUSE:"EADDRINUSE: address already in use",ORPHAN_CONNECTION:"closing orphaned connection",UNKNOWN_ERROR:"unknown error",ZLIB_MISSING:"WARNING: compression requires the 'fast-zlib' package to be installed (npm install fast-zlib)",MSGPACK_MISSING:"WARNING: messagepack requires the 'msgpackr' package to be installed (npm install msgpackr)",SERVER_CLOSED:"Server was shut down",CONNECTION_CLOSED:"Failed to send, connection not available",CONNECTION_DESTROYED:"Failed to send, connection was destroyed",NOT_IDLE:"Client not ready to connect",NOT_READY:"Client not ready"},Events:{READY:"ready",ERROR:"error",STATUS:"status",CONNECT:"connect",DISCONNECT:"disconnect",MESSAGE:"message",REQUEST:"request",CLOSE:"close"},ConnectionEvents:{ERROR:"error",CLOSE:"close",DATA:"readable",READY:"ready",DONE:"done",DRAIN:"drain"},ServerEvents:{ERROR:"error",CONNECTION:"connection",SECURECONNECTION:"secureConnection",LISTENING:"listening",CLOSE:"close"},ClientStatus:{IDLE:0,CONNECTING:1,CONNECTED:2,READY:3,DISCONNECTED:4,RECONNECTING:5},Options:{DEFAULT_PATH:"net-ipc",DEFAULT_RETRIES:3,DEFAULT_MAXRETRYTIME:1e4,DEFAULT_TIMEOUT:1e4,DEFAULT_CONNECTIONTIMEOUT:1e4,RETRY_INCREMENT:500,DEFAULT_PORT:4466}}},4149:(e,t,r)=>{"use strict";const{ConnectionEvents:n,MessageTypes:o,ErrorMessages:s,Options:i}=r(1837);let a,l;try{a=r(900)}catch(e){}try{l=r(495)}catch(e){}e.exports={send(e){return this._tryWrite(o.MESSAGE,e)},request(e,t=i.DEFAULT_TIMEOUT){return Number.isInteger(t)?new Promise(((r,n)=>{const i=this._nonce();this._requests[i]={resolve:r,reject:n,timer:t>0?setTimeout((()=>{delete this._requests[i],n(s.TIMEOUT)}),t):null},this._tryWrite(o.REQUEST,e,i).catch((e=>{this._requests[i].timer&&clearTimeout(this._requests[i].timer),delete this._requests[i],n(e)}))})):Promise.reject(s.BAD_TIMEOUT)},ping(e,t=i.DEFAULT_TIMEOUT){return Number.isInteger(t)?new Promise(((r,n)=>{const i=this._nonce();this._requests[i]={resolve:r,reject:n,date:Date.now(),timer:t>0?setTimeout((()=>{delete this._requests[i],n(s.TIMEOUT)}),t):null},this._tryWrite(o.PING,e,i).catch((e=>{this._requests[i].timer&&clearTimeout(this._requests[i].timer),delete this._requests[i],n(e)}))})):Promise.reject(s.BAD_TIMEOUT)},async close(e,t=!1){if(this._closed||!this.connection)return!1;this._closed=!0,await Promise.allSettled(this._drainQueue);const r=this._pack({t:o.END,d:{m:e,a:t}});return await new Promise((e=>{this.connection.end(r,void 0,e)})),!0},destroy(e){if(this._closed||!this.connection)return!1;this._closed=!0;for(let e=0;e<this._drainQueue.length;e++)this._drainQueue.shift().reject(new Error(s.CONNECTION_DESTROYED));return this.connection.destroy(e),!0},_nonce:()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(36)+Date.now().toString(36),_read(){const e=this.connection;for(;e.readableLength>1;){const t=this._untag();if(!t)return;let r=e.read(t[0]+t[1]);if(!r)return;r=r.slice(t[0]);try{e.zlib&&(r=e.zlib.inflate.process(r));const t=e.msgpack?e.msgpack.unpack(r):JSON.parse(r);this._parse(t)}catch(t){e.emit(n.ERROR,t)}}},_write(e,t,r){if(!this.connection||!this.connection.writable)return Promise.reject(new Error(s.CONNECTION_CLOSED));try{const n={t:e,d:t};r&&(n.n=r);const o=this._pack(n);if(this.connection.write(o))return Promise.resolve();let s,i;const a=new Promise(((e,t)=>{s=e,i=t}));return a.resolve=s,a.reject=i,this._drainQueue.push(a),a}catch(e){return this.connection.emit(n.ERROR,e),Promise.reject(e)}},_pack(e){const t=this.connection;let r=t.msgpack?t.msgpack.pack(e):Buffer.from(JSON.stringify(e));t.zlib&&(r=t.zlib.deflate.process(r));const n=this._tag(r.length),o=Buffer.allocUnsafe(r.length+n.length);for(let e=0;e<n.length;e++)o[e]=n[e];return o.set(r,n.length),o},_tag(e){let t=e;const r=[128+(127&t)];for(;t>>=7;)r.push(127&t);return r.reverse()},_untag(){let e=this.connection._readableState.buffer.head,t=0,r=0;do{for(let n=0;n<e.data.length;n++){const o=e.data[n];if(t*=128,r++,o>127)return[r,t+(127&o)];t+=o}}while(e=e.next);return!1},_drain(){for(let e=0;e<this._drainQueue.length;e++)this._drainQueue.shift().resolve()},_drainQueue:[],_requests:{},_zlib:a,_msgpack:l}},8601:(e,t,r)=>{"use strict";const n=r(1808),o=r(4404),{unlinkSync:s,statSync:i}=r(7147),a=r(2361),l=r(7345),{Options:c,Events:u,ConnectionEvents:d,ServerEvents:p,ErrorMessages:h}=r(1837);e.exports=class extends a{constructor(e={}){if(super(),this.options={path:e.path,port:e.port,tls:Boolean(e.tls),options:e.options||{},listener:e.listenOptions||{},max:Number(e.max)>0?Number(e.max):void 0,retries:Number(e.retries)>=0?Number(e.retries):c.DEFAULT_RETRIES,idGen:"function"==typeof e.generateID?e.generateID:null},this.connections=[],this.server=null,this.options.port||this.options.path||(this.options.path=c.DEFAULT_PATH),"object"!=typeof this.options.options)throw new Error(h.BAD_OPTIONS);if(this.options.max&&!Number.isInteger(this.options.max))throw new Error(h.BAD_CONNECTIONS);if(this.options.port&&!Number.isInteger(this.options.port))throw new Error(h.BAD_PORT);if(this.options.path&&"string"!=typeof this.options.path)throw new Error(h.BAD_PATH);this.options.path&&"win32"===process.platform&&(this.options.path=`\\\\.\\pipe\\${this.options.path.replace(/^\//,"").replace(/\//g,"-")}`)}start(){return new Promise(((e,t)=>{if(this.server)t(new Error(h.SERVER_EXISTS));else if(this.options.tls?this.server=o.createServer(this.options.options):this.server=n.createServer(this.options.options),this.server.on(p.ERROR,this._onerror.bind(this)),this.server.on(p.CLOSE,this._onclose.bind(this)),this.server.on(this.options.tls?p.SECURECONNECTION:p.CONNECTION,this._onconnection.bind(this)),this.server.on(p.LISTENING,this._onlistening.bind(this)),this.server.once(p.LISTENING,(()=>e(this))),this.options.max&&(this.server.maxConnections=this.options.max),this.options.path){try{s(this.options.path)}catch(e){}try{return i(this.options.path),this.close(),void t(new Error(`${h.EADDRINUSE} - ${this.options.path}`))}catch(e){}delete this.options.listener.port,this.server.listen({...this.options.listener,path:this.options.path})}else this.options.port&&this.server.listen({...this.options.listener,port:this.options.port})}))}async close(e=!1){return this.server&&(this.server.close(),await Promise.all(this.connections.map((t=>t.close(h.SERVER_CLOSED,e))))),this}async broadcast(e){for(const t of this.connections)await t.send(e).catch((e=>this.emit(u.ERROR,e)))}survey(e,t=c.DEFAULT_TIMEOUT){return Number.isInteger(t)?Promise.allSettled(this.connections.map((r=>r.request(e,t)))):Promise.reject(h.BAD_TIMEOUT)}ping(e,t=c.DEFAULT_TIMEOUT){return Promise.allSettled(this.connections.map((r=>r.ping(e,t))))}pause(){for(const e of this.connections)e.pause()}resume(){for(const e of this.connections)e.resume()}_onlistening(){let e=this.server.address();"object"==typeof e&&(e=`${e.address}:${e.port}`),this.emit(u.READY,e)}_onerror(e){this._events[u.ERROR]&&this.emit(u.ERROR,e)}_onclose(){this.server.removeAllListeners(),this.server=null,this.emit(u.CLOSE)}_onconnection(e){const t=new l(e,this);t.id=this.options.idGen?this.options.idGen():t._nonce();const r=setTimeout((()=>{t.close()}),c.DEFAULT_CONNECTIONTIMEOUT);t.connection.once(d.READY,(e=>{clearTimeout(r),t.connectedAt=Date.now(),this.connections.push(t),this.emit(u.CONNECT,t,e)}))}}},5662:(module,__unused_webpack_exports,__webpack_require__)=>{function __ncc_wildcard$0(e){if("/"===e)return __webpack_require__(9551)}var fs=__webpack_require__(7147),path=__webpack_require__(1017),url=__webpack_require__(7310),vars=process.config&&process.config.variables||{},prebuildsOnly=!!process.env.PREBUILDS_ONLY,versions=process.versions,abi=versions.modules;(versions.deno||process.isBun)&&(abi="unsupported");var runtime=isElectron()?"electron":"node",arch=process.arch,platform=process.platform,libc=process.env.LIBC||(isAlpine(platform)?"musl":"glibc"),armv=process.env.ARM_VERSION||("arm64"===arch?"8":vars.arm_version)||"",uv=(versions.uv||"").split(".")[0];function load(dir){return eval("require")(load.path(dir))}function readdirSync(e){try{return fs.readdirSync(e)}catch(e){return[]}}function getFirst(e,t){var r=readdirSync(e).filter(t);return r[0]&&path.join(e,r[0])}function matchBuild(e){return/\.node$/.test(e)}function parseTuple(e){var t=e.split("-");if(2===t.length){var r=t[0],n=t[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:e,platform:r,architectures:n}}}function matchTuple(e,t){return function(r){return null!=r&&r.platform===e&&r.architectures.includes(t)}}function compareTuples(e,t){return e.architectures.length-t.architectures.length}function parseTags(e){var t=e.split("."),r={file:e,specificity:0};if("node"===t.pop()){for(var n=0;n<t.length;n++){var o=t[n];if("node"===o||"electron"===o||"node-webkit"===o)r.runtime=o;else if("napi"===o)r.napi=!0;else if("abi"===o.slice(0,3))r.abi=o.slice(3);else if("uv"===o.slice(0,2))r.uv=o.slice(2);else if("armv"===o.slice(0,4))r.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;r.libc=o}r.specificity++}return r}}function matchTags(e,t){return function(r){return!(null==r||r.runtime!==e&&!runtimeAgnostic(r)||r.abi!==t&&!r.napi||r.uv&&r.uv!==uv||r.armv&&r.armv!==armv||r.libc&&r.libc!==libc)}}function runtimeAgnostic(e){return"node"===e.runtime&&e.napi}function compareTags(e){return function(t,r){return t.runtime!==r.runtime?t.runtime===e?-1:1:t.abi!==r.abi?t.abi?-1:1:t.specificity!==r.specificity?t.specificity>r.specificity?-1:1:0}}function isElectron(){return!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type}function isAlpine(e){return"linux"===e&&fs.existsSync("/etc/alpine-release")}module.exports=load,load.path=function(dir){var packageName;dir=path.resolve(dir||".");try{packageName=eval("require")(path.join(dir,"package.json")).name;var varName=packageName.toUpperCase().replace(/-/g,"_")+"_PREBUILD";process.env[varName]&&(dir=process.env[varName])}catch(e){}if(!prebuildsOnly){var release=getFirst(path.join(dir,"build/Release"),matchBuild);if(release)return release;var debug=getFirst(path.join(dir,"build/Debug"),matchBuild);if(debug)return debug}var prebuild=resolve(dir);if(prebuild)return prebuild;var nearby=resolve(path.dirname(process.execPath));if(nearby)return nearby;var platformPackage=("@"==packageName[0]?"":"@"+packageName+"/")+packageName+"-"+platform+"-"+arch;try{var prebuildPackage=path.dirname(__webpack_require__(8188).createRequire(url.pathToFileURL(path.join(dir,"package.json"))).resolve(platformPackage));return resolveFile(prebuildPackage)}catch(e){}var target=["platform="+platform,"arch="+arch,"runtime="+runtime,"abi="+abi,"uv="+uv,armv?"armv="+armv:"","libc="+libc,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","webpack=true"].filter(Boolean).join(" ");throw new Error("No native build was found for "+target+"\n loaded from: "+dir+" and package: "+platformPackage+"\n");function resolve(e){var t=readdirSync(path.join(e,"prebuilds")).map(parseTuple).filter(matchTuple(platform,arch)).sort(compareTuples)[0];if(t)return resolveFile(path.join(e,"prebuilds",t.name))}function resolveFile(e){var t=readdirSync(e).map(parseTags).filter(matchTags(runtime,abi)).sort(compareTags(runtime))[0];if(t)return path.join(e,t.file)}},load.parseTags=parseTags,load.matchTags=matchTags,load.compareTags=compareTags,load.parseTuple=parseTuple,load.matchTuple=matchTuple,load.compareTuples=compareTuples},7981:(e,t,r)=>{e.exports=require(r.ab+"build/Release/system-fonts.node")},1231:(e,t,r)=>{"use strict";var n=r(2824);e.exports=function(e){var t,r=0;function o(){return r||(r=1,t=e.apply(this,arguments),e=null),t}return o.displayName=n(e),o}},8350:(e,t,r)=>{"use strict";const n=r(6161),o=new WeakMap,s=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,s=0;const i=e.displayName||e.name||"<anonymous>",a=function(...n){if(o.set(a,++s),1===s)r=e.apply(this,n),e=null;else if(!0===t.throw)throw new Error(`Function \`${i}\` can only be called once`);return r};return n(a,e),o.set(a,s),a};e.exports=s,e.exports.default=s,e.exports.callCount=e=>{if(!o.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return o.get(e)}},6161:e=>{"use strict";const t=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};e.exports=t,e.exports.default=t},8405:e=>{"use strict";const t=(e,...t)=>new Promise((r=>{r(e(...t))}));e.exports=t,e.exports.default=t},6034:(e,t,r)=>{"use strict";const n=r(464);e.exports=async({cwd:e}={})=>n("package.json",{cwd:e}),e.exports.sync=({cwd:e}={})=>n.sync("package.json",{cwd:e})},464:(e,t,r)=>{"use strict";const n=r(1017),o=r(9072);e.exports=(e,t={})=>{const r=n.resolve(t.cwd||""),{root:s}=n.parse(r),i=[].concat(e);return new Promise((e=>{!function t(r){o(i,{cwd:r}).then((o=>{o?e(n.join(r,o)):r===s?e(null):t(n.dirname(r))}))}(r)}))},e.exports.sync=(e,t={})=>{let r=n.resolve(t.cwd||"");const{root:s}=n.parse(r),i=[].concat(e);for(;;){const e=o.sync(i,{cwd:r});if(e)return n.join(r,e);if(r===s)return null;r=n.dirname(r)}}},9072:(e,t,r)=>{"use strict";const n=r(1017),o=r(3690),s=r(9987);e.exports=(e,t)=>(t=Object.assign({cwd:process.cwd()},t),s(e,(e=>o(n.resolve(t.cwd,e))),t)),e.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e)if(o.sync(n.resolve(t.cwd,r)))return r}},6502:(e,t,r)=>{"use strict";const n=r(8405),o=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let r=0;const o=()=>{r--,t.length>0&&t.shift()()},s=(e,t,...s)=>{r++;const i=n(e,...s);t(i),i.then(o,o)},i=(n,...o)=>new Promise((i=>((n,o,...i)=>{r<e?s(n,o,...i):t.push(s.bind(null,n,o,...i))})(n,i,...o)));return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),i};e.exports=o,e.exports.default=o},9987:(e,t,r)=>{"use strict";const n=r(6502);class o extends Error{constructor(e){super(),this.value=e}}const s=(e,t)=>Promise.resolve(e).then(t),i=e=>Promise.all(e).then((e=>!0===e[1]&&Promise.reject(new o(e[0]))));e.exports=(e,t,r)=>{r=Object.assign({concurrency:1/0,preserveOrder:!0},r);const a=n(r.concurrency),l=[...e].map((e=>[e,a(s,e,t)])),c=n(r.preserveOrder?1:1/0);return Promise.all(l.map((e=>c(i,e)))).then((()=>{})).catch((e=>e instanceof o?e.value:Promise.reject(e)))}},3690:(e,t,r)=>{"use strict";const n=r(7147);e.exports=e=>new Promise((t=>{n.access(e,(e=>{t(!e)}))})),e.exports.sync=e=>{try{return n.accessSync(e),!0}catch(e){return!1}}},3396:(e,t,r)=>{const n=r(3095);e.exports=function(e,t,r){return new n(e,t,r)}},3095:(e,t,r)=>{const{readFileSync:n,statSync:o}=r(7147),s=r(3228).propertyAppender,i=r(1749).L,a=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty),l=Symbol("SECTION");function c(e,t,r={}){this._encoding="string"==typeof t&&t||"utf-8",this._properties={},this._propertiesExpanded={},this.appender(r.appender||r),this.writer(r.writer||r),this.append(e,t)}c.prototype[l]="",Object.defineProperty(c.prototype,"length",{configurable:!1,enumerable:!1,get(){return Object.keys(this._properties).length}}),c.prototype.appender=function(e){return"function"==typeof e?this._propertyAppender=e:"object"==typeof e&&(this._propertyAppender=s(e)),this},c.prototype.writer=function(e){return"function"==typeof e?this._propertyWriter=e:"object"==typeof e&&(this._propertyWriter=i(e)),this},c.prototype.append=function(e,t){return e&&this.read(n(e,"string"==typeof t&&t||this._encoding)),this},c.prototype.read=function(e){return delete this[l],(""+e).split("\n").forEach(this._readLine,this),this},c.prototype._readLine=function(e){if(e=e.trim()){var t=/^\[([^=]+)]$/.exec(e),r=!t&&/^([^#=]+)(={0,1})(.*)$/.exec(e);t?this[l]=t[1]:r&&(t=this[l]?this[l]+".":"",this.set(t+r[1].trim(),r[3].trim()))}},c.prototype.each=function(e,t){for(var r in this._properties)this._properties.hasOwnProperty(r)&&e.call(t||this,r,this._properties[r]);return this},c.prototype._parsed=function(e){if(null!==e&&""!==e&&!isNaN(e))return+e;if("true"===e||"false"===e)return"true"===e;if("string"==typeof e){var t={"\\n":"\n","\\r":"\r","\\t":"\t"};return e.replace(/\\[nrt]/g,(function(e){return t[e]}))}return e},c.prototype.get=function(e){return this._parsed(this.getRaw(e))},c.prototype.getRaw=function(e){return this._properties.hasOwnProperty(e)?this._properties[e]:null},c.prototype.set=function(e,t){var r=(""+t).trim();this._properties=this._propertyAppender(this._properties,e,r);for(var n=e.split("."),o=this._propertiesExpanded;n.length>1;){var s=n.shift();n.length>=1&&"string"==typeof o[s]&&(o[s]={"":o[s]}),a(o,s)||Object.defineProperty(o,s,{value:{}}),o=o[s]}return"__proto__"===n[0]?Object.defineProperty(o,n[0],{value:r}):"string"==typeof r&&"object"==typeof o[n[0]]?o[n[0]][""]=r:o[n[0]]=r,this},c.prototype.path=function(){return this._propertiesExpanded},c.prototype.getAllProperties=function(){var e={};return this.each((function(t,r){e[t]=r})),e},c.prototype.clone=function(){var e=new c(null);return this.each(e.set,e),e},c.prototype.getByRoot=function(e){for(var t=Object.keys(this._properties),r={},n=0,o=String(e).length;n<t.length;n++){var s=t[n];0===s.indexOf(e)&&"."===s.charAt(o)&&(r[s.substr(o+1)]=this.get(s))}return r},c.prototype.bindToExpress=function(e,t,n){var s=r(1017);return/\/$/.test(t=t||process.cwd())||(t+="/"),this.each((function(i,a){if(a&&/\.(path|dir)$/.test(i)){a=s.resolve(t,a),this.set(i,a);try{var l=/dir$/.test(i)?a:s.dirname(a);if(n)r(706).sync(l);else if(!o(l).isDirectory())throw new Error("Path is not a directory that already exists")}catch(e){throw new Error("Unable to create directory "+a)}}e.set(i,this.get(i)),/^browser\./.test(i)&&(e.locals[i.substr(8)]=this.get(i))}),this),e.set("properties",this),this},c.prototype.save=function(e,t){return this._propertyWriter(this,e,t)},e.exports=c},3228:e=>{var t={allowDuplicateSections:!1};function r(e,t,r){return e[t]=r,e}function n(e,t,r){var n,o,s={},i=(n=t,(o=String(n).indexOf("."))>0&&n.substr(0,o)||""),a=Object.keys(e);if(!i||!a.length)return s[t]=r,Object.assign(e,s);var l=1;return a.forEach((function(n){var o=4!==l&&0===n.indexOf(i+".");t===n?(e[n]=r,l=4):1===l&&o?l=2:2!==l||o||(s[t]=r,l=4),s[n]=e[n]})),4!==l&&(s[t]=r),s}e.exports={defaultOptions:t,propertyAppender:function(e){return Object.assign({},t,e||{}).allowDuplicateSections?r:n}}},1749:(e,t,r)=>{const n=r(7147),o={saveSections:!0};e.exports.L=function(e){const t=Object.assign({},o,e||{});return(e,r,o)=>{const s=new Promise(((o,s)=>{const i=(t.saveSections?function(e){var t=[],r=null;return e.each((function(e,n){var o=e.split(".");o.length>1?(r!==o[0]&&(r=o[0],t.push("["+r+"]")),e=o.slice(1).join(".")):r=null,t.push(e+"="+n)})),t}(e):function(e){const t=[];return e.each(((e,r)=>t.push(`${e}=${r}`))),t}(e)).join("\n");n.writeFile(r,i,(e=>{if(e)return s(e);o(i)}))}));return"function"==typeof o&&(o.length>1?s.then((()=>o(null)),(e=>o(e))):s.then(o)),s}}},8018:e=>{"use strict";const t={};function r(e,r,n){n||(n=Error);class o extends n{constructor(e,t,n){super(function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(e,t,n))}}o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){let o;var s;let i;if("string"==typeof t&&(s="not ",t.substr(0,4)===s)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))i=`The ${e} ${o} ${n(t,"type")}`;else{i=`The "${e}" ${"number"!=typeof l&&(l=0),l+1>(a=e).length||-1===a.indexOf(".",l)?"argument":"property"} ${o} ${n(t,"type")}`}var a,l;return i+=". Received type "+typeof r,i}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},7812:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var o=r(6561),s=r(3376);r(1547)(c,o);for(var i=n(s.prototype),a=0;a<i.length;a++){var l=i[a];c.prototype[l]||(c.prototype[l]=s.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||process.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},6006:(e,t,r)=>{"use strict";e.exports=o;var n=r(3699);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(1547)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},6561:(e,t,r)=>{"use strict";var n;e.exports=R,R.ReadableState=E,r(2361).EventEmitter;var o,s=function(e,t){return e.listeners(t).length},i=r(2456),a=r(4300).Buffer,l=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=r(3837);o=c&&c.debuglog?c.debuglog("stream"):function(){};var u,d,p,h=r(3158),f=r(2035),g=r(6327).getHighWaterMark,m=r(8018).q,y=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1547)(R,i);var b=f.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(e,t,o){n=n||r(7812),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",o),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=r(2).s),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function R(e){if(n=n||r(7812),!(this instanceof R))return new R(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function k(e,t,r,n,s){o("readableAddChunk",t);var i,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?$(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,c);else if(s||(i=function(e,t){var r,n;return n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t)),r}(c,t)),i)b(e,i);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)c.endEmitted?b(e,new _):O(e,c,t,!0);else if(c.ended)b(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?O(e,c,t,!1):I(e,c)):O(e,c,t,!1)}else n||(c.reading=!1,I(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&$(e)),I(e,t)}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),R.prototype.destroy=f.destroy,R.prototype._undestroy=f.undestroy,R.prototype._destroy=function(e,t){t(e)},R.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),k(this,e,t,!1,r)},R.prototype.unshift=function(e){return k(this,e,null,!0,!1)},R.prototype.isPaused=function(){return!1===this._readableState.flowing},R.prototype.setEncoding=function(e){u||(u=r(2).s);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,o="";null!==n;)o+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var x=1073741824;function P(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function $(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(T,e))}function T(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function M(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){o("readable nexttick read 0"),e.read(0)}function A(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function j(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(F,t,e))}function F(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}R.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):$(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&j(this),null;var n,s=t.needReadable;return o("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",s=!0),t.ended||t.reading?o("reading or ended",s=!1):s&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=P(r,t))),null===(n=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==n&&this.emit("data",n),n},R.prototype._read=function(e){b(this,new w("_read()"))},R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end||e===process.stdout||e===process.stderr?f:a;function a(){o("onend"),e.end()}n.endEmitted?process.nextTick(i):r.once("end",i),e.on("unpipe",(function t(s,i){o("onunpipe"),s===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,o("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",f),r.removeListener("data",u),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",l);var c=!1;function u(t){o("ondata");var s=e.write(t);o("dest.write",s),!1===s&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!c&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){o("onerror",t),f(),e.removeListener("error",d),0===s(e,"error")&&b(e,t)}function p(){e.removeListener("finish",h),f()}function h(){o("onfinish"),e.removeListener("close",p),f()}function f(){o("unpipe"),r.unpipe(e)}return r.on("data",u),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",h),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<o;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var i=U(t.pipes,e);return-1===i||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},R.prototype.on=function(e,t){var r=i.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?$(this):n.reading||process.nextTick(C,this))),r},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(e,t){var r=i.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(M,this),r},R.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(M,this),t},R.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(A,e,t))}(this,e)),e.paused=!1,this},R.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){o("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause()))})),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<S.length;i++)e.on(S[i],this.emit.bind(this,S[i]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(R.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(699)),d(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),R._fromList=L,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(R.from=function(e,t){return void 0===p&&(p=r(6268)),p(R,e,t)})},3699:(e,t,r)=>{"use strict";e.exports=u;var n=r(8018).q,o=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,i=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(7812);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,r){p(e,t,r)}))}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new i;return e.push(null)}r(1547)(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,r){r(new o("_transform()"))},u.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},3376:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=R,R.WritableState=E;var s,i={deprecate:r(9761)},a=r(2456),l=r(4300).Buffer,c=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=r(2035),d=r(6327).getHighWaterMark,p=r(8018).q,h=p.ERR_INVALID_ARG_TYPE,f=p.ERR_METHOD_NOT_IMPLEMENTED,g=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,b=u.errorOrDestroy;function S(){}function E(e,t,s){o=o||r(7812),e=e||{},"boolean"!=typeof s&&(s=t instanceof o),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(process.nextTick(o,n),process.nextTick(T,e,t),e._writableState.errorEmitted=!0,b(e,n)):(o(n),e._writableState.errorEmitted=!0,b(e,n),T(e,t))}(e,r,n,t,o);else{var s=P(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?process.nextTick(O,e,r,s,o):O(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function R(e){var t=this instanceof(o=o||r(7812));if(!t&&!s.call(R,this))return new R(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function k(e,t,r,n,o,s,i){t.writelen=n,t.writecb=i,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(o,t.onwrite):e._write(o,s,t.onwrite),t.sync=!1}function O(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var o=t.bufferedRequestCount,s=new Array(o),i=t.corkedRequestsFree;i.entry=r;for(var a=0,l=!0;r;)s[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;s.allBuffers=l,k(e,t,!0,t.length,s,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,d=r.callback;if(k(e,t,!1,t.objectMode?1:c.length,c,u,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function $(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var r=P(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick($,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(1547)(R,a),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===R&&e&&e._writableState instanceof E}})):s=function(e){return e instanceof this},R.prototype.pipe=function(){b(this,new m)},R.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,i=!o.objectMode&&(n=e,l.isBuffer(n)||n instanceof c);return i&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),i?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(e,t){var r=new w;b(e,r),process.nextTick(t,r)}(this,r):(i||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new h("chunk",["string","Buffer"],r)),!o||(b(e,o),process.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,o,s){if(!r){var i=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r)),t}(t,n,o);n!==i&&(r=!0,o="buffer",n=i)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,a,n,o,s);return c}(this,o,i,e,t,r)),s},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new f("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(e,t){t(e)}},699:(e,t,r)=>{"use strict";var n;function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(9168),i=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function f(e){var t=e[i];if(null!==t){var r=e[p].read();null!==r&&(e[u]=null,e[i]=null,e[a]=null,t(h(r,!1)))}}function g(e){process.nextTick(f,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((o(n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[l]?r(e[l]):t(h(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(h(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(h(o,!1));r=new Promise(this[d])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(y,(o(t={},p,{value:e,writable:!0}),o(t,i,{value:null,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,d,{value:function(e,t){var n=r[p].read();n?(r[u]=null,r[i]=null,r[a]=null,e(h(n,!1))):(r[i]=e,r[a]=t)},writable:!0}),t));return r[u]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[u]=null,r[i]=null,r[a]=null,t(e)),void(r[l]=e)}var n=r[i];null!==n&&(r[u]=null,r[i]=null,r[a]=null,n(h(void 0,!0))),r[c]=!0})),e.on("readable",g.bind(null,r)),r}},3158:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var l=r(4300).Buffer,c=r(3837).inspect,u=c&&c.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,r,n,o=l.allocUnsafe(e>>>0),s=this.head,i=0;s;)t=s.data,r=o,n=i,l.prototype.copy.call(t,r,n),i+=s.data.length,s=s.next;return o}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,s=e>o.length?o.length:e;if(s===o.length?n+=o:n+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,s),0==(e-=s)){s===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(s));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return c(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},2035:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var s=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?s._writableState?s._writableState.errorEmitted?process.nextTick(r,s):(s._writableState.errorEmitted=!0,process.nextTick(t,s,e)):process.nextTick(t,s,e):o?(process.nextTick(r,s),o(e)):process.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},9168:(e,t,r)=>{"use strict";var n=r(8018).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}(s||o);var i=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){a=!1,c=!0,i||s.call(t)},d=t._readableState&&t._readableState.endEmitted,p=function(){i=!1,d=!0,a||s.call(t)},h=function(e){s.call(t,e)},f=function(){var e;return i&&!d?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},g=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",f),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",p),t.on("finish",u),!1!==r.error&&t.on("error",h),t.on("close",f),function(){t.removeListener("complete",u),t.removeListener("abort",f),t.removeListener("request",g),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",p),t.removeListener("error",h),t.removeListener("close",f)}}},6268:(e,t,r)=>{"use strict";function n(e,t,r,n,o,s,i){try{var a=e[s](i),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(8018).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){var a;if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else{if(!t||!t[Symbol.iterator])throw new i("iterable",["Iterable"],t);a=t[Symbol.iterator]()}var l=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({objectMode:!0},r)),c=!1;function u(){return d.apply(this,arguments)}function d(){var e;return e=function*(){try{var e=yield a.next(),t=e.value;e.done?l.push(null):l.push(yield t)?u():c=!1}catch(e){l.destroy(e)}},d=function(){var t=this,r=arguments;return new Promise((function(o,s){var i=e.apply(t,r);function a(e){n(i,o,s,a,l,"next",e)}function l(e){n(i,o,s,a,l,"throw",e)}a(void 0)}))},d.apply(this,arguments)}return l._read=function(){c||(c=!0,u())},l}},6419:(e,t,r)=>{"use strict";var n,o=r(8018).q,s=o.ERR_MISSING_ARGS,i=o.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var u,d=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var p=t.map((function(e,o){var s=o<t.length-1;return function(e,t,o,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(9168)),n(e,{readable:t,writable:o},(function(e){if(e)return s(e);a=!0,s()}));var l=!1;return function(t){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new i("pipe"))}}(e,s,o>0,(function(e){u||(u=e),e&&p.forEach(l),s||(p.forEach(l),d(u))}))}));return t.reduce(c)}},6327:(e,t,r)=>{"use strict";var n=r(8018).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(o?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},2456:(e,t,r)=>{e.exports=r(2781)},8073:(e,t,r)=>{var n=r(2781);"disable"===process.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(6561)).Stream=n||t,t.Readable=t,t.Writable=r(3376),t.Duplex=r(7812),t.Transform=r(3699),t.PassThrough=r(6006),t.finished=r(9168),t.pipeline=r(6419))},9736:(e,t,r)=>{var n=r(4300),o=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=i),i.prototype=Object.create(o.prototype),s(o,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},1841:(e,t)=>{"use strict";const{hasOwnProperty:r}=Object.prototype,n=h();n.configure=h,n.stringify=n,n.default=n,t.stringify=n,t.configure=h,e.exports=n;const o=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function s(e){return e.length<5e3&&!o.test(e)?`"${e}"`:JSON.stringify(e)}function i(e){if(e.length>200)return e.sort();for(let t=1;t<e.length;t++){const r=e[t];let n=t;for(;0!==n&&e[n-1]>r;)e[n]=e[n-1],n--;e[n]=r}return e}const a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function l(e){return void 0!==a.call(e)&&0!==e.length}function c(e,t,r){e.length<r&&(r=e.length);const n=","===t?"":" ";let o=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)o+=`${t}"${s}":${n}${e[s]}`;return o}function u(e,t){let n;if(r.call(e,t)&&(n=e[t],"boolean"!=typeof n))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===n||n}function d(e,t){let n;if(r.call(e,t)){if(n=e[t],"number"!=typeof n)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(n))throw new TypeError(`The "${t}" argument must be an integer`);if(n<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===n?1/0:n}function p(e){return 1===e?"1 item":`${e} items`}function h(e){const t=function(e){if(r.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const n=function(e){if(r.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),o=u(e,"bigint"),a=u(e,"deterministic"),h=d(e,"maximumDepth"),f=d(e,"maximumBreadth");function g(e,r,c,u,d,m){let y=r[e];switch("object"==typeof y&&null!==y&&"function"==typeof y.toJSON&&(y=y.toJSON(e)),y=u.call(r,e,y),typeof y){case"string":return s(y);case"object":{if(null===y)return"null";if(-1!==c.indexOf(y))return n;let e="",t=",";const r=m;if(Array.isArray(y)){if(0===y.length)return"[]";if(h<c.length+1)return'"[Array]"';c.push(y),""!==d&&(e+=`\n${m+=d}`,t=`,\n${m}`);const n=Math.min(y.length,f);let o=0;for(;o<n-1;o++){const r=g(String(o),y,c,u,d,m);e+=void 0!==r?r:"null",e+=t}const s=g(String(o),y,c,u,d,m);return e+=void 0!==s?s:"null",y.length-1>f&&(e+=`${t}"... ${p(y.length-f-1)} not stringified"`),""!==d&&(e+=`\n${r}`),c.pop(),`[${e}]`}let o=Object.keys(y);const v=o.length;if(0===v)return"{}";if(h<c.length+1)return'"[Object]"';let w="",_="";""!==d&&(t=`,\n${m+=d}`,w=" ");const b=Math.min(v,f);a&&!l(y)&&(o=i(o)),c.push(y);for(let r=0;r<b;r++){const n=o[r],i=g(n,y,c,u,d,m);void 0!==i&&(e+=`${_}${s(n)}:${w}${i}`,_=t)}return v>f&&(e+=`${_}"...":${w}"${p(v-f)} not stringified"`,_=t),""!==d&&_.length>1&&(e=`\n${m}${e}\n${r}`),c.pop(),`{${e}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return!0===y?"true":"false";case"undefined":return;case"bigint":if(o)return String(y);default:return t?t(y):void 0}}function m(e,r,i,a,l,c){switch("object"==typeof r&&null!==r&&"function"==typeof r.toJSON&&(r=r.toJSON(e)),typeof r){case"string":return s(r);case"object":{if(null===r)return"null";if(-1!==i.indexOf(r))return n;const e=c;let t="",o=",";if(Array.isArray(r)){if(0===r.length)return"[]";if(h<i.length+1)return'"[Array]"';i.push(r),""!==l&&(t+=`\n${c+=l}`,o=`,\n${c}`);const n=Math.min(r.length,f);let s=0;for(;s<n-1;s++){const e=m(String(s),r[s],i,a,l,c);t+=void 0!==e?e:"null",t+=o}const u=m(String(s),r[s],i,a,l,c);return t+=void 0!==u?u:"null",r.length-1>f&&(t+=`${o}"... ${p(r.length-f-1)} not stringified"`),""!==l&&(t+=`\n${e}`),i.pop(),`[${t}]`}i.push(r);let u="";""!==l&&(o=`,\n${c+=l}`,u=" ");let d="";for(const e of a){const n=m(e,r[e],i,a,l,c);void 0!==n&&(t+=`${d}${s(e)}:${u}${n}`,d=o)}return""!==l&&d.length>1&&(t=`\n${c}${t}\n${e}`),i.pop(),`{${t}}`}case"number":return isFinite(r)?String(r):t?t(r):"null";case"boolean":return!0===r?"true":"false";case"undefined":return;case"bigint":if(o)return String(r);default:return t?t(r):void 0}}function y(e,r,u,d,g){switch(typeof r){case"string":return s(r);case"object":{if(null===r)return"null";if("function"==typeof r.toJSON){if("object"!=typeof(r=r.toJSON(e)))return y(e,r,u,d,g);if(null===r)return"null"}if(-1!==u.indexOf(r))return n;const t=g;if(Array.isArray(r)){if(0===r.length)return"[]";if(h<u.length+1)return'"[Array]"';u.push(r);let e=`\n${g+=d}`;const n=`,\n${g}`,o=Math.min(r.length,f);let s=0;for(;s<o-1;s++){const t=y(String(s),r[s],u,d,g);e+=void 0!==t?t:"null",e+=n}const i=y(String(s),r[s],u,d,g);return e+=void 0!==i?i:"null",r.length-1>f&&(e+=`${n}"... ${p(r.length-f-1)} not stringified"`),e+=`\n${t}`,u.pop(),`[${e}]`}let o=Object.keys(r);const m=o.length;if(0===m)return"{}";if(h<u.length+1)return'"[Object]"';const v=`,\n${g+=d}`;let w="",_="",b=Math.min(m,f);l(r)&&(w+=c(r,v,f),o=o.slice(r.length),b-=r.length,_=v),a&&(o=i(o)),u.push(r);for(let e=0;e<b;e++){const t=o[e],n=y(t,r[t],u,d,g);void 0!==n&&(w+=`${_}${s(t)}: ${n}`,_=v)}return m>f&&(w+=`${_}"...": "${p(m-f)} not stringified"`,_=v),""!==_&&(w=`\n${g}${w}\n${t}`),u.pop(),`{${w}}`}case"number":return isFinite(r)?String(r):t?t(r):"null";case"boolean":return!0===r?"true":"false";case"undefined":return;case"bigint":if(o)return String(r);default:return t?t(r):void 0}}function v(e,r,u){switch(typeof r){case"string":return s(r);case"object":{if(null===r)return"null";if("function"==typeof r.toJSON){if("object"!=typeof(r=r.toJSON(e)))return v(e,r,u);if(null===r)return"null"}if(-1!==u.indexOf(r))return n;let t="";if(Array.isArray(r)){if(0===r.length)return"[]";if(h<u.length+1)return'"[Array]"';u.push(r);const e=Math.min(r.length,f);let n=0;for(;n<e-1;n++){const e=v(String(n),r[n],u);t+=void 0!==e?e:"null",t+=","}const o=v(String(n),r[n],u);return t+=void 0!==o?o:"null",r.length-1>f&&(t+=`,"... ${p(r.length-f-1)} not stringified"`),u.pop(),`[${t}]`}let o=Object.keys(r);const d=o.length;if(0===d)return"{}";if(h<u.length+1)return'"[Object]"';let g="",m=Math.min(d,f);l(r)&&(t+=c(r,",",f),o=o.slice(r.length),m-=r.length,g=","),a&&(o=i(o)),u.push(r);for(let e=0;e<m;e++){const n=o[e],i=v(n,r[n],u);void 0!==i&&(t+=`${g}${s(n)}:${i}`,g=",")}return d>f&&(t+=`${g}"...":"${p(d-f)} not stringified"`),u.pop(),`{${t}}`}case"number":return isFinite(r)?String(r):t?t(r):"null";case"boolean":return!0===r?"true":"false";case"undefined":return;case"bigint":if(o)return String(r);default:return t?t(r):void 0}}return function(e,t,r){if(arguments.length>1){let n="";if("number"==typeof r?n=" ".repeat(Math.min(r,10)):"string"==typeof r&&(n=r.slice(0,10)),null!=t){if("function"==typeof t)return g("",{"":e},[],t,n,"");if(Array.isArray(t))return m("",e,[],function(e){const t=new Set;for(const r of e)"string"!=typeof r&&"number"!=typeof r||t.add(String(r));return t}(t),n,"")}if(0!==n.length)return y("",e,[],n,"")}return v("",e,[])}}},7983:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=s(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const s=r(8655),{safeRe:i,t:a}=r(4607),l=r(1543),c=r(137),u=r(9306),d=r(3040)},3040:(e,t,r)=>{class n{constructor(e,t){if(t=s(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,s=n?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(s,$(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],d),a("comparator trim",e),e=e.replace(c[u.TILDETRIM],p),a("tilde trim",e),e=e.replace(c[u.CARETTRIM],h),a("caret trim",e);let l=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>P(e,this.options)));n&&(l=l.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),a("range list",l);const y=new Map,v=l.map((e=>new i(e,this.options)));for(const e of v){if(m(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const _=[...y.values()];return o.set(t,_),_}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>v(r,t)&&e.set.some((e=>v(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=new(r(2845))({max:1e3}),s=r(8655),i=r(7983),a=r(137),l=r(9306),{safeRe:c,t:u,comparatorTrimReplace:d,tildeTrimReplace:p,caretTrimReplace:h}=r(4607),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:g}=r(1349),m=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},w=(e,t)=>(a("comp",e,t),e=E(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=k(e,t),a("xrange",e),e=x(e,t),a("stars",e),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(r,((t,r,n,o,s)=>{let i;return a("tilde",e,t,r,n,o,s),_(r)?i="":_(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:_(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(a("replaceTilde pr",s),i=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>R(e,t))).join(" "),R=(e,t)=>{a("caret",e,t);const r=t.loose?c[u.CARETLOOSE]:c[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,s,i)=>{let l;return a("caret",e,t,r,o,s,i),_(r)?l="":_(o)?l=`>=${r}.0.0${n} <${+r+1}.0.0-0`:_(s)?l="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(a("replaceCaret pr",i),l="0"===r?"0"===o?`>=${r}.${o}.${s}-${i} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${i} <${+r+1}.0.0-0`):(a("no pr"),l="0"===r?"0"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),a("caret return",l),l}))},k=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const r=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(r,((r,n,o,s,i,l)=>{a("xRange",e,r,n,o,s,i,l);const c=_(o),u=c||_(s),d=u||_(i),p=d;return"="===n&&p&&(n=""),l=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(s=0),i=0,">"===n?(n=">=",u?(o=+o+1,s=0,i=0):(s=+s+1,i=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(l="-0"),r=`${n+o}.${s}.${i}${l}`):u?r=`>=${o}.0.0${l} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`),a("xRange return",r),r}))},x=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),P=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),$=e=>(t,r,n,o,s,i,a,l,c,u,d,p,h)=>`${r=_(n)?"":_(o)?`>=${n}.0.0${e?"-0":""}`:_(s)?`>=${n}.${o}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=_(c)?"":_(u)?`<${+c+1}.0.0-0`:_(d)?`<${c}.${+u+1}.0-0`:p?`<=${c}.${u}.${d}-${p}`:e?`<${c}.${u}.${+d+1}-0`:`<=${l}`}`.trim(),T=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},9306:(e,t,r)=>{const n=r(137),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(1349),{safeRe:i,t:a}=r(4607),l=r(8655),{compareIdentifiers:c}=r(3154);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},7140:(e,t,r)=>{const n=r(4832);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},1543:(e,t,r)=>{const n=r(1053),o=r(5949),s=r(9830),i=r(5257),a=r(8732),l=r(3213);e.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return o(e,r,c);case">":return s(e,r,c);case">=":return i(e,r,c);case"<":return a(e,r,c);case"<=":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6459:(e,t,r)=>{const n=r(9306),o=r(4832),{safeRe:s,t:i}=r(4607);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=s[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),s[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[i.COERCERTL].lastIndex=-1}else r=e.match(s[i.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},3718:(e,t,r)=>{const n=r(9306);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},2642:(e,t,r)=>{const n=r(8409);e.exports=(e,t)=>n(e,t,!0)},8409:(e,t,r)=>{const n=r(9306);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},8986:(e,t,r)=>{const n=r(4832);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),s=r.compare(o);if(0===s)return null;const i=s>0,a=i?r:o,l=i?o:r,c=!!a.prerelease.length;if(l.prerelease.length&&!c)return l.patch||l.minor?a.patch?"patch":a.minor?"minor":"major":"major";const u=c?"pre":"";return r.major!==o.major?u+"major":r.minor!==o.minor?u+"minor":r.patch!==o.patch?u+"patch":"prerelease"}},1053:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>0===n(e,t,r)},9830:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>n(e,t,r)>0},5257:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>n(e,t,r)>=0},9289:(e,t,r)=>{const n=r(9306);e.exports=(e,t,r,o,s)=>{"string"==typeof r&&(s=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,s).version}catch(e){return null}}},8732:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>n(e,t,r)<0},3213:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>n(e,t,r)<=0},7354:(e,t,r)=>{const n=r(9306);e.exports=(e,t)=>new n(e,t).major},2872:(e,t,r)=>{const n=r(9306);e.exports=(e,t)=>new n(e,t).minor},5949:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>0!==n(e,t,r)},4832:(e,t,r)=>{const n=r(9306);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},738:(e,t,r)=>{const n=r(9306);e.exports=(e,t)=>new n(e,t).patch},4102:(e,t,r)=>{const n=r(4832);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},4145:(e,t,r)=>{const n=r(8409);e.exports=(e,t,r)=>n(t,e,r)},6041:(e,t,r)=>{const n=r(3718);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7908:(e,t,r)=>{const n=r(3040);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3757:(e,t,r)=>{const n=r(3718);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},8719:(e,t,r)=>{const n=r(4832);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},2261:(e,t,r)=>{const n=r(4607),o=r(1349),s=r(9306),i=r(3154),a=r(4832),l=r(8719),c=r(7140),u=r(9289),d=r(8986),p=r(7354),h=r(2872),f=r(738),g=r(4102),m=r(8409),y=r(4145),v=r(2642),w=r(3718),_=r(3757),b=r(6041),S=r(9830),E=r(8732),R=r(1053),k=r(5949),O=r(5257),x=r(3213),P=r(1543),$=r(6459),T=r(7983),I=r(3040),D=r(7908),M=r(7563),C=r(6811),A=r(7342),N=r(1139),L=r(3481),j=r(9929),F=r(6170),U=r(8791),W=r(6042),B=r(1713),z=r(4938);e.exports={parse:a,valid:l,clean:c,inc:u,diff:d,major:p,minor:h,patch:f,prerelease:g,compare:m,rcompare:y,compareLoose:v,compareBuild:w,sort:_,rsort:b,gt:S,lt:E,eq:R,neq:k,gte:O,lte:x,cmp:P,coerce:$,Comparator:T,Range:I,satisfies:D,toComparators:M,maxSatisfying:C,minSatisfying:A,minVersion:N,validRange:L,outside:j,gtr:F,ltr:U,intersects:W,simplifyRange:B,subset:z,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},1349:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},137:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},3154:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8655:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},4607:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=r(1349),i=r(137),a=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],u=t.t={};let d=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[p,o]],f=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=d++;i(e,o,t),u[e]=o,c[o]=t,a[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),f("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${p}+`),f("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),f("FULL",`^${c[u.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),f("LOOSE",`^${c[u.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),f("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),f("COERCERTL",c[u.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},2845:(e,t,r)=>{"use strict";const n=r(5897),o=Symbol("max"),s=Symbol("length"),i=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(m(e,t)){if(v(e,n),!e[a])return}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},y=e=>{if(e[s]>e[o])for(let t=e[d].tail;e[s]>e[o]&&null!==t;){const r=t.prev;v(e,t),t=r}},v=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[s]-=r.length,e[p].delete(r.key),e[d].removeNode(t)}};class w{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const _=(e,t,r,n)=>{let o=r.value;m(e,o)&&(v(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||f;if(this[i]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,y(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[i]&&(this[i]=e,this[s]=0,this[d].forEach((e=>{e.length=this[i](e.value,e.key),this[s]+=e.length}))),y(this)}get lengthCalculator(){return this[i]}get length(){return this[s]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;_(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;_(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[d]=new n,this[s]=0}dump(){return this[d].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[i](t,e);if(this[p].has(e)){if(a>this[o])return v(this,this[p].get(e)),!1;const i=this[p].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=n,i.maxAge=r,i.value=t,this[s]+=a-i.length,i.length=a,this.get(e),y(this),!0}const h=new w(e,t,a,n,r);return h.length>this[o]?(this[c]&&this[c](e,t),!1):(this[s]+=h.length,this[d].unshift(h),this[p].set(e,this[d].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach(((e,t)=>g(this,t,!1)))}}},6170:(e,t,r)=>{const n=r(9929);e.exports=(e,t,r)=>n(e,t,">",r)},6042:(e,t,r)=>{const n=r(3040);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},8791:(e,t,r)=>{const n=r(9929);e.exports=(e,t,r)=>n(e,t,"<",r)},6811:(e,t,r)=>{const n=r(9306),o=r(3040);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new n(s,r)))})),s}},7342:(e,t,r)=>{const n=r(9306),o=r(3040);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new n(s,r)))})),s}},1139:(e,t,r)=>{const n=r(9306),o=r(3040),s=r(9830);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let i=null;o.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!s(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!s(r,i)||(r=i)}return r&&e.test(r)?r:null}},9929:(e,t,r)=>{const n=r(9306),o=r(7983),{ANY:s}=o,i=r(3040),a=r(7908),l=r(9830),c=r(8732),u=r(3213),d=r(5257);e.exports=(e,t,r,p)=>{let h,f,g,m,y;switch(e=new n(e,p),t=new i(t,p),r){case">":h=l,f=u,g=c,m=">",y=">=";break;case"<":h=c,f=d,g=l,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let i=null,a=null;if(n.forEach((e=>{e.semver===s&&(e=new o(">=0.0.0")),i=i||e,a=a||e,h(e.semver,i.semver,p)?i=e:g(e.semver,a.semver,p)&&(a=e)})),i.operator===m||i.operator===y)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===y&&g(e,a.semver))return!1}return!0}},1713:(e,t,r)=>{const n=r(7908),o=r(8409);e.exports=(e,t,r)=>{const s=[];let i=null,a=null;const l=e.sort(((e,t)=>o(e,t,r)));for(const e of l)n(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null);i&&s.push([i,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return u.length<d.length?u:t}},4938:(e,t,r)=>{const n=r(3040),o=r(7983),{ANY:s}=o,i=r(7908),a=r(8409),l=[new o(">=0.0.0-0")],c=[new o(">=0.0.0")],u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?l:c}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=c}const n=new Set;let o,u,h,f,g,m,y;for(const t of e)">"===t.operator||">="===t.operator?o=d(o,t,r):"<"===t.operator||"<="===t.operator?u=p(u,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&u){if(h=a(o.semver,u.semver,r),h>0)return null;if(0===h&&(">="!==o.operator||"<="!==u.operator))return null}for(const e of n){if(o&&!i(e,String(o),r))return null;if(u&&!i(e,String(u),r))return null;for(const n of t)if(!i(e,String(n),r))return!1;return!0}let v=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver,w=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;v&&1===v.prerelease.length&&"<"===u.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,o)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(f=d(o,e,r),f===e&&f!==o)return!1}else if(">="===o.operator&&!i(o.semver,String(e),r))return!1;if(u)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(g=p(u,e,r),g===e&&g!==u)return!1}else if("<="===u.operator&&!i(u.semver,String(e),r))return!1;if(!e.operator&&(u||o)&&0!==h)return!1}return!(o&&m&&!u&&0!==h||u&&y&&!o&&0!==h||w||v)},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},7563:(e,t,r)=>{const n=r(3040);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},3481:(e,t,r)=>{const n=r(3040);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},2735:(e,t)=>{function r(e){for(var t in e)this[t]=e[t]}t.get=function(e){var r=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var n={},o=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(n,e||t.get);var s=n.stack;return Error.prepareStackTrace=o,Error.stackTraceLimit=r,s},t.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var r=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(r){var n=null,o=null,s=null,i=null,a=null,l="native"===r[5];if(r[1]){var c=(s=r[1]).lastIndexOf(".");if("."==s[c-1]&&c--,c>0){n=s.substr(0,c),o=s.substr(c+1);var u=n.indexOf(".Module");u>0&&(s=s.substr(u+1),n=n.substr(0,u))}i=null}o&&(i=n,a=o),"<anonymous>"===o&&(a=null,s=null);var d={fileName:r[2]||null,lineNumber:parseInt(r[3],10)||null,functionName:s,typeName:i,methodName:a,columnNumber:parseInt(r[4],10)||null,native:l};return t._createParsedCallSite(d)}})).filter((function(e){return!!e}))},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){r.prototype[e]=null,r.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){r.prototype[e]=!1,r.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),t._createParsedCallSite=function(e){return new r(e)}},2:(e,t,r)=>{"use strict";var n=r(9736).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=i(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=i(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=i(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8926:(e,t)=>{"use strict";t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},5461:(e,t,r)=>{"use strict";Object.defineProperty(t,"cli",{value:r(8926)}),Object.defineProperty(t,"npm",{value:r(8869)}),Object.defineProperty(t,"syslog",{value:r(208)})},8869:(e,t)=>{"use strict";t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},208:(e,t)=>{"use strict";t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},1520:(e,t,r)=>{"use strict";Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:r(5461)})},3772:(e,t,r)=>{var n=r(2361),o=r(1891),s=r(3837),i=require(r.ab+"build/Release/unix_dgram.node"),a=i.SOCK_DGRAM,l=i.AF_UNIX,c=i.socket||g,u=i.bind||g,d=i.connect||g,p=i.sendto||g,h=i.send||g,f=i.close||g;function g(){throw new Error("Unix datagrams not available on this platform")}function m(e,t){var r=new Error(t+" "+e);return r.errno=r.code=e,r.syscall=t,r}function y(e,t,r){var n={size:t.length,address:{},path:r};this.emit("message",t,n)}function v(){this.emit("writable")}function w(e,t){if("unix_dgram"!=e)throw new Error("Unsupported socket type: "+e);var r=c(l,a,0,y.bind(this),v.bind(this));if(r<0)throw m(r,"socket");this.fd=r,this.type=e,"function"==typeof t&&this.on("message",t)}t.createSocket=function(e,t){return"udp4"==e||"udp6"==e?o.createSocket(e,t):new w(e,t)},s.inherits(w,n.EventEmitter),w.prototype.bind=function(e){var t=u(this.fd,e);t<0?this.emit("error",m(t,"bind")):this.emit("listening")},w.prototype.connect=function(e){var t=d(this.fd,e);t<0?this.emit("error",m(t,"connect")):(this.connected=!0,this.emit("connect"))},w.prototype.send=function(e,t,r,n,o){var s,i,a;this.connected?(s=h(this.fd,e),o=t):s=p(this.fd,e,t,r,n),"function"==typeof o?s<0?o(m(s,"send")):1===s?o((i=s,(a=new Error("congestion")).code=i,a)):o():s<0?this.emit("error",m(s,"send")):1===s&&this.emit("congestion",e)},w.prototype.sendto=function(e,t,r,n,o){return this.send(e,t,r,n,o)},w.prototype.close=function(){var e=f(this.fd);if(e<0)throw new m(e,"close");this.fd=-1},w.prototype.address=function(){throw new Error("not implemented")},w.prototype.setTTL=function(e){throw new Error("not implemented")},w.prototype.setBroadcast=function(e){throw new Error("not implemented")},w.prototype.setMulticastTTL=function(e){throw new Error("not implemented")},w.prototype.setMulticastLoopback=function(e){throw new Error("not implemented")},w.prototype.addMembership=function(e,t){throw new Error("not implemented")},w.prototype.dropMembership=function(e,t){throw new Error("not implemented")}},4629:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function s(e){var n="[A-Za-z]",o="[0-9]",s=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+r("%[89A-Fa-f]"+s+"%"+s+s)+"|"+r("%"+s+s)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",u=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),d=r(n+t(n,o,"[\\+\\-\\.]")+"*"),p=r(r(i+"|"+t(u,a,"[\\:]"))+"*"),h=(r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("[1-9]"+o)+"|"+o),r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o)),f=r(h+"\\."+h+"\\."+h+"\\."+h),g=r(s+"{1,4}"),m=r(r(g+"\\:"+g)+"|"+f),y=r(r(g+"\\:")+"{6}"+m),v=r("\\:\\:"+r(g+"\\:")+"{5}"+m),w=r(r(g)+"?\\:\\:"+r(g+"\\:")+"{4}"+m),_=r(r(r(g+"\\:")+"{0,1}"+g)+"?\\:\\:"+r(g+"\\:")+"{3}"+m),b=r(r(r(g+"\\:")+"{0,2}"+g)+"?\\:\\:"+r(g+"\\:")+"{2}"+m),S=r(r(r(g+"\\:")+"{0,3}"+g)+"?\\:\\:"+g+"\\:"+m),E=r(r(r(g+"\\:")+"{0,4}"+g)+"?\\:\\:"+m),R=r(r(r(g+"\\:")+"{0,5}"+g)+"?\\:\\:"+g),k=r(r(r(g+"\\:")+"{0,6}"+g)+"?\\:\\:"),O=r([y,v,w,_,b,S,E,R,k].join("|")),x=r(r(u+"|"+i)+"+"),P=(r(O+"\\%25"+x),r(O+r("\\%25|\\%(?!"+s+"{2})")+x)),$=r("[vV]"+s+"+\\."+t(u,a,"[\\:]")+"+"),T=r("\\["+r(P+"|"+O+"|"+$)+"\\]"),I=r(r(i+"|"+t(u,a))+"*"),D=r(T+"|"+f+"(?!"+I+")|"+I),M=r(o+"*"),C=r(r(p+"@")+"?"+D+r("\\:"+M)+"?"),A=r(i+"|"+t(u,a,"[\\:\\@]")),N=r(A+"*"),L=r(A+"+"),j=r(r(i+"|"+t(u,a,"[\\@]"))+"+"),F=r(r("\\/"+N)+"*"),U=r("\\/"+r(L+F)+"?"),W=r(j+F),B=r(L+F),z="(?!"+A+")",V=(r(F+"|"+U+"|"+W+"|"+B+"|"+z),r(r(A+"|"+t("[\\/\\?]",c))+"*")),q=r(r(A+"|[\\/\\?]")+"*"),G=r(r("\\/\\/"+C+F)+"|"+U+"|"+B+"|"+z),H=r(d+"\\:"+G+r("\\?"+V)+"?"+r("\\#"+q)+"?"),Y=r(r("\\/\\/"+C+F)+"|"+U+"|"+W+"|"+z),K=r(Y+r("\\?"+V)+"?"+r("\\#"+q)+"?");return r(H+"|"+K),r(d+"\\:"+G+r("\\?"+V)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+D+")"+r("\\:("+M+")")+"?)")+"?("+F+"|"+U+"|"+B+"|"+z+")"),r("\\?("+V+")"),r("\\#("+q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+D+")"+r("\\:("+M+")")+"?)")+"?("+F+"|"+U+"|"+W+"|"+z+")"),r("\\?("+V+")"),r("\\#("+q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+D+")"+r("\\:("+M+")")+"?)")+"?("+F+"|"+U+"|"+B+"|"+z+")"),r("\\?("+V+")"),r("\\#("+q+")"),r("("+p+")@"),r("\\:("+M+")"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,a),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,l),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+s+"{2})")+"("+x+")")+"?\\]?$")}}var i=s(!1),a=s(!0),l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,s=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,s=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw s}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=36,d=/^xn--/,p=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function y(e){throw new RangeError(f[e])}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(h,".")).split("."),t).join(".")}function w(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&o)<<10)+(1023&s)+65536):(t.push(o),r--)}else t.push(o)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},b=function(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=u)e=g(e/35);return g(n+36*e/(e+38))},S=function(e){var t,r=[],n=e.length,o=0,s=128,i=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var l=0;l<a;++l)e.charCodeAt(l)>=128&&y("not-basic"),r.push(e.charCodeAt(l));for(var d=a>0?a+1:0;d<n;){for(var p=o,h=1,f=u;;f+=u){d>=n&&y("invalid-input");var m=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:u;(m>=u||m>g((c-o)/h))&&y("overflow"),o+=m*h;var v=f<=i?1:f>=i+26?26:f-i;if(m<v)break;var w=u-v;h>g(c/w)&&y("overflow"),h*=w}var _=r.length+1;i=b(o-p,_,0==p),g(o/_)>c-s&&y("overflow"),s+=g(o/_),o%=_,r.splice(o++,0,s)}return String.fromCodePoint.apply(String,r)},E=function(e){var t=[],r=(e=w(e)).length,n=128,o=0,s=72,i=!0,a=!1,l=void 0;try{for(var d,p=e[Symbol.iterator]();!(i=(d=p.next()).done);i=!0){var h=d.value;h<128&&t.push(m(h))}}catch(e){a=!0,l=e}finally{try{!i&&p.return&&p.return()}finally{if(a)throw l}}var f=t.length,v=f;for(f&&t.push("-");v<r;){var S=c,E=!0,R=!1,k=void 0;try{for(var O,x=e[Symbol.iterator]();!(E=(O=x.next()).done);E=!0){var P=O.value;P>=n&&P<S&&(S=P)}}catch(e){R=!0,k=e}finally{try{!E&&x.return&&x.return()}finally{if(R)throw k}}var $=v+1;S-n>g((c-o)/$)&&y("overflow"),o+=(S-n)*$,n=S;var T=!0,I=!1,D=void 0;try{for(var M,C=e[Symbol.iterator]();!(T=(M=C.next()).done);T=!0){var A=M.value;if(A<n&&++o>c&&y("overflow"),A==n){for(var N=o,L=u;;L+=u){var j=L<=s?1:L>=s+26?26:L-s;if(N<j)break;var F=N-j,U=u-j;t.push(m(_(j+F%U,0))),N=g(F/U)}t.push(m(_(N,0))),s=b(o,$,v==f),o=0,++v}}}catch(e){I=!0,D=e}finally{try{!T&&C.return&&C.return()}finally{if(I)throw D}}++o,++n}return t.join("")},R={version:"2.1.0",ucs2:{decode:w,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(e))}},decode:S,encode:E,toASCII:function(e){return v(e,(function(e){return p.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return v(e,(function(e){return d.test(e)?S(e.slice(4).toLowerCase()):e}))}},k={};function O(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>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 x(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function P(e,t){function r(e){var r=x(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,O).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,O).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,O).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,O).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,O).replace(t.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function T(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map($).join("."):e}function I(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],s=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),a=l(i,2),c=a[0],u=a[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=t.IPV4ADDRESS.test(p[p.length-1]),f=h?7:8,g=p.length-f,m=Array(f),y=0;y<f;++y)m[y]=d[y]||p[g+y]||"";h&&(m[f-1]=T(m[f-1],t));var v=m.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(v&&v.length>1){var _=m.slice(0,v.index),b=m.slice(v.index+v.length);w=_.join(":")+"::"+b.join(":")}else w=m.join(":");return s&&(w+="%"+s),w}return e}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,M=void 0==="".match(/(){0}/)[1];function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:i;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(D);if(o){M?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=I(T(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var s=k[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)P(r,n);else{if(r.host&&(t.domainHost||s&&s.domainHost))try{r.host=R.toASCII(r.host.replace(n.PCT_ENCODED,x).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}P(r,i)}s&&s.parse&&s.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}var A=/^\.\.?\//,N=/^\/\.(\/|$)/,L=/^\/\.\.(\/|$)/,j=/^\/?(?:.|\n)*?(?=\/|$)/;function F(e){for(var t=[];e.length;)if(e.match(A))e=e.replace(A,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(L))e=e.replace(L,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(j);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:i,n=[],o=k[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?R.toUnicode(e.host):R.toASCII(e.host.replace(r.PCT_ENCODED,x).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}P(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var s=function(e,t){var r=!1!==t.iri?a:i,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(I(T(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}(e,t);if(void 0!==s&&("suffix"!==t.reference&&n.push("//"),n.push(s),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var l=e.path;t.absolutePath||o&&o.absolutePath||(l=F(l)),void 0===s&&(l=l.replace(/^\/\//,"/%2F")),n.push(l)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function W(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=C(U(e,r),r),t=C(U(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=F(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=F(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function B(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:i.PCT_ENCODED,x)}var z={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 r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},V={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};function q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var G={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=q(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(q(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 r=e.resourceName.split("?"),n=l(r,2),o=n[0],s=n[1];e.path=o&&"/"!==o?o:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},H={scheme:"wss",domainHost:G.domainHost,parse:G.parse,serialize:G.serialize},Y={},K="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",J="[0-9A-Fa-f]",X=r(r("%[EFef]"+J+"%"+J+J+"%"+J+J)+"|"+r("%[89A-Fa-f]"+J+"%"+J+J)+"|"+r("%"+J+J)),Q=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Z=new RegExp(K,"g"),ee=new RegExp(X,"g"),te=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Q),"g"),re=new RegExp(t("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=re;function oe(e){var t=x(e);return t.match(Z)?t:e}var se={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,s={},i=r.query.split("&"),a=0,l=i.length;a<l;++a){var c=i[a].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)n.push(u[d]);break;case"subject":r.subject=B(c[1],t);break;case"body":r.body=B(c[1],t);break;default:o=!0,s[B(c[0],t)]=B(c[1],t)}}o&&(r.headers=s)}r.query=void 0;for(var h=0,f=n.length;h<f;++h){var g=n[h].split("@");if(g[0]=B(g[0]),t.unicodeSupport)g[1]=B(g[1],t).toLowerCase();else try{g[1]=R.toASCII(B(g[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=g.join("@")}return r},serialize:function(e,t){var r,n=e,s=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(s){for(var i=0,a=s.length;i<a;++i){var l=String(s[i]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(ee,oe).replace(ee,o).replace(te,O),d=l.slice(c+1);try{d=t.iri?R.toUnicode(d):R.toASCII(B(d,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}s[i]=u+"@"+d}n.path=s.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var f in p)p[f]!==Y[f]&&h.push(f.replace(ee,oe).replace(ee,o).replace(re,O)+"="+p[f].replace(ee,oe).replace(ee,o).replace(ne,O));return h.length&&(n.query=h.join("&")),n}},ie=/^([^\:]+)\:(.*)/,ae={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ie),n=e;if(r){var o=t.scheme||n.scheme||"urn",s=r[1].toLowerCase(),i=r[2],a=o+":"+(t.nid||s),l=k[a];n.nid=s,n.nss=i,n.path=void 0,l&&(n=l.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),s=k[o];s&&(e=s.serialize(e,t));var i=e,a=e.nss;return i.path=(n||t.nid)+":"+a,i}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};k[z.scheme]=z,k[V.scheme]=V,k[G.scheme]=G,k[H.scheme]=H,k[se.scheme]=se,k[ae.scheme]=ae,k[ce.scheme]=ce,e.SCHEMES=k,e.pctEncChar=O,e.pctDecChars=x,e.parse=C,e.removeDotSegments=F,e.serialize=U,e.resolveComponents=W,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return U(W(C(e,n),C(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(C(e,t),t):"object"===n(e)&&(e=C(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(C(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(C(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=B,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9761:(e,t,r)=>{e.exports=r(3837).deprecate},9443:(e,t,r)=>{"use strict";r.r(t),r.d(t,{NIL:()=>R,parse:()=>v,stringify:()=>p,v1:()=>y,v3:()=>_,v4:()=>S,v5:()=>E,validate:()=>c,version:()=>k});var n=r(6113),o=r.n(n);const s=new Uint8Array(256);let i=s.length;function a(){return i>s.length-16&&(o().randomFillSync(s),i=0),s.slice(i,i+=16)}const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,c=function(e){return"string"==typeof e&&l.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));function d(e,t=0){return u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]}const p=function(e,t=0){const r=d(e,t);if(!c(r))throw TypeError("Stringified UUID is invalid");return r};let h,f,g=0,m=0;const y=function(e,t,r){let n=t&&r||0;const o=t||new Array(16);let s=(e=e||{}).node||h,i=void 0!==e.clockseq?e.clockseq:f;if(null==s||null==i){const t=e.random||(e.rng||a)();null==s&&(s=h=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==i&&(i=f=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:m+1;const u=l-g+(c-m)/1e4;if(u<0&&void 0===e.clockseq&&(i=i+1&16383),(u<0||l>g)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=l,m=c,f=i,l+=122192928e5;const p=(1e4*(268435455&l)+c)%4294967296;o[n++]=p>>>24&255,o[n++]=p>>>16&255,o[n++]=p>>>8&255,o[n++]=255&p;const y=l/4294967296*1e4&268435455;o[n++]=y>>>8&255,o[n++]=255&y,o[n++]=y>>>24&15|16,o[n++]=y>>>16&255,o[n++]=i>>>8|128,o[n++]=255&i;for(let e=0;e<6;++e)o[n+e]=s[e];return t||d(o)},v=function(e){if(!c(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function w(e,t,r){function n(e,n,o,s){var i;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=v(n)),16!==(null===(i=n)||void 0===i?void 0:i.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),a=r(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,o){s=s||0;for(let e=0;e<16;++e)o[s+e]=a[e];return o}return d(a)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}const _=w("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("md5").update(e).digest()})),b={randomUUID:o().randomUUID},S=function(e,t,r){if(b.randomUUID&&!t&&!e)return b.randomUUID();const n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return d(n)},E=w("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("sha1").update(e).digest()})),R="00000000-0000-0000-0000-000000000000",k=function(e){if(!c(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},5930:(e,t)=>{"use strict";t.parseProtocol=function(e){switch(e){case"unix":case"unix-connect":return{type:"unix",family:null,isDgram:!0};case"udp":case"udp4":return{type:"udp",family:4,isDgram:!0};case"udp6":return{type:"udp",family:6,isDgram:!0};case"tcp":case"tcp4":return{type:"tcp",family:4};case"tcp6":return{type:"tcp",family:6};case"tls":case"tls4":return{type:"tls",family:4};case"tls6":return{type:"tls",family:6};default:throw new Error("Invalid syslog protocol: "+e)}}},8597:(e,t,r)=>{const n=r(1891),o=r(1808),s=r(4404),i=r(5930),a=r(2315),l=r(1935),c=r(5481),{MESSAGE:u,LEVEL:d}=r(1520),p=()=>{};if(Number(l.version.split(".")[0])<3)throw new Error("Winston-syslog requires winston >= 3.0.0");const h=Object.keys({debug:0,info:1,notice:2,warning:3,warn:3,error:4,err:4,crit:5,alert:6,emerg:7});class f extends c{get name(){return"syslog"}constructor(e={}){super(e),this.connected=!1,this.congested=!1,this.retries=0,this.queue=[],this.inFlight=0,this.setOptions(e),this.socket=null;var t=e.customProducer||a.Produce;this.producer=new t({type:this.type,appName:this.appName,pid:this.pid,facility:this.facility})}setOptions(e){this.host=e.host||"localhost",this.port=e.port||514,this.path=e.path||null,this.protocol=e.protocol||"udp4",this.protocolOptions=e.protocolOptions||{},this.endOfLine=e.eol,this.parseProtocol(this.protocol),this.secureProtocol=e.secureProtocol,this.ciphers=e.ciphers,this.ecdhCurve=e.ecdhCurve,this.rejectUnauthorized=e.rejectUnauthorized,this.requestCert=e.requestCert,this.localhost=void 0!==e.localhost?e.localhost:"localhost",this.type=e.type||"BSD",this.facility=e.facility||"local0",this.pid=e.pid||process.pid,this.appName=e.appName||e.app_name||process.title}parseProtocol(e=this.protocol){const t=i.parseProtocol(e);if(this.protocolType=t.type,this.protocolFamily=t.family,this.isDgram=t.isDgram,"unix"===this.protocolType&&!this.path)throw new Error("`options.path` is required on unix dgram sockets.")}chunkMessage(e,t=p){if(this.connected){const r=65507;let n=0;for(;n<e.length;){this.inFlight++;const o=n+r>e.length?e.length-n:r;this._sendChunk(e,{offset:n,length:o,port:this.port,host:this.host},t),n+=o}}else this.queue.push(e)}_sendChunk(e,t,r){try{this.socket.send(e,t.offset,t.length,t.port,t.host,r)}catch(e){return r(e)}}log(e,t){let r=e[d];if(!~h.indexOf(r))return t(new Error("Cannot log unknown syslog level: "+e[d]));r="warn"===r?"warning":r;const n=e[u],o=this.producer.produce({severity:r,host:this.localhost,appName:this.appName,date:new Date,message:this.endOfLine?n+this.endOfLine:n});this.connect((r=>{if(r)return this.queue.push(o),t();const n=t=>{t&&(this.queue.push(o),this.emit("error",t)),this.emit("logged",e),this.inFlight--},s=()=>{n(new Error("Congestion Error"))};this.isDgram?(()=>{const e=Buffer.from(o);"udp"===this.protocolType?this.chunkMessage(e,n):"unix"===this.protocol?(this.inFlight++,this.socket.send(e,0,e.length,this.path,n)):this.congested?this.queue.push(o):(this.socket.once("congestion",s),this.inFlight++,this.socket.send(e,(e=>{this.socket.removeListener("congestion",s),n(e)})))})():this.socket.write(o,"utf8",n),t(null,!0)}))}close(){let e=0;const t=()=>{e>=6||0===this.queue.length&&this.inFlight<=0?(this.socket&&(this.socket.destroy?this.socket.destroy():this.socket.close&&this.socket.close()),this.emit("closed",this.socket)):(e++,setTimeout(t,200*e))};t()}connectDgram(e){if("unix-connect"===this.protocol)return this._unixDgramConnect(e);if("unix"===this.protocol)this.socket=r(3772).createSocket("unix_dgram");else if(!this.socket){const e="udp"===this.protocol?"udp4":this.protocol;this.socket=n.createSocket({type:e}).on("listening",(()=>{this.connected=!0;let e=this.queue.shift();for(;e;)this.chunkMessage(e),e=this.queue.shift()})),this.socket.bind()}return e(null)}connect(e){if(this.socket)return!this.socket.readyState||"open"===this.socket.readyState||this.socket.connected?e(null):e(!0);if(this.isDgram)return this.connectDgram(e);const t={secureProtocol:this.secureProtocol,ciphers:this.ciphers,ecdhCurve:this.ecdhCurve,rejectUnauthorized:this.rejectUnauthorized,requestCert:this.requestCert};this.socket=/^tls[4|6]?$/.test(this.protocol)?new s.TLSSocket(this.socket,t):new o.Socket,this.socket.setKeepAlive(!0),this.socket.setNoDelay(),this.setupEvents();const r=Object.assign({},this.protocolOptions,{host:this.host,port:this.port});this.protocolFamily&&(r.family=this.protocolFamily),this.socket.connect(r),e(!0)}setupEvents(){const e=e=>{e&&this.emit("error",e),this.emit("logged"),this.inFlight--};this.socket.on("connect",(()=>{this.socket.write(this.queue.join(""),"utf8",e),this.emit("logged"),this.queue=[],this.retries=0,this.connected=!0})).on("error",(function(){})).on("close",(()=>{const e=Math.pow(2,this.retries);this.connected=!1,setTimeout((()=>{this.retries++,this.socket.connect(this.port,this.host)}),1e3*e)})).on("timeout",(()=>{this.socket.destroy?this.socket.destroy():this.socket.close&&this.socket.close()}))}_unixDgramConnect(e){const t=this,n=()=>{let e=0;this.queue.forEach((t=>{const r=Buffer.from(t);this.congested||("udp"===this.protocolType?this.chunkMessage(r,(()=>{++e})):this.socket.send(r,(function(){++e})))})),this.queue.splice(0,e)};this.socket=r(3772).createSocket("unix_dgram"),this.socket.on("error",(t=>{if(this.emit("error",t),"connect"===t.syscall)return this.socket.close(),this.socket=null,e(t);"send"===t.syscall&&(this.socket.close(),this.socket=null)})),this.socket.on("connect",(function(){this.on("congestion",(()=>{t.congested=!0})),this.on("writable",(()=>{t.congested=!1,n()})),n(),e()})),this.socket.connect(this.path)}}l.transports.Syslog=f,e.exports={Syslog:f}},5481:(e,t,r)=>{"use strict";e.exports=r(196),e.exports.LegacyTransportStream=r(6901)},6901:(e,t,r)=>{"use strict";const n=r(3837),{LEVEL:o}=r(1520),s=r(196),i=e.exports=function(e={}){if(s.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(i,s),i.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);(!this.level||this.levels[this.level]>=this.levels[e[o]])&&this.transport.log(e[o],e.message,e,this._nop),r(null)},i.prototype._writev=function(e,t){for(let t=0;t<e.length;t++)this._accept(e[t])&&(this.transport.log(e[t].chunk[o],e[t].chunk.message,e[t].chunk,this._nop),e[t].callback());return t(null)},i.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},i.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},196:(e,t,r)=>{"use strict";const n=r(3837),o=r(3376),{LEVEL:s}=r(1520),i=e.exports=function(e={}){o.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};n.inherits(i,o),i.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);const n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[s]]){if(e&&!this.format)return this.log(e,r);let t,n;try{n=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!n){if(r(),t)throw t;return}return this.log(n,r)}return this._writableState.sync=!1,r(null)},i.prototype._writev=function(e,t){if(this.logv){const r=e.filter(this._accept,this);return r.length?this.logv(r,t):t(null)}for(let r=0;r<e.length;r++){if(!this._accept(e[r]))continue;if(e[r].chunk&&!this.format){this.log(e[r].chunk,e[r].callback);continue}let n,o;try{o=this.format.transform(Object.assign({},e[r].chunk),this.format.options)}catch(e){n=e}if(n||!o){if(e[r].callback(),n)throw t(null),n}else this.log(o,e[r].callback)}return t(null)},i.prototype._accept=function(e){const t=e.chunk;if(this.silent)return!1;const r=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&r&&!(this.levels[r]>=this.levels[t[s]])||!this.handleExceptions&&!0===t.exception)},i.prototype._nop=function(){}},1935:(e,t,r)=>{"use strict";const n=r(3545),{warn:o}=r(8242);t.version=r(2561).version,t.transports=r(2408),t.config=r(3695),t.addColors=n.levels,t.format=n.format,t.createLogger=r(9105),t.Logger=r(6120),t.ExceptionHandler=r(4595),t.RejectionHandler=r(8827),t.Container=r(6718),t.Transport=r(5481),t.loggers=new t.Container;const s=t.createLogger();Object.keys(t.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((e=>t[e]=(...t)=>s[e](...t))),Object.defineProperty(t,"level",{get:()=>s.level,set(e){s.level=e}}),Object.defineProperty(t,"exceptions",{get:()=>s.exceptions}),["exitOnError"].forEach((e=>{Object.defineProperty(t,e,{get:()=>s[e],set(t){s[e]=t}})})),Object.defineProperty(t,"default",{get:()=>({exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports})}),o.deprecated(t,"setLevels"),o.forFunctions(t,"useFormat",["cli"]),o.forProperties(t,"useFormat",["padLevels","stripColors"]),o.forFunctions(t,"deprecated",["addRewriter","addFilter","clone","extend"]),o.forProperties(t,"deprecated",["emitErrs","levelLength"])},8242:(e,t,r)=>{"use strict";const{format:n}=r(3837);t.warn={deprecated:e=>()=>{throw new Error(n("{ %s } was removed in winston@3.0.0.",e))},useFormat:e=>()=>{throw new Error([n("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))},forFunctions(e,r,n){n.forEach((n=>{e[n]=t.warn[r](n)}))},forProperties(e,r,n){n.forEach((n=>{const o=t.warn[r](n);Object.defineProperty(e,n,{get:o,set:o})}))}}},3695:(e,t,r)=>{"use strict";const n=r(3545),{configs:o}=r(1520);t.cli=n.levels(o.cli),t.npm=n.levels(o.npm),t.syslog=n.levels(o.syslog),t.addColors=n.levels},6718:(e,t,r)=>{"use strict";const n=r(9105);e.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,t){if(!this.loggers.has(e)){const r=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=r?Array.isArray(r)?r.slice():[r]:[];const o=n(t);o.on("close",(()=>this._delete(e))),this.loggers.set(e,o)}return this.loggers.get(e)}get(e,t){return this.add(e,t)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach(((e,t)=>this._removeLogger(t)))}_removeLogger(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}_delete(e){this.loggers.delete(e)}}},9105:(e,t,r)=>{"use strict";const{LEVEL:n}=r(1520),o=r(3695),s=r(6120),i=r(9066)("winston:create-logger");e.exports=function(e={}){e.levels=e.levels||o.npm.levels;class t extends s{constructor(e){super(e)}}const r=new t(e);return Object.keys(e.levels).forEach((function(e){i('Define prototype method for "%s"',e),"log"!==e?(t.prototype[e]=function(...t){const o=this||r;if(1===t.length){const[s]=t,i=s&&s.message&&s||{message:s};return i.level=i[n]=e,o._addDefaultMeta(i),o.write(i),this||r}return 0===t.length?(o.log(e,""),o):o.log(e,...t)},t.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(e)]=function(){return(this||r).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),r}},4595:(e,t,r)=>{"use strict";const n=r(2037),o=r(905),s=r(9066)("winston:exception"),i=r(1231),a=r(2735),l=r(9446);e.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e))return e.forEach((e=>this._addHandler(e)));this._addHandler(e)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e))))}getAllInfo(e){let t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:n.loadavg(),uptime:n.uptime()}}getTrace(e){return(e?a.parse(e):a.get()).map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;const t=new l(e);this.handlers.set(e,t),this.logger.pipe(t)}}_uncaughtException(e){const t=this.getAllInfo(e),r=this._getExceptionHandlers();let n,a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function l(){s("doExit",a),s("process._exiting",process._exiting),a&&!process._exiting&&(n&&clearTimeout(n),process.exit(1))}if(!r.length&&a&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),a=!1),!r||0===r.length)return process.nextTick(l);o(r,((e,t)=>{const r=i(t),n=e.transport||e;function o(e){return()=>{s(e),r()}}n._ending=!0,n.once("finish",o("finished")),n.once("error",o("error"))}),(()=>a&&l())),this.logger.log(t),a&&(n=setTimeout(l,3e3))}_getExceptionHandlers(){return this.logger.transports.filter((e=>(e.transport||e).handleExceptions))}}},9446:(e,t,r)=>{"use strict";const{Writable:n}=r(8073);e.exports=class extends n{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,t,r){return e.exception?this.transport.log(e,r):(r(),!0)}}},6120:(e,t,r)=>{"use strict";const{Stream:n,Transform:o}=r(8073),s=r(905),{LEVEL:i,SPLAT:a}=r(1520),l=r(2090),c=r(4595),u=r(8827),d=r(6901),p=r(2853),{warn:h}=r(8242),f=r(3695),g=/%[scdjifoO%]/g;class m extends o{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){const t=this;return Object.create(t,{write:{value:function(r){const n=Object.assign({},e,r);r instanceof Error&&(n.stack=r.stack,n.message=r.message),t.write(n)}}})}configure({silent:e,format:t,defaultMeta:n,levels:o,level:s="info",exitOnError:i=!0,transports:a,colors:l,emitErrs:d,formatters:p,padLevels:h,rewriters:g,stripColors:m,exceptionHandlers:y,rejectionHandlers:v}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=t||this.format||r(1528)(),this.defaultMeta=n||null,this.levels=o||this.levels||f.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new c(this),this.rejections=new u(this),this.profilers={},this.exitOnError=i,a&&(a=Array.isArray(a)?a:[a]).forEach((e=>this.add(e))),l||d||p||h||g||m)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));y&&this.exceptions.handle(y),v&&this.rejections.handle(v)}isLevelEnabled(e){const t=y(this.levels,e);if(null===t)return!1;const r=y(this.levels,this.level);return null!==r&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((e=>{let n=y(this.levels,e.level);return null===n&&(n=r),n>=t})):r>=t)}log(e,t,...r){if(1===arguments.length)return e[i]=e.level,this._addDefaultMeta(e),this.write(e),this;if(2===arguments.length)return t&&"object"==typeof t?(t[i]=t.level=e,this._addDefaultMeta(t),this.write(t),this):(t={[i]:e,level:e,message:t},this._addDefaultMeta(t),this.write(t),this);const[n]=r;if("object"==typeof n&&null!==n&&!(t&&t.match&&t.match(g))){const o=Object.assign({},this.defaultMeta,n,{[i]:e,[a]:r,level:e,message:t});return n.message&&(o.message=`${o.message} ${n.message}`),n.stack&&(o.stack=n.stack),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[i]:e,[a]:r,level:e,message:t})),this}_transform(e,t,r){if(this.silent)return r();e[i]||(e[i]=e.level),this.levels[e[i]]||0===this.levels[e[i]]||console.error("[winston] Unknown logger level: %s",e[i]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,r()}}_final(e){const t=this.transports.slice();s(t,((e,t)=>{if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}add(e){const t=!l(e)||e.log.length>2?new d({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let t=e;return(!l(e)||e.log.length>2)&&(t=this.transports.filter((t=>t.transport===e))[0]),t&&this.unpipe(t),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){h.deprecated("setLevels")}query(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};const r={},n=Object.assign({},e.query||{});s(this.transports.filter((e=>!!e.query)),(function(t,o){!function(t,r){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(n)),t.query(e,((n,o)=>{if(n)return r(n);"function"==typeof t.formatResults&&(o=t.formatResults(o,e.format)),r(null,o)}))}(t,((e,n)=>{o&&((n=e||n)&&(r[t.name]=n),o()),o=null}))}),(()=>t(null,r)))}stream(e={}){const t=new n,r=[];return t._streams=r,t.destroy=()=>{let e=r.length;for(;e--;)r[e].destroy()},this.transports.filter((e=>!!e.stream)).forEach((n=>{const o=n.stream(e);o&&(r.push(o),o.on("log",(e=>{e.transport=e.transport||[],e.transport.push(n.name),t.emit("log",e)})),o.on("error",(e=>{e.transport=e.transport||[],e.transport.push(n.name),t.emit("error",e)})))})),t}startTimer(){return new p(this)}profile(e,...t){const r=Date.now();if(this.profilers[e]){const n=this.profilers[e];delete this.profilers[e],"function"==typeof t[t.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop());const o="object"==typeof t[t.length-1]?t.pop():{};return o.level=o.level||"info",o.durationMs=r-n,o.message=o.message||e,this.write(o)}return this.profilers[e]=r,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}_onEvent(e,t){t["__winston"+e]||(t["__winston"+e]=function(r){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,r,t)}.bind(this),t.on(e,t["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}function y(e,t){const r=e[t];return r||0===r?r:null}Object.defineProperty(m.prototype,"transports",{configurable:!1,enumerable:!0,get(){const{pipes:e}=this._readableState;return Array.isArray(e)?e:[e].filter(Boolean)}}),e.exports=m},2853:(e,t,r)=>{"use strict";e.exports=class{constructor(e){const t=r(6120);if("object"!=typeof e||Array.isArray(e)||!(e instanceof t))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){"function"==typeof e[e.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());const t="object"==typeof e[e.length-1]?e.pop():{};return t.level=t.level||"info",t.durationMs=Date.now()-this.start,this.logger.write(t)}}},8827:(e,t,r)=>{"use strict";const n=r(2037),o=r(905),s=r(9066)("winston:rejection"),i=r(1231),a=r(2735),l=r(9446);e.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e))return e.forEach((e=>this._addHandler(e)));this._addHandler(e)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e))))}getAllInfo(e){let t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:n.loadavg(),uptime:n.uptime()}}getTrace(e){return(e?a.parse(e):a.get()).map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;const t=new l(e);this.handlers.set(e,t),this.logger.pipe(t)}}_unhandledRejection(e){const t=this.getAllInfo(e),r=this._getRejectionHandlers();let n,a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function l(){s("doExit",a),s("process._exiting",process._exiting),a&&!process._exiting&&(n&&clearTimeout(n),process.exit(1))}if(!r.length&&a&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),a=!1),!r||0===r.length)return process.nextTick(l);o(r,((e,t)=>{const r=i(t),n=e.transport||e;function o(e){return()=>{s(e),r()}}n._ending=!0,n.once("finish",o("finished")),n.once("error",o("error"))}),(()=>a&&l())),this.logger.log(t),a&&(n=setTimeout(l,3e3))}_getRejectionHandlers(){return this.logger.transports.filter((e=>(e.transport||e).handleRejections))}}},1280:(e,t,r)=>{"use strict";const n=r(7147),{StringDecoder:o}=r(1576),{Stream:s}=r(8073);function i(){}e.exports=(e,t)=>{const r=Buffer.alloc(65536),a=new o("utf8"),l=new s;let c="",u=0,d=0;return-1===e.start&&delete e.start,l.readable=!0,l.destroy=()=>{l.destroyed=!0,l.emit("end"),l.emit("close")},n.open(e.file,"a+","0644",((o,s)=>{if(o)return t?t(o):l.emit("error",o),void l.destroy();!function o(){if(!l.destroyed)return n.read(s,r,0,r.length,u,((n,s)=>{if(n)return t?t(n):l.emit("error",n),void l.destroy();if(!s)return c&&((null==e.start||d>e.start)&&(t?t(null,c):l.emit("line",c)),d++,c=""),setTimeout(o,1e3);let i=a.write(r.slice(0,s));t||l.emit("data",i),i=(c+i).split(/\n+/);const p=i.length-1;let h=0;for(;h<p;h++)(null==e.start||d>e.start)&&(t?t(null,i[h]):l.emit("line",i[h])),d++;return c=i[p],u+=s,o()}));n.close(s,i)}()})),t?l.destroy:l}},4837:(e,t,r)=>{"use strict";const n=r(2037),{LEVEL:o,MESSAGE:s}=r(1520),i=r(5481);e.exports=class extends i{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol="string"==typeof e.eol?e.eol:n.EOL,this.setMaxListeners(30)}log(e,t){return setImmediate((()=>this.emit("logged",e))),this.stderrLevels[e[o]]?(console._stderr?console._stderr.write(`${e[s]}${this.eol}`):console.error(e[s]),void(t&&t())):this.consoleWarnLevels[e[o]]?(console._stderr?console._stderr.write(`${e[s]}${this.eol}`):console.warn(e[s]),void(t&&t())):(console._stdout?console._stdout.write(`${e[s]}${this.eol}`):console.log(e[s]),void(t&&t()))}_stringArrayToSet(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce(((e,r)=>{if("string"!=typeof r)throw new Error(t);return e[r]=!0,e}),{})}}},4653:(e,t,r)=>{"use strict";const n=r(7147),o=r(1017),s=r(360),i=r(9796),{MESSAGE:a}=r(1520),{Stream:l,PassThrough:c}=r(8073),u=r(5481),d=r(9066)("winston:file"),p=r(2037),h=r(1280);e.exports=class extends u{constructor(e={}){function t(t,...r){r.slice(1).forEach((r=>{if(e[r])throw new Error(`Cannot set ${r} and ${t} together`)}))}if(super(e),this.name=e.name||"file",this._stream=new c,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)t("filename or dirname","stream"),this._basename=this.filename=e.filename?o.basename(e.filename):"winston.log",this.dirname=e.dirname||o.dirname(e.filename),this.options=e.options||{flags:"a"};else{if(!e.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),t("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=o.dirname(this._dest.path)}this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol="string"==typeof e.eol?e.eol:p.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",(()=>{this._stream.once("finish",(()=>this.emit("finish"))),setImmediate((()=>this._stream.end()))})):(this._stream.once("finish",(()=>this.emit("finish"))),setImmediate((()=>this._stream.end()))))}log(e,t=(()=>{})){if(this.silent)return t(),!0;if(this._drain)return void this._stream.once("drain",(()=>{this._drain=!1,this.log(e,t)}));if(this._rotate)return void this._stream.once("rotate",(()=>{this._rotate=!1,this.log(e,t)}));if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(()=>{this._fileExist=!0,this.log(e,t)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(()=>{this._opening||this.open(),this.once("open",(()=>{this.log(e,t)}))}))}const r=`${e[a]}${this.eol}`,n=Buffer.byteLength(r);this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);const o=this._stream.write(r,function(){this._size+=n,this._pendingSize-=n,d("logged %s %s",this._size,r),this.emit("logged",e),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((()=>{this.emit("fileclosed")})):(this._rotate=!0,this._endStream((()=>this._rotateFile()))))}.bind(this));return o?t():(this._drain=!0,this._stream.once("drain",(()=>{this._drain=!1,t()}))),d("written",o,this._drain),this.finishIfEnding(),o}query(e,t){"function"==typeof e&&(t=e,e={}),e=function(e){return(e=e||{}).rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,"object"!=typeof e.until&&(e.until=new Date(e.until)),e.from=e.from||e.until-864e5,"object"!=typeof e.from&&(e.from=new Date(e.from)),e.order=e.order||"desc",e}(e);const r=o.join(this.dirname,this.filename);let s="",i=[],a=0;const l=n.createReadStream(r,{encoding:"utf8"});function c(t,r){try{const r=JSON.parse(t);(function(t){if(!t)return;if("object"!=typeof t)return;const r=new Date(t.timestamp);return!(e.from&&r<e.from||e.until&&r>e.until||e.level&&e.level!==t.level)||void 0})(r)&&function(t){e.rows&&i.length>=e.rows&&"desc"!==e.order?l.readable&&l.destroy():(e.fields&&(t=e.fields.reduce(((e,r)=>(e[r]=t[r],e)),{})),"desc"===e.order&&i.length>=e.rows&&i.shift(),i.push(t))}(r)}catch(e){r||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),t)return"ENOENT"!==e.code?t(e):t(null,i)})),l.on("data",(t=>{const r=(t=(s+t).split(/\n+/)).length-1;let n=0;for(;n<r;n++)(!e.start||a>=e.start)&&c(t[n]),a++;s=t[r]})),l.on("close",(()=>{s&&c(s,!0),"desc"===e.order&&(i=i.reverse()),t&&t(null,i)}))}stream(e={}){const t=o.join(this.dirname,this.filename),r=new l,n={file:t,start:e.start};return r.destroy=h(n,((e,t)=>{if(e)return r.emit("error",e);try{r.emit("data",t),t=JSON.parse(t),r.emit("log",t)}catch(e){r.emit("error",e)}})),r}open(){this.filename&&(this._opening||(this._opening=!0,this.stat(((e,t)=>{if(e)return this.emit("error",e);d("stat done: %s { size: %s }",this.filename,t),this._size=t,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",(()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1}))}))))}stat(e){const t=this._getFile(),r=o.join(this.dirname,t);n.stat(r,((n,o)=>n&&"ENOENT"===n.code?(d("ENOENT ok",r),this.filename=t,e(null,0)):n?(d(`err ${n.code} ${r}`),e(n)):!o||this._needsNewFile(o.size)?this._incFile((()=>this.stat(e))):(this.filename=t,void e(null,o.size))))}close(e){this._stream&&this._stream.end((()=>{e&&e(),this.emit("flush"),this.emit("closed")}))}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile((()=>this.open()))}_endStream(e=(()=>{})){this._dest?(this._stream.unpipe(this._dest),this._dest.end((()=>{this._cleanupStream(this._dest),e()}))):e()}_createStream(e){const t=o.join(this.dirname,this.filename);d("create stream start",t,this.options);const r=n.createWriteStream(t,this.options).on("error",(e=>d(e))).on("close",(()=>d("close",r.path,r.bytesWritten))).on("open",(()=>{d("file open ok",t),this.emit("open",t),e.pipe(r),this.rotatedWhileOpening&&(this._stream=new c,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(r),e.end())}));if(d("create stream ok",t),this.zippedArchive){const e=i.createGzip();return e.pipe(r),e}return r}_incFile(e){d("_incFile",this.filename);const t=o.extname(this._basename),r=o.basename(this._basename,t);this.tailable?this._checkMaxFilesTailable(t,r,e):(this._created+=1,this._checkMaxFilesIncrementing(t,r,e))}_getFile(){const e=o.extname(this._basename),t=o.basename(this._basename,e),r=this.rotationFormat?this.rotationFormat():this._created,n=!this.tailable&&this._created?`${t}${r}${e}`:`${t}${e}`;return this.zippedArchive&&!this.tailable?`${n}.gz`:n}_checkMaxFilesIncrementing(e,t,r){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(r);const s=this._created-this.maxFiles,i=`${t}${0!==s?s:""}${e}${this.zippedArchive?".gz":""}`,a=o.join(this.dirname,i);n.unlink(a,r)}_checkMaxFilesTailable(e,t,r){const i=[];if(!this.maxFiles)return;const a=this.zippedArchive?".gz":"";for(let r=this.maxFiles-1;r>1;r--)i.push(function(r,s){let i=`${t}${r-1}${e}${a}`;const l=o.join(this.dirname,i);n.exists(l,(c=>{if(!c)return s(null);i=`${t}${r}${e}${a}`,n.rename(l,o.join(this.dirname,i),s)}))}.bind(this,r));s(i,(()=>{n.rename(o.join(this.dirname,`${t}${e}`),o.join(this.dirname,`${t}1${e}${a}`),r)}))}_createLogDirIfNotExist(e){n.existsSync(e)||n.mkdirSync(e,{recursive:!0})}}},5012:(e,t,r)=>{"use strict";const n=r(3685),o=r(5687),{Stream:s}=r(8073),i=r(5481),a=r(1841);e.exports=class extends i{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,t){this._request(e,null,null,((t,r)=>{r&&200!==r.statusCode&&(t=new Error(`Invalid HTTP Status Code: ${r.statusCode}`)),t?this.emit("warn",t):this.emit("logged",e)})),t&&setImmediate(t)}query(e,t){"function"==typeof e&&(t=e,e={});const r=(e={method:"query",params:this.normalizeQuery(e)}).params.auth||null;delete e.params.auth;const n=e.params.path||null;delete e.params.path,this._request(e,r,n,((e,r,n)=>{if(r&&200!==r.statusCode&&(e=new Error(`Invalid HTTP Status Code: ${r.statusCode}`)),e)return t(e);if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return t(e)}t(null,n)}))}stream(e={}){const t=new s,r=(e={method:"stream",params:e}).params.path||null;delete e.params.path;const n=e.params.auth||null;delete e.params.auth;let o="";const i=this._request(e,n,r);return t.destroy=()=>i.destroy(),i.on("data",(e=>{const r=(e=(o+e).split(/\n+/)).length-1;let n=0;for(;n<r;n++)try{t.emit("log",JSON.parse(e[n]))}catch(e){t.emit("error",e)}o=e[r]})),i.on("error",(e=>t.emit("error",e))),t}_request(e,t,r,n){e=e||{},t=t||this.auth,r=r||this.path||"",this.batch?this._doBatch(e,n,t,r):this._doRequest(e,n,t,r)}_doBatch(e,t,r,n){if(this.batchOptions.push(e),1===this.batchOptions.length){const e=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){e.batchTimeoutID=-1,e._doBatchRequest(e.batchCallback,r,n)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,r,n)}_doBatchRequest(e,t,r){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);const n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,t,r)}_doRequest(e,t,r,s){const i=Object.assign({},this.headers);r&&r.bearer&&(i.Authorization=`Bearer ${r.bearer}`);const l=(this.ssl?o:n).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${s.replace(/^\//,"")}`,headers:i,auth:r&&r.username&&r.password?`${r.username}:${r.password}`:"",agent:this.agent});l.on("error",t),l.on("response",(e=>e.on("end",(()=>t(null,e))).resume())),l.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}},2408:(e,t,r)=>{"use strict";Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:()=>r(4837)}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:()=>r(4653)}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:()=>r(5012)}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:()=>r(9893)})},9893:(e,t,r)=>{"use strict";const n=r(2090),{MESSAGE:o}=r(1520),s=r(2037),i=r(5481);e.exports=class extends i{constructor(e={}){if(super(e),!e.stream||!n(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol="string"==typeof e.eol?e.eol:s.EOL}log(e,t){if(setImmediate((()=>this.emit("logged",e))),this.isObjectMode)return this._stream.write(e),void(t&&t());this._stream.write(`${e[o]}${this.eol}`),t&&t()}}},2090:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},9312:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},5897:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function s(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function i(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,s=this.head;null!==s&&o<e;o++)s=s.next;for(;null!==s&&o<t;o++,s=s.next)r.push(s.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,s=this.tail;null!==s&&o>t;o--)s=s.prev;for(;null!==s&&o>e;o--,s=s.prev)r.push(s.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;null!==s&&n<e;n++)s=s.next;var i=[];for(n=0;s&&n<t;n++)i.push(s.value),s=this.removeNode(s);for(null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev),n=0;n<r.length;n++)s=o(this,s,r[n]);return i},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(9312)(n)}catch(e){}},7052:(e,t,r)=>{e.exports=require(r.ab+"desktop.node")},6213:(e,t,r)=>{e.exports=require(r.ab+"dock.node")},3356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstStartingWith=t.nextLowest=t.nextHighest=void 0,t.nextHighest=function(e,t){if(0===t.length)return e;let r=t.find((t=>t>e));return r||(r=t.slice(-1)[0]),r},t.nextLowest=function(e,t){if(0===t.length)return e;let r=t.findIndex((t=>t>=e));return r=r<=0?0:--r,t[r]},t.firstStartingWith=function(e,t){for(const r of e)if(r.startsWith(t))return r.slice(t.length);return""}},7838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearCoreSingleton=t.coreState=void 0;const n=r(4746);let o=null,s=0;t.coreState=function(){return o||(o=new i),o},t.clearCoreSingleton=function(){o=null};class i{constructor(){this.instance=s++,this.logOptions={logger:new n.NullLogger,showDiagnostics:!1}}}},3211:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setVars=t.expandEnvVars=t.unsetenv=t.setenv=t.getenv=void 0;const o=n(r(7282));function s(e,t){o.default.env[e]=t}t.getenv=function(e){return o.default.env[e]??""},t.setenv=s,t.unsetenv=function(e){delete o.default.env[e]},t.expandEnvVars=function(e,t){let r=t;for(const t in e){const n=new RegExp("\\$\\b"+t+"\\b","g");r=r.replace(n,e[t]);const o=new RegExp("\\${"+t+"}","g");r=r.replace(o,e[t])}return r},t.setVars=function(e){for(const t in e)s(t,e[t])}},9433:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeError=t.isFailure=t.isSuccessful=t.success=void 0,t.success=function(){return null},t.isSuccessful=function(e){return!e},t.isFailure=function(e){return!!e},t.safeError=function(e){return e instanceof Error?e:new Error("unknown error")}},9886:(e,t)=>{"use strict";function r(e){return[e,null]}function n(e){return[null,e??new Error(e)]}Object.defineProperty(t,"__esModule",{value:!0}),t.err=t.ok=t.expect=void 0,t.expect=function(e){try{return r(e())}catch(e){return n(e)}},t.ok=r,t.err=n},8185:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FilePath=t.tempFilename=t.normalizeSeparatorsNative=t.FilePathError=void 0;const a=i(r(7147)),l=i(r(3292)),c=r(4746),u=s(r(1017)),d=r(9433),p=r(62),h=r(9886),f=i(r(2037)),g=r(3201);class m extends Error{constructor(e,t){super(e),this.path=t}}t.FilePathError=m;const y="~";function v(e,t="/"){return e.replace(/[\\/]/g,t)}function w(e){return v(e,u.sep)}t.normalizeSeparatorsNative=w,t.tempFilename=function(e="",t=""){const r=t?u.default.join(f.default.tmpdir(),t+"-"+(0,g.randomString)()):u.default.join(f.default.tmpdir(),(0,g.randomString)());return new _(e?r+"."+e:r)};class _{constructor(e=""){this.path=e}toString(){return this.getAbsolutePath()}equals(e){return v(this.path)===v(e.path)}static createAliasedPath(e,t){const r=e.getAbsolutePath(),n=t.getAbsolutePath();if(r===n)return y;const o=u.default.relative(n,r);return!o||u.default.isAbsolute(o)||o.startsWith("..")?r:v(u.default.join(y,o))}static existsSync(e){if(!e)return!1;const t=e;try{return a.default.existsSync(t)}catch(e){return(0,c.logger)().logError(e),!1}}static async existsAsync(e){if(!e)return!1;const t=e;try{return await l.default.access(t),!0}catch(e){return(0,c.logger)().logError(e),!1}}static isEqualCaseInsensitive(e,t){throw Error("isEqualCaseInsensitive is NYI")}static isRootPath(e){throw Error("isRootPath is NYI")}static makeCurrent(e){throw Error("makeCurrent (static) is NYI")}static resolveAliasedPathSync(e,t){return e&&e!=y?e.startsWith(y)?new _(u.default.join(t.getAbsolutePath(),e.substring(1))):_.safeCurrentPathSync(t).completePath(e):t}static safeCurrentPathSync(e){try{return new _(process.cwd())}catch(e){(0,c.logger)().logError(e)}let t=e;a.default.existsSync(t.path)||(t=(0,p.userHomePath)());const r=t.makeCurrentPath();return r&&(0,c.logger)().logError(r),t}static async safeCurrentPath(e){try{return new _(process.cwd())}catch(e){(0,c.logger)().logError(e)}let t=e;await _.existsAsync(t.path)||(t=(0,p.userHomePath)());const r=t.makeCurrentPath();return r&&(0,c.logger)().logError(r),t}static tempFilePath(e){throw Error("tempFilePath is NYI")}static uniqueFilePath(e,t){throw Error("uniqueFilePath is NYI")}changeFileMode(e,t=!1){if("win32"===process.platform)return(0,d.success)();throw Error("changeFileMode is NYI")}completeChildPath(e){const[t,r]=this.completeChildPathWithErrorResult(e);return r?((0,c.logger)().logError(r),this):t}completeChildPathWithErrorResult(e){try{if(!e)return(0,h.ok)(this);const t=e;if(u.default.isAbsolute(t))throw Error("absolute path not permitted");const r=this.completePath(e);return r.isWithin(this)?(0,h.ok)(r):(0,h.err)(new m("child path must be inside parent path",this.getAbsolutePath()))}catch(e){const t=(0,d.safeError)(e);return(0,h.err)(new m(t.message,this.getAbsolutePath()))}}completePath(e){try{return new _(v(u.default.resolve(this.path,e)))}catch(e){return(0,c.logger)().logError(e),this}}copy(e,t=!1){throw Error("copy is NYI")}copyDirectoryRecursive(e,t=!1){throw Error("copyDirectoryRecursive is NYI")}createDirectorySync(e=""){let t;t=e?u.default.resolve(this.path,e):this.path;try{a.default.mkdirSync(t,{recursive:!0})}catch(e){return(0,d.safeError)(e)}return(0,d.success)()}async createDirectory(e=""){let t;t=e?u.default.resolve(this.path,e):this.path;try{await l.default.mkdir(t,{recursive:!0})}catch(e){return(0,d.safeError)(e)}return(0,d.success)()}ensureDirectorySync(){return this.existsSync()?(0,d.success)():this.createDirectorySync()}async ensureDirectory(){return await this.existsAsync()?(0,d.success)():this.createDirectory()}ensureFile(){throw Error("ensureFile is NYI")}existsSync(){try{return!this.isEmpty()&&a.default.existsSync(this.path)}catch(e){return(0,c.logger)().logError(e),!1}}async existsAsync(){try{return!this.isEmpty()&&(await l.default.access(this.path),!0)}catch(e){return(0,c.logger)().logError(e),!1}}getAbsolutePath(){return v(this.path)}getAbsolutePathNative(){return w(this.path)}getCanonicalPathSync(){if(this.isEmpty())return"";try{return v(a.default.realpathSync(this.path))}catch(e){(0,c.logger)().logError(e)}return""}async getCanonicalPath(){if(this.isEmpty())return"";try{return await l.default.realpath(this.path)}catch(e){(0,c.logger)().logError(e)}return""}getChildren(e){if(!this.existsSync())return new Error(`File not found: ${this.getAbsolutePath()}`);let t;try{t=a.default.opendirSync(this.getAbsolutePath());const r=a.default.readdirSync(this.getAbsolutePath());for(const t of r)e.push(this.completeChildPath(t))}catch(e){return(0,d.safeError)(e)}finally{t&&t.closeSync()}return(0,d.success)()}getChildrenRecursive(){throw Error("getChildrenRecursive is NYI")}getExtension(){return u.default.parse(this.path).ext}getExtensionLowerCase(){return u.default.parse(this.path).ext.toLowerCase()}getFileMode(){throw Error("getFileMode is NYI")}getFilename(){return u.default.parse(this.path).base}getLastWriteTimeSync(){try{return a.default.statSync(this.path).mtimeMs}catch{return 0}}getMimeContentType(e="text/plain"){throw Error("getMimeContentType is NYI")}getParent(){return new _(u.default.dirname(this.path))}getLexicallyNormalPath(){return v(u.default.normalize(this.path))}getRelativePath(e){throw Error("getRelativePath is NYI")}getSize(){throw Error("getSize is NYI")}getSizeRecursive(){throw Error("getSizeRecursive is NYI")}getStem(){return this.path.endsWith("/")||this.path.endsWith("\\")?"":u.default.parse(this.path).name}hasExtension(e){throw Error("hasExtension is NYI")}hasExtensionLowerCase(e){throw Error("hasExtensionLowerCase is NYI")}hasTextMimeType(){throw Error("hasTextMimeType is NYI")}isDirectory(){const e=a.default.lstatSync(this.path,{throwIfNoEntry:!1});return null!=e&&e.isDirectory()}isEmpty(){return!this.path}isEquivalentTo(e){throw Error("isEquivalentTo is NYI")}isHidden(){throw Error("isHidden is NYI")}isJunction(){throw Error("isJunction is NYI")}isReadable(){throw Error("isReadable is NYI")}isRegularFile(){throw Error("isRegularFile is NYI")}isSymlink(){throw Error("isSymLink is NYI")}isWithin(e){if(this.equals(e))return!0;const t=u.default.resolve(e.path),r=u.default.resolve(this.path),n=u.default.relative(t,r);return!!n&&!n.startsWith("..")&&!u.default.isAbsolute(n)}isWriteable(){throw Error("isWriteable is NYI")}makeCurrentPath(e=!1){if(e){const e=this.ensureDirectorySync();if(e)return e}try{return process.chdir(this.path),(0,d.success)()}catch(e){return(0,d.safeError)(e)}}move(){throw Error("move is NYI")}moveIndirect(e,t=!1){throw Error("moveIndirect is NYI")}openForRead(){throw Error("openForRead is NYI")}openForWrite(e=!0){throw Error("openForWrite is NYI")}async remove(){try{await l.default.rm(this.path,{recursive:!0})}catch(e){return(0,d.safeError)(e)}return(0,d.success)()}async removeIfExists(){try{await l.default.rm(this.path,{force:!0,recursive:!0})}catch(e){return(0,d.safeError)(e)}return(0,d.success)()}removeSync(){try{a.default.rmSync(this.path,{recursive:!0})}catch(e){return(0,d.safeError)(e)}return(0,d.success)()}removeIfExistsSync(){try{a.default.rmSync(this.path,{force:!0,recursive:!0})}catch(e){return(0,d.safeError)(e)}return(0,d.success)()}resetDirectory(){throw Error("resetDirectory is NYI")}resolveSymlink(){throw Error("resolveSymlink is NYI")}setLastWriteTime(){throw Error("setLastWriteTime is NYI")}testWritePermissions(){throw Error("testWritePermissions is NYI")}}t.FilePath=_},6617:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.readStringArrayFromFile=void 0;const o=n(r(8812)),s=r(9886),i=r(9433);t.readStringArrayFromFile=async function(e,t=!0){const r=[];try{await async function(e,t){return new Promise((function(r,n){o.default.eachLine(e,t,(function(e){e?n(e):r()}))}))}(e.getAbsolutePath(),(e=>{t&&(e=e.trim()),e.length>0&&r.push(e)}))}catch(e){return(0,s.err)((0,i.safeError)(e))}return(0,s.ok)(r)}},4746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseCommandLineLogLevel=t.setLoggerLevel=t.showDiagnosticsOutput=t.enableDiagnosticsOutput=t.setLogger=t.logLevel=t.logger=t.NullLogger=void 0;const n=r(7838);t.NullLogger=class{constructor(){this.level="error"}logLevel(){return this.level}setLogLevel(e){this.level=e}logError(e){this.logErrorAtLevel("error",e)}logErrorAtLevel(e,t){}logErrorMessage(e){}logInfo(e){}logWarning(e){}logDebug(e){}logDiagnostic(e){}logDiagnosticEnvVar(e){}closeLogFile(){}ensureTransport(){}},t.logger=function(){return(0,n.coreState)().logOptions.logger},t.logLevel=function(){return(0,n.coreState)().logOptions.logger.logLevel()},t.setLogger=function(e){(0,n.coreState)().logOptions.logger=e},t.enableDiagnosticsOutput=function(){(0,n.coreState)().logOptions.showDiagnostics=!0},t.showDiagnosticsOutput=function(){return(0,n.coreState)().logOptions.showDiagnostics},t.setLoggerLevel=function(e){(0,n.coreState)().logOptions.logger.setLogLevel(e)},t.parseCommandLineLogLevel=function(e,t){switch(e=e.toUpperCase()){case"ERR":return"error";case"WARN":return"warn";case"INFO":return"info";case"DEBUG":return"debug";default:return t}}},6723:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SessionType=t.kRStudioInitialProject=t.kRStudioInitialEnvironment=t.kRStudioInitialWorkingDir=void 0,t.kRStudioInitialWorkingDir="RS_INITIAL_WD",t.kRStudioInitialEnvironment="RS_INITIAL_ENV",t.kRStudioInitialProject="RS_INITIAL_PROJECT",function(e){e[e.SessionTypeDesktop=0]="SessionTypeDesktop",e[e.SessionTypeServer=1]="SessionTypeServer"}(r||(t.SessionType=r={}))},5863:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsLiteralEscape=t.htmlEscape=t.removeDups=void 0,t.removeDups=function(e){return[...new Set(e)]};const r=/[<>&'"/]/g,n=/[<>&'"/\r\n]/g;t.htmlEscape=function(e,t){return e.replace(t?n:r,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";case"/":return"/";case"\r":return" ";case"\n":return" ";default:return e}}))};const o=/[\\'"\r\n<]/g;t.jsLiteralEscape=function(e){return e.replace(o,(e=>{switch(e){case"\\":return"\\\\";case"'":return"\\'";case'"':return'\\"';case"\r":return"\\r";case"\n":return"\\n";case"<":return"\\074";default:return e}}))}},5553:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixupExecutablePath=t.isCentOS=t.localPeer=t.generateRandomPort=t.generateShortenedUuid=t.generateUuid=void 0;const o=r(9443),s=n(r(8048)),i=n(r(7147)),a=r(8185);function l(e=!0){let t=(0,o.v4)();return e||(t=t.replace(/-/g,"")),t}t.generateUuid=l,t.generateShortenedUuid=function(){return s.default.crc32(l(!1)).toString(16)},t.generateRandomPort=function(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)%4e4+8080},t.localPeer=function(e){return`\\\\.\\pipe\\${e.toString()}-rsession`},t.isCentOS=function(){if("linux"===process.platform){const e=new a.FilePath("/etc/redhat-release");if(e.existsSync())try{const t=i.default.readFileSync(e.getAbsolutePath(),"utf-8");return t.includes("CentOS")||t.includes("Red Hat Enterprise Linux")}catch(e){return!1}}return!1},t.fixupExecutablePath=function(e){return"win32"!==process.platform?e:0===e.getExtension().length?e.getParent().completePath(e.getFilename()+".exe"):e}},4324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveTemplateVar=void 0;const n=r(5863);t.resolveTemplateVar=function(e,t){if(!e)return"NO PROPERTY PROVIDED";if(e){let r="";e.startsWith("!")?(r="!",e=e.slice(1)):e.startsWith("'")&&(r="'",e=e.slice(1));const o=t.get(e);if(o)return"!"===r?o:"'"===r?(0,n.jsLiteralEscape)(o):(0,n.htmlEscape)(o,!0)}return"MISSING VALUE"}},62:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.username=t.userHomePathString=t.userHomePath=void 0;const o=n(r(2037)),s=r(3211),i=r(8185),a=n(r(7052)),l=r(3201);function c(){const e=[()=>(0,s.getenv)("HOME")];"win32"===process.platform&&(e.unshift((()=>(0,s.getenv)("R_USER"))),e.push((()=>a.default.currentCSIDLPersonalHomePath()),(()=>a.default.defaultCSIDLPersonalHomePath())));for(const t of e){const e=u(t());if(e)return e}return new i.FilePath(o.default.homedir())}function u(e){const t=(0,l.removeTrailingSlashes)(e);if(t.length>0){const e=new i.FilePath(t);if(e.existsSync())return e}}t.userHomePath=c,t.userHomePathString=function(){return c().getAbsolutePath()},t.username=function(){try{return o.default.userInfo().username}catch(e){return""}}},1413:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FunctionInterval=t.secondsToMs=t.sleepPromise=t.waitWithTimeout=t.WaitResult=t.setTimeoutPromise=void 0;const o=r(9433),s=n(r(3837)),i=r(9512);function a(e){return 1e3*e}t.setTimeoutPromise=s.default.promisify(setTimeout),t.WaitResult=class{constructor(e,t=null){this.type=e,this.error=t}},t.waitWithTimeout=async function(e,r,n,s){await(0,t.setTimeoutPromise)(r);const i=Date.now()+1e3*s;for(;Date.now()<i;){const r=await e();if("WaitSuccess"===r.type)return(0,o.success)();if("WaitContinue"!==r.type)return r.error;await(0,t.setTimeoutPromise)(n)}return Error("Exceeded timeout")},t.sleepPromise=async function(e){return new Promise((t=>setTimeout(t,a(e))))},t.secondsToMs=a,t.FunctionInterval=class{constructor(e,t){this.intervalId=null,this.func=e,this.milliseconds=t}start(){this.intervalId||(this.intervalId=setInterval(this.func,this.milliseconds))}stop(){this.intervalId&&(0,i.clearInterval)(this.intervalId),this.intervalId=null}}},8033:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WinstonLogger=void 0;const i=r(2298),a=s(r(1935)),l=r(8597),c=r(2408),u=r(3211),d=r(9433),p=r(4746),{combine:h,printf:f,timestamp:g,json:m}=a.default.format;t.WinstonLogger=class{constructor(e){this.fileTransport=null;const t=this.readLogLevelOverride(e.getLogLevel()),r="pretty"===e.getLogMessageFormat()?f((e=>`${e.timestamp} ${e.level.toUpperCase()} ${e.message}`)):h(y(),m()),n=h(g({alias:"time"}),r),o=e.getLogFile();let s;this.logger=a.default.createLogger({level:t,format:n,defaultMeta:{service:"rdesktop"}});let u,d=!1;"stderr"===e.getLoggerType()&&(u=new c.Console,d=!0),"syslog"===e.getLoggerType()&&("linux"===process.platform?(u=new l.Syslog({protocol:"unix",path:"/dev/log",app_name:"rdesktop"}),this.logger.levels=a.default.config.syslog.levels):s="syslog not supported"),u||(u=new a.default.transports.File({filename:o.getAbsolutePath(),tailable:!0,maxsize:2e6,maxFiles:100}),this.fileTransport=u),this.logger.add(u),d||i.app.isPackaged||(this.logger.add(new c.Console),d=!0),s&&this.logErrorMessage(s)}readLogLevelOverride(e){const t=["RSTUDIO_DESKTOP_LOG_LEVEL","RS_LOG_LEVEL"];for(const e of t){const t=(0,u.getenv)(e);if(0!==t.length)return t}return e}logLevel(){return this.logger.level}setLogLevel(e){this.logger.level=e}log(e,t){this.logger.log(e,t)}logError(e){this.logErrorAtLevel("error",e)}logErrorAtLevel(e,t){this.log(e,(0,d.safeError)(t).message)}logErrorMessage(e){this.log("error",e)}logWarning(e){this.log("warn",e)}logInfo(e){this.log("info",e)}logDebug(e){this.log("debug",e)}logDiagnostic(e){(0,p.showDiagnosticsOutput)()&&console.log(e)}logDiagnosticEnvVar(e){if((0,p.showDiagnosticsOutput)()){const t=(0,u.getenv)(e);t&&this.logDiagnostic(` . ${e} = ${t}`)}}closeLogFile(){this.fileTransport&&(this.logger.remove(this.fileTransport),this.fileTransport=null)}ensureTransport(){0===this.logger.transports.length&&this.logger.add(new c.Console)}};const y=(0,a.format)((e=>(delete e.timestamp,e)))},1859:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Xdg=t.SHGetKnownFolderPath=t.WinFolderID=void 0;const o=n(r(2037)),s=r(4746),i=r(3211),a=r(62),l=r(8185);var c;function u(e){let t="";switch(e){case c.FOLDERID_RoamingAppData:t="APPDATA";break;case c.FOLDERID_LocalAppData:t="LOCALAPPDATA";break;case c.FOLDERID_ProgramData:t="ProgramData"}return(0,i.getenv)(t)}!function(e){e[e.FOLDERID_RoamingAppData=0]="FOLDERID_RoamingAppData",e[e.FOLDERID_LocalAppData=1]="FOLDERID_LocalAppData",e[e.FOLDERID_ProgramData=2]="FOLDERID_ProgramData"}(c||(t.WinFolderID=c={})),t.SHGetKnownFolderPath=u;let d="";function p(){return d||(d=o.default.hostname()),d}function h(e,t,r,n,o,c){let d=new l.FilePath,h=!0,f=(0,i.getenv)(e);if(f||(h=!1,f=(0,i.getenv)(t)),f)d=new l.FilePath(f);else{if("win32"===process.platform){const e=u(r);e?d=new l.FilePath(e):(0,s.logger)().logError(new Error(`Unable to retrieve app settings path (${r}).`))}d.isEmpty()&&(d=new l.FilePath(n))}const g={HOME:c?c.getAbsolutePath():(0,a.userHomePath)().getAbsolutePath(),USER:o||(0,a.username)()};let m=(0,i.getenv)("HOSTNAME");m||(m=p()),g.HOSTNAME=m;const y=(0,i.expandEnvVars)(g,d.getAbsolutePath());if(d=l.FilePath.resolveAliasedPathSync(y,c||(0,a.userHomePath)()),h)return d;const v="win32"===process.platform?"RStudio":"rstudio";return d.completePath(v)}class f{static userConfigDir(e,t){return h("RSTUDIO_CONFIG_HOME","XDG_CONFIG_HOME",c.FOLDERID_RoamingAppData,"~/.config",e,t)}static userDataDir(e,t){return h("RSTUDIO_DATA_HOME","XDG_DATA_HOME",c.FOLDERID_LocalAppData,"~/.local/share",e,t)}static verifyUserDirs(e,t){throw Error("Xdg.verifyUserDirs is NYI")}static systemConfigDir(){if("win32"!==process.platform&&!(0,i.getenv)("RSTUDIO_CONFIG_DIR")){const e=(0,i.getenv)("XDG_CONFIG_DIRS");if(e.indexOf(":")>=0){const t=e.split(":");for(const e of t){const t=new l.FilePath(e).completePath("rstudio");if(t.existsSync())return t}}}return h("RSTUDIO_CONFIG_DIR","XDG_CONFIG_DIRS",c.FOLDERID_ProgramData,"/etc",void 0,void 0)}static systemConfigFile(e){if("win32"===process.platform)return f.systemConfigDir().completeChildPath(e);if(!(0,i.getenv)("RSTUDIO_CONFIG_DIR")){const t=(0,i.getenv)("XDG_CONFIG_DIRS");if(t.indexOf(":")>=0){const r=t.split(":");for(const t of r){const r=new l.FilePath(t).completePath("rstudio").completeChildPath(e);if(r.existsSync())return r}}}return f.systemConfigDir().completeChildPath(e)}static forwardXdgEnvVars(e){throw Error("forwardXdgEnvVars is NYI")}}t.Xdg=f},4716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesktopActivation=void 0;const n=r(2361);class o extends n.EventEmitter{getInitialLicense(e,t){this.emitLaunchFirstSession()}setMainWindow(e){}editionName(){return"RStudio"}emitLaunchFirstSession(){this.emit(o.LAUNCH_FIRST_SESSION)}emitLaunchError(e){this.emit(o.LAUNCH_ERROR,e)}}t.DesktopActivation=o,o.LAUNCH_FIRST_SESSION="desktop-activation-launch_first_session",o.LAUNCH_ERROR="desktop-activation-launch_error"},9281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventBus=t.clearApplicationSingleton=t.setApplication=t.appState=void 0;const n=r(8074);let o=null;function s(){if(!o)throw Error("application not set");return o}t.appState=s,t.setApplication=function(e){if(o)throw Error("tried to create multiple Applications");o=e},t.clearApplicationSingleton=function(){o=null},t.getEventBus=function(){return s().eventBus||(s().eventBus=new n.TypedEventEmitter),s().eventBus}},3969:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationLaunch=t.resolveProjectFile=void 0;const o=n(r(1017)),s=r(2081),i=r(7147),a=r(3211),l=r(6723),c=r(2298);function u(e){if(!(0,i.existsSync)(e))return"";const t=(0,i.readdirSync)(e,{encoding:"utf-8"});for(const r of t)if(".rproj"===o.default.extname(r).toLowerCase())return o.default.join(e,r);return""}t.resolveProjectFile=u;class d{static init(){return new d}setActivationWindow(e){this.mainWindow=e}activateWindow(){}launchRStudio(e){const t=c.app.isPackaged?[]:[process.argv[1]],r=e.workingDirectory??o.default.dirname(e.projectFilePath||"");(0,a.setenv)(l.kRStudioInitialWorkingDir,r);const n=e.projectFilePath??u(r);(0,i.existsSync)(n)&&(0,a.setenv)(l.kRStudioInitialProject,n),(0,s.spawn)(process.execPath,t,{detached:!0,stdio:"ignore"}).unref(),(0,a.unsetenv)(l.kRStudioInitialProject)}}t.ApplicationLaunch=d},155:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Application=void 0;const o=r(2298),s=n(r(4748)),i=n(r(1017)),a=r(3211),l=r(8185),c=r(4746),u=r(6723),d=r(5553),p=r(7133),h=r(4716),f=r(9281),g=r(3969),m=r(4284),y=r(502),v=r(9525),w=r(9940),_=r(6544),b=r(8485),S=r(5773),E=r(3201),R=r(1562),k=r(2996),O=r(9311),x=r(2865),P=r(1859),$=r(4944);t.Application=class{constructor(){this.runDiagnostics=!1,this.port=(0,d.generateRandomPort)(),this.windowTracker=new R.WindowTracker,this.modalTracker=new $.ModalDialogTracker,this.sessionStartDelaySeconds=0,this.sessionEarlyExitCode=0,this.startupDelayMs=0,this.pendingWindows=new Array,this.argsManager=new m.ArgsManager}async beforeAppReady(){const e=this.argsManager.initCommandLine(this);if(e.exit)return e;try{(0,E.removeStaleOptionsLockfile)()}catch(e){return(0,c.logger)().logError(e),(0,w.exitFailure)()}return""===(0,a.getenv)("PYTHONIOENCODING")&&(0,a.setenv)("PYTHONIOENCODING","utf-8"),(0,E.initializeSharedSecret)(),this.registerAppEvents(),(0,E.augmentCommandLineArguments)(),(0,c.logger)().logDebug("Ready to run"),(0,w.run)()}shouldInstanceOpen(){const e=o.app.requestSingleInstanceLock(),t=this.argsManager.getProjectFileArg()??(0,a.getenv)("RS_INITIAL_PROJECT"),r=this.argsManager.getFileArgs().length>0;return(0,c.logger)().logDebug(`instance lock: ${e}, project: ${t}, file: ${r}`),!(!(e||t.length>0)&&r&&((0,c.logger)().logDebug("No instance lock - exiting"),1))}initializeInstance(){o.app.hasSingleInstanceLock()?this.createMessageServer():this.createMessageClient(),o.app.on("second-instance",((e,t)=>{(0,c.logger)().logDebug(`second-instance event: ARGS ${t}`),this.argsManager.setUnswitchedArgs(t),void 0===this.argsManager.getProjectFileArg()&&this.argsManager.handleAfterSessionLaunchCommands()}))}createMessageClient(){this.client=new O.Client({path:"rstudio",retries:10}),this.client.connect({path:"rstudio"}).then((()=>(0,c.logger)().logDebug(`net-ipc: ${process.pid} connected to primary instance`))).catch((e=>(0,c.logger)().logError(e))),this.client.on("close",(e=>{(0,c.logger)().logDebug(`net-ipc: ${process.pid} server close event ${e}`),this.client?.close().then((()=>(0,c.logger)().logDebug(`net-ipc: ${process.pid} close client connection`))).catch((e=>(0,c.logger)().logError(e))).finally((()=>this.client=void 0)),o.app.requestSingleInstanceLock()?this.createMessageServer():this.createMessageClient()}))}createMessageServer(){const e=P.Xdg.userDataDir().completeChildPath("rstudio.socket");e.getParent().ensureDirectorySync();const t={path:e.getAbsolutePath()};this.server=new O.Server(t),(0,c.logger)().logDebug(`net-ipc: creating new message server; socket=${e.getAbsolutePath()}`),this.server.start().then((()=>{this.client=void 0,(0,c.logger)().logDebug(`net-ipc: ${process.pid} taking over as primary instance`)})).catch((e=>(0,c.logger)().logError(`net-ipc: ${process.pid} ${e}`)))}registerAppEvents(){o.app.on("before-quit",(()=>{o.app.releaseSingleInstanceLock(),this.server?.close().then((()=>(0,c.logger)().logDebug(`net-ipc: ${process.pid} is shutting down and releasing the instance lock`))).catch((e=>(0,c.logger)().logError(e))),this.client?.close().then((()=>(0,c.logger)().logDebug(`net-ipc: ${process.pid} is disconnecting from the primary instance`))).catch((e=>(0,c.logger)().logError(e)))})),o.app.on("open-file",((e,t)=>{const r=(0,E.resolveAliasedPath)(t);e.preventDefault(),".rproj"!==i.default.extname(t).toLowerCase()?(o.app.isReady()||(0,a.setenv)(u.kRStudioInitialWorkingDir,i.default.dirname(t)),o.app.whenReady().then((()=>{this.gwtCallback?.initialized?(0,p.getDesktopBridge)().openFile(r):this.gwtCallback?.once(v.GwtCallback.WORKBENCH_INITIALIZED,(()=>{(0,p.getDesktopBridge)().openFile(r)}))})).catch((e=>(0,c.logger)().logError(e)))):o.app.isReady()?this.appLaunch?.launchRStudio({projectFilePath:t}):(0,a.setenv)(u.kRStudioInitialProject,t)}))}async run(){if(!this.shouldInstanceOpen())return(0,w.exitSuccess)();this.initializeInstance(),this.appLaunch=g.ApplicationLaunch.init();const[e,t,r,n]=(0,E.findComponents)();if(this.sessionPath=r,this.scriptsPath=n,!o.app.isPackaged){if(!t.existsSync())return await(0,E.createStandaloneErrorDialog)(s.default.t("applicationTs.devModeConfig"),`${s.default.t("applicationTs.confColon")} ${t.getAbsolutePath()} ${s.default.t("applicationTs.notFoundDotLowercase")}'`),(0,w.exitFailure)();if(!this.sessionPath.existsSync())return await(0,E.createStandaloneErrorDialog)(s.default.t("applicationTs.devModeConfig"),`rsession: ${this.sessionPath.getAbsolutePath()} ${s.default.t("applicationTs.notFoundDotLowercase")}'`),(0,w.exitFailure)()}let i;if((0,E.initializeLang)(),this.argsManager.handleAppReadyCommands(this),this.loggerCallback=new x.LoggerCallback,"win32"===process.platform){const[e,t]=await(0,y.promptUserForR)();if(t)return(0,c.logger)().logError(t),await(0,f.appState)().modalTracker.trackElectronModalAsync((async()=>o.dialog.showMessageBox({type:"warning",title:s.default.t("applicationTs.errorFindingR"),message:s.default.t("applicationTs.rstudioFailedToFindRInstalationsOnTheSystem"),buttons:[s.default.t("common.buttonYes"),s.default.t("common.buttonNo")]}))).then((e=>{(0,c.logger)().logDebug("You clicked "+(0==e.response?"Yes":"No")),0==e.response&&(0,E.loadRWebsite)()})).catch((e=>(0,c.logger)().logError(e))),(0,w.exitFailure)();if(null==e)return(0,c.logger)().logDebug("Did not get a path, app will exit"),(0,w.exitFailure)();(0,c.logger)().logDebug(`Path selected was: "${e}"`),i=e}if(!i){(0,c.logger)().logDebug("No rPath found, scanning for R");const[e,t]=(0,y.scanForR)();if(t)return(0,c.logger)().logDebug(`Error scanning for R: ${t}`),await(0,y.showRNotFoundError)(),(0,w.exitFailure)();i=e}(0,c.logger)().logDebug("Done choosing R"),(0,c.logger)().logDebug(`Preparing environment using R: ${i}`);const a=(0,y.prepareEnvironment)(i);return a?((0,c.logger)().logError(a),await(0,y.showRNotFoundError)(),(0,w.exitFailure)()):(this.sessionLauncher=new S.SessionLauncher(this.sessionPath,t,new l.FilePath,this.appLaunch),this.sessionLauncher.launchFirstSession(e,!o.app.isPackaged),this.gwtCallback?.once(v.GwtCallback.WORKBENCH_INITIALIZED,(()=>{this.argsManager.handleAfterSessionLaunchCommands()})),this.setDockMenu(),(0,w.run)())}activation(){return this.activationInst||(this.activationInst=new h.DesktopActivation),this.activationInst}generateNewPort(){this.port=(0,d.generateRandomPort)()}setScratchTempDir(e){this.scratchPath=e}scratchTempDir(e){let t=this.scratchPath;return t?.isEmpty()||!t?.existsSync()||(t=t.completeChildPath("tmp"),t.ensureDirectorySync())?e:t}prepareForWindow(e){this.pendingWindows.push(e)}windowOpening(){for(const e of this.pendingWindows){if("satellite"===e.type)return _.SatelliteWindow.windowOpening();break}const e=o.screen.getPrimaryDisplay(),t=Math.max(500,Math.min(850,e.workAreaSize.width)),r=Math.max(500,Math.min(1100,e.workAreaSize.height));return b.SecondaryWindow.windowOpening(t,r)}windowCreated(e,t,r){const n=this.pendingWindows.shift();if(n){const o=this.windowTracker.getWindow(n.name)?.window;if(o)return void(0,E.raiseAndActivateWindow)(o);"satellite"===n.type?(0,k.configureSatelliteWindow)(n,e,t):(0,k.configureSecondaryWindow)(n,e,t,r)}else(0,k.configureSecondaryWindow)({type:"secondary",name:"",allowExternalNavigate:!1,showToolbar:!0,mainWindow:this.gwtCallback?.mainWindow},e,t,r)}setDockMenu(){if("darwin"===process.platform){const e=o.Menu.buildFromTemplate([{label:s.default.t("applicationTs.newRstudioWindow"),click:()=>{this.appLaunch?.launchRStudio({})}}]);o.app.dock.setMenu(e)}}}},4284:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArgsManager=t.options=t.kStartupDelay=t.kHelp=t.kSessionExit=t.kDelaySession=t.kNoArg=t.kLogDir=t.kLogMessageFormat=t.kLoggerType=t.kLogLevel=t.kVersionJson=t.kVersion=t.kRunDiagnosticsOption=void 0;const o=r(2298),s=n(r(1017)),i=r(3211),a=r(8185),l=r(4746),c=r(6723),u=r(8033),d=r(7133),p=n(r(2773)),h=r(9940),f=r(3201),g=r(2996),m=r(3969),y=r(7147),v=r(9433);t.kRunDiagnosticsOption="--run-diagnostics",t.kVersion="--version",t.kVersionJson="--version-json",t.kLogLevel="log-level",t.kLoggerType="logger-type",t.kLogMessageFormat="log-message-format",t.kLogDir="log-dir",t.kNoArg="",t.kDelaySession="session-delay",t.kSessionExit="session-exit",t.kHelp="--help",t.kStartupDelay="startup-delay",t.options={logLevel:{arg:t.kLogLevel,env:"RS_LOG_LEVEL"},loggerType:{arg:t.kLoggerType,env:"RS_LOGGER_TYPE"},logMessageFormat:{arg:t.kLogMessageFormat,env:"RS_LOG_MESSAGE_FORMAT"},logDir:{arg:t.kLogDir,env:"RS_LOG_DIR"},logConfFile:{arg:t.kNoArg,env:"RS_LOG_CONF_FILE"}},t.ArgsManager=class{constructor(){this.unswitchedArgs=[]}initCommandLine(e,r=process.argv){return r.indexOf(t.kHelp)>-1?(console.log("Options:"),console.log(" --version Display RStudio version"),console.log(" --version-json Display versions of major components in JSON format"),console.log(" --run-diagnostics Run diagnostics and save in a file"),console.log(" --log-level Sets the verbosity of the logging"),console.log(" --log-level=ERR|WARN|INFO|DEBUG"),console.log(" --log-dir The log directory to store log files in. The resulting log file name is based on the executable name."),console.log(' --session-delay Pause the rsession so the "Loading R" screen displays longer'),console.log(" --session-exit Terminate the rsession immediately forcing error page to display"),console.log(" --startup-delay Pause before showing the application so the splash screen displays longer"),console.log(" --startup-delay=<number of seconds> 5 by default"),console.log(" --help Show this help"),(0,h.exitSuccess)()):r.indexOf(t.kVersion)>-1?(console.log(o.app.getVersion()),(0,h.exitSuccess)()):r.indexOf(t.kVersionJson)>-1?(console.log((0,f.getComponentVersions)()),(0,h.exitSuccess)()):(r.indexOf(t.kRunDiagnosticsOption)>-1&&(e.runDiagnostics=!0,(0,l.enableDiagnosticsOutput)()),this.setUnswitchedArgs(process.argv),(0,h.run)())}setUnswitchedArgs(e){this.unswitchedArgs=e.filter((e=>!e.startsWith("--")&&e!==process.execPath&&"."!==e))}getProjectFileArg(){return this.unswitchedArgs.find((e=>a.FilePath.existsSync(e)&&".rproj"===s.default.extname(e).toLowerCase()))}getFileArgs(){return this.unswitchedArgs.filter((e=>a.FilePath.existsSync(e)&&".rproj"!==s.default.extname(e).toLowerCase()))}handleAfterSessionLaunchCommands(){this.unswitchedArgs.length&&this.unswitchedArgs.forEach((e=>{a.FilePath.existsSync(e)&&!new a.FilePath(e).isDirectory()&&o.app.whenReady().then((()=>{(0,d.getDesktopBridge)().openFile(s.default.resolve(e));const t=o.webContents.getAllWebContents()[0].mainFrame.name;(0,g.activateWindow)(t)})).catch((e=>{(0,l.logger)().logError(e)}))}))}handleAppReadyCommands(e){if(o.app.commandLine.hasSwitch(t.kDelaySession)&&(e.sessionStartDelaySeconds=5),o.app.commandLine.hasSwitch(t.kStartupDelay)){let r=parseInt(o.app.commandLine.getSwitchValue(t.kStartupDelay));(r<0||isNaN(r))&&(r=5),e.startupDelayMs=1e3*r}o.app.commandLine.hasSwitch(t.kSessionExit)&&(e.sessionEarlyExitCode=1),this.unswitchedArgs.length&&(this.unswitchedArgs=this.unswitchedArgs.filter((e=>{if(a.FilePath.existsSync(e)){const t=s.default.resolve(e),r=s.default.extname(t).toLowerCase();let n,o="";if(new a.FilePath(t).isDirectory()?(n=t,o=(0,m.resolveProjectFile)(n)):(n=s.default.dirname(t),".rproj"===r&&(o=t)),(0,y.existsSync)(o))return(0,i.setenv)(c.kRStudioInitialProject,o),!1;(0,i.setenv)(c.kRStudioInitialWorkingDir,n)}return(0,l.logger)().logDebug(`RS_INITIAL_WD: ${(0,i.getenv)(c.kRStudioInitialWorkingDir)}`),!0})))}handleLogLevel(){const e=new p.default;try{(0,l.setLogger)(new u.WinstonLogger(e))}catch(e){console.error((0,v.safeError)(e))}}}},1797:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo=function(){return{RSTUDIO_VERSION:"2024.04.2+764",RSTUDIO_BUILD_DATE:"2024-06-05",RSTUDIO_COPYRIGHT_YEAR:"2024",RSTUDIO_VERSION_PATCH:2,RSTUDIO_R_MAJOR_VERSION_REQUIRED:3,RSTUDIO_R_MINOR_VERSION_REQUIRED:6,RSTUDIO_R_PATCH_VERSION_REQUIRED:0,RSTUDIO_PACKAGE_OS:"windows",RSTUDIO_GIT_COMMIT:"e4392fc9ddc21961fd1d0efd47484b43f07a4177",RSTUDIO_RELEASE_NAME:"Chocolate Cosmos"}}},2191:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._createContextMenuTemplate=t.showContextMenu=void 0;const o=r(2298),s=n(r(4748)),i=n(r(1017)),a=r(9281);t.showContextMenu=(e,r)=>{const n=(0,t._createContextMenuTemplate)(e,r);o.Menu.buildFromTemplate(n).popup()},t._createContextMenuTemplate=(e,t)=>{let r=[];return r=t.hasImageContents?l(e,t):c(e,t),r};const l=(e,t)=>[{label:s.default.t("contextMenu.saveImageAsDots"),click:async()=>{const r=e,n=o.BrowserWindow.fromWebContents(r),l=(0,a.appState)().modalTracker.trackElectronModalSync((()=>o.dialog.showSaveDialogSync(n,{title:s.default.t("contextMenu.saveImageAs"),defaultPath:i.default.basename(t.srcURL),buttonLabel:s.default.t("contextMenu.save"),properties:["createDirectory"]})));null!=l&&(e.session.once("will-download",((e,t)=>{t.setSavePath(l),t.once("done",((e,t)=>{switch(t){case"cancelled":(0,a.appState)().modalTracker.trackElectronModalSync((()=>o.dialog.showErrorBox(s.default.t("contextMenu.errorDownloadingImage"),s.default.t("contextMenu.downloadCancelledMessage"))));break;case"interrupted":(0,a.appState)().modalTracker.trackElectronModalSync((()=>o.dialog.showErrorBox(s.default.t("contextMenu.errorDownloadingImage"),s.default.t("contextMenu.downloadInterruptedMessage"))))}}))})),e.downloadURL(t.srcURL))}},{label:s.default.t("contextMenu.copyImage"),click:()=>{e.copyImageAt(t.x,t.y)}},{label:s.default.t("contextMenu.copyImageAddress"),click:()=>{o.clipboard.writeText(t.srcURL)}},{type:"separator"},{label:s.default.t("contextMenu.reload"),role:"reload"},{label:s.default.t("contextMenu.inspectElement"),click:()=>{e.inspectElement(t.x,t.y)}}],c=(e,t)=>{const r=[];return t.editFlags.canCut?r.push({label:s.default.t("contextMenu.cut"),role:"cut"}):r.push({label:s.default.t("contextMenu.cut"),enabled:!1}),t.editFlags.canCopy?r.push({label:s.default.t("contextMenu.copy"),role:"copy"}):r.push({label:s.default.t("contextMenu.copy"),enabled:!1}),t.editFlags.canPaste?r.push({label:s.default.t("contextMenu.paste"),role:"paste"}):r.push({label:s.default.t("contextMenu.paste"),enabled:!1}),t.editFlags.canSelectAll?r.push({label:s.default.t("contextMenu.selectAll"),role:"selectAll"}):r.push({label:s.default.t("contextMenu.selectAll"),enabled:!1}),r.push({type:"separator"}),r.push({label:s.default.t("contextMenu.reload"),role:"reload"}),r.push({label:s.default.t("contextMenu.inspectElement"),click:()=>{e.inspectElement(t.x,t.y)}}),r}},133:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crashDumpLocation=t.initCrashHandler=void 0;const o=r(2298),s=r(3211),i=n(r(1017));function a(){return i.default.join(o.app.getPath("userData"),"Crashpad")}t.initCrashHandler=function(){const e=(0,s.getenv)("RSTUDIO_ENABLE_CRASHPAD");"1"!==e&&"true"!==e.toLowerCase()||(console.log(`Starting crash logging to ${a()}`),o.crashReporter.start({uploadToServer:!1}))},t.crashDumpLocation=a},7060:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DesktopBrowserWindow=void 0;const o=r(2298),s=n(r(1017)),i=n(r(469)),a=r(2781),l=r(7310),c=r(4746),u=r(9281),d=r(2191),p=r(8125),h=r(1513),f=r(6445),g=r(3201),m=r(2996),y=r(2173);class v extends a.EventEmitter{constructor(e){super(),this.options=e,this.positionAndEnsureVisibleDebounced=(0,i.default)(((e,t,r,n)=>(0,m.positionAndEnsureVisible)(e,t,r,n)),75),this.failLoad=!1,this.options.showToolbar=this.options.showToolbar??!1,this.options.adjustTitle=this.options.adjustTitle??!1,this.options.autohideMenu=this.options.autohideMenu??!1,this.options.allowExternalNavigate=this.options.allowExternalNavigate??!1,this.options.skipLocaleDetection=this.options.skipLocaleDetection??!1;const t=[["--api-keys=desktopInfo",...this.options.addApiKeys??[]].join("|")];if(this.options.existingWindow)this.window=this.options.existingWindow;else{const r=v.getPreload(),n="#e1e2e5";this.window=new o.BrowserWindow({backgroundColor:n,autoHideMenuBar:this.options.autohideMenu,webPreferences:{additionalArguments:t,contextIsolation:!0,nodeIntegration:!1,preload:r,sandbox:!0},show:!1,acceptFirstMouse:!0}),e.skipLocaleDetection||(0,g.handleLocaleCookies)(this.window,!0);const s=".gwt-SplitLayoutPanel-HDragger{cursor:ew-resize !important;} .gwt-SplitLayoutPanel-VDragger{cursor:ns-resize !important;}";this.window.webContents.insertCSS(s,{cssOrigin:"author"}).then((e=>{(0,c.logger)().logDebug("Custom Styles Added Successfully")})).catch((e=>{(0,c.logger)().logError(e)}))}this.window.webContents.on("context-menu",((e,t)=>{const r=this.window.webContents;(0,d.showContextMenu)(r,t)})),this.window.webContents.on("before-input-event",((e,t)=>{this.keyPressEvent(e,t)})),this.window.webContents.setWindowOpenHandler((e=>{if(this.options.baseUrl){const t=`${this.options.baseUrl}/help/library/`;if(e.url.startsWith(t)){const t=String.raw`/help/library/([^/]+)/doc/(.*)\.pdf`,r=e.url.match(t);if(r){const e=[decodeURIComponent(r[2]),decodeURIComponent(r[1])];return this.sendRpcRequest("show_vignette",e),{action:"deny"}}}}return!this.options.baseUrl||"foreground-tab"!==e.disposition&&"background-tab"!==e.disposition?(0,u.appState)().windowOpening():(o.shell.openExternal(e.url),{action:"deny"})})),this.window.webContents.on("did-create-window",(e=>{(0,u.appState)().windowCreated(e,this.window.webContents,this.options.baseUrl)})),this.window.webContents.on("will-navigate",((e,t)=>{this.allowNavigation(t)||e.preventDefault()})),this.window.webContents.on("page-title-updated",((e,t,r)=>{this.adjustWindowTitle(t,r)})),this.window.webContents.on("did-finish-load",(()=>{if(this.options.showToolbar){const e=new h.ToolbarManager,t={buttons:[{tooltip:"Go Back",iconPath:s.default.join(__dirname,"assets","img","back.png"),onClick:"()=> {\n history.back();\n }"},{tooltip:"Go Forward",iconPath:s.default.join(__dirname,"assets","img","forward.png"),onClick:"()=> {\n history.forward();\n }"},{tooltip:"Refresh Page",iconPath:s.default.join(__dirname,"assets","img","reload.png"),onClick:"()=> {\n window.location.reload();\n }"}]};e.createAndShowToolbar(this.window,t).catch((e=>{console.error("Error when trying to add Secondary Window toolbar",e)}))}this.failLoad?this.failLoad=!1:this.finishLoading(!0)})),this.window.webContents.on("did-fail-load",(()=>{this.failLoad=!0,this.finishLoading(!1)})),this.window.on("close",(e=>{this.removeMenuEventListener(),this.closeEvent(e)})),this.window.on("closed",(()=>{this.emit(v.WINDOW_DESTROYED)})),this.window.on("ready-to-show",(()=>{const e=(0,p.ElectronDesktopOptions)().zoomLevel();this.window.webContents.setZoomFactor(e)})),this.window.on("unmaximize",(()=>{this.positionAndEnsureVisibleDebounced(this.window,this.window.getBounds(),y.properties.view.default.windowBounds.width,y.properties.view.default.windowBounds.height)}))}allowNavigation(e){let t;(0,c.logger)().logDebug(`allowNavigation checking ${e}`);try{t=new l.URL(e)}catch(e){return(0,c.logger)().logError(e),!1}if((0,f.isAboutUrl)(e)||(0,f.isChromeGpuUrl)(e))return!0;if(!(0,f.isAllowedProtocol)(t))return(0,c.logger)().logDebug(`allowNavigation: disallowed protocol ${e}`),!1;const r=(0,f.isLocalUrl)(t),n=this.options.baseUrl??this.mainWindow?.options.baseUrl;if(!n&&r)return!0;if(n){const e=new l.URL(n);if(t.protocol===e.protocol&&t.host===e.host)return!0}const o=this.viewerUrl??this.mainWindow?.viewerUrl,s=this.tutorialUrl??this.mainWindow?.tutorialUrl,i=this.presentationUrl??this.mainWindow?.presentationUrl,a=this.shinyDialogUrl??this.mainWindow?.shinyDialogUrl;return!(!(o&&e.startsWith(o)||i&&e.startsWith(i)||s&&e.startsWith(s))&&!(r&&a&&e.startsWith(a))&&!this.options.allowExternalNavigate&&!(0,f.isSafeHost)(t.hostname)&&!r&&((0,c.logger)().logDebug("allowNavigation: external navigation within IDE is not allowed and URL host is unsafe. URL must be explicitly opened in the browser."),1))}closeEvent(e){if(this.options.opener){const e=`if (window.unregisterDesktopChildWindow)\n window.unregisterDesktopChildWindow('${this.options.name}');`;this.executeJavaScript(e).catch((e=>{(0,c.logger)().logError(e)}))}else{const e=`if (window.opener && window.opener.unregisterDesktopChildWindow)\n window.opener.unregisterDesktopChildWindow('${this.options.name}');`;this.executeJavaScript(e).catch((e=>{(0,c.logger)().logError(e)}))}}adjustWindowTitle(e,t){this.options.adjustTitle&&t&&this.window.setTitle(e)}syncWindowTitle(){this.options.adjustTitle&&this.window.setTitle(this.window.webContents.getTitle())}finishLoading(e){if(e){this.syncWindowTitle();const e=`if (window.opener && window.opener.registerDesktopChildWindow)\n window.opener.registerDesktopChildWindow('${this.options.name}', window);`;this.executeJavaScript(e).catch((e=>{(0,c.logger)().logError(e)}))}}avoidMoveCursorIfNecessary(){"darwin"===process.platform&&this.executeJavaScript('document.body.className = document.body.className + " avoid-move-cursor"').catch((e=>{(0,c.logger)().logError(e)}))}async executeJavaScript(e){return(0,g.executeJavaScript)(this.window.webContents,e)}setViewerUrl(e){const t=(0,f.makeAbsoluteUrl)(e);(0,f.isLocalUrl)(t)&&(this.viewerUrl=(0,f.getAuthority)(e))}setTutorialUrl(e){const t=(0,f.makeAbsoluteUrl)(e);(0,f.isLocalUrl)(t)&&(this.tutorialUrl=(0,f.getAuthority)(e))}setPresentationUrl(e){const t=(0,f.makeAbsoluteUrl)(e);(0,f.isLocalUrl)(t)&&(this.presentationUrl=(0,f.getAuthority)(e))}setShinyDialogUrl(e){const t=(0,f.makeAbsoluteUrl)(e);(0,f.isLocalUrl)(t)&&(this.shinyDialogUrl=(0,f.getAuthority)(e))}getBaseUrl(){return this.options.baseUrl??""}keyPressEvent(e,t){"darwin"===process.platform&&t.meta&&"w"===t.key.toLowerCase()&&this.emit(v.CLOSE_WINDOW_SHORTCUT)}sendRpcRequest(e,t){const r=`window.sendRpcRequest("${e}", ${JSON.stringify(t)});`;this.executeJavaScript(r).catch((e=>{(0,c.logger)().logError(e)}))}removeMenu(){this.window.isDestroyed()||this.window.removeMenu()}removeMenuEventListener(){this.removeMenuBound&&((0,u.getEventBus)().off("appmenu-set",this.removeMenuBound),this.removeMenuBound=void 0)}ensureNoMenu(){this.removeMenu(),void 0===this.removeMenuBound&&(this.removeMenuBound=this.removeMenu.bind(this),(0,u.getEventBus)().on("appmenu-set",this.removeMenuBound))}close(){this.window.close()}static getPreload(){try{return require("path").resolve(__dirname,"../renderer","main_window","preload.js")}catch(e){return s.default.join(__dirname,"../renderer/preload.js")}}}t.DesktopBrowserWindow=v,v.WINDOW_DESTROYED="desktop-browser-window_destroyed",v.CLOSE_WINDOW_SHORTCUT="desktop-browser-close_window_shortcut"},502:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findDefault64Bit=t.findDefault32Bit=t.isValidBinary=t.isValidInstallation=t.findRInstallationsWin32=t.scanForR=t.detectREnvironment=t.prepareEnvironment=t.promptUserForR=t.showRNotFoundError=void 0;const a=s(r(1017)),l=r(2081),c=r(7147),u=r(3211),d=r(9886),p=r(4746),h=r(9433),f=r(8715),g=r(3201),m=r(4748),y=r(8125),v=r(8185),w=i(r(7052)),_=r(2037),b=r(2770),S=r(2298),E=r(9281);let R;function k(e){let t=new v.FilePath(e);t.isDirectory()&&(t=t.completeChildPath("win32"===process.platform?b.kWindowsRExe:"R"));const r=String.raw` cat("\x1E", sep = "") writeLines(sep = "\x1F", c( format(getRversion()), R.home(), R.home("doc"), R.home("include"), R.home("share"), paste(R.version$crt, collapse = ""), .Platform$r_arch, Sys.getenv("${R}"), Sys.getenv("R_PLATFORM") ))`;(0,p.logger)().logDebug(`Querying information about R executable at path: ${t}`);const n=Object.assign({},process.env);delete n.R_HOME,delete n.R_ARCH,delete n.R_DOC_DIR,delete n.R_INCLUDE_DIR,delete n.R_RUNTIME,delete n.R_SHARE_DIR,delete n[R],delete n.R_PLATFORM;const[o,s]=(0,d.expect)((()=>(0,l.spawnSync)(t.getAbsolutePath(),["--vanilla","-s"],{encoding:"utf-8",input:r,env:n})));let i=o.stdout||"";if((0,p.logger)().logDebug(`stdout: ${i.replaceAll("",_.EOL).replaceAll("",";")||"[no stdout produced]"}`),(0,p.logger)().logDebug(`stderr: ${o.stderr||"[no stderr produced]"}`),(0,p.logger)().logDebug(`status: ${o.status} [${0===o.status?"success":"failure"}]`),o.error&&(0,p.logger)().logDebug(`error: ${o.error}`),s)return(0,p.logger)().logDebug(`Error querying information about R: ${s}`),(0,d.err)(s);if(!i)return(0,p.logger)().logDebug("Error querying information about R: no output available"),(0,d.err)(new Error((0,m.t)("common.unknownErrorOccurred")));const h=i.indexOf("");if(-1===h)return(0,p.logger)().logError("internal error: missing output marker in R output"),(0,d.err)(new Error((0,m.t)("common.unknownErrorOccurred")));i=i.substring(h+1);let[f,g,y,w,S,E,k,O,x]=i.split("");return 0===O.length&&-1!==x.indexOf("-conda-")&&(O=[`${g}/lib`,`${g}/../../lib`].filter((e=>(0,c.existsSync)(e))).map((e=>a.default.normalize(e))).join(":")),"win32"!==process.platform&&""!=(0,u.getenv)(R)&&((0,p.logger)().logDebug(`Pre-pending user-defined ${R} to path set by R: ${O}`),O=(0,u.getenv)(R)+":"+O),(0,d.ok)({rScriptPath:e,version:f,envVars:{R_HOME:g,R_DOC_DIR:y,R_INCLUDE_DIR:w,R_SHARE_DIR:S,R_RUNTIME:E,R_ARCH:k,R_PLATFORM:x},ldLibraryPath:O})}function O(){const e=w.default.searchRegistryForInstallationsOfR();(0,p.logger)().logDebug(`Found the following R installations in the registry: ${JSON.stringify(e,null,2)}`);const t=["C:/R",`${(0,u.getenv)("ProgramFiles")}/R`,`${(0,u.getenv)("ProgramFiles(x86)")}/R`,`${(0,u.getenv)("LOCALAPPDATA")}/Programs/R`];for(const r of t){if(!(0,c.existsSync)(r))continue;const t=(0,c.readdirSync)(r,{encoding:"utf-8"});for(const n of t){const t=(0,a.join)(r,n);(0,c.existsSync)(t)&&((0,p.logger)().logDebug(`Found R installation at path: ${t}`),e.push(t))}}const r=Array.from(new Set(e));return(0,p.logger)().logDebug(`Found the following R installations: ${JSON.stringify(r,null,2)}`),r}function x(e){if(!(0,c.existsSync)(e))return!1;(0,p.logger)().logDebug(`Validating R installation at path: ${e}`);const[t,r]=k(e);return null==r}function P(e){const t=w.default.searchRegistryForDefaultInstallationOfR(e);return 0===t.length?((0,p.logger)().logWarning("No default R installation was found in the registry."),""):(0,c.existsSync)(t)?t:((0,p.logger)().logWarning(`Default version of R recorded in registry ${t} does not exist.`),"")}R="darwin"===process.platform?"DYLD_FALLBACK_LIBRARY_PATH":"LD_LIBRARY_PATH",t.showRNotFoundError=async function(e){const t=e?.message??(0,m.t)("detectRTs.couldNotLocateAnRInstallationOnTheSystem");await(0,g.createStandaloneErrorDialog)((0,m.t)("detectRTs.rNotFound"),t)},t.promptUserForR=async function(e=process.platform){if("win32"===e){if(0===(0,u.getenv)("RSTUDIO_DESKTOP_PROMPT_FOR_R").length&&!w.default.isCtrlKeyDown()){const e=(0,u.getenv)("RSTUDIO_WHICH_R");if(e)return(0,p.logger)().logDebug(`Using R from RSTUDIO_WHICH_R: ${e}`),(0,d.ok)(e);const t=(0,y.ElectronDesktopOptions)().rBinDir();if(t){const e=(0,y.fixWindowsRExecutablePath)(`${t}/${b.kWindowsRExe}`);if((0,p.logger)().logDebug(`Trying version of R stored in RStudio Desktop options: ${e}`),x(e))return(0,p.logger)().logDebug(`Validation succeeded; using R: ${e}`),(0,d.ok)(e);(0,p.logger)().logDebug(`Validation failed; skipping R: ${e}`)}}const e=O();0===e.length&&(0,p.logger)().logDebug("No R installations found via registry or common R install locations.");const t=new f.ChooseRModalWindow(e);(0,g.handleLocaleCookies)(t);const[r,n]=await t.showModal();if(n)return(0,d.err)(n);if(null==r||null==r.binaryPath)return(0,d.ok)(null);const o=r.binaryPath;(0,y.ElectronDesktopOptions)().setRExecutablePath(o);const s=(0,y.ElectronDesktopOptions)().renderingEngine()||"auto",i=r.renderingEngine||"auto";return s!==i?((0,y.ElectronDesktopOptions)().setRenderingEngine(i),(0,E.appState)().modalTracker.trackElectronModalSync((()=>S.dialog.showMessageBoxSync({title:(0,m.t)("chooseRDialog.renderingEngineChangedTitle"),message:(0,m.t)("chooseRDialog.renderingEngineChangedMessage"),type:"info"}))),(0,d.ok)(null)):((0,u.setenv)("RSTUDIO_WHICH_R",o),(0,d.ok)(o))}return(0,d.err)(new Error("This window can only be opened on Windows"))},t.prepareEnvironment=function(e){try{return function(e){const[t,r]=k(e);if(r)return r;(0,u.setVars)(t.envVars),"win32"!==process.platform&&(process.env[R]=t.ldLibraryPath);const n=t.rScriptPath;if("win32"===process.platform){const e=a.default.dirname(n);process.env.PATH=`${e};${process.env.PATH}`}return(0,h.success)()}(e)}catch(e){return(0,p.logger)().logError(e),(0,h.safeError)(e)}},t.detectREnvironment=k,t.scanForR=function(){const e=(0,u.getenv)("RSTUDIO_WHICH_R");return e?((0,p.logger)().logDebug(`Using ${e} (found by RSTUDIO_WHICH_R environment variable)`),(0,d.ok)(e)):((0,p.logger)().logDebug("Scanning system for R installations"),"win32"===process.platform?function(){const e=(0,u.getenv)("RSTUDIO_WHICH_R");if(e)return(0,p.logger)().logDebug(`Using R ${e} (found by RSTUDIO_WHICH_R environment variable)`),(0,d.ok)(e);if("x64"===process.arch){const e=P("R64");if(e){const t=`${e}/bin/x64/${b.kWindowsRExe}`;if(x(t))return(0,p.logger)().logDebug(`Using R ${t} (found via registry)`),(0,d.ok)(t)}}const t=P("R");if(t){const e=`${t}/bin/i386/${b.kWindowsRExe}`;if(x(e))return(0,p.logger)().logDebug(`Using R ${e} (found via registry)`),(0,d.ok)(e)}return(0,p.logger)().logDebug("Failed to discover R"),(0,d.err)()}():function(){const e=["/usr/bin/R","/usr/local/bin/R","/opt/local/bin/R"];if("darwin"==process.platform)e.push("/Library/Frameworks/R.framework/Resources/bin/R"),e.push("/opt/homebrew/bin/R");else{const[e,t]=("/usr/bin/which R",(0,d.expect)((()=>(0,l.execSync)("/usr/bin/which R",{encoding:"utf-8"}).trim())));if(!t&&e)return(0,p.logger)().logDebug(`Using ${e} (found by /usr/bin/which/R)`),(0,d.ok)(e)}for(const t of e)if(x(t))return(0,p.logger)().logDebug(`Using ${t} (found by searching known locations)`),(0,d.ok)(t);return(0,d.err)()}())},t.findRInstallationsWin32=O,t.isValidInstallation=function(e,t){return"win32"!==process.platform?((0,p.logger)().logErrorMessage("Windows-only API invoked on non-Windows codepath (isValidInstallation)"),!0):x(a.default.normalize(`${e}/bin/${t}/${b.kWindowsRExe}`))},t.isValidBinary=x,t.findDefault32Bit=function(){return P("R")},t.findDefault64Bit=function(){return P("R64")}},8754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.detectRosetta=void 0;const n=r(2081),o=r(4746),s=r(2298),i=r(9281),a=r(8125),l=r(4748);t.detectRosetta=function(){if("darwin"!==process.platform||"arm64"!==process.arch)return;const e=function(){try{(0,o.logger)().logDebug("$ /usr/bin/pgrep oahd");const e=(0,n.execSync)("/usr/bin/pgrep oahd",{encoding:"utf-8"});return(0,o.logger)().logDebug(e),e.trim().length>0}catch(e){if(e instanceof Object&&"status"in e&&"stderr"in e&&1===e.status&&0===e.stderr.trim().length)return(0,o.logger)().logDebug("Command returned exit code 1 with empty stderr. Rosetta is not running."),!1;(0,o.logger)().logErrorMessage("Failed to verify if rosetta is installed."),(0,o.logger)().logErrorMessage(JSON.stringify(e));const t={type:"error",buttons:[(0,l.t)("common.buttonOk")],defaultId:0,title:(0,l.t)("detectRosetta.checkFailedTitle"),message:(0,l.t)("detectRosetta.checkFailedMessage"),detail:(0,l.t)("detectRosetta.checkFailedDetail")};throw(0,i.appState)().modalTracker.trackElectronModalSync((async()=>s.dialog.showMessageBox(t))),e}}();if(!e){(0,o.logger)().logDebug("Rosetta 2 is not running. Warning user to install Rosetta to avoid issues.");const e={type:"warning",buttons:[(0,l.t)("detectRosetta.installWarningMoreInfo"),(0,l.t)("detectRosetta.installWarningRemindLater"),(0,l.t)("detectRosetta.installWarningDoNotRemind")],defaultId:0,title:(0,l.t)("detectRosetta.installWarningTitle"),message:(0,l.t)("detectRosetta.installWarningMessage"),detail:(0,l.t)("detectRosetta.installWarningDetail")};(0,i.appState)().modalTracker.trackElectronModalSync((async()=>s.dialog.showMessageBox(e).then((e=>{switch(e.response){case 0:s.shell.openExternal("https://docs.posit.co/ide/desktop-pro/getting_started/installation.html#apple-silicon-mac-m1m2");break;case 1:(0,a.ElectronDesktopOptions)().setCheckForRosetta(!0);break;case 2:(0,a.ElectronDesktopOptions)().setCheckForRosetta(!1)}}))))}return e}},9525:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GwtCallback=t.PendingQuit=void 0;const a=r(2081),l=r(2298),c=i(r(2361)),u=r(7147),d=r(2037),p=i(r(4748)),h=r(7981),f=s(r(1017)),g=r(7310),m=r(8185),y=r(4746),v=r(5553),w=r(4324),_=i(r(7052)),b=r(8715),S=r(9281),E=r(502),R=r(6128),k=r(8125),O=r(3201),x=r(2996),P=r(3211),$=r(9433),T=r(62),I=r(8754);var D;function M(e){const t=(0,f.dirname)((0,f.dirname)(e));return e.endsWith("x64")?`[64-bit] ${t}`:e.endsWith("i386")?`[32-bit] ${t}`:t}!function(e){e[e.PendingQuitNone=0]="PendingQuitNone",e[e.PendingQuitAndExit=1]="PendingQuitAndExit",e[e.PendingQuitAndRestart=2]="PendingQuitAndRestart",e[e.PendingQuitRestartAndReload=3]="PendingQuitRestartAndReload"}(D||(t.PendingQuit=D={}));class C extends c.default{constructor(e){super(),this.mainWindow=e,this.initialized=!1,this.pendingQuit=D.PendingQuitNone,this.owners=new Set,this.errorPageData=new Map,this.monospaceFonts=[],this.proportionalFonts=[],this.owners.add(e);try{const e=(0,P.getenv)("RSTUDIO_QUERY_FONTS");"0"!==e&&"false"!==e.toLowerCase()&&(this.monospaceFonts=[...new Set((0,h.findFontsSync)({monospace:!0}).map((e=>"darwin"===process.platform?e.postscriptName:e.family)))].sort(((e,t)=>e.localeCompare(t))),this.proportionalFonts=[...new Set((0,h.findFontsSync)({monospace:!1}).map((e=>e.family)))].sort(((e,t)=>e.localeCompare(t))))}catch(e){(0,y.logger)().logError((0,$.safeError)(e))}function t(e){l.shell.openPath((0,O.resolveAliasedPath)((0,m.normalizeSeparatorsNative)(e))).catch((e=>{console.log("error:",e),(0,y.logger)().logErrorMessage(e)}))}l.ipcMain.on("desktop_browse_url",((e,t)=>{if("win32"===process.platform&&t.startsWith("file:///")){const e=decodeURI(t).substring(8).replaceAll("/","\\");_.default.openExternal(e)}else l.shell.openExternal(t)})),l.ipcMain.handle("desktop_get_open_file_name",(async(e,t,r,n,o,s,i)=>{console.log("desktop_get_open_file_name");const a={title:t,defaultPath:(0,m.normalizeSeparatorsNative)((0,O.resolveAliasedPath)(n)),buttonLabel:r,properties:["openFile"]};s&&"darwin"===process.platform&&a.properties.push("openDirectory"),o&&(a.filters=(0,O.parseFilter)(o));let c=l.BrowserWindow.getFocusedWindow();return i&&(c=this.getSender("desktop_open_minimal_window",e.processId,e.frameId).window),c?(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showOpenDialog(c,a))):(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showOpenDialog(a)))})),l.ipcMain.handle("desktop_get_save_file_name",(async(e,t,r,n,o,s,i)=>{const a={title:t,defaultPath:(0,m.normalizeSeparatorsNative)((0,O.resolveAliasedPath)(n)),buttonLabel:r};(0,y.logger)().logDebug(`Using path: ${a.defaultPath}`);const c=[{name:p.default.t("common.allFiles"),extensions:["*"]}];if(o){const e=o.replace(".","");c.unshift({name:e,extensions:[e]})}a.filters=c;let u=l.BrowserWindow.getFocusedWindow();return i&&(u=this.getSender("desktop_open_minimal_window",e.processId,e.frameId).window),u?(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showSaveDialog(u,a))):(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showSaveDialog(a)))})),l.ipcMain.handle("desktop_get_existing_directory",(async(e,t,r,n,o)=>{const s={title:t,defaultPath:(0,m.normalizeSeparatorsNative)((0,O.resolveAliasedPath)(n)),buttonLabel:r,properties:["openDirectory","createDirectory","promptToCreate"]};let i=l.BrowserWindow.getFocusedWindow();return o&&(i=this.getSender("desktop_open_minimal_window",e.processId,e.frameId).window),i?(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showOpenDialog(i,s))):(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showOpenDialog(s)))})),l.ipcMain.handle("desktop_get_user_home_path",(()=>(0,T.userHomePathString)())),l.ipcMain.on("desktop_on_clipboard_selection_changed",(()=>{})),l.ipcMain.on("desktop_undo",(()=>{(0,x.focusedWebContents)()?.undo()})),l.ipcMain.on("desktop_redo",(()=>{(0,x.focusedWebContents)()?.redo()})),l.ipcMain.on("desktop_clipboard_cut",(()=>{(0,x.focusedWebContents)()?.cut()})),l.ipcMain.on("desktop_clipboard_copy",(()=>{(0,x.focusedWebContents)()?.copy()})),l.ipcMain.on("desktop_clipboard_paste",(()=>{(0,x.focusedWebContents)()?.paste()})),l.ipcMain.on("desktop_set_clipboard_text",((e,t)=>{l.clipboard.writeText(t,"clipboard")})),l.ipcMain.handle("desktop_get_clipboard_text",(()=>l.clipboard.readText("clipboard"))),l.ipcMain.handle("desktop_get_clipboard_uris",(()=>{if(!l.clipboard.has("text/uri-list"))return[];const e=l.clipboard.read("text/uri-list").split("\n"),t="win32"===process.platform?"file:///":"file://";return e.map((e=>(e.startsWith(t)&&(e=e.substring(t.length)),e)))})),l.ipcMain.handle("desktop_get_clipboard_image",(()=>{if(!l.clipboard.availableFormats().includes("image/png"))return"";const e=l.clipboard.readImage("clipboard").toPNG(),t=(0,S.appState)().scratchTempDir(new m.FilePath("/tmp")),r=f.default.join(t.getAbsolutePath(),"rstudio-clipboard");new m.FilePath(r).ensureDirectorySync();const n=f.default.join(r,(0,m.tempFilename)("png","image").getFilename());return(0,u.writeFileSync)(n,e),n})),l.ipcMain.on("desktop_set_global_mouse_selection",((e,t)=>{l.clipboard.writeText(t,"selection")})),l.ipcMain.handle("desktop_get_global_mouse_selection",(()=>l.clipboard.readText("selection"))),l.ipcMain.handle("desktop_get_cursor_position",(()=>{const e=l.screen.getCursorScreenPoint();return{x:e.x,y:e.y}})),l.ipcMain.handle("desktop_does_window_exist_at_cursor_position",(()=>{const e=l.screen.getCursorScreenPoint(),t=l.BrowserWindow.getAllWindows();for(const r of t)if(r.isVisible()){const t=r.getBounds();if(e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height)return!0}return!1})),l.ipcMain.on("desktop_on_workbench_initialized",((e,t)=>{this.initialized=!0,this.emit(C.WORKBENCH_INITIALIZED),(0,S.appState)().setScratchTempDir(new m.FilePath(t))})),l.ipcMain.on("desktop_show_folder",((e,t)=>{l.shell.openPath((0,m.normalizeSeparatorsNative)(t)).catch((e=>{console.log("error:",e),(0,y.logger)().logErrorMessage(e)}))})),l.ipcMain.on("desktop_show_file",((e,r)=>{t(r)})),l.ipcMain.on("desktop_show_word_doc",((e,r)=>{t(r)})),l.ipcMain.on("desktop_show_ppt_presentation",((e,r)=>{t(r)})),l.ipcMain.on("desktop_show_pdf",((e,r,n)=>{t(r)})),l.ipcMain.on("desktop_prepare_show_word_doc",(()=>"")),l.ipcMain.on("desktop_prepare_show_ppt_presentation",(()=>"")),l.ipcMain.handle("desktop_get_r_version",(()=>M((0,k.ElectronDesktopOptions)().rBinDir()))),l.ipcMain.handle("desktop_choose_r_version",(async()=>{const t=(0,E.findRInstallationsWin32)();0===t.length&&(0,y.logger)().logInfo("No R installations found via registry or common R install locations.");const r=new b.ChooseRModalWindow(t,e.window);(0,O.handleLocaleCookies)(r);const[n,o]=await r.showModal();if(o)return(0,y.logger)().logError(o),"";if(null==n||null==n.binaryPath)return"";const s=n.binaryPath,i=(0,f.dirname)(s);return(0,k.ElectronDesktopOptions)().setRExecutablePath(s),(0,y.logger)().logDebug(`Using R: ${i}`),M(i)})),l.ipcMain.on("desktop_open_minimal_window",(async(e,t,r,n,o)=>{if("chrome://gpu"===r||"chrome://accessibility"===r){const e=new l.BrowserWindow({autoHideMenuBar:!0,webPreferences:{sandbox:!0},acceptFirstMouse:!0});return e.removeMenu(),e.webContents.on("before-input-event",((t,r)=>{("darwin"===process.platform?r.meta:r.control)&&"w"===r.key.toLowerCase()&&(t.preventDefault(),e.close())})),e.loadURL(r)}const s=this.getSender("desktop_open_minimal_window",e.processId,e.frameId),i=(0,R.openMinimalWindow)(s,t,r,n,o);i.window.once("ready-to-show",(()=>{i.window.show()}))})),l.ipcMain.on("desktop_activate_minimal_window",((e,t)=>{t&&"_blank"!==t&&(0,x.activateWindow)(t)})),l.ipcMain.on("desktop_activate_satellite_window",((e,t)=>{(0,x.activateWindow)(t)})),l.ipcMain.handle("desktop_prepare_for_satellite_window",((e,t,r,n,o,s)=>{(0,S.appState)().prepareForWindow({type:"satellite",name:t,mainWindow:this.mainWindow,screenX:r,screenY:n,width:o,height:s,allowExternalNavigate:!1})})),l.ipcMain.handle("desktop_prepare_for_named_window",((e,t,r,n)=>{(0,S.appState)().prepareForWindow({type:"secondary",name:t,allowExternalNavigate:r,showToolbar:n,mainWindow:this.mainWindow})})),l.ipcMain.on("desktop_set_gwt_num_modals_showing",((e,t)=>{(0,S.appState)().modalTracker.setNumGwtModalsShowing(t)})),l.ipcMain.handle("desktop_copy_page_region_to_clipboard",((e,t,r,n,o)=>{const s={x:t,y:r,width:n,height:o};this.mainWindow.window.capturePage(s).then((e=>{l.clipboard.writeImage(e)})).catch((e=>{(0,y.logger)().logError(e)}))})),l.ipcMain.handle("desktop_copy_image_at_xy_to_clipboard",((e,t,r)=>{const n=l.BrowserWindow.getFocusedWindow();n?.webContents?n.webContents.copyImageAt(t,r):(0,y.logger)().logError(`Failed to copy image at x: ${t}, y: ${r} to clipboard`)})),l.ipcMain.on("desktop_export_page_region_to_file",((e,t,r,n,o,s,i)=>{const a={x:n,y:o,width:s,height:i};t=(0,O.resolveAliasedPath)(t),this.mainWindow.window.capturePage(a).then((e=>{let n;n="jpeg"==r?e.toJPEG(100):e.toPNG(),(0,u.writeFileSync)(t,n)})).catch((e=>{(0,y.logger)().logError(e)}))})),l.ipcMain.handle("desktop_supports_clipboard_metafile",(()=>"win32"===process.platform)),l.ipcMain.handle("desktop_show_message_box",(async(e,t,r,n,o,s,i)=>{let a;a="darwin"===process.platform?{type:this.convertMessageBoxType(t),message:r,detail:n,buttons:this.convertButtons(o)}:{type:this.convertMessageBoxType(t),title:r,message:n,buttons:this.convertButtons(o)};const c=l.BrowserWindow.getFocusedWindow();return c?(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showMessageBox(c,a))):(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showMessageBox(a)))})),l.ipcMain.on("desktop_bring_main_frame_to_front",(()=>{this.mainWindow.window.focus()})),l.ipcMain.on("desktop_bring_main_frame_behind_active",(()=>{const e=this.mainWindow.window,t=l.BrowserWindow.getFocusedWindow();t&&e!==t&&(e.show(),t.focus())})),l.ipcMain.handle("desktop_rendering_engine",(()=>(0,k.ElectronDesktopOptions)().renderingEngine())),l.ipcMain.on("desktop_set_desktop_rendering_engine",((e,t)=>{(0,k.ElectronDesktopOptions)().setRenderingEngine(t)})),l.ipcMain.on("desktop_clean_clipboard",((e,t)=>{_.default.cleanClipboard(t)})),l.ipcMain.handle("desktop_set_pending_quit",((e,t)=>{this.pendingQuit=t})),l.ipcMain.on("desktop_open_project_in_new_window",((e,t)=>{this.mainWindow.launchRStudio({projectFilePath:(0,O.resolveAliasedPath)(t)})})),l.ipcMain.on("desktop_open_session_in_new_window",((e,t)=>{this.mainWindow.launchRStudio({workingDirectory:(0,O.resolveAliasedPath)(t)})})),l.ipcMain.on("desktop_get_fixed_width_font_list",(e=>{e.returnValue=this.monospaceFonts.join("\n")})),l.ipcMain.on("desktop_get_fixed_width_font",(e=>{let t=(0,k.ElectronDesktopOptions)().fixedWidthFont();if(!t){t=k.defaultFonts[0];for(const e of k.defaultFonts)if(this.monospaceFonts.includes(e)){t=e;break}}e.returnValue=`"${t}"`})),l.ipcMain.on("desktop_get_proportional_font",(e=>{let t;t="darwin"===process.platform?["Lucida Grande","Lucida Sans","DejaVu Sans","Segoe UI","Verdana","Helvetica"]:"win32"===process.platform?["Segoe UI","Verdana","Lucida Sans","DejaVu Sans","Lucida Grande","Helvetica"]:["Lucida Sans","DejaVu Sans","Lucida Grande","Segoe UI","Verdana","Helvetica"];let r=t[0];for(const e of t)if(this.proportionalFonts.includes(e)){r=e;break}e.returnValue=`"${r}"`})),l.ipcMain.on("desktop_set_fixed_width_font",((e,t)=>{void 0!==t&&(0,k.ElectronDesktopOptions)().setFixedWidthFont(t)})),l.ipcMain.on("desktop_get_zoom_level",(e=>{e.returnValue=(0,k.ElectronDesktopOptions)().zoomLevel()})),l.ipcMain.on("desktop_set_zoom_level",((e,t)=>{this.getSender("desktop_zoom_actual_size",e.processId,e.frameId).setZoomLevel(t)})),l.ipcMain.on("desktop_zoom_in",(e=>{this.getSender("desktop_zoom_in",e.processId,e.frameId).zoomIn()})),l.ipcMain.on("desktop_zoom_out",(e=>{this.getSender("desktop_zoom_out",e.processId,e.frameId).zoomOut()})),l.ipcMain.on("desktop_zoom_actual_size",(e=>{this.getSender("desktop_zoom_actual_size",e.processId,e.frameId).zoomActualSize()})),l.ipcMain.on("desktop_set_background_color",((e,t)=>{})),l.ipcMain.on("desktop_change_title_bar_color",((e,t,r,n)=>{})),l.ipcMain.on("desktop_sync_to_editor_theme",((e,t)=>{l.nativeTheme.themeSource=t?"dark":"light"})),l.ipcMain.handle("desktop_get_enable_accessibility",(()=>(0,k.ElectronDesktopOptions)().accessibility())),l.ipcMain.on("desktop_set_enable_accessibility",((e,t)=>{(0,k.ElectronDesktopOptions)().setAccessibility(t)})),l.ipcMain.on("desktop_set_autohide_menubar",((e,t)=>{this.mainWindow.window.setAutoHideMenuBar(t),this.mainWindow.window.setMenuBarVisibility(!t)})),l.ipcMain.on("desktop_set_disable_renderer_accessibility",((e,t)=>{(0,k.ElectronDesktopOptions)().setDisableRendererAccessibility(t)})),l.ipcMain.handle("desktop_get_ignore_gpu_exclusion_list",((e,t)=>!(0,k.ElectronDesktopOptions)().useGpuExclusionList())),l.ipcMain.on("desktop_set_ignore_gpu_exclusion_list",((e,t)=>{(0,k.ElectronDesktopOptions)().setUseGpuExclusionList(!t)})),l.ipcMain.handle("desktop_get_disable_gpu_driver_bug_workarounds",(()=>!(0,k.ElectronDesktopOptions)().useGpuDriverBugWorkarounds())),l.ipcMain.on("desktop_set_disable_gpu_driver_bug_workarounds",((e,t)=>{(0,k.ElectronDesktopOptions)().setUseGpuDriverBugWorkarounds(!t)})),l.ipcMain.on("desktop_show_session_server_options_dialog",(()=>{C.unimpl("desktop_show_session_server_options_dialog")})),l.ipcMain.handle("desktop_get_init_messages",(()=>"")),l.ipcMain.handle("desktop_get_desktop_synctex_viewer",(()=>(C.unimpl("desktop_get_desktop_synctex_viewer"),""))),l.ipcMain.on("desktop_external_synctex_preview",((e,t,r)=>{C.unimpl("desktop_external_synctex_preview")})),l.ipcMain.on("desktop_external_synctex_view",((e,t,r,n,o)=>{C.unimpl("desktop_external_synctex_view")})),l.ipcMain.handle("desktop_supports_fullscreen_mode",(()=>"darwin"===process.platform)),l.ipcMain.on("desktop_toggle_fullscreen_mode",(()=>{this.mainWindow.window.fullScreen=!this.mainWindow.window.fullScreen})),l.ipcMain.on("desktop_show_keyboard_shortcut_help",(()=>{let e;e=l.app.isPackaged?(0,g.pathToFileURL)(f.default.join((0,O.getAppPath)(),"www","docs","keyboard.htm")):(0,g.pathToFileURL)(new m.FilePath((0,O.findRepoRoot)()).completeChildPath("src/gwt/www/docs/keyboard.htm").getAbsolutePath()),l.shell.openExternal(e.toString())})),l.ipcMain.on("desktop_launch_session",((e,t)=>{this.mainWindow.launchSession(t)})),l.ipcMain.on("desktop_reload_zoom_window",(()=>{const e=(0,S.appState)().windowTracker.getWindow("_rstudio_zoom");e&&e.window.webContents.reload()})),l.ipcMain.on("desktop_set_tutorial_url",((e,t)=>{this.getSender("desktop_set_tutorial_url",e.processId,e.frameId).setTutorialUrl(t)})),l.ipcMain.on("desktop_set_viewer_url",((e,t)=>{this.getSender("desktop_set_viewer_url",e.processId,e.frameId).setViewerUrl(t)})),l.ipcMain.on("desktop_set_presentation_url",((e,t)=>{this.getSender("desktop_set_presentation_url",e.processId,e.frameId).setPresentationUrl(t)})),l.ipcMain.on("desktop_reload_viewer_zoom_window",((e,t)=>{const r=(0,S.appState)().windowTracker.getWindow("_rstudio_viewer_zoom");r&&r.window.webContents.loadURL(t)})),l.ipcMain.on("desktop_set_shiny_dialog_url",((e,t)=>{this.getSender("desktop_set_shiny_dialog_url",e.processId,e.frameId).setShinyDialogUrl(t)})),l.ipcMain.handle("desktop_allow_navigation",((e,t)=>this.getSender("desktop_allow_navigation",e.processId,e.frameId).allowNavigation(t))),l.ipcMain.handle("desktop_is_macos",(()=>"darwin"===process.platform)),l.ipcMain.handle("desktop_is_centos",(()=>(0,v.isCentOS)())),l.ipcMain.on("desktop_set_busy",((e,t)=>{})),l.ipcMain.on("desktop_set_window_title",((e,t)=>{this.mainWindow.window.setTitle(`${t} - ${(0,S.appState)().activation().editionName()}`)})),l.ipcMain.on("desktop_install_rtools",((e,t,r)=>{let n=`${r} /SP- /SILENT`;const o=process.env.SYSTEMDRIVE;o?.length&&(0,u.existsSync)(o)&&(n=`${n} /DIR=${o}\\RBuildTools\\${t}`),(0,a.exec)(n,((e,t,r)=>{e&&(0,y.logger)().logError(r)}))})),l.ipcMain.handle("desktop_get_display_dpi",(()=>(96*l.screen.getPrimaryDisplay().scaleFactor).toString())),l.ipcMain.on("desktop_on_session_quit",(()=>{this.emit(C.SESSION_QUIT)})),l.ipcMain.on("desktop_stop_main_thread",(()=>{process.crash()})),l.ipcMain.handle("desktop_get_session_server",(()=>(C.unimpl("desktop_get_session_server"),{}))),l.ipcMain.handle("desktop_get_session_servers",(()=>[])),l.ipcMain.on("desktop_reconnect_to_session_server",((e,t)=>{C.unimpl("desktop_reconnect_to_session_server")})),l.ipcMain.handle("desktop_set_launcher_server",((e,t)=>(C.unimpl("desktop_set_launcher_server"),!1))),l.ipcMain.on("desktop_connect_to_launcher_server",(()=>{C.unimpl("desktop_connect_to_launcher_server")})),l.ipcMain.handle("desktop_get_launcher_server",(()=>(C.unimpl("desktop_get_launcher_server"),{}))),l.ipcMain.on("desktop_start_launcher_job_status_stream",((e,t)=>{C.unimpl("desktop_start_launcher_job_status_stream")})),l.ipcMain.on("desktop_stop_launcher_job_status_stream",((e,t)=>{C.unimpl("desktop_stop_launcher_job_status_stream")})),l.ipcMain.on("desktop_start_launcher_job_output_stream",((e,t)=>{C.unimpl("desktop_start_launcher_job_output_stream")})),l.ipcMain.on("desktop_stop_launcher_job_output_stream",((e,t)=>{C.unimpl("desktop_stop_launcher_job_output_stream")})),l.ipcMain.on("desktop_control_launcher_job",((e,t,r)=>{C.unimpl("desktop_control_launcher_job")})),l.ipcMain.on("desktop_submit_launcher_job",((e,t)=>{C.unimpl("desktop_submit_launcher_job")})),l.ipcMain.on("desktop_get_job_container_user",(()=>{C.unimpl("desktop_get_job_container_user")})),l.ipcMain.on("desktop_validate_jobs_config",(()=>{C.unimpl("desktop_validate_jobs_config")})),l.ipcMain.handle("desktop_get_proxy_port_number",(()=>(C.unimpl("desktop_get_proxy_port_number"),-1))),l.ipcMain.handle("desktop_startup_error_info",(async(e,t)=>("launch_failed"===t&&this.addMacOSVersionError(),(0,w.resolveTemplateVar)(t,this.errorPageData)))),l.ipcMain.on("desktop_detect_rosetta",(()=>{(0,k.ElectronDesktopOptions)().checkForRosetta()&&(0,I.detectRosetta)()}))}addMacOSVersionError(){if("darwin"===(0,d.platform)()&&parseInt((0,d.release)().substring(0,(0,d.release)().indexOf(".")))<20){let e="You are using an unsupported operating system: "+(0,a.execSync)("sw_vers -productName").toString().trim()+" "+(0,a.execSync)("sw_vers -productVersion").toString().trim()+". RStudio requires macOS 11 (Big Sur) or higher.";if(this.errorPageData.get("process_error")){const t=this.errorPageData.get("process_error");t?.includes("No error available")||(e+="\n\n"+t)}this.errorPageData.set("process_error",e)}}static unimpl(e){if(l.app.isPackaged)return;const t=l.BrowserWindow.getFocusedWindow(),r={title:p.default.t("gwtCallbackTs.unimplemented"),message:p.default.t("gwtCallbackTs.callbackNyiLowercase",{ipcName:e})};t?(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showMessageBox(t,r))):(0,S.appState)().modalTracker.trackElectronModalAsync((async()=>l.dialog.showMessageBox(r)))}collectPendingQuitRequest(){if(this.pendingQuit!=D.PendingQuitNone){const e=this.pendingQuit;return this.pendingQuit=D.PendingQuitNone,e}return D.PendingQuitNone}convertMessageBoxType(e){switch(e){case 1:return"info";case 2:return"warning";case 3:return"error";default:return"question"}}convertButtons(e){return e.split("|")}registerOwner(e){this.owners.add(e)}unregisterOwner(e){this.owners.delete(e)}getSender(e,t,r){const n=l.webFrameMain.fromId(t,r);if(n)for(const e of this.owners)try{if(e.window.webContents.mainFrame===n)return e}catch(e){(0,y.logger)().logDebug("Window WebContents has been destroyed. Skipping this window.")}const o=new Error(`Received callback ${e} from unknown window`);throw(0,y.logger)().logError(o),o}setErrorPageInfo(e){this.errorPageData=e}}t.GwtCallback=C,C.WORKBENCH_INITIALIZED="gwt-callback-workbench_initialized",C.SESSION_QUIT="gwt-callback-session_quit"},6377:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GwtWindow=void 0;const n=r(3356),o=r(4746),s=r(7060),i=r(8125);class a extends s.DesktopBrowserWindow{constructor(e){super(e),this.zoomLevels=[.25,.5,.75,.8,.9,1,1.1,1.25,1.5,1.75,2,2.5,3,4,5],this.window.on("focus",this.onActivated.bind(this)),this.window.webContents.on("did-navigate",((e,t)=>{this.window.webContents.clearHistory()}))}zoomActualSize(){this.setWindowZoomLevel(1)}setZoomLevel(e){this.setWindowZoomLevel(e)}zoomIn(){const e=(0,i.ElectronDesktopOptions)().zoomLevel(),t=(0,n.nextHighest)(e,this.zoomLevels);t!=e&&this.setWindowZoomLevel(t)}zoomOut(){const e=(0,i.ElectronDesktopOptions)().zoomLevel(),t=(0,n.nextLowest)(e,this.zoomLevels);t!=e&&this.setWindowZoomLevel(t)}onCloseWindowShortcut(){this.executeJavaScript("if (window.desktopHooks)\n window.desktopHooks.isCommandEnabled('closeSourceDoc');\n else false").then((e=>{e||this.window.close()})).catch((e=>(0,o.logger)().logError(e)))}setWindowZoomLevel(e){(0,i.ElectronDesktopOptions)().setZoomLevel(e),this.window.webContents.setZoomFactor(e)}}t.GwtWindow=a},9707:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.changeLanguage=t.localize=t.initI18n=void 0;const a=i(r(4748)),l=s(r(8921)),c=s(r(3056));t.initI18n=()=>{a.default.init({resources:{en:{translation:l},fr:{translation:c}},fallbackLng:"en"}).catch((e=>{console.log("Error when initializing i18next: "),console.log(e)}))},t.changeLanguage=async(e="en")=>a.default.changeLanguage(e).catch((t=>{console.log("Something went wrong changing language to "+e,t)})),t.localize=function(e,t){try{!function(e,t){e.querySelectorAll("[data-i18n]").forEach((e=>{const r=e.getAttribute("data-i18n"),n=-1===r.indexOf(".")?`${t}.${r}`:r;a.default.exists(n)&&(e.innerHTML=a.default.t(n))}))}(e,t)}catch(e){const t=a.default.t("i18nManager.errorLocalizingDocument");console.log(`${t}: ${e}`)}}},2773:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(2298),s=n(r(3396)),i=r(8185),a=r(4746),l=r(1859),c=r(4284),u=r(3201),d="logging.conf";t.default=class{constructor(e,t){const r=new i.FilePath(process.execPath);this.executableName=e??r.getFilename();let n=t?.file?new i.FilePath(t.file):new i.FilePath(process.env.RS_LOG_CONF_FILE);t?.config?this.logConfContent=(0,s.default)("").read(t.config):(n.existsSync()||(n=l.Xdg.userConfigDir().completeChildPath(d),n.existsSync()||(n=l.Xdg.systemConfigFile(d))),n.existsSync()?this.logConfContent=(0,s.default)(n.getAbsolutePathNative()):this.logConfContent=(0,s.default)(""))}getLogLevel(){const e=o.app.commandLine.getSwitchValue(c.options.logLevel.arg);return e?(0,a.parseCommandLineLogLevel)(e,"warn"):this.getProperty(c.options.logLevel)??"warn"}getLoggerType(){return this.getProperty(c.options.loggerType)??"file"}getLogMessageFormat(){return this.getProperty(c.options.logMessageFormat)??"pretty"}getLogFile(){const e=this.getProperty(c.options.logDir);return(e?new i.FilePath(e):(0,u.userLogPath)()).completeChildPath("rdesktop.log")}getProperty(e){return(process.env[e.env]??o.app.commandLine.getSwitchValue(e.arg))||(this.logConfContent.get(`@${this.executableName}.${e.arg}`)?.toString()??this.logConfContent.get(`*.${e.arg}`)?.toString())}}},2865:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerCallback=void 0;const o=r(2298),s=n(r(2361)),i=r(4746);class a extends s.default{constructor(){super(),o.ipcMain.on("desktop_log_message",((e,t,r)=>{switch(t=t.toLowerCase()){case"err":case"error":(0,i.logger)().logErrorMessage(r);break;case"warn":case"warning":(0,i.logger)().logWarning(r);break;case"info":(0,i.logger)().logInfo(r);break;case"debug":(0,i.logger)().logDebug(r)}}))}}t.LoggerCallback=a},7507:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainWindow=t.closeAllSatellites=void 0;const o=r(2298),s=r(4746),i=n(r(4748)),a=r(6213),l=r(9281),c=r(7060),u=r(9525),d=r(6377),p=r(2969),h=r(8125),f=r(7193),g=r(6445),m=r(3201);function y(e){const t=o.BrowserWindow.getAllWindows();for(const r of t)r!==e&&r.close()}t.closeAllSatellites=y;let v=0;class w extends d.GwtWindow{constructor(e){super({name:"",baseUrl:e,allowExternalNavigate:!1,addApiKeys:["desktop","desktopMenuCallback"]}),this.quitConfirmed=!1,this.geometrySaved=!1,this.workbenchInitialized=!1,this.isErrorDisplayed=!1,this.didMainFrameLoadSuccessfully=!0,(0,l.appState)().gwtCallback=new u.GwtCallback(this),this.menuCallback=new p.MenuCallback,f.RCommandEvaluator.setMainWindow(this),this.menuCallback.showPlaceholderMenu(),this.menuCallback.on(p.MenuCallback.MENUBAR_COMPLETED,(()=>{})),this.menuCallback.on(p.MenuCallback.COMMAND_INVOKED,(e=>{this.invokeCommand(e)})),(0,l.appState)().gwtCallback?.on(u.GwtCallback.WORKBENCH_INITIALIZED,(()=>{this.emit(w.FIRST_WORKBENCH_INITIALIZED)})),(0,l.appState)().gwtCallback?.on(u.GwtCallback.WORKBENCH_INITIALIZED,(()=>{this.onWorkbenchInitialized()})),(0,l.appState)().gwtCallback?.on(u.GwtCallback.SESSION_QUIT,(()=>{this.onSessionQuit()})),this.on(c.DesktopBrowserWindow.CLOSE_WINDOW_SHORTCUT,this.onCloseWindowShortcut.bind(this)),(0,m.registerWebContentsDebugHandlers)(this.window.webContents),this.window.webContents.session.webRequest.onBeforeRequest(((e,t)=>{(0,s.logger)().logDebug(`${e.method} ${e.url} [${e.resourceType}]`),"subFrame"===e.resourceType&&e.frame?.url&&!this.allowNavigation(e.url)?(o.shell.openExternal(e.url).catch((e=>{(0,s.logger)().logError(e)})),t({cancel:!1,redirectURL:e.frame?.url})):t({cancel:!1})})),this.window.webContents.on("did-start-navigation",((e,t,r,n)=>{n&&(this.didMainFrameLoadSuccessfully=!0)})),this.window.webContents.on("did-fail-load",((e,t,r,n,o)=>{o&&(this.didMainFrameLoadSuccessfully=!1)})),this.window.webContents.on("did-frame-finish-load",(async(e,t)=>{t&&(this.menuCallback.cleanUpActions(),this.onLoadFinished(this.didMainFrameLoadSuccessfully))})),this.window.setTitle((0,l.appState)().activation().editionName())}launchSession(e){this.workbenchInitialized=!1;const t=this.sessionLauncher?.launchNextSession(e);t&&((0,s.logger)().logError(t),(0,l.appState)().modalTracker.trackElectronModalSync((()=>o.dialog.showMessageBoxSync(this.window,{message:i.default.t("mainWindowTs.rSessionFailedToStart"),type:"error",title:(0,l.appState)().activation().editionName()}))),this.quit())}launchRStudio(e){this.appLauncher?.launchRStudio(e)}onWorkbenchInitialized(){this.quitConfirmed=!1,this.geometrySaved=!1,this.workbenchInitialized=!0,this.executeJavaScript("window.desktopHooks.getActiveProjectName()").then((e=>{e.length>0?(this.window.setTitle(`${e} - ${(0,l.appState)().activation().editionName()}`),(0,a.setDockLabel)(e)):(this.window.setTitle((0,l.appState)().activation().editionName()),(0,a.setDockLabel)("")),this.avoidMoveCursorIfNecessary()})).catch((e=>{(0,s.logger)().logError(e)}))}async loadUrl(e,t=!0){const r={urls:[`${e}/*`]};o.session.defaultSession.webRequest.onBeforeSendHeaders(r,((e,t)=>{e.requestHeaders["X-Shared-Secret"]=process.env.RS_SHARED_SECRET??"",t({requestHeaders:e.requestHeaders})})),t&&((0,s.logger)().logDebug(`Setting base URL: ${e}`),this.options.baseUrl=e),this.window.loadURL(e).catch((t=>{(0,s.logger)().logErrorMessage(`Failed to load ${e}: ${t}`)}))}quit(){f.RCommandEvaluator.setMainWindow(null),this.quitConfirmed=!0,this.window.close()}invokeCommand(e){let t="";t="darwin"===process.platform?`\n var wnd;\n try {\n wnd = window.$RStudio.last_focused_window;\n } catch (e) {\n wnd = window;\n }\n (wnd || window).desktopHooks.invokeCommand('${e}');`:`window.desktopHooks.invokeCommand("${e}")`,this.executeJavaScript(t).catch((e=>{(0,s.logger)().logError(e)}))}onSessionQuit(){y(this.window),this.quit()}setSessionProcess(e){this.sessionProcess=e}closeEvent(e){if(!this.geometrySaved){const e=this.window.getNormalBounds();(0,h.ElectronDesktopOptions)().saveWindowBounds({...e,maximized:this.window.isMaximized()}),this.geometrySaved=!0}if(this.quitConfirmed||!this.sessionProcess||null!==this.sessionProcess.exitCode)return void y(this.window);const t=()=>{y(this.window),this.quit()};e.preventDefault(),this.executeJavaScript("!!window.desktopHooks").then((e=>{e?this.executeJavaScript("window.desktopHooks.quitR()").then((()=>this.quitConfirmed=!0)).catch((0,s.logger)().logError):((0,s.logger)().logErrorMessage("Main window closed unexpectedly"),t())})).catch((0,s.logger)().logError)}collectPendingQuitRequest(){return(0,l.appState)().gwtCallback?.collectPendingQuitRequest()??u.PendingQuit.PendingQuitNone}onActivated(){}reload(){this.isErrorDisplayed||(v++,this.loadUrl(this.options.baseUrl??"").catch((0,s.logger)().logError))}onLoadFinished(e){e||this.isErrorDisplayed||(0===v?(this.loadUrl(`file://${require("path").resolve(__dirname,"..","renderer","loading_window","index.html")}`,!1).catch((0,s.logger)().logError),(0,g.waitForUrlWithTimeout)(this.options.baseUrl??"",200,200,10).then((e=>{e&&(0,s.logger)().logError(e)})).catch((e=>{(0,s.logger)().logError(e)})).finally((()=>{this.reload()}))):(v=0,this.onLoadFailed()))}onLoadFailed(){if(this.isErrorDisplayed)return;const e=new Map;e.set("retry_url",this.options.baseUrl??""),(0,l.appState)().gwtCallback?.setErrorPageInfo(e),this.loadUrl(`file://${require("path").resolve(__dirname,"..","renderer","connect_window","index.html")}`).catch((0,s.logger)().logError)}setErrorDisplayed(){this.isErrorDisplayed=!0}}t.MainWindow=w,w.FIRST_WORKBENCH_INITIALIZED="main-window-first_workbench_initialized",w.URL_CHANGED="main-window-url_changed"},3585:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(2298),s=n(r(4748)),i=r(9433),a=r(4746),l=r(9281),c=r(155),u=r(9707),d=r(8125),p=r(9940),h=r(3201),f=r(133);r(7906)&&o.app.quit(),(0,f.initCrashHandler)(),(0,u.initI18n)(),(new class{async main(){try{await this.startup()}catch(e){const t=(0,i.safeError)(e);await o.app.whenReady(),await(0,h.createStandaloneErrorDialog)(s.default.t("mainTs.unhandledException"),t.message),console.error(t.message),"debug"===(0,a.logLevel)()&&console.error(t.stack),o.app.exit(1)}}async initializeRenderingEngine(){const e=(0,d.ElectronDesktopOptions)();e.useGpuDriverBugWorkarounds()||o.app.commandLine.appendSwitch("disable-gpu-driver-bug-workarounds"),e.useGpuExclusionList()||o.app.commandLine.appendSwitch("ignore-gpu-blacklist");const t=(0,d.ElectronDesktopOptions)().renderingEngine().toLowerCase();0!==t.length&&"desktop"!==t&&"auto"!=t&&("gles"!==t?"software"!==t||o.app.commandLine.appendSwitch("disable-gpu"):o.app.commandLine.appendSwitch("use-gl","gles"))}async initializeAccessibility(){(0,d.ElectronDesktopOptions)().disableRendererAccessibility()&&o.app.commandLine.appendSwitch("disable-renderer-accessibility")}async startup(){await this.initializeRenderingEngine(),await this.initializeAccessibility(),"linux"===process.platform&&(o.app.commandLine.hasSwitch("use-gl")||o.app.commandLine.appendSwitch("use-gl","desktop"));const e=new c.Application;e.argsManager.handleLogLevel(),(0,l.setApplication)(e),(0,p.parseStatus)(await e.beforeAppReady())&&(await o.app.whenReady(),(0,p.parseStatus)(await e.run()))}}).main()},2969:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MenuCallback=void 0;const o=r(2298),s=n(r(2361)),i=n(r(469)),a=r(8125),l=r(9281);function c(e){return e.replace("&","")}function u(e){o.Menu.setApplicationMenu(e),(0,l.getEventBus)().emit("appmenu-set")}class d extends s.default{constructor(){super(),this.mainMenu=new o.Menu,this.menuStack=[],this.menuItemTemplates=new Map,this.mainMenuTemplate=new Array,this.lastWasTools=!1,this.lastWasDiagnostics=!1,this.isMenuSet=!1,this.savedMenu=null,this.debounceUpdateMenuLong=(0,i.default)((()=>this.updateMenus()),5e3),this.debounceUpdateMenuMedium=(0,i.default)((()=>this.updateMenus()),250),this.debounceUpdateMenuShort=(0,i.default)((()=>this.updateMenus()),10),o.ipcMain.on("menu_begin_main",(()=>{this.beginMain()})),o.ipcMain.on("menu_begin",((e,t)=>{this.menuBegin(t)})),o.ipcMain.on("menu_add_command",((e,t,r,n,o,s,i,a)=>{this.addCommand(t,r,n,o,s,i,a)})),o.ipcMain.on("menu_add_separator",(()=>{this.addToCurrentMenu({type:"separator"})})),o.ipcMain.on("menu_end",(()=>{this.menuEnd()})),o.ipcMain.on("menu_end_main",(()=>{this.emit(d.MENUBAR_COMPLETED,this.mainMenu)})),o.ipcMain.on("menu_set_command_visible",((e,t,r)=>{this.setCommandVisibility(t,r)})),o.ipcMain.on("menu_set_command_enabled",((e,t,r)=>{this.setCommandEnabled(t,r)})),o.ipcMain.on("menu_set_command_checked",((e,t,r)=>{this.setCommandChecked(t,r)})),o.ipcMain.on("menu_set_main_menu_enabled",((e,t)=>{this.setMainMenuEnabled(t)})),o.ipcMain.on("menu_set_command_label",((e,t,r)=>{this.setCommandLabel(t,r)})),o.ipcMain.on("menu_set_command_shortcut",((e,t,r)=>{this.setCommandShortcut(t,r)})),o.ipcMain.on("menu_commit_command_shortcuts",(()=>{this.debounceUpdateMenuLong.cancel(),this.isMenuSet?this.debounceUpdateMenuMedium():this.updateMenus()}))}beginMain(){if(this.mainMenu=new o.Menu,this.mainMenuTemplate=new Array,"darwin"===process.platform){const e={role:"appMenu",visible:!0};this.addToCurrentMenu(e)}}menuBegin(e){const t=new Array,r={submenu:t,label:e,id:c(e),visible:!0};"&File"===e?r.role="fileMenu":"&Edit"===e?r.role="editMenu":"&View"===e?r.role="viewMenu":"&Help"===e?r.role="help":"&Tools"===e?this.lastWasTools=!0:"Dia&gnostics"===e&&(this.lastWasDiagnostics=!0),r.id&&this.menuItemTemplates.set(r.id,r),this.addToCurrentMenu(r),this.menuStack.push(t)}menuEnd(){if(this.lastWasDiagnostics){this.lastWasDiagnostics=!1;const e={role:"toggleDevTools",accelerator:""};this.addToCurrentMenu(e)}this.menuStack.pop(),this.lastWasTools&&(this.lastWasTools=!1,"darwin"===process.platform&&this.mainMenu.append(new o.MenuItem({role:"windowMenu"})))}setCommandShortcut(e,t){const r=this.menuItemTemplates.get(e);if(!r)return;const n=this.convertShortcut(t);r.accelerator=n,this.debounceUpdateMenuLong()}setCommandVisibility(e,t){const r=this.menuItemTemplates.get(e);r&&(this.isMenuSet&&r.visible!=t&&(r.visible=t,this.debounceUpdateMenuShort()),r.visible=t)}setCommandEnabled(e,t){const r=this.menuItemTemplates.get(e);r&&(this.isMenuSet&&r.enabled!=t&&(r.enabled=t,this.debounceUpdateMenuShort()),r.enabled=t)}setCommandChecked(e,t){const r=this.menuItemTemplates.get(e);r&&(this.isMenuSet&&r.checked!=t&&(r.checked=t,this.debounceUpdateMenuShort()),r.checked=t)}setCommandLabel(e,t){const r=this.menuItemTemplates.get(e);r&&(this.isMenuSet&&r.label!=t&&(r.label=t,this.debounceUpdateMenuShort()),r.label=t)}updateMenus(){const e=this.recursiveCopy(this.mainMenuTemplate);0===(0,l.appState)().modalTracker.numModalsShowing()&&(this.mainMenu=o.Menu.buildFromTemplate(e),u(this.mainMenu)),this.isMenuSet=!0}removeItemsWithEmptySubmenuList(e){return!Object.prototype.hasOwnProperty.call(e,"submenu")||!Array.isArray(e.submenu)||e.submenu.length>0&&(e.submenu=e.submenu.filter((e=>this.removeItemsWithEmptySubmenuList(e))),!0)}recursiveCopy(e){let t=new Array;for(const r of e){let e;r.id&&(e=this.menuItemTemplates.get(r.id)??{});const n={...r,...e};if("separator"===n.type){t.push(n);continue}if(n.id&&this.menuItemTemplates.set(n.id,n),!n.visible&&!n.role)continue;const{submenu:o}=r;o instanceof Array&&(n.submenu=this.recursiveCopy(o)),t.push(n)}return t=t.filter(((e,t,r)=>{if("separator"!==e.type)return this.removeItemsWithEmptySubmenuList(e);const n=r[t-1];return 0!==t&&"separator"!==n.type&&t!=r.length-1})),"darwin"===process.platform&&(t=t.reduce(((e,t)=>{if("Help"===t.id){const t={id:"Window",visible:!0,role:"windowMenu",label:"Window"};e.push(t)}return e.push(t),e}),[])),t}addCommand(e,t,r,n,s,i,l){const c={label:t,id:e,click:(e,t,r)=>{this.emit(d.COMMAND_INVOKED,e.id)}};i?(c.type=(0,a.ElectronDesktopOptions)().accessibility()?"radio":"checkbox",c.checked=!1):s&&(c.type="checkbox",c.checked=!1),n.length>0&&(c.accelerator=this.convertShortcut(n)),c.visible=l,"zoomActualSize"===e?c.accelerator="CommandOrControl+0":"zoomIn"===e?c.accelerator="CommandOrControl+=":"zoomOut"===e?c.accelerator="CommandOrControl+-":"cutDummy"===e?c.role="cut":"copyDummy"===e?c.role="copy":"pasteDummy"===e?c.role="paste":"pasteWithIndentDummy"===e?c.role="pasteAndMatchStyle":"selectAllDummy"==e?c.role="selectAll":"undoDummy"===e?c.accelerator="CommandOrControl+Z":"redoDummy"===e&&(c.accelerator="CommandOrControl+Shift+Z");const u=new o.MenuItem(c);this.menuItemTemplates.set(u.id,c),this.addToCurrentMenu(c)}addToCurrentMenu(e){let t;this.menuStack.length>0?t=this.menuStack[this.menuStack.length-1]:(t=new Array,this.mainMenuTemplate.push(e)),t.push(e)}getMenuItemById(e){return this.menuItemTemplates.get(e)}cleanUpActions(){}convertShortcut(e){return e?e.split("+").map((e=>"Cmd"===e?"CommandOrControl":"Meta"===e?"Command":e)).join("+"):""}setMainMenuEnabled(e){if(e||this.savedMenu){if(e&&0===(0,l.appState)().modalTracker.numModalsShowing()&&this.savedMenu)return u(this.savedMenu),this.mainMenu=this.savedMenu,void(this.savedMenu=null)}else if(this.savedMenu=o.Menu.getApplicationMenu(),this.savedMenu){const e=o.Menu.buildFromTemplate(this.recursiveCopy(this.mainMenuTemplate));e.items.forEach((e=>{e.submenu?.items.forEach((e=>{e.enabled=["cut","copy","paste","redo","hide","hideOthers","unhide","selectAll"].includes(e.role??"")}))})),u(e),this.mainMenu=e}}showPlaceholderMenu(){const e=function(e,t){e.append(new o.MenuItem({submenu:new o.Menu,label:t}))},t=new o.Menu;"darwin"===process.platform&&t.append(new o.MenuItem({role:"appMenu"})),e(t,"File"),e(t,"Edit"),e(t,"Code"),e(t,"View"),e(t,"Plots"),e(t,"Session"),e(t,"Build"),e(t,"Debug"),e(t,"Profile"),e(t,"Tools"),"darwin"===process.platform&&e(t,"Window"),e(t,"Help"),u(t)}}t.MenuCallback=d,d.MENUBAR_COMPLETED="menu-callback-menubar_completed",d.MANAGE_COMMAND="menu-callback-manage_command",d.COMMAND_INVOKED="menu-callback-command_invoked",d.ZOOM_ACTUAL_SIZE="menu-callback-zoom_actual_size",d.ZOOM_IN="menu-callback-zoom_in",d.ZOOM_OUT="menu-callback-zoom_out"},6128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openMinimalWindow=void 0;const n=r(9281),o=r(7060);class s extends o.DesktopBrowserWindow{constructor(e){super({adjustTitle:e.adjustTitle,autohideMenu:!0,name:e.name,baseUrl:e.baseUrl,parent:e.parent,opener:e.opener,allowExternalNavigate:e.allowExternalNavigate}),this.ensureNoMenu(),this.window.webContents.on("before-input-event",((e,t)=>{("darwin"===process.platform?t.meta:t.control)&&"w"===t.key.toLowerCase()&&(e.preventDefault(),this.window.close())})),this.parentWindowDestroyed=this.parentWindowDestroyed.bind(this),this.options.parent?.on(o.DesktopBrowserWindow.WINDOW_DESTROYED,this.parentWindowDestroyed),this.window.on("close",(()=>{this.options.parent?.removeListener(o.DesktopBrowserWindow.WINDOW_DESTROYED,this.parentWindowDestroyed)}))}parentWindowDestroyed(){this.window.close()}}t.openMinimalWindow=function(e,t,r,o,i){const a=!!t&&"_blank"!==t;let l;if(a&&(l=(0,n.appState)().windowTracker.getWindow(t)),!l){const r="_rstudio_viewer_zoom"===t;l=new s({adjustTitle:!r,name:t,baseUrl:"",parent:e}),a&&(0,n.appState)().windowTracker.addWindow(t,l),r&&l.window.setTitle("Viewer Zoom")}return l.window.loadURL(r),l.window.setSize(o,i),l}},4944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalDialogTracker=void 0;const n=r(9281);t.ModalDialogTracker=class{constructor(){this.modals=[],this.electronModalsShowing=0,this.gwtModalsShowing=0}numModalsShowing(){return this.modals.length+this.gwtModalsShowing+this.electronModalsShowing}maybeReenableMainMenu(){0===this.numModalsShowing()&&(0,n.appState)().gwtCallback?.mainWindow.menuCallback.setMainMenuEnabled(!0)}async addModalDialog(e){this.modals.push(e),(0,n.appState)().gwtCallback?.mainWindow.menuCallback.setMainMenuEnabled(!1)}async removeModalDialog(e){this.modals=this.modals.filter((t=>t!==e)),this.maybeReenableMainMenu()}setNumGwtModalsShowing(e){this.gwtModalsShowing=e}async trackElectronModalAsync(e){return this.addElectronModal(),e().finally((()=>this.removeElectronModal()))}trackElectronModalSync(e){this.addElectronModal();const t=e();return this.removeElectronModal(),t}addElectronModal(){this.electronModalsShowing++,(0,n.appState)().gwtCallback?.mainWindow.menuCallback.setMainMenuEnabled(!1)}removeElectronModal(){this.electronModalsShowing>0&&this.electronModalsShowing--,this.maybeReenableMainMenu()}}},9346:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},8125:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixWindowsRExecutablePath=t.DesktopOptionsImpl=t.clearOptionsSingleton=t.ElectronDesktopOptions=t.defaultFonts=void 0;const o=n(r(8252)),s=r(7147),i=r(1017),a=r(2173),l=r(8185),c=r(4746),u=r(7723),d=r(2770),p=r(2996),h="font.proportionalFont",f="font.fixedWidthFont",g="view.zoomLevel",m="view.windowBounds",y="view.accessibility",v="view.disableRendererAccessibility",w="session.lastRemoteSessionUrl",_="session.authCookies",b="session.tempAuthCookies",S="general.ignoredUpdateVersions",E="renderer.engine",R="renderer.useGpuExclusionList",k="renderer.useGpuDriverBugWorkarounds",O="platform.windows.rExecutablePath",x="platform.windows.preferR64",P="platform.macos.checkForRosetta",$=(0,u.generateSchema)(a.properties);t.defaultFonts=["monospace"];let T=null;t.ElectronDesktopOptions=function(e="",t){return T||(T=new I(e,t)),T},t.clearOptionsSingleton=function(){T=null};class I{constructor(e="",t){this.config=new o.default({schema:$}),this.legacyOptions=u.legacyPreferenceManager,0!=e.length&&(this.config=new o.default({cwd:e,schema:$})),t&&(this.legacyOptions=t)}setProportionalFont(e){this.config.set(h,e??"")}proportionalFont(){return this.config.get(h,"")}setFixedWidthFont(e){this.config.set(f,e)}fixedWidthFont(){let e=this.config.get(f);return e||(e=this.legacyOptions.fixedWidthFont()??"",this.config.set(f,e)),e}setZoomLevel(e){const t=a.properties.view.properties.zoomLevel.minimum,r=a.properties.view.properties.zoomLevel.maximum;if(e<t||e>r)throw new Error(`Invalid zoom level: Must be between ${t} and ${r}`);this.config.set(g,e)}zoomLevel(){let e=this.config.get(g);return e||(e=this.legacyOptions.zoomLevel()??a.properties.view.default.zoomLevel,this.config.set(g,e)),e}saveWindowBounds(e){this.config.set(m,e)}windowBounds(){return this.config.get(m,a.properties.view.default.windowBounds)}restoreMainWindowBounds(e){try{this.restoreMainWindowBoundsImpl(e)}catch(e){(0,c.logger)().logErrorAtLevel("debug",e)}}restoreMainWindowBoundsImpl(e){const t=this.windowBounds();(0,p.positionAndEnsureVisible)(e,t,a.properties.view.default.windowBounds.width,a.properties.view.default.windowBounds.height),t.maximized&&e.maximize()}setAccessibility(e){this.config.set(y,e)}accessibility(){return this.config.get(y,a.properties.view.default.accessibility)}setDisableRendererAccessibility(e){this.config.set(v,e)}disableRendererAccessibility(){return this.config.get(v,a.properties.view.default.disableRendererAccessibility)}setLastRemoteSessionUrl(e){this.config.set(w,e)}lastRemoteSessionUrl(){return this.config.get(w,a.properties.remote_session.default.lastRemoteSessionUrl)}setAuthCookies(e){this.config.set(_,e)}authCookies(){return this.config.get(_,a.properties.remote_session.default.authCookies)}setTempAuthCookies(e){this.config.set(b,e)}tempAuthCookies(){return this.config.get(b,a.properties.remote_session.default.tempAuthCookies)}setIgnoredUpdateVersions(e){this.config.set(S,e)}ignoredUpdateVersions(){return this.config.get(S,a.properties.general.default.ignoredUpdateVersions)}setRenderingEngine(e){this.config.set(E,e)}renderingEngine(){return this.config.get(E,"desktop")}setUseGpuExclusionList(e){this.config.set(R,e)}useGpuExclusionList(){return this.config.get(R,a.properties.renderer.default.useGpuExclusionList)}setUseGpuDriverBugWorkarounds(e){this.config.set(k,e)}useGpuDriverBugWorkarounds(){return this.config.get(k,a.properties.renderer.default.useGpuDriverBugWorkarounds)}setCheckForRosetta(e){"darwin"===process.platform&&"arm64"===process.arch&&this.config.set(P,e)}checkForRosetta(){if("darwin"!==process.platform||"arm64"!==process.arch)return!1;const e=this.config.get(P,a.properties.platform.default.macos.checkForRosetta);return(0,c.logger)().logDebug(`Desktop option 'checkForRosetta' is: ${e}`),e}rBinDir(){if("win32"!==process.platform)return"";const e=this.rExecutablePath();let t="";return t=e&&""!==e?(0,i.dirname)(e):this.legacyOptions.rBinDir()??a.properties.platform.default.windows.rBinDir,t}setRExecutablePath(e){"win32"===process.platform&&this.config.set(O,(0,l.normalizeSeparatorsNative)(e))}rExecutablePath(){if("win32"!==process.platform)return"";const e=this.config.get(O,a.properties.platform.default.windows.rExecutablePath);if(!e)return"";const t=D(e);return t!==e&&this.setRExecutablePath(t),t}setPeferR64(e){"win32"===process.platform&&this.config.set(x,e)}peferR64(){return!("win32"!==process.platform||!process.arch.includes("64"))&&this.config.get(x,a.properties.platform.default.windows.preferR64)}}function D(e){if("win32"!==process.platform||!(0,s.existsSync)(e)||(0,s.lstatSync)(e).isDirectory())return e;const t=e;if("bin"===(0,i.basename)((0,i.dirname)(e)).toLowerCase()){const r="x64"===process.arch?"x64":"i386";e=(0,i.join)((0,i.dirname)(e),r,d.kWindowsRExe),(0,c.logger)().logDebug(`User selected ${t}, replacing with ${e}`)}else(0,i.basename)(e).toLowerCase()!==d.kWindowsRExe.toLowerCase()&&(e=(0,i.join)((0,i.dirname)(e),d.kWindowsRExe),(0,c.logger)().logDebug(`User selected ${t}, replacing with ${e}`));return e}t.DesktopOptionsImpl=I,"darwin"===process.platform?t.defaultFonts=["Menlo","Monaco"]:"win32"===process.platform?t.defaultFonts=["Lucida Console","Consolas"]:t.defaultFonts=["Ubuntu Mono","Droid Sans Mono","DejaVu Sans Mono","Monospace"],t.fixWindowsRExecutablePath=D},376:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3396)),s=r(8185),i=r(1859),a=n(r(9346)),l=r(7723),c=r(9433);class u extends a.default{constructor(){super();const e=i.Xdg.userConfigDir().completePath("desktop.ini").getAbsolutePath().replace("rstudio","RStudio");if(s.FilePath.existsSync(e))try{this.properties=(0,o.default)(e)}catch(e){console.error(`Unable to migrate legacy desktop preferences: ${(0,c.safeError)(e).message}`)}}fixedWidthFont(){return this.properties?.get(l.preferenceKeys.fontFixedWidth)?.toString()}zoomLevel(){const e=this.properties?.get(l.preferenceKeys.zoomLevel)?.toString();return e?parseFloat(e):void 0}rBinDir(){return"win32"!==process.platform?"":this.properties?.get(l.preferenceKeys.rBinDir)?.toString()}}t.default=u},6137:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(2298),s=r(7723),i=n(r(9346));class a extends i.default{constructor(){super()}fixedWidthFont(){return o.systemPreferences.getUserDefault(s.preferenceKeys.fontFixedWidth,"string")}zoomLevel(){return o.systemPreferences.getUserDefault(s.preferenceKeys.zoomLevel,"double")}rBinDir(){return""}}t.default=a},7723:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.legacyPreferenceManager=t.generateSchema=t.preferenceKeys=void 0;const o=n(r(376)),s=n(r(6137)),i="darwin"===process.platform;switch(t.preferenceKeys={fontFixedWidth:i?"font·fixedWidth":"General.font.fixedWidth",zoomLevel:i?"view·zoomLevel":"General.view.zoomLevel",rBinDir:"General.RBinDir"},t.generateSchema=function(e){return JSON.parse(JSON.stringify(e))},process.platform){case"darwin":t.legacyPreferenceManager=new s.default;break;case"win32":case"linux":t.legacyPreferenceManager=new o.default;break;default:throw new Error("unsupported platform")}},9940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseStatus=t.exitFailure=t.exitSuccess=t.run=t.EXIT_FAILURE=t.EXIT_SUCCESS=void 0;const n=r(2298);t.EXIT_SUCCESS=0,t.EXIT_FAILURE=1,t.run=function(){return{exit:!1,exitCode:t.EXIT_SUCCESS}},t.exitSuccess=function(){return{exit:!0,exitCode:t.EXIT_SUCCESS}},t.exitFailure=function(){return{exit:!0,exitCode:t.EXIT_FAILURE}},t.parseStatus=function(e){return!e.exit||(n.app.exit(e.exitCode),!1)}},7193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RCommandEvaluator=void 0;const n=r(4746),o=r(5863);class s{static setMainWindow(e){s.window=e}static evaluate(e){null!==s.window&&(e=(0,o.jsLiteralEscape)(e),this.window?.executeJavaScript(`window.desktopHooks.evaluateRCmd("${e}")`).catch((e=>{(0,n.logger)().logError(e)})))}}t.RCommandEvaluator=s},6544:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SatelliteWindow=void 0;const n=r(4746),o=r(6377),s=r(9281),i=r(7060);class a extends o.GwtWindow{constructor(e,t,r,n){super({adjustTitle:!0,autohideMenu:!0,name:t,opener:r,allowExternalNavigate:!1,addApiKeys:["desktop"],existingWindow:n}),this.closeStage="CloseStageOpen",this.ensureNoMenu(),(0,s.appState)().gwtCallback?.registerOwner(this),this.on(i.DesktopBrowserWindow.CLOSE_WINDOW_SHORTCUT,this.onCloseWindowShortcut.bind(this))}onActivated(){this.executeJavaScript("if (window.notifyRStudioSatelliteReactivated) window.notifyRStudioSatelliteReactivated(null);").catch((0,n.logger)().logError)}closeSatellite(e){this.executeJavaScript("if (window.notifyRStudioSatelliteClosing) window.notifyRStudioSatelliteClosing();").catch((0,n.logger)().logError)}closeEvent(e){this.options.name.startsWith("_rstudio_satellite_source_window_")&&"CloseStageOpen"===this.closeStage?(e.preventDefault(),this.closeStage="CloseStagePending",this.executeJavaScript("window.rstudioReadyToClose").then((e=>{e?(this.closeStage="CloseStageAccepted",this.window.close(),(0,s.appState)().gwtCallback?.unregisterOwner(this)):(this.closeStage="CloseStageOpen",this.executeJavaScript("window.rstudioCloseSourceWindow()").then((()=>(0,s.appState)().gwtCallback?.unregisterOwner(this))).catch((0,n.logger)().logError))})).catch((0,n.logger)().logError)):(this.closeSatellite(e),(0,s.appState)().gwtCallback?.unregisterOwner(this))}static windowOpening(){return{action:"allow",overrideBrowserWindowOptions:{autoHideMenuBar:!0,webPreferences:{additionalArguments:["--api-keys=desktopInfo|desktop"],preload:i.DesktopBrowserWindow.getPreload()}}}}}t.SatelliteWindow=a},8485:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecondaryWindow=void 0;const n=r(7060);class o extends n.DesktopBrowserWindow{constructor(e,t,r,o,s,i=!1,a){super({showToolbar:e,adjustTitle:!0,autohideMenu:!0,name:t,baseUrl:r,parent:o,opener:s,allowExternalNavigate:i,existingWindow:a}),this.ensureNoMenu(),this.on(n.DesktopBrowserWindow.CLOSE_WINDOW_SHORTCUT,this.onCloseWindowShortcut.bind(this))}onCloseWindowShortcut(){this.window.close()}static windowOpening(e,t){return{action:"allow",overrideBrowserWindowOptions:{autoHideMenuBar:!0,width:e,height:t,webPreferences:{additionalArguments:["--api-keys=desktopInfo"],preload:n.DesktopBrowserWindow.getPreload()}}}}}t.SecondaryWindow=o},5773:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SessionLauncher=void 0;const o=r(2081),s=r(2298),i=n(r(7147)),a=r(3211),l=r(9433),c=r(8185),u=r(6617),d=r(4746),p=r(6723),h=r(5553),f=n(r(4748)),g=r(1413),m=r(4716),y=r(9281),v=r(1797),w=r(9525),_=n(r(2773)),b=r(7507),S=r(8125),E=r(9940),R=r(6445),k=r(3201);let O=null;function x(){return(0,k.userLogPath)().completePath("rsession_abort_msg.log")}class P{constructor(e,t,r,n){this.sessionPath=e,this.confPath=t,this.filename=r,this.appLaunch=n,this.host="127.0.0.1",this.sessionStdout=[],this.sessionStderr=[],this.showSplash=!0;const o=process.env.RS_SPLASH_DELAY?parseInt(process.env.RS_SPLASH_DELAY):500;process.env.RS_NO_SPLASH&&(this.showSplash=!1),(0,y.appState)().runDiagnostics&&(this.showSplash=!1),o>0&&this.showSplash&&(0,g.setTimeoutPromise)(o).then((()=>{this.showSplash&&(this.splash=new s.BrowserWindow({width:250,height:250,frame:!1,transparent:!0,center:!0,resizable:!1,show:!1}),this.splash.loadURL(`file://${require("path").resolve(__dirname,"..","renderer","splash","index.html")}`).catch((e=>(0,d.logger)().logError(e))),this.splash.show())})).catch((e=>(0,d.logger)().logError(e)))}launchFirstSession(e,t){(0,y.appState)().activation().on(m.DesktopActivation.LAUNCH_FIRST_SESSION,this.onLaunchFirstSession.bind(this)),(0,y.appState)().activation().on(m.DesktopActivation.LAUNCH_ERROR,this.onLaunchError.bind(this)),(0,y.appState)().activation().getInitialLicense(e,t)}launchFirst(){const e=this.buildLaunchContext();e.argList.push("--show-help-home","1"),(0,d.logger)().logDiagnostic("\nAttempting to launch R session..."),(0,d.logger)().logDiagnosticEnvVar("RSTUDIO_WHICH_R"),(0,d.logger)().logDiagnosticEnvVar("R_HOME"),(0,d.logger)().logDiagnosticEnvVar("R_DOC_DIR"),(0,d.logger)().logDiagnosticEnvVar("R_INCLUDE_DIR"),(0,d.logger)().logDiagnosticEnvVar("R_SHARE_DIR"),(0,d.logger)().logDiagnosticEnvVar("R_LIBS"),(0,d.logger)().logDiagnosticEnvVar("R_LIBS_USER"),(0,d.logger)().logDiagnosticEnvVar("DYLD_LIBRARY_PATH"),(0,d.logger)().logDiagnosticEnvVar("DYLD_FALLBACK_LIBRARY_PATH"),(0,d.logger)().logDiagnosticEnvVar("LD_LIBRARY_PATH"),(0,d.logger)().logDiagnosticEnvVar("PATH"),(0,d.logger)().logDiagnosticEnvVar("HOME"),(0,d.logger)().logDiagnosticEnvVar("R_USER"),(0,d.logger)().logDiagnosticEnvVar("RSTUDIO_CPP_BUILD_OUTPUT");try{this.sessionProcess=this.launchSession(e.argList)}catch(e){return(0,l.safeError)(e)}return(0,d.logger)().logDiagnostic(`\nR session launched, attempting to connect on port ${e.port}...`),this.mainWindow=new b.MainWindow(e.url),this.mainWindow.sessionLauncher=this,this.mainWindow.setSessionProcess(this.sessionProcess),this.mainWindow.appLauncher=this.appLaunch,this.appLaunch.setActivationWindow(this.mainWindow),(0,S.ElectronDesktopOptions)().restoreMainWindowBounds(this.mainWindow.window),(0,d.logger)().logDiagnostic("\nConnected to R session, attempting to initialize...\n"),"win32"===process.platform&&(0,y.appState)().runDiagnostics&&((0,d.logger)().closeLogFile(),(0,d.logger)().ensureTransport()),(0,y.appState)().runDiagnostics||((0,k.finalPlatformInitialize)(this.mainWindow),this.mainWindow.window.once("ready-to-show",(async()=>{(0,y.appState)().startupDelayMs>0&&await(0,g.setTimeoutPromise)((0,y.appState)().startupDelayMs),this.showSplash=!1,this.mainWindow?.window.show(),this.splash?.close()})),(0,y.appState)().activation().setMainWindow(this.mainWindow.window),this.appLaunch.activateWindow(),this.mainWindow.loadUrl(e.url).catch((t=>{(0,d.logger)().logErrorMessage(`Failed to load ${e.url}: ${t}`)}))),(0,l.success)()}closeAllSatellites(){this.mainWindow&&(0,b.closeAllSatellites)(this.mainWindow.window)}async getRecentSessionLogs(){const e=new Array,t=(0,k.userLogPath)().getChildren(e);if(t)throw t;e.sort(((e,t)=>t.getLastWriteTimeSync()-e.getLastWriteTimeSync()));let r="";for(const t of e)if(t.getFilename().includes("rsession")){r=t.getAbsolutePath();const[e,n]=await(0,u.readStringArrayFromFile)(t);if(n)throw n;let o="";for(let t=Math.max(e.length-3,0);t<e.length;t++)o+=e[t]+"\n";return[r,o]}return["Log File","[No logs available]"]}async showLaunchErrorPage(){const e=new Map,t=(0,v.buildInfo)(),r=t.RSTUDIO_GIT_COMMIT.substr(0,8),n=`RStudio ${t.RSTUDIO_VERSION} "${t.RSTUDIO_RELEASE_NAME} " (${r}, ${t.RSTUDIO_BUILD_DATE}) for ${t.RSTUDIO_PACKAGE_OS}`;e.set("version",n),x().existsSync()?e.set("launch_failed",this.launchFailedErrorMessage()):e.set("launch_failed","[No error available]");let o=E.EXIT_FAILURE;this.sessionProcess&&this.sessionProcess.exitCode&&(o=this.sessionProcess.exitCode),e.set("exit_code",o.toString());let s=this.sessionStdout.join();s||(s="[No output emitted]"),e.set("process_output",s);let i=this.sessionStderr.join();i||(i="[No errors emitted]"),e.set("process_error",i);let[a,l]=["",""];try{[a,l]=await this.getRecentSessionLogs()}catch(e){(0,d.logger)().logError(e)}e.set("log_file",a),e.set("log_content",l),(0,y.appState)().gwtCallback?.setErrorPageInfo(e),this.mainWindow?.loadUrl(`file://${require("path").resolve(__dirname,"..","renderer","error_window","index.html")}`).then((()=>{this.mainWindow&&this.mainWindow.setErrorDisplayed()})).catch((e=>{(0,d.logger)().logErrorMessage(`Failed to load file://${require("path").resolve(__dirname,"..","renderer","error_window","index.html")}: ${e}`)}))}onRSessionExited(){if((0,y.appState)().runDiagnostics)return void this.mainWindow?.quit();const e=this.mainWindow?.collectPendingQuitRequest();if(e===w.PendingQuit.PendingQuitNone)this.closeAllSatellites(),this.mainWindow?.window.webContents.executeJavaScript("window.desktopHooks.notifyRCrashed()").catch((()=>{})),this.mainWindow?.workbenchInitialized||this.showLaunchErrorPage();else if(e===w.PendingQuit.PendingQuitAndExit)this.mainWindow?.quit();else{const t=e===w.PendingQuit.PendingQuitRestartAndReload;t&&this.closeAllSatellites();const r=this.launchNextSession(t);r&&((0,d.logger)().logError(r),this.mainWindow?.quit())}}launchNextSession(e){(0,a.unsetenv)(p.kRStudioInitialProject),this.mainWindow?.setSessionProcess(void 0),this.sessionProcess=void 0;const t=this.buildLaunchContext(!e);try{this.sessionProcess=this.launchSession(t.argList)}catch(e){return(0,l.safeError)(e)}return this.mainWindow?.setSessionProcess(this.sessionProcess),e&&(0,R.waitForUrlWithTimeout)(t.url,50,25,10).then((e=>{e&&(0,d.logger)().logError(e)})).catch((e=>{(0,d.logger)().logError(e)})).finally((()=>{this.nextSessionUrl=t.url,setImmediate(this.onReloadFrameForNextSession.bind(this))})),(0,l.success)()}onReloadFrameForNextSession(){this.nextSessionUrl&&(this.mainWindow?.loadUrl(this.nextSessionUrl).catch((e=>{(0,d.logger)().logErrorMessage(`Failed to load ${this.nextSessionUrl}: ${e}`)})),this.nextSessionUrl=void 0)}onLaunchFirstSession(){const e=this.launchFirst();e&&((0,d.logger)().logError(e),(0,y.appState)().activation().emitLaunchError(this.launchFailedErrorMessage()))}launchSession(e){const t=x().removeIfExistsSync();if(t&&(0,d.logger)().logError(t),this.sessionStdout=[],this.sessionStderr=[],(0,y.appState)().sessionStartDelaySeconds>0&&(0,a.setenv)("RSTUDIO_SESSION_SLEEP_ON_STARTUP",(0,y.appState)().sessionStartDelaySeconds.toString()),0!==(0,y.appState)().sessionEarlyExitCode&&(0,a.setenv)("RSTUDIO_SESSION_EXIT_ON_STARTUP",(0,y.appState)().sessionEarlyExitCode.toString()),"win32"===process.platform){if("ucrt"===(0,a.getenv)("R_RUNTIME")){const e=this.sessionPath.getParent().completeChildPath("rsession-utf8.exe");e.existsSync()&&(this.sessionPath=e,(0,d.logger)().logDebug(`R is UCRT; using ${this.sessionPath}`))}if("i386"===(0,a.getenv)("R_ARCH")){const e=this.sessionPath.getParent().completeChildPath("x86/rsession.exe");e.existsSync()?(this.sessionPath=e,(0,d.logger)().logDebug(`R is 32-bit; using ${this.sessionPath}`)):(0,d.logger)().logWarning("R is 32-bit, but no 32-bit rsession.exe was found")}}if(s.app.isPackaged&&"darwin"===process.platform&&"arm64"===process.arch){const e=`${(0,a.getenv)("R_HOME")}/lib/libR.dylib`;(0,d.logger)().logDebug(`$ /usr/bin/file "${e}"`);const t=(0,o.execSync)(`/usr/bin/file "${e}"`,{encoding:"utf-8"});(0,d.logger)().logDebug(t),-1!==t.indexOf("arm64")?(this.sessionPath=this.sessionPath.getParent().completeChildPath("rsession-arm64"),(0,d.logger)().logDebug(`R is arm64; using ${this.sessionPath}`)):(0,d.logger)().logDebug(`R is x86_64; using ${this.sessionPath}`)}const r=function(e,t){const r=Object.assign({},process.env);if("darwin"===process.platform){const n=(O||(O=(0,k.getCurrentlyUniqueFolderName)("rstudio-fallback-library-path-").getAbsolutePath()),O);r.RSTUDIO_FALLBACK_LIBRARY_PATH=n;const s=`${(0,a.getenv)("DYLD_FALLBACK_LIBRARY_PATH")}:${n}`,i=new c.FilePath((0,a.getenv)("R_HOME")).completePath("lib/libR.dylib"),l=["-e",`DYLD_INSERT_LIBRARIES=${i.getAbsolutePath()}`,"-e",`DYLD_FALLBACK_LIBRARY_PATH=${s}`],u=e.getAbsolutePath();if("arm64"===process.arch){const r=(0,o.execSync)(`/usr/bin/file "${i}"`,{encoding:"utf-8"});-1===r.indexOf("arm64")&&-1!==r.indexOf("x86_64")?(t=["-x86_64",...l,u,...t],e=new c.FilePath("/usr/bin/arch")):(t=["-arm64",...l,u,...t],e=new c.FilePath("/usr/bin/arch"))}else t=["-x86_64",...l,u,...t],e=new c.FilePath("/usr/bin/arch")}const n=new _.default("rsession");return r.RS_LOG_LEVEL=r.RS_LOG_LEVEL??n.getLogLevel().toUpperCase(),(0,d.logger)().logDebug(`Launching rsession: ${e.getAbsolutePath()} ${t.join(" ")}`),(0,d.logger)().logDebug(`R_HOME: ${(0,a.getenv)("R_HOME")}`),(0,d.logger)().logDebug(`RS_INITIAL_PROJECT: ${(0,a.getenv)("RS_INITIAL_PROJECT")}`),(0,d.logger)().logDebug(`RS_LOG_LEVEL: ${(0,a.getenv)("RS_LOG_LEVEL")}`),(0,y.appState)().runDiagnostics?(0,o.spawn)(e.getAbsolutePath(),t,{stdio:"inherit",env:r}):(0,o.spawn)(e.getAbsolutePath(),t,{env:r})}(this.sessionPath,e);return r.on("error",(e=>{(0,d.logger)().logError(e),this.onRSessionExited()})),r.on("exit",((t,r)=>{null!==t?((0,d.logger)().logDebug(`rsession exited: code=${t}`),0!==t&&(0,d.logger)().logDebug(`${this.sessionPath} ${e}`)):(0,d.logger)().logDebug(`rsession terminated: signal=${r}`),this.onRSessionExited()})),r.stdout?.on("data",(e=>{this.sessionStdout.push(e)})),r.stderr?.on("data",(e=>{this.sessionStderr.push(e)})),r}onLaunchError(e){const t=()=>{this.mainWindow?this.mainWindow.window.close():s.app.exit(E.EXIT_FAILURE)};e?(0,k.createStandaloneErrorDialog)((0,y.appState)().activation().editionName(),e).then((()=>t())).catch((e=>console.error("[session-launcher.ts] [onLaunchError] Error when creating Standalone Error Dialog: ",e))):t()}collectAbendLogMessage(){let e="";const t=x();if(t.existsSync())try{e=i.default.readFileSync(t.getAbsolutePath(),"utf8")}catch(e){(0,d.logger)().logError(e)}finally{t.removeIfExistsSync()}return e}launchFailedErrorMessage(){let e=f.default.t("sessionLauncherTs.rSessionFatalError");const t=this.collectAbendLogMessage();t.includes("arguments passed to .Internal")&&(e=e+"\n\n"+f.default.t("sessionLauncherTs.errorWasCausedByRAttemptingToLoadPackagesFromADifferentIncompatibleRVersion")),t&&(e+="\n\n"+t);const r=this.sessionStderr.join();return r&&(e+="\n\n"+r),e}buildLaunchContext(e=!0){const t=[];e||(0,y.appState)().generateNewPort(),this.confPath.isEmpty()?t.push("--config-file","none"):t.push("--config-file",this.confPath.getAbsolutePath());const r=(0,y.appState)().port.toString();return t.push("--program-mode","desktop"),t.push("--www-port",r),t.push("--launcher-token",P.launcherToken),(0,a.setenv)("RSTUDIO_DESKTOP_EXE",s.app.getPath("exe")),"win32"===process.platform&&(0,a.setenv)("RS_LOCAL_PEER",(0,h.localPeer)((0,y.appState)().port)),(0,y.appState)().runDiagnostics&&t.push("--verify-installation","1"),{host:this.host,port:(0,y.appState)().port,url:`http://${this.host}:${r}`,argList:t}}}t.SessionLauncher=P,P.launcherToken=(0,h.generateShortenedUuid)()},1513:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarManager=void 0;const i=s(r(7147)),a=r(4746);t.ToolbarManager=class{constructor(){}async createAndShowToolbar(e,t){const r=this.createToolbarData(t.buttons);try{await e.webContents.executeJavaScript(r)}catch(e){if("An object could not be cloned."!==e.message){const n="Error message: "+e.message+"\nError when trying to create toolbar with data:\n"+JSON.stringify(t)+"\n---------------------------\nJS Script for Toolbar:\n"+r;(0,a.logger)().logError(n)}}}createToolbarData(e){return this.addToolbarJsAsText()+";"+this.addStylesJsAsText()+";"+this.addButtonsJsAsText(e)}addToolbarJsAsText(){return" \n const toolbar = document.createElement('div');\n toolbar.id = 'custom-toolbar';\n toolbar.setAttribute('aria-label', 'Navigation');\n toolbar.setAttribute('role', 'toolbar');\n \n document.body.prepend(toolbar);\n "}addStylesJsAsText(){return"\n const styleSheet = document.createElement('style');\n styleSheet.innerText = `\n body{\n padding-top:29px;\n }\n\n #custom-toolbar {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n background: gray;\n padding: 4px;\n background-color: rgb(239, 239, 239);\n border-bottom: 1px solid rgb(214, 214, 214);\n position: fixed;\n top:0;\n left:0;\n }\n\n .custom-toolbar_button {\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n margin-right: 8px;\n\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n border: none !important;\n background: none !important;\n padding: 0 !important;\n }\n\n .custom-toolbar_icon {\n width: 26px;\n height: 20px;\n margin: 0 !important;\n border: none !important;\n background: none !important;\n padding: 0 !important;\n }\n\n .custom-toolbar_icon:active {\n filter: brightness(80%) saturate(150%);\n }\n\n @media (prefers-color-scheme: dark) {\n #custom-toolbar {\n background-color: rgb(48, 48, 48);\n border-bottom: 1px solid rgb(12, 31, 48);\n }\n }\n `;\n document.head.appendChild(styleSheet);\n "}addButtonsJsAsText(e){let t="\n const createButton = (iconPath, tooltip, onClick, index) => {\n const button = document.createElement('button');\n button.id = 'custom-toolbar_button-' + tooltip.replace(/ /g, '-');\n button.classList.add('custom-toolbar_button');\n button.title = tooltip;\n button.setAttribute('aria-label', tooltip);\n button.setAttribute('tabindex', index + 1);\n button.onclick = onClick;\n\n const icon = document.createElement('img');\n icon.src = iconPath;\n icon.alt = tooltip;\n icon.id = 'custom-toolbar_icon-' + tooltip.replace(/ /g, '-');\n icon.classList.add('custom-toolbar_icon');\n\n button.appendChild(icon);\n\n if ( index == 0 ){\n button.focus();\n button.blur();\n }\n\n return button;\n }; \n ";return e.forEach(((e,r)=>{t+=`const button${r} = createButton('${this.convertImagePathToBase64(e.iconPath)}', '${e.tooltip}', ${e.onClick}, ${r});\n document.getElementById('custom-toolbar').appendChild(button${r});`})),t}convertImagePathToBase64(e){const t=i.readFileSync(e);return"data:image/png;base64, "+Buffer.from(t).toString("base64")}}},8074:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TypedEventEmitter=void 0;const o=n(r(2361));t.TypedEventEmitter=class{constructor(){this.emitter=new o.default}emit(e,...t){return this.emitter.emit(e,...t)}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.removeListener(e,t),this}once(e,t){return this.emitter.once(e,t),this}listenerCount(e){return this.emitter.listenerCount(e)}removeAllListeners(e){return this.emitter.removeAllListeners(e),this}}},6445:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.makeAbsoluteUrl=t.waitForUrlWithTimeout=t.isSafeHost=t.isAllowedProtocol=t.isLocalUrl=t.isChromeGpuUrl=t.getAuthority=t.isAboutUrl=void 0;const o=n(r(3685)),s=r(4746),i=r(1413);function a(e){return"about:blank"===e}t.isAboutUrl=a,t.getAuthority=function(e){if(a(e))return e;try{const t=new URL(e,"http://127.0.0.1");return`${t.protocol}//${t.host}`}catch(e){return(0,s.logger)().logError(e),""}},t.isChromeGpuUrl=function(e){return"chrome://gpu"===e.replace(/\/$/,"")},t.isLocalUrl=function(e){const t=e.hostname;return"localhost"===t||"127.0.0.1"===t||"[::1]"===t},t.isAllowedProtocol=function(e){const t=e.protocol;return["http:","https:","mailto:","data:"].includes(t)},t.isSafeHost=function(e){const t=[".youtube.com",".vimeo.com",".c9.ms",".google.com"];for(const r of t)if(e.endsWith(r))return!0;return!1},t.waitForUrlWithTimeout=async function(e,t,r,n){return(0,i.waitWithTimeout)((async()=>new Promise((t=>{o.default.get(e,(e=>{e.resume(),t(new i.WaitResult("WaitSuccess"))})).on("error",(r=>{(0,s.logger)().logDebug(`Connection to ${e} failed: ${r.message}`),t(new i.WaitResult("WaitContinue"))}))}))),t,r,n)},t.makeAbsoluteUrl=function(e){return new URL(e,"http://127.0.0.1")}},3201:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.loadRWebsite=t.removeTrailingSlashes=t.getNumericEnvVar=t.registerWebContentsDebugHandlers=t.handleLocaleCookies=t.createStandaloneErrorDialog=t.initializeLang=t.getDpiZoomScaling=t.raiseAndActivateWindow=t.parseFilter=t.resolveAliasedPath=t.getCurrentlyUniqueFolderName=t.executeJavaScript=t.finalPlatformInitialize=t.findComponents=t.findRepoRoot=t.rsessionExeName=t.removeStaleOptionsLockfile=t.augmentCommandLineArguments=t.getComponentVersions=t.randomString=t.devicePixelRatio=t.userWebCachePath=t.userLogPath=t.initializeSharedSecret=t.getAppPath=void 0;const a=s(r(7147)),l=i(r(2037)),c=i(r(1017)),u=r(1017),d=r(2298),p=r(1859),h=r(3211),f=r(8185),g=r(4746),m=r(62),y=i(r(4748)),v=r(2081),w=r(9707),_=r(6113),b=r(9281),S=c.default.join(c.default.dirname(d.app.getAppPath()),"app");function E(){return S}function R(){return Math.trunc(2147483647*Math.random()).toString()}function k(){return"win32"===process.platform?"rsession.exe":"rsession"}function O(){if(d.app.isPackaged)return"";for(let e=process.cwd();e!==c.default.dirname(e);e=c.default.dirname(e)){const t=c.default.join(e,"version","RELEASE");if((0,a.existsSync)(t))return e}return""}function x(){const e=""+process.cwd(),t=y.default.t("utilsTs.rsessionNotFoundError",{workingDirectory:e});return Error(t)}function P(e,t){e.on(t,((...e)=>{const r=e.map((e=>{if(null!=e&&void 0!==e.preventDefault)return"<event>";try{return"object"==typeof e?"<object>":JSON.stringify(e)}catch(e){return"<unknown>"}}));(0,g.logger)().logDebug(`'${t}': [${r.join(", ")}]`)}))}t.getAppPath=E,t.initializeSharedSecret=function(){const e=(0,_.randomUUID)();(0,h.setenv)("RS_SHARED_SECRET",e)},t.userLogPath=function(){return p.Xdg.userDataDir().completeChildPath("log")},t.userWebCachePath=function(){return p.Xdg.userDataDir().completeChildPath("web-cache")},t.devicePixelRatio=function(){return 1},t.randomString=R,t.getComponentVersions=function(){const e=process.versions;return e.rstudio=d.app.getVersion(),JSON.stringify(e,null,2)},t.augmentCommandLineArguments=function(){const e=(0,h.getenv)("RSTUDIO_CHROMIUM_ARGUMENTS");e&&e.split(" ").forEach((e=>{if(!e.startsWith("-"))return void d.app.commandLine.appendArgument(e);const t=e.indexOf("=");if(-1==t)return void(d.app.commandLine.hasSwitch(e)||d.app.commandLine.appendSwitch(e));const r=e.substring(0,t),n=e.substring(t+1);d.app.commandLine.hasSwitch(r)&&d.app.commandLine.removeSwitch(r),d.app.commandLine.appendSwitch(r,n)}))},t.removeStaleOptionsLockfile=function(){if("win32"!==process.platform)return;const e=(0,h.getenv)("APPDATA");if(!e)return;const t=c.default.join(e,"RStudio/desktop.ini.lock");a.default.existsSync(t)&&((Date.now()-a.default.statSync(t).mtimeMs)/1e3<10||a.default.unlinkSync(t))},t.rsessionExeName=k,t.findRepoRoot=O,t.findComponents=function(){let e=new f.FilePath,t=new f.FilePath;const r=new f.FilePath(E());if(d.app.isPackaged)return t=r.completePath(`bin/${k()}`),[r,e,t,new f.FilePath(E())];let n=(0,h.getenv)("RSTUDIO_CPP_BUILD_OUTPUT");if(n&&!(0,a.existsSync)(n)&&((0,g.logger)().logDebug(`RSTUDIO_CPP_BUILD_OUTPUT is set (${n}) but does not exist`),n=""),n||(n=function(){const e=O();if(e.length>0)return function(e){const t=[],r=[`${e}`,`${e}/src`,`${e}/src/cpp`,`${e}/package/linux`,`${e}/package/osx`,`${e}/package/win32`];for(const e of r){const r=a.default.readdirSync(e);for(const n of r)if(n.startsWith("build")||n.startsWith("cmake-build-")){const r=`${e}/${n}`;for(const e of[".ninja_log","CMakeFiles"]){const n=`${r}/${e}`;if(a.default.existsSync(n)){const e=a.default.statSync(n);t.push({path:r,stat:e})}}}}if(0===t.length)return"";t.sort(((e,t)=>t.stat.mtime.getTime()-e.stat.mtime.getTime()));const n=t[0].path;return(0,g.logger)().logDebug(`Using build root: ${n}`),n}(e);throw x()}()),!n)throw x();const o=new f.FilePath(n);for(const t of[".","src/cpp"]){const r=o.completePath(`${t}/session/${k()}`);if(r.existsSync())return e=o.completePath(`${t}/conf/rdesktop-dev.conf`),[new f.FilePath(n),e,r,new f.FilePath(E())]}throw x()},t.finalPlatformInitialize=function(e){},t.executeJavaScript=async function(e,t){return(0,g.logger)().logDebug(`executeJavaScript(${t})`),e.executeJavaScript(t)},t.getCurrentlyUniqueFolderName=function(e){const t=`${l.default.tmpdir()}${u.sep}${e}`;for(let e=0;e<10;e++){const e=new f.FilePath(`${t}${R()}`);if(!e.existsSync())return e}return new f.FilePath},t.resolveAliasedPath=function(e){return f.FilePath.resolveAliasedPathSync(e,(0,m.userHomePath)()).getAbsolutePath()},t.parseFilter=function(e){const t=[];for(const r of e.split(";;")){const e=r.indexOf("(",0);if(-1===e)continue;const n=r.substring(0,e).trim(),o=r.indexOf(")",e+1);if(-1===o)continue;const s=r.substring(e+1,o).trim().trim().split(/[\s;,|]+/g).map((e=>e.startsWith("*.")?e.substring(2):e.startsWith(".")?e.substring(1):e));t.push({name:n,extensions:s})}return t},t.raiseAndActivateWindow=function(e){e.isMinimized()&&e.restore(),e.moveTop(),e.focus()},t.getDpiZoomScaling=function(){return 1},t.initializeLang=function(){if("darwin"===process.platform){const e=function(){{const e=["read","org.R-project.R","force.LANG"],t=(0,v.spawnSync)("/usr/bin/defaults",e,{encoding:"utf-8"});if(0===t.status)return t.stdout.trim()}{const e=["read","org.R-project.R","ignore.system.locale"],t=(0,v.spawnSync)("/usr/bin/defaults",e,{encoding:"utf-8"});if(0===t.status&&"YES"===t.stdout.trim())return"en_US.UTF-8"}const e=(0,h.getenv)("LANG");return 0!==e.length?e:"en_US.UTF-8"}();0!==e.length&&((0,h.setenv)("LANG",e),(0,h.setenv)("LC_CTYPE",e))}},t.createStandaloneErrorDialog=async function(e,t,r={window:new d.BrowserWindow({width:0,height:0}),shouldCloseWindow:!1}){try{const n={message:"",type:"error",buttons:["OK"]};n["win32"===process.platform?"title":"message"]=e,n["win32"===process.platform?"message":"detail"]=t,await(0,b.appState)().modalTracker.trackElectronModalAsync((async()=>d.dialog.showMessageBox(r.window,n))),r.shouldCloseWindow&&window.close()}catch(e){console.error("[utils.ts] [createStandaloneErrorDialog] Error when creating Standalone Error Dialog: ",e)}},t.handleLocaleCookies=async(e,t=!1)=>{const r=async(e,t)=>{const r="LOCALE";if(e.name==r){const n="LAST_TIME",o=e.value,s=`\n window.localStorage.setItem('${r}', '${o}');\n window.localStorage.setItem('${n}', '${(new Date).getTime()}');\n `;await t.webContents.executeJavaScript(s),await(0,w.changeLanguage)(o)}};t&&e.webContents.session.cookies.on("changed",(async(t,n)=>{await r(n,e)})),await e.webContents.session.cookies.get({}).then((async t=>{0===t.length?await r({name:"LOCALE",value:"en"},e):t.forEach((async t=>{await r(t,e)}))})).catch((e=>(0,g.logger)().logError(e)))},t.registerWebContentsDebugHandlers=function(e){const t=["before-input-event","blur","certificate-error","console-message","context-menu","crashed","cursor-changed","destroyed","devtools-closed","devtools-focused","devtools-opened","devtools-reload-page","did-attach-webview","did-change-theme-color","did-create-window","did-fail-load","did-fail-provisional-load","did-finish-load","did-frame-finish-load","did-frame-navigate","did-navigate","did-navigate-in-page","did-redirect-navigation","did-start-loading","did-start-navigation","did-stop-loading","dom-ready","enter-html-full-screen","focus","found-in-page","frame-created","leave-html-full-screen","login","media-paused","media-started-playing","new-window","page-favicon-updated","page-title-updated","paint","plugin-crashed","preferred-size-changed","preload-error","render-process-gone","responsive","select-bluetooth-device","select-client-certificate","unresponsive","update-target-url","will-attach-webview","will-navigate","will-prevent-unload","will-redirect","zoom-changed"];for(const r of t)try{P(e,r)}catch(e){(0,g.logger)().logDebug(`Error adding debug handler for event '${r}': ${e}`)}},t.getNumericEnvVar=function(e){const t=(0,h.getenv)(e).trim();if(t){const e=Number(t);return isNaN(e)?void 0:e}};const $=/[\\/]+$/,T=/^[\\/]+$/;t.removeTrailingSlashes=function(e){if(0===e.length||T.test(e))return e;const t=e.search($);return t>0?e.substring(0,t):e},t.loadRWebsite=function(){d.shell.openExternal("https://www.rstudio.org/links/r-project")}},1562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowTracker=void 0,t.WindowTracker=class{constructor(){this.nameMap=new Map}getWindow(e){return this.nameMap.get(e)}addWindow(e,t){this.nameMap.set(e,t),t.window.addListener("closed",(()=>{this.onWindowDestroyed(e)}))}onWindowDestroyed(e){this.nameMap.delete(e)}length(){return this.nameMap.size}}},2996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.positionAndEnsureVisible=t.intersects=t.focusedWebContents=t.activateWindow=t.configureSecondaryWindow=t.configureSatelliteWindow=void 0;const n=r(2298),o=r(9281),s=r(6544),i=r(8485),a=r(3201),l=r(4746),c=r(9433);function u(e,t){const r=e.x+e.width,n=e.y+e.height,o=t.x+t.width,s=t.y+t.height;return!(e.x>=o||r<=t.x||e.y>=s||n<=t.y)}t.configureSatelliteWindow=function(e,t,r){const n=(0,a.getDpiZoomScaling)(),i=e.width*n,l=e.height*n,c=e.screenX,u=e.screenY,d=new s.SatelliteWindow(e.mainWindow,e.name,r,t);if(d.window.setSize(i,l),c>=0&&u>=0)d.window.setPosition(c,u);else if("pdf"!==e.name){const t=25,[r,n]=e.mainWindow.window.getPosition(),[o]=e.mainWindow.window.getSize();let s=n-t;s<0&&(s=n+t);const a=r+o/2-i/2;d.window.setPosition(Math.trunc(a),Math.trunc(s))}e.name&&(0,o.appState)().windowTracker.addWindow(e.name,d)},t.configureSecondaryWindow=function(e,t,r,n){const s=new i.SecondaryWindow(e.showToolbar,e.name,n,void 0,r,e.allowExternalNavigate,t);s.mainWindow=e.mainWindow,e.name&&(0,o.appState)().windowTracker.addWindow(e.name,s)},t.activateWindow=function(e){const t=n.BrowserWindow.getAllWindows();for(const r of t)if(r.webContents.mainFrame.name===e)return void(0,a.raiseAndActivateWindow)(r)},t.focusedWebContents=function(){return n.webContents.getFocusedWebContents()},t.intersects=u,t.positionAndEnsureVisible=function(e,t,r,o){try{const s=300,i=200,a={height:t.height-5,width:t.width-5,x:t.x+5,y:t.y+5};if(n.screen.getAllDisplays().find((e=>u(a,e.workArea))))e.setBounds(t);else{const t=n.screen.getPrimaryDisplay().bounds,s={width:Math.min(r,t.width),height:Math.min(o,t.height)};e.setSize(s.width,s.height),e.setPosition(t.x+(t.width-s.width)/2,t.y+(t.height-s.height)/2,!1)}const l=e.getSize();e.setSize(Math.max(s,l[0]),Math.max(i,l[1]))}catch(e){(0,l.logger)().logError((0,c.safeError)(e))}}},7133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDesktopBridge=void 0;const n=r(2298),o=r(4439),s=r(2770),i=r(9433);function a(e,t){(0,o.logString)("err",`IpcError: ${e}: ${t.message}`)}t.getDesktopBridge=function(){return{browseUrl:e=>{n.ipcRenderer.send("desktop_browse_url",e)},getOpenFileName:(e,t,r,o,s,i,l)=>{n.ipcRenderer.invoke("desktop_get_open_file_name",e,t,r,o,s,i).then((e=>{e.canceled?l(""):l(e.filePaths[0])})).catch((e=>a("getOpenFileName",e)))},getSaveFileName:(e,t,r,o,i,l,c)=>{n.ipcRenderer.invoke("desktop_get_save_file_name",e,t,r,o,i,l).then((e=>{if(e.canceled)return c("");let t=e.filePath;if(0===o.length)return c(t);const r=t.lastIndexOf("."),a=r>0?t.substring(r):"";if(0===a.length||i&&a!==o){const e=r>0?t.substring(0,r):t;t=e+o}"win32"===process.platform&&(t=(0,s.normalizeSeparators)(t,"/")),n.ipcRenderer.invoke("desktop_get_user_home_path").then((e=>{const r=(0,s.normalizeSeparators)(e.length>0?e:"","/");return r.length&&t.startsWith(r)&&(t="~"+t.substring(r.length)),c(t)}))})).catch((e=>a("getSaveFileName",e)))},getExistingDirectory:(e,t,r,o,s)=>{n.ipcRenderer.invoke("desktop_get_existing_directory",e,t,r,o).then((e=>{e.canceled?s(""):s(e.filePaths[0])})).catch((e=>a("getExistingDirectory",e)))},getUserHomePath:e=>{n.ipcRenderer.invoke("desktop_get_user_home_path").then((t=>e(t))).catch((e=>a("getUserHomePath",e)))},onClipboardSelectionChanged:()=>{n.ipcRenderer.send("desktop_on_clipboard_selection_changed")},undo:()=>{n.ipcRenderer.send("desktop_undo")},redo:()=>{n.ipcRenderer.send("desktop_redo")},clipboardCut:()=>{n.ipcRenderer.send("desktop_clipboard_cut")},clipboardCopy:()=>{n.ipcRenderer.send("desktop_clipboard_copy")},clipboardPaste:()=>{n.ipcRenderer.send("desktop_clipboard_paste")},setClipboardText:e=>{n.ipcRenderer.send("desktop_set_clipboard_text",e)},getClipboardText:e=>{n.ipcRenderer.invoke("desktop_get_clipboard_text").then((t=>e(t))).catch((e=>a("getClipboardText",e)))},getClipboardUris:e=>{n.ipcRenderer.invoke("desktop_get_clipboard_uris").then((t=>e(t))).catch((e=>a("getClipboardUris",e)))},getClipboardImage:e=>{n.ipcRenderer.invoke("desktop_get_clipboard_image").then((t=>e(t))).catch((e=>a("getClipboardImage",e)))},setGlobalMouseSelection:e=>{n.ipcRenderer.send("desktop_set_global_mouse_selection",e)},getGlobalMouseSelection:e=>{n.ipcRenderer.invoke("desktop_get_global_mouse_selection").then((t=>e(t))).catch((e=>a("getGlobalMouseSelection",e)))},getCursorPosition:e=>{n.ipcRenderer.invoke("desktop_get_cursor_position").then((t=>e(t))).catch((e=>a("getCursorPosition",e)))},doesWindowExistAtCursorPosition:e=>{n.ipcRenderer.invoke("desktop_does_window_exist_at_cursor_position").then((t=>e(t))).catch((e=>a("doesWindowExistAtCursorPosition",e)))},onWorkbenchInitialized:e=>{n.ipcRenderer.send("desktop_on_workbench_initialized",e)},showFolder:e=>{n.ipcRenderer.send("desktop_show_folder",e)},showFile:e=>{n.ipcRenderer.send("desktop_show_file",e)},showWordDoc:e=>{n.ipcRenderer.send("desktop_show_word_doc",e)},showPptPresentation:e=>{n.ipcRenderer.send("desktop_show_ppt_presentation",e)},showPDF:(e,t)=>{n.ipcRenderer.send("desktop_show_pdf",e,t)},prepareShowWordDoc:()=>{n.ipcRenderer.send("desktop_prepare_show_word_doc")},prepareShowPptPresentation:()=>{n.ipcRenderer.send("desktop_prepare_show_ppt_presentation")},getRVersion:e=>{n.ipcRenderer.invoke("desktop_get_r_version").then((t=>e(t))).catch((e=>a("getRVersion",e)))},chooseRVersion:e=>{n.ipcRenderer.invoke("desktop_choose_r_version").then((t=>e(t))).catch((e=>a("chooseRVersion",e)))},openMinimalWindow:(e,t,r,o)=>{n.ipcRenderer.send("desktop_open_minimal_window",e,t,r,o)},activateMinimalWindow:e=>{n.ipcRenderer.send("desktop_activate_minimal_window",e)},activateSatelliteWindow:e=>{n.ipcRenderer.send("desktop_activate_satellite_window",e)},prepareForSatelliteWindow:(e,t,r,o,s,i)=>{n.ipcRenderer.invoke("desktop_prepare_for_satellite_window",e,t,r,o,s).then((()=>i())).catch((e=>a("prepareForSatelliteWindow",e)))},prepareForNamedWindow:(e,t,r,o)=>{n.ipcRenderer.invoke("desktop_prepare_for_named_window",e,t,r).then((()=>o())).catch((e=>a("prepareForNamedWindow",e)))},setNumGwtModalsShowing:e=>{n.ipcRenderer.send("desktop_set_gwt_num_modals_showing",e)},copyPageRegionToClipboard:(e,t,r,o,s)=>{n.ipcRenderer.invoke("desktop_copy_page_region_to_clipboard",e,t,r,o).then((()=>s())).catch((e=>a("desktop_copy_page_region_to_clipboard",e)))},copyImageAtXYToClipboard:(e,t,r)=>{n.ipcRenderer.invoke("desktop_copy_image_at_xy_to_clipboard",e,t).then((()=>r())).catch((e=>a("desktop_copy_image_at_xy_to_clipboard",e)))},exportPageRegionToFile:(e,t,r,o,s,i)=>{n.ipcRenderer.send("desktop_export_page_region_to_file",e,t,r,o,s,i)},supportsClipboardMetafile:e=>{n.ipcRenderer.invoke("desktop_supports_clipboard_metafile").then((t=>e(t))).catch((e=>a("supportsClipboardMetafile",e)))},showMessageBox:(e,t,r,o,s,i,l)=>{n.ipcRenderer.invoke("desktop_show_message_box",e,t,r,o,s,i).then((e=>l(e.response))).catch((e=>a("showMessageBox",e)))},bringMainFrameToFront:()=>{n.ipcRenderer.send("desktop_bring_main_frame_to_front")},bringMainFrameBehindActive:()=>{n.ipcRenderer.send("desktop_bring_main_frame_behind_active")},desktopRenderingEngine:e=>{n.ipcRenderer.invoke("desktop_rendering_engine").then((t=>e(t))).catch((e=>a("desktopRenderingEngine",e)))},setDesktopRenderingEngine:e=>{n.ipcRenderer.send("desktop_set_desktop_rendering_engine",e)},cleanClipboard:e=>{n.ipcRenderer.send("desktop_clean_clipboard",e)},setPendingQuit:(e,t)=>{n.ipcRenderer.invoke("desktop_set_pending_quit",e).then((e=>t(e))).catch((e=>a("setPendingQuit",e)))},openFile:e=>{if(!e)return;const t=n.webContents.getAllWebContents();t.length&&(e=e.replaceAll("\\","\\\\").replaceAll('"','\\"').replaceAll("\n","\\n"),t[0].executeJavaScript(`window.desktopHooks.openFile("${e}")`).catch((e=>(0,o.logString)("err",(0,i.safeError)(e).message))))},openProjectInNewWindow:e=>{n.ipcRenderer.send("desktop_open_project_in_new_window",e)},openSessionInNewWindow:e=>{n.ipcRenderer.send("desktop_open_session_in_new_window",e)},getFixedWidthFontList:e=>{n.ipcRenderer.invoke("desktop_get_fixed_width_font_list").then((t=>e(t))).catch((e=>a("getFixedWidthFontList",e)))},getFixedWidthFont:e=>{n.ipcRenderer.invoke("desktop_get_fixed_width_font").then((t=>e(t))).catch((e=>a("getFixedWidthFont",e)))},setFixedWidthFont:e=>{n.ipcRenderer.send("desktop_set_fixed_width_font",e)},getZoomLevel:e=>{e(n.ipcRenderer.sendSync("desktop_get_zoom_level"))},setZoomLevel:e=>{n.ipcRenderer.send("desktop_set_zoom_level",e)},zoomIn:()=>{n.ipcRenderer.send("desktop_zoom_in")},zoomOut:()=>{n.ipcRenderer.send("desktop_zoom_out")},zoomActualSize:()=>{n.ipcRenderer.send("desktop_zoom_actual_size")},setBackgroundColor:e=>{n.ipcRenderer.send("desktop_set_background_color",e)},changeTitleBarColor:(e,t,r)=>{n.ipcRenderer.send("desktop_change_title_bar_color",e,t,r)},syncToEditorTheme:e=>{n.ipcRenderer.send("desktop_sync_to_editor_theme",e)},getEnableAccessibility:e=>{n.ipcRenderer.invoke("desktop_get_enable_accessibility").then((t=>e(t))).catch((e=>a("getEnableAccessibility",e)))},setEnableAccessibility:e=>{n.ipcRenderer.send("desktop_set_enable_accessibility",e)},setAutohideMenubar:e=>{n.ipcRenderer.send("desktop_set_autohide_menubar",e)},setDisableRendererAccessibility:e=>{n.ipcRenderer.send("desktop_set_disable_renderer_accessibility",e)},getIgnoreGpuExclusionList:e=>{n.ipcRenderer.invoke("desktop_get_ignore_gpu_exclusion_list").then((t=>e(t))).catch((e=>a("getIgnoreGpuExclusionList",e)))},setIgnoreGpuExclusionList:e=>{n.ipcRenderer.send("desktop_set_ignore_gpu_exclusion_list",e)},getDisableGpuDriverBugWorkarounds:e=>{n.ipcRenderer.invoke("desktop_get_disable_gpu_driver_bug_workarounds").then((t=>e(t))).catch((e=>a("getDisableGpuDriverBugWorkarounds",e)))},setDisableGpuDriverBugWorkarounds:e=>{n.ipcRenderer.send("desktop_set_disable_gpu_driver_bug_workarounds",e)},showSessionServerOptionsDialog:()=>{n.ipcRenderer.send("desktop_show_session_server_options_dialog")},getInitMessages:e=>{n.ipcRenderer.invoke("desktop_get_init_messages").then((t=>e(t))).catch((e=>a("getInitMessages",e)))},getDesktopSynctexViewer:e=>{n.ipcRenderer.invoke("desktop_get_desktop_synctex_viewer").then((t=>e(t))).catch((e=>a("getDesktopSynctexViewer",e)))},externalSynctexPreview:(e,t)=>{n.ipcRenderer.send("desktop_external_synctex_preview",e,t)},externalSynctexView:(e,t,r,o)=>{n.ipcRenderer.send("desktop_external_synctex_view",e,t,r,o)},supportsFullscreenMode:e=>{n.ipcRenderer.invoke("desktop_supports_fullscreen_mode").then((t=>e(t))).catch((e=>a("supportsFullscreenMode",e)))},toggleFullscreenMode:()=>{n.ipcRenderer.send("desktop_toggle_fullscreen_mode")},showKeyboardShortcutHelp:()=>{n.ipcRenderer.send("desktop_show_keyboard_shortcut_help")},launchSession:e=>{n.ipcRenderer.send("desktop_launch_session",e)},reloadZoomWindow:()=>{n.ipcRenderer.send("desktop_reload_zoom_window")},setTutorialUrl:e=>{n.ipcRenderer.send("desktop_set_tutorial_url",e)},setViewerUrl:e=>{n.ipcRenderer.send("desktop_set_viewer_url",e)},setPresentationUrl:e=>{n.ipcRenderer.send("desktop_set_presentation_url",e)},reloadViewerZoomWindow:e=>{n.ipcRenderer.send("desktop_reload_viewer_zoom_window",e)},setShinyDialogUrl:e=>{n.ipcRenderer.send("desktop_set_shiny_dialog_url",e)},allowNavigation:(e,t)=>{n.ipcRenderer.invoke("desktop_allow_navigation",e).then((e=>t(e))).catch((e=>a("desktop_allow_navigation",e)))},isMacOS:e=>{n.ipcRenderer.invoke("desktop_is_macos").then((t=>e(t))).catch((e=>a("isMacOS",e)))},isCentOS:e=>{n.ipcRenderer.invoke("desktop_is_centos").then((t=>e(t))).catch((e=>a("isCentOS",e)))},setBusy:e=>{n.ipcRenderer.send("desktop_set_busy",e)},setWindowTitle:e=>{n.ipcRenderer.send("desktop_set_window_title",e)},installRtools:(e,t)=>{n.ipcRenderer.send("desktop_install_rtools",e,t)},getDisplayDpi:e=>{n.ipcRenderer.invoke("desktop_get_display_dpi").then((t=>e(t))).catch((e=>a("getDisplayDpi",e)))},onSessionQuit:()=>{n.ipcRenderer.send("desktop_on_session_quit")},crashDesktopApplication:()=>{n.ipcRenderer.send("desktop_stop_main_thread")},getSessionServer:e=>{n.ipcRenderer.invoke("desktop_get_session_server").then((t=>e(t))).catch((e=>a("getSessionServer",e)))},getSessionServers:e=>{n.ipcRenderer.invoke("desktop_get_session_servers").then((t=>e(t))).catch((e=>a("getSessionServers",e)))},reconnectToSessionServer:e=>{n.ipcRenderer.send("desktop_reconnect_to_session_server",e)},setLauncherServer:(e,t)=>{n.ipcRenderer.invoke("desktop_set_launcher_server",e).then((e=>t(e))).catch((e=>a("setLauncherServer",e)))},connectToLauncherServer:()=>{n.ipcRenderer.send("desktop_connect_to_launcher_server")},getLauncherServer:e=>{n.ipcRenderer.invoke("desktop_get_launcher_server").then((t=>e(t))).catch((e=>a("getLauncherServer",e)))},startLauncherJobStatusStream:e=>{n.ipcRenderer.send("desktop_start_launcher_job_status_stream",e)},stopLauncherJobStatusStream:e=>{n.ipcRenderer.send("desktop_stop_launcher_job_status_stream",e)},startLauncherJobOutputStream:e=>{n.ipcRenderer.send("desktop_start_launcher_job_output_stream",e)},stopLauncherJobOutputStream:e=>{n.ipcRenderer.send("desktop_stop_launcher_job_output_stream",e)},controlLauncherJob:(e,t)=>{n.ipcRenderer.send("desktop_control_launcher_job",e,t)},submitLauncherJob:e=>{n.ipcRenderer.send("desktop_submit_launcher_job",e)},getJobContainerUser:()=>{n.ipcRenderer.send("desktop_get_job_container_user")},validateJobsConfig:()=>{n.ipcRenderer.send("desktop_validate_jobs_config")},getProxyPortNumber:e=>{n.ipcRenderer.invoke("desktop_get_proxy_port_number").then((t=>e(t))).catch((e=>a("getProxyPortNumber",e)))},signOut:()=>{n.ipcRenderer.send("desktop_sign_out")},getStartupErrorInfo:(e,t)=>{n.ipcRenderer.invoke("desktop_startup_error_info",e).then((e=>t(e))).catch((e=>a("getStartupErrorInfo",e)))},detectRosetta:()=>{n.ipcRenderer.send("desktop_detect_rosetta")}}}},4439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logError=t.logString=t.getDesktopLoggerBridge=void 0;const n=r(2298);function o(e,t){n.ipcRenderer.send("desktop_log_message",e,t)}function s(e){e instanceof Error?o("err",e.message):o("err","unknown error type in logger bridge")}t.getDesktopLoggerBridge=function(){return{logString:(e,t)=>{o(e,t)},logError:e=>{s(e)}}},t.logString=o,t.logError=s},3495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalDialog=void 0;const n=r(2298),o=r(9886),s=r(9433),i=r(3211),a=r(9281);class l extends n.BrowserWindow{constructor(e,t,r=null){let o={minWidth:450,minHeight:400,width:450,height:400,show:!1,webPreferences:{nodeIntegration:!1,preload:t}};null!==r&&(o={...o,parent:r,modal:!0}),super(o),this._widgetUrl=e,this._ipcMainChannels=[],this.on("closed",(async()=>{await(0,a.appState)().modalTracker.removeModalDialog(this);for(const e of this._ipcMainChannels)n.ipcMain.removeHandler(e)})),this.on("show",(async()=>{await(0,a.appState)().modalTracker.addModalDialog(this)})),this.setMenuBarVisibility(!1),this.setMinimizable(!1),this.setMaximizable(!1),this.setFullScreenable(!1)}addIpcHandler(e,t){n.ipcMain.handle(e,t),this._ipcMainChannels.push(e)}async showModal(){try{const e=await this.showModalImpl();return(0,o.ok)(e)}catch(e){return(0,o.err)((0,s.safeError)(e))}}async showModalImpl(){return await this.loadURL(this._widgetUrl),this.show(),0!==(0,i.getenv)("RSTUDIO_DESKTOP_MODAL_DEVTOOLS").length&&this.webContents.openDevTools(),this.onShowModal()}}t.ModalDialog=l},2770:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.kWindowsRExe=t.normalizeSeparatorsNative=t.normalizeSeparators=t.checkForNewLanguage=void 0;const r=e=>{if("undefined"!=typeof window){const t=window.localStorage.getItem(e);return{isSet:""!==t&&!!t,value:t}}return{isSet:!1,value:""}};function n(e,t="/"){let r="";return e.startsWith("\\\\")&&(r=`${t}${t}`,e=e.substring(2)),`${r}${e.replace(/[\\/]+/g,t)}`}t.checkForNewLanguage=async()=>new Promise((e=>{const t=(new Date).getTime(),n=setInterval((()=>{if((new Date).getTime()>t+5e3)clearInterval(n),e("en");else{const o=r("LAST_TIME");if(o.isSet){const s=r("LOCALE");s.isSet&&t<=parseInt(""+o.value,10)+3e3&&(clearInterval(n),e(""+s.value))}}}),100)})),t.normalizeSeparators=n,t.normalizeSeparatorsNative=function(e){return n(e,"win32"===process.platform?"\\":"/")},t.kWindowsRExe="Rterm.exe"},8715:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ChooseRModalWindow=void 0;const i=r(2298),a=r(502),l=r(4746),c=r(3495),u=r(9707),d=s(r(4748)),p=r(8125),h=r(7147),f=r(1017),g=r(2770),m=r(9281),y=r(3201);class v extends c.ModalDialog{constructor(e,t=null){super(`file://${require("path").resolve(__dirname,"..","renderer","choose_r","index.html")}`,require("path").resolve(__dirname,"../renderer","choose_r","preload.js"),t),this.rInstalls=e,(0,u.initI18n)()}async maybeResolve(e,t){try{return(0,l.logger)().logDebug(`maybeResolve binaryPath: ${t.binaryPath??"null binary path"}`),t.binaryPath&&(t.binaryPath=(0,p.fixWindowsRExecutablePath)(t.binaryPath)),!!function(e){const t=e.binaryPath;if(!t)return(0,l.logger)().logErrorMessage("internal error: binaryPath was unexpectedly null"),!1;const[r,n]=(0,a.detectREnvironment)(t);return n?((0,l.logger)().logErrorMessage(`Selected R path: ${e.binaryPath}`),(0,l.logger)().logError(n),(0,m.appState)().modalTracker.trackElectronModalSync((()=>i.dialog.showMessageBoxSync({type:"error",title:(0,d.t)("chooseRDialog.rLaunchFailedTitle"),message:(0,d.t)("chooseRDialog.rLaunchFailedMessage"),buttons:[(0,d.t)("common.buttonOk")]}))),!1):((0,l.logger)().logDebug(`Validated R: ${r.rScriptPath}`),(0,l.logger)().logDebug(JSON.stringify(r)),!0)}(t)&&(e(t),!0)}catch(e){return(0,l.logger)().logError(e),!1}}async onShowModal(){const e=(0,a.findDefault32Bit)(),t=(0,a.findDefault64Bit)(),r={default32bitPath:(0,a.isValidInstallation)(e,"i386")?e:"",default64bitPath:(0,a.isValidInstallation)(t,"x64")?t:"",rInstalls:this.rInstalls,renderingEngine:(0,p.ElectronDesktopOptions)().renderingEngine(),selectedRVersion:(0,p.ElectronDesktopOptions)().rExecutablePath()};return this.webContents.send("initialize",r),new Promise((e=>{this.addIpcHandler("path_normalize",(async(e,t)=>(0,f.normalize)(t))),this.addIpcHandler("fs_existsSync",(async(e,t)=>(0,h.existsSync)(t))),this.addIpcHandler("use-default-32bit",(async(t,n)=>{const o=r.default32bitPath;return n.binaryPath=`${o}/bin/i386/${g.kWindowsRExe}`,(0,l.logger)().logDebug(`Using default 32-bit version of R (${n.binaryPath})`),this.maybeResolve(e,n)})),this.addIpcHandler("use-default-64bit",(async(t,n)=>{const o=r.default64bitPath;return n.binaryPath=`${o}/bin/x64/${g.kWindowsRExe}`,(0,l.logger)().logDebug(`Using default 64-bit version of R (${n.binaryPath})`),this.maybeResolve(e,n)})),this.addIpcHandler("use-custom",(async(t,r)=>((0,l.logger)().logDebug(`Using user-selected version of R (${r.binaryPath})`),this.maybeResolve(e,r)))),this.addIpcHandler("browse-r-exe",(async(t,r)=>{const n=(0,m.appState)().modalTracker.trackElectronModalSync((()=>i.dialog.showOpenDialogSync(this,{title:d.default.t("uiFolder.chooseRExecutable"),properties:["openFile"],defaultPath:g.kWindowsRExe,filters:[{name:d.default.t("uiFolder.rExecutable"),extensions:["exe"]}]})));return!!n&&(r.binaryPath=n[0],(0,l.logger)().logDebug(`Using user-browsed version of R (${r.binaryPath})`),this.maybeResolve(e,r))})),this.addIpcHandler("download-r",(()=>((0,y.loadRWebsite)(),e(null)))),this.addIpcHandler("cancel",(()=>e(null))),this.on("closed",(()=>e(null)))}))}}t.ChooseRModalWindow=v},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},1891:e=>{"use strict";e.exports=require("dgram")},2298:e=>{"use strict";e.exports=require("electron")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3292:e=>{"use strict";e.exports=require("fs/promises")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},8188:e=>{"use strict";e.exports=require("module")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},7496:(e,t,r)=>{const n=r(9556).default;e.exports=n,e.exports.default=n},9477:(e,t,r)=>{const n=r(7629).default;e.exports=n,e.exports.default=n},8906:(e,t,r)=>{const n=r(4067).default;e.exports=n,e.exports.default=n},6033:(e,t,r)=>{const n=r(6277).default;e.exports=n,e.exports.default=n},8991:(e,t,r)=>{const n=r(5582).default;e.exports=n,e.exports.default=n},7149:(e,t,r)=>{const n=r(2475).default;e.exports=n,e.exports.default=n},3677:(e,t,r)=>{const n=r(8176).default;e.exports=n,e.exports.default=n},2544:(e,t,r)=>{const n=r(2320).default;e.exports=n,e.exports.default=n},7266:(e,t,r)=>{const n=r(6877).default;e.exports=n,e.exports.default=n},4235:(e,t,r)=>{const n=r(7401).default;e.exports=n,e.exports.default=n},3693:(e,t,r)=>{const n=r(784).default;e.exports=n,e.exports.default=n},6237:(e,t,r)=>{const n=r(6579).default;e.exports=n,e.exports.default=n},8048:(e,t,r)=>{e.exports={crc1:r(7496),crc8:r(4235),crc81wire:r(3693),crc16:r(9477),crc16ccitt:r(8906),crc16modbus:r(8991),crc16xmodem:r(7149),crc16kermit:r(6033),crc24:r(3677),crc32:r(2544),crc32mpeg:r(7266),crcjam:r(6237)},e.exports.default=e.exports},8342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=(e,t=0)=>{let r=~~t,n=0;for(let t=0;t<e.length;t++)n+=e[t];return r+=n%256,r%256}},4795:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t=0)=>{let n=~~t;for(let t=0;t<e.length;t++)n=65535&(r[255&(n^e[t])]^n>>8);return n}},3650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=void 0!==t?~~t:65535;for(let t=0;t<e.length;t++)n=65535&(r[255&(n>>8^e[t])]^n<<8);return n}},8803:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=void 0!==t?~~t:0;for(let t=0;t<e.length;t++)n=65535&(r[255&(n^e[t])]^n>>8);return n}},3609:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=void 0!==t?~~t:65535;for(let t=0;t<e.length;t++)n=65535&(r[255&(n^e[t])]^n>>8);return n}},4064:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=(e,t)=>{let r=void 0!==t?~~t:0;for(let t=0;t<e.length;t++){let n=r>>>8&255;n^=255&e[t],n^=n>>>4,r=r<<8&65535,r^=n,n=n<<5&65535,r^=n,n=n<<7&65535,r^=n}return r}},4631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=void 0!==t?~~t:11994318;for(let t=0;t<e.length;t++)n=16777215&(r[255&(n>>16^e[t])]^n<<8);return n}},8658:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=0===t?0:~t;for(let t=0;t<e.length;t++)n=r[255&(n^e[t])]^n>>>8;return~n}},7800:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=void 0!==t?~~t:4294967295;for(let t=0;t<e.length;t++)n=r[255&(n>>24^e[t])]^n<<8;return n}},8966:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t=0)=>{let n=~~t;for(let t=0;t<e.length;t++)n=255&r[255&(n^e[t])];return n}},581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t=0)=>{let n=~~t;for(let t=0;t<e.length;t++)n=255&r[255&(n^e[t])];return n}},3234:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t=-1)=>{let n=0===t?0:~~t;for(let t=0;t<e.length;t++)n=r[255&(n^e[t])]^n>>>8;return n}},9556:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(8342)),s=n(r(2766));t.default=(0,s.default)("crc1",o.default)},7629:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(4795)),s=n(r(2766));t.default=(0,s.default)("crc-16",o.default)},4067:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3650)),s=n(r(2766));t.default=(0,s.default)("ccitt",o.default)},6277:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(8803)),s=n(r(2766));t.default=(0,s.default)("kermit",o.default)},5582:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3609)),s=n(r(2766));t.default=(0,s.default)("crc-16-modbus",o.default)},2475:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(4064)),s=n(r(2766));t.default=(0,s.default)("xmodem",o.default)},8176:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(4631)),s=n(r(2766));t.default=(0,s.default)("crc-24",o.default)},2320:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(8658)),s=n(r(2766));t.default=(0,s.default)("crc-32",o.default)},6877:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(7800)),s=n(r(2766));t.default=(0,s.default)("crc-32-mpeg",o.default)},7401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(8966)),s=n(r(2766));t.default=(0,s.default)("crc-8",o.default)},784:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(581)),s=n(r(2766));t.default=(0,s.default)("dallas-1-wire",o.default)},6579:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3234)),s=n(r(2766));t.default=(0,s.default)("jam",o.default)},967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4300);t.default=(e,t)=>n.Buffer.from(e,t)},2766:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(967));t.default=function(e,t){const r=(e,r)=>t((0,o.default)(e),r)>>>0;return r.signed=(e,r)=>t((0,o.default)(e),r),r.unsigned=r,r.model=e,r}},495:(e,t,r)=>{"use strict";var n,o,s,i=r(2781);r(8188);try{n=new TextDecoder}catch(e){}var a=0;const l=[];var c,u,d,p,h,f=l,g=0,m={},y=0,v=0,w=[],_={useRecords:!1,mapsAsObjects:!0};class b{}const S=new b;S.name="MessagePack 0xC1";var E,R,k,O=!1,x=2;try{new Function("")}catch(e){x=1/0}class P{constructor(e){e&&(!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.sequential&&!1!==e.trusted&&(e.trusted=!0,e.structures||0==e.useRecords||(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,t){if(o)return oe((()=>(se(),this?this.unpack(e,t):P.prototype.unpack.call(_,e,t))));e.buffer||e.constructor!==ArrayBuffer||(e="undefined"!=typeof Buffer?Buffer.from(e):new Uint8Array(e)),"object"==typeof t?(s=t.end||e.length,a=t.start||0):(a=0,s=t>-1?t:e.length),g=0,v=0,u=null,f=l,d=null,o=e;try{h=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(t){if(o=null,e instanceof Uint8Array)throw t;throw new Error("Source must be a Uint8Array or Buffer but was a "+(e&&"object"==typeof e?e.constructor.name:typeof e))}if(this instanceof P){if(m=this,this.structures)return c=this.structures,$(t);(!c||c.length>0)&&(c=[])}else m=_,(!c||c.length>0)&&(c=[]);return $(t)}unpackMultiple(e,t){let r,n=0;try{O=!0;let o=e.length,s=this?this.unpack(e,o):le.unpack(e,o);if(!t){for(r=[s];a<o;)n=a,r.push($());return r}if(!1===t(s,n,a))return;for(;a<o;)if(n=a,!1===t($(),n,a))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{O=!1,se()}}_mergeStructures(e,t){R&&(e=R.call(this,e)),e=e||[],Object.isFrozen(e)&&(e=e.map((e=>e.slice(0))));for(let t=0,r=e.length;t<r;t++){let r=e[t];r&&(r.isShared=!0,t>=32&&(r.highByte=t-32>>5))}e.sharedLength=e.length;for(let r in t||[])if(r>=0){let n=e[r],o=t[r];o&&(n&&((e.restoreStructures||(e.restoreStructures=[]))[r]=n),e[r]=o)}return this.structures=e}decode(e,t){return this.unpack(e,t)}}function $(e){try{if(!m.trusted&&!O){let e=c.sharedLength||0;e<c.length&&(c.length=e)}let t;if(m.randomAccessStructure&&o[a]<64&&o[a]>=32&&E?(t=E(o,a,s,m),o=null,e&&e.lazy||!t||(t=t.toJSON()),a=s):t=I(),d&&(a=d.postBundlePosition,d=null),O&&(c.restoreStructures=null),a==s)c&&c.restoreStructures&&T(),c=null,o=null,p&&(p=null);else{if(a>s)throw new Error("Unexpected end of MessagePack data");if(!O){let e;try{e=JSON.stringify(t,((e,t)=>"bigint"==typeof t?`${t}n`:t)).slice(0,100)}catch(t){e="(JSON view not available "+t+")"}throw new Error("Data read, but end of buffer not reached "+e)}}return t}catch(e){throw c&&c.restoreStructures&&T(),se(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||a>s)&&(e.incomplete=!0),e}}function T(){for(let e in c.restoreStructures)c[e]=c.restoreStructures[e];c.restoreStructures=null}function I(){let e=o[a++];if(e<160){if(e<128){if(e<64)return e;{let t=c[63&e]||m.getStructures&&A()[63&e];return t?(t.read||(t.read=M(t,63&e)),t.read()):e}}if(e<144){if(e-=128,m.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=X();"__proto__"===e&&(e="__proto_"),t[e]=I()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(I(),I());return t}}{e-=144;let t=new Array(e);for(let r=0;r<e;r++)t[r]=I();return m.freezeData?Object.freeze(t):t}}if(e<192){let t=e-160;if(v>=a)return u.slice(a-y,(a+=t)-y);if(0==v&&s<140){let e=t<16?G(t):q(t);if(null!=e)return e}return N(t)}{let t;switch(e){case 192:return null;case 193:return d?(t=I(),t>0?d[1].slice(d.position1,d.position1+=t):d[0].slice(d.position0,d.position0-=t)):S;case 194:return!1;case 195:return!0;case 196:if(t=o[a++],void 0===t)throw new Error("Unexpected end of buffer");return Y(t);case 197:return t=h.getUint16(a),a+=2,Y(t);case 198:return t=h.getUint32(a),a+=4,Y(t);case 199:return K(o[a++]);case 200:return t=h.getUint16(a),a+=2,K(t);case 201:return t=h.getUint32(a),a+=4,K(t);case 202:if(t=h.getFloat32(a),m.useFloat32>2){let e=ie[(127&o[a])<<1|o[a+1]>>7];return a+=4,(e*t+(t>0?.5:-.5)|0)/e}return a+=4,t;case 203:return t=h.getFloat64(a),a+=8,t;case 204:return o[a++];case 205:return t=h.getUint16(a),a+=2,t;case 206:return t=h.getUint32(a),a+=4,t;case 207:return"number"===m.int64AsType?(t=4294967296*h.getUint32(a),t+=h.getUint32(a+4)):"string"===m.int64AsType?t=h.getBigUint64(a).toString():"auto"===m.int64AsType?(t=h.getBigUint64(a),t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=h.getBigUint64(a),a+=8,t;case 208:return h.getInt8(a++);case 209:return t=h.getInt16(a),a+=2,t;case 210:return t=h.getInt32(a),a+=4,t;case 211:return"number"===m.int64AsType?(t=4294967296*h.getInt32(a),t+=h.getUint32(a+4)):"string"===m.int64AsType?t=h.getBigInt64(a).toString():"auto"===m.int64AsType?(t=h.getBigInt64(a),t>=BigInt(-2)<<BigInt(52)&&t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=h.getBigInt64(a),a+=8,t;case 212:if(t=o[a++],114==t)return Z(63&o[a++]);{let e=w[t];if(e)return e.read?(a++,e.read(I())):e.noBuffer?(a++,e()):e(o.subarray(a,++a));throw new Error("Unknown extension "+t)}case 213:return t=o[a],114==t?(a++,Z(63&o[a++],o[a++])):K(2);case 214:return K(4);case 215:return K(8);case 216:return K(16);case 217:return t=o[a++],v>=a?u.slice(a-y,(a+=t)-y):L(t);case 218:return t=h.getUint16(a),v>=(a+=2)?u.slice(a-y,(a+=t)-y):j(t);case 219:return t=h.getUint32(a),v>=(a+=4)?u.slice(a-y,(a+=t)-y):F(t);case 220:return t=h.getUint16(a),a+=2,B(t);case 221:return t=h.getUint32(a),a+=4,B(t);case 222:return t=h.getUint16(a),a+=2,z(t);case 223:return t=h.getUint32(a),a+=4,z(t);default:if(e>=224)return e-256;if(void 0===e){let e=new Error("Unexpected end of MessagePack data");throw e.incomplete=!0,e}throw new Error("Unknown MessagePack token "+e)}}}const D=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function M(e,t){function r(){if(r.count++>x){let r=e.read=new Function("r","return function(){return "+(m.freezeData?"Object.freeze":"")+"({"+e.map((e=>"__proto__"===e?"__proto_:r()":D.test(e)?e+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"})}")(I);return 0===e.highByte&&(e.read=C(t,e.read)),r()}let n={};for(let t=0,r=e.length;t<r;t++){let r=e[t];"__proto__"===r&&(r="__proto_"),n[r]=I()}return m.freezeData?Object.freeze(n):n}return r.count=0,0===e.highByte?C(t,r):r}const C=(e,t)=>function(){let r=o[a++];if(0===r)return t();let n=e<32?-(e+(r<<5)):e+(r<<5),s=c[n]||A()[n];if(!s)throw new Error("Record id is not defined for "+n);return s.read||(s.read=M(s,e)),s.read()};function A(){let e=oe((()=>(o=null,m.getStructures())));return c=m._mergeStructures(e,c)}var N=U,L=U,j=U,F=U;function U(e){let t;if(e<16&&(t=G(e)))return t;if(e>64&&n)return n.decode(o.subarray(a,a+=e));const r=a+e,s=[];for(t="";a<r;){const e=o[a++];if(128&e)if(192==(224&e)){const t=63&o[a++];s.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&o[a++],r=63&o[a++];s.push((31&e)<<12|t<<6|r)}else if(240==(248&e)){let t=(7&e)<<18|(63&o[a++])<<12|(63&o[a++])<<6|63&o[a++];t>65535&&(t-=65536,s.push(t>>>10&1023|55296),t=56320|1023&t),s.push(t)}else s.push(e);else s.push(e);s.length>=4096&&(t+=V.apply(String,s),s.length=0)}return s.length>0&&(t+=V.apply(String,s)),t}function W(e,t,r){let n=o;o=e,a=t;try{return U(r)}finally{o=n}}function B(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=I();return m.freezeData?Object.freeze(t):t}function z(e){if(m.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=X();"__proto__"===e&&(e="__proto_"),t[e]=I()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(I(),I());return t}}t.isNativeAccelerationEnabled=!1;var V=String.fromCharCode;function q(e){let t=a,r=new Array(e);for(let n=0;n<e;n++){const e=o[a++];if((128&e)>0)return void(a=t);r[n]=e}return V.apply(String,r)}function G(e){if(e<4){if(e<2){if(0===e)return"";{let e=o[a++];return(128&e)>1?void(a-=1):V(e)}}{let t=o[a++],r=o[a++];if((128&t)>0||(128&r)>0)return void(a-=2);if(e<3)return V(t,r);let n=o[a++];return(128&n)>0?void(a-=3):V(t,r,n)}}{let t=o[a++],r=o[a++],n=o[a++],s=o[a++];if((128&t)>0||(128&r)>0||(128&n)>0||(128&s)>0)return void(a-=4);if(e<6){if(4===e)return V(t,r,n,s);{let e=o[a++];return(128&e)>0?void(a-=5):V(t,r,n,s,e)}}if(e<8){let i=o[a++],l=o[a++];if((128&i)>0||(128&l)>0)return void(a-=6);if(e<7)return V(t,r,n,s,i,l);let c=o[a++];return(128&c)>0?void(a-=7):V(t,r,n,s,i,l,c)}{let i=o[a++],l=o[a++],c=o[a++],u=o[a++];if((128&i)>0||(128&l)>0||(128&c)>0||(128&u)>0)return void(a-=8);if(e<10){if(8===e)return V(t,r,n,s,i,l,c,u);{let e=o[a++];return(128&e)>0?void(a-=9):V(t,r,n,s,i,l,c,u,e)}}if(e<12){let d=o[a++],p=o[a++];if((128&d)>0||(128&p)>0)return void(a-=10);if(e<11)return V(t,r,n,s,i,l,c,u,d,p);let h=o[a++];return(128&h)>0?void(a-=11):V(t,r,n,s,i,l,c,u,d,p,h)}{let d=o[a++],p=o[a++],h=o[a++],f=o[a++];if((128&d)>0||(128&p)>0||(128&h)>0||(128&f)>0)return void(a-=12);if(e<14){if(12===e)return V(t,r,n,s,i,l,c,u,d,p,h,f);{let e=o[a++];return(128&e)>0?void(a-=13):V(t,r,n,s,i,l,c,u,d,p,h,f,e)}}{let g=o[a++],m=o[a++];if((128&g)>0||(128&m)>0)return void(a-=14);if(e<15)return V(t,r,n,s,i,l,c,u,d,p,h,f,g,m);let y=o[a++];return(128&y)>0?void(a-=15):V(t,r,n,s,i,l,c,u,d,p,h,f,g,m,y)}}}}}function H(){let e,t=o[a++];if(t<192)e=t-160;else switch(t){case 217:e=o[a++];break;case 218:e=h.getUint16(a),a+=2;break;case 219:e=h.getUint32(a),a+=4;break;default:throw new Error("Expected string")}return U(e)}function Y(e){return m.copyBuffers?Uint8Array.prototype.slice.call(o,a,a+=e):o.subarray(a,a+=e)}function K(e){let t=o[a++];if(w[t]){let r;return w[t](o.subarray(a,r=a+=e),(e=>{a=e;try{return I()}finally{a=r}}))}throw new Error("Unknown extension type "+t)}var J=new Array(4096);function X(){let e=o[a++];if(!(e>=160&&e<192))return a--,Q(I());if(e-=160,v>=a)return u.slice(a-y,(a+=e)-y);if(!(0==v&&s<180))return N(e);let t,r=4095&(e<<5^(e>1?h.getUint16(a):e>0?o[a]:0)),n=J[r],i=a,l=a+e-3,c=0;if(n&&n.bytes==e){for(;i<l;){if(t=h.getUint32(i),t!=n[c++]){i=1879048192;break}i+=4}for(l+=3;i<l;)if(t=o[i++],t!=n[c++]){i=1879048192;break}if(i===l)return a=i,n.string;l-=3,i=a}for(n=[],J[r]=n,n.bytes=e;i<l;)t=h.getUint32(i),n.push(t),i+=4;for(l+=3;i<l;)t=o[i++],n.push(t);let d=e<16?G(e):q(e);return n.string=null!=d?d:N(e)}function Q(e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return e.toString();if(null==e)return e+"";throw new Error("Invalid property type for record",typeof e)}const Z=(e,t)=>{let r=I().map(Q),n=e;void 0!==t&&(e=e<32?-((t<<5)+e):(t<<5)+e,r.highByte=t);let o=c[e];return o&&(o.isShared||O)&&((c.restoreStructures||(c.restoreStructures=[]))[e]=o),c[e]=r,r.read=M(r,n),r.read()};w[0]=()=>{},w[0].noBuffer=!0,w[66]=e=>{let t=e.length,r=BigInt(128&e[0]?e[0]-256:e[0]);for(let n=1;n<t;n++)r<<=8n,r+=BigInt(e[n]);return r};let ee={Error,TypeError,ReferenceError};w[101]=()=>{let e=I();return(ee[e[0]]||Error)(e[1],{cause:e[2]})},w[105]=e=>{if(!1===m.structuredClone)throw new Error("Structured clone extension is disabled");let t=h.getUint32(a-4);p||(p=new Map);let r,n=o[a];r=n>=144&&n<160||220==n||221==n?[]:{};let s={target:r};p.set(t,s);let i=I();return s.used?Object.assign(r,i):(s.target=i,i)},w[112]=e=>{if(!1===m.structuredClone)throw new Error("Structured clone extension is disabled");let t=h.getUint32(a-4),r=p.get(t);return r.used=!0,r.target},w[115]=()=>new Set(I());const te=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map((e=>e+"Array"));let re="object"==typeof globalThis?globalThis:window;w[116]=e=>{let t=e[0],r=te[t];if(!r){if(16===t){let t=new ArrayBuffer(e.length-1);return new Uint8Array(t).set(e.subarray(1)),t}throw new Error("Could not find typed array for code "+t)}return new re[r](Uint8Array.prototype.slice.call(e,1).buffer)},w[120]=()=>{let e=I();return new RegExp(e[0],e[1])};const ne=[];function oe(e){k&&k();let t=s,r=a,n=g,i=y,l=v,w=u,_=f,b=p,S=d,E=new Uint8Array(o.slice(0,s)),R=c,x=c.slice(0,c.length),P=m,$=O,T=e();return s=t,a=r,g=n,y=i,v=l,u=w,f=_,p=b,d=S,o=E,O=$,(c=R).splice(0,c.length,...x),m=P,h=new DataView(o.buffer,o.byteOffset,o.byteLength),T}function se(){o=null,p=null,c=null}w[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],r=a;return a+=t-e.length,d=ne,(d=[H(),H()]).position0=0,d.position1=0,d.postBundlePosition=a,a=r,I()},w[255]=e=>4==e.length?new Date(1e3*(16777216*e[0]+(e[1]<<16)+(e[2]<<8)+e[3])):8==e.length?new Date(((e[0]<<22)+(e[1]<<14)+(e[2]<<6)+(e[3]>>2))/1e6+1e3*(4294967296*(3&e[3])+16777216*e[4]+(e[5]<<16)+(e[6]<<8)+e[7])):12==e.length?new Date(((e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3])/1e6+1e3*((128&e[4]?-281474976710656:0)+1099511627776*e[6]+4294967296*e[7]+16777216*e[8]+(e[9]<<16)+(e[10]<<8)+e[11])):new Date("invalid");const ie=new Array(147);for(let e=0;e<256;e++)ie[e]=+("1e"+Math.floor(45.15-.30103*e));const ae=P;var le=new P({useRecords:!1});const ce=le.unpack,ue=le.unpackMultiple,de=le.unpack,pe={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let he,fe,ge,me=new Float32Array(1),ye=new Uint8Array(me.buffer,0,4);try{he=new TextEncoder}catch(e){}const ve="undefined"!=typeof Buffer,we=ve?function(e){return Buffer.allocUnsafeSlow(e)}:Uint8Array,_e=ve?Buffer:Uint8Array,be=ve?4294967296:2144337920;let Se,Ee,Re,ke,Oe,xe=0,Pe=null;const $e=/[\u0080-\uFFFF]/,Te=Symbol("record-id");class Ie extends P{constructor(e){let t,r,n,o;super(e),this.offset=0;let s=_e.prototype.utf8Write?function(e,t){return Se.utf8Write(e,t,4294967295)}:!(!he||!he.encodeInto)&&function(e,t){return he.encodeInto(e,Se.subarray(t)).written},i=this;e||(e={});let a=e&&e.sequential,l=e.structures||e.saveStructures,c=e.maxSharedStructures;if(null==c&&(c=l?32:0),c>8160)throw new Error("Maximum maxSharedStructure is 8160");e.structuredClone&&null==e.moreTypes&&(this.moreTypes=!0);let u=e.maxOwnStructures;null==u&&(u=l?32:64),this.structures||0==e.useRecords||(this.structures=[]);let d=c>32||u+c>64,p=c+64,h=c+u+64;if(h>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let f=[],g=0,m=0;this.pack=this.encode=function(e,s){if(Se||(Se=new we(8192),Re=Se.dataView||(Se.dataView=new DataView(Se.buffer,0,8192)),xe=0),ke=Se.length-10,ke-xe<2048?(Se=new we(Se.length),Re=Se.dataView||(Se.dataView=new DataView(Se.buffer,0,Se.length)),ke=Se.length-10,xe=0):xe=xe+7&2147483640,t=xe,s&He&&(xe+=255&s),o=i.structuredClone?new Map:null,i.bundleStrings&&"string"!=typeof e?(Pe=[],Pe.size=1/0):Pe=null,n=i.structures,n){n.uninitialized&&(n=i._mergeStructures(i.getStructures()));let e=n.sharedLength||0;if(e>c)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+n.sharedLength);if(!n.transitions){n.transitions=Object.create(null);for(let t=0;t<e;t++){let e=n[t];if(!e)continue;let r,o=n.transitions;for(let t=0,n=e.length;t<n;t++){let n=e[t];r=o[n],r||(r=o[n]=Object.create(null)),o=r}o[Te]=t+64}this.lastNamedStructuresLength=e}a||(n.nextId=e+64)}let l;r&&(r=!1);try{i.randomAccessStructure&&e&&e.constructor&&e.constructor===Object?x(e):w(e);let r=Pe;if(Pe&&Ae(t,w,0),o&&o.idsToInsert){let e=o.idsToInsert.sort(((e,t)=>e.offset>t.offset?1:-1)),n=e.length,s=-1;for(;r&&n>0;){let o=e[--n].offset+t;o<r.stringsPosition+t&&-1===s&&(s=0),o>r.position+t?s>=0&&(s+=6):(s>=0&&(Re.setUint32(r.position+t,Re.getUint32(r.position+t)+s),s=-1),r=r.previous,n++)}s>=0&&r&&Re.setUint32(r.position+t,Re.getUint32(r.position+t)+s),xe+=6*e.length,xe>ke&&R(xe),i.offset=xe;let a=function(e,t){let r,n=6*t.length,o=e.length-n;for(;r=t.pop();){let t=r.offset,s=r.id;e.copyWithin(t+n,t,o),n-=6;let i=t+n;e[i++]=214,e[i++]=105,e[i++]=s>>24,e[i++]=s>>16&255,e[i++]=s>>8&255,e[i++]=255&s,o=t}return e}(Se.subarray(t,xe),e);return o=null,a}return i.offset=xe,s&qe?(Se.start=t,Se.end=xe,Se):Se.subarray(t,xe)}catch(e){throw l=e,e}finally{if(n&&(y(),r&&i.saveStructures)){let r=n.sharedLength||0,o=Se.subarray(t,xe),a=Ne(n,i);if(!l)return!1===i.saveStructures(a,a.isCompatible)?i.pack(e,s):(i.lastNamedStructuresLength=r,Se.length>1073741824&&(Se=null),o)}Se.length>1073741824&&(Se=null),s&Ge&&(xe=t)}};const y=()=>{m<10&&m++;let e=n.sharedLength||0;if(n.length>e&&!a&&(n.length=e),g>1e4)n.transitions=null,m=0,g=0,f.length>0&&(f=[]);else if(f.length>0&&!a){for(let e=0,t=f.length;e<t;e++)f[e][Te]=0;f=[]}},v=e=>{var t=e.length;t<16?Se[xe++]=144|t:t<65536?(Se[xe++]=220,Se[xe++]=t>>8,Se[xe++]=255&t):(Se[xe++]=221,Re.setUint32(xe,t),xe+=4);for(let r=0;r<t;r++)w(e[r])},w=e=>{xe>ke&&(Se=R(xe));var r,n=typeof e;if("string"===n){let n,o=e.length;if(Pe&&o>=4&&o<4096){if((Pe.size+=o)>21760){let e,r,n=(Pe[0]?3*Pe[0].length+Pe[1].length:0)+10;xe+n>ke&&(Se=R(xe+n)),Pe.position?(r=Pe,Se[xe]=200,xe+=3,Se[xe++]=98,e=xe-t,xe+=4,Ae(t,w,0),Re.setUint16(e+t-3,xe-t-e)):(Se[xe++]=214,Se[xe++]=98,e=xe-t,xe+=4),Pe=["",""],Pe.previous=r,Pe.size=0,Pe.position=e}let r=$e.test(e);return Pe[r?0:1]+=e,Se[xe++]=193,void w(r?-o:o)}n=o<32?1:o<256?2:o<65536?3:5;let i=3*o;if(xe+i>ke&&(Se=R(xe+i)),o<64||!s){let t,s,i,a=xe+n;for(t=0;t<o;t++)s=e.charCodeAt(t),s<128?Se[a++]=s:s<2048?(Se[a++]=s>>6|192,Se[a++]=63&s|128):55296==(64512&s)&&56320==(64512&(i=e.charCodeAt(t+1)))?(s=65536+((1023&s)<<10)+(1023&i),t++,Se[a++]=s>>18|240,Se[a++]=s>>12&63|128,Se[a++]=s>>6&63|128,Se[a++]=63&s|128):(Se[a++]=s>>12|224,Se[a++]=s>>6&63|128,Se[a++]=63&s|128);r=a-xe-n}else r=s(e,xe+n);r<32?Se[xe++]=160|r:r<256?(n<2&&Se.copyWithin(xe+2,xe+1,xe+1+r),Se[xe++]=217,Se[xe++]=r):r<65536?(n<3&&Se.copyWithin(xe+3,xe+2,xe+2+r),Se[xe++]=218,Se[xe++]=r>>8,Se[xe++]=255&r):(n<5&&Se.copyWithin(xe+5,xe+3,xe+3+r),Se[xe++]=219,Re.setUint32(xe,r),xe+=4),xe+=r}else if("number"===n)if(e>>>0===e)e<32||e<128&&!1===this.useRecords||e<64&&!this.randomAccessStructure?Se[xe++]=e:e<256?(Se[xe++]=204,Se[xe++]=e):e<65536?(Se[xe++]=205,Se[xe++]=e>>8,Se[xe++]=255&e):(Se[xe++]=206,Re.setUint32(xe,e),xe+=4);else if((0|e)===e)e>=-32?Se[xe++]=256+e:e>=-128?(Se[xe++]=208,Se[xe++]=e+256):e>=-32768?(Se[xe++]=209,Re.setInt16(xe,e),xe+=2):(Se[xe++]=210,Re.setInt32(xe,e),xe+=4);else{let t;if((t=this.useFloat32)>0&&e<4294967296&&e>=-2147483648){let r;if(Se[xe++]=202,Re.setFloat32(xe,e),t<4||(0|(r=e*ie[(127&Se[xe])<<1|Se[xe+1]>>7]))===r)return void(xe+=4);xe--}Se[xe++]=203,Re.setFloat64(xe,e),xe+=8}else if("object"===n||"function"===n)if(e){if(o){let r=o.get(e);if(r){if(!r.id){let e=o.idsToInsert||(o.idsToInsert=[]);r.id=e.push(r)}return Se[xe++]=214,Se[xe++]=112,Re.setUint32(xe,r.id),void(xe+=4)}o.set(e,{offset:xe-t})}let s=e.constructor;if(s===Object)E(e);else if(s===Array)v(e);else if(s===Map)if(this.mapAsEmptyObject)Se[xe++]=128;else{(r=e.size)<16?Se[xe++]=128|r:r<65536?(Se[xe++]=222,Se[xe++]=r>>8,Se[xe++]=255&r):(Se[xe++]=223,Re.setUint32(xe,r),xe+=4);for(let[t,r]of e)w(t),w(r)}else{for(let t=0,r=fe.length;t<r;t++)if(e instanceof ge[t]){let r=fe[t];if(r.write){r.type&&(Se[xe++]=212,Se[xe++]=r.type,Se[xe++]=0);let t=r.write.call(this,e);return void(t===e?Array.isArray(e)?v(e):E(e):w(t))}let n,o=Se,s=Re,i=xe;Se=null;try{n=r.pack.call(this,e,(e=>(Se=o,o=null,xe+=e,xe>ke&&R(xe),{target:Se,targetView:Re,position:xe-e})),w)}finally{o&&(Se=o,Re=s,xe=i,ke=Se.length-10)}return void(n&&(n.length+xe>ke&&R(n.length+xe),xe=Ce(n,Se,xe,r.type)))}if(Array.isArray(e))v(e);else{if(e.toJSON){const t=e.toJSON();if(t!==e)return w(t)}if("function"===n)return w(this.writeFunction&&this.writeFunction(e));E(e)}}}else Se[xe++]=192;else if("boolean"===n)Se[xe++]=e?195:194;else if("bigint"===n){if(e<BigInt(1)<<BigInt(63)&&e>=-(BigInt(1)<<BigInt(63)))Se[xe++]=211,Re.setBigInt64(xe,e);else if(e<BigInt(1)<<BigInt(64)&&e>0)Se[xe++]=207,Re.setBigUint64(xe,e);else{if(!this.largeBigIntToFloat){if(this.useBigIntExtension&&e<2n**1023n&&e>-(2n**1023n)){Se[xe++]=199,xe++,Se[xe++]=66;let t,r=[];do{let n=0xffn&e;t=(0x80n&n)===(e<0n?0x80n:0n),r.push(n),e>>=8n}while(0n!==e&&-1n!==e||!t);Se[xe-2]=r.length;for(let e=r.length;e>0;)Se[xe++]=Number(r[--e]);return}throw new RangeError(e+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension or set largeBigIntToFloat to convert to float-64")}Se[xe++]=203,Re.setFloat64(xe,Number(e))}xe+=8}else{if("undefined"!==n)throw new Error("Unknown type: "+n);this.encodeUndefinedAsNil?Se[xe++]=192:(Se[xe++]=212,Se[xe++]=0,Se[xe++]=0)}},_=this.variableMapSize||this.coercibleKeyAsNumber?e=>{let t,r=Object.keys(e),n=r.length;if(n<16?Se[xe++]=128|n:n<65536?(Se[xe++]=222,Se[xe++]=n>>8,Se[xe++]=255&n):(Se[xe++]=223,Re.setUint32(xe,n),xe+=4),this.coercibleKeyAsNumber)for(let o=0;o<n;o++){t=r[o];let n=Number(t);w(isNaN(n)?t:n),w(e[t])}else for(let o=0;o<n;o++)w(t=r[o]),w(e[t])}:e=>{Se[xe++]=222;let r=xe-t;xe+=2;let n=0;for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&(w(t),w(e[t]),n++);Se[r+++t]=n>>8,Se[r+t]=255&n},b=!1===this.useRecords?_:e.progressiveRecords&&!d?e=>{let r,o,s=n.transitions||(n.transitions=Object.create(null)),i=xe++-t;for(let a in e)if("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(a)){if(r=s[a],r)s=r;else{let l=Object.keys(e),c=s;s=n.transitions;let u=0;for(let e=0,t=l.length;e<t;e++){let t=l[e];r=s[t],r||(r=s[t]=Object.create(null),u++),s=r}i+t+1==xe?(xe--,k(s,l,u)):O(s,l,i,u),o=!0,s=c[a]}w(e[a])}if(!o){let r=s[Te];r?Se[i+t]=r:O(s,Object.keys(e),i,0)}}:e=>{let t,r=n.transitions||(n.transitions=Object.create(null)),o=0;for(let n in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(n))&&(t=r[n],t||(t=r[n]=Object.create(null),o++),r=t);let s=r[Te];s?s>=96&&d?(Se[xe++]=96+(31&(s-=96)),Se[xe++]=s>>5):Se[xe++]=s:k(r,r.__keys__||Object.keys(e),o);for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&w(e[t])},S="function"==typeof this.useRecords&&this.useRecords,E=S?e=>{S(e)?b(e):_(e)}:b,R=e=>{let r;if(e>16777216){if(e-t>be)throw new Error("Packed buffer would be larger than maximum buffer size");r=Math.min(be,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,Se.length-1)>>12)<<12;let n=new we(r);return Re=n.dataView||(n.dataView=new DataView(n.buffer,0,r)),e=Math.min(e,Se.length),Se.copy?Se.copy(n,0,t,e):n.set(Se.slice(t,e)),xe-=t,t=0,ke=n.length-10,Se=n},k=(e,t,o)=>{let s=n.nextId;s||(s=64),s<p&&this.shouldShareStructure&&!this.shouldShareStructure(t)?(s=n.nextOwnId,s<h||(s=p),n.nextOwnId=s+1):(s>=h&&(s=p),n.nextId=s+1);let i=t.highByte=s>=96&&d?s-96>>5:-1;e[Te]=s,e.__keys__=t,n[s-64]=t,s<p?(t.isShared=!0,n.sharedLength=s-63,r=!0,i>=0?(Se[xe++]=96+(31&s),Se[xe++]=i):Se[xe++]=s):(i>=0?(Se[xe++]=213,Se[xe++]=114,Se[xe++]=96+(31&s),Se[xe++]=i):(Se[xe++]=212,Se[xe++]=114,Se[xe++]=s),o&&(g+=m*o),f.length>=u&&(f.shift()[Te]=0),f.push(e),w(t))},O=(e,r,n,o)=>{let s=Se,i=xe,a=ke,l=t;Se=Ee,xe=0,t=0,Se||(Ee=Se=new we(8192)),ke=Se.length-10,k(e,r,o),Ee=Se;let c=xe;if(Se=s,xe=i,ke=a,t=l,c>1){let e=xe+c-1;e>ke&&R(e);let r=n+t;Se.copyWithin(r+c,r+1,xe),Se.set(Ee.slice(0,c),r),xe=e}else Se[n+t]=Ee[0]},x=e=>{let o=Oe(e,Se,t,xe,n,R,((e,t,n)=>{if(n)return r=!0;xe=t;let o=Se;return w(e),y(),o!==Se?{position:xe,targetView:Re,target:Se}:xe}),this);if(0===o)return E(e);xe=o}}useBuffer(e){Se=e,Re=new DataView(Se.buffer,Se.byteOffset,Se.byteLength),xe=0}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}function De(e,t,r,n){let o=e.byteLength;if(o+1<256){var{target:s,position:i}=r(4+o);s[i++]=199,s[i++]=o+1}else if(o+1<65536){var{target:s,position:i}=r(5+o);s[i++]=200,s[i++]=o+1>>8,s[i++]=o+1&255}else{var{target:s,position:i,targetView:a}=r(7+o);s[i++]=201,a.setUint32(i,o+1),i+=4}s[i++]=116,s[i++]=t,e.buffer||(e=new Uint8Array(e)),s.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i)}function Me(e,t){let r=e.byteLength;var n,o;if(r<256){var{target:n,position:o}=t(r+2);n[o++]=196,n[o++]=r}else if(r<65536){var{target:n,position:o}=t(r+3);n[o++]=197,n[o++]=r>>8,n[o++]=255&r}else{var{target:n,position:o,targetView:s}=t(r+5);n[o++]=198,s.setUint32(o,r),o+=4}n.set(e,o)}function Ce(e,t,r,n){let o=e.length;switch(o){case 1:t[r++]=212;break;case 2:t[r++]=213;break;case 4:t[r++]=214;break;case 8:t[r++]=215;break;case 16:t[r++]=216;break;default:o<256?(t[r++]=199,t[r++]=o):o<65536?(t[r++]=200,t[r++]=o>>8,t[r++]=255&o):(t[r++]=201,t[r++]=o>>24,t[r++]=o>>16&255,t[r++]=o>>8&255,t[r++]=255&o)}return t[r++]=n,t.set(e,r),r+o}function Ae(e,t,r){if(Pe.length>0){Re.setUint32(Pe.position+e,xe+r-Pe.position-e),Pe.stringsPosition=xe-e;let n=Pe;Pe=null,t(n[0]),t(n[1])}}function Ne(e,t){return e.isCompatible=e=>{let r=!e||(t.lastNamedStructuresLength||0)===e.length;return r||t._mergeStructures(e),r},e}ge=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,b],fe=[{pack(e,t,r){let n=e.getTime()/1e3;if((this.useTimestamp32||0===e.getMilliseconds())&&n>=0&&n<4294967296){let{target:e,targetView:r,position:o}=t(6);e[o++]=214,e[o++]=255,r.setUint32(o,n)}else if(n>0&&n<4294967296){let{target:r,targetView:o,position:s}=t(10);r[s++]=215,r[s++]=255,o.setUint32(s,4e6*e.getMilliseconds()+(n/1e3/4294967296|0)),o.setUint32(s+4,n)}else if(isNaN(n)){if(this.onInvalidDate)return t(0),r(this.onInvalidDate());let{target:e,targetView:n,position:o}=t(3);e[o++]=212,e[o++]=255,e[o++]=255}else{let{target:r,targetView:o,position:s}=t(15);r[s++]=199,r[s++]=12,r[s++]=255,o.setUint32(s,1e6*e.getMilliseconds()),o.setBigInt64(s+4,BigInt(Math.floor(n)))}}},{pack(e,t,r){if(this.setAsEmptyObject)return t(0),r({});let n=Array.from(e),{target:o,position:s}=t(this.moreTypes?3:0);this.moreTypes&&(o[s++]=212,o[s++]=115,o[s++]=0),r(n)}},{pack(e,t,r){let{target:n,position:o}=t(this.moreTypes?3:0);this.moreTypes&&(n[o++]=212,n[o++]=101,n[o++]=0),r([e.name,e.message,e.cause])}},{pack(e,t,r){let{target:n,position:o}=t(this.moreTypes?3:0);this.moreTypes&&(n[o++]=212,n[o++]=120,n[o++]=0),r([e.source,e.flags])}},{pack(e,t){this.moreTypes?De(e,16,t):Me(ve?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let r=e.constructor;r!==_e&&this.moreTypes?De(e,te.indexOf(r.name),t):Me(e,t)}},{pack(e,t){let{target:r,position:n}=t(1);r[n]=193}}];let Le=new Ie({useRecords:!1});const je=Le.pack,Fe=Le.pack,Ue=Ie,{NEVER:We,ALWAYS:Be,DECIMAL_ROUND:ze,DECIMAL_FIT:Ve}=pe,qe=512,Ge=1024,He=2048,Ye=["num","object","string","ascii"];Ye[16]="date";const Ke=[!1,!0,!0,!1,!1,!0,!0,!1];let Je,Xe;try{new Function(""),Je=!0}catch(e){}const Qe="undefined"!=typeof Buffer;let Ze,et;try{Ze=new TextEncoder}catch(e){}const tt=Qe?function(e,t,r){return e.utf8Write(t,r,4294967295)}:!(!Ze||!Ze.encodeInto)&&function(e,t,r){return Ze.encodeInto(t,e.subarray(r)).written};var rt;function nt(e,t,r,n){let o;return(o=e.ascii8||e.num8)?(r.setInt8(t,n,!0),Xe=t+1,o):(o=e.string16||e.object16)?(r.setInt16(t,n,!0),Xe=t+2,o):(o=e.num32)?(r.setUint32(t,3758096640+n,!0),Xe=t+4,o):(o=e.num64)?(r.setFloat64(t,NaN,!0),r.setInt8(t,n),Xe=t+8,o):void(Xe=t)}function ot(e,t,r){let n=Ye[t]+(r<<3),o=e[n]||(e[n]=Object.create(null));return o.__type=t,o.__size=r,o.__parent=e,o}rt=function e(t,r,n,o,s,i,a,l){let c=l.typedStructs||(l.typedStructs=[]),u=r.dataView,d=(c.lastStringStart||100)+o,p=r.length-10,h=o;o>p&&(u=(r=i(o)).dataView,o-=n,h-=n,d-=n,n=0,p=r.length-10);let f,g=d,m=c.transitions||(c.transitions=Object.create(null)),y=c.nextId||c.length,v=y<15?1:y<240?2:y<61440?3:y<15728640?4:0;if(0===v)return 0;o+=v;let w,_=[],b=0;for(let e in t){let s=t[e],l=m[e];switch(l||(m[e]=l={key:e,parent:m,enumerationOffset:0,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null,date64:null}),o>p&&(u=(r=i(o)).dataView,o-=n,h-=n,d-=n,g-=n,n=0,p=r.length-10),typeof s){case"number":let t=s;if(y<200||!l.num64){if((0|t)===t&&t<536870912&&t>-520093696){t<246&&t>=0&&(l.num8&&!(y>200&&l.num32)||t<32&&!l.num32)?(m=l.num8||ot(l,0,1),r[o++]=t):(m=l.num32||ot(l,0,4),u.setUint32(o,t,!0),o+=4);break}if(t<4294967296&&t>=-2147483648&&(u.setFloat32(o,t,!0),Ke[r[o+3]>>>5])){let e;if((0|(e=t*ie[(127&r[o+3])<<1|r[o+2]>>7]))===e){m=l.num32||ot(l,0,4),o+=4;break}}}m=l.num64||ot(l,0,8),u.setFloat64(o,t,!0),o+=8;break;case"string":let v,S=s.length;if(f=g-d,(S<<2)+g>p&&(u=(r=i((S<<2)+g)).dataView,o-=n,h-=n,d-=n,g-=n,n=0,p=r.length-10),S>65280+f>>2){_.push(e,s,o-h);break}let E=g;if(S<64){let e,t,n;for(e=0;e<S;e++)t=s.charCodeAt(e),t<128?r[g++]=t:t<2048?(v=!0,r[g++]=t>>6|192,r[g++]=63&t|128):55296==(64512&t)&&56320==(64512&(n=s.charCodeAt(e+1)))?(v=!0,t=65536+((1023&t)<<10)+(1023&n),e++,r[g++]=t>>18|240,r[g++]=t>>12&63|128,r[g++]=t>>6&63|128,r[g++]=63&t|128):(v=!0,r[g++]=t>>12|224,r[g++]=t>>6&63|128,r[g++]=63&t|128)}else g+=tt(r,s,g),v=g-E>S;if(f<160||f<246&&(l.ascii8||l.string8)){if(v)(m=l.string8)||(c.length>10&&(m=l.ascii8)?(m.__type=2,l.ascii8=null,l.string8=m,a(null,0,!0)):m=ot(l,2,1));else{if(0===f&&!w){w=!0,m=l.ascii0||ot(l,3,0);break}(m=l.ascii8)||c.length>10&&(m=l.string8)||(m=ot(l,3,1))}r[o++]=f}else m=l.string16||ot(l,2,2),u.setUint16(o,f,!0),o+=2;break;case"object":if(s){s.constructor===Date?(m=l.date64||ot(l,16,8),u.setFloat64(o,s.getTime(),!0),o+=8):_.push(e,s,b);break}l=nt(l,o,u,-10),l?(m=l,o=Xe):_.push(e,s,b);break;case"boolean":m=l.num8||l.ascii8||ot(l,0,1),r[o++]=s?249:248;break;case"undefined":l=nt(l,o,u,-9),l?(m=l,o=Xe):_.push(e,s,b);break;default:_.push(e,s,b)}b++}for(let e=0,t=_.length;e<t;){let t,s=_[e++],i=_[e++],l=_[e++],c=m[s];if(c||(m[s]=c={key:s,parent:m,enumerationOffset:l-b,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null}),i){let e;f=g-d,f<65280?(m=c.object16,m?e=2:(m=c.object32)?e=4:(m=ot(c,1,2),e=2)):(m=c.object32||ot(c,1,4),e=4),t=a(i,g),"object"==typeof t?(g=t.position,u=t.targetView,r=t.target,d-=n,o-=n,h-=n,n=0):g=t,2===e?(u.setUint16(o,f,!0),o+=2):(u.setUint32(o,f,!0),o+=4)}else m=c.object16||ot(c,1,2),u.setInt16(o,null===i?-10:-9,!0),o+=2;b++}let S=m[Te];if(null==S){S=l.typedStructs.length;let e,t,r=[],n=m;for(;void 0!==(t=n.__type);){let o=n.__size;n=n.__parent,e=n.key;let s=[t,o,e];n.enumerationOffset&&s.push(n.enumerationOffset),r.push(s),n=n.parent}r.reverse(),m[Te]=S,l.typedStructs[S]=r,a(null,0,!0)}switch(v){case 1:if(S>=16)return 0;r[h]=S+32;break;case 2:if(S>=256)return 0;r[h]=56,r[h+1]=S;break;case 3:if(S>=65536)return 0;r[h]=57,u.setUint16(h+1,S,!0);break;case 4:if(S>=16777216)return 0;u.setUint32(h,58+(S<<8),!0)}if(o<d){if(d===g)return o;r.copyWithin(o,d,g),g+=o-d,c.lastStringStart=o-h}else if(o>d)return d===g?o:(c.lastStringStart=o-h,e(t,r,n,h,s,i,a,l));return g},Oe=rt,Ne=function(e,t){if(t.typedStructs){let r=new Map;r.set("named",e),r.set("typed",t.typedStructs),e=r}let r=t.lastTypedStructuresLength||0;return e.isCompatible=e=>{let n=!0;return e instanceof Map?((e.get("named")||[]).length!==(t.lastNamedStructuresLength||0)&&(n=!1),(e.get("typed")||[]).length!==r&&(n=!1)):(e instanceof Array||Array.isArray(e))&&e.length!==(t.lastNamedStructuresLength||0)&&(n=!1),n||t._mergeStructures(e),n},t.lastTypedStructuresLength=t.typedStructs&&t.typedStructs.length,e};var st=Symbol.for("source");function it(e){switch(e){case 246:return null;case 247:return;case 248:return!1;case 249:return!0}throw new Error("Unknown constant")}function at(e){return function(){return e(this[st])}}E=function(e,t,r,n){let o=e[t++]-32;if(o>=24)switch(o){case 24:o=e[t++];break;case 25:o=e[t++]+(e[t++]<<8);break;case 26:o=e[t++]+(e[t++]<<8)+(e[t++]<<16);break;case 27:o=e[t++]+(e[t++]<<8)+(e[t++]<<16)+(e[t++]<<24)}let s=n.typedStructs&&n.typedStructs[o];if(!s){if(e=Uint8Array.prototype.slice.call(e,t,r),r-=t,t=0,n._mergeStructures(n.getStructures()),!n.typedStructs)throw new Error("Could not find any shared typed structures");if(n.lastTypedStructuresLength=n.typedStructs.length,s=n.typedStructs[o],!s)throw new Error("Could not find typed structure "+o)}var i=s.construct;if(!i){var a=(i=s.construct=function(){}).prototype;let e,t=[],r=0;for(let o=0,i=s.length;o<i;o++){let i=s[o],[a,l,c,u]=i;"__proto__"===c&&(c="__proto_");let d,p,h={key:c,offset:r};switch(u?t.splice(o+u,0,h):t.push(h),l){case 0:d=()=>0;break;case 1:d=(e,t)=>{let r=e.bytes[t+h.offset];return r>=246?it(r):r};break;case 2:d=(e,t)=>{let r=e.bytes,n=(r.dataView||(r.dataView=new DataView(r.buffer,r.byteOffset,r.byteLength))).getUint16(t+h.offset,!0);return n>=65280?it(255&n):n};break;case 4:d=(e,t)=>{let r=e.bytes,n=(r.dataView||(r.dataView=new DataView(r.buffer,r.byteOffset,r.byteLength))).getUint32(t+h.offset,!0);return n>=4294967040?it(255&n):n}}switch(h.getRef=d,r+=l,a){case 3:e&&!e.next&&(e.next=h),e=h,h.multiGetCount=0,p=function(e){let t=e.bytes,n=e.position,o=r+n,s=d(e,n);if("number"!=typeof s)return s;let i,a=h.next;for(;a&&(i=a.getRef(e,n),"number"!=typeof i);)i=null,a=a.next;return null==i&&(i=e.bytesEnd-o),e.srcString?e.srcString.slice(s,i):W(t,s+o,i-s)};break;case 2:case 1:e&&!e.next&&(e.next=h),e=h,p=function(e){let t=e.position,o=r+t,s=d(e,t);if("number"!=typeof s)return s;let i,l=e.bytes,c=h.next;for(;c&&(i=c.getRef(e,t),"number"!=typeof i);)i=null,c=c.next;if(null==i&&(i=e.bytesEnd-o),2===a)return l.toString("utf8",s+o,i+o);et=e;try{return n.unpack(l,{start:s+o,end:i+o})}finally{et=null}};break;case 0:switch(l){case 4:p=function(e){let t=e.bytes,r=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength)),n=e.position+h.offset,o=r.getInt32(n,!0);if(o<536870912){if(o>-520093696)return o;if(o>-536870912)return it(255&o)}let s=r.getFloat32(n,!0),i=ie[(127&t[n+3])<<1|t[n+2]>>7];return(i*s+(s>0?.5:-.5)|0)/i};break;case 8:p=function(e){let t=e.bytes,r=(t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))).getFloat64(e.position+h.offset,!0);if(isNaN(r)){let r=t[e.position+h.offset];if(r>=246)return it(r)}return r};break;case 1:p=function(e){let t=e.bytes[e.position+h.offset];return t<246?t:it(t)}}break;case 16:p=function(e){let t=e.bytes,r=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength));return new Date(r.getFloat64(e.position+h.offset,!0))}}h.get=p}if(Je){let e,r=[],o=[],s=0;for(let i of t){if(n.alwaysLazyProperty&&n.alwaysLazyProperty(i.key)){e=!0;continue}Object.defineProperty(a,i.key,{get:at(i.get),enumerable:!0});let t="v"+s++;o.push(t),r.push("["+JSON.stringify(i.key)+"]:"+t+"(s)")}e&&r.push("__proto__:this");let i=new Function(...o,"return function(s){return{"+r.join(",")+"}}").apply(null,t.map((e=>e.get)));Object.defineProperty(a,"toJSON",{value(e){return i.call(this,this[st])}})}else Object.defineProperty(a,"toJSON",{value(e){let r={};for(let e=0,n=t.length;e<n;e++){let n=t[e].key;r[n]=this[n]}return r}})}var l=new i;return l[st]={bytes:e,position:t,srcString:"",bytesEnd:r},l},R=function(e){if(!(e instanceof Map))return e;let t=e.get("typed")||[];Object.isFrozen(t)&&(t=t.map((e=>e.slice(0))));let r=e.get("named"),n=Object.create(null);for(let e=0,r=t.length;e<r;e++){let r=t[e],o=n;for(let[e,t,n]of r){let r=o[n];r||(o[n]=r={key:n,parent:o,enumerationOffset:0,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null,date64:null}),o=ot(r,e,t)}o[Te]=e}return t.transitions=n,this.typedStructs=t,this.lastTypedStructuresLength=t.length,r},k=function(){et&&(et.bytes=Uint8Array.prototype.slice.call(et.bytes,et.position,et.bytesEnd),et.position=0,et.bytesEnd=et.bytes.length)};class lt extends i.Transform{constructor(e){e||(e={}),e.writableObjectMode=!0,super(e),e.sequential=!0,this.packr=e.packr||new Ie(e)}_transform(e,t,r){this.push(this.packr.pack(e)),r()}}class ct extends i.Transform{constructor(e){e||(e={}),e.objectMode=!0,super(e),e.structures=[],this.unpackr=e.unpackr||new P(e)}_transform(e,t,r){let n;this.incompleteBuffer&&(e=Buffer.concat([this.incompleteBuffer,e]),this.incompleteBuffer=null);try{n=this.unpackr.unpackMultiple(e)}catch(t){if(!t.incomplete)throw t;this.incompleteBuffer=e.slice(t.lastPosition),n=t.values}finally{for(let e of n||[])null===e&&(e=this.getNullValue()),this.push(e)}r&&r()}getNullValue(){return Symbol.for(null)}}if(void 0===process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED||"true"!==process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED.toLowerCase()){let e;try{e=r(241),e&&function(e){function r(t){return function(r){let n=f[g++];if(null==n){if(d)return U(r);let i=o.byteOffset,c=e(a-t+i,s+i,o.buffer);if("string"==typeof c)n=c,f=l;else if(g=1,v=1,n=(f=c)[0],void 0===n)throw new Error("Unexpected end of buffer")}let i=n.length;return i<=r?(a+=r,n):(u=n,y=a,v=a+i,a+=r,n.slice(0,r))}}t.isNativeAccelerationEnabled=!0,N=r(1),L=r(2),j=r(3),F=r(5)}(e.extractStrings)}catch(e){}}t.ALWAYS=Be,t.C1=S,t.DECIMAL_FIT=Ve,t.DECIMAL_ROUND=ze,t.Decoder=ae,t.DecoderStream=ct,t.Encoder=Ue,t.EncoderStream=lt,t.FLOAT32_OPTIONS=pe,t.NEVER=We,t.Packr=Ie,t.PackrStream=lt,t.Unpackr=P,t.UnpackrStream=ct,t.addExtension=function(e){if(e.Class){if(!e.pack&&!e.write)throw new Error("Extension has no pack or write function");if(e.pack&&!e.type)throw new Error("Extension has no type (numeric code to identify the extension)");ge.unshift(e.Class),fe.unshift(e)}!function(e){e.unpack?w[e.type]=e.unpack:w[e.type]=e}(e)},t.clearSource=se,t.decode=de,t.decodeIter=function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new P(t);let n;const o=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.unpackMultiple(e)}catch(r){if(!r.incomplete)throw r;n=e.slice(r.lastPosition),t=r.values}return t};return"function"==typeof e[Symbol.iterator]?function*(){for(const t of e)yield*o(t)}():"function"==typeof e[Symbol.asyncIterator]?async function*(){for await(const t of e)yield*o(t)}():void 0},t.encode=Fe,t.encodeIter=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new Ie(t);for(const t of e)yield r.pack(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new Ie(t);for await(const t of e)yield r.pack(t)}(e,t);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable")},t.mapsAsObjects=!0,t.pack=je,t.roundFloat32=function(e){me[0]=e;let t=ie[(127&ye[3])<<1|ye[2]>>7];return(t*e+(e>0?.5:-.5)|0)/t},t.unpack=ce,t.unpackMultiple=ue,t.useRecords=!1},2173:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://rstudio.com/rstudio.state.json","$schema":"http://json-schema.org/draft-07/schema#","title":"RStudio User State","type":"object","properties":{"general":{"type":"object","properties":{"ignoredUpdateVersions":{"type":"array","description":"A list of ignored updates. Ignored updates will not trigger an available update.","items":{"type":"string"}}},"default":{"ignoredUpdateVersions":[],"clipboardMonitoring":true}},"font":{"type":"object","properties":{"proportionalFont":{"type":"string"},"fixedWidthFont":{"type":"string"}},"description":"Font options from the Appearance category","default":{"proportionalFont":"","fixedWidthFont":""}},"view":{"type":"object","properties":{"zoomLevel":{"type":"number","description":"UI zoom level, 1.0 == 100%","minimum":0.25,"maximum":5},"windowBounds":{"type":"object","description":"Window location and size","properties":{"width":{"type":"number"},"height":{"type":"number"},"x":{"type":"number"},"y":{"type":"number"},"maximized":{"type":"boolean"}}},"accessibility":{"type":"boolean","description":"Screen reader support"},"disableRendererAccessibility":{"type":"boolean","description":"Disable Electron accessibility support"}},"default":{"zoomLevel":1,"windowBounds":{"width":1200,"height":900,"x":0,"y":0,"maximized":false},"accessibility":false,"disableRendererAccessibility":false}},"remote_session":{"type":"object","properties":{"lastRemoteSessionUrl":{"type":"string"},"authCookies":{"type":"array","items":{"type":"string"}},"tempAuthCookies":{"type":"array","items":{"type":"string"}}},"default":{"lastRemoteSessionUrl":"","authCookies":[],"tempAuthCookies":[]}},"renderer":{"type":"object","properties":{"engine":{"type":"string","enum":["auto","desktop","gles","software"]},"useGpuExclusionList":{"type":"boolean"},"useGpuDriverBugWorkarounds":{"type":"boolean"}},"default":{"engine":"auto","useGpuExclusionList":true,"useGpuDriverBugWorkarounds":true}},"platform":{"type":"object","properties":{"windows":{"type":"object","properties":{"rBinDir":{"type":"string"},"preferR64":{"type":"boolean"}}},"macos":{"type":"object","properties":{"checkForRosetta":{"type":"boolean","default":true,"description":"Whether to check for a Rosetta 2 installation on Apple Silicon Macs."}}}},"default":{"windows":{"rBinDir":"","preferR64":true,"rExecutablePath":""},"macos":{"checkForRosetta":true}}},"context_id":{"type":"string","default":"","description":"A unique identifier representing the user and machine."},"auto_created_profile":{"type":"boolean","default":false,"description":"Whether we have automatically created an .Rprofile for this user."},"theme":{"type":"object","properties":{"name":{"type":"string","description":"The name of the theme."},"url":{"type":"string","description":"The relative path/URL to the theme."},"isDark":{"type":"boolean","description":"Whether the theme should be treated as a dark theme."}},"default":{"name":"Textmate (default)","url":"theme/default/textmate.rstheme","isDark":false},"description":"The color theme to apply."},"default_project_location":{"type":"string","default":"","description":"The directory path under which to place new projects by default. Shadows a uipref."},"clear_hidden":{"type":"boolean","default":true,"description":"Whether to clear hidden objects along with visible objects when clearing the workspace. Set automatically to remember last action."},"export_plot_options":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"format":{"type":"string"},"keepRatio":{"type":"boolean"},"viewAfterSave":{"type":"boolean"},"copyAsMetafile":{"type":"boolean"}},"default":{"width":550,"height":450,"keepRatio":false,"format":"PNG","viewAfterSave":false,"copyAsMetafile":false},"description":"The most recently used plot export options."},"export_viewer_options":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"format":{"type":"string"},"keepRatio":{"type":"boolean"},"viewAfterSave":{"type":"boolean"},"copyAsMetafile":{"type":"boolean"}},"default":{},"description":"The most recently used viewer export options."},"save_plot_as_pdf_options":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"portrait":{"type":"boolean"},"cairo_pdf":{"type":"boolean"},"viewAfterSave":{"type":"boolean"}},"default":{},"description":"The most recently used options for saving a plot as a PDF."},"compile_r_notebook_prefs":{"type":"object","properties":{"author":{"type":"string"},"type":{"type":"string","enum":["default","stitch","spin"]}},"default":{},"description":"Most recently used settings for compiling a notebook from an R script."},"compile_r_markdown_notebook_prefs":{"type":"object","properties":{"format":{"type":"string","enum":["html_document","pdf_document","word_document"]}},"default":{"format":"html_document"},"description":"Most recently used settings for compiling a notebook using R Markdown."},"show_publish_ui":{"type":"boolean","default":true,"description":"Whether to show UI for publishing content."},"enable_rsconnect_publish_ui":{"type":"boolean","default":true,"description":"Whether to show UI for publishing content to Posit Connect."},"publish_account":{"type":"object","default":{"name":"","server":""},"properties":{"name":{"type":"string"},"server":{"type":"string"}},"description":"The default (last) account used for publishing"},"document_outline_width":{"type":"integer","default":110,"description":"The preferred width, in pixels, of the document outline pane."},"connect_via":{"type":"string","enum":["connect-r-console","connect-new-r-script","connect-new-r-notebook","connect-copy-to-clipboard"],"default":"connect-r-console","description":"How to create new connections to data sources."},"error_handler_type":{"type":"string","enum":["message","traceback","break","notebook","custom"],"default":"traceback","description":"The kind of handler to invoke when errors occur."},"using_mingw_gcc49":{"type":"boolean","default":false,"description":"Whether or not the MinGW compiler with GCC 4.9 is used."},"visual_mode_confirmed":{"type":"boolean","default":false,"description":"Whether or not the use of Visual Mode has been confirmed."},"bibliography_default_type":{"type":"string","enum":["bib","yaml","json"],"default":"bib","description":"The default type for new bibliographies."},"citation_default_in_text":{"type":"boolean","default":false,"description":"The default style for inserting citations."},"zotero_connection_type":{"type":"string","enum":["auto","none","local","web"],"default":"auto","title":"Zotero connection type","description":"Zotero connection type (local or web)"},"zotero_use_better_bibtex":{"type":"boolean","default":false,"title":"Use Better BibTeX for citation keys and BibTeX export","description":"Whether to use Better BibTeX when suggesting citation keys and writing citations to BibTeX bibliographies"},"zotero_api_key":{"type":"string","default":"","title":"Zotero API Key","description":"Key for making Zotero API calls"},"zotero_data_dir":{"type":"string","default":"","title":"Zotero Data Directory","description":"Directory containing Zotero data files"},"quarto_website_sync_editor":{"type":"boolean","default":false,"title":"Quarto Website Sync Editor","description":"Sync source editor to Quarto website preview navigation."}}}')},4775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:e=>{"use strict";e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')},9551:e=>{"use strict";e.exports=JSON.parse('{"name":"node-gyp-build-optional-packages","version":"5.0.7","description":"Build tool and bindings loader for node-gyp that supports prebuilds","main":"index.js","devDependencies":{"array-shuffle":"^1.0.1","standard":"^14.0.0","tape":"^5.0.0"},"scripts":{"test":"standard && node test"},"bin":{"node-gyp-build-optional-packages":"./bin.js","node-gyp-build-optional-packages-optional":"./optional.js","node-gyp-build-optional-packages-test":"./build-test.js"},"repository":{"type":"git","url":"https://github.com/prebuild/node-gyp-build.git"},"author":"Mathias Buus (@mafintosh)","license":"MIT","bugs":{"url":"https://github.com/prebuild/node-gyp-build/issues"},"homepage":"https://github.com/prebuild/node-gyp-build"}')},2561:e=>{"use strict";e.exports={version:"3.11.0"}},8921:e=>{"use strict";e.exports=JSON.parse('{"common":{"buttonOk":"OK","buttonCancel":"Cancel","buttonBrowse":"Browse...","buttonDownloadR":"Download R...","unknownErrorOccurred":"An unknown error occurred.","workingOnIt":"Working on it...","buttonYes":"Yes","buttonNo":"No","buttonQuit":"Quit","noFileSelected":"No file selected","allFiles":"All Files"},"imgAlt":{"dialogQuestion":"Question Mark Icon","dialogInfo":"Information Icon","dialogWarning":"Warning Icon","dialogError":"Error Icon"},"contextMenu":{"saveImageAsDots":"Save image as...","saveImageAs":"Save image as","copyImage":"Copy Image","reload":"Reload","copyImageAddress":"Copy Image Address","cut":"Cut","copy":"Copy","paste":"Paste","selectAll":"Select All","inspectElement":"Inspect Element","errorDownloadingImage":"Error downloading image","downloadCancelledMessage":"The download was cancelled.","downloadInterruptedMessage":"The download was interrupted.","save":"Save"},"chooseRDialog":{"documentTitle":"Choose R Installation","title":"RStudio requires an existing installation of R.","subtitle":"Please select the version of R to use.","use64BitR":"Use your machine\'s default 64-bit version of R","use32BitR":"Use your machine\'s default 32-bit version of R","useCustom":"Choose a specific version of R:","customizeRenderingEngine":"You can also customize the rendering engine used by RStudio.","renderingEngineLabel":"Rendering Engine:","renderingEngineOptionAuto":"Auto-detect (recommended)","renderingEngineOptionDesktop":"Desktop","renderingEngineOptionSoftware":"Software","renderingEngineChangedTitle":"Rendering Engine Changed","renderingEngineChangedMessage":"The rendering engine has been changed.\\nPlease restart RStudio for these changes to take effect.","rLaunchFailedTitle":"Error Loading R","rLaunchFailedMessage":"An error occurred while attempting to load the selected version of R. Please select a different R installation."},"detectRosetta":{"checkFailedTitle":"Rosetta Check Failed","checkFailedMessage":"Something went wrong while detecting your Rosetta installation.","checkFailedDetail":"Please reopen RStudio to try again.","installWarningTitle":"Rosetta is not Installed","installWarningMessage":"Rosetta is not installed on your machine. You may experience issues running RStudio.","installWarningDetail":"To avoid these issues, please install Rosetta and reopen RStudio.","installWarningMoreInfo":"More Information","installWarningRemindLater":"Remind Me Later","installWarningDoNotRemind":"Don\'t Remind Me Again"},"uiFolder":{"chooseRExecutable":"Choose R Executable","rExecutable":"R Executable","browseDots":"Browse...","okCaps":"OK","cancel":"Cancel","errorStartingR":"Error Starting R","problemReportCopiedToClipboard":"Problem report copied to clipboard.","couldNotCopyProblemReportToClipboard":"Could not copy problem report to clipboard.","rLogo":"R Logo","warning":"Warning","rstudioVersion":"RStudio Version","errorMessage":"Error Message","processOutput":"Process Output","rSessionExitedWithCode":"The R session process exited with code {{- exitCode}}.","errors":"Errors","output":"Output","recentLog":"Recent Log","nextSteps":"Next Steps","rCanFailToStartupForManyReasons":"R can fail to start up for many reasons. The following may help you resolve the problem:","investigateAnyErrorsAbove":"Investigate any errors above.","makeSureThatRStartsUpCorrectly":"Make sure that R starts up correctly outside RStudio (using RGui, R.app, or R in a terminal).","fullyUninstallAllVersionsOfRFromYourMachine":"Fully uninstall all versions of R from your machine, and reinstall the version you wish to use with RStudio.","removeStartupCustomizationsSuchAs":"Remove startup customizations such as an {{- rProfileFileExtension}} file, if present.","ifPostingThisReportOnlineUseTheCopyProblemReport":"If posting this report online, use the Copy Problem Report button below to generate a textual version of this diagnostic.","furtherTroubleshootingHelpCanBeFound":"Further troubleshooting help can be found on our website:","troubleshootingRstudioStartup":"Troubleshooting RStudio Startup","copyProblemReport":"Copy Problem Report","cannotConnectToR":"Cannot Connect to R","rstudioCantEstablishAConnectionToR":"RStudio can\'t establish a connection to R. This usually indicates one of the following:","theRSessionIsTakingAnUnusuallyLongTimeToStart":"The R session is taking an unusually long time to start, perhaps because of slow operations in startup scripts or slow network drive access.","rstudioIsUnableToCommunicateWithR":"RStudio is unable to communicate with R over a local network port, possibly because of firewall restrictions or anti-virus software.","pleaseTryTheFollowing":"Please try the following:","ifYouveCustomizedRSessionCreation":"If you\'ve customized R session creation by creating an R profile (e.g. located at {{- rProfileFileExtension}} consider temporarily removing it.","ifYouAreUsingAFirewallOrAntivirus":"If you are using a firewall or antivirus software which guards access to local network ports, add an exclusion for the RStudio and rsession executables.","runRguiRAppOrRInATerminalToEnsure":"Run RGui, R.app, or R in a terminal to ensure that R itself starts up correctly.","retry":"Retry","initializingR":"Initializing R","theRsessionIsInitializing":"The R session is initializing {{- mdash}} please wait a moment...","rSessionFailedToStart":"The R session failed to start."},"applicationTs":{"devModeConfig":"Dev Mode Config","confColon":"conf:","notFoundDotLowercase":"not found.","errorFindingR":"R Not Installed","rstudioFailedToFindRInstalationsOnTheSystem":"R does not appear to be installed. Please install R before using RStudio.\\n\\nYou can download R from the official R Project website.\\nWould you like to go there now?","newRstudioWindow":"New RStudio Window"},"detectRTs":{"rNotFound":"R not found","couldNotLocateAnRInstallationOnTheSystem":"Could not locate an R installation on the system."},"gwtCallbackTs":{"unimplemented":"Unimplemented","callbackNyiLowercase":"{{ipcName}} callback NYI"},"mainTs":{"unhandledException":"Unhandled Exception"},"sessionLauncherTs":{"rSessionFatalError":"The R session had a fatal error.","errorWasCausedByRAttemptingToLoadPackagesFromADifferentIncompatibleRVersion":"This error was very likely caused by R attempting to load packages from a different incompatible version of R on your system. Please remove other versions of R and/or remove environment variables that reference libraries from other versions of R before proceeding."},"utilsTs":{"rsessionNotFoundError":"Could not find rsession executable. Try setting the \\"RSTUDIO_CPP_BUILD_OUTPUT\\" environment variable to the location where src/cpp was built.\\n( Working directory: {{workingDirectory}} )"},"mainWindowTs":{"rSessionFailedToStart":"The R session failed to start."},"i18nManager":{"errorLocalizingDocument":"Error localizing document:"},"licenseDialog":{}}')},3056:e=>{"use strict";e.exports=JSON.parse('{"common":{"buttonOk":"OK","buttonCancel":"Annuler","buttonBrowse":"Parcourir...","buttonDownloadR":"Télécharger R...","unknownErrorOccurred":"Une erreur inconnue s\'est produite.","workingOnIt":"En cours d\'élaboration...","buttonYes":"Oui","buttonNo":"Non","buttonQuit":"Quitter","noFileSelected":"Aucun fichier sélectionné","allFiles":"Tous les fichiers"},"imgAlt":{"dialogQuestion":"Icône du point d\'interrogation","dialogInfo":"Icône d\'information","dialogWarning":"Icône d\'alerte","dialogError":"Icône d\'erreur"},"contextMenu":{"saveImageAsDots":"Enregistrer l\'image sous...","saveImageAs":"Enregistrer l\'image sous","copyImage":"Copier l\'image","reload":"Recharger","copyImageAddress":"Copier l\'adresse de l\'image","cut":"Couper","copy":"Copier","paste":"Coller","selectAll":"Tout sélectionner","inspectElement":"Inspecter l\'élément","errorDownloadingImage":"Erreur de téléchargement de l\'image","downloadCancelledMessage":"Le téléchargement a été annulé","downloadInterruptedMessage":"Le téléchargement a été interrompu.","save":"Sauvegarder"},"chooseRDialog":{"documentTitle":"Choisir l\'installation de R","title":"RStudio requiert une installation existante de R.","subtitle":"Veuillez sélectionner la version de R à utiliser.","use64BitR":"Utilisez la version 64 bits par défaut de R sur votre machine","use32BitR":"Utilisez la version 32 bits par défaut de R sur votre machine","useCustom":"Choisissez une version spécifique de R :","customizeRenderingEngine":"Vous pouvez également personnaliser le moteur de rendu utilisé par RStudio","renderingEngineLabel":"Moteur de rendu :","renderingEngineOptionAuto":"Détection automatique (recommandée)","renderingEngineOptionDesktop":"Espace de travail","renderingEngineOptionSoftware":"Logiciel","renderingEngineChangedTitle":"Moteur de rendu modifié","renderingEngineChangedMessage":"Le moteur de rendu a été modifié. Veuillez redémarrer RStudio pour que ces modifications prennent effet.","rLaunchFailedTitle":"Erreur de chargement de R","rLaunchFailedMessage":"Une erreur s\'est produite lors de la tentative de chargement de la version sélectionnée de R. Veuillez sélectionner une installation de R différente."},"detectRosetta":{"checkFailedTitle":"Rosetta vérification a échoué","checkFailedMessage":"Une erreur s\'est produite lors de la vérification de l\'installation de Rosetta.","checkFailedDetail":"Veuillez rouvrir RStudio pour réessayer.","installWarningTitle":"Rosetta n\'est pas installé","installWarningMessage":"Rosetta n\'est pas installé sur votre machine. Vous pouvez rencontrer des problèmes lors de l\'exécution de RStudio.","installWarningDetail":"Pour éviter ces problèmes, veuillez installer Rosetta et rouvrir RStudio.","installWarningMoreInfo":"Plus d\'informations","installWarningRemindLater":"Rappelez-moi plus tard","installWarningDoNotRemind":"Ne me le rappelez plus"},"uiFolder":{"chooseRExecutable":"Choisissez l\'exécutable de R","rExecutable":"Exécutable R","browseDots":"Parcourir...","okCaps":"OK","cancel":"Annuler","errorStartingR":"Erreur de démarrage de R","problemReportCopiedToClipboard":"Rapport d\'erreur copié dans le presse-papiers.","couldNotCopyProblemReportToClipboard":"Impossible de copier le rapport d\'erreur dans le presse-papiers.","rLogo":"Logo de R","warning":"Avertissement","rstudioVersion":"Version de RStudio","errorMessage":"Message d\'erreur","processOutput":"Sortie du processus","rSessionExitedWithCode":"Le processus de la session R a quitté avec le code {{- exitCode}}.","errors":"Erreurs","output":"Sortie","recentLog":"Journal récent","nextSteps":"Prochaines étapes","rCanFailToStartupForManyReasons":"R peut échouer au démarrage pour de nombreuses raisons. Les éléments suivants peuvent vous aider à résoudre le problème :","investigateAnyErrorsAbove":"Examinez toutes les erreurs ci-dessus.","makeSureThatRStartsUpCorrectly":"Assurez-vous que R démarre correctement en dehors de RStudio (en utilisant RGui, R.app, ou R dans un terminal).","fullyUninstallAllVersionsOfRFromYourMachine":"Désinstaller complètement toutes les versions de R de votre machine, et réinstaller la version que vous souhaitez utiliser avec RStudio.","removeStartupCustomizationsSuchAs":"Supprimez les personnalisations de démarrage telles qu\'un fichier {{- rProfileFileExtension}}, s\'il est présent.","ifPostingThisReportOnlineUseTheCopyProblemReport":"Si vous publiez ce rapport en ligne, utilisez le bouton Copier le rapport de problème ci-dessous pour générer une version textuelle de ce diagnostic.","furtherTroubleshootingHelpCanBeFound":"Une aide supplémentaire au dépannage peut être trouvée sur notre site Web :","troubleshootingRstudioStartup":"Dépannage du démarrage de RStudio","copyProblemReport":"Copier le rapport de problème","cannotConnectToR":"Impossible de se connecter à R","rstudioCantEstablishAConnectionToR":"RStudio ne peut pas établir de connexion à R. Cela indique généralement l\'une des situations suivantes :","theRSessionIsTakingAnUnusuallyLongTimeToStart":"La session R prend un temps anormalement long pour démarrer, peut-être en raison de la lenteur des opérations dans les scripts de démarrage ou de l\'accès lent au lecteur réseau.","rstudioIsUnableToCommunicateWithR":"RStudio est incapable de communiquer avec R sur un port du réseau local, peut-être à cause de restrictions du pare-feu ou d\'un logiciel anti-virus.","pleaseTryTheFollowing":"Veuillez essayer ce qui suit :","ifYouveCustomizedRSessionCreation":"Si vous avez personnalisé la création de session R en créant un profil R (par exemple, situé à {{- rProfileFileExtension}}, envisagez de le supprimer temporairement.","ifYouAreUsingAFirewallOrAntivirus":"Si vous utilisez un pare-feu ou un logiciel antivirus qui surveille l\'accès aux ports du réseau local, ajoutez une exclusion pour les exécutables RStudio et rsession.","runRguiRAppOrRInATerminalToEnsure":"Exécutez RGui, R.app, ou R dans un terminal pour vous assurer que R lui-même démarre correctement.","retry":"Réessayer","initializingR":"Initialisation de R","theRsessionIsInitializing":"La session R est en train de s\'initialiser {{- mdash}} veuillez patienter un instant...","rSessionFailedToStart":"La session R n\'a pas réussi à démarrer."},"applicationTs":{"devModeConfig":"Mode Config DEV","confColon":"conf :","notFoundDotLowercase":"non trouvé.","errorFindingR":"Erreur de recherche de R","rstudioFailedToFindRInstalationsOnTheSystem":"RStudio n\'a pas réussi à trouver d\'installation R sur le système. Merci d\'installer R avant d\'utiliser RStudio.\\n\\nVous pouvez télécharger R sur le site officiel du projet R. \\nVoulez-vous y aller maintenant ?","newRstudioWindow":"Nouvelle fenêtre RStudio"},"detectRTs":{"rNotFound":"R non trouvé","couldNotLocateAnRInstallationOnTheSystem":"Impossible de localiser une installation R sur le système."},"gwtCallbackTs":{"unimplemented":"Non implémenté","callbackNyiLowercase":"{{ipcName}} pas encore implémenté"},"mainTs":{"unhandledException":"Exception non gérée"},"sessionLauncherTs":{"rSessionFatalError":"La session R a eu une erreur fatale.","errorWasCausedByRAttemptingToLoadPackagesFromADifferentIncompatibleRVersion":"Cette erreur a très probablement été causée par la tentative de R de charger des paquets à partir d\'une autre version incompatible de R sur votre système. Veuillez supprimer les autres versions de R et/ou supprimer les variables d\'environnement qui font référence aux bibliothèques d\'autres versions de R avant de poursuivre."},"utilsTs":{"rsessionNotFoundError":"Impossible de trouver l\'exécutable rsession. Essayez de définir la variable d\'environnement \\"RSTUDIO_CPP_BUILD_OUTPUT\\" à l\'emplacement où src/cpp a été construit.\\n( Répertoire de travail : {{workingDirectory}} )"},"mainWindowTs":{"rSessionFailedToStart":"La session R n\'a pas réussi à démarrer."},"i18nManager":{"errorLocalizingDocument":"Erreur de localisation du document :"}}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),void 0!==__webpack_require__&&(__webpack_require__.ab=__dirname+"/native_modules/");var __webpack_exports__=__webpack_require__(3585);module.exports=__webpack_exports__})(); //# sourceMappingURL=index.js.map