From 3547fd0cf7a93f290977672a6bc05addf0fea01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ronvel?= Date: Mon, 26 Dec 2022 19:31:59 +0100 Subject: [PATCH] .camelCaseToSeparated(): Fix acronyms issues, there are now detected and still kept uppercased --- CHANGELOG | 6 ++++++ browser/string-kit.js | 29 ++++++++++++++++++++++------- browser/string-kit.min.js | 2 +- lib/camel.js | 25 ++++++++++++++++++++----- package.json | 2 +- test/string-test.js | 17 +++++++++++++++++ 6 files changed, 67 insertions(+), 14 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index aada97c..ba3347a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,10 @@ +v0.17.7 +------- + +.camelCaseToSeparated(): Fix acronyms issues, there are now detected and still kept uppercased + + v0.17.6 ------- diff --git a/browser/string-kit.js b/browser/string-kit.js index 7545540..8d1a656 100644 --- a/browser/string-kit.js +++ b/browser/string-kit.js @@ -739,12 +739,27 @@ camel.toCamelCase = function( str , preserveUpperCase = false , initialUpperCase -camel.camelCaseToSeparated = function( str , separator = ' ' ) { +camel.camelCaseToSeparated = function( str , separator = ' ' , acronym = true ) { if ( ! str || typeof str !== 'string' ) { return '' ; } - return str.replace( /^([A-Z])|([A-Z])/g , ( match , firstLetter , letter ) => { - if ( firstLetter ) { return firstLetter.toLowerCase() ; } - return separator + letter.toLowerCase() ; + if ( ! acronym ) { + return str.replace( /^([A-Z])|([A-Z])/g , ( match , firstLetter , letter ) => { + if ( firstLetter ) { return firstLetter.toLowerCase() ; } + return separator + letter.toLowerCase() ; + } ) ; + } + + // (^)? and (^)? does not work, so we have to use (?:(^)|)) and (?:($)|)) to capture end or not + return str.replace( /(?:(^)|)([A-Z]+)(?:($)|(?=[a-z]))/g , ( match , isStart , letters , isEnd ) => { + isStart = isStart === '' ; + isEnd = isEnd === '' ; + + var prefix = isStart ? '' : separator ; + + return letters.length === 1 ? prefix + letters.toLowerCase() : + isEnd ? prefix + letters : + letters.length === 2 ? prefix + letters[ 0 ].toLowerCase() + separator + letters[ 1 ].toLowerCase() : + prefix + letters.slice( 0 , -1 ) + separator + letters.slice( -1 ).toLowerCase() ; } ) ; } ; @@ -752,7 +767,7 @@ camel.camelCaseToSeparated = function( str , separator = ' ' ) { // Transform camel case to alphanum separated by minus camel.camelCaseToDash = -camel.camelCaseToDashed = ( str ) => camel.camelCaseToSeparated( str , '-' ) ; +camel.camelCaseToDashed = ( str ) => camel.camelCaseToSeparated( str , '-' , false ) ; },{}],4:[function(require,module,exports){ @@ -3158,8 +3173,8 @@ inspectStyle.html = Object.assign( {} , inspectStyle.none , { } ) ; -}).call(this)}).call(this,{"isBuffer":require("../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js")},require('_process')) -},{"../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js":19,"./ansi.js":2,"./escape.js":4,"_process":20}],8:[function(require,module,exports){ +}).call(this)}).call(this,{"isBuffer":require("../../../../../../opt/node-v16.16.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")},require('_process')) +},{"../../../../../../opt/node-v16.16.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":19,"./ansi.js":2,"./escape.js":4,"_process":20}],8:[function(require,module,exports){ module.exports={"߀":"0","́":""," ":" ","Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ɓ":"B","c":"C","Ⓒ":"C","C":"C","Ꜿ":"C","Ḉ":"C","Ç":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ɗ":"D","Ɖ":"D","ᴅ":"D","Ꝺ":"D","Ð":"Dh","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","ɛ":"E","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","ᴇ":"E","ꝼ":"F","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","ɢ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","ȷ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","ϻ":"M","Ꞥ":"N","Ƞ":"N","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ɲ":"N","Ꞑ":"N","ᴎ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Þ":"Th","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ɑ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","Ƃ":"b","ⓒ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","C":"c","Ć":"c","Ĉ":"c","Ċ":"c","Č":"c","Ƈ":"c","Ȼ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","Ƌ":"d","Ꮷ":"d","ԁ":"d","Ɦ":"d","ð":"dh","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ff":"ff","fi":"fi","fl":"fl","ffi":"ffi","ffl":"ffl","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ꝿ":"g","ᵹ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ɭ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","ԉ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ɔ":"o","ᴑ":"o","œ":"oe","ƣ":"oi","ꝏ":"oo","ȣ":"ou","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ρ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ʂ":"s","ß":"ss","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","þ":"th","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"} },{}],9:[function(require,module,exports){ /* diff --git a/browser/string-kit.min.js b/browser/string-kit.min.js index 938ddc1..a77e262 100644 --- a/browser/string-kit.min.js +++ b/browser/string-kit.min.js @@ -1 +1 @@ -(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.stringKit=e()}})(function(){var e,t,r;return function(){function f(s,o,a){function l(r,e){if(!o[r]){if(!s[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(u)return u(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};s[r][0].call(n.exports,function(e){var t=s[r][1][e];return l(t||e)},n,n.exports,f,s,o,a)}return o[r].exports}for(var u="function"==typeof require&&require,e=0;e20||this.exposant<-20){return this.toScientificString(...e)}return this.toNoExpString(...e)};i.prototype.toExponential=i.prototype.toExponentialString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}e+="e"+(this.exposant>0?"+":"")+(this.exposant-1);return e};const n=["⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"];const s="⁺";const o="⁻";const a="0".charCodeAt(0);i.prototype.toScientific=i.prototype.toScientificString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}var t=(this.exposant<=0?o:"")+(""+Math.abs(this.exposant-1)).split("").map(e=>n[e.charCodeAt(0)-a]).join("");e+=" × 10"+t;return e};i.prototype.toNoExp=i.prototype.toNoExpString=function(e=1,t=0,r=false,i=false,n=this.exposant){if(this.special!==null){return""+this.special}var s=[],o=[],a=this.sign<0?"-":i?"+":"";if(!this.digits.length){c(s,0,e);if(t&&!r){c(o,0,t)}}else if(n<=0){c(s,0,e);c(o,0,-n);g(o,this.digits);if(t&&this.digits.length-n=this.digits.length){if(n0)){c(o,0,t-this.digits.length+n)}}a+=this.groupSeparator?this.groupDigits(s,this.groupSeparator):s.join("");if(o.length){a+=this.decimalSeparator+(this.decimalGroupSeparator?this.groupDigits(o,this.decimalGroupSeparator):o.join(""))}else if(this.forceDecimalSeparator){a+=this.decimalSeparator}return a};const l=["","k","M","G","T","P","E","Z","Y"];const u=["","m","µ","n","p","f","a","z","y"];i.prototype.toMetric=i.prototype.toMetricString=function(e=1,t=0,r=false,i=false){if(this.special!==null){return""+this.special}if(!this.digits.length){return this.sign>0?"0":"-0"}var n="",s;if(this.exposant>0){s=1+(this.exposant-1)%3;n=l[Math.floor((this.exposant-1)/3)];if(n===undefined){return this.toScientificString()}}else{s=3- -this.exposant%3;n=u[1+Math.floor(-this.exposant/3)];if(n===undefined){return this.toScientificString()}}return this.toNoExpString(e,t,r,i,s)+n};i.prototype.precision=function(r,e=0){var t;if(this.special!==null||r>=this.digits.length){return this}if(r<0){this.digits.length=0;return this}e*=this.sign;if(e<0){t=this.digits.length>r+4&&this.digits[r]===9&&this.digits[r+1]===9&&this.digits[r+2]===9&&this.digits[r+3]===9&&this.digits[r+4]===9}else if(e>0){t=this.digits[r]>0||this.digits[r+1]>0||this.digits[r+2]>0||this.digits[r+3]>0||this.digits[r+4]>0}else{t=this.digits[r]>=5}if(t){let e=r-1,t=false;for(;e>=0;e--){if(this.digits[e]<9){this.digits[e]++;t=true;break}else{this.digits[e]=0}}if(!t){this.exposant++;this.digits[0]=1;this.digits.length=1}else{this.digits.length=e+1}}else{this.digits.length=r;this.removeTrailingZero()}return this};i.prototype.round=function(e=0,t=0){var r=this.exposant+e;return this.precision(r,t)};i.prototype.floor=function(e=0){var t=this.exposant+e;return this.precision(t,-1)};i.prototype.ceil=function(e=0){var t=this.exposant+e;return this.precision(t,1)};i.prototype.removeTrailingZero=function(){var e=this.digits.length-1;while(e>=0&&this.digits[e]===0){e--}this.digits.length=e+1};const f=3;i.prototype.groupDigits=function(e,t,r=false){var i="",n=r?0:f-e.length%f,s=0,o=e.length;for(;s{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[38;2;"+t+";"+r+";"+i+"m"};i.bgTrueColor=(t,r,i)=>{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[48;2;"+t+";"+r+";"+i+"m"};const o={0:null,1:{bold:true},2:{dim:true},22:{bold:false,dim:false},3:{italic:true},23:{italic:false},4:{underline:true},24:{underline:false},5:{blink:true},25:{blink:false},7:{inverse:true},27:{inverse:false},8:{hidden:true},28:{hidden:false},9:{strike:true},29:{strike:false},30:{color:0},31:{color:1},32:{color:2},33:{color:3},34:{color:4},35:{color:5},36:{color:6},37:{color:7},39:{color:"default"},90:{color:8},91:{color:9},92:{color:10},93:{color:11},94:{color:12},95:{color:13},96:{color:14},97:{color:15},40:{bgColor:0},41:{bgColor:1},42:{bgColor:2},43:{bgColor:3},44:{bgColor:4},45:{bgColor:5},46:{bgColor:6},47:{bgColor:7},49:{bgColor:"default"},100:{bgColor:8},101:{bgColor:9},102:{bgColor:10},103:{bgColor:11},104:{bgColor:12},105:{bgColor:13},106:{bgColor:14},107:{bgColor:15}};i.parse=e=>{var t,r,i,n,s=[];for([,t,r]of e.matchAll(/\x1b\[([0-9;]+)m|(.[^\x1b]*)/g)){if(r){if(s.length){s[s.length-1].text+=r}else{s.push({text:r})}}else{t.split(";").forEach(e=>{n=o[e];if(n===undefined){return}if(!s.length||s[s.length-1].text){if(!n){i={text:""}}else{i=Object.assign({},i,n);i.text=""}s.push(i)}else{if(!n){s[s.length-1]={text:""}}else{Object.assign(i,n)}}})}}return s}},{}],3:[function(e,t,r){"use strict";var i={};t.exports=i;i.toCamelCase=function(e,s=false,o=false){if(!e||typeof e!=="string"){return""}return e.replace(/(?:^[\s_-]*|([\s_-]+))(([^\s_-]?)([^\s_-]*))/g,(e,t,r,i,n)=>{if(s){if(!t&&!o){return r}if(!i){return""}return i.toUpperCase()+n}if(!t&&!o){return r.toLowerCase()}if(!i){return""}return i.toUpperCase()+n.toLowerCase()})};i.camelCaseToSeparated=function(e,i=" "){if(!e||typeof e!=="string"){return""}return e.replace(/^([A-Z])|([A-Z])/g,(e,t,r)=>{if(t){return t.toLowerCase()}return i+r.toLowerCase()})};i.camelCaseToDash=i.camelCaseToDashed=e=>i.camelCaseToSeparated(e,"-")},{}],4:[function(e,t,r){"use strict";r.regExp=r.regExpPattern=e=>e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1");r.regExpReplacement=e=>e.replace(/\$/g,"$$$$");r.format=e=>e.replace(/%/g,"%%");r.jsSingleQuote=e=>r.control(e).replace(/'/g,"\\'");r.jsDoubleQuote=e=>r.control(e).replace(/"/g,'\\"');r.shellArg=e=>"'"+e.replace(/'/g,"'\\''")+"'";var i={"\r":"\\r","\n":"\\n","\t":"\\t","":"\\x7f"};r.control=(e,r=false)=>e.replace(/[\x00-\x1f\x7f]/g,e=>{if(r&&(e==="\n"||e==="\t")){return e}if(i[e]!==undefined){return i[e]}var t=e.charCodeAt(0).toString(16);if(t.length%2){t="0"+t}return"\\x"+t});var n={"&":"&","<":"<",">":">",'"':""","'":"'"};r.html=e=>e.replace(/[&<>]/g,e=>n[e]);r.htmlAttr=e=>e.replace(/[&<>"]/g,e=>n[e]);r.htmlSpecialChars=e=>e.replace(/[&<>"']/g,e=>n[e]);r.unicodePercentEncode=e=>e.replace(/[\x00-\x1f\u0100-\uffff\x7f%]/g,e=>{try{return encodeURI(e)}catch(e){return""}});r.httpHeaderValue=e=>r.unicodePercentEncode(e)},{}],5:[function(O,e,T){(function(P){(function(){"use strict";const u=O("./inspect.js").inspect;const f=O("./inspect.js").inspectError;const t=O("./escape.js");const n=O("./ansi.js");const s=O("./unicode.js");const i=O("./naturalSort.js");const h=O("./StringNumber.js");T.formatMethod=function(...d){var y,e=d[0],m=1,b=d.length;if(typeof e!=="string"){if(!e){e=""}else if(typeof e.toString==="function"){e=e.toString()}else{e=""}}var w={hasMarkup:false,shift:null,markupStack:[]};if(this.markupReset&&this.startingMarkupReset){e=(typeof this.markupReset==="function"?this.markupReset(w.markupStack):this.markupReset)+e}e=e.replace(/\^\[([^\]]*)]?|\^(.)|(%%)|%([+-]?)([0-9]*)(?:\[([^\]]*)\])?([a-zA-Z])/g,(e,t,r,i,n,s,o,a)=>{var l,u,f,c,g,p,h=[];if(i){return"%"}if(t){r=t}if(r){if(this.noMarkup){return"^"+r}return k.call(this,w,e,r)}if(s){s=parseInt(s,10);if(n){if(n==="+"){s=m+s}else if(n==="-"){s=m-s}}}else{s=m}m++;if(s>=b||s<1){y=undefined}else{y=d[s]}if(S[a]){l=S[a](y,o,this);if(this.argumentSanitizer&&!S[a].noSanitize){l=this.argumentSanitizer(l)}if(this.escapeMarkup&&!S[a].noEscapeMarkup){l=T.escapeMarkup(l)}if(o&&!S[a].noCommonModeArg){l=M(l,o)}return l}if(a==="F"){m--;if(o===undefined){return""}f=o.split(":");c=f[0];g=f[1];if(!c){return""}if(g&&(p=g.match(/%([+-]?)([0-9]*)[a-zA-Z]/g))){for(u=0;u=b||s<1){h[u]=undefined}else{h[u]=d[s]}}}if(!this||!this.fn||typeof this.fn[c]!=="function"){return""}return this.fn[c].apply(this,h)}return""});if(w.hasMarkup&&this.markupReset&&this.endingMarkupReset){e+=typeof this.markupReset==="function"?this.markupReset(w.markupStack):this.markupReset}if(this.extraArguments){for(;m1){a.push({text:""})}}else{if(o&&o.text.length){a.push(Object.assign({text:""},...u.markupStack))}else{if(o){Object.assign(o,t)}else{a.push(Object.assign({text:""},t))}}}}}return a}if(this.markupReset&&this.startingMarkupReset){l=(typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset)+l}l=l.replace(/\^\[([^\]]*)]?|\^(.)/g,(e,t,r)=>k.call(this,u,e,t||r));if(u.hasMarkup&&this.markupReset&&this.endingMarkupReset){l+=typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset}return l};function k(e,t,r){var i,n,s,o,a;if(r==="^"){return"^"}if(this.shiftMarkup&&this.shiftMarkup[r]){e.shift=this.shiftMarkup[r];return""}if(r.length>1&&this.dataMarkup&&(a=r.indexOf(":"))!==-1){n=r.slice(0,a);i=this.dataMarkup[n];if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;s=r.slice(a+1);if(typeof i==="function"){o=i(e.markupStack,n,s)}else{o={[i]:s};l(e,o)}return o}if(e.shift){i=this.shiftedMarkup?.[e.shift]?.[r];e.shift=null}else{i=this.markup?.[r]}if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;if(typeof i==="function"){o=i(e.markupStack,r)}else{o=i;l(e,o)}return o}function l(t,r){if(Array.isArray(r)){for(let e of r){if(e===null){t.markupStack.length=0}else{t.markupStack.push(e)}}}else{if(r===null){t.markupStack.length=0}else{t.markupStack.push(r)}}}T.stripMarkup=e=>e.replace(/\^\[[^\]]*]?|\^./g,e=>e==="^^"?"^":e==="^ "?" ":"");T.escapeMarkup=e=>e.replace(/\^/g,"^^");const r={argumentSanitizer:e=>t.control(e,true),extraArguments:true,color:false,noMarkup:false,escapeMarkup:false,endingMarkupReset:true,startingMarkupReset:false,markupReset:n.reset,shiftMarkup:{"#":"background"},markup:{":":n.reset," ":n.reset+" ","-":n.dim,"+":n.bold,_:n.underline,"/":n.italic,"!":n.inverse,b:n.blue,B:n.brightBlue,c:n.cyan,C:n.brightCyan,g:n.green,G:n.brightGreen,k:n.black,K:n.brightBlack,m:n.magenta,M:n.brightMagenta,r:n.red,R:n.brightRed,w:n.white,W:n.brightWhite,y:n.yellow,Y:n.brightYellow},shiftedMarkup:{background:{":":n.reset," ":n.reset+" ",b:n.bgBlue,B:n.bgBrightBlue,c:n.bgCyan,C:n.bgBrightCyan,g:n.bgGreen,G:n.bgBrightGreen,k:n.bgBlack,K:n.bgBrightBlack,m:n.bgMagenta,M:n.bgBrightMagenta,r:n.bgRed,R:n.bgBrightRed,w:n.bgWhite,W:n.bgBrightWhite,y:n.bgYellow,Y:n.bgBrightYellow}},dataMarkup:{fg:(e,t,r)=>{var i=n.fgColor[r]||n.trueColor(r);e.push(i);return i},bg:(e,t,r)=>{var i=n.bgColor[r]||n.bgTrueColor(r);e.push(i);return i}},markupCatchAll:(e,t,r)=>{var i="";if(r===undefined){if(t[0]==="#"){i=n.trueColor(t)}else if(typeof n[t]==="string"){i=n[t]}}e.push(i);return i}};r.dataMarkup.color=r.dataMarkup.c=r.dataMarkup.fgColor=r.dataMarkup.fg;r.dataMarkup.bgColor=r.dataMarkup.bg;T.createFormatter=e=>T.formatMethod.bind(Object.assign({},r,e));T.format=T.formatMethod.bind(r);T.format.default=r;T.formatNoMarkup=T.formatMethod.bind(Object.assign({},r,{noMarkup:true}));T.formatThirdPartyMarkup=T.formatMethod.bind(Object.assign({},r,{noMarkup:true,escapeMarkup:true}));T.createMarkup=e=>T.markupMethod.bind(Object.assign({},r,e));T.markup=T.markupMethod.bind(r);T.format.count=function(e,t=false){var r,i,n,s=1,o=0;if(typeof e!=="string"){return 0}var a=t?/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]/g:/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]|(\^\[[^\]]*]?|\^.)/g;for([,n,i,r]of e.matchAll(a)){if(r){continue}if(i){i=parseInt(i,10);if(n){if(n==="+"){i=s+i}else if(n==="-"){i=s-i}}}else{i=s}s++;if(o{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};S.r=e=>S.s(e);S.r.noSanitize=true;S.S=(e,t,r)=>{var i=r.escapeMarkup?e=>r.argumentSanitizer?r.argumentSanitizer(e):e:e=>T.markupMethod.call(r,r.argumentSanitizer?r.argumentSanitizer(e):e);if(typeof e==="string"){return i(e)}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return i(e.toString())}return i("("+e+")")};S.S.noSanitize=true;S.S.noEscapeMarkup=true;S.S.noCommonModeArg=true;S.N=(e,t)=>{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return""+e}if(typeof e==="number"){return S.f(e,".3g ")}if(Array.isArray(e)){e=e.map(e=>S.N(e,true));if(t){return"["+e.join(",")+"]"}return e.join(", ")}if(P.isBuffer(e)){e=[...e].map(e=>{e=e.toString(16);if(e.length===1){e="0"+e}return e});return"<"+e.join(" ")+">"}var r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype){e=Object.entries(e).sort(i).map(e=>e[0]+": "+S.N(e[1],true));if(t){return"{"+e.join(", ")+"}"}return e.join(", ")}if(typeof e.inspect==="function"){return e.inspect()}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};S.n=e=>S.N(e,true);S.f=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};S.f.noSanitize=true;S.P=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e*=100;var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)+"%"};S.P.noSanitize=true;S.p=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e=(e-1)*100;var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal,true)+"%"};S.p.noSanitize=true;S.k=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"0"}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision||r.rounding===null){i.precision(r.precision||3)}return i.toMetricString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};S.k.noSanitize=true;S.e=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toExponential()};S.e.noSanitize=true;S.K=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toScientific()};S.K.noSanitize=true;S.d=S.i=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.floor(e)}return"0"};S.i.noSanitize=true;S.u=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0)}return"0"};S.u.noSanitize=true;S.U=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),1)}return"1"};S.U.noSanitize=true;S.m=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var t="";if(e<0){t="-";e=-e}var r=j(e),i=e-r;if(!i){return t+r+"°"}var n=j(i*60),s=j(i*3600-n*60);if(s){return t+r+"°"+(""+n).padStart(2,"0")+"′"+(""+s).padStart(2,"0")+"″"}return t+r+"°"+(""+n).padStart(2,"0")+"′"};S.m.noSanitize=true;S.t=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var r,i,n,s,o,a="",l=w(t),u=l.roundingType,f=l.useAbbreviation?"h":":",c=l.useAbbreviation?"min":":",g=l.useAbbreviation?"s":".",p=l.useAbbreviation;n=e/1e3;if(n<0){n=-n;u*=-1;a="-"}if(n<60&&!l.forceMinutes){s=new h(n,g,undefined,p);s.round(l.rounding,u);if(s.toNumber()<60){o=s.toString(1,l.rightPadding,l.rightPaddingOnlyIfDecimal);return a+o}n=60}i=Math.floor(n/60);n=n%60;s=new h(n,g,undefined,p);s.round(l.rounding,u);if(s.toNumber()<60){o=s.toString(2,l.rightPadding,l.rightPaddingOnlyIfDecimal)}else{i++;n=0;s.set(n);o=s.toString(2,l.rightPadding,l.rightPaddingOnlyIfDecimal)}if(i<60&&!l.forceHours){return a+i+c+o}r=Math.floor(i/60);i=i%60;return a+r+f+(""+i).padStart(2,"0")+c+o};S.t.noSanitize=true;S.h=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(16)}return"0"};S.h.noSanitize=true;S.x=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"00"}var t=""+Math.max(Math.floor(e),0).toString(16);if(t.length%2){t="0"+t}return t};S.x.noSanitize=true;S.o=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(8)}return"0"};S.o.noSanitize=true;S.b=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(2)}return"0"};S.b.noSanitize=true;S.X=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("hex")};S.X.noSanitize=true;S.z=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("base64")};S.Z=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]{1,2}$/g,"")};const o={};S.I=(e,t,r)=>C(e,t,r,o);S.I.noSanitize=true;const a={noFunc:true,enumOnly:true,noDescriptor:true,useInspect:true,useInspectPropertyBlackList:true};S.Y=(e,t,r)=>C(e,t,r,a);S.Y.noSanitize=true;const c={minimal:true,noIndex:true};S.O=(e,t,r)=>C(e,t,r,c);S.O.noSanitize=true;const g={};S.E=(e,t,r)=>C(e,t,r,g,true);S.E.noSanitize=true;S.J=e=>e===undefined?"null":JSON.stringify(e);S.D=()=>"";S.D.noSanitize=true;const p=/([a-zA-Z])(.[^a-zA-Z]*)/g;const d=/([a-zA-Z]|^)([^a-zA-Z]*)/g;function M(r,i){for(let[,e,t]of i.matchAll(p)){if(e==="L"){let e=s.width(r);t=+t||1;if(e>t){r=s.truncateWidth(r,t-1).trim()+"…";e=s.width(r)}if(et){r=s.truncateWidth(r,t-1).trim()+"…";e=s.width(r)}if(e{if(e===t){return 1}if(e.length===0||t.length===0){return 0}return Math.max(0,1-M.levenshtein(e,t)/t.length)};const C=0;const x=.88;const S=.9;M.bestMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n,s,o,a,l=-1,u=null;for(n=0,s=t.length;ni){i=o;u=a;l=n}}return r.indexOf?l:u};M.topMatch=(r,e,t={})=>{var i=t.scoreLimit||C,n=t.deltaRate||S,s,o,a;a=e.map((e,t)=>({pattern:e,index:t,score:M.score(r,e)}));a.sort((e,t)=>t.score-e.score);if(a[0].score<=i){return[]}i=Math.max(i,a[0].score*n);for(s=1,o=a.length;se.index):a.map(e=>e.pattern)};const i=new Set(["a","an","the","this","that","those","some","of","in","on","at","my","your","her","his","its","our","their"]);function A(e,t=i){return e.split(/[ '"/|,:_-]+/g).filter(e=>e&&!t.has(e))}M.bestTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||x,s,o,a,l,u,f,c,g,p,h,d=i,y,m,b=A(e),w,k=-1,S=null;if(!b.length||!t.length){return r.indexOf?k:S}for(s=0,o=t.length;sw){w=m;if(m===1){break}}}h+=w}h/=b.length;if(b.length!==g.length){h*=n**Math.abs(g.length-b.length)}if(h>d){d=h;S=c;k=s}}return r.indexOf?k:S};M.topTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||x,s=r.deltaRate||S,o,a,l,u,f,c,g,p,h,d,y,m,b=A(e),w,k=[];if(!b.length||!t.length){return[]}for(o=0,a=t.length;ow){w=m;if(m===1){break}}}d+=w}d/=b.length;if(b.length!==p.length){d*=n**Math.abs(p.length-b.length)}k.push({pattern:g,index:o,score:d})}k.sort((e,t)=>t.score-e.score);if(k[0].score<=i){return[]}i=Math.max(i,k[0].score*s);for(o=1,a=k.length;oe.index):k.map(e=>e.pattern)};const c=[];const g=[];M.levenshtein=(t,r)=>{if(t===r){return 0}if(t.length>r.length){let e=t;t=r;r=e}let e=t.length;let i=r.length;while(e>0&&t.charCodeAt(e-1)===r.charCodeAt(i-1)){e--;i--}let n=0;while(no?l>o?o+1:l:l>a?a+1:l}}return o}},{}],7:[function(t,e,r){(function(P,c){(function(){"use strict";const M=t("./escape.js");const n=t("./ansi.js");const C={};const x=new Set([Object,Array]);function o(e,t){if(arguments.length<2){t=e;e={}}else if(!e||typeof e!=="object"){e={}}var r={depth:0,ancestors:[]};if(!e.style){e.style=f.none}else if(typeof e.style==="string"){e.style=f[e.style]}if(e.depth===undefined){e.depth=3}if(e.maxLength===undefined){e.maxLength=250}if(e.outputMaxLength===undefined){e.outputMaxLength=5e3}if(e.nofunc){e.noFunc=true}if(e.minimal){e.noFunc=true;e.noDescriptor=true;e.noType=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}if(e.minimalPlusConstructor){e.noFunc=true;e.noDescriptor=true;e.noTypeButConstructor=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}var i=A(r,e,t);if(i.length>e.outputMaxLength){i=e.style.truncate(i,e.outputMaxLength)}return i}r.inspect=o;function A(t,r,e){var i,n,s,o,a,l,u,f,c,g,p,h,d,y,m="",b="",w="",k,S;c=typeof e;p=(r.tab??r.style.tab).repeat(t.depth);if(c==="function"&&r.noFunc){return""}if(t.key!==undefined){if(t.descriptor){w=[];if(!t.descriptor.configurable){w.push("-conf")}if(!t.descriptor.enumerable){w.push("-enum")}if(!t.descriptor.writable){w.push("-w")}if(w.length){w=w.join(" ")}else{w=""}}if(t.keyIsProperty){if(v(t.key)){b='"'+r.style.key(t.key)+'": '}else{b=r.style.key(t.key)+": "}}else if(!r.noIndex){b=r.style.index(t.key)}if(w){w=" "+r.style.type(w)}}g=t.noPre?"":p+b;if(e===undefined){m+=g+r.style.constant("undefined")+w+r.style.newline}else if(e===C){m+=g+r.style.constant("[empty]")+w+r.style.newline}else if(e===null){m+=g+r.style.constant("null")+w+r.style.newline}else if(e===false){m+=g+r.style.constant("false")+w+r.style.newline}else if(e===true){m+=g+r.style.constant("true")+w+r.style.newline}else if(c==="number"){m+=g+r.style.number(e.toString())+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("number"))+w+r.style.newline}else if(c==="string"){if(e.length>r.maxLength){m+=g+'"'+r.style.string(M.control(e.slice(0,r.maxLength-1)))+'…"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+" - TRUNCATED)"))+w+r.style.newline}else{m+=g+'"'+r.style.string(M.control(e))+'"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+")"))+w+r.style.newline}}else if(P.isBuffer(e)){m+=g+r.style.inspect(e.inspect())+(r.noType?"":" "+r.style.type("Buffer")+r.style.length("("+e.length+")"))+w+r.style.newline}else if(c==="object"||c==="function"){n=s="";d=false;if(c==="function"){d=true;n=" "+r.style.funcName(e.name?e.name:"(anonymous)");s=r.style.length("("+e.length+")")}h=false;if(Array.isArray(e)){h=true;s=r.style.length("("+e.length+")")}if(!e.constructor){u="(no constructor)"}else if(!e.constructor.name){u="(anonymous)"}else{u=e.constructor.name}l=!e.constructor||x.has(e.constructor);u=r.style.constructorName(u);o=Object.getPrototypeOf(e);m+=g;if(!r.noType&&(!r.noTypeButConstructor||!l)){if(t.forceType&&!r.noType&&!r.noTypeButConstructor){m+=r.style.type(t.forceType)}else if(r.noTypeButConstructor){m+=u}else{m+=u+n+s+" "+r.style.type(c)+w}if(!d||r.funcDetails){m+=" "}}if(h&&r.noArrayProperty){a=[...Array(e.length).keys()]}else{a=Object.getOwnPropertyNames(e)}if(r.sort){a.sort()}y=j(e,t,r);if(r.protoBlackList&&r.protoBlackList.has(o)){m+=r.style.limit("[skip]")+r.style.newline}else if(y!==undefined){if(typeof y==="string"){m+="=> "+y+r.style.newline}else{m+="=> "+A({depth:t.depth,ancestors:t.ancestors,noPre:true},r,y)}}else if(d&&!r.funcDetails){m+=r.style.newline}else if(!a.length&&!r.proto){m+=(h?"[]":"{}")+r.style.newline}else if(t.depth>=r.depth){m+=r.style.limit("[depth limit]")+r.style.newline}else if(t.ancestors.indexOf(e)!==-1){m+=r.style.limit("[circular]")+r.style.newline}else{m+=(h?"[":"{")+r.style.newline;S=t.ancestors.slice();S.push(e);for(i=0;i";if(t==="fulfilled"){r+=" "+A({depth:n.depth,ancestors:n.ancestors,noPre:true},s,e[1])}else if(t==="rejected"){if(e[1]instanceof Error){r+=" "+l({style:s.style,noErrorStack:true},e[1])}else{r+=" "+A({depth:n.depth,ancestors:n.ancestors,noPre:true},s,e[1])}}return r}}if(i._bsontype){return i.toString()}if(s.useInspect&&typeof i.inspect==="function"){return i.inspect()}return}function l(t,r){var i="",e,n,s;if(arguments.length<2){r=t;t={}}else if(!t||typeof t!=="object"){t={}}if(!t.style){t.style=f.none}else if(typeof t.style==="string"){t.style=f[t.style]}if(!(r instanceof Error)){i+="[not an Error] ";if(typeof r==="string"){let e=5e3;if(r.length>e){i+=t.style.errorMessage(M.control(r.slice(0,e-1),true))+"…"+t.style.length("("+r.length+" - TRUNCATED)")+t.style.newline}else{i+=t.style.errorMessage(M.control(r,true))+t.style.newline}return i}else if(!r||typeof r!=="object"||!r.name||typeof r.name!=="string"||!r.message||typeof r.message!=="string"){i+=o(t,r);return i}}if(r.stack&&!t.noErrorStack){e=u(t,r.stack)}n=r.type||r.constructor.name;s=r.code||r.name||r.errno||r.number;i+=t.style.errorType(n)+(s?" ["+t.style.errorType(s)+"]":"")+": ";i+=t.style.errorMessage(r.message)+"\n";if(e){i+=t.style.errorStack(e)+"\n"}if(r.from){i+=t.style.newline+t.style.errorFromMessage("From error:")+t.style.newline+l(t,r.from)}return i}r.inspectError=l;function u(l,e){if(arguments.length<2){e=l;l={}}else if(!l||typeof l!=="object"){l={}}if(!l.style){l.style=f.none}else if(typeof l.style==="string"){l.style=f[l.style]}if(!e){return}if((l.browser||c.browser)&&e.indexOf("@")!==-1){e=e.replace(/[{return l.style.errorStack(" at ")+(t?l.style.errorStackMethod(t)+" ":"")+l.style.errorStack("(")+(r?l.style.errorStackFile(r):l.style.errorStack("unknown"))+(i?l.style.errorStack(":")+l.style.errorStackLine(i):"")+(n?l.style.errorStack(":")+l.style.errorStackColumn(n):"")+l.style.errorStack(")")})}else{e=e.replace(/^[^\n]*\n/,"");e=e.replace(/^\s*(at)\s+(?:(?:(async|new)\s+)?([^\s:()[\]\n]+(?:\([^)]+\))?)\s)?(?:\[as ([^\s:()[\]\n]+)\]\s)?(?:\(?([^:()[\]\n]+):([0-9]+):([0-9]+)\)?)?$/gm,(e,t,r,i,n,s,o,a)=>{return l.style.errorStack(" at ")+(r?l.style.errorStackKeyword(r)+" ":"")+(i?l.style.errorStackMethod(i)+" ":"")+(n?l.style.errorStack("[as ")+l.style.errorStackMethodAs(n)+l.style.errorStack("] "):"")+l.style.errorStack("(")+(s?l.style.errorStackFile(s):l.style.errorStack("unknown"))+(o?l.style.errorStack(":")+l.style.errorStackLine(o):"")+(a?l.style.errorStack(":")+l.style.errorStackColumn(a):"")+l.style.errorStack(")")})}return e}r.inspectStack=u;var f={};var e=e=>e;f.none={trim:false,tab:" ",newline:"\n",comma:"",limit:e,type:e=>"<"+e+">",constant:e,funcName:e,constructorName:e=>"<"+e+">",length:e,key:e,index:e=>"["+e+"] ",number:e,inspect:e,string:e,errorType:e,errorMessage:e,errorStack:e,errorStackKeyword:e,errorStackMethod:e,errorStackMethodAs:e,errorStackFile:e,errorStackLine:e,errorStackColumn:e,errorFromMessage:e,truncate:(e,t)=>e.slice(0,t-1)+"…"};f.inline=Object.assign({},f.none,{trim:true,tab:"",newline:" ",comma:", ",length:()=>"",index:()=>""});f.color=Object.assign({},f.none,{limit:e=>n.bold+n.brightRed+e+n.reset,type:e=>n.italic+n.brightBlack+e+n.reset,constant:e=>n.cyan+e+n.reset,funcName:e=>n.italic+n.magenta+e+n.reset,constructorName:e=>n.magenta+e+n.reset,length:e=>n.italic+n.brightBlack+e+n.reset,key:e=>n.green+e+n.reset,index:e=>n.blue+"["+e+"]"+n.reset+" ",number:e=>n.cyan+e+n.reset,inspect:e=>n.cyan+e+n.reset,string:e=>n.blue+e+n.reset,errorType:e=>n.red+n.bold+e+n.reset,errorMessage:e=>n.red+n.italic+e+n.reset,errorStack:e=>n.brightBlack+e+n.reset,errorStackKeyword:e=>n.italic+n.bold+e+n.reset,errorStackMethod:e=>n.brightYellow+e+n.reset,errorStackMethodAs:e=>n.yellow+e+n.reset,errorStackFile:e=>n.brightCyan+e+n.reset,errorStackLine:e=>n.blue+e+n.reset,errorStackColumn:e=>n.magenta+e+n.reset,errorFromMessage:e=>n.yellow+n.underline+e+n.reset,truncate:(e,t)=>{var r=n.gray+"…"+n.reset;e=e.slice(0,t-r.length);var i=e.lastIndexOf("");if(i>=e.length-6){e=e.slice(0,i)}return e+r}});f.html=Object.assign({},f.none,{tab:"    ",newline:"
",limit:e=>''+e+"",type:e=>''+e+"",constant:e=>''+e+"",funcName:e=>''+e+"",constructorName:e=>''+e+"",length:e=>''+e+"",key:e=>''+e+"",index:e=>'['+e+"] ",number:e=>''+e+"",inspect:e=>''+e+"",string:e=>''+e+"",errorType:e=>''+e+"",errorMessage:e=>''+e+"",errorStack:e=>''+e+"",errorStackKeyword:e=>""+e+"",errorStackMethod:e=>''+e+"",errorStackMethodAs:e=>''+e+"",errorStackFile:e=>''+e+"",errorStackLine:e=>''+e+"",errorStackColumn:e=>''+e+"",errorFromMessage:e=>''+e+""})}).call(this)}).call(this,{isBuffer:t("../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js")},t("_process"))},{"../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js":19,"./ansi.js":2,"./escape.js":4,_process:20}],8:[function(e,t,r){t.exports={"߀":"0","́":""," ":" ","Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ɓ":"B","c":"C","Ⓒ":"C","C":"C","Ꜿ":"C","Ḉ":"C","Ç":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ɗ":"D","Ɖ":"D","ᴅ":"D","Ꝺ":"D","Ð":"Dh","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","ɛ":"E","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","ᴇ":"E","ꝼ":"F","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","ɢ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","ȷ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","ϻ":"M","Ꞥ":"N","Ƞ":"N","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ɲ":"N","Ꞑ":"N","ᴎ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Þ":"Th","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ɑ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","Ƃ":"b","ⓒ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c",C:"c","Ć":"c","Ĉ":"c","Ċ":"c","Č":"c","Ƈ":"c","Ȼ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","Ƌ":"d","Ꮷ":"d","ԁ":"d","Ɦ":"d","ð":"dh","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ff":"ff","fi":"fi","fl":"fl","ffi":"ffi","ffl":"ffl","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ꝿ":"g","ᵹ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ɭ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","ԉ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ɔ":"o","ᴑ":"o","œ":"oe","ƣ":"oi","ꝏ":"oo","ȣ":"ou","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ρ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ʂ":"s","ß":"ss","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","þ":"th","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"}},{}],9:[function(e,t,r){"use strict";var i=e("./latinize-map.json");t.exports=function(e){return e.replace(/[^\u0000-\u007e]/g,e=>{return i[e]||e})}},{"./latinize-map.json":8}],10:[function(e,t,r){"use strict";r.resize=function(e,t){if(e.length===t){return e}else if(e.length>t){return e.slice(0,t)}return e+" ".repeat(t-e.length)};r.occurrenceCount=function(e,t,r=false){if(!e||!t){return 0}var i=0,n=0,s=r?1:t.length;while((n=e.indexOf(t,n))!==-1){i++;n+=s}return i}},{}],11:[function(e,t,r){"use strict";const S=1;const M=2;const C=3;const x=4;const A=5;function v(e,t){if(j(t)){return M}if(t<=31||t===127){return S}if(P(t)){return x}if(e.toUpperCase()!==e.toLowerCase()){return C}return A}function j(e){if(e===32||e===9||e===160||e===45||e===95){return true}return false}function P(e){if(e>=48&&e<=57){return true}return false}function i(e,t){e=""+e;t=""+t;var r,i,n,s,o,a,l,u=e.trim(),f=u.length,c,g,p,h,d,y,m,b=t.trim(),w=b.length,k=0;for(r=c=0;ry?1:-1}if(!k&&n!==p){k=n!==a?-1:1}break;case x:i=r+1;while(P(u.charCodeAt(i))){i++}l=parseFloat(u.slice(r,i));g=c+1;while(P(b.charCodeAt(g))){g++}m=parseFloat(b.slice(c,g));if(l!==m){return l-m}if(!k&&i-r!==g-c){k=i-r-(g-c)}r=i-1;c=g-1;break}}if(k){return k}return f-r-(w-c)||f-w||e.length-t.length}t.exports=i},{}],12:[function(e,t,r){"use strict";var n=e("./escape.js");r.regexp={};r.regexp.array2alternatives=function e(t){var r,i=t.slice();i.sort((e,t)=>{return t.length-e.length});for(r=0;r{if(!r||typeof r!=="string"){return""}var t=e.dashToSpace??a.dashToSpace,i=e.underscoreToSpace??a.underscoreToSpace,n=e.zealous??a.zealous,s=e.preserveAllCaps??a.preserveAllCaps,o=e.lowerCaseWords??a.lowerCaseWords;o=o instanceof Set?o:Array.isArray(o)?new Set(o):null;if(t){r=r.replace(/-+/g," ")}if(i){r=r.replace(/_+/g," ")}r=r.replace(/ +/g," ").trim();return r.replace(/[^\s_-]+/g,(t,e)=>{if(o&&e&&e+t.lengthString.fromCodePoint(...e);f.decode=e=>Array.from(e,e=>e.codePointAt(0));f.firstCodePoint=e=>e.codePointAt(0);f.firstChar=e=>e.length?String.fromCodePoint(e.codePointAt(0)):undefined;f.toArray=e=>Array.from(e);f.toCells=(e,t,r=4,i=0,...n)=>{var s,o,a,l,u=[];for(s of t){o=s.codePointAt(0);if(o===10){i=0}else if(o===9){a=r-i%r-1;u.push(new e("\t",1,...n));i+=1+a;while(a--){u.push(new e(" ",-2,...n))}}else{l=f.codePointWidth(o),u.push(new e(s,l,...n));i+=l;while(--l>0){u.push(new e(" ",-1,...n))}}}return u};f.fromCells=e=>{var t,r="";for(t of e){if(!t.filler){r+=t.char}}return r};f.length=e=>{var t,r=0;for(t of e){r++}return r};f.width=e=>{var t,r=0;for(t of e){r+=f.codePointWidth(t.codePointAt(0))}return r};f.arrayWidth=(e,t)=>{var r,i=0;if(t===undefined){t=e.length}for(r=0;rs;f.widthLimit=f.truncateWidth=(e,t)=>{var r,i,n=0;s=0;for(r of e){i=f.codePointWidth(r.codePointAt(0));if(s+i>t){return e.slice(0,n)}s+=i;n+=r.length}return e};f.surrogatePair=e=>{var t=e.charCodeAt(0);if(t<55296||t>=57344){return 0}else if(t<56320){return 1}return-1};f.isFullWidth=e=>f.isFullWidthCodePoint(e.codePointAt(0));f.charWidth=e=>f.codePointWidth(e.codePointAt(0));const i=new Map;(function(){var e=t("./unicode-emoji-width-ranges.json");for(let t of e){for(let e=t.s;e<=t.e;e++){i.set(e,t.w)}}})();f.codePointWidth=e=>{if(f.isEmojiCodePoint(e)){return i.get(e)??2}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return 2}if(f.isEmojiModifierCodePoint(e)||f.isZeroWidthDiacriticCodePoint(e)){return 0}return 1};f.isFullWidthCodePoint=e=>f.codePointWidth(e)===2;f.toFullWidth=e=>{return String.fromCodePoint(...Array.from(e,e=>{var t=e.codePointAt(0);return t>=33&&t<=126?65280+t-32:t}))};f.isZeroWidthDiacritic=e=>f.isZeroWidthDiacriticCodePoint(e.codePointAt(0));f.isZeroWidthDiacriticCodePoint=e=>768<=e&&e<=879||6832<=e&&e<=6911||7616<=e&&e<=7679||8400<=e&&e<=8447||65056<=e&&e<=65071||e===12441||e===12442||2304<=e&&e<=2307||2362<=e&&e<=2391&&e!==2365&&e!==2384||e===2402||e===2403||e===3633||3636<=e&&e<=3642||3655<=e&&e<=3662;f.isEmoji=e=>f.isEmojiCodePoint(e.codePointAt(0));f.isEmojiCodePoint=e=>9728<=e&&e<=9983||9984<=e&&e<=10175||126976<=e&&e<=127487||127744<=e&&e<=127994||128e3<=e&&e<=129791;f.isEmojiModifier=e=>f.isEmojiModifierCodePoint(e.codePointAt(0));f.isEmojiModifierCodePoint=e=>127995<=e&&e<=127999||e===65039},{"./unicode-emoji-width-ranges.json":15}],17:[function(e,t,r){"use strict";const k=e("./unicode.js");const S={"!":true,"?":true,":":true,";":true};t.exports=function e(t,r){var i=0,n,s,o,a,l,u,f,c,g,p,h=true,d=k.toArray(t),y=false,m,b=[];if(typeof r!=="object"){r={width:r}}if(!r.width||typeof r.width!=="number"||r.width<=0){r.width=80}o=r.offset?r.width-r.offset:r.width;if(typeof r.glue!=="string"){r.glue="\n"}if(r.regroupFn){d=r.regroupFn(d);p=r.charWidthFn||k.width}else{p=r.charWidthFn||k.charWidth}u=d.length;var w=()=>{if(!h||y){while(d[i]===" "){i++}if(y&&d[i]==="\n"){h=true;i++}}if(i>=u){return null}h=false;y=false;g=false;n=f=i;l=c=0;for(;;){if(n>=u){return d.slice(i,n).join("")}if(d[n]==="\n"){h=true;a=d.slice(i,n++).join("");if(r.fill){a+=" ".repeat(o-l)}return a}if(r.skipFn){s=r.skipFn(d,n);if(s!==n){n=s;continue}}if(d[n]===" "&&!g&&!S[d[n+1]]){f=n;c=l}else{g=false}l+=p(d[n]);if(l>o){y=true;if(f!==i){n=f}else if(ot===b.length-1?e:e.trimRight())}if(!r.noJoin){b=b.join(r.glue)}if(r.updateOffset){r.offset=l}return b}},{"./unicode.js":16}],18:[function(e,t,r){},{}],19:[function(e,t,r){t.exports=function(e){return e!=null&&(i(e)||n(e)||!!e._isBuffer)};function i(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function n(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&i(e.slice(0,0))}},{}],20:[function(e,t,r){var i=t.exports={};var n;var s;function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=o}}catch(e){n=o}try{if(typeof clearTimeout==="function"){s=clearTimeout}else{s=a}}catch(e){s=a}})();function l(t){if(n===setTimeout){return setTimeout(t,0)}if((n===o||!n)&&setTimeout){n=setTimeout;return setTimeout(t,0)}try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}function u(t){if(s===clearTimeout){return clearTimeout(t)}if((s===a||!s)&&clearTimeout){s=clearTimeout;return clearTimeout(t)}try{return s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}var f=[];var c=false;var g;var p=-1;function h(){if(!c||!g){return}c=false;if(g.length){f=g.concat(f)}else{p=-1}if(f.length){d()}}function d(){if(c){return}var e=l(h);c=true;var t=f.length;while(t){g=f;f=[];while(++p1){for(var r=1;r20||this.exposant<-20){return this.toScientificString(...e)}return this.toNoExpString(...e)};i.prototype.toExponential=i.prototype.toExponentialString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}e+="e"+(this.exposant>0?"+":"")+(this.exposant-1);return e};const n=["⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"];const s="⁺";const o="⁻";const a="0".charCodeAt(0);i.prototype.toScientific=i.prototype.toScientificString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}var t=(this.exposant<=0?o:"")+(""+Math.abs(this.exposant-1)).split("").map(e=>n[e.charCodeAt(0)-a]).join("");e+=" × 10"+t;return e};i.prototype.toNoExp=i.prototype.toNoExpString=function(e=1,t=0,r=false,i=false,n=this.exposant){if(this.special!==null){return""+this.special}var s=[],o=[],a=this.sign<0?"-":i?"+":"";if(!this.digits.length){c(s,0,e);if(t&&!r){c(o,0,t)}}else if(n<=0){c(s,0,e);c(o,0,-n);g(o,this.digits);if(t&&this.digits.length-n=this.digits.length){if(n0)){c(o,0,t-this.digits.length+n)}}a+=this.groupSeparator?this.groupDigits(s,this.groupSeparator):s.join("");if(o.length){a+=this.decimalSeparator+(this.decimalGroupSeparator?this.groupDigits(o,this.decimalGroupSeparator):o.join(""))}else if(this.forceDecimalSeparator){a+=this.decimalSeparator}return a};const l=["","k","M","G","T","P","E","Z","Y"];const u=["","m","µ","n","p","f","a","z","y"];i.prototype.toMetric=i.prototype.toMetricString=function(e=1,t=0,r=false,i=false){if(this.special!==null){return""+this.special}if(!this.digits.length){return this.sign>0?"0":"-0"}var n="",s;if(this.exposant>0){s=1+(this.exposant-1)%3;n=l[Math.floor((this.exposant-1)/3)];if(n===undefined){return this.toScientificString()}}else{s=3- -this.exposant%3;n=u[1+Math.floor(-this.exposant/3)];if(n===undefined){return this.toScientificString()}}return this.toNoExpString(e,t,r,i,s)+n};i.prototype.precision=function(r,e=0){var t;if(this.special!==null||r>=this.digits.length){return this}if(r<0){this.digits.length=0;return this}e*=this.sign;if(e<0){t=this.digits.length>r+4&&this.digits[r]===9&&this.digits[r+1]===9&&this.digits[r+2]===9&&this.digits[r+3]===9&&this.digits[r+4]===9}else if(e>0){t=this.digits[r]>0||this.digits[r+1]>0||this.digits[r+2]>0||this.digits[r+3]>0||this.digits[r+4]>0}else{t=this.digits[r]>=5}if(t){let e=r-1,t=false;for(;e>=0;e--){if(this.digits[e]<9){this.digits[e]++;t=true;break}else{this.digits[e]=0}}if(!t){this.exposant++;this.digits[0]=1;this.digits.length=1}else{this.digits.length=e+1}}else{this.digits.length=r;this.removeTrailingZero()}return this};i.prototype.round=function(e=0,t=0){var r=this.exposant+e;return this.precision(r,t)};i.prototype.floor=function(e=0){var t=this.exposant+e;return this.precision(t,-1)};i.prototype.ceil=function(e=0){var t=this.exposant+e;return this.precision(t,1)};i.prototype.removeTrailingZero=function(){var e=this.digits.length-1;while(e>=0&&this.digits[e]===0){e--}this.digits.length=e+1};const f=3;i.prototype.groupDigits=function(e,t,r=false){var i="",n=r?0:f-e.length%f,s=0,o=e.length;for(;s{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[38;2;"+t+";"+r+";"+i+"m"};i.bgTrueColor=(t,r,i)=>{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[48;2;"+t+";"+r+";"+i+"m"};const o={0:null,1:{bold:true},2:{dim:true},22:{bold:false,dim:false},3:{italic:true},23:{italic:false},4:{underline:true},24:{underline:false},5:{blink:true},25:{blink:false},7:{inverse:true},27:{inverse:false},8:{hidden:true},28:{hidden:false},9:{strike:true},29:{strike:false},30:{color:0},31:{color:1},32:{color:2},33:{color:3},34:{color:4},35:{color:5},36:{color:6},37:{color:7},39:{color:"default"},90:{color:8},91:{color:9},92:{color:10},93:{color:11},94:{color:12},95:{color:13},96:{color:14},97:{color:15},40:{bgColor:0},41:{bgColor:1},42:{bgColor:2},43:{bgColor:3},44:{bgColor:4},45:{bgColor:5},46:{bgColor:6},47:{bgColor:7},49:{bgColor:"default"},100:{bgColor:8},101:{bgColor:9},102:{bgColor:10},103:{bgColor:11},104:{bgColor:12},105:{bgColor:13},106:{bgColor:14},107:{bgColor:15}};i.parse=e=>{var t,r,i,n,s=[];for([,t,r]of e.matchAll(/\x1b\[([0-9;]+)m|(.[^\x1b]*)/g)){if(r){if(s.length){s[s.length-1].text+=r}else{s.push({text:r})}}else{t.split(";").forEach(e=>{n=o[e];if(n===undefined){return}if(!s.length||s[s.length-1].text){if(!n){i={text:""}}else{i=Object.assign({},i,n);i.text=""}s.push(i)}else{if(!n){s[s.length-1]={text:""}}else{Object.assign(i,n)}}})}}return s}},{}],3:[function(e,t,r){"use strict";var i={};t.exports=i;i.toCamelCase=function(e,s=false,o=false){if(!e||typeof e!=="string"){return""}return e.replace(/(?:^[\s_-]*|([\s_-]+))(([^\s_-]?)([^\s_-]*))/g,(e,t,r,i,n)=>{if(s){if(!t&&!o){return r}if(!i){return""}return i.toUpperCase()+n}if(!t&&!o){return r.toLowerCase()}if(!i){return""}return i.toUpperCase()+n.toLowerCase()})};i.camelCaseToSeparated=function(e,s=" ",t=true){if(!e||typeof e!=="string"){return""}if(!t){return e.replace(/^([A-Z])|([A-Z])/g,(e,t,r)=>{if(t){return t.toLowerCase()}return s+r.toLowerCase()})}return e.replace(/(?:(^)|)([A-Z]+)(?:($)|(?=[a-z]))/g,(e,t,r,i)=>{t=t==="";i=i==="";var n=t?"":s;return r.length===1?n+r.toLowerCase():i?n+r:r.length===2?n+r[0].toLowerCase()+s+r[1].toLowerCase():n+r.slice(0,-1)+s+r.slice(-1).toLowerCase()})};i.camelCaseToDash=i.camelCaseToDashed=e=>i.camelCaseToSeparated(e,"-",false)},{}],4:[function(e,t,r){"use strict";r.regExp=r.regExpPattern=e=>e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1");r.regExpReplacement=e=>e.replace(/\$/g,"$$$$");r.format=e=>e.replace(/%/g,"%%");r.jsSingleQuote=e=>r.control(e).replace(/'/g,"\\'");r.jsDoubleQuote=e=>r.control(e).replace(/"/g,'\\"');r.shellArg=e=>"'"+e.replace(/'/g,"'\\''")+"'";var i={"\r":"\\r","\n":"\\n","\t":"\\t","":"\\x7f"};r.control=(e,r=false)=>e.replace(/[\x00-\x1f\x7f]/g,e=>{if(r&&(e==="\n"||e==="\t")){return e}if(i[e]!==undefined){return i[e]}var t=e.charCodeAt(0).toString(16);if(t.length%2){t="0"+t}return"\\x"+t});var n={"&":"&","<":"<",">":">",'"':""","'":"'"};r.html=e=>e.replace(/[&<>]/g,e=>n[e]);r.htmlAttr=e=>e.replace(/[&<>"]/g,e=>n[e]);r.htmlSpecialChars=e=>e.replace(/[&<>"']/g,e=>n[e]);r.unicodePercentEncode=e=>e.replace(/[\x00-\x1f\u0100-\uffff\x7f%]/g,e=>{try{return encodeURI(e)}catch(e){return""}});r.httpHeaderValue=e=>r.unicodePercentEncode(e)},{}],5:[function(O,e,T){(function(P){(function(){"use strict";const u=O("./inspect.js").inspect;const f=O("./inspect.js").inspectError;const t=O("./escape.js");const n=O("./ansi.js");const s=O("./unicode.js");const i=O("./naturalSort.js");const h=O("./StringNumber.js");T.formatMethod=function(...d){var y,e=d[0],m=1,w=d.length;if(typeof e!=="string"){if(!e){e=""}else if(typeof e.toString==="function"){e=e.toString()}else{e=""}}var b={hasMarkup:false,shift:null,markupStack:[]};if(this.markupReset&&this.startingMarkupReset){e=(typeof this.markupReset==="function"?this.markupReset(b.markupStack):this.markupReset)+e}e=e.replace(/\^\[([^\]]*)]?|\^(.)|(%%)|%([+-]?)([0-9]*)(?:\[([^\]]*)\])?([a-zA-Z])/g,(e,t,r,i,n,s,o,a)=>{var l,u,f,c,g,p,h=[];if(i){return"%"}if(t){r=t}if(r){if(this.noMarkup){return"^"+r}return k.call(this,b,e,r)}if(s){s=parseInt(s,10);if(n){if(n==="+"){s=m+s}else if(n==="-"){s=m-s}}}else{s=m}m++;if(s>=w||s<1){y=undefined}else{y=d[s]}if(S[a]){l=S[a](y,o,this);if(this.argumentSanitizer&&!S[a].noSanitize){l=this.argumentSanitizer(l)}if(this.escapeMarkup&&!S[a].noEscapeMarkup){l=T.escapeMarkup(l)}if(o&&!S[a].noCommonModeArg){l=M(l,o)}return l}if(a==="F"){m--;if(o===undefined){return""}f=o.split(":");c=f[0];g=f[1];if(!c){return""}if(g&&(p=g.match(/%([+-]?)([0-9]*)[a-zA-Z]/g))){for(u=0;u=w||s<1){h[u]=undefined}else{h[u]=d[s]}}}if(!this||!this.fn||typeof this.fn[c]!=="function"){return""}return this.fn[c].apply(this,h)}return""});if(b.hasMarkup&&this.markupReset&&this.endingMarkupReset){e+=typeof this.markupReset==="function"?this.markupReset(b.markupStack):this.markupReset}if(this.extraArguments){for(;m1){a.push({text:""})}}else{if(o&&o.text.length){a.push(Object.assign({text:""},...u.markupStack))}else{if(o){Object.assign(o,t)}else{a.push(Object.assign({text:""},t))}}}}}return a}if(this.markupReset&&this.startingMarkupReset){l=(typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset)+l}l=l.replace(/\^\[([^\]]*)]?|\^(.)/g,(e,t,r)=>k.call(this,u,e,t||r));if(u.hasMarkup&&this.markupReset&&this.endingMarkupReset){l+=typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset}return l};function k(e,t,r){var i,n,s,o,a;if(r==="^"){return"^"}if(this.shiftMarkup&&this.shiftMarkup[r]){e.shift=this.shiftMarkup[r];return""}if(r.length>1&&this.dataMarkup&&(a=r.indexOf(":"))!==-1){n=r.slice(0,a);i=this.dataMarkup[n];if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;s=r.slice(a+1);if(typeof i==="function"){o=i(e.markupStack,n,s)}else{o={[i]:s};l(e,o)}return o}if(e.shift){i=this.shiftedMarkup?.[e.shift]?.[r];e.shift=null}else{i=this.markup?.[r]}if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;if(typeof i==="function"){o=i(e.markupStack,r)}else{o=i;l(e,o)}return o}function l(t,r){if(Array.isArray(r)){for(let e of r){if(e===null){t.markupStack.length=0}else{t.markupStack.push(e)}}}else{if(r===null){t.markupStack.length=0}else{t.markupStack.push(r)}}}T.stripMarkup=e=>e.replace(/\^\[[^\]]*]?|\^./g,e=>e==="^^"?"^":e==="^ "?" ":"");T.escapeMarkup=e=>e.replace(/\^/g,"^^");const r={argumentSanitizer:e=>t.control(e,true),extraArguments:true,color:false,noMarkup:false,escapeMarkup:false,endingMarkupReset:true,startingMarkupReset:false,markupReset:n.reset,shiftMarkup:{"#":"background"},markup:{":":n.reset," ":n.reset+" ","-":n.dim,"+":n.bold,_:n.underline,"/":n.italic,"!":n.inverse,b:n.blue,B:n.brightBlue,c:n.cyan,C:n.brightCyan,g:n.green,G:n.brightGreen,k:n.black,K:n.brightBlack,m:n.magenta,M:n.brightMagenta,r:n.red,R:n.brightRed,w:n.white,W:n.brightWhite,y:n.yellow,Y:n.brightYellow},shiftedMarkup:{background:{":":n.reset," ":n.reset+" ",b:n.bgBlue,B:n.bgBrightBlue,c:n.bgCyan,C:n.bgBrightCyan,g:n.bgGreen,G:n.bgBrightGreen,k:n.bgBlack,K:n.bgBrightBlack,m:n.bgMagenta,M:n.bgBrightMagenta,r:n.bgRed,R:n.bgBrightRed,w:n.bgWhite,W:n.bgBrightWhite,y:n.bgYellow,Y:n.bgBrightYellow}},dataMarkup:{fg:(e,t,r)=>{var i=n.fgColor[r]||n.trueColor(r);e.push(i);return i},bg:(e,t,r)=>{var i=n.bgColor[r]||n.bgTrueColor(r);e.push(i);return i}},markupCatchAll:(e,t,r)=>{var i="";if(r===undefined){if(t[0]==="#"){i=n.trueColor(t)}else if(typeof n[t]==="string"){i=n[t]}}e.push(i);return i}};r.dataMarkup.color=r.dataMarkup.c=r.dataMarkup.fgColor=r.dataMarkup.fg;r.dataMarkup.bgColor=r.dataMarkup.bg;T.createFormatter=e=>T.formatMethod.bind(Object.assign({},r,e));T.format=T.formatMethod.bind(r);T.format.default=r;T.formatNoMarkup=T.formatMethod.bind(Object.assign({},r,{noMarkup:true}));T.formatThirdPartyMarkup=T.formatMethod.bind(Object.assign({},r,{noMarkup:true,escapeMarkup:true}));T.createMarkup=e=>T.markupMethod.bind(Object.assign({},r,e));T.markup=T.markupMethod.bind(r);T.format.count=function(e,t=false){var r,i,n,s=1,o=0;if(typeof e!=="string"){return 0}var a=t?/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]/g:/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]|(\^\[[^\]]*]?|\^.)/g;for([,n,i,r]of e.matchAll(a)){if(r){continue}if(i){i=parseInt(i,10);if(n){if(n==="+"){i=s+i}else if(n==="-"){i=s-i}}}else{i=s}s++;if(o{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};S.r=e=>S.s(e);S.r.noSanitize=true;S.S=(e,t,r)=>{var i=r.escapeMarkup?e=>r.argumentSanitizer?r.argumentSanitizer(e):e:e=>T.markupMethod.call(r,r.argumentSanitizer?r.argumentSanitizer(e):e);if(typeof e==="string"){return i(e)}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return i(e.toString())}return i("("+e+")")};S.S.noSanitize=true;S.S.noEscapeMarkup=true;S.S.noCommonModeArg=true;S.N=(e,t)=>{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return""+e}if(typeof e==="number"){return S.f(e,".3g ")}if(Array.isArray(e)){e=e.map(e=>S.N(e,true));if(t){return"["+e.join(",")+"]"}return e.join(", ")}if(P.isBuffer(e)){e=[...e].map(e=>{e=e.toString(16);if(e.length===1){e="0"+e}return e});return"<"+e.join(" ")+">"}var r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype){e=Object.entries(e).sort(i).map(e=>e[0]+": "+S.N(e[1],true));if(t){return"{"+e.join(", ")+"}"}return e.join(", ")}if(typeof e.inspect==="function"){return e.inspect()}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};S.n=e=>S.N(e,true);S.f=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};S.f.noSanitize=true;S.P=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e*=100;var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)+"%"};S.P.noSanitize=true;S.p=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e=(e-1)*100;var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal,true)+"%"};S.p.noSanitize=true;S.k=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"0"}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision||r.rounding===null){i.precision(r.precision||3)}return i.toMetricString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};S.k.noSanitize=true;S.e=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toExponential()};S.e.noSanitize=true;S.K=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new h(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toScientific()};S.K.noSanitize=true;S.d=S.i=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.floor(e)}return"0"};S.i.noSanitize=true;S.u=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0)}return"0"};S.u.noSanitize=true;S.U=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),1)}return"1"};S.U.noSanitize=true;S.m=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var t="";if(e<0){t="-";e=-e}var r=j(e),i=e-r;if(!i){return t+r+"°"}var n=j(i*60),s=j(i*3600-n*60);if(s){return t+r+"°"+(""+n).padStart(2,"0")+"′"+(""+s).padStart(2,"0")+"″"}return t+r+"°"+(""+n).padStart(2,"0")+"′"};S.m.noSanitize=true;S.t=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var r,i,n,s,o,a="",l=b(t),u=l.roundingType,f=l.useAbbreviation?"h":":",c=l.useAbbreviation?"min":":",g=l.useAbbreviation?"s":".",p=l.useAbbreviation;n=e/1e3;if(n<0){n=-n;u*=-1;a="-"}if(n<60&&!l.forceMinutes){s=new h(n,g,undefined,p);s.round(l.rounding,u);if(s.toNumber()<60){o=s.toString(1,l.rightPadding,l.rightPaddingOnlyIfDecimal);return a+o}n=60}i=Math.floor(n/60);n=n%60;s=new h(n,g,undefined,p);s.round(l.rounding,u);if(s.toNumber()<60){o=s.toString(2,l.rightPadding,l.rightPaddingOnlyIfDecimal)}else{i++;n=0;s.set(n);o=s.toString(2,l.rightPadding,l.rightPaddingOnlyIfDecimal)}if(i<60&&!l.forceHours){return a+i+c+o}r=Math.floor(i/60);i=i%60;return a+r+f+(""+i).padStart(2,"0")+c+o};S.t.noSanitize=true;S.h=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(16)}return"0"};S.h.noSanitize=true;S.x=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"00"}var t=""+Math.max(Math.floor(e),0).toString(16);if(t.length%2){t="0"+t}return t};S.x.noSanitize=true;S.o=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(8)}return"0"};S.o.noSanitize=true;S.b=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(2)}return"0"};S.b.noSanitize=true;S.X=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("hex")};S.X.noSanitize=true;S.z=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("base64")};S.Z=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]{1,2}$/g,"")};const o={};S.I=(e,t,r)=>C(e,t,r,o);S.I.noSanitize=true;const a={noFunc:true,enumOnly:true,noDescriptor:true,useInspect:true,useInspectPropertyBlackList:true};S.Y=(e,t,r)=>C(e,t,r,a);S.Y.noSanitize=true;const c={minimal:true,noIndex:true};S.O=(e,t,r)=>C(e,t,r,c);S.O.noSanitize=true;const g={};S.E=(e,t,r)=>C(e,t,r,g,true);S.E.noSanitize=true;S.J=e=>e===undefined?"null":JSON.stringify(e);S.D=()=>"";S.D.noSanitize=true;const p=/([a-zA-Z])(.[^a-zA-Z]*)/g;const d=/([a-zA-Z]|^)([^a-zA-Z]*)/g;function M(r,i){for(let[,e,t]of i.matchAll(p)){if(e==="L"){let e=s.width(r);t=+t||1;if(e>t){r=s.truncateWidth(r,t-1).trim()+"…";e=s.width(r)}if(et){r=s.truncateWidth(r,t-1).trim()+"…";e=s.width(r)}if(e{if(e===t){return 1}if(e.length===0||t.length===0){return 0}return Math.max(0,1-M.levenshtein(e,t)/t.length)};const C=0;const x=.88;const S=.9;M.bestMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n,s,o,a,l=-1,u=null;for(n=0,s=t.length;ni){i=o;u=a;l=n}}return r.indexOf?l:u};M.topMatch=(r,e,t={})=>{var i=t.scoreLimit||C,n=t.deltaRate||S,s,o,a;a=e.map((e,t)=>({pattern:e,index:t,score:M.score(r,e)}));a.sort((e,t)=>t.score-e.score);if(a[0].score<=i){return[]}i=Math.max(i,a[0].score*n);for(s=1,o=a.length;se.index):a.map(e=>e.pattern)};const i=new Set(["a","an","the","this","that","those","some","of","in","on","at","my","your","her","his","its","our","their"]);function A(e,t=i){return e.split(/[ '"/|,:_-]+/g).filter(e=>e&&!t.has(e))}M.bestTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||x,s,o,a,l,u,f,c,g,p,h,d=i,y,m,w=A(e),b,k=-1,S=null;if(!w.length||!t.length){return r.indexOf?k:S}for(s=0,o=t.length;sb){b=m;if(m===1){break}}}h+=b}h/=w.length;if(w.length!==g.length){h*=n**Math.abs(g.length-w.length)}if(h>d){d=h;S=c;k=s}}return r.indexOf?k:S};M.topTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||x,s=r.deltaRate||S,o,a,l,u,f,c,g,p,h,d,y,m,w=A(e),b,k=[];if(!w.length||!t.length){return[]}for(o=0,a=t.length;ob){b=m;if(m===1){break}}}d+=b}d/=w.length;if(w.length!==p.length){d*=n**Math.abs(p.length-w.length)}k.push({pattern:g,index:o,score:d})}k.sort((e,t)=>t.score-e.score);if(k[0].score<=i){return[]}i=Math.max(i,k[0].score*s);for(o=1,a=k.length;oe.index):k.map(e=>e.pattern)};const c=[];const g=[];M.levenshtein=(t,r)=>{if(t===r){return 0}if(t.length>r.length){let e=t;t=r;r=e}let e=t.length;let i=r.length;while(e>0&&t.charCodeAt(e-1)===r.charCodeAt(i-1)){e--;i--}let n=0;while(no?l>o?o+1:l:l>a?a+1:l}}return o}},{}],7:[function(t,e,r){(function(P,c){(function(){"use strict";const M=t("./escape.js");const n=t("./ansi.js");const C={};const x=new Set([Object,Array]);function o(e,t){if(arguments.length<2){t=e;e={}}else if(!e||typeof e!=="object"){e={}}var r={depth:0,ancestors:[]};if(!e.style){e.style=f.none}else if(typeof e.style==="string"){e.style=f[e.style]}if(e.depth===undefined){e.depth=3}if(e.maxLength===undefined){e.maxLength=250}if(e.outputMaxLength===undefined){e.outputMaxLength=5e3}if(e.nofunc){e.noFunc=true}if(e.minimal){e.noFunc=true;e.noDescriptor=true;e.noType=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}if(e.minimalPlusConstructor){e.noFunc=true;e.noDescriptor=true;e.noTypeButConstructor=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}var i=A(r,e,t);if(i.length>e.outputMaxLength){i=e.style.truncate(i,e.outputMaxLength)}return i}r.inspect=o;function A(t,r,e){var i,n,s,o,a,l,u,f,c,g,p,h,d,y,m="",w="",b="",k,S;c=typeof e;p=(r.tab??r.style.tab).repeat(t.depth);if(c==="function"&&r.noFunc){return""}if(t.key!==undefined){if(t.descriptor){b=[];if(!t.descriptor.configurable){b.push("-conf")}if(!t.descriptor.enumerable){b.push("-enum")}if(!t.descriptor.writable){b.push("-w")}if(b.length){b=b.join(" ")}else{b=""}}if(t.keyIsProperty){if(v(t.key)){w='"'+r.style.key(t.key)+'": '}else{w=r.style.key(t.key)+": "}}else if(!r.noIndex){w=r.style.index(t.key)}if(b){b=" "+r.style.type(b)}}g=t.noPre?"":p+w;if(e===undefined){m+=g+r.style.constant("undefined")+b+r.style.newline}else if(e===C){m+=g+r.style.constant("[empty]")+b+r.style.newline}else if(e===null){m+=g+r.style.constant("null")+b+r.style.newline}else if(e===false){m+=g+r.style.constant("false")+b+r.style.newline}else if(e===true){m+=g+r.style.constant("true")+b+r.style.newline}else if(c==="number"){m+=g+r.style.number(e.toString())+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("number"))+b+r.style.newline}else if(c==="string"){if(e.length>r.maxLength){m+=g+'"'+r.style.string(M.control(e.slice(0,r.maxLength-1)))+'…"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+" - TRUNCATED)"))+b+r.style.newline}else{m+=g+'"'+r.style.string(M.control(e))+'"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+")"))+b+r.style.newline}}else if(P.isBuffer(e)){m+=g+r.style.inspect(e.inspect())+(r.noType?"":" "+r.style.type("Buffer")+r.style.length("("+e.length+")"))+b+r.style.newline}else if(c==="object"||c==="function"){n=s="";d=false;if(c==="function"){d=true;n=" "+r.style.funcName(e.name?e.name:"(anonymous)");s=r.style.length("("+e.length+")")}h=false;if(Array.isArray(e)){h=true;s=r.style.length("("+e.length+")")}if(!e.constructor){u="(no constructor)"}else if(!e.constructor.name){u="(anonymous)"}else{u=e.constructor.name}l=!e.constructor||x.has(e.constructor);u=r.style.constructorName(u);o=Object.getPrototypeOf(e);m+=g;if(!r.noType&&(!r.noTypeButConstructor||!l)){if(t.forceType&&!r.noType&&!r.noTypeButConstructor){m+=r.style.type(t.forceType)}else if(r.noTypeButConstructor){m+=u}else{m+=u+n+s+" "+r.style.type(c)+b}if(!d||r.funcDetails){m+=" "}}if(h&&r.noArrayProperty){a=[...Array(e.length).keys()]}else{a=Object.getOwnPropertyNames(e)}if(r.sort){a.sort()}y=j(e,t,r);if(r.protoBlackList&&r.protoBlackList.has(o)){m+=r.style.limit("[skip]")+r.style.newline}else if(y!==undefined){if(typeof y==="string"){m+="=> "+y+r.style.newline}else{m+="=> "+A({depth:t.depth,ancestors:t.ancestors,noPre:true},r,y)}}else if(d&&!r.funcDetails){m+=r.style.newline}else if(!a.length&&!r.proto){m+=(h?"[]":"{}")+r.style.newline}else if(t.depth>=r.depth){m+=r.style.limit("[depth limit]")+r.style.newline}else if(t.ancestors.indexOf(e)!==-1){m+=r.style.limit("[circular]")+r.style.newline}else{m+=(h?"[":"{")+r.style.newline;S=t.ancestors.slice();S.push(e);for(i=0;i";if(t==="fulfilled"){r+=" "+A({depth:n.depth,ancestors:n.ancestors,noPre:true},s,e[1])}else if(t==="rejected"){if(e[1]instanceof Error){r+=" "+l({style:s.style,noErrorStack:true},e[1])}else{r+=" "+A({depth:n.depth,ancestors:n.ancestors,noPre:true},s,e[1])}}return r}}if(i._bsontype){return i.toString()}if(s.useInspect&&typeof i.inspect==="function"){return i.inspect()}return}function l(t,r){var i="",e,n,s;if(arguments.length<2){r=t;t={}}else if(!t||typeof t!=="object"){t={}}if(!t.style){t.style=f.none}else if(typeof t.style==="string"){t.style=f[t.style]}if(!(r instanceof Error)){i+="[not an Error] ";if(typeof r==="string"){let e=5e3;if(r.length>e){i+=t.style.errorMessage(M.control(r.slice(0,e-1),true))+"…"+t.style.length("("+r.length+" - TRUNCATED)")+t.style.newline}else{i+=t.style.errorMessage(M.control(r,true))+t.style.newline}return i}else if(!r||typeof r!=="object"||!r.name||typeof r.name!=="string"||!r.message||typeof r.message!=="string"){i+=o(t,r);return i}}if(r.stack&&!t.noErrorStack){e=u(t,r.stack)}n=r.type||r.constructor.name;s=r.code||r.name||r.errno||r.number;i+=t.style.errorType(n)+(s?" ["+t.style.errorType(s)+"]":"")+": ";i+=t.style.errorMessage(r.message)+"\n";if(e){i+=t.style.errorStack(e)+"\n"}if(r.from){i+=t.style.newline+t.style.errorFromMessage("From error:")+t.style.newline+l(t,r.from)}return i}r.inspectError=l;function u(l,e){if(arguments.length<2){e=l;l={}}else if(!l||typeof l!=="object"){l={}}if(!l.style){l.style=f.none}else if(typeof l.style==="string"){l.style=f[l.style]}if(!e){return}if((l.browser||c.browser)&&e.indexOf("@")!==-1){e=e.replace(/[{return l.style.errorStack(" at ")+(t?l.style.errorStackMethod(t)+" ":"")+l.style.errorStack("(")+(r?l.style.errorStackFile(r):l.style.errorStack("unknown"))+(i?l.style.errorStack(":")+l.style.errorStackLine(i):"")+(n?l.style.errorStack(":")+l.style.errorStackColumn(n):"")+l.style.errorStack(")")})}else{e=e.replace(/^[^\n]*\n/,"");e=e.replace(/^\s*(at)\s+(?:(?:(async|new)\s+)?([^\s:()[\]\n]+(?:\([^)]+\))?)\s)?(?:\[as ([^\s:()[\]\n]+)\]\s)?(?:\(?([^:()[\]\n]+):([0-9]+):([0-9]+)\)?)?$/gm,(e,t,r,i,n,s,o,a)=>{return l.style.errorStack(" at ")+(r?l.style.errorStackKeyword(r)+" ":"")+(i?l.style.errorStackMethod(i)+" ":"")+(n?l.style.errorStack("[as ")+l.style.errorStackMethodAs(n)+l.style.errorStack("] "):"")+l.style.errorStack("(")+(s?l.style.errorStackFile(s):l.style.errorStack("unknown"))+(o?l.style.errorStack(":")+l.style.errorStackLine(o):"")+(a?l.style.errorStack(":")+l.style.errorStackColumn(a):"")+l.style.errorStack(")")})}return e}r.inspectStack=u;var f={};var e=e=>e;f.none={trim:false,tab:" ",newline:"\n",comma:"",limit:e,type:e=>"<"+e+">",constant:e,funcName:e,constructorName:e=>"<"+e+">",length:e,key:e,index:e=>"["+e+"] ",number:e,inspect:e,string:e,errorType:e,errorMessage:e,errorStack:e,errorStackKeyword:e,errorStackMethod:e,errorStackMethodAs:e,errorStackFile:e,errorStackLine:e,errorStackColumn:e,errorFromMessage:e,truncate:(e,t)=>e.slice(0,t-1)+"…"};f.inline=Object.assign({},f.none,{trim:true,tab:"",newline:" ",comma:", ",length:()=>"",index:()=>""});f.color=Object.assign({},f.none,{limit:e=>n.bold+n.brightRed+e+n.reset,type:e=>n.italic+n.brightBlack+e+n.reset,constant:e=>n.cyan+e+n.reset,funcName:e=>n.italic+n.magenta+e+n.reset,constructorName:e=>n.magenta+e+n.reset,length:e=>n.italic+n.brightBlack+e+n.reset,key:e=>n.green+e+n.reset,index:e=>n.blue+"["+e+"]"+n.reset+" ",number:e=>n.cyan+e+n.reset,inspect:e=>n.cyan+e+n.reset,string:e=>n.blue+e+n.reset,errorType:e=>n.red+n.bold+e+n.reset,errorMessage:e=>n.red+n.italic+e+n.reset,errorStack:e=>n.brightBlack+e+n.reset,errorStackKeyword:e=>n.italic+n.bold+e+n.reset,errorStackMethod:e=>n.brightYellow+e+n.reset,errorStackMethodAs:e=>n.yellow+e+n.reset,errorStackFile:e=>n.brightCyan+e+n.reset,errorStackLine:e=>n.blue+e+n.reset,errorStackColumn:e=>n.magenta+e+n.reset,errorFromMessage:e=>n.yellow+n.underline+e+n.reset,truncate:(e,t)=>{var r=n.gray+"…"+n.reset;e=e.slice(0,t-r.length);var i=e.lastIndexOf("");if(i>=e.length-6){e=e.slice(0,i)}return e+r}});f.html=Object.assign({},f.none,{tab:"    ",newline:"
",limit:e=>''+e+"",type:e=>''+e+"",constant:e=>''+e+"",funcName:e=>''+e+"",constructorName:e=>''+e+"",length:e=>''+e+"",key:e=>''+e+"",index:e=>'['+e+"] ",number:e=>''+e+"",inspect:e=>''+e+"",string:e=>''+e+"",errorType:e=>''+e+"",errorMessage:e=>''+e+"",errorStack:e=>''+e+"",errorStackKeyword:e=>""+e+"",errorStackMethod:e=>''+e+"",errorStackMethodAs:e=>''+e+"",errorStackFile:e=>''+e+"",errorStackLine:e=>''+e+"",errorStackColumn:e=>''+e+"",errorFromMessage:e=>''+e+""})}).call(this)}).call(this,{isBuffer:t("../../../../../../opt/node-v16.16.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")},t("_process"))},{"../../../../../../opt/node-v16.16.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":19,"./ansi.js":2,"./escape.js":4,_process:20}],8:[function(e,t,r){t.exports={"߀":"0","́":""," ":" ","Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ɓ":"B","c":"C","Ⓒ":"C","C":"C","Ꜿ":"C","Ḉ":"C","Ç":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ɗ":"D","Ɖ":"D","ᴅ":"D","Ꝺ":"D","Ð":"Dh","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","ɛ":"E","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","ᴇ":"E","ꝼ":"F","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","ɢ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","ȷ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","ϻ":"M","Ꞥ":"N","Ƞ":"N","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ɲ":"N","Ꞑ":"N","ᴎ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Þ":"Th","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ɑ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","Ƃ":"b","ⓒ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c",C:"c","Ć":"c","Ĉ":"c","Ċ":"c","Č":"c","Ƈ":"c","Ȼ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","Ƌ":"d","Ꮷ":"d","ԁ":"d","Ɦ":"d","ð":"dh","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ff":"ff","fi":"fi","fl":"fl","ffi":"ffi","ffl":"ffl","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ꝿ":"g","ᵹ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ɭ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","ԉ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ɔ":"o","ᴑ":"o","œ":"oe","ƣ":"oi","ꝏ":"oo","ȣ":"ou","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ρ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ʂ":"s","ß":"ss","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","þ":"th","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"}},{}],9:[function(e,t,r){"use strict";var i=e("./latinize-map.json");t.exports=function(e){return e.replace(/[^\u0000-\u007e]/g,e=>{return i[e]||e})}},{"./latinize-map.json":8}],10:[function(e,t,r){"use strict";r.resize=function(e,t){if(e.length===t){return e}else if(e.length>t){return e.slice(0,t)}return e+" ".repeat(t-e.length)};r.occurrenceCount=function(e,t,r=false){if(!e||!t){return 0}var i=0,n=0,s=r?1:t.length;while((n=e.indexOf(t,n))!==-1){i++;n+=s}return i}},{}],11:[function(e,t,r){"use strict";const S=1;const M=2;const C=3;const x=4;const A=5;function v(e,t){if(j(t)){return M}if(t<=31||t===127){return S}if(P(t)){return x}if(e.toUpperCase()!==e.toLowerCase()){return C}return A}function j(e){if(e===32||e===9||e===160||e===45||e===95){return true}return false}function P(e){if(e>=48&&e<=57){return true}return false}function i(e,t){e=""+e;t=""+t;var r,i,n,s,o,a,l,u=e.trim(),f=u.length,c,g,p,h,d,y,m,w=t.trim(),b=w.length,k=0;for(r=c=0;ry?1:-1}if(!k&&n!==p){k=n!==a?-1:1}break;case x:i=r+1;while(P(u.charCodeAt(i))){i++}l=parseFloat(u.slice(r,i));g=c+1;while(P(w.charCodeAt(g))){g++}m=parseFloat(w.slice(c,g));if(l!==m){return l-m}if(!k&&i-r!==g-c){k=i-r-(g-c)}r=i-1;c=g-1;break}}if(k){return k}return f-r-(b-c)||f-b||e.length-t.length}t.exports=i},{}],12:[function(e,t,r){"use strict";var n=e("./escape.js");r.regexp={};r.regexp.array2alternatives=function e(t){var r,i=t.slice();i.sort((e,t)=>{return t.length-e.length});for(r=0;r{if(!r||typeof r!=="string"){return""}var t=e.dashToSpace??a.dashToSpace,i=e.underscoreToSpace??a.underscoreToSpace,n=e.zealous??a.zealous,s=e.preserveAllCaps??a.preserveAllCaps,o=e.lowerCaseWords??a.lowerCaseWords;o=o instanceof Set?o:Array.isArray(o)?new Set(o):null;if(t){r=r.replace(/-+/g," ")}if(i){r=r.replace(/_+/g," ")}r=r.replace(/ +/g," ").trim();return r.replace(/[^\s_-]+/g,(t,e)=>{if(o&&e&&e+t.lengthString.fromCodePoint(...e);f.decode=e=>Array.from(e,e=>e.codePointAt(0));f.firstCodePoint=e=>e.codePointAt(0);f.firstChar=e=>e.length?String.fromCodePoint(e.codePointAt(0)):undefined;f.toArray=e=>Array.from(e);f.toCells=(e,t,r=4,i=0,...n)=>{var s,o,a,l,u=[];for(s of t){o=s.codePointAt(0);if(o===10){i=0}else if(o===9){a=r-i%r-1;u.push(new e("\t",1,...n));i+=1+a;while(a--){u.push(new e(" ",-2,...n))}}else{l=f.codePointWidth(o),u.push(new e(s,l,...n));i+=l;while(--l>0){u.push(new e(" ",-1,...n))}}}return u};f.fromCells=e=>{var t,r="";for(t of e){if(!t.filler){r+=t.char}}return r};f.length=e=>{var t,r=0;for(t of e){r++}return r};f.width=e=>{var t,r=0;for(t of e){r+=f.codePointWidth(t.codePointAt(0))}return r};f.arrayWidth=(e,t)=>{var r,i=0;if(t===undefined){t=e.length}for(r=0;rs;f.widthLimit=f.truncateWidth=(e,t)=>{var r,i,n=0;s=0;for(r of e){i=f.codePointWidth(r.codePointAt(0));if(s+i>t){return e.slice(0,n)}s+=i;n+=r.length}return e};f.surrogatePair=e=>{var t=e.charCodeAt(0);if(t<55296||t>=57344){return 0}else if(t<56320){return 1}return-1};f.isFullWidth=e=>f.isFullWidthCodePoint(e.codePointAt(0));f.charWidth=e=>f.codePointWidth(e.codePointAt(0));const i=new Map;(function(){var e=t("./unicode-emoji-width-ranges.json");for(let t of e){for(let e=t.s;e<=t.e;e++){i.set(e,t.w)}}})();f.codePointWidth=e=>{if(f.isEmojiCodePoint(e)){return i.get(e)??2}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return 2}if(f.isEmojiModifierCodePoint(e)||f.isZeroWidthDiacriticCodePoint(e)){return 0}return 1};f.isFullWidthCodePoint=e=>f.codePointWidth(e)===2;f.toFullWidth=e=>{return String.fromCodePoint(...Array.from(e,e=>{var t=e.codePointAt(0);return t>=33&&t<=126?65280+t-32:t}))};f.isZeroWidthDiacritic=e=>f.isZeroWidthDiacriticCodePoint(e.codePointAt(0));f.isZeroWidthDiacriticCodePoint=e=>768<=e&&e<=879||6832<=e&&e<=6911||7616<=e&&e<=7679||8400<=e&&e<=8447||65056<=e&&e<=65071||e===12441||e===12442||2304<=e&&e<=2307||2362<=e&&e<=2391&&e!==2365&&e!==2384||e===2402||e===2403||e===3633||3636<=e&&e<=3642||3655<=e&&e<=3662;f.isEmoji=e=>f.isEmojiCodePoint(e.codePointAt(0));f.isEmojiCodePoint=e=>9728<=e&&e<=9983||9984<=e&&e<=10175||126976<=e&&e<=127487||127744<=e&&e<=127994||128e3<=e&&e<=129791;f.isEmojiModifier=e=>f.isEmojiModifierCodePoint(e.codePointAt(0));f.isEmojiModifierCodePoint=e=>127995<=e&&e<=127999||e===65039},{"./unicode-emoji-width-ranges.json":15}],17:[function(e,t,r){"use strict";const k=e("./unicode.js");const S={"!":true,"?":true,":":true,";":true};t.exports=function e(t,r){var i=0,n,s,o,a,l,u,f,c,g,p,h=true,d=k.toArray(t),y=false,m,w=[];if(typeof r!=="object"){r={width:r}}if(!r.width||typeof r.width!=="number"||r.width<=0){r.width=80}o=r.offset?r.width-r.offset:r.width;if(typeof r.glue!=="string"){r.glue="\n"}if(r.regroupFn){d=r.regroupFn(d);p=r.charWidthFn||k.width}else{p=r.charWidthFn||k.charWidth}u=d.length;var b=()=>{if(!h||y){while(d[i]===" "){i++}if(y&&d[i]==="\n"){h=true;i++}}if(i>=u){return null}h=false;y=false;g=false;n=f=i;l=c=0;for(;;){if(n>=u){return d.slice(i,n).join("")}if(d[n]==="\n"){h=true;a=d.slice(i,n++).join("");if(r.fill){a+=" ".repeat(o-l)}return a}if(r.skipFn){s=r.skipFn(d,n);if(s!==n){n=s;continue}}if(d[n]===" "&&!g&&!S[d[n+1]]){f=n;c=l}else{g=false}l+=p(d[n]);if(l>o){y=true;if(f!==i){n=f}else if(ot===w.length-1?e:e.trimRight())}if(!r.noJoin){w=w.join(r.glue)}if(r.updateOffset){r.offset=l}return w}},{"./unicode.js":16}],18:[function(e,t,r){},{}],19:[function(e,t,r){t.exports=function(e){return e!=null&&(i(e)||n(e)||!!e._isBuffer)};function i(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function n(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&i(e.slice(0,0))}},{}],20:[function(e,t,r){var i=t.exports={};var n;var s;function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=o}}catch(e){n=o}try{if(typeof clearTimeout==="function"){s=clearTimeout}else{s=a}}catch(e){s=a}})();function l(t){if(n===setTimeout){return setTimeout(t,0)}if((n===o||!n)&&setTimeout){n=setTimeout;return setTimeout(t,0)}try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}function u(t){if(s===clearTimeout){return clearTimeout(t)}if((s===a||!s)&&clearTimeout){s=clearTimeout;return clearTimeout(t)}try{return s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}var f=[];var c=false;var g;var p=-1;function h(){if(!c||!g){return}c=false;if(g.length){f=g.concat(f)}else{p=-1}if(f.length){d()}}function d(){if(c){return}var e=l(h);c=true;var t=f.length;while(t){g=f;f=[];while(++p1){for(var r=1;r { - if ( firstLetter ) { return firstLetter.toLowerCase() ; } - return separator + letter.toLowerCase() ; + if ( ! acronym ) { + return str.replace( /^([A-Z])|([A-Z])/g , ( match , firstLetter , letter ) => { + if ( firstLetter ) { return firstLetter.toLowerCase() ; } + return separator + letter.toLowerCase() ; + } ) ; + } + + // (^)? and (^)? does not work, so we have to use (?:(^)|)) and (?:($)|)) to capture end or not + return str.replace( /(?:(^)|)([A-Z]+)(?:($)|(?=[a-z]))/g , ( match , isStart , letters , isEnd ) => { + isStart = isStart === '' ; + isEnd = isEnd === '' ; + + var prefix = isStart ? '' : separator ; + + return letters.length === 1 ? prefix + letters.toLowerCase() : + isEnd ? prefix + letters : + letters.length === 2 ? prefix + letters[ 0 ].toLowerCase() + separator + letters[ 1 ].toLowerCase() : + prefix + letters.slice( 0 , -1 ) + separator + letters.slice( -1 ).toLowerCase() ; } ) ; } ; @@ -68,5 +83,5 @@ camel.camelCaseToSeparated = function( str , separator = ' ' ) { // Transform camel case to alphanum separated by minus camel.camelCaseToDash = -camel.camelCaseToDashed = ( str ) => camel.camelCaseToSeparated( str , '-' ) ; +camel.camelCaseToDashed = ( str ) => camel.camelCaseToSeparated( str , '-' , false ) ; diff --git a/package.json b/package.json index 8d8a0ec..8c6c7b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "string-kit", - "version": "0.17.6", + "version": "0.17.7", "engines": { "node": ">=14.15.0" }, diff --git a/test/string-test.js b/test/string-test.js index 10c8f0f..67424d6 100644 --- a/test/string-test.js +++ b/test/string-test.js @@ -950,6 +950,23 @@ describe( "Camel case" , () => { } ) ; //it( ".camelCaseToDashed() edge cases" , function() {} ) ; + + it( ".camelCaseToSeparated() should transform a string composed of alphanum - minus - underscore to a camelCase string" , () => { + expect( string.camelCaseToSeparated( 'oneTwoThree' ) ).to.be( 'one two three' ) ; + expect( string.camelCaseToSeparated( 'OneTwoThree' ) ).to.be( 'one two three' ) ; + expect( string.camelCaseToSeparated( 'aDog' ) ).to.be( 'a dog' ) ; + expect( string.camelCaseToSeparated( 'ADog' ) ).to.be( 'a dog' ) ; + expect( string.camelCaseToSeparated( 'USA' ) ).to.be( 'USA' ) ; + expect( string.camelCaseToSeparated( 'ADogInTheUSA' ) ).to.be( 'a dog in the USA' ) ; + expect( string.camelCaseToSeparated( 'USAIsReady' ) ).to.be( 'USA is ready' ) ; + expect( string.camelCaseToSeparated( 'ADogInTheUSAIsReady' ) ).to.be( 'a dog in the USA is ready' ) ; + + // No acronym mode + expect( string.camelCaseToSeparated( 'ADogInTheUSA' , undefined , false ) ).to.be( 'a dog in the u s a' ) ; + expect( string.camelCaseToSeparated( 'USAIsReady' , undefined , false ) ).to.be( 'u s a is ready' ) ; + expect( string.camelCaseToSeparated( 'ADogInTheUSAIsReady' , undefined , false ) ).to.be( 'a dog in the u s a is ready' ) ; + } ) ; + } ) ;