395.index.js 127 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949
  1. exports.id = 395;
  2. exports.ids = [395];
  3. exports.modules = {
  4. /***/ 14277:
  5. /***/ ((module) => {
  6. "use strict";
  7. module.exports = ({onlyFirst = false} = {}) => {
  8. const pattern = [
  9. '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
  10. '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
  11. ].join('|');
  12. return new RegExp(pattern, onlyFirst ? undefined : 'g');
  13. };
  14. /***/ }),
  15. /***/ 23909:
  16. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  17. "use strict";
  18. const restoreCursor = __webpack_require__(71354);
  19. let isHidden = false;
  20. exports.show = (writableStream = process.stderr) => {
  21. if (!writableStream.isTTY) {
  22. return;
  23. }
  24. isHidden = false;
  25. writableStream.write('\u001B[?25h');
  26. };
  27. exports.hide = (writableStream = process.stderr) => {
  28. if (!writableStream.isTTY) {
  29. return;
  30. }
  31. restoreCursor();
  32. isHidden = true;
  33. writableStream.write('\u001B[?25l');
  34. };
  35. exports.toggle = (force, writableStream) => {
  36. if (force !== undefined) {
  37. isHidden = force;
  38. }
  39. if (isHidden) {
  40. exports.show(writableStream);
  41. } else {
  42. exports.hide(writableStream);
  43. }
  44. };
  45. /***/ }),
  46. /***/ 54011:
  47. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  48. "use strict";
  49. const spinners = Object.assign({}, __webpack_require__(26374));
  50. const spinnersList = Object.keys(spinners);
  51. Object.defineProperty(spinners, 'random', {
  52. get() {
  53. const randomIndex = Math.floor(Math.random() * spinnersList.length);
  54. const spinnerName = spinnersList[randomIndex];
  55. return spinners[spinnerName];
  56. }
  57. });
  58. module.exports = spinners;
  59. // TODO: Remove this for the next major release
  60. module.exports.default = spinners;
  61. /***/ }),
  62. /***/ 16313:
  63. /***/ ((module) => {
  64. var clone = (function() {
  65. 'use strict';
  66. /**
  67. * Clones (copies) an Object using deep copying.
  68. *
  69. * This function supports circular references by default, but if you are certain
  70. * there are no circular references in your object, you can save some CPU time
  71. * by calling clone(obj, false).
  72. *
  73. * Caution: if `circular` is false and `parent` contains circular references,
  74. * your program may enter an infinite loop and crash.
  75. *
  76. * @param `parent` - the object to be cloned
  77. * @param `circular` - set to true if the object to be cloned may contain
  78. * circular references. (optional - true by default)
  79. * @param `depth` - set to a number if the object is only to be cloned to
  80. * a particular depth. (optional - defaults to Infinity)
  81. * @param `prototype` - sets the prototype to be used when cloning an object.
  82. * (optional - defaults to parent prototype).
  83. */
  84. function clone(parent, circular, depth, prototype) {
  85. var filter;
  86. if (typeof circular === 'object') {
  87. depth = circular.depth;
  88. prototype = circular.prototype;
  89. filter = circular.filter;
  90. circular = circular.circular
  91. }
  92. // maintain two arrays for circular references, where corresponding parents
  93. // and children have the same index
  94. var allParents = [];
  95. var allChildren = [];
  96. var useBuffer = typeof Buffer != 'undefined';
  97. if (typeof circular == 'undefined')
  98. circular = true;
  99. if (typeof depth == 'undefined')
  100. depth = Infinity;
  101. // recurse this function so we don't reset allParents and allChildren
  102. function _clone(parent, depth) {
  103. // cloning null always returns null
  104. if (parent === null)
  105. return null;
  106. if (depth == 0)
  107. return parent;
  108. var child;
  109. var proto;
  110. if (typeof parent != 'object') {
  111. return parent;
  112. }
  113. if (clone.__isArray(parent)) {
  114. child = [];
  115. } else if (clone.__isRegExp(parent)) {
  116. child = new RegExp(parent.source, __getRegExpFlags(parent));
  117. if (parent.lastIndex) child.lastIndex = parent.lastIndex;
  118. } else if (clone.__isDate(parent)) {
  119. child = new Date(parent.getTime());
  120. } else if (useBuffer && Buffer.isBuffer(parent)) {
  121. if (Buffer.allocUnsafe) {
  122. // Node.js >= 4.5.0
  123. child = Buffer.allocUnsafe(parent.length);
  124. } else {
  125. // Older Node.js versions
  126. child = new Buffer(parent.length);
  127. }
  128. parent.copy(child);
  129. return child;
  130. } else {
  131. if (typeof prototype == 'undefined') {
  132. proto = Object.getPrototypeOf(parent);
  133. child = Object.create(proto);
  134. }
  135. else {
  136. child = Object.create(prototype);
  137. proto = prototype;
  138. }
  139. }
  140. if (circular) {
  141. var index = allParents.indexOf(parent);
  142. if (index != -1) {
  143. return allChildren[index];
  144. }
  145. allParents.push(parent);
  146. allChildren.push(child);
  147. }
  148. for (var i in parent) {
  149. var attrs;
  150. if (proto) {
  151. attrs = Object.getOwnPropertyDescriptor(proto, i);
  152. }
  153. if (attrs && attrs.set == null) {
  154. continue;
  155. }
  156. child[i] = _clone(parent[i], depth - 1);
  157. }
  158. return child;
  159. }
  160. return _clone(parent, depth);
  161. }
  162. /**
  163. * Simple flat clone using prototype, accepts only objects, usefull for property
  164. * override on FLAT configuration object (no nested props).
  165. *
  166. * USE WITH CAUTION! This may not behave as you wish if you do not know how this
  167. * works.
  168. */
  169. clone.clonePrototype = function clonePrototype(parent) {
  170. if (parent === null)
  171. return null;
  172. var c = function () {};
  173. c.prototype = parent;
  174. return new c();
  175. };
  176. // private utility functions
  177. function __objToStr(o) {
  178. return Object.prototype.toString.call(o);
  179. };
  180. clone.__objToStr = __objToStr;
  181. function __isDate(o) {
  182. return typeof o === 'object' && __objToStr(o) === '[object Date]';
  183. };
  184. clone.__isDate = __isDate;
  185. function __isArray(o) {
  186. return typeof o === 'object' && __objToStr(o) === '[object Array]';
  187. };
  188. clone.__isArray = __isArray;
  189. function __isRegExp(o) {
  190. return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
  191. };
  192. clone.__isRegExp = __isRegExp;
  193. function __getRegExpFlags(re) {
  194. var flags = '';
  195. if (re.global) flags += 'g';
  196. if (re.ignoreCase) flags += 'i';
  197. if (re.multiline) flags += 'm';
  198. return flags;
  199. };
  200. clone.__getRegExpFlags = __getRegExpFlags;
  201. return clone;
  202. })();
  203. if ( true && module.exports) {
  204. module.exports = clone;
  205. }
  206. /***/ }),
  207. /***/ 34575:
  208. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  209. var clone = __webpack_require__(16313);
  210. module.exports = function(options, defaults) {
  211. options = options || {};
  212. Object.keys(defaults).forEach(function(key) {
  213. if (typeof options[key] === 'undefined') {
  214. options[key] = clone(defaults[key]);
  215. }
  216. });
  217. return options;
  218. };
  219. /***/ }),
  220. /***/ 35131:
  221. /***/ ((module) => {
  222. "use strict";
  223. module.exports = ({stream = process.stdout} = {}) => {
  224. return Boolean(
  225. stream && stream.isTTY &&
  226. process.env.TERM !== 'dumb' &&
  227. !('CI' in process.env)
  228. );
  229. };
  230. /***/ }),
  231. /***/ 4500:
  232. /***/ ((module) => {
  233. "use strict";
  234. module.exports = () => {
  235. if (process.platform !== 'win32') {
  236. return true;
  237. }
  238. return Boolean(process.env.CI) ||
  239. Boolean(process.env.WT_SESSION) || // Windows Terminal
  240. process.env.TERM_PROGRAM === 'vscode' ||
  241. process.env.TERM === 'xterm-256color' ||
  242. process.env.TERM === 'alacritty';
  243. };
  244. /***/ }),
  245. /***/ 9986:
  246. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  247. "use strict";
  248. const chalk = __webpack_require__(39803);
  249. const isUnicodeSupported = __webpack_require__(4500);
  250. const main = {
  251. info: chalk.blue('ℹ'),
  252. success: chalk.green('✔'),
  253. warning: chalk.yellow('⚠'),
  254. error: chalk.red('✖')
  255. };
  256. const fallback = {
  257. info: chalk.blue('i'),
  258. success: chalk.green('√'),
  259. warning: chalk.yellow('‼'),
  260. error: chalk.red('×')
  261. };
  262. module.exports = isUnicodeSupported() ? main : fallback;
  263. /***/ }),
  264. /***/ 26496:
  265. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  266. "use strict";
  267. /* module decorator */ module = __webpack_require__.nmd(module);
  268. const wrapAnsi16 = (fn, offset) => (...args) => {
  269. const code = fn(...args);
  270. return `\u001B[${code + offset}m`;
  271. };
  272. const wrapAnsi256 = (fn, offset) => (...args) => {
  273. const code = fn(...args);
  274. return `\u001B[${38 + offset};5;${code}m`;
  275. };
  276. const wrapAnsi16m = (fn, offset) => (...args) => {
  277. const rgb = fn(...args);
  278. return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  279. };
  280. const ansi2ansi = n => n;
  281. const rgb2rgb = (r, g, b) => [r, g, b];
  282. const setLazyProperty = (object, property, get) => {
  283. Object.defineProperty(object, property, {
  284. get: () => {
  285. const value = get();
  286. Object.defineProperty(object, property, {
  287. value,
  288. enumerable: true,
  289. configurable: true
  290. });
  291. return value;
  292. },
  293. enumerable: true,
  294. configurable: true
  295. });
  296. };
  297. /** @type {typeof import('color-convert')} */
  298. let colorConvert;
  299. const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
  300. if (colorConvert === undefined) {
  301. colorConvert = __webpack_require__(36354);
  302. }
  303. const offset = isBackground ? 10 : 0;
  304. const styles = {};
  305. for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
  306. const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
  307. if (sourceSpace === targetSpace) {
  308. styles[name] = wrap(identity, offset);
  309. } else if (typeof suite === 'object') {
  310. styles[name] = wrap(suite[targetSpace], offset);
  311. }
  312. }
  313. return styles;
  314. };
  315. function assembleStyles() {
  316. const codes = new Map();
  317. const styles = {
  318. modifier: {
  319. reset: [0, 0],
  320. // 21 isn't widely supported and 22 does the same thing
  321. bold: [1, 22],
  322. dim: [2, 22],
  323. italic: [3, 23],
  324. underline: [4, 24],
  325. inverse: [7, 27],
  326. hidden: [8, 28],
  327. strikethrough: [9, 29]
  328. },
  329. color: {
  330. black: [30, 39],
  331. red: [31, 39],
  332. green: [32, 39],
  333. yellow: [33, 39],
  334. blue: [34, 39],
  335. magenta: [35, 39],
  336. cyan: [36, 39],
  337. white: [37, 39],
  338. // Bright color
  339. blackBright: [90, 39],
  340. redBright: [91, 39],
  341. greenBright: [92, 39],
  342. yellowBright: [93, 39],
  343. blueBright: [94, 39],
  344. magentaBright: [95, 39],
  345. cyanBright: [96, 39],
  346. whiteBright: [97, 39]
  347. },
  348. bgColor: {
  349. bgBlack: [40, 49],
  350. bgRed: [41, 49],
  351. bgGreen: [42, 49],
  352. bgYellow: [43, 49],
  353. bgBlue: [44, 49],
  354. bgMagenta: [45, 49],
  355. bgCyan: [46, 49],
  356. bgWhite: [47, 49],
  357. // Bright color
  358. bgBlackBright: [100, 49],
  359. bgRedBright: [101, 49],
  360. bgGreenBright: [102, 49],
  361. bgYellowBright: [103, 49],
  362. bgBlueBright: [104, 49],
  363. bgMagentaBright: [105, 49],
  364. bgCyanBright: [106, 49],
  365. bgWhiteBright: [107, 49]
  366. }
  367. };
  368. // Alias bright black as gray (and grey)
  369. styles.color.gray = styles.color.blackBright;
  370. styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
  371. styles.color.grey = styles.color.blackBright;
  372. styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
  373. for (const [groupName, group] of Object.entries(styles)) {
  374. for (const [styleName, style] of Object.entries(group)) {
  375. styles[styleName] = {
  376. open: `\u001B[${style[0]}m`,
  377. close: `\u001B[${style[1]}m`
  378. };
  379. group[styleName] = styles[styleName];
  380. codes.set(style[0], style[1]);
  381. }
  382. Object.defineProperty(styles, groupName, {
  383. value: group,
  384. enumerable: false
  385. });
  386. }
  387. Object.defineProperty(styles, 'codes', {
  388. value: codes,
  389. enumerable: false
  390. });
  391. styles.color.close = '\u001B[39m';
  392. styles.bgColor.close = '\u001B[49m';
  393. setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
  394. setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
  395. setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
  396. setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
  397. setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
  398. setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
  399. return styles;
  400. }
  401. // Make the export immutable
  402. Object.defineProperty(module, 'exports', {
  403. enumerable: true,
  404. get: assembleStyles
  405. });
  406. /***/ }),
  407. /***/ 39803:
  408. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  409. "use strict";
  410. const ansiStyles = __webpack_require__(26496);
  411. const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(505);
  412. const {
  413. stringReplaceAll,
  414. stringEncaseCRLFWithFirstIndex
  415. } = __webpack_require__(59867);
  416. const {isArray} = Array;
  417. // `supportsColor.level` → `ansiStyles.color[name]` mapping
  418. const levelMapping = [
  419. 'ansi',
  420. 'ansi',
  421. 'ansi256',
  422. 'ansi16m'
  423. ];
  424. const styles = Object.create(null);
  425. const applyOptions = (object, options = {}) => {
  426. if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
  427. throw new Error('The `level` option should be an integer from 0 to 3');
  428. }
  429. // Detect level if not set manually
  430. const colorLevel = stdoutColor ? stdoutColor.level : 0;
  431. object.level = options.level === undefined ? colorLevel : options.level;
  432. };
  433. class ChalkClass {
  434. constructor(options) {
  435. // eslint-disable-next-line no-constructor-return
  436. return chalkFactory(options);
  437. }
  438. }
  439. const chalkFactory = options => {
  440. const chalk = {};
  441. applyOptions(chalk, options);
  442. chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
  443. Object.setPrototypeOf(chalk, Chalk.prototype);
  444. Object.setPrototypeOf(chalk.template, chalk);
  445. chalk.template.constructor = () => {
  446. throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
  447. };
  448. chalk.template.Instance = ChalkClass;
  449. return chalk.template;
  450. };
  451. function Chalk(options) {
  452. return chalkFactory(options);
  453. }
  454. for (const [styleName, style] of Object.entries(ansiStyles)) {
  455. styles[styleName] = {
  456. get() {
  457. const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
  458. Object.defineProperty(this, styleName, {value: builder});
  459. return builder;
  460. }
  461. };
  462. }
  463. styles.visible = {
  464. get() {
  465. const builder = createBuilder(this, this._styler, true);
  466. Object.defineProperty(this, 'visible', {value: builder});
  467. return builder;
  468. }
  469. };
  470. const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
  471. for (const model of usedModels) {
  472. styles[model] = {
  473. get() {
  474. const {level} = this;
  475. return function (...arguments_) {
  476. const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
  477. return createBuilder(this, styler, this._isEmpty);
  478. };
  479. }
  480. };
  481. }
  482. for (const model of usedModels) {
  483. const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
  484. styles[bgModel] = {
  485. get() {
  486. const {level} = this;
  487. return function (...arguments_) {
  488. const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
  489. return createBuilder(this, styler, this._isEmpty);
  490. };
  491. }
  492. };
  493. }
  494. const proto = Object.defineProperties(() => {}, {
  495. ...styles,
  496. level: {
  497. enumerable: true,
  498. get() {
  499. return this._generator.level;
  500. },
  501. set(level) {
  502. this._generator.level = level;
  503. }
  504. }
  505. });
  506. const createStyler = (open, close, parent) => {
  507. let openAll;
  508. let closeAll;
  509. if (parent === undefined) {
  510. openAll = open;
  511. closeAll = close;
  512. } else {
  513. openAll = parent.openAll + open;
  514. closeAll = close + parent.closeAll;
  515. }
  516. return {
  517. open,
  518. close,
  519. openAll,
  520. closeAll,
  521. parent
  522. };
  523. };
  524. const createBuilder = (self, _styler, _isEmpty) => {
  525. const builder = (...arguments_) => {
  526. if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
  527. // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`
  528. return applyStyle(builder, chalkTag(builder, ...arguments_));
  529. }
  530. // Single argument is hot path, implicit coercion is faster than anything
  531. // eslint-disable-next-line no-implicit-coercion
  532. return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
  533. };
  534. // We alter the prototype because we must return a function, but there is
  535. // no way to create a function with a different prototype
  536. Object.setPrototypeOf(builder, proto);
  537. builder._generator = self;
  538. builder._styler = _styler;
  539. builder._isEmpty = _isEmpty;
  540. return builder;
  541. };
  542. const applyStyle = (self, string) => {
  543. if (self.level <= 0 || !string) {
  544. return self._isEmpty ? '' : string;
  545. }
  546. let styler = self._styler;
  547. if (styler === undefined) {
  548. return string;
  549. }
  550. const {openAll, closeAll} = styler;
  551. if (string.indexOf('\u001B') !== -1) {
  552. while (styler !== undefined) {
  553. // Replace any instances already present with a re-opening code
  554. // otherwise only the part of the string until said closing code
  555. // will be colored, and the rest will simply be 'plain'.
  556. string = stringReplaceAll(string, styler.close, styler.open);
  557. styler = styler.parent;
  558. }
  559. }
  560. // We can move both next actions out of loop, because remaining actions in loop won't have
  561. // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
  562. // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
  563. const lfIndex = string.indexOf('\n');
  564. if (lfIndex !== -1) {
  565. string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
  566. }
  567. return openAll + string + closeAll;
  568. };
  569. let template;
  570. const chalkTag = (chalk, ...strings) => {
  571. const [firstString] = strings;
  572. if (!isArray(firstString) || !isArray(firstString.raw)) {
  573. // If chalk() was called by itself or with a string,
  574. // return the string itself as a string.
  575. return strings.join(' ');
  576. }
  577. const arguments_ = strings.slice(1);
  578. const parts = [firstString.raw[0]];
  579. for (let i = 1; i < firstString.length; i++) {
  580. parts.push(
  581. String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
  582. String(firstString.raw[i])
  583. );
  584. }
  585. if (template === undefined) {
  586. template = __webpack_require__(87568);
  587. }
  588. return template(chalk, parts.join(''));
  589. };
  590. Object.defineProperties(Chalk.prototype, styles);
  591. const chalk = Chalk(); // eslint-disable-line new-cap
  592. chalk.supportsColor = stdoutColor;
  593. chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
  594. chalk.stderr.supportsColor = stderrColor;
  595. module.exports = chalk;
  596. /***/ }),
  597. /***/ 87568:
  598. /***/ ((module) => {
  599. "use strict";
  600. const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  601. const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  602. const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  603. const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
  604. const ESCAPES = new Map([
  605. ['n', '\n'],
  606. ['r', '\r'],
  607. ['t', '\t'],
  608. ['b', '\b'],
  609. ['f', '\f'],
  610. ['v', '\v'],
  611. ['0', '\0'],
  612. ['\\', '\\'],
  613. ['e', '\u001B'],
  614. ['a', '\u0007']
  615. ]);
  616. function unescape(c) {
  617. const u = c[0] === 'u';
  618. const bracket = c[1] === '{';
  619. if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
  620. return String.fromCharCode(parseInt(c.slice(1), 16));
  621. }
  622. if (u && bracket) {
  623. return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
  624. }
  625. return ESCAPES.get(c) || c;
  626. }
  627. function parseArguments(name, arguments_) {
  628. const results = [];
  629. const chunks = arguments_.trim().split(/\s*,\s*/g);
  630. let matches;
  631. for (const chunk of chunks) {
  632. const number = Number(chunk);
  633. if (!Number.isNaN(number)) {
  634. results.push(number);
  635. } else if ((matches = chunk.match(STRING_REGEX))) {
  636. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
  637. } else {
  638. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
  639. }
  640. }
  641. return results;
  642. }
  643. function parseStyle(style) {
  644. STYLE_REGEX.lastIndex = 0;
  645. const results = [];
  646. let matches;
  647. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  648. const name = matches[1];
  649. if (matches[2]) {
  650. const args = parseArguments(name, matches[2]);
  651. results.push([name].concat(args));
  652. } else {
  653. results.push([name]);
  654. }
  655. }
  656. return results;
  657. }
  658. function buildStyle(chalk, styles) {
  659. const enabled = {};
  660. for (const layer of styles) {
  661. for (const style of layer.styles) {
  662. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  663. }
  664. }
  665. let current = chalk;
  666. for (const [styleName, styles] of Object.entries(enabled)) {
  667. if (!Array.isArray(styles)) {
  668. continue;
  669. }
  670. if (!(styleName in current)) {
  671. throw new Error(`Unknown Chalk style: ${styleName}`);
  672. }
  673. current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
  674. }
  675. return current;
  676. }
  677. module.exports = (chalk, temporary) => {
  678. const styles = [];
  679. const chunks = [];
  680. let chunk = [];
  681. // eslint-disable-next-line max-params
  682. temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
  683. if (escapeCharacter) {
  684. chunk.push(unescape(escapeCharacter));
  685. } else if (style) {
  686. const string = chunk.join('');
  687. chunk = [];
  688. chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
  689. styles.push({inverse, styles: parseStyle(style)});
  690. } else if (close) {
  691. if (styles.length === 0) {
  692. throw new Error('Found extraneous } in Chalk template literal');
  693. }
  694. chunks.push(buildStyle(chalk, styles)(chunk.join('')));
  695. chunk = [];
  696. styles.pop();
  697. } else {
  698. chunk.push(character);
  699. }
  700. });
  701. chunks.push(chunk.join(''));
  702. if (styles.length > 0) {
  703. const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
  704. throw new Error(errMessage);
  705. }
  706. return chunks.join('');
  707. };
  708. /***/ }),
  709. /***/ 59867:
  710. /***/ ((module) => {
  711. "use strict";
  712. const stringReplaceAll = (string, substring, replacer) => {
  713. let index = string.indexOf(substring);
  714. if (index === -1) {
  715. return string;
  716. }
  717. const substringLength = substring.length;
  718. let endIndex = 0;
  719. let returnValue = '';
  720. do {
  721. returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
  722. endIndex = index + substringLength;
  723. index = string.indexOf(substring, endIndex);
  724. } while (index !== -1);
  725. returnValue += string.substr(endIndex);
  726. return returnValue;
  727. };
  728. const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
  729. let endIndex = 0;
  730. let returnValue = '';
  731. do {
  732. const gotCR = string[index - 1] === '\r';
  733. returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
  734. endIndex = index + 1;
  735. index = string.indexOf('\n', endIndex);
  736. } while (index !== -1);
  737. returnValue += string.substr(endIndex);
  738. return returnValue;
  739. };
  740. module.exports = {
  741. stringReplaceAll,
  742. stringEncaseCRLFWithFirstIndex
  743. };
  744. /***/ }),
  745. /***/ 22204:
  746. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  747. /* MIT license */
  748. /* eslint-disable no-mixed-operators */
  749. const cssKeywords = __webpack_require__(30668);
  750. // NOTE: conversions should only return primitive values (i.e. arrays, or
  751. // values that give correct `typeof` results).
  752. // do not use box values types (i.e. Number(), String(), etc.)
  753. const reverseKeywords = {};
  754. for (const key of Object.keys(cssKeywords)) {
  755. reverseKeywords[cssKeywords[key]] = key;
  756. }
  757. const convert = {
  758. rgb: {channels: 3, labels: 'rgb'},
  759. hsl: {channels: 3, labels: 'hsl'},
  760. hsv: {channels: 3, labels: 'hsv'},
  761. hwb: {channels: 3, labels: 'hwb'},
  762. cmyk: {channels: 4, labels: 'cmyk'},
  763. xyz: {channels: 3, labels: 'xyz'},
  764. lab: {channels: 3, labels: 'lab'},
  765. lch: {channels: 3, labels: 'lch'},
  766. hex: {channels: 1, labels: ['hex']},
  767. keyword: {channels: 1, labels: ['keyword']},
  768. ansi16: {channels: 1, labels: ['ansi16']},
  769. ansi256: {channels: 1, labels: ['ansi256']},
  770. hcg: {channels: 3, labels: ['h', 'c', 'g']},
  771. apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
  772. gray: {channels: 1, labels: ['gray']}
  773. };
  774. module.exports = convert;
  775. // Hide .channels and .labels properties
  776. for (const model of Object.keys(convert)) {
  777. if (!('channels' in convert[model])) {
  778. throw new Error('missing channels property: ' + model);
  779. }
  780. if (!('labels' in convert[model])) {
  781. throw new Error('missing channel labels property: ' + model);
  782. }
  783. if (convert[model].labels.length !== convert[model].channels) {
  784. throw new Error('channel and label counts mismatch: ' + model);
  785. }
  786. const {channels, labels} = convert[model];
  787. delete convert[model].channels;
  788. delete convert[model].labels;
  789. Object.defineProperty(convert[model], 'channels', {value: channels});
  790. Object.defineProperty(convert[model], 'labels', {value: labels});
  791. }
  792. convert.rgb.hsl = function (rgb) {
  793. const r = rgb[0] / 255;
  794. const g = rgb[1] / 255;
  795. const b = rgb[2] / 255;
  796. const min = Math.min(r, g, b);
  797. const max = Math.max(r, g, b);
  798. const delta = max - min;
  799. let h;
  800. let s;
  801. if (max === min) {
  802. h = 0;
  803. } else if (r === max) {
  804. h = (g - b) / delta;
  805. } else if (g === max) {
  806. h = 2 + (b - r) / delta;
  807. } else if (b === max) {
  808. h = 4 + (r - g) / delta;
  809. }
  810. h = Math.min(h * 60, 360);
  811. if (h < 0) {
  812. h += 360;
  813. }
  814. const l = (min + max) / 2;
  815. if (max === min) {
  816. s = 0;
  817. } else if (l <= 0.5) {
  818. s = delta / (max + min);
  819. } else {
  820. s = delta / (2 - max - min);
  821. }
  822. return [h, s * 100, l * 100];
  823. };
  824. convert.rgb.hsv = function (rgb) {
  825. let rdif;
  826. let gdif;
  827. let bdif;
  828. let h;
  829. let s;
  830. const r = rgb[0] / 255;
  831. const g = rgb[1] / 255;
  832. const b = rgb[2] / 255;
  833. const v = Math.max(r, g, b);
  834. const diff = v - Math.min(r, g, b);
  835. const diffc = function (c) {
  836. return (v - c) / 6 / diff + 1 / 2;
  837. };
  838. if (diff === 0) {
  839. h = 0;
  840. s = 0;
  841. } else {
  842. s = diff / v;
  843. rdif = diffc(r);
  844. gdif = diffc(g);
  845. bdif = diffc(b);
  846. if (r === v) {
  847. h = bdif - gdif;
  848. } else if (g === v) {
  849. h = (1 / 3) + rdif - bdif;
  850. } else if (b === v) {
  851. h = (2 / 3) + gdif - rdif;
  852. }
  853. if (h < 0) {
  854. h += 1;
  855. } else if (h > 1) {
  856. h -= 1;
  857. }
  858. }
  859. return [
  860. h * 360,
  861. s * 100,
  862. v * 100
  863. ];
  864. };
  865. convert.rgb.hwb = function (rgb) {
  866. const r = rgb[0];
  867. const g = rgb[1];
  868. let b = rgb[2];
  869. const h = convert.rgb.hsl(rgb)[0];
  870. const w = 1 / 255 * Math.min(r, Math.min(g, b));
  871. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  872. return [h, w * 100, b * 100];
  873. };
  874. convert.rgb.cmyk = function (rgb) {
  875. const r = rgb[0] / 255;
  876. const g = rgb[1] / 255;
  877. const b = rgb[2] / 255;
  878. const k = Math.min(1 - r, 1 - g, 1 - b);
  879. const c = (1 - r - k) / (1 - k) || 0;
  880. const m = (1 - g - k) / (1 - k) || 0;
  881. const y = (1 - b - k) / (1 - k) || 0;
  882. return [c * 100, m * 100, y * 100, k * 100];
  883. };
  884. function comparativeDistance(x, y) {
  885. /*
  886. See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
  887. */
  888. return (
  889. ((x[0] - y[0]) ** 2) +
  890. ((x[1] - y[1]) ** 2) +
  891. ((x[2] - y[2]) ** 2)
  892. );
  893. }
  894. convert.rgb.keyword = function (rgb) {
  895. const reversed = reverseKeywords[rgb];
  896. if (reversed) {
  897. return reversed;
  898. }
  899. let currentClosestDistance = Infinity;
  900. let currentClosestKeyword;
  901. for (const keyword of Object.keys(cssKeywords)) {
  902. const value = cssKeywords[keyword];
  903. // Compute comparative distance
  904. const distance = comparativeDistance(rgb, value);
  905. // Check if its less, if so set as closest
  906. if (distance < currentClosestDistance) {
  907. currentClosestDistance = distance;
  908. currentClosestKeyword = keyword;
  909. }
  910. }
  911. return currentClosestKeyword;
  912. };
  913. convert.keyword.rgb = function (keyword) {
  914. return cssKeywords[keyword];
  915. };
  916. convert.rgb.xyz = function (rgb) {
  917. let r = rgb[0] / 255;
  918. let g = rgb[1] / 255;
  919. let b = rgb[2] / 255;
  920. // Assume sRGB
  921. r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
  922. g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
  923. b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
  924. const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
  925. const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
  926. const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
  927. return [x * 100, y * 100, z * 100];
  928. };
  929. convert.rgb.lab = function (rgb) {
  930. const xyz = convert.rgb.xyz(rgb);
  931. let x = xyz[0];
  932. let y = xyz[1];
  933. let z = xyz[2];
  934. x /= 95.047;
  935. y /= 100;
  936. z /= 108.883;
  937. x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
  938. y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
  939. z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
  940. const l = (116 * y) - 16;
  941. const a = 500 * (x - y);
  942. const b = 200 * (y - z);
  943. return [l, a, b];
  944. };
  945. convert.hsl.rgb = function (hsl) {
  946. const h = hsl[0] / 360;
  947. const s = hsl[1] / 100;
  948. const l = hsl[2] / 100;
  949. let t2;
  950. let t3;
  951. let val;
  952. if (s === 0) {
  953. val = l * 255;
  954. return [val, val, val];
  955. }
  956. if (l < 0.5) {
  957. t2 = l * (1 + s);
  958. } else {
  959. t2 = l + s - l * s;
  960. }
  961. const t1 = 2 * l - t2;
  962. const rgb = [0, 0, 0];
  963. for (let i = 0; i < 3; i++) {
  964. t3 = h + 1 / 3 * -(i - 1);
  965. if (t3 < 0) {
  966. t3++;
  967. }
  968. if (t3 > 1) {
  969. t3--;
  970. }
  971. if (6 * t3 < 1) {
  972. val = t1 + (t2 - t1) * 6 * t3;
  973. } else if (2 * t3 < 1) {
  974. val = t2;
  975. } else if (3 * t3 < 2) {
  976. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  977. } else {
  978. val = t1;
  979. }
  980. rgb[i] = val * 255;
  981. }
  982. return rgb;
  983. };
  984. convert.hsl.hsv = function (hsl) {
  985. const h = hsl[0];
  986. let s = hsl[1] / 100;
  987. let l = hsl[2] / 100;
  988. let smin = s;
  989. const lmin = Math.max(l, 0.01);
  990. l *= 2;
  991. s *= (l <= 1) ? l : 2 - l;
  992. smin *= lmin <= 1 ? lmin : 2 - lmin;
  993. const v = (l + s) / 2;
  994. const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
  995. return [h, sv * 100, v * 100];
  996. };
  997. convert.hsv.rgb = function (hsv) {
  998. const h = hsv[0] / 60;
  999. const s = hsv[1] / 100;
  1000. let v = hsv[2] / 100;
  1001. const hi = Math.floor(h) % 6;
  1002. const f = h - Math.floor(h);
  1003. const p = 255 * v * (1 - s);
  1004. const q = 255 * v * (1 - (s * f));
  1005. const t = 255 * v * (1 - (s * (1 - f)));
  1006. v *= 255;
  1007. switch (hi) {
  1008. case 0:
  1009. return [v, t, p];
  1010. case 1:
  1011. return [q, v, p];
  1012. case 2:
  1013. return [p, v, t];
  1014. case 3:
  1015. return [p, q, v];
  1016. case 4:
  1017. return [t, p, v];
  1018. case 5:
  1019. return [v, p, q];
  1020. }
  1021. };
  1022. convert.hsv.hsl = function (hsv) {
  1023. const h = hsv[0];
  1024. const s = hsv[1] / 100;
  1025. const v = hsv[2] / 100;
  1026. const vmin = Math.max(v, 0.01);
  1027. let sl;
  1028. let l;
  1029. l = (2 - s) * v;
  1030. const lmin = (2 - s) * vmin;
  1031. sl = s * vmin;
  1032. sl /= (lmin <= 1) ? lmin : 2 - lmin;
  1033. sl = sl || 0;
  1034. l /= 2;
  1035. return [h, sl * 100, l * 100];
  1036. };
  1037. // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
  1038. convert.hwb.rgb = function (hwb) {
  1039. const h = hwb[0] / 360;
  1040. let wh = hwb[1] / 100;
  1041. let bl = hwb[2] / 100;
  1042. const ratio = wh + bl;
  1043. let f;
  1044. // Wh + bl cant be > 1
  1045. if (ratio > 1) {
  1046. wh /= ratio;
  1047. bl /= ratio;
  1048. }
  1049. const i = Math.floor(6 * h);
  1050. const v = 1 - bl;
  1051. f = 6 * h - i;
  1052. if ((i & 0x01) !== 0) {
  1053. f = 1 - f;
  1054. }
  1055. const n = wh + f * (v - wh); // Linear interpolation
  1056. let r;
  1057. let g;
  1058. let b;
  1059. /* eslint-disable max-statements-per-line,no-multi-spaces */
  1060. switch (i) {
  1061. default:
  1062. case 6:
  1063. case 0: r = v; g = n; b = wh; break;
  1064. case 1: r = n; g = v; b = wh; break;
  1065. case 2: r = wh; g = v; b = n; break;
  1066. case 3: r = wh; g = n; b = v; break;
  1067. case 4: r = n; g = wh; b = v; break;
  1068. case 5: r = v; g = wh; b = n; break;
  1069. }
  1070. /* eslint-enable max-statements-per-line,no-multi-spaces */
  1071. return [r * 255, g * 255, b * 255];
  1072. };
  1073. convert.cmyk.rgb = function (cmyk) {
  1074. const c = cmyk[0] / 100;
  1075. const m = cmyk[1] / 100;
  1076. const y = cmyk[2] / 100;
  1077. const k = cmyk[3] / 100;
  1078. const r = 1 - Math.min(1, c * (1 - k) + k);
  1079. const g = 1 - Math.min(1, m * (1 - k) + k);
  1080. const b = 1 - Math.min(1, y * (1 - k) + k);
  1081. return [r * 255, g * 255, b * 255];
  1082. };
  1083. convert.xyz.rgb = function (xyz) {
  1084. const x = xyz[0] / 100;
  1085. const y = xyz[1] / 100;
  1086. const z = xyz[2] / 100;
  1087. let r;
  1088. let g;
  1089. let b;
  1090. r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
  1091. g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
  1092. b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
  1093. // Assume sRGB
  1094. r = r > 0.0031308
  1095. ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
  1096. : r * 12.92;
  1097. g = g > 0.0031308
  1098. ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
  1099. : g * 12.92;
  1100. b = b > 0.0031308
  1101. ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
  1102. : b * 12.92;
  1103. r = Math.min(Math.max(0, r), 1);
  1104. g = Math.min(Math.max(0, g), 1);
  1105. b = Math.min(Math.max(0, b), 1);
  1106. return [r * 255, g * 255, b * 255];
  1107. };
  1108. convert.xyz.lab = function (xyz) {
  1109. let x = xyz[0];
  1110. let y = xyz[1];
  1111. let z = xyz[2];
  1112. x /= 95.047;
  1113. y /= 100;
  1114. z /= 108.883;
  1115. x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
  1116. y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
  1117. z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
  1118. const l = (116 * y) - 16;
  1119. const a = 500 * (x - y);
  1120. const b = 200 * (y - z);
  1121. return [l, a, b];
  1122. };
  1123. convert.lab.xyz = function (lab) {
  1124. const l = lab[0];
  1125. const a = lab[1];
  1126. const b = lab[2];
  1127. let x;
  1128. let y;
  1129. let z;
  1130. y = (l + 16) / 116;
  1131. x = a / 500 + y;
  1132. z = y - b / 200;
  1133. const y2 = y ** 3;
  1134. const x2 = x ** 3;
  1135. const z2 = z ** 3;
  1136. y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  1137. x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  1138. z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
  1139. x *= 95.047;
  1140. y *= 100;
  1141. z *= 108.883;
  1142. return [x, y, z];
  1143. };
  1144. convert.lab.lch = function (lab) {
  1145. const l = lab[0];
  1146. const a = lab[1];
  1147. const b = lab[2];
  1148. let h;
  1149. const hr = Math.atan2(b, a);
  1150. h = hr * 360 / 2 / Math.PI;
  1151. if (h < 0) {
  1152. h += 360;
  1153. }
  1154. const c = Math.sqrt(a * a + b * b);
  1155. return [l, c, h];
  1156. };
  1157. convert.lch.lab = function (lch) {
  1158. const l = lch[0];
  1159. const c = lch[1];
  1160. const h = lch[2];
  1161. const hr = h / 360 * 2 * Math.PI;
  1162. const a = c * Math.cos(hr);
  1163. const b = c * Math.sin(hr);
  1164. return [l, a, b];
  1165. };
  1166. convert.rgb.ansi16 = function (args, saturation = null) {
  1167. const [r, g, b] = args;
  1168. let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
  1169. value = Math.round(value / 50);
  1170. if (value === 0) {
  1171. return 30;
  1172. }
  1173. let ansi = 30
  1174. + ((Math.round(b / 255) << 2)
  1175. | (Math.round(g / 255) << 1)
  1176. | Math.round(r / 255));
  1177. if (value === 2) {
  1178. ansi += 60;
  1179. }
  1180. return ansi;
  1181. };
  1182. convert.hsv.ansi16 = function (args) {
  1183. // Optimization here; we already know the value and don't need to get
  1184. // it converted for us.
  1185. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  1186. };
  1187. convert.rgb.ansi256 = function (args) {
  1188. const r = args[0];
  1189. const g = args[1];
  1190. const b = args[2];
  1191. // We use the extended greyscale palette here, with the exception of
  1192. // black and white. normal palette only has 4 greyscale shades.
  1193. if (r === g && g === b) {
  1194. if (r < 8) {
  1195. return 16;
  1196. }
  1197. if (r > 248) {
  1198. return 231;
  1199. }
  1200. return Math.round(((r - 8) / 247) * 24) + 232;
  1201. }
  1202. const ansi = 16
  1203. + (36 * Math.round(r / 255 * 5))
  1204. + (6 * Math.round(g / 255 * 5))
  1205. + Math.round(b / 255 * 5);
  1206. return ansi;
  1207. };
  1208. convert.ansi16.rgb = function (args) {
  1209. let color = args % 10;
  1210. // Handle greyscale
  1211. if (color === 0 || color === 7) {
  1212. if (args > 50) {
  1213. color += 3.5;
  1214. }
  1215. color = color / 10.5 * 255;
  1216. return [color, color, color];
  1217. }
  1218. const mult = (~~(args > 50) + 1) * 0.5;
  1219. const r = ((color & 1) * mult) * 255;
  1220. const g = (((color >> 1) & 1) * mult) * 255;
  1221. const b = (((color >> 2) & 1) * mult) * 255;
  1222. return [r, g, b];
  1223. };
  1224. convert.ansi256.rgb = function (args) {
  1225. // Handle greyscale
  1226. if (args >= 232) {
  1227. const c = (args - 232) * 10 + 8;
  1228. return [c, c, c];
  1229. }
  1230. args -= 16;
  1231. let rem;
  1232. const r = Math.floor(args / 36) / 5 * 255;
  1233. const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  1234. const b = (rem % 6) / 5 * 255;
  1235. return [r, g, b];
  1236. };
  1237. convert.rgb.hex = function (args) {
  1238. const integer = ((Math.round(args[0]) & 0xFF) << 16)
  1239. + ((Math.round(args[1]) & 0xFF) << 8)
  1240. + (Math.round(args[2]) & 0xFF);
  1241. const string = integer.toString(16).toUpperCase();
  1242. return '000000'.substring(string.length) + string;
  1243. };
  1244. convert.hex.rgb = function (args) {
  1245. const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  1246. if (!match) {
  1247. return [0, 0, 0];
  1248. }
  1249. let colorString = match[0];
  1250. if (match[0].length === 3) {
  1251. colorString = colorString.split('').map(char => {
  1252. return char + char;
  1253. }).join('');
  1254. }
  1255. const integer = parseInt(colorString, 16);
  1256. const r = (integer >> 16) & 0xFF;
  1257. const g = (integer >> 8) & 0xFF;
  1258. const b = integer & 0xFF;
  1259. return [r, g, b];
  1260. };
  1261. convert.rgb.hcg = function (rgb) {
  1262. const r = rgb[0] / 255;
  1263. const g = rgb[1] / 255;
  1264. const b = rgb[2] / 255;
  1265. const max = Math.max(Math.max(r, g), b);
  1266. const min = Math.min(Math.min(r, g), b);
  1267. const chroma = (max - min);
  1268. let grayscale;
  1269. let hue;
  1270. if (chroma < 1) {
  1271. grayscale = min / (1 - chroma);
  1272. } else {
  1273. grayscale = 0;
  1274. }
  1275. if (chroma <= 0) {
  1276. hue = 0;
  1277. } else
  1278. if (max === r) {
  1279. hue = ((g - b) / chroma) % 6;
  1280. } else
  1281. if (max === g) {
  1282. hue = 2 + (b - r) / chroma;
  1283. } else {
  1284. hue = 4 + (r - g) / chroma;
  1285. }
  1286. hue /= 6;
  1287. hue %= 1;
  1288. return [hue * 360, chroma * 100, grayscale * 100];
  1289. };
  1290. convert.hsl.hcg = function (hsl) {
  1291. const s = hsl[1] / 100;
  1292. const l = hsl[2] / 100;
  1293. const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
  1294. let f = 0;
  1295. if (c < 1.0) {
  1296. f = (l - 0.5 * c) / (1.0 - c);
  1297. }
  1298. return [hsl[0], c * 100, f * 100];
  1299. };
  1300. convert.hsv.hcg = function (hsv) {
  1301. const s = hsv[1] / 100;
  1302. const v = hsv[2] / 100;
  1303. const c = s * v;
  1304. let f = 0;
  1305. if (c < 1.0) {
  1306. f = (v - c) / (1 - c);
  1307. }
  1308. return [hsv[0], c * 100, f * 100];
  1309. };
  1310. convert.hcg.rgb = function (hcg) {
  1311. const h = hcg[0] / 360;
  1312. const c = hcg[1] / 100;
  1313. const g = hcg[2] / 100;
  1314. if (c === 0.0) {
  1315. return [g * 255, g * 255, g * 255];
  1316. }
  1317. const pure = [0, 0, 0];
  1318. const hi = (h % 1) * 6;
  1319. const v = hi % 1;
  1320. const w = 1 - v;
  1321. let mg = 0;
  1322. /* eslint-disable max-statements-per-line */
  1323. switch (Math.floor(hi)) {
  1324. case 0:
  1325. pure[0] = 1; pure[1] = v; pure[2] = 0; break;
  1326. case 1:
  1327. pure[0] = w; pure[1] = 1; pure[2] = 0; break;
  1328. case 2:
  1329. pure[0] = 0; pure[1] = 1; pure[2] = v; break;
  1330. case 3:
  1331. pure[0] = 0; pure[1] = w; pure[2] = 1; break;
  1332. case 4:
  1333. pure[0] = v; pure[1] = 0; pure[2] = 1; break;
  1334. default:
  1335. pure[0] = 1; pure[1] = 0; pure[2] = w;
  1336. }
  1337. /* eslint-enable max-statements-per-line */
  1338. mg = (1.0 - c) * g;
  1339. return [
  1340. (c * pure[0] + mg) * 255,
  1341. (c * pure[1] + mg) * 255,
  1342. (c * pure[2] + mg) * 255
  1343. ];
  1344. };
  1345. convert.hcg.hsv = function (hcg) {
  1346. const c = hcg[1] / 100;
  1347. const g = hcg[2] / 100;
  1348. const v = c + g * (1.0 - c);
  1349. let f = 0;
  1350. if (v > 0.0) {
  1351. f = c / v;
  1352. }
  1353. return [hcg[0], f * 100, v * 100];
  1354. };
  1355. convert.hcg.hsl = function (hcg) {
  1356. const c = hcg[1] / 100;
  1357. const g = hcg[2] / 100;
  1358. const l = g * (1.0 - c) + 0.5 * c;
  1359. let s = 0;
  1360. if (l > 0.0 && l < 0.5) {
  1361. s = c / (2 * l);
  1362. } else
  1363. if (l >= 0.5 && l < 1.0) {
  1364. s = c / (2 * (1 - l));
  1365. }
  1366. return [hcg[0], s * 100, l * 100];
  1367. };
  1368. convert.hcg.hwb = function (hcg) {
  1369. const c = hcg[1] / 100;
  1370. const g = hcg[2] / 100;
  1371. const v = c + g * (1.0 - c);
  1372. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  1373. };
  1374. convert.hwb.hcg = function (hwb) {
  1375. const w = hwb[1] / 100;
  1376. const b = hwb[2] / 100;
  1377. const v = 1 - b;
  1378. const c = v - w;
  1379. let g = 0;
  1380. if (c < 1) {
  1381. g = (v - c) / (1 - c);
  1382. }
  1383. return [hwb[0], c * 100, g * 100];
  1384. };
  1385. convert.apple.rgb = function (apple) {
  1386. return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
  1387. };
  1388. convert.rgb.apple = function (rgb) {
  1389. return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
  1390. };
  1391. convert.gray.rgb = function (args) {
  1392. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  1393. };
  1394. convert.gray.hsl = function (args) {
  1395. return [0, 0, args[0]];
  1396. };
  1397. convert.gray.hsv = convert.gray.hsl;
  1398. convert.gray.hwb = function (gray) {
  1399. return [0, 100, gray[0]];
  1400. };
  1401. convert.gray.cmyk = function (gray) {
  1402. return [0, 0, 0, gray[0]];
  1403. };
  1404. convert.gray.lab = function (gray) {
  1405. return [gray[0], 0, 0];
  1406. };
  1407. convert.gray.hex = function (gray) {
  1408. const val = Math.round(gray[0] / 100 * 255) & 0xFF;
  1409. const integer = (val << 16) + (val << 8) + val;
  1410. const string = integer.toString(16).toUpperCase();
  1411. return '000000'.substring(string.length) + string;
  1412. };
  1413. convert.rgb.gray = function (rgb) {
  1414. const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  1415. return [val / 255 * 100];
  1416. };
  1417. /***/ }),
  1418. /***/ 36354:
  1419. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1420. const conversions = __webpack_require__(22204);
  1421. const route = __webpack_require__(53303);
  1422. const convert = {};
  1423. const models = Object.keys(conversions);
  1424. function wrapRaw(fn) {
  1425. const wrappedFn = function (...args) {
  1426. const arg0 = args[0];
  1427. if (arg0 === undefined || arg0 === null) {
  1428. return arg0;
  1429. }
  1430. if (arg0.length > 1) {
  1431. args = arg0;
  1432. }
  1433. return fn(args);
  1434. };
  1435. // Preserve .conversion property if there is one
  1436. if ('conversion' in fn) {
  1437. wrappedFn.conversion = fn.conversion;
  1438. }
  1439. return wrappedFn;
  1440. }
  1441. function wrapRounded(fn) {
  1442. const wrappedFn = function (...args) {
  1443. const arg0 = args[0];
  1444. if (arg0 === undefined || arg0 === null) {
  1445. return arg0;
  1446. }
  1447. if (arg0.length > 1) {
  1448. args = arg0;
  1449. }
  1450. const result = fn(args);
  1451. // We're assuming the result is an array here.
  1452. // see notice in conversions.js; don't use box types
  1453. // in conversion functions.
  1454. if (typeof result === 'object') {
  1455. for (let len = result.length, i = 0; i < len; i++) {
  1456. result[i] = Math.round(result[i]);
  1457. }
  1458. }
  1459. return result;
  1460. };
  1461. // Preserve .conversion property if there is one
  1462. if ('conversion' in fn) {
  1463. wrappedFn.conversion = fn.conversion;
  1464. }
  1465. return wrappedFn;
  1466. }
  1467. models.forEach(fromModel => {
  1468. convert[fromModel] = {};
  1469. Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
  1470. Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
  1471. const routes = route(fromModel);
  1472. const routeModels = Object.keys(routes);
  1473. routeModels.forEach(toModel => {
  1474. const fn = routes[toModel];
  1475. convert[fromModel][toModel] = wrapRounded(fn);
  1476. convert[fromModel][toModel].raw = wrapRaw(fn);
  1477. });
  1478. });
  1479. module.exports = convert;
  1480. /***/ }),
  1481. /***/ 53303:
  1482. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1483. const conversions = __webpack_require__(22204);
  1484. /*
  1485. This function routes a model to all other models.
  1486. all functions that are routed have a property `.conversion` attached
  1487. to the returned synthetic function. This property is an array
  1488. of strings, each with the steps in between the 'from' and 'to'
  1489. color models (inclusive).
  1490. conversions that are not possible simply are not included.
  1491. */
  1492. function buildGraph() {
  1493. const graph = {};
  1494. // https://jsperf.com/object-keys-vs-for-in-with-closure/3
  1495. const models = Object.keys(conversions);
  1496. for (let len = models.length, i = 0; i < len; i++) {
  1497. graph[models[i]] = {
  1498. // http://jsperf.com/1-vs-infinity
  1499. // micro-opt, but this is simple.
  1500. distance: -1,
  1501. parent: null
  1502. };
  1503. }
  1504. return graph;
  1505. }
  1506. // https://en.wikipedia.org/wiki/Breadth-first_search
  1507. function deriveBFS(fromModel) {
  1508. const graph = buildGraph();
  1509. const queue = [fromModel]; // Unshift -> queue -> pop
  1510. graph[fromModel].distance = 0;
  1511. while (queue.length) {
  1512. const current = queue.pop();
  1513. const adjacents = Object.keys(conversions[current]);
  1514. for (let len = adjacents.length, i = 0; i < len; i++) {
  1515. const adjacent = adjacents[i];
  1516. const node = graph[adjacent];
  1517. if (node.distance === -1) {
  1518. node.distance = graph[current].distance + 1;
  1519. node.parent = current;
  1520. queue.unshift(adjacent);
  1521. }
  1522. }
  1523. }
  1524. return graph;
  1525. }
  1526. function link(from, to) {
  1527. return function (args) {
  1528. return to(from(args));
  1529. };
  1530. }
  1531. function wrapConversion(toModel, graph) {
  1532. const path = [graph[toModel].parent, toModel];
  1533. let fn = conversions[graph[toModel].parent][toModel];
  1534. let cur = graph[toModel].parent;
  1535. while (graph[cur].parent) {
  1536. path.unshift(graph[cur].parent);
  1537. fn = link(conversions[graph[cur].parent][cur], fn);
  1538. cur = graph[cur].parent;
  1539. }
  1540. fn.conversion = path;
  1541. return fn;
  1542. }
  1543. module.exports = function (fromModel) {
  1544. const graph = deriveBFS(fromModel);
  1545. const conversion = {};
  1546. const models = Object.keys(graph);
  1547. for (let len = models.length, i = 0; i < len; i++) {
  1548. const toModel = models[i];
  1549. const node = graph[toModel];
  1550. if (node.parent === null) {
  1551. // No possible conversion, or this node is the source model.
  1552. continue;
  1553. }
  1554. conversion[toModel] = wrapConversion(toModel, graph);
  1555. }
  1556. return conversion;
  1557. };
  1558. /***/ }),
  1559. /***/ 30668:
  1560. /***/ ((module) => {
  1561. "use strict";
  1562. module.exports = {
  1563. "aliceblue": [240, 248, 255],
  1564. "antiquewhite": [250, 235, 215],
  1565. "aqua": [0, 255, 255],
  1566. "aquamarine": [127, 255, 212],
  1567. "azure": [240, 255, 255],
  1568. "beige": [245, 245, 220],
  1569. "bisque": [255, 228, 196],
  1570. "black": [0, 0, 0],
  1571. "blanchedalmond": [255, 235, 205],
  1572. "blue": [0, 0, 255],
  1573. "blueviolet": [138, 43, 226],
  1574. "brown": [165, 42, 42],
  1575. "burlywood": [222, 184, 135],
  1576. "cadetblue": [95, 158, 160],
  1577. "chartreuse": [127, 255, 0],
  1578. "chocolate": [210, 105, 30],
  1579. "coral": [255, 127, 80],
  1580. "cornflowerblue": [100, 149, 237],
  1581. "cornsilk": [255, 248, 220],
  1582. "crimson": [220, 20, 60],
  1583. "cyan": [0, 255, 255],
  1584. "darkblue": [0, 0, 139],
  1585. "darkcyan": [0, 139, 139],
  1586. "darkgoldenrod": [184, 134, 11],
  1587. "darkgray": [169, 169, 169],
  1588. "darkgreen": [0, 100, 0],
  1589. "darkgrey": [169, 169, 169],
  1590. "darkkhaki": [189, 183, 107],
  1591. "darkmagenta": [139, 0, 139],
  1592. "darkolivegreen": [85, 107, 47],
  1593. "darkorange": [255, 140, 0],
  1594. "darkorchid": [153, 50, 204],
  1595. "darkred": [139, 0, 0],
  1596. "darksalmon": [233, 150, 122],
  1597. "darkseagreen": [143, 188, 143],
  1598. "darkslateblue": [72, 61, 139],
  1599. "darkslategray": [47, 79, 79],
  1600. "darkslategrey": [47, 79, 79],
  1601. "darkturquoise": [0, 206, 209],
  1602. "darkviolet": [148, 0, 211],
  1603. "deeppink": [255, 20, 147],
  1604. "deepskyblue": [0, 191, 255],
  1605. "dimgray": [105, 105, 105],
  1606. "dimgrey": [105, 105, 105],
  1607. "dodgerblue": [30, 144, 255],
  1608. "firebrick": [178, 34, 34],
  1609. "floralwhite": [255, 250, 240],
  1610. "forestgreen": [34, 139, 34],
  1611. "fuchsia": [255, 0, 255],
  1612. "gainsboro": [220, 220, 220],
  1613. "ghostwhite": [248, 248, 255],
  1614. "gold": [255, 215, 0],
  1615. "goldenrod": [218, 165, 32],
  1616. "gray": [128, 128, 128],
  1617. "green": [0, 128, 0],
  1618. "greenyellow": [173, 255, 47],
  1619. "grey": [128, 128, 128],
  1620. "honeydew": [240, 255, 240],
  1621. "hotpink": [255, 105, 180],
  1622. "indianred": [205, 92, 92],
  1623. "indigo": [75, 0, 130],
  1624. "ivory": [255, 255, 240],
  1625. "khaki": [240, 230, 140],
  1626. "lavender": [230, 230, 250],
  1627. "lavenderblush": [255, 240, 245],
  1628. "lawngreen": [124, 252, 0],
  1629. "lemonchiffon": [255, 250, 205],
  1630. "lightblue": [173, 216, 230],
  1631. "lightcoral": [240, 128, 128],
  1632. "lightcyan": [224, 255, 255],
  1633. "lightgoldenrodyellow": [250, 250, 210],
  1634. "lightgray": [211, 211, 211],
  1635. "lightgreen": [144, 238, 144],
  1636. "lightgrey": [211, 211, 211],
  1637. "lightpink": [255, 182, 193],
  1638. "lightsalmon": [255, 160, 122],
  1639. "lightseagreen": [32, 178, 170],
  1640. "lightskyblue": [135, 206, 250],
  1641. "lightslategray": [119, 136, 153],
  1642. "lightslategrey": [119, 136, 153],
  1643. "lightsteelblue": [176, 196, 222],
  1644. "lightyellow": [255, 255, 224],
  1645. "lime": [0, 255, 0],
  1646. "limegreen": [50, 205, 50],
  1647. "linen": [250, 240, 230],
  1648. "magenta": [255, 0, 255],
  1649. "maroon": [128, 0, 0],
  1650. "mediumaquamarine": [102, 205, 170],
  1651. "mediumblue": [0, 0, 205],
  1652. "mediumorchid": [186, 85, 211],
  1653. "mediumpurple": [147, 112, 219],
  1654. "mediumseagreen": [60, 179, 113],
  1655. "mediumslateblue": [123, 104, 238],
  1656. "mediumspringgreen": [0, 250, 154],
  1657. "mediumturquoise": [72, 209, 204],
  1658. "mediumvioletred": [199, 21, 133],
  1659. "midnightblue": [25, 25, 112],
  1660. "mintcream": [245, 255, 250],
  1661. "mistyrose": [255, 228, 225],
  1662. "moccasin": [255, 228, 181],
  1663. "navajowhite": [255, 222, 173],
  1664. "navy": [0, 0, 128],
  1665. "oldlace": [253, 245, 230],
  1666. "olive": [128, 128, 0],
  1667. "olivedrab": [107, 142, 35],
  1668. "orange": [255, 165, 0],
  1669. "orangered": [255, 69, 0],
  1670. "orchid": [218, 112, 214],
  1671. "palegoldenrod": [238, 232, 170],
  1672. "palegreen": [152, 251, 152],
  1673. "paleturquoise": [175, 238, 238],
  1674. "palevioletred": [219, 112, 147],
  1675. "papayawhip": [255, 239, 213],
  1676. "peachpuff": [255, 218, 185],
  1677. "peru": [205, 133, 63],
  1678. "pink": [255, 192, 203],
  1679. "plum": [221, 160, 221],
  1680. "powderblue": [176, 224, 230],
  1681. "purple": [128, 0, 128],
  1682. "rebeccapurple": [102, 51, 153],
  1683. "red": [255, 0, 0],
  1684. "rosybrown": [188, 143, 143],
  1685. "royalblue": [65, 105, 225],
  1686. "saddlebrown": [139, 69, 19],
  1687. "salmon": [250, 128, 114],
  1688. "sandybrown": [244, 164, 96],
  1689. "seagreen": [46, 139, 87],
  1690. "seashell": [255, 245, 238],
  1691. "sienna": [160, 82, 45],
  1692. "silver": [192, 192, 192],
  1693. "skyblue": [135, 206, 235],
  1694. "slateblue": [106, 90, 205],
  1695. "slategray": [112, 128, 144],
  1696. "slategrey": [112, 128, 144],
  1697. "snow": [255, 250, 250],
  1698. "springgreen": [0, 255, 127],
  1699. "steelblue": [70, 130, 180],
  1700. "tan": [210, 180, 140],
  1701. "teal": [0, 128, 128],
  1702. "thistle": [216, 191, 216],
  1703. "tomato": [255, 99, 71],
  1704. "turquoise": [64, 224, 208],
  1705. "violet": [238, 130, 238],
  1706. "wheat": [245, 222, 179],
  1707. "white": [255, 255, 255],
  1708. "whitesmoke": [245, 245, 245],
  1709. "yellow": [255, 255, 0],
  1710. "yellowgreen": [154, 205, 50]
  1711. };
  1712. /***/ }),
  1713. /***/ 16563:
  1714. /***/ ((module) => {
  1715. "use strict";
  1716. module.exports = (flag, argv = process.argv) => {
  1717. const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
  1718. const position = argv.indexOf(prefix + flag);
  1719. const terminatorPosition = argv.indexOf('--');
  1720. return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
  1721. };
  1722. /***/ }),
  1723. /***/ 505:
  1724. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1725. "use strict";
  1726. const os = __webpack_require__(12087);
  1727. const tty = __webpack_require__(33867);
  1728. const hasFlag = __webpack_require__(16563);
  1729. const {env} = process;
  1730. let forceColor;
  1731. if (hasFlag('no-color') ||
  1732. hasFlag('no-colors') ||
  1733. hasFlag('color=false') ||
  1734. hasFlag('color=never')) {
  1735. forceColor = 0;
  1736. } else if (hasFlag('color') ||
  1737. hasFlag('colors') ||
  1738. hasFlag('color=true') ||
  1739. hasFlag('color=always')) {
  1740. forceColor = 1;
  1741. }
  1742. if ('FORCE_COLOR' in env) {
  1743. if (env.FORCE_COLOR === 'true') {
  1744. forceColor = 1;
  1745. } else if (env.FORCE_COLOR === 'false') {
  1746. forceColor = 0;
  1747. } else {
  1748. forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
  1749. }
  1750. }
  1751. function translateLevel(level) {
  1752. if (level === 0) {
  1753. return false;
  1754. }
  1755. return {
  1756. level,
  1757. hasBasic: true,
  1758. has256: level >= 2,
  1759. has16m: level >= 3
  1760. };
  1761. }
  1762. function supportsColor(haveStream, streamIsTTY) {
  1763. if (forceColor === 0) {
  1764. return 0;
  1765. }
  1766. if (hasFlag('color=16m') ||
  1767. hasFlag('color=full') ||
  1768. hasFlag('color=truecolor')) {
  1769. return 3;
  1770. }
  1771. if (hasFlag('color=256')) {
  1772. return 2;
  1773. }
  1774. if (haveStream && !streamIsTTY && forceColor === undefined) {
  1775. return 0;
  1776. }
  1777. const min = forceColor || 0;
  1778. if (env.TERM === 'dumb') {
  1779. return min;
  1780. }
  1781. if (process.platform === 'win32') {
  1782. // Windows 10 build 10586 is the first Windows release that supports 256 colors.
  1783. // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
  1784. const osRelease = os.release().split('.');
  1785. if (
  1786. Number(osRelease[0]) >= 10 &&
  1787. Number(osRelease[2]) >= 10586
  1788. ) {
  1789. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  1790. }
  1791. return 1;
  1792. }
  1793. if ('CI' in env) {
  1794. if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
  1795. return 1;
  1796. }
  1797. return min;
  1798. }
  1799. if ('TEAMCITY_VERSION' in env) {
  1800. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  1801. }
  1802. if (env.COLORTERM === 'truecolor') {
  1803. return 3;
  1804. }
  1805. if ('TERM_PROGRAM' in env) {
  1806. const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
  1807. switch (env.TERM_PROGRAM) {
  1808. case 'iTerm.app':
  1809. return version >= 3 ? 3 : 2;
  1810. case 'Apple_Terminal':
  1811. return 2;
  1812. // No default
  1813. }
  1814. }
  1815. if (/-256(color)?$/i.test(env.TERM)) {
  1816. return 2;
  1817. }
  1818. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  1819. return 1;
  1820. }
  1821. if ('COLORTERM' in env) {
  1822. return 1;
  1823. }
  1824. return min;
  1825. }
  1826. function getSupportLevel(stream) {
  1827. const level = supportsColor(stream, stream && stream.isTTY);
  1828. return translateLevel(level);
  1829. }
  1830. module.exports = {
  1831. supportsColor: getSupportLevel,
  1832. stdout: translateLevel(supportsColor(true, tty.isatty(1))),
  1833. stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  1834. };
  1835. /***/ }),
  1836. /***/ 34341:
  1837. /***/ ((module) => {
  1838. "use strict";
  1839. const mimicFn = (to, from) => {
  1840. for (const prop of Reflect.ownKeys(from)) {
  1841. Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
  1842. }
  1843. return to;
  1844. };
  1845. module.exports = mimicFn;
  1846. // TODO: Remove this for the next major release
  1847. module.exports.default = mimicFn;
  1848. /***/ }),
  1849. /***/ 31322:
  1850. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1851. "use strict";
  1852. const mimicFn = __webpack_require__(34341);
  1853. const calledFunctions = new WeakMap();
  1854. const onetime = (function_, options = {}) => {
  1855. if (typeof function_ !== 'function') {
  1856. throw new TypeError('Expected a function');
  1857. }
  1858. let returnValue;
  1859. let callCount = 0;
  1860. const functionName = function_.displayName || function_.name || '<anonymous>';
  1861. const onetime = function (...arguments_) {
  1862. calledFunctions.set(onetime, ++callCount);
  1863. if (callCount === 1) {
  1864. returnValue = function_.apply(this, arguments_);
  1865. function_ = null;
  1866. } else if (options.throw === true) {
  1867. throw new Error(`Function \`${functionName}\` can only be called once`);
  1868. }
  1869. return returnValue;
  1870. };
  1871. mimicFn(onetime, function_);
  1872. calledFunctions.set(onetime, callCount);
  1873. return onetime;
  1874. };
  1875. module.exports = onetime;
  1876. // TODO: Remove this for the next major release
  1877. module.exports.default = onetime;
  1878. module.exports.callCount = function_ => {
  1879. if (!calledFunctions.has(function_)) {
  1880. throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
  1881. }
  1882. return calledFunctions.get(function_);
  1883. };
  1884. /***/ }),
  1885. /***/ 63395:
  1886. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1887. "use strict";
  1888. const readline = __webpack_require__(51058);
  1889. const chalk = __webpack_require__(29970);
  1890. const cliCursor = __webpack_require__(23909);
  1891. const cliSpinners = __webpack_require__(54011);
  1892. const logSymbols = __webpack_require__(9986);
  1893. const stripAnsi = __webpack_require__(53217);
  1894. const wcwidth = __webpack_require__(71011);
  1895. const isInteractive = __webpack_require__(35131);
  1896. const isUnicodeSupported = __webpack_require__(4500);
  1897. const {BufferListStream} = __webpack_require__(10022);
  1898. const TEXT = Symbol('text');
  1899. const PREFIX_TEXT = Symbol('prefixText');
  1900. const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code
  1901. class StdinDiscarder {
  1902. constructor() {
  1903. this.requests = 0;
  1904. this.mutedStream = new BufferListStream();
  1905. this.mutedStream.pipe(process.stdout);
  1906. const self = this; // eslint-disable-line unicorn/no-this-assignment
  1907. this.ourEmit = function (event, data, ...args) {
  1908. const {stdin} = process;
  1909. if (self.requests > 0 || stdin.emit === self.ourEmit) {
  1910. if (event === 'keypress') { // Fixes readline behavior
  1911. return;
  1912. }
  1913. if (event === 'data' && data.includes(ASCII_ETX_CODE)) {
  1914. process.emit('SIGINT');
  1915. }
  1916. Reflect.apply(self.oldEmit, this, [event, data, ...args]);
  1917. } else {
  1918. Reflect.apply(process.stdin.emit, this, [event, data, ...args]);
  1919. }
  1920. };
  1921. }
  1922. start() {
  1923. this.requests++;
  1924. if (this.requests === 1) {
  1925. this.realStart();
  1926. }
  1927. }
  1928. stop() {
  1929. if (this.requests <= 0) {
  1930. throw new Error('`stop` called more times than `start`');
  1931. }
  1932. this.requests--;
  1933. if (this.requests === 0) {
  1934. this.realStop();
  1935. }
  1936. }
  1937. realStart() {
  1938. // No known way to make it work reliably on Windows
  1939. if (process.platform === 'win32') {
  1940. return;
  1941. }
  1942. this.rl = readline.createInterface({
  1943. input: process.stdin,
  1944. output: this.mutedStream
  1945. });
  1946. this.rl.on('SIGINT', () => {
  1947. if (process.listenerCount('SIGINT') === 0) {
  1948. process.emit('SIGINT');
  1949. } else {
  1950. this.rl.close();
  1951. process.kill(process.pid, 'SIGINT');
  1952. }
  1953. });
  1954. }
  1955. realStop() {
  1956. if (process.platform === 'win32') {
  1957. return;
  1958. }
  1959. this.rl.close();
  1960. this.rl = undefined;
  1961. }
  1962. }
  1963. let stdinDiscarder;
  1964. class Ora {
  1965. constructor(options) {
  1966. if (!stdinDiscarder) {
  1967. stdinDiscarder = new StdinDiscarder();
  1968. }
  1969. if (typeof options === 'string') {
  1970. options = {
  1971. text: options
  1972. };
  1973. }
  1974. this.options = {
  1975. text: '',
  1976. color: 'cyan',
  1977. stream: process.stderr,
  1978. discardStdin: true,
  1979. ...options
  1980. };
  1981. this.spinner = this.options.spinner;
  1982. this.color = this.options.color;
  1983. this.hideCursor = this.options.hideCursor !== false;
  1984. this.interval = this.options.interval || this.spinner.interval || 100;
  1985. this.stream = this.options.stream;
  1986. this.id = undefined;
  1987. this.isEnabled = typeof this.options.isEnabled === 'boolean' ? this.options.isEnabled : isInteractive({stream: this.stream});
  1988. this.isSilent = typeof this.options.isSilent === 'boolean' ? this.options.isSilent : false;
  1989. // Set *after* `this.stream`
  1990. this.text = this.options.text;
  1991. this.prefixText = this.options.prefixText;
  1992. this.linesToClear = 0;
  1993. this.indent = this.options.indent;
  1994. this.discardStdin = this.options.discardStdin;
  1995. this.isDiscardingStdin = false;
  1996. }
  1997. get indent() {
  1998. return this._indent;
  1999. }
  2000. set indent(indent = 0) {
  2001. if (!(indent >= 0 && Number.isInteger(indent))) {
  2002. throw new Error('The `indent` option must be an integer from 0 and up');
  2003. }
  2004. this._indent = indent;
  2005. }
  2006. _updateInterval(interval) {
  2007. if (interval !== undefined) {
  2008. this.interval = interval;
  2009. }
  2010. }
  2011. get spinner() {
  2012. return this._spinner;
  2013. }
  2014. set spinner(spinner) {
  2015. this.frameIndex = 0;
  2016. if (typeof spinner === 'object') {
  2017. if (spinner.frames === undefined) {
  2018. throw new Error('The given spinner must have a `frames` property');
  2019. }
  2020. this._spinner = spinner;
  2021. } else if (!isUnicodeSupported()) {
  2022. this._spinner = cliSpinners.line;
  2023. } else if (spinner === undefined) {
  2024. // Set default spinner
  2025. this._spinner = cliSpinners.dots;
  2026. } else if (cliSpinners[spinner]) {
  2027. this._spinner = cliSpinners[spinner];
  2028. } else {
  2029. throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);
  2030. }
  2031. this._updateInterval(this._spinner.interval);
  2032. }
  2033. get text() {
  2034. return this[TEXT];
  2035. }
  2036. set text(value) {
  2037. this[TEXT] = value;
  2038. this.updateLineCount();
  2039. }
  2040. get prefixText() {
  2041. return this[PREFIX_TEXT];
  2042. }
  2043. set prefixText(value) {
  2044. this[PREFIX_TEXT] = value;
  2045. this.updateLineCount();
  2046. }
  2047. get isSpinning() {
  2048. return this.id !== undefined;
  2049. }
  2050. getFullPrefixText(prefixText = this[PREFIX_TEXT], postfix = ' ') {
  2051. if (typeof prefixText === 'string') {
  2052. return prefixText + postfix;
  2053. }
  2054. if (typeof prefixText === 'function') {
  2055. return prefixText() + postfix;
  2056. }
  2057. return '';
  2058. }
  2059. updateLineCount() {
  2060. const columns = this.stream.columns || 80;
  2061. const fullPrefixText = this.getFullPrefixText(this.prefixText, '-');
  2062. this.lineCount = 0;
  2063. for (const line of stripAnsi(fullPrefixText + '--' + this[TEXT]).split('\n')) {
  2064. this.lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
  2065. }
  2066. }
  2067. get isEnabled() {
  2068. return this._isEnabled && !this.isSilent;
  2069. }
  2070. set isEnabled(value) {
  2071. if (typeof value !== 'boolean') {
  2072. throw new TypeError('The `isEnabled` option must be a boolean');
  2073. }
  2074. this._isEnabled = value;
  2075. }
  2076. get isSilent() {
  2077. return this._isSilent;
  2078. }
  2079. set isSilent(value) {
  2080. if (typeof value !== 'boolean') {
  2081. throw new TypeError('The `isSilent` option must be a boolean');
  2082. }
  2083. this._isSilent = value;
  2084. }
  2085. frame() {
  2086. const {frames} = this.spinner;
  2087. let frame = frames[this.frameIndex];
  2088. if (this.color) {
  2089. frame = chalk[this.color](frame);
  2090. }
  2091. this.frameIndex = ++this.frameIndex % frames.length;
  2092. const fullPrefixText = (typeof this.prefixText === 'string' && this.prefixText !== '') ? this.prefixText + ' ' : '';
  2093. const fullText = typeof this.text === 'string' ? ' ' + this.text : '';
  2094. return fullPrefixText + frame + fullText;
  2095. }
  2096. clear() {
  2097. if (!this.isEnabled || !this.stream.isTTY) {
  2098. return this;
  2099. }
  2100. for (let i = 0; i < this.linesToClear; i++) {
  2101. if (i > 0) {
  2102. this.stream.moveCursor(0, -1);
  2103. }
  2104. this.stream.clearLine();
  2105. this.stream.cursorTo(this.indent);
  2106. }
  2107. this.linesToClear = 0;
  2108. return this;
  2109. }
  2110. render() {
  2111. if (this.isSilent) {
  2112. return this;
  2113. }
  2114. this.clear();
  2115. this.stream.write(this.frame());
  2116. this.linesToClear = this.lineCount;
  2117. return this;
  2118. }
  2119. start(text) {
  2120. if (text) {
  2121. this.text = text;
  2122. }
  2123. if (this.isSilent) {
  2124. return this;
  2125. }
  2126. if (!this.isEnabled) {
  2127. if (this.text) {
  2128. this.stream.write(`- ${this.text}\n`);
  2129. }
  2130. return this;
  2131. }
  2132. if (this.isSpinning) {
  2133. return this;
  2134. }
  2135. if (this.hideCursor) {
  2136. cliCursor.hide(this.stream);
  2137. }
  2138. if (this.discardStdin && process.stdin.isTTY) {
  2139. this.isDiscardingStdin = true;
  2140. stdinDiscarder.start();
  2141. }
  2142. this.render();
  2143. this.id = setInterval(this.render.bind(this), this.interval);
  2144. return this;
  2145. }
  2146. stop() {
  2147. if (!this.isEnabled) {
  2148. return this;
  2149. }
  2150. clearInterval(this.id);
  2151. this.id = undefined;
  2152. this.frameIndex = 0;
  2153. this.clear();
  2154. if (this.hideCursor) {
  2155. cliCursor.show(this.stream);
  2156. }
  2157. if (this.discardStdin && process.stdin.isTTY && this.isDiscardingStdin) {
  2158. stdinDiscarder.stop();
  2159. this.isDiscardingStdin = false;
  2160. }
  2161. return this;
  2162. }
  2163. succeed(text) {
  2164. return this.stopAndPersist({symbol: logSymbols.success, text});
  2165. }
  2166. fail(text) {
  2167. return this.stopAndPersist({symbol: logSymbols.error, text});
  2168. }
  2169. warn(text) {
  2170. return this.stopAndPersist({symbol: logSymbols.warning, text});
  2171. }
  2172. info(text) {
  2173. return this.stopAndPersist({symbol: logSymbols.info, text});
  2174. }
  2175. stopAndPersist(options = {}) {
  2176. if (this.isSilent) {
  2177. return this;
  2178. }
  2179. const prefixText = options.prefixText || this.prefixText;
  2180. const text = options.text || this.text;
  2181. const fullText = (typeof text === 'string') ? ' ' + text : '';
  2182. this.stop();
  2183. this.stream.write(`${this.getFullPrefixText(prefixText, ' ')}${options.symbol || ' '}${fullText}\n`);
  2184. return this;
  2185. }
  2186. }
  2187. const oraFactory = function (options) {
  2188. return new Ora(options);
  2189. };
  2190. module.exports = oraFactory;
  2191. module.exports.promise = (action, options) => {
  2192. // eslint-disable-next-line promise/prefer-await-to-then
  2193. if (typeof action.then !== 'function') {
  2194. throw new TypeError('Parameter `action` must be a Promise');
  2195. }
  2196. const spinner = new Ora(options);
  2197. spinner.start();
  2198. (async () => {
  2199. try {
  2200. await action;
  2201. spinner.succeed();
  2202. } catch {
  2203. spinner.fail();
  2204. }
  2205. })();
  2206. return spinner;
  2207. };
  2208. /***/ }),
  2209. /***/ 93666:
  2210. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2211. "use strict";
  2212. /* module decorator */ module = __webpack_require__.nmd(module);
  2213. const wrapAnsi16 = (fn, offset) => (...args) => {
  2214. const code = fn(...args);
  2215. return `\u001B[${code + offset}m`;
  2216. };
  2217. const wrapAnsi256 = (fn, offset) => (...args) => {
  2218. const code = fn(...args);
  2219. return `\u001B[${38 + offset};5;${code}m`;
  2220. };
  2221. const wrapAnsi16m = (fn, offset) => (...args) => {
  2222. const rgb = fn(...args);
  2223. return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  2224. };
  2225. const ansi2ansi = n => n;
  2226. const rgb2rgb = (r, g, b) => [r, g, b];
  2227. const setLazyProperty = (object, property, get) => {
  2228. Object.defineProperty(object, property, {
  2229. get: () => {
  2230. const value = get();
  2231. Object.defineProperty(object, property, {
  2232. value,
  2233. enumerable: true,
  2234. configurable: true
  2235. });
  2236. return value;
  2237. },
  2238. enumerable: true,
  2239. configurable: true
  2240. });
  2241. };
  2242. /** @type {typeof import('color-convert')} */
  2243. let colorConvert;
  2244. const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
  2245. if (colorConvert === undefined) {
  2246. colorConvert = __webpack_require__(63387);
  2247. }
  2248. const offset = isBackground ? 10 : 0;
  2249. const styles = {};
  2250. for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
  2251. const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
  2252. if (sourceSpace === targetSpace) {
  2253. styles[name] = wrap(identity, offset);
  2254. } else if (typeof suite === 'object') {
  2255. styles[name] = wrap(suite[targetSpace], offset);
  2256. }
  2257. }
  2258. return styles;
  2259. };
  2260. function assembleStyles() {
  2261. const codes = new Map();
  2262. const styles = {
  2263. modifier: {
  2264. reset: [0, 0],
  2265. // 21 isn't widely supported and 22 does the same thing
  2266. bold: [1, 22],
  2267. dim: [2, 22],
  2268. italic: [3, 23],
  2269. underline: [4, 24],
  2270. inverse: [7, 27],
  2271. hidden: [8, 28],
  2272. strikethrough: [9, 29]
  2273. },
  2274. color: {
  2275. black: [30, 39],
  2276. red: [31, 39],
  2277. green: [32, 39],
  2278. yellow: [33, 39],
  2279. blue: [34, 39],
  2280. magenta: [35, 39],
  2281. cyan: [36, 39],
  2282. white: [37, 39],
  2283. // Bright color
  2284. blackBright: [90, 39],
  2285. redBright: [91, 39],
  2286. greenBright: [92, 39],
  2287. yellowBright: [93, 39],
  2288. blueBright: [94, 39],
  2289. magentaBright: [95, 39],
  2290. cyanBright: [96, 39],
  2291. whiteBright: [97, 39]
  2292. },
  2293. bgColor: {
  2294. bgBlack: [40, 49],
  2295. bgRed: [41, 49],
  2296. bgGreen: [42, 49],
  2297. bgYellow: [43, 49],
  2298. bgBlue: [44, 49],
  2299. bgMagenta: [45, 49],
  2300. bgCyan: [46, 49],
  2301. bgWhite: [47, 49],
  2302. // Bright color
  2303. bgBlackBright: [100, 49],
  2304. bgRedBright: [101, 49],
  2305. bgGreenBright: [102, 49],
  2306. bgYellowBright: [103, 49],
  2307. bgBlueBright: [104, 49],
  2308. bgMagentaBright: [105, 49],
  2309. bgCyanBright: [106, 49],
  2310. bgWhiteBright: [107, 49]
  2311. }
  2312. };
  2313. // Alias bright black as gray (and grey)
  2314. styles.color.gray = styles.color.blackBright;
  2315. styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
  2316. styles.color.grey = styles.color.blackBright;
  2317. styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
  2318. for (const [groupName, group] of Object.entries(styles)) {
  2319. for (const [styleName, style] of Object.entries(group)) {
  2320. styles[styleName] = {
  2321. open: `\u001B[${style[0]}m`,
  2322. close: `\u001B[${style[1]}m`
  2323. };
  2324. group[styleName] = styles[styleName];
  2325. codes.set(style[0], style[1]);
  2326. }
  2327. Object.defineProperty(styles, groupName, {
  2328. value: group,
  2329. enumerable: false
  2330. });
  2331. }
  2332. Object.defineProperty(styles, 'codes', {
  2333. value: codes,
  2334. enumerable: false
  2335. });
  2336. styles.color.close = '\u001B[39m';
  2337. styles.bgColor.close = '\u001B[49m';
  2338. setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
  2339. setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
  2340. setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
  2341. setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
  2342. setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
  2343. setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
  2344. return styles;
  2345. }
  2346. // Make the export immutable
  2347. Object.defineProperty(module, 'exports', {
  2348. enumerable: true,
  2349. get: assembleStyles
  2350. });
  2351. /***/ }),
  2352. /***/ 29970:
  2353. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2354. "use strict";
  2355. const ansiStyles = __webpack_require__(93666);
  2356. const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(87342);
  2357. const {
  2358. stringReplaceAll,
  2359. stringEncaseCRLFWithFirstIndex
  2360. } = __webpack_require__(6720);
  2361. const {isArray} = Array;
  2362. // `supportsColor.level` → `ansiStyles.color[name]` mapping
  2363. const levelMapping = [
  2364. 'ansi',
  2365. 'ansi',
  2366. 'ansi256',
  2367. 'ansi16m'
  2368. ];
  2369. const styles = Object.create(null);
  2370. const applyOptions = (object, options = {}) => {
  2371. if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
  2372. throw new Error('The `level` option should be an integer from 0 to 3');
  2373. }
  2374. // Detect level if not set manually
  2375. const colorLevel = stdoutColor ? stdoutColor.level : 0;
  2376. object.level = options.level === undefined ? colorLevel : options.level;
  2377. };
  2378. class ChalkClass {
  2379. constructor(options) {
  2380. // eslint-disable-next-line no-constructor-return
  2381. return chalkFactory(options);
  2382. }
  2383. }
  2384. const chalkFactory = options => {
  2385. const chalk = {};
  2386. applyOptions(chalk, options);
  2387. chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
  2388. Object.setPrototypeOf(chalk, Chalk.prototype);
  2389. Object.setPrototypeOf(chalk.template, chalk);
  2390. chalk.template.constructor = () => {
  2391. throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
  2392. };
  2393. chalk.template.Instance = ChalkClass;
  2394. return chalk.template;
  2395. };
  2396. function Chalk(options) {
  2397. return chalkFactory(options);
  2398. }
  2399. for (const [styleName, style] of Object.entries(ansiStyles)) {
  2400. styles[styleName] = {
  2401. get() {
  2402. const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
  2403. Object.defineProperty(this, styleName, {value: builder});
  2404. return builder;
  2405. }
  2406. };
  2407. }
  2408. styles.visible = {
  2409. get() {
  2410. const builder = createBuilder(this, this._styler, true);
  2411. Object.defineProperty(this, 'visible', {value: builder});
  2412. return builder;
  2413. }
  2414. };
  2415. const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
  2416. for (const model of usedModels) {
  2417. styles[model] = {
  2418. get() {
  2419. const {level} = this;
  2420. return function (...arguments_) {
  2421. const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
  2422. return createBuilder(this, styler, this._isEmpty);
  2423. };
  2424. }
  2425. };
  2426. }
  2427. for (const model of usedModels) {
  2428. const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
  2429. styles[bgModel] = {
  2430. get() {
  2431. const {level} = this;
  2432. return function (...arguments_) {
  2433. const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
  2434. return createBuilder(this, styler, this._isEmpty);
  2435. };
  2436. }
  2437. };
  2438. }
  2439. const proto = Object.defineProperties(() => {}, {
  2440. ...styles,
  2441. level: {
  2442. enumerable: true,
  2443. get() {
  2444. return this._generator.level;
  2445. },
  2446. set(level) {
  2447. this._generator.level = level;
  2448. }
  2449. }
  2450. });
  2451. const createStyler = (open, close, parent) => {
  2452. let openAll;
  2453. let closeAll;
  2454. if (parent === undefined) {
  2455. openAll = open;
  2456. closeAll = close;
  2457. } else {
  2458. openAll = parent.openAll + open;
  2459. closeAll = close + parent.closeAll;
  2460. }
  2461. return {
  2462. open,
  2463. close,
  2464. openAll,
  2465. closeAll,
  2466. parent
  2467. };
  2468. };
  2469. const createBuilder = (self, _styler, _isEmpty) => {
  2470. const builder = (...arguments_) => {
  2471. if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
  2472. // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`
  2473. return applyStyle(builder, chalkTag(builder, ...arguments_));
  2474. }
  2475. // Single argument is hot path, implicit coercion is faster than anything
  2476. // eslint-disable-next-line no-implicit-coercion
  2477. return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
  2478. };
  2479. // We alter the prototype because we must return a function, but there is
  2480. // no way to create a function with a different prototype
  2481. Object.setPrototypeOf(builder, proto);
  2482. builder._generator = self;
  2483. builder._styler = _styler;
  2484. builder._isEmpty = _isEmpty;
  2485. return builder;
  2486. };
  2487. const applyStyle = (self, string) => {
  2488. if (self.level <= 0 || !string) {
  2489. return self._isEmpty ? '' : string;
  2490. }
  2491. let styler = self._styler;
  2492. if (styler === undefined) {
  2493. return string;
  2494. }
  2495. const {openAll, closeAll} = styler;
  2496. if (string.indexOf('\u001B') !== -1) {
  2497. while (styler !== undefined) {
  2498. // Replace any instances already present with a re-opening code
  2499. // otherwise only the part of the string until said closing code
  2500. // will be colored, and the rest will simply be 'plain'.
  2501. string = stringReplaceAll(string, styler.close, styler.open);
  2502. styler = styler.parent;
  2503. }
  2504. }
  2505. // We can move both next actions out of loop, because remaining actions in loop won't have
  2506. // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
  2507. // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
  2508. const lfIndex = string.indexOf('\n');
  2509. if (lfIndex !== -1) {
  2510. string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
  2511. }
  2512. return openAll + string + closeAll;
  2513. };
  2514. let template;
  2515. const chalkTag = (chalk, ...strings) => {
  2516. const [firstString] = strings;
  2517. if (!isArray(firstString) || !isArray(firstString.raw)) {
  2518. // If chalk() was called by itself or with a string,
  2519. // return the string itself as a string.
  2520. return strings.join(' ');
  2521. }
  2522. const arguments_ = strings.slice(1);
  2523. const parts = [firstString.raw[0]];
  2524. for (let i = 1; i < firstString.length; i++) {
  2525. parts.push(
  2526. String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
  2527. String(firstString.raw[i])
  2528. );
  2529. }
  2530. if (template === undefined) {
  2531. template = __webpack_require__(32938);
  2532. }
  2533. return template(chalk, parts.join(''));
  2534. };
  2535. Object.defineProperties(Chalk.prototype, styles);
  2536. const chalk = Chalk(); // eslint-disable-line new-cap
  2537. chalk.supportsColor = stdoutColor;
  2538. chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
  2539. chalk.stderr.supportsColor = stderrColor;
  2540. module.exports = chalk;
  2541. /***/ }),
  2542. /***/ 32938:
  2543. /***/ ((module) => {
  2544. "use strict";
  2545. const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  2546. const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  2547. const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  2548. const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
  2549. const ESCAPES = new Map([
  2550. ['n', '\n'],
  2551. ['r', '\r'],
  2552. ['t', '\t'],
  2553. ['b', '\b'],
  2554. ['f', '\f'],
  2555. ['v', '\v'],
  2556. ['0', '\0'],
  2557. ['\\', '\\'],
  2558. ['e', '\u001B'],
  2559. ['a', '\u0007']
  2560. ]);
  2561. function unescape(c) {
  2562. const u = c[0] === 'u';
  2563. const bracket = c[1] === '{';
  2564. if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
  2565. return String.fromCharCode(parseInt(c.slice(1), 16));
  2566. }
  2567. if (u && bracket) {
  2568. return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
  2569. }
  2570. return ESCAPES.get(c) || c;
  2571. }
  2572. function parseArguments(name, arguments_) {
  2573. const results = [];
  2574. const chunks = arguments_.trim().split(/\s*,\s*/g);
  2575. let matches;
  2576. for (const chunk of chunks) {
  2577. const number = Number(chunk);
  2578. if (!Number.isNaN(number)) {
  2579. results.push(number);
  2580. } else if ((matches = chunk.match(STRING_REGEX))) {
  2581. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
  2582. } else {
  2583. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
  2584. }
  2585. }
  2586. return results;
  2587. }
  2588. function parseStyle(style) {
  2589. STYLE_REGEX.lastIndex = 0;
  2590. const results = [];
  2591. let matches;
  2592. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  2593. const name = matches[1];
  2594. if (matches[2]) {
  2595. const args = parseArguments(name, matches[2]);
  2596. results.push([name].concat(args));
  2597. } else {
  2598. results.push([name]);
  2599. }
  2600. }
  2601. return results;
  2602. }
  2603. function buildStyle(chalk, styles) {
  2604. const enabled = {};
  2605. for (const layer of styles) {
  2606. for (const style of layer.styles) {
  2607. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  2608. }
  2609. }
  2610. let current = chalk;
  2611. for (const [styleName, styles] of Object.entries(enabled)) {
  2612. if (!Array.isArray(styles)) {
  2613. continue;
  2614. }
  2615. if (!(styleName in current)) {
  2616. throw new Error(`Unknown Chalk style: ${styleName}`);
  2617. }
  2618. current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
  2619. }
  2620. return current;
  2621. }
  2622. module.exports = (chalk, temporary) => {
  2623. const styles = [];
  2624. const chunks = [];
  2625. let chunk = [];
  2626. // eslint-disable-next-line max-params
  2627. temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
  2628. if (escapeCharacter) {
  2629. chunk.push(unescape(escapeCharacter));
  2630. } else if (style) {
  2631. const string = chunk.join('');
  2632. chunk = [];
  2633. chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
  2634. styles.push({inverse, styles: parseStyle(style)});
  2635. } else if (close) {
  2636. if (styles.length === 0) {
  2637. throw new Error('Found extraneous } in Chalk template literal');
  2638. }
  2639. chunks.push(buildStyle(chalk, styles)(chunk.join('')));
  2640. chunk = [];
  2641. styles.pop();
  2642. } else {
  2643. chunk.push(character);
  2644. }
  2645. });
  2646. chunks.push(chunk.join(''));
  2647. if (styles.length > 0) {
  2648. const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
  2649. throw new Error(errMessage);
  2650. }
  2651. return chunks.join('');
  2652. };
  2653. /***/ }),
  2654. /***/ 6720:
  2655. /***/ ((module) => {
  2656. "use strict";
  2657. const stringReplaceAll = (string, substring, replacer) => {
  2658. let index = string.indexOf(substring);
  2659. if (index === -1) {
  2660. return string;
  2661. }
  2662. const substringLength = substring.length;
  2663. let endIndex = 0;
  2664. let returnValue = '';
  2665. do {
  2666. returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
  2667. endIndex = index + substringLength;
  2668. index = string.indexOf(substring, endIndex);
  2669. } while (index !== -1);
  2670. returnValue += string.substr(endIndex);
  2671. return returnValue;
  2672. };
  2673. const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
  2674. let endIndex = 0;
  2675. let returnValue = '';
  2676. do {
  2677. const gotCR = string[index - 1] === '\r';
  2678. returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
  2679. endIndex = index + 1;
  2680. index = string.indexOf('\n', endIndex);
  2681. } while (index !== -1);
  2682. returnValue += string.substr(endIndex);
  2683. return returnValue;
  2684. };
  2685. module.exports = {
  2686. stringReplaceAll,
  2687. stringEncaseCRLFWithFirstIndex
  2688. };
  2689. /***/ }),
  2690. /***/ 39626:
  2691. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2692. /* MIT license */
  2693. /* eslint-disable no-mixed-operators */
  2694. const cssKeywords = __webpack_require__(22735);
  2695. // NOTE: conversions should only return primitive values (i.e. arrays, or
  2696. // values that give correct `typeof` results).
  2697. // do not use box values types (i.e. Number(), String(), etc.)
  2698. const reverseKeywords = {};
  2699. for (const key of Object.keys(cssKeywords)) {
  2700. reverseKeywords[cssKeywords[key]] = key;
  2701. }
  2702. const convert = {
  2703. rgb: {channels: 3, labels: 'rgb'},
  2704. hsl: {channels: 3, labels: 'hsl'},
  2705. hsv: {channels: 3, labels: 'hsv'},
  2706. hwb: {channels: 3, labels: 'hwb'},
  2707. cmyk: {channels: 4, labels: 'cmyk'},
  2708. xyz: {channels: 3, labels: 'xyz'},
  2709. lab: {channels: 3, labels: 'lab'},
  2710. lch: {channels: 3, labels: 'lch'},
  2711. hex: {channels: 1, labels: ['hex']},
  2712. keyword: {channels: 1, labels: ['keyword']},
  2713. ansi16: {channels: 1, labels: ['ansi16']},
  2714. ansi256: {channels: 1, labels: ['ansi256']},
  2715. hcg: {channels: 3, labels: ['h', 'c', 'g']},
  2716. apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
  2717. gray: {channels: 1, labels: ['gray']}
  2718. };
  2719. module.exports = convert;
  2720. // Hide .channels and .labels properties
  2721. for (const model of Object.keys(convert)) {
  2722. if (!('channels' in convert[model])) {
  2723. throw new Error('missing channels property: ' + model);
  2724. }
  2725. if (!('labels' in convert[model])) {
  2726. throw new Error('missing channel labels property: ' + model);
  2727. }
  2728. if (convert[model].labels.length !== convert[model].channels) {
  2729. throw new Error('channel and label counts mismatch: ' + model);
  2730. }
  2731. const {channels, labels} = convert[model];
  2732. delete convert[model].channels;
  2733. delete convert[model].labels;
  2734. Object.defineProperty(convert[model], 'channels', {value: channels});
  2735. Object.defineProperty(convert[model], 'labels', {value: labels});
  2736. }
  2737. convert.rgb.hsl = function (rgb) {
  2738. const r = rgb[0] / 255;
  2739. const g = rgb[1] / 255;
  2740. const b = rgb[2] / 255;
  2741. const min = Math.min(r, g, b);
  2742. const max = Math.max(r, g, b);
  2743. const delta = max - min;
  2744. let h;
  2745. let s;
  2746. if (max === min) {
  2747. h = 0;
  2748. } else if (r === max) {
  2749. h = (g - b) / delta;
  2750. } else if (g === max) {
  2751. h = 2 + (b - r) / delta;
  2752. } else if (b === max) {
  2753. h = 4 + (r - g) / delta;
  2754. }
  2755. h = Math.min(h * 60, 360);
  2756. if (h < 0) {
  2757. h += 360;
  2758. }
  2759. const l = (min + max) / 2;
  2760. if (max === min) {
  2761. s = 0;
  2762. } else if (l <= 0.5) {
  2763. s = delta / (max + min);
  2764. } else {
  2765. s = delta / (2 - max - min);
  2766. }
  2767. return [h, s * 100, l * 100];
  2768. };
  2769. convert.rgb.hsv = function (rgb) {
  2770. let rdif;
  2771. let gdif;
  2772. let bdif;
  2773. let h;
  2774. let s;
  2775. const r = rgb[0] / 255;
  2776. const g = rgb[1] / 255;
  2777. const b = rgb[2] / 255;
  2778. const v = Math.max(r, g, b);
  2779. const diff = v - Math.min(r, g, b);
  2780. const diffc = function (c) {
  2781. return (v - c) / 6 / diff + 1 / 2;
  2782. };
  2783. if (diff === 0) {
  2784. h = 0;
  2785. s = 0;
  2786. } else {
  2787. s = diff / v;
  2788. rdif = diffc(r);
  2789. gdif = diffc(g);
  2790. bdif = diffc(b);
  2791. if (r === v) {
  2792. h = bdif - gdif;
  2793. } else if (g === v) {
  2794. h = (1 / 3) + rdif - bdif;
  2795. } else if (b === v) {
  2796. h = (2 / 3) + gdif - rdif;
  2797. }
  2798. if (h < 0) {
  2799. h += 1;
  2800. } else if (h > 1) {
  2801. h -= 1;
  2802. }
  2803. }
  2804. return [
  2805. h * 360,
  2806. s * 100,
  2807. v * 100
  2808. ];
  2809. };
  2810. convert.rgb.hwb = function (rgb) {
  2811. const r = rgb[0];
  2812. const g = rgb[1];
  2813. let b = rgb[2];
  2814. const h = convert.rgb.hsl(rgb)[0];
  2815. const w = 1 / 255 * Math.min(r, Math.min(g, b));
  2816. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  2817. return [h, w * 100, b * 100];
  2818. };
  2819. convert.rgb.cmyk = function (rgb) {
  2820. const r = rgb[0] / 255;
  2821. const g = rgb[1] / 255;
  2822. const b = rgb[2] / 255;
  2823. const k = Math.min(1 - r, 1 - g, 1 - b);
  2824. const c = (1 - r - k) / (1 - k) || 0;
  2825. const m = (1 - g - k) / (1 - k) || 0;
  2826. const y = (1 - b - k) / (1 - k) || 0;
  2827. return [c * 100, m * 100, y * 100, k * 100];
  2828. };
  2829. function comparativeDistance(x, y) {
  2830. /*
  2831. See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
  2832. */
  2833. return (
  2834. ((x[0] - y[0]) ** 2) +
  2835. ((x[1] - y[1]) ** 2) +
  2836. ((x[2] - y[2]) ** 2)
  2837. );
  2838. }
  2839. convert.rgb.keyword = function (rgb) {
  2840. const reversed = reverseKeywords[rgb];
  2841. if (reversed) {
  2842. return reversed;
  2843. }
  2844. let currentClosestDistance = Infinity;
  2845. let currentClosestKeyword;
  2846. for (const keyword of Object.keys(cssKeywords)) {
  2847. const value = cssKeywords[keyword];
  2848. // Compute comparative distance
  2849. const distance = comparativeDistance(rgb, value);
  2850. // Check if its less, if so set as closest
  2851. if (distance < currentClosestDistance) {
  2852. currentClosestDistance = distance;
  2853. currentClosestKeyword = keyword;
  2854. }
  2855. }
  2856. return currentClosestKeyword;
  2857. };
  2858. convert.keyword.rgb = function (keyword) {
  2859. return cssKeywords[keyword];
  2860. };
  2861. convert.rgb.xyz = function (rgb) {
  2862. let r = rgb[0] / 255;
  2863. let g = rgb[1] / 255;
  2864. let b = rgb[2] / 255;
  2865. // Assume sRGB
  2866. r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
  2867. g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
  2868. b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
  2869. const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
  2870. const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
  2871. const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
  2872. return [x * 100, y * 100, z * 100];
  2873. };
  2874. convert.rgb.lab = function (rgb) {
  2875. const xyz = convert.rgb.xyz(rgb);
  2876. let x = xyz[0];
  2877. let y = xyz[1];
  2878. let z = xyz[2];
  2879. x /= 95.047;
  2880. y /= 100;
  2881. z /= 108.883;
  2882. x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
  2883. y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
  2884. z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
  2885. const l = (116 * y) - 16;
  2886. const a = 500 * (x - y);
  2887. const b = 200 * (y - z);
  2888. return [l, a, b];
  2889. };
  2890. convert.hsl.rgb = function (hsl) {
  2891. const h = hsl[0] / 360;
  2892. const s = hsl[1] / 100;
  2893. const l = hsl[2] / 100;
  2894. let t2;
  2895. let t3;
  2896. let val;
  2897. if (s === 0) {
  2898. val = l * 255;
  2899. return [val, val, val];
  2900. }
  2901. if (l < 0.5) {
  2902. t2 = l * (1 + s);
  2903. } else {
  2904. t2 = l + s - l * s;
  2905. }
  2906. const t1 = 2 * l - t2;
  2907. const rgb = [0, 0, 0];
  2908. for (let i = 0; i < 3; i++) {
  2909. t3 = h + 1 / 3 * -(i - 1);
  2910. if (t3 < 0) {
  2911. t3++;
  2912. }
  2913. if (t3 > 1) {
  2914. t3--;
  2915. }
  2916. if (6 * t3 < 1) {
  2917. val = t1 + (t2 - t1) * 6 * t3;
  2918. } else if (2 * t3 < 1) {
  2919. val = t2;
  2920. } else if (3 * t3 < 2) {
  2921. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  2922. } else {
  2923. val = t1;
  2924. }
  2925. rgb[i] = val * 255;
  2926. }
  2927. return rgb;
  2928. };
  2929. convert.hsl.hsv = function (hsl) {
  2930. const h = hsl[0];
  2931. let s = hsl[1] / 100;
  2932. let l = hsl[2] / 100;
  2933. let smin = s;
  2934. const lmin = Math.max(l, 0.01);
  2935. l *= 2;
  2936. s *= (l <= 1) ? l : 2 - l;
  2937. smin *= lmin <= 1 ? lmin : 2 - lmin;
  2938. const v = (l + s) / 2;
  2939. const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
  2940. return [h, sv * 100, v * 100];
  2941. };
  2942. convert.hsv.rgb = function (hsv) {
  2943. const h = hsv[0] / 60;
  2944. const s = hsv[1] / 100;
  2945. let v = hsv[2] / 100;
  2946. const hi = Math.floor(h) % 6;
  2947. const f = h - Math.floor(h);
  2948. const p = 255 * v * (1 - s);
  2949. const q = 255 * v * (1 - (s * f));
  2950. const t = 255 * v * (1 - (s * (1 - f)));
  2951. v *= 255;
  2952. switch (hi) {
  2953. case 0:
  2954. return [v, t, p];
  2955. case 1:
  2956. return [q, v, p];
  2957. case 2:
  2958. return [p, v, t];
  2959. case 3:
  2960. return [p, q, v];
  2961. case 4:
  2962. return [t, p, v];
  2963. case 5:
  2964. return [v, p, q];
  2965. }
  2966. };
  2967. convert.hsv.hsl = function (hsv) {
  2968. const h = hsv[0];
  2969. const s = hsv[1] / 100;
  2970. const v = hsv[2] / 100;
  2971. const vmin = Math.max(v, 0.01);
  2972. let sl;
  2973. let l;
  2974. l = (2 - s) * v;
  2975. const lmin = (2 - s) * vmin;
  2976. sl = s * vmin;
  2977. sl /= (lmin <= 1) ? lmin : 2 - lmin;
  2978. sl = sl || 0;
  2979. l /= 2;
  2980. return [h, sl * 100, l * 100];
  2981. };
  2982. // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
  2983. convert.hwb.rgb = function (hwb) {
  2984. const h = hwb[0] / 360;
  2985. let wh = hwb[1] / 100;
  2986. let bl = hwb[2] / 100;
  2987. const ratio = wh + bl;
  2988. let f;
  2989. // Wh + bl cant be > 1
  2990. if (ratio > 1) {
  2991. wh /= ratio;
  2992. bl /= ratio;
  2993. }
  2994. const i = Math.floor(6 * h);
  2995. const v = 1 - bl;
  2996. f = 6 * h - i;
  2997. if ((i & 0x01) !== 0) {
  2998. f = 1 - f;
  2999. }
  3000. const n = wh + f * (v - wh); // Linear interpolation
  3001. let r;
  3002. let g;
  3003. let b;
  3004. /* eslint-disable max-statements-per-line,no-multi-spaces */
  3005. switch (i) {
  3006. default:
  3007. case 6:
  3008. case 0: r = v; g = n; b = wh; break;
  3009. case 1: r = n; g = v; b = wh; break;
  3010. case 2: r = wh; g = v; b = n; break;
  3011. case 3: r = wh; g = n; b = v; break;
  3012. case 4: r = n; g = wh; b = v; break;
  3013. case 5: r = v; g = wh; b = n; break;
  3014. }
  3015. /* eslint-enable max-statements-per-line,no-multi-spaces */
  3016. return [r * 255, g * 255, b * 255];
  3017. };
  3018. convert.cmyk.rgb = function (cmyk) {
  3019. const c = cmyk[0] / 100;
  3020. const m = cmyk[1] / 100;
  3021. const y = cmyk[2] / 100;
  3022. const k = cmyk[3] / 100;
  3023. const r = 1 - Math.min(1, c * (1 - k) + k);
  3024. const g = 1 - Math.min(1, m * (1 - k) + k);
  3025. const b = 1 - Math.min(1, y * (1 - k) + k);
  3026. return [r * 255, g * 255, b * 255];
  3027. };
  3028. convert.xyz.rgb = function (xyz) {
  3029. const x = xyz[0] / 100;
  3030. const y = xyz[1] / 100;
  3031. const z = xyz[2] / 100;
  3032. let r;
  3033. let g;
  3034. let b;
  3035. r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
  3036. g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
  3037. b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
  3038. // Assume sRGB
  3039. r = r > 0.0031308
  3040. ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
  3041. : r * 12.92;
  3042. g = g > 0.0031308
  3043. ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
  3044. : g * 12.92;
  3045. b = b > 0.0031308
  3046. ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
  3047. : b * 12.92;
  3048. r = Math.min(Math.max(0, r), 1);
  3049. g = Math.min(Math.max(0, g), 1);
  3050. b = Math.min(Math.max(0, b), 1);
  3051. return [r * 255, g * 255, b * 255];
  3052. };
  3053. convert.xyz.lab = function (xyz) {
  3054. let x = xyz[0];
  3055. let y = xyz[1];
  3056. let z = xyz[2];
  3057. x /= 95.047;
  3058. y /= 100;
  3059. z /= 108.883;
  3060. x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
  3061. y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
  3062. z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
  3063. const l = (116 * y) - 16;
  3064. const a = 500 * (x - y);
  3065. const b = 200 * (y - z);
  3066. return [l, a, b];
  3067. };
  3068. convert.lab.xyz = function (lab) {
  3069. const l = lab[0];
  3070. const a = lab[1];
  3071. const b = lab[2];
  3072. let x;
  3073. let y;
  3074. let z;
  3075. y = (l + 16) / 116;
  3076. x = a / 500 + y;
  3077. z = y - b / 200;
  3078. const y2 = y ** 3;
  3079. const x2 = x ** 3;
  3080. const z2 = z ** 3;
  3081. y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  3082. x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  3083. z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
  3084. x *= 95.047;
  3085. y *= 100;
  3086. z *= 108.883;
  3087. return [x, y, z];
  3088. };
  3089. convert.lab.lch = function (lab) {
  3090. const l = lab[0];
  3091. const a = lab[1];
  3092. const b = lab[2];
  3093. let h;
  3094. const hr = Math.atan2(b, a);
  3095. h = hr * 360 / 2 / Math.PI;
  3096. if (h < 0) {
  3097. h += 360;
  3098. }
  3099. const c = Math.sqrt(a * a + b * b);
  3100. return [l, c, h];
  3101. };
  3102. convert.lch.lab = function (lch) {
  3103. const l = lch[0];
  3104. const c = lch[1];
  3105. const h = lch[2];
  3106. const hr = h / 360 * 2 * Math.PI;
  3107. const a = c * Math.cos(hr);
  3108. const b = c * Math.sin(hr);
  3109. return [l, a, b];
  3110. };
  3111. convert.rgb.ansi16 = function (args, saturation = null) {
  3112. const [r, g, b] = args;
  3113. let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
  3114. value = Math.round(value / 50);
  3115. if (value === 0) {
  3116. return 30;
  3117. }
  3118. let ansi = 30
  3119. + ((Math.round(b / 255) << 2)
  3120. | (Math.round(g / 255) << 1)
  3121. | Math.round(r / 255));
  3122. if (value === 2) {
  3123. ansi += 60;
  3124. }
  3125. return ansi;
  3126. };
  3127. convert.hsv.ansi16 = function (args) {
  3128. // Optimization here; we already know the value and don't need to get
  3129. // it converted for us.
  3130. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  3131. };
  3132. convert.rgb.ansi256 = function (args) {
  3133. const r = args[0];
  3134. const g = args[1];
  3135. const b = args[2];
  3136. // We use the extended greyscale palette here, with the exception of
  3137. // black and white. normal palette only has 4 greyscale shades.
  3138. if (r === g && g === b) {
  3139. if (r < 8) {
  3140. return 16;
  3141. }
  3142. if (r > 248) {
  3143. return 231;
  3144. }
  3145. return Math.round(((r - 8) / 247) * 24) + 232;
  3146. }
  3147. const ansi = 16
  3148. + (36 * Math.round(r / 255 * 5))
  3149. + (6 * Math.round(g / 255 * 5))
  3150. + Math.round(b / 255 * 5);
  3151. return ansi;
  3152. };
  3153. convert.ansi16.rgb = function (args) {
  3154. let color = args % 10;
  3155. // Handle greyscale
  3156. if (color === 0 || color === 7) {
  3157. if (args > 50) {
  3158. color += 3.5;
  3159. }
  3160. color = color / 10.5 * 255;
  3161. return [color, color, color];
  3162. }
  3163. const mult = (~~(args > 50) + 1) * 0.5;
  3164. const r = ((color & 1) * mult) * 255;
  3165. const g = (((color >> 1) & 1) * mult) * 255;
  3166. const b = (((color >> 2) & 1) * mult) * 255;
  3167. return [r, g, b];
  3168. };
  3169. convert.ansi256.rgb = function (args) {
  3170. // Handle greyscale
  3171. if (args >= 232) {
  3172. const c = (args - 232) * 10 + 8;
  3173. return [c, c, c];
  3174. }
  3175. args -= 16;
  3176. let rem;
  3177. const r = Math.floor(args / 36) / 5 * 255;
  3178. const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  3179. const b = (rem % 6) / 5 * 255;
  3180. return [r, g, b];
  3181. };
  3182. convert.rgb.hex = function (args) {
  3183. const integer = ((Math.round(args[0]) & 0xFF) << 16)
  3184. + ((Math.round(args[1]) & 0xFF) << 8)
  3185. + (Math.round(args[2]) & 0xFF);
  3186. const string = integer.toString(16).toUpperCase();
  3187. return '000000'.substring(string.length) + string;
  3188. };
  3189. convert.hex.rgb = function (args) {
  3190. const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  3191. if (!match) {
  3192. return [0, 0, 0];
  3193. }
  3194. let colorString = match[0];
  3195. if (match[0].length === 3) {
  3196. colorString = colorString.split('').map(char => {
  3197. return char + char;
  3198. }).join('');
  3199. }
  3200. const integer = parseInt(colorString, 16);
  3201. const r = (integer >> 16) & 0xFF;
  3202. const g = (integer >> 8) & 0xFF;
  3203. const b = integer & 0xFF;
  3204. return [r, g, b];
  3205. };
  3206. convert.rgb.hcg = function (rgb) {
  3207. const r = rgb[0] / 255;
  3208. const g = rgb[1] / 255;
  3209. const b = rgb[2] / 255;
  3210. const max = Math.max(Math.max(r, g), b);
  3211. const min = Math.min(Math.min(r, g), b);
  3212. const chroma = (max - min);
  3213. let grayscale;
  3214. let hue;
  3215. if (chroma < 1) {
  3216. grayscale = min / (1 - chroma);
  3217. } else {
  3218. grayscale = 0;
  3219. }
  3220. if (chroma <= 0) {
  3221. hue = 0;
  3222. } else
  3223. if (max === r) {
  3224. hue = ((g - b) / chroma) % 6;
  3225. } else
  3226. if (max === g) {
  3227. hue = 2 + (b - r) / chroma;
  3228. } else {
  3229. hue = 4 + (r - g) / chroma;
  3230. }
  3231. hue /= 6;
  3232. hue %= 1;
  3233. return [hue * 360, chroma * 100, grayscale * 100];
  3234. };
  3235. convert.hsl.hcg = function (hsl) {
  3236. const s = hsl[1] / 100;
  3237. const l = hsl[2] / 100;
  3238. const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
  3239. let f = 0;
  3240. if (c < 1.0) {
  3241. f = (l - 0.5 * c) / (1.0 - c);
  3242. }
  3243. return [hsl[0], c * 100, f * 100];
  3244. };
  3245. convert.hsv.hcg = function (hsv) {
  3246. const s = hsv[1] / 100;
  3247. const v = hsv[2] / 100;
  3248. const c = s * v;
  3249. let f = 0;
  3250. if (c < 1.0) {
  3251. f = (v - c) / (1 - c);
  3252. }
  3253. return [hsv[0], c * 100, f * 100];
  3254. };
  3255. convert.hcg.rgb = function (hcg) {
  3256. const h = hcg[0] / 360;
  3257. const c = hcg[1] / 100;
  3258. const g = hcg[2] / 100;
  3259. if (c === 0.0) {
  3260. return [g * 255, g * 255, g * 255];
  3261. }
  3262. const pure = [0, 0, 0];
  3263. const hi = (h % 1) * 6;
  3264. const v = hi % 1;
  3265. const w = 1 - v;
  3266. let mg = 0;
  3267. /* eslint-disable max-statements-per-line */
  3268. switch (Math.floor(hi)) {
  3269. case 0:
  3270. pure[0] = 1; pure[1] = v; pure[2] = 0; break;
  3271. case 1:
  3272. pure[0] = w; pure[1] = 1; pure[2] = 0; break;
  3273. case 2:
  3274. pure[0] = 0; pure[1] = 1; pure[2] = v; break;
  3275. case 3:
  3276. pure[0] = 0; pure[1] = w; pure[2] = 1; break;
  3277. case 4:
  3278. pure[0] = v; pure[1] = 0; pure[2] = 1; break;
  3279. default:
  3280. pure[0] = 1; pure[1] = 0; pure[2] = w;
  3281. }
  3282. /* eslint-enable max-statements-per-line */
  3283. mg = (1.0 - c) * g;
  3284. return [
  3285. (c * pure[0] + mg) * 255,
  3286. (c * pure[1] + mg) * 255,
  3287. (c * pure[2] + mg) * 255
  3288. ];
  3289. };
  3290. convert.hcg.hsv = function (hcg) {
  3291. const c = hcg[1] / 100;
  3292. const g = hcg[2] / 100;
  3293. const v = c + g * (1.0 - c);
  3294. let f = 0;
  3295. if (v > 0.0) {
  3296. f = c / v;
  3297. }
  3298. return [hcg[0], f * 100, v * 100];
  3299. };
  3300. convert.hcg.hsl = function (hcg) {
  3301. const c = hcg[1] / 100;
  3302. const g = hcg[2] / 100;
  3303. const l = g * (1.0 - c) + 0.5 * c;
  3304. let s = 0;
  3305. if (l > 0.0 && l < 0.5) {
  3306. s = c / (2 * l);
  3307. } else
  3308. if (l >= 0.5 && l < 1.0) {
  3309. s = c / (2 * (1 - l));
  3310. }
  3311. return [hcg[0], s * 100, l * 100];
  3312. };
  3313. convert.hcg.hwb = function (hcg) {
  3314. const c = hcg[1] / 100;
  3315. const g = hcg[2] / 100;
  3316. const v = c + g * (1.0 - c);
  3317. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  3318. };
  3319. convert.hwb.hcg = function (hwb) {
  3320. const w = hwb[1] / 100;
  3321. const b = hwb[2] / 100;
  3322. const v = 1 - b;
  3323. const c = v - w;
  3324. let g = 0;
  3325. if (c < 1) {
  3326. g = (v - c) / (1 - c);
  3327. }
  3328. return [hwb[0], c * 100, g * 100];
  3329. };
  3330. convert.apple.rgb = function (apple) {
  3331. return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
  3332. };
  3333. convert.rgb.apple = function (rgb) {
  3334. return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
  3335. };
  3336. convert.gray.rgb = function (args) {
  3337. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  3338. };
  3339. convert.gray.hsl = function (args) {
  3340. return [0, 0, args[0]];
  3341. };
  3342. convert.gray.hsv = convert.gray.hsl;
  3343. convert.gray.hwb = function (gray) {
  3344. return [0, 100, gray[0]];
  3345. };
  3346. convert.gray.cmyk = function (gray) {
  3347. return [0, 0, 0, gray[0]];
  3348. };
  3349. convert.gray.lab = function (gray) {
  3350. return [gray[0], 0, 0];
  3351. };
  3352. convert.gray.hex = function (gray) {
  3353. const val = Math.round(gray[0] / 100 * 255) & 0xFF;
  3354. const integer = (val << 16) + (val << 8) + val;
  3355. const string = integer.toString(16).toUpperCase();
  3356. return '000000'.substring(string.length) + string;
  3357. };
  3358. convert.rgb.gray = function (rgb) {
  3359. const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  3360. return [val / 255 * 100];
  3361. };
  3362. /***/ }),
  3363. /***/ 63387:
  3364. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3365. const conversions = __webpack_require__(39626);
  3366. const route = __webpack_require__(28309);
  3367. const convert = {};
  3368. const models = Object.keys(conversions);
  3369. function wrapRaw(fn) {
  3370. const wrappedFn = function (...args) {
  3371. const arg0 = args[0];
  3372. if (arg0 === undefined || arg0 === null) {
  3373. return arg0;
  3374. }
  3375. if (arg0.length > 1) {
  3376. args = arg0;
  3377. }
  3378. return fn(args);
  3379. };
  3380. // Preserve .conversion property if there is one
  3381. if ('conversion' in fn) {
  3382. wrappedFn.conversion = fn.conversion;
  3383. }
  3384. return wrappedFn;
  3385. }
  3386. function wrapRounded(fn) {
  3387. const wrappedFn = function (...args) {
  3388. const arg0 = args[0];
  3389. if (arg0 === undefined || arg0 === null) {
  3390. return arg0;
  3391. }
  3392. if (arg0.length > 1) {
  3393. args = arg0;
  3394. }
  3395. const result = fn(args);
  3396. // We're assuming the result is an array here.
  3397. // see notice in conversions.js; don't use box types
  3398. // in conversion functions.
  3399. if (typeof result === 'object') {
  3400. for (let len = result.length, i = 0; i < len; i++) {
  3401. result[i] = Math.round(result[i]);
  3402. }
  3403. }
  3404. return result;
  3405. };
  3406. // Preserve .conversion property if there is one
  3407. if ('conversion' in fn) {
  3408. wrappedFn.conversion = fn.conversion;
  3409. }
  3410. return wrappedFn;
  3411. }
  3412. models.forEach(fromModel => {
  3413. convert[fromModel] = {};
  3414. Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
  3415. Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
  3416. const routes = route(fromModel);
  3417. const routeModels = Object.keys(routes);
  3418. routeModels.forEach(toModel => {
  3419. const fn = routes[toModel];
  3420. convert[fromModel][toModel] = wrapRounded(fn);
  3421. convert[fromModel][toModel].raw = wrapRaw(fn);
  3422. });
  3423. });
  3424. module.exports = convert;
  3425. /***/ }),
  3426. /***/ 28309:
  3427. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3428. const conversions = __webpack_require__(39626);
  3429. /*
  3430. This function routes a model to all other models.
  3431. all functions that are routed have a property `.conversion` attached
  3432. to the returned synthetic function. This property is an array
  3433. of strings, each with the steps in between the 'from' and 'to'
  3434. color models (inclusive).
  3435. conversions that are not possible simply are not included.
  3436. */
  3437. function buildGraph() {
  3438. const graph = {};
  3439. // https://jsperf.com/object-keys-vs-for-in-with-closure/3
  3440. const models = Object.keys(conversions);
  3441. for (let len = models.length, i = 0; i < len; i++) {
  3442. graph[models[i]] = {
  3443. // http://jsperf.com/1-vs-infinity
  3444. // micro-opt, but this is simple.
  3445. distance: -1,
  3446. parent: null
  3447. };
  3448. }
  3449. return graph;
  3450. }
  3451. // https://en.wikipedia.org/wiki/Breadth-first_search
  3452. function deriveBFS(fromModel) {
  3453. const graph = buildGraph();
  3454. const queue = [fromModel]; // Unshift -> queue -> pop
  3455. graph[fromModel].distance = 0;
  3456. while (queue.length) {
  3457. const current = queue.pop();
  3458. const adjacents = Object.keys(conversions[current]);
  3459. for (let len = adjacents.length, i = 0; i < len; i++) {
  3460. const adjacent = adjacents[i];
  3461. const node = graph[adjacent];
  3462. if (node.distance === -1) {
  3463. node.distance = graph[current].distance + 1;
  3464. node.parent = current;
  3465. queue.unshift(adjacent);
  3466. }
  3467. }
  3468. }
  3469. return graph;
  3470. }
  3471. function link(from, to) {
  3472. return function (args) {
  3473. return to(from(args));
  3474. };
  3475. }
  3476. function wrapConversion(toModel, graph) {
  3477. const path = [graph[toModel].parent, toModel];
  3478. let fn = conversions[graph[toModel].parent][toModel];
  3479. let cur = graph[toModel].parent;
  3480. while (graph[cur].parent) {
  3481. path.unshift(graph[cur].parent);
  3482. fn = link(conversions[graph[cur].parent][cur], fn);
  3483. cur = graph[cur].parent;
  3484. }
  3485. fn.conversion = path;
  3486. return fn;
  3487. }
  3488. module.exports = function (fromModel) {
  3489. const graph = deriveBFS(fromModel);
  3490. const conversion = {};
  3491. const models = Object.keys(graph);
  3492. for (let len = models.length, i = 0; i < len; i++) {
  3493. const toModel = models[i];
  3494. const node = graph[toModel];
  3495. if (node.parent === null) {
  3496. // No possible conversion, or this node is the source model.
  3497. continue;
  3498. }
  3499. conversion[toModel] = wrapConversion(toModel, graph);
  3500. }
  3501. return conversion;
  3502. };
  3503. /***/ }),
  3504. /***/ 22735:
  3505. /***/ ((module) => {
  3506. "use strict";
  3507. module.exports = {
  3508. "aliceblue": [240, 248, 255],
  3509. "antiquewhite": [250, 235, 215],
  3510. "aqua": [0, 255, 255],
  3511. "aquamarine": [127, 255, 212],
  3512. "azure": [240, 255, 255],
  3513. "beige": [245, 245, 220],
  3514. "bisque": [255, 228, 196],
  3515. "black": [0, 0, 0],
  3516. "blanchedalmond": [255, 235, 205],
  3517. "blue": [0, 0, 255],
  3518. "blueviolet": [138, 43, 226],
  3519. "brown": [165, 42, 42],
  3520. "burlywood": [222, 184, 135],
  3521. "cadetblue": [95, 158, 160],
  3522. "chartreuse": [127, 255, 0],
  3523. "chocolate": [210, 105, 30],
  3524. "coral": [255, 127, 80],
  3525. "cornflowerblue": [100, 149, 237],
  3526. "cornsilk": [255, 248, 220],
  3527. "crimson": [220, 20, 60],
  3528. "cyan": [0, 255, 255],
  3529. "darkblue": [0, 0, 139],
  3530. "darkcyan": [0, 139, 139],
  3531. "darkgoldenrod": [184, 134, 11],
  3532. "darkgray": [169, 169, 169],
  3533. "darkgreen": [0, 100, 0],
  3534. "darkgrey": [169, 169, 169],
  3535. "darkkhaki": [189, 183, 107],
  3536. "darkmagenta": [139, 0, 139],
  3537. "darkolivegreen": [85, 107, 47],
  3538. "darkorange": [255, 140, 0],
  3539. "darkorchid": [153, 50, 204],
  3540. "darkred": [139, 0, 0],
  3541. "darksalmon": [233, 150, 122],
  3542. "darkseagreen": [143, 188, 143],
  3543. "darkslateblue": [72, 61, 139],
  3544. "darkslategray": [47, 79, 79],
  3545. "darkslategrey": [47, 79, 79],
  3546. "darkturquoise": [0, 206, 209],
  3547. "darkviolet": [148, 0, 211],
  3548. "deeppink": [255, 20, 147],
  3549. "deepskyblue": [0, 191, 255],
  3550. "dimgray": [105, 105, 105],
  3551. "dimgrey": [105, 105, 105],
  3552. "dodgerblue": [30, 144, 255],
  3553. "firebrick": [178, 34, 34],
  3554. "floralwhite": [255, 250, 240],
  3555. "forestgreen": [34, 139, 34],
  3556. "fuchsia": [255, 0, 255],
  3557. "gainsboro": [220, 220, 220],
  3558. "ghostwhite": [248, 248, 255],
  3559. "gold": [255, 215, 0],
  3560. "goldenrod": [218, 165, 32],
  3561. "gray": [128, 128, 128],
  3562. "green": [0, 128, 0],
  3563. "greenyellow": [173, 255, 47],
  3564. "grey": [128, 128, 128],
  3565. "honeydew": [240, 255, 240],
  3566. "hotpink": [255, 105, 180],
  3567. "indianred": [205, 92, 92],
  3568. "indigo": [75, 0, 130],
  3569. "ivory": [255, 255, 240],
  3570. "khaki": [240, 230, 140],
  3571. "lavender": [230, 230, 250],
  3572. "lavenderblush": [255, 240, 245],
  3573. "lawngreen": [124, 252, 0],
  3574. "lemonchiffon": [255, 250, 205],
  3575. "lightblue": [173, 216, 230],
  3576. "lightcoral": [240, 128, 128],
  3577. "lightcyan": [224, 255, 255],
  3578. "lightgoldenrodyellow": [250, 250, 210],
  3579. "lightgray": [211, 211, 211],
  3580. "lightgreen": [144, 238, 144],
  3581. "lightgrey": [211, 211, 211],
  3582. "lightpink": [255, 182, 193],
  3583. "lightsalmon": [255, 160, 122],
  3584. "lightseagreen": [32, 178, 170],
  3585. "lightskyblue": [135, 206, 250],
  3586. "lightslategray": [119, 136, 153],
  3587. "lightslategrey": [119, 136, 153],
  3588. "lightsteelblue": [176, 196, 222],
  3589. "lightyellow": [255, 255, 224],
  3590. "lime": [0, 255, 0],
  3591. "limegreen": [50, 205, 50],
  3592. "linen": [250, 240, 230],
  3593. "magenta": [255, 0, 255],
  3594. "maroon": [128, 0, 0],
  3595. "mediumaquamarine": [102, 205, 170],
  3596. "mediumblue": [0, 0, 205],
  3597. "mediumorchid": [186, 85, 211],
  3598. "mediumpurple": [147, 112, 219],
  3599. "mediumseagreen": [60, 179, 113],
  3600. "mediumslateblue": [123, 104, 238],
  3601. "mediumspringgreen": [0, 250, 154],
  3602. "mediumturquoise": [72, 209, 204],
  3603. "mediumvioletred": [199, 21, 133],
  3604. "midnightblue": [25, 25, 112],
  3605. "mintcream": [245, 255, 250],
  3606. "mistyrose": [255, 228, 225],
  3607. "moccasin": [255, 228, 181],
  3608. "navajowhite": [255, 222, 173],
  3609. "navy": [0, 0, 128],
  3610. "oldlace": [253, 245, 230],
  3611. "olive": [128, 128, 0],
  3612. "olivedrab": [107, 142, 35],
  3613. "orange": [255, 165, 0],
  3614. "orangered": [255, 69, 0],
  3615. "orchid": [218, 112, 214],
  3616. "palegoldenrod": [238, 232, 170],
  3617. "palegreen": [152, 251, 152],
  3618. "paleturquoise": [175, 238, 238],
  3619. "palevioletred": [219, 112, 147],
  3620. "papayawhip": [255, 239, 213],
  3621. "peachpuff": [255, 218, 185],
  3622. "peru": [205, 133, 63],
  3623. "pink": [255, 192, 203],
  3624. "plum": [221, 160, 221],
  3625. "powderblue": [176, 224, 230],
  3626. "purple": [128, 0, 128],
  3627. "rebeccapurple": [102, 51, 153],
  3628. "red": [255, 0, 0],
  3629. "rosybrown": [188, 143, 143],
  3630. "royalblue": [65, 105, 225],
  3631. "saddlebrown": [139, 69, 19],
  3632. "salmon": [250, 128, 114],
  3633. "sandybrown": [244, 164, 96],
  3634. "seagreen": [46, 139, 87],
  3635. "seashell": [255, 245, 238],
  3636. "sienna": [160, 82, 45],
  3637. "silver": [192, 192, 192],
  3638. "skyblue": [135, 206, 235],
  3639. "slateblue": [106, 90, 205],
  3640. "slategray": [112, 128, 144],
  3641. "slategrey": [112, 128, 144],
  3642. "snow": [255, 250, 250],
  3643. "springgreen": [0, 255, 127],
  3644. "steelblue": [70, 130, 180],
  3645. "tan": [210, 180, 140],
  3646. "teal": [0, 128, 128],
  3647. "thistle": [216, 191, 216],
  3648. "tomato": [255, 99, 71],
  3649. "turquoise": [64, 224, 208],
  3650. "violet": [238, 130, 238],
  3651. "wheat": [245, 222, 179],
  3652. "white": [255, 255, 255],
  3653. "whitesmoke": [245, 245, 245],
  3654. "yellow": [255, 255, 0],
  3655. "yellowgreen": [154, 205, 50]
  3656. };
  3657. /***/ }),
  3658. /***/ 49780:
  3659. /***/ ((module) => {
  3660. "use strict";
  3661. module.exports = (flag, argv = process.argv) => {
  3662. const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
  3663. const position = argv.indexOf(prefix + flag);
  3664. const terminatorPosition = argv.indexOf('--');
  3665. return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
  3666. };
  3667. /***/ }),
  3668. /***/ 53217:
  3669. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3670. "use strict";
  3671. const ansiRegex = __webpack_require__(14277);
  3672. module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
  3673. /***/ }),
  3674. /***/ 87342:
  3675. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3676. "use strict";
  3677. const os = __webpack_require__(12087);
  3678. const tty = __webpack_require__(33867);
  3679. const hasFlag = __webpack_require__(49780);
  3680. const {env} = process;
  3681. let forceColor;
  3682. if (hasFlag('no-color') ||
  3683. hasFlag('no-colors') ||
  3684. hasFlag('color=false') ||
  3685. hasFlag('color=never')) {
  3686. forceColor = 0;
  3687. } else if (hasFlag('color') ||
  3688. hasFlag('colors') ||
  3689. hasFlag('color=true') ||
  3690. hasFlag('color=always')) {
  3691. forceColor = 1;
  3692. }
  3693. if ('FORCE_COLOR' in env) {
  3694. if (env.FORCE_COLOR === 'true') {
  3695. forceColor = 1;
  3696. } else if (env.FORCE_COLOR === 'false') {
  3697. forceColor = 0;
  3698. } else {
  3699. forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
  3700. }
  3701. }
  3702. function translateLevel(level) {
  3703. if (level === 0) {
  3704. return false;
  3705. }
  3706. return {
  3707. level,
  3708. hasBasic: true,
  3709. has256: level >= 2,
  3710. has16m: level >= 3
  3711. };
  3712. }
  3713. function supportsColor(haveStream, streamIsTTY) {
  3714. if (forceColor === 0) {
  3715. return 0;
  3716. }
  3717. if (hasFlag('color=16m') ||
  3718. hasFlag('color=full') ||
  3719. hasFlag('color=truecolor')) {
  3720. return 3;
  3721. }
  3722. if (hasFlag('color=256')) {
  3723. return 2;
  3724. }
  3725. if (haveStream && !streamIsTTY && forceColor === undefined) {
  3726. return 0;
  3727. }
  3728. const min = forceColor || 0;
  3729. if (env.TERM === 'dumb') {
  3730. return min;
  3731. }
  3732. if (process.platform === 'win32') {
  3733. // Windows 10 build 10586 is the first Windows release that supports 256 colors.
  3734. // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
  3735. const osRelease = os.release().split('.');
  3736. if (
  3737. Number(osRelease[0]) >= 10 &&
  3738. Number(osRelease[2]) >= 10586
  3739. ) {
  3740. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  3741. }
  3742. return 1;
  3743. }
  3744. if ('CI' in env) {
  3745. if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
  3746. return 1;
  3747. }
  3748. return min;
  3749. }
  3750. if ('TEAMCITY_VERSION' in env) {
  3751. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  3752. }
  3753. if (env.COLORTERM === 'truecolor') {
  3754. return 3;
  3755. }
  3756. if ('TERM_PROGRAM' in env) {
  3757. const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
  3758. switch (env.TERM_PROGRAM) {
  3759. case 'iTerm.app':
  3760. return version >= 3 ? 3 : 2;
  3761. case 'Apple_Terminal':
  3762. return 2;
  3763. // No default
  3764. }
  3765. }
  3766. if (/-256(color)?$/i.test(env.TERM)) {
  3767. return 2;
  3768. }
  3769. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  3770. return 1;
  3771. }
  3772. if ('COLORTERM' in env) {
  3773. return 1;
  3774. }
  3775. return min;
  3776. }
  3777. function getSupportLevel(stream) {
  3778. const level = supportsColor(stream, stream && stream.isTTY);
  3779. return translateLevel(level);
  3780. }
  3781. module.exports = {
  3782. supportsColor: getSupportLevel,
  3783. stdout: translateLevel(supportsColor(true, tty.isatty(1))),
  3784. stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  3785. };
  3786. /***/ }),
  3787. /***/ 71354:
  3788. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3789. "use strict";
  3790. const onetime = __webpack_require__(31322);
  3791. const signalExit = __webpack_require__(27908);
  3792. module.exports = onetime(() => {
  3793. signalExit(() => {
  3794. process.stderr.write('\u001B[?25h');
  3795. }, {alwaysLast: true});
  3796. });
  3797. /***/ }),
  3798. /***/ 72653:
  3799. /***/ ((module) => {
  3800. module.exports = [
  3801. [ 0x0300, 0x036F ], [ 0x0483, 0x0486 ], [ 0x0488, 0x0489 ],
  3802. [ 0x0591, 0x05BD ], [ 0x05BF, 0x05BF ], [ 0x05C1, 0x05C2 ],
  3803. [ 0x05C4, 0x05C5 ], [ 0x05C7, 0x05C7 ], [ 0x0600, 0x0603 ],
  3804. [ 0x0610, 0x0615 ], [ 0x064B, 0x065E ], [ 0x0670, 0x0670 ],
  3805. [ 0x06D6, 0x06E4 ], [ 0x06E7, 0x06E8 ], [ 0x06EA, 0x06ED ],
  3806. [ 0x070F, 0x070F ], [ 0x0711, 0x0711 ], [ 0x0730, 0x074A ],
  3807. [ 0x07A6, 0x07B0 ], [ 0x07EB, 0x07F3 ], [ 0x0901, 0x0902 ],
  3808. [ 0x093C, 0x093C ], [ 0x0941, 0x0948 ], [ 0x094D, 0x094D ],
  3809. [ 0x0951, 0x0954 ], [ 0x0962, 0x0963 ], [ 0x0981, 0x0981 ],
  3810. [ 0x09BC, 0x09BC ], [ 0x09C1, 0x09C4 ], [ 0x09CD, 0x09CD ],
  3811. [ 0x09E2, 0x09E3 ], [ 0x0A01, 0x0A02 ], [ 0x0A3C, 0x0A3C ],
  3812. [ 0x0A41, 0x0A42 ], [ 0x0A47, 0x0A48 ], [ 0x0A4B, 0x0A4D ],
  3813. [ 0x0A70, 0x0A71 ], [ 0x0A81, 0x0A82 ], [ 0x0ABC, 0x0ABC ],
  3814. [ 0x0AC1, 0x0AC5 ], [ 0x0AC7, 0x0AC8 ], [ 0x0ACD, 0x0ACD ],
  3815. [ 0x0AE2, 0x0AE3 ], [ 0x0B01, 0x0B01 ], [ 0x0B3C, 0x0B3C ],
  3816. [ 0x0B3F, 0x0B3F ], [ 0x0B41, 0x0B43 ], [ 0x0B4D, 0x0B4D ],
  3817. [ 0x0B56, 0x0B56 ], [ 0x0B82, 0x0B82 ], [ 0x0BC0, 0x0BC0 ],
  3818. [ 0x0BCD, 0x0BCD ], [ 0x0C3E, 0x0C40 ], [ 0x0C46, 0x0C48 ],
  3819. [ 0x0C4A, 0x0C4D ], [ 0x0C55, 0x0C56 ], [ 0x0CBC, 0x0CBC ],
  3820. [ 0x0CBF, 0x0CBF ], [ 0x0CC6, 0x0CC6 ], [ 0x0CCC, 0x0CCD ],
  3821. [ 0x0CE2, 0x0CE3 ], [ 0x0D41, 0x0D43 ], [ 0x0D4D, 0x0D4D ],
  3822. [ 0x0DCA, 0x0DCA ], [ 0x0DD2, 0x0DD4 ], [ 0x0DD6, 0x0DD6 ],
  3823. [ 0x0E31, 0x0E31 ], [ 0x0E34, 0x0E3A ], [ 0x0E47, 0x0E4E ],
  3824. [ 0x0EB1, 0x0EB1 ], [ 0x0EB4, 0x0EB9 ], [ 0x0EBB, 0x0EBC ],
  3825. [ 0x0EC8, 0x0ECD ], [ 0x0F18, 0x0F19 ], [ 0x0F35, 0x0F35 ],
  3826. [ 0x0F37, 0x0F37 ], [ 0x0F39, 0x0F39 ], [ 0x0F71, 0x0F7E ],
  3827. [ 0x0F80, 0x0F84 ], [ 0x0F86, 0x0F87 ], [ 0x0F90, 0x0F97 ],
  3828. [ 0x0F99, 0x0FBC ], [ 0x0FC6, 0x0FC6 ], [ 0x102D, 0x1030 ],
  3829. [ 0x1032, 0x1032 ], [ 0x1036, 0x1037 ], [ 0x1039, 0x1039 ],
  3830. [ 0x1058, 0x1059 ], [ 0x1160, 0x11FF ], [ 0x135F, 0x135F ],
  3831. [ 0x1712, 0x1714 ], [ 0x1732, 0x1734 ], [ 0x1752, 0x1753 ],
  3832. [ 0x1772, 0x1773 ], [ 0x17B4, 0x17B5 ], [ 0x17B7, 0x17BD ],
  3833. [ 0x17C6, 0x17C6 ], [ 0x17C9, 0x17D3 ], [ 0x17DD, 0x17DD ],
  3834. [ 0x180B, 0x180D ], [ 0x18A9, 0x18A9 ], [ 0x1920, 0x1922 ],
  3835. [ 0x1927, 0x1928 ], [ 0x1932, 0x1932 ], [ 0x1939, 0x193B ],
  3836. [ 0x1A17, 0x1A18 ], [ 0x1B00, 0x1B03 ], [ 0x1B34, 0x1B34 ],
  3837. [ 0x1B36, 0x1B3A ], [ 0x1B3C, 0x1B3C ], [ 0x1B42, 0x1B42 ],
  3838. [ 0x1B6B, 0x1B73 ], [ 0x1DC0, 0x1DCA ], [ 0x1DFE, 0x1DFF ],
  3839. [ 0x200B, 0x200F ], [ 0x202A, 0x202E ], [ 0x2060, 0x2063 ],
  3840. [ 0x206A, 0x206F ], [ 0x20D0, 0x20EF ], [ 0x302A, 0x302F ],
  3841. [ 0x3099, 0x309A ], [ 0xA806, 0xA806 ], [ 0xA80B, 0xA80B ],
  3842. [ 0xA825, 0xA826 ], [ 0xFB1E, 0xFB1E ], [ 0xFE00, 0xFE0F ],
  3843. [ 0xFE20, 0xFE23 ], [ 0xFEFF, 0xFEFF ], [ 0xFFF9, 0xFFFB ],
  3844. [ 0x10A01, 0x10A03 ], [ 0x10A05, 0x10A06 ], [ 0x10A0C, 0x10A0F ],
  3845. [ 0x10A38, 0x10A3A ], [ 0x10A3F, 0x10A3F ], [ 0x1D167, 0x1D169 ],
  3846. [ 0x1D173, 0x1D182 ], [ 0x1D185, 0x1D18B ], [ 0x1D1AA, 0x1D1AD ],
  3847. [ 0x1D242, 0x1D244 ], [ 0xE0001, 0xE0001 ], [ 0xE0020, 0xE007F ],
  3848. [ 0xE0100, 0xE01EF ]
  3849. ]
  3850. /***/ }),
  3851. /***/ 71011:
  3852. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3853. "use strict";
  3854. var defaults = __webpack_require__(34575)
  3855. var combining = __webpack_require__(72653)
  3856. var DEFAULTS = {
  3857. nul: 0,
  3858. control: 0
  3859. }
  3860. module.exports = function wcwidth(str) {
  3861. return wcswidth(str, DEFAULTS)
  3862. }
  3863. module.exports.config = function(opts) {
  3864. opts = defaults(opts || {}, DEFAULTS)
  3865. return function wcwidth(str) {
  3866. return wcswidth(str, opts)
  3867. }
  3868. }
  3869. /*
  3870. * The following functions define the column width of an ISO 10646
  3871. * character as follows:
  3872. * - The null character (U+0000) has a column width of 0.
  3873. * - Other C0/C1 control characters and DEL will lead to a return value
  3874. * of -1.
  3875. * - Non-spacing and enclosing combining characters (general category
  3876. * code Mn or Me in the
  3877. * Unicode database) have a column width of 0.
  3878. * - SOFT HYPHEN (U+00AD) has a column width of 1.
  3879. * - Other format characters (general category code Cf in the Unicode
  3880. * database) and ZERO WIDTH
  3881. * SPACE (U+200B) have a column width of 0.
  3882. * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
  3883. * have a column width of 0.
  3884. * - Spacing characters in the East Asian Wide (W) or East Asian
  3885. * Full-width (F) category as
  3886. * defined in Unicode Technical Report #11 have a column width of 2.
  3887. * - All remaining characters (including all printable ISO 8859-1 and
  3888. * WGL4 characters, Unicode control characters, etc.) have a column
  3889. * width of 1.
  3890. * This implementation assumes that characters are encoded in ISO 10646.
  3891. */
  3892. function wcswidth(str, opts) {
  3893. if (typeof str !== 'string') return wcwidth(str, opts)
  3894. var s = 0
  3895. for (var i = 0; i < str.length; i++) {
  3896. var n = wcwidth(str.charCodeAt(i), opts)
  3897. if (n < 0) return -1
  3898. s += n
  3899. }
  3900. return s
  3901. }
  3902. function wcwidth(ucs, opts) {
  3903. // test for 8-bit control characters
  3904. if (ucs === 0) return opts.nul
  3905. if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) return opts.control
  3906. // binary search in table of non-spacing characters
  3907. if (bisearch(ucs)) return 0
  3908. // if we arrive here, ucs is not a combining or C0/C1 control character
  3909. return 1 +
  3910. (ucs >= 0x1100 &&
  3911. (ucs <= 0x115f || // Hangul Jamo init. consonants
  3912. ucs == 0x2329 || ucs == 0x232a ||
  3913. (ucs >= 0x2e80 && ucs <= 0xa4cf &&
  3914. ucs != 0x303f) || // CJK ... Yi
  3915. (ucs >= 0xac00 && ucs <= 0xd7a3) || // Hangul Syllables
  3916. (ucs >= 0xf900 && ucs <= 0xfaff) || // CJK Compatibility Ideographs
  3917. (ucs >= 0xfe10 && ucs <= 0xfe19) || // Vertical forms
  3918. (ucs >= 0xfe30 && ucs <= 0xfe6f) || // CJK Compatibility Forms
  3919. (ucs >= 0xff00 && ucs <= 0xff60) || // Fullwidth Forms
  3920. (ucs >= 0xffe0 && ucs <= 0xffe6) ||
  3921. (ucs >= 0x20000 && ucs <= 0x2fffd) ||
  3922. (ucs >= 0x30000 && ucs <= 0x3fffd)));
  3923. }
  3924. function bisearch(ucs) {
  3925. var min = 0
  3926. var max = combining.length - 1
  3927. var mid
  3928. if (ucs < combining[0][0] || ucs > combining[max][1]) return false
  3929. while (max >= min) {
  3930. mid = Math.floor((min + max) / 2)
  3931. if (ucs > combining[mid][1]) min = mid + 1
  3932. else if (ucs < combining[mid][0]) max = mid - 1
  3933. else return true
  3934. }
  3935. return false
  3936. }
  3937. /***/ }),
  3938. /***/ 26374:
  3939. /***/ ((module) => {
  3940. "use strict";
  3941. module.exports = JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},"fistBump":{"interval":80,"frames":["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},"soccerHeader":{"interval":80,"frames":[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},"mindblown":{"interval":160,"frames":["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},"speaker":{"interval":160,"frames":["🔈 ","🔉 ","🔊 ","🔉 "]},"orangePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},"bluePulse":{"interval":100,"frames":["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"orangeBluePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"timeTravel":{"interval":100,"frames":["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]}}');
  3942. /***/ })
  3943. };
  3944. ;
  3945. //# sourceMappingURL=395.index.js.map