API/api.medcify.app/node_modules/snyk/dist/cli/31.index.js.map
2022-09-26 11:41:44 +05:30

1 line
161 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"31.index.js","mappings":";;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA,wCAAwC,sBAAsB,6BAA6B,IAAI,EAAE,MAAM,IAAI;;AAE3G;AACA,mBAAmB,wCAAwC;;AAE3D;AACA;AACA;;AAEA;AACA,sCAAsC,eAAe;AACrD,wCAAwC,eAAe;AACvD,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,MAAM,IAAI,KAAK;AAClE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,aAAa;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2CAA2C,aAAa;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA,mBAAmB,mBAAO,CAAC,KAAW;AACtC;AACA;AACA;;AAEA;AACA,qBAAqB;;;;;;;;;AChLR;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,mDAAmD,kCAAkC;AACrF,oDAAoD,mCAAmC;AACvF,kDAAkD,iCAAiC;;;;;;;;;ACrEtE;;AAEb,eAAe,mBAAO,CAAC,KAAQ;AAC/B,eAAe,mBAAO,CAAC,KAAQ;AAC/B,cAAc,mBAAO,CAAC,KAAa;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,iBAAiB;AAC9B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B,UAAU,aAAa;AACvB,UAAU,WAAW;;AAErB;AACA;AACA;;AAEA;;AAEA,0CAA0C,KAAK;;AAE/C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,mBAAO,CAAC,GAAc;AACjD;;AAEA;AACA,WAAW,mBAAO,CAAC,KAAe;AAClC;;AAEA;AACA,WAAW,mBAAO,CAAC,KAAa;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,0BAA0B;AACvE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACzPa;;AAEb;AACA,eAAe,mBAAO,CAAC,KAAa;AACpC,cAAc,mBAAO,CAAC,KAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB,WAAW,IAAI;AACf;AACA,kBAAkB,IAAI;AACtB,WAAW,IAAI;AACf,WAAW,IAAI;AACf,cAAc,IAAI;AAClB,gBAAgB,IAAI;AACpB;AACA;AACA,aAAa,IAAI;AACjB,WAAW,IAAI;AACf,SAAS,IAAI;AACb;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;;AAEH,6BAA6B,IAAI,EAAE,MAAM;AACzC,8BAA8B,IAAI,EAAE,MAAM;AAC1C,8BAA8B,IAAI;AAClC,8BAA8B,IAAI;;AAElC,gCAAgC,IAAI,EAAE,MAAM;AAC5C,kCAAkC,IAAI,EAAE,MAAM;AAC9C,mCAAmC,IAAI,EAAE,MAAM;AAC/C,kCAAkC,IAAI,EAAE,MAAM;;AAE9C;AACA,kBAAkB,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,IAAI,EAAE,MAAM;AAC3D,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,oBAAoB;AACpB,UAAU,qDAAqD;AAC/D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnHa;;AAEb;AACA;AACA;AACA;;AAEA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ea;;AAEb;AACA;;AAEA,mCAAmC;AACnC,QAAQ,0BAA0B;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;;;;;;;;;ACnDa;;AAEb,eAAe,mBAAO,CAAC,KAAa;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,eAAe;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,wBAAwB;;AAEjC;AACA;;AAEA;AACA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;;AAEA,uDAAuD,mBAAmB;AAC1E;AACA;;AAEA,oBAAoB;AACpB;;AAEA;AACA,qBAAqB;AACrB,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,aAAa,qBAAqB;AAClC;AACA;;AAEA,SAAS,wBAAwB;AACjC,WAAW;AACX;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB,QAAQ,wBAAwB;;AAEhC;AACA;AACA;AACA;;AAEA,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzQa;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;AACnC,eAAe,mBAAO,CAAC,KAAU;;AAEjC;AACA;AACA,oDAAoD,oBAAoB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;AAC/B,QAAQ,QAAQ;;AAEhB;AACA;AACA;;AAEA,sCAAsC,8BAA8B;AACpE;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AClPa;;AAEb,cAAc,mBAAO,CAAC,KAAS;;AAE/B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,YAAY,QAAQ;AACpB;AACA;;AAEA,sCAAsC;AACtC;;AAEA,QAAQ,0DAA0D;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4CAA4C,QAAQ;AACpD,wCAAwC,MAAM;;AAE9C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;AC9Da;;AAEb,eAAe,mBAAO,CAAC,KAAQ;AAC/B,eAAe,mBAAO,CAAC,KAAa;AACpC,iBAAiB,mBAAO,CAAC,KAAY;AACrC,cAAc,mBAAO,CAAC,KAAS;AAC/B,cAAc,mBAAO,CAAC,KAAS;AAC/B,cAAc,mBAAO,CAAC,KAAS;AAC/B,cAAc,mBAAO,CAAC,KAAS;AAC/B,aAAa,mBAAO,CAAC,KAAQ;;AAE7B;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,UAAU,sBAAsB;AAChC,UAAU,+CAA+C;;AAEzD;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc;;AAEpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,0BAA0B;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,UAAU,kCAAkC;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACpea;;AAEb,eAAe,mBAAO,CAAC,KAAU;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B;AACA,oBAAoB,MAAM,wBAAwB,MAAM;AACxD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mCAAmC;AAC3E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChHa;;AAEb,mBAAmB,mBAAO,CAAC,KAAe;;AAE1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,uCAAuC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,qBAAqB;AACnC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;ACxCa;;AAEb,sBAAsB,mBAAO,CAAC,KAAkB;;AAEhD;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;ACXa;;AAEb,eAAe,mBAAO,CAAC,KAAU;AACjC,aAAa,mBAAO,CAAC,KAAQ;AAC7B;;AAEA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACvIa;;AAEb,eAAe,mBAAO,CAAC,KAAa;AACpC,qBAAqB,mBAAO,CAAC,KAAU;AACvC,oBAAoB,mBAAO,CAAC,KAAgB;;AAE5C;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA,iBAAiB,MAAM,wBAAwB,MAAM;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,UAAU,gBAAgB;AAC1B,UAAU,+CAA+C;AACzD,UAAU,oCAAoC;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACnMa;;AAEb,cAAc,mBAAO,CAAC,KAAU;;AAEhC;AACA;AACA;AACA;;AAEA,6BAA6B,mBAAO,CAAC,KAAgB;AACrD,0BAA0B,mBAAO,CAAC,IAAa;AAC/C,wBAAwB,mBAAO,CAAC,KAAW;AAC3C,yBAAyB,mBAAO,CAAC,KAAY;AAC7C,qBAAqB,mBAAO,CAAC,KAAQ;AACrC,sBAAsB,mBAAO,CAAC,KAAS;AACvC,0BAA0B,mBAAO,CAAC,KAAa;AAC/C,qBAAqB,mBAAO,CAAC,KAAQ;AACrC,4BAA4B,mBAAO,CAAC,KAAe;AACnD,wBAAwB,mBAAO,CAAC,KAAW;AAC3C,yBAAyB,mBAAO,CAAC,KAAY;AAC7C,sBAAsB,mBAAO,CAAC,KAAS;AACvC,uBAAuB,mBAAO,CAAC,KAAU;AACzC,wBAAwB,mBAAO,CAAC,KAAW;AAC3C,qBAAqB,mBAAO,CAAC,IAAQ;AACrC,uBAAuB,mBAAO,CAAC,KAAU;AACzC,qBAAqB,mBAAO,CAAC,IAAQ;AACrC,uBAAuB,mBAAO,CAAC,KAAU;AACzC,qBAAqB,mBAAO,CAAC,KAAQ;;;;;;;;;AC3BxB;;AAEb,eAAe,mBAAO,CAAC,KAAiB;AACxC,kBAAkB,mBAAO,CAAC,KAAc;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACtDa;;AAEb,qBAAqB,mBAAO,CAAC,KAAiB;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACVa;;AAEb,qBAAqB,mBAAO,CAAC,KAAiB;;AAE9C;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACnCa;;AAEb,eAAe,mBAAO,CAAC,KAAU;;AAEjC;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;;AAEA;;;;;;;;ACVA,2CAA2C;;;;;;;;;ACA9B;;AAEb,qBAAqB,mBAAO,CAAC,KAAiB;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACjBa;;AAEb,qBAAqB,mBAAO,CAAC,KAAU;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACpCa;;AAEb,eAAe,mBAAO,CAAC,KAAa;AACpC,oBAAoB,mBAAO,CAAC,KAAgB;AAC5C,cAAc,mBAAO,CAAC,KAAU;;AAEhC;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,iBAAiB;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sBAAsB,uBAAuB;AAC7C,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA,6CAA6C,WAAW,IAAI,aAAa;AACzE;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,kBAAkB;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC5Oa;;AAEb,oBAAoB,mBAAO,CAAC,KAAgB;AAC5C,cAAc,mBAAO,CAAC,KAAU;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,kBAAkB;;AAE5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC1Ia;;AAEb,eAAe,mBAAO,CAAC,KAAa;AACpC,oBAAoB,mBAAO,CAAC,KAAgB;AAC5C,eAAe,mBAAO,CAAC,GAAW;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,OAAO,EAAE,GAAG,EAAE,OAAO;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC,OAAO,EAAE,OAAO;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;;AAEA;AACA,UAAU,oCAAoC;;AAE9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAU,mCAAmC;AAC7C;AACA;AACA,0DAA0D,IAAI,IAAI,MAAM;AACxE;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA;;;;;;;;;ACxLa;;AAEb;AACA,eAAe,mBAAO,CAAC,KAAU;;AAEjC;AACA;AACA,YAAY,wDAAwD;AACpE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACpCa;;AAEb,oBAAoB,mBAAO,CAAC,KAAgB;;AAE5C;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,kBAAkB;;AAE5B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA,kBAAkB,WAAW,kBAAkB,oBAAoB;AACnE;AACA;;AAEA;;;;;;;;AClKA,2CAAmC;;;;;;;;;ACAtB;;AAEb,sBAAsB,mBAAO,CAAC,KAAkB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,OAAO;;AAEjB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC5Ga;;AAEb,cAAc,mBAAO,CAAC,KAAS;AAC/B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC,2BAA2B;AAC3B;AACA;;;;;;;;;AC7Ca;;AAEb,QAAQ,gBAAgB,EAAE,mBAAO,CAAC,KAAS;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACpEa;;AAEb,cAAc,mBAAO,CAAC,KAAS;AAC/B,eAAe,mBAAO,CAAC,KAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B;;AAEA;AACA;AACA,4CAA4C,wBAAwB;AACpE;AACA;;AAEA;AACA;AACA,4CAA4C,wBAAwB;AACpE;AACA;AACA;AACA;;AAEA;;;;;;;;;AC/Ia;;AAEb;AACA,eAAe,mBAAO,CAAC,KAAa;AACpC,cAAc,mBAAO,CAAC,KAAS;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kCAAkC;AAC/C,YAAY,kCAAkC;AAC9C,WAAW,kCAAkC;AAC7C,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;;AAEA;;;;;;;;;;AChEa;;AAEb,eAAe,mBAAO,CAAC,KAAU;AACjC,gBAAgB,mBAAO,CAAC,KAAW;AACnC,cAAc,mBAAO,CAAC,KAAS;;AAE/B;AACA,iCAAiC;AACjC;AACA;AACA;;;;;;;;;ACVa;;AAEb;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA,0CAA0C;AAC1C,sCAAsC;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA,8CAA8C,iBAAiB;AAC/D;AACA;AACA;;;;;;;;;ACrCa;;AAEb,eAAe,mBAAO,CAAC,KAAa;AACpC,eAAe,mBAAO,CAAC,GAAW;AAClC,cAAc,mBAAO,CAAC,KAAU;AAChC,cAAc,mBAAO,CAAC,KAAU;AAChC,QAAQ,gDAAgD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,uCAAuC;AACjD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,kBAAkB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,0BAA0B;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACjpBa;;AAEb,mBAAmB,mBAAO,CAAC,KAAiB;;AAE5C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5Ba;;AAEb,eAAe,mBAAO,CAAC,GAAW;AAClC,QAAQ,wBAAwB,EAAE,mBAAO,CAAC,KAAU;;AAEpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,cAAc;;AAExB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvFA;AACA,eAAe,mBAAO,CAAC,KAAS;AAChC,cAAc,mBAAO,CAAC,KAAQ;AAC9B,iBAAiB,mBAAO,CAAC,KAAW;AACpC,gBAAgB,mBAAO,CAAC,KAAU;AAClC,gBAAgB,mBAAO,CAAC,KAAU;AAClC;;;;;;;;;ACNa;;AAEb,qBAAqB,mBAAO,CAAC,KAAU;;AAEvC;AACA,0BAA0B;AAC1B,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACrFa;;AAEb,eAAe,mBAAO,CAAC,GAAW;AAClC,oBAAoB,mBAAO,CAAC,KAAgB;AAC5C,QAAQ,cAAc,EAAE,mBAAO,CAAC,KAAU;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B,oBAAoB,MAAM,6BAA6B,MAAM;AAC7D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B;AACA,oBAAoB,MAAM,4BAA4B,MAAM;AAC5D;AACA;AACA;;AAEA;AACA,UAAU,gBAAgB;AAC1B;AACA,oBAAoB,MAAM,wBAAwB,MAAM;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,kCAAkC;AACnE;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACxLa;;AAEb;AACA,eAAe,mBAAO,CAAC,KAAa;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;;AAEA,gBAAgB;;AAEhB,iBAAiB,gBAAgB;AACjC;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA,iBAAiB;AACjB;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB,gBAAgB;;AAEhB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,qBAAqB;AACrC;;AAEA;AACA,gBAAgB;AAChB;;AAEA,QAAQ,qDAAqD;AAC7D;AACA;AACA,kBAAkB,IAAI,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;;AAEd,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;;AAEA,WAAW,YAAY;AACvB;AACA,kDAAkD;AAClD;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd,qCAAqC,OAAO;AAC5C;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH","sources":["webpack://snyk/./node_modules/ansi-colors/index.js","webpack://snyk/./node_modules/ansi-colors/symbols.js","webpack://snyk/./node_modules/enquirer/index.js","webpack://snyk/./node_modules/enquirer/lib/ansi.js","webpack://snyk/./node_modules/enquirer/lib/combos.js","webpack://snyk/./node_modules/enquirer/lib/completer.js","webpack://snyk/./node_modules/enquirer/lib/interpolate.js","webpack://snyk/./node_modules/enquirer/lib/keypress.js","webpack://snyk/./node_modules/enquirer/lib/placeholder.js","webpack://snyk/./node_modules/enquirer/lib/prompt.js","webpack://snyk/./node_modules/enquirer/lib/prompts/autocomplete.js","webpack://snyk/./node_modules/enquirer/lib/prompts/basicauth.js","webpack://snyk/./node_modules/enquirer/lib/prompts/confirm.js","webpack://snyk/./node_modules/enquirer/lib/prompts/editable.js","webpack://snyk/./node_modules/enquirer/lib/prompts/form.js","webpack://snyk/./node_modules/enquirer/lib/prompts/index.js","webpack://snyk/./node_modules/enquirer/lib/prompts/input.js","webpack://snyk/./node_modules/enquirer/lib/prompts/invisible.js","webpack://snyk/./node_modules/enquirer/lib/prompts/list.js","webpack://snyk/./node_modules/enquirer/lib/prompts/multiselect.js","webpack://snyk/./node_modules/enquirer/lib/prompts/numeral.js","webpack://snyk/./node_modules/enquirer/lib/prompts/password.js","webpack://snyk/./node_modules/enquirer/lib/prompts/quiz.js","webpack://snyk/./node_modules/enquirer/lib/prompts/scale.js","webpack://snyk/./node_modules/enquirer/lib/prompts/select.js","webpack://snyk/./node_modules/enquirer/lib/prompts/snippet.js","webpack://snyk/./node_modules/enquirer/lib/prompts/sort.js","webpack://snyk/./node_modules/enquirer/lib/prompts/survey.js","webpack://snyk/./node_modules/enquirer/lib/prompts/text.js","webpack://snyk/./node_modules/enquirer/lib/prompts/toggle.js","webpack://snyk/./node_modules/enquirer/lib/roles.js","webpack://snyk/./node_modules/enquirer/lib/state.js","webpack://snyk/./node_modules/enquirer/lib/styles.js","webpack://snyk/./node_modules/enquirer/lib/symbols.js","webpack://snyk/./node_modules/enquirer/lib/theme.js","webpack://snyk/./node_modules/enquirer/lib/timer.js","webpack://snyk/./node_modules/enquirer/lib/types/array.js","webpack://snyk/./node_modules/enquirer/lib/types/auth.js","webpack://snyk/./node_modules/enquirer/lib/types/boolean.js","webpack://snyk/./node_modules/enquirer/lib/types/index.js","webpack://snyk/./node_modules/enquirer/lib/types/number.js","webpack://snyk/./node_modules/enquirer/lib/types/string.js","webpack://snyk/./node_modules/enquirer/lib/utils.js"],"sourcesContent":["'use strict';\n\nconst isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nconst identity = val => val;\n\n/* eslint-disable no-control-regex */\n// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)\nconst ANSI_REGEX = /[\\u001b\\u009b][[\\]#;?()]*(?:(?:(?:[^\\W_]*;?[^\\W_]*)\\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g;\n\nconst create = () => {\n const colors = { enabled: true, visible: true, styles: {}, keys: {} };\n\n if ('FORCE_COLOR' in process.env) {\n colors.enabled = process.env.FORCE_COLOR !== '0';\n }\n\n const ansi = style => {\n let open = style.open = `\\u001b[${style.codes[0]}m`;\n let close = style.close = `\\u001b[${style.codes[1]}m`;\n let regex = style.regex = new RegExp(`\\\\u001b\\\\[${style.codes[1]}m`, 'g');\n style.wrap = (input, newline) => {\n if (input.includes(close)) input = input.replace(regex, close + open);\n let output = open + input + close;\n // see https://github.com/chalk/chalk/pull/92, thanks to the\n // chalk contributors for this fix. However, we've confirmed that\n // this issue is also present in Windows terminals\n return newline ? output.replace(/\\r*\\n/g, `${close}$&${open}`) : output;\n };\n return style;\n };\n\n const wrap = (style, input, newline) => {\n return typeof style === 'function' ? style(input) : style.wrap(input, newline);\n };\n\n const style = (input, stack) => {\n if (input === '' || input == null) return '';\n if (colors.enabled === false) return input;\n if (colors.visible === false) return '';\n let str = '' + input;\n let nl = str.includes('\\n');\n let n = stack.length;\n if (n > 0 && stack.includes('unstyle')) {\n stack = [...new Set(['unstyle', ...stack])].reverse();\n }\n while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl);\n return str;\n };\n\n const define = (name, codes, type) => {\n colors.styles[name] = ansi({ name, codes });\n let keys = colors.keys[type] || (colors.keys[type] = []);\n keys.push(name);\n\n Reflect.defineProperty(colors, name, {\n configurable: true,\n enumerable: true,\n set(value) {\n colors.alias(name, value);\n },\n get() {\n let color = input => style(input, color.stack);\n Reflect.setPrototypeOf(color, colors);\n color.stack = this.stack ? this.stack.concat(name) : [name];\n return color;\n }\n });\n };\n\n define('reset', [0, 0], 'modifier');\n define('bold', [1, 22], 'modifier');\n define('dim', [2, 22], 'modifier');\n define('italic', [3, 23], 'modifier');\n define('underline', [4, 24], 'modifier');\n define('inverse', [7, 27], 'modifier');\n define('hidden', [8, 28], 'modifier');\n define('strikethrough', [9, 29], 'modifier');\n\n define('black', [30, 39], 'color');\n define('red', [31, 39], 'color');\n define('green', [32, 39], 'color');\n define('yellow', [33, 39], 'color');\n define('blue', [34, 39], 'color');\n define('magenta', [35, 39], 'color');\n define('cyan', [36, 39], 'color');\n define('white', [37, 39], 'color');\n define('gray', [90, 39], 'color');\n define('grey', [90, 39], 'color');\n\n define('bgBlack', [40, 49], 'bg');\n define('bgRed', [41, 49], 'bg');\n define('bgGreen', [42, 49], 'bg');\n define('bgYellow', [43, 49], 'bg');\n define('bgBlue', [44, 49], 'bg');\n define('bgMagenta', [45, 49], 'bg');\n define('bgCyan', [46, 49], 'bg');\n define('bgWhite', [47, 49], 'bg');\n\n define('blackBright', [90, 39], 'bright');\n define('redBright', [91, 39], 'bright');\n define('greenBright', [92, 39], 'bright');\n define('yellowBright', [93, 39], 'bright');\n define('blueBright', [94, 39], 'bright');\n define('magentaBright', [95, 39], 'bright');\n define('cyanBright', [96, 39], 'bright');\n define('whiteBright', [97, 39], 'bright');\n\n define('bgBlackBright', [100, 49], 'bgBright');\n define('bgRedBright', [101, 49], 'bgBright');\n define('bgGreenBright', [102, 49], 'bgBright');\n define('bgYellowBright', [103, 49], 'bgBright');\n define('bgBlueBright', [104, 49], 'bgBright');\n define('bgMagentaBright', [105, 49], 'bgBright');\n define('bgCyanBright', [106, 49], 'bgBright');\n define('bgWhiteBright', [107, 49], 'bgBright');\n\n colors.ansiRegex = ANSI_REGEX;\n colors.hasColor = colors.hasAnsi = str => {\n colors.ansiRegex.lastIndex = 0;\n return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str);\n };\n\n colors.alias = (name, color) => {\n let fn = typeof color === 'string' ? colors[color] : color;\n\n if (typeof fn !== 'function') {\n throw new TypeError('Expected alias to be the name of an existing color (string) or a function');\n }\n\n if (!fn.stack) {\n Reflect.defineProperty(fn, 'name', { value: name });\n colors.styles[name] = fn;\n fn.stack = [name];\n }\n\n Reflect.defineProperty(colors, name, {\n configurable: true,\n enumerable: true,\n set(value) {\n colors.alias(name, value);\n },\n get() {\n let color = input => style(input, color.stack);\n Reflect.setPrototypeOf(color, colors);\n color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack;\n return color;\n }\n });\n };\n\n colors.theme = custom => {\n if (!isObject(custom)) throw new TypeError('Expected theme to be an object');\n for (let name of Object.keys(custom)) {\n colors.alias(name, custom[name]);\n }\n return colors;\n };\n\n colors.alias('unstyle', str => {\n if (typeof str === 'string' && str !== '') {\n colors.ansiRegex.lastIndex = 0;\n return str.replace(colors.ansiRegex, '');\n }\n return '';\n });\n\n colors.alias('noop', str => str);\n colors.none = colors.clear = colors.noop;\n\n colors.stripColor = colors.unstyle;\n colors.symbols = require('./symbols');\n colors.define = define;\n return colors;\n};\n\nmodule.exports = create();\nmodule.exports.create = create;\n","'use strict';\n\nconst isHyper = process.env.TERM_PROGRAM === 'Hyper';\nconst isWindows = process.platform === 'win32';\nconst isLinux = process.platform === 'linux';\n\nconst common = {\n ballotDisabled: '☒',\n ballotOff: '☐',\n ballotOn: '☑',\n bullet: '•',\n bulletWhite: '◦',\n fullBlock: '█',\n heart: '❤',\n identicalTo: '≡',\n line: '─',\n mark: '※',\n middot: '·',\n minus: '',\n multiplication: '×',\n obelus: '÷',\n pencilDownRight: '✎',\n pencilRight: '✏',\n pencilUpRight: '✐',\n percent: '%',\n pilcrow2: '❡',\n pilcrow: '¶',\n plusMinus: '±',\n section: '§',\n starsOff: '☆',\n starsOn: '★',\n upDownArrow: '↕'\n};\n\nconst windows = Object.assign({}, common, {\n check: '√',\n cross: '×',\n ellipsisLarge: '...',\n ellipsis: '...',\n info: 'i',\n question: '?',\n questionSmall: '?',\n pointer: '>',\n pointerSmall: '»',\n radioOff: '( )',\n radioOn: '(*)',\n warning: '‼'\n});\n\nconst other = Object.assign({}, common, {\n ballotCross: '✘',\n check: '✔',\n cross: '✖',\n ellipsisLarge: '⋯',\n ellipsis: '…',\n info: '',\n question: '?',\n questionFull: '',\n questionSmall: '﹖',\n pointer: isLinux ? '▸' : '',\n pointerSmall: isLinux ? '‣' : '',\n radioOff: '◯',\n radioOn: '◉',\n warning: '⚠'\n});\n\nmodule.exports = (isWindows && !isHyper) ? windows : other;\nReflect.defineProperty(module.exports, 'common', { enumerable: false, value: common });\nReflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows });\nReflect.defineProperty(module.exports, 'other', { enumerable: false, value: other });\n","'use strict';\n\nconst assert = require('assert');\nconst Events = require('events');\nconst utils = require('./lib/utils');\n\n/**\n * Create an instance of `Enquirer`.\n *\n * ```js\n * const Enquirer = require('enquirer');\n * const enquirer = new Enquirer();\n * ```\n * @name Enquirer\n * @param {Object} `options` (optional) Options to use with all prompts.\n * @param {Object} `answers` (optional) Answers object to initialize with.\n * @api public\n */\n\nclass Enquirer extends Events {\n constructor(options, answers) {\n super();\n this.options = utils.merge({}, options);\n this.answers = { ...answers };\n }\n\n /**\n * Register a custom prompt type.\n *\n * ```js\n * const Enquirer = require('enquirer');\n * const enquirer = new Enquirer();\n * enquirer.register('customType', require('./custom-prompt'));\n * ```\n * @name register()\n * @param {String} `type`\n * @param {Function|Prompt} `fn` `Prompt` class, or a function that returns a `Prompt` class.\n * @return {Object} Returns the Enquirer instance\n * @api public\n */\n\n register(type, fn) {\n if (utils.isObject(type)) {\n for (let key of Object.keys(type)) this.register(key, type[key]);\n return this;\n }\n assert.equal(typeof fn, 'function', 'expected a function');\n let name = type.toLowerCase();\n if (fn.prototype instanceof this.Prompt) {\n this.prompts[name] = fn;\n } else {\n this.prompts[name] = fn(this.Prompt, this);\n }\n return this;\n }\n\n /**\n * Prompt function that takes a \"question\" object or array of question objects,\n * and returns an object with responses from the user.\n *\n * ```js\n * const Enquirer = require('enquirer');\n * const enquirer = new Enquirer();\n *\n * const response = await enquirer.prompt({\n * type: 'input',\n * name: 'username',\n * message: 'What is your username?'\n * });\n * console.log(response);\n * ```\n * @name prompt()\n * @param {Array|Object} `questions` Options objects for one or more prompts to run.\n * @return {Promise} Promise that returns an \"answers\" object with the user's responses.\n * @api public\n */\n\n async prompt(questions = []) {\n for (let question of [].concat(questions)) {\n try {\n if (typeof question === 'function') question = await question.call(this);\n await this.ask(utils.merge({}, this.options, question));\n } catch (err) {\n return Promise.reject(err);\n }\n }\n return this.answers;\n }\n\n async ask(question) {\n if (typeof question === 'function') {\n question = await question.call(this);\n }\n\n let opts = utils.merge({}, this.options, question);\n let { type, name } = question;\n let { set, get } = utils;\n\n if (typeof type === 'function') {\n type = await type.call(this, question, this.answers);\n }\n\n if (!type) return this.answers[name];\n\n assert(this.prompts[type], `Prompt \"${type}\" is not registered`);\n\n let prompt = new this.prompts[type](opts);\n let value = get(this.answers, name);\n\n prompt.state.answers = this.answers;\n prompt.enquirer = this;\n\n if (name) {\n prompt.on('submit', value => {\n this.emit('answer', name, value, prompt);\n set(this.answers, name, value);\n });\n }\n\n // bubble events\n let emit = prompt.emit.bind(prompt);\n prompt.emit = (...args) => {\n this.emit.call(this, ...args);\n return emit(...args);\n };\n\n this.emit('prompt', prompt, this);\n\n if (opts.autofill && value != null) {\n prompt.value = prompt.input = value;\n\n // if \"autofill=show\" render the prompt, otherwise stay \"silent\"\n if (opts.autofill === 'show') {\n await prompt.submit();\n }\n } else {\n value = prompt.value = await prompt.run();\n }\n\n return value;\n }\n\n /**\n * Use an enquirer plugin.\n *\n * ```js\n * const Enquirer = require('enquirer');\n * const enquirer = new Enquirer();\n * const plugin = enquirer => {\n * // do stuff to enquire instance\n * };\n * enquirer.use(plugin);\n * ```\n * @name use()\n * @param {Function} `plugin` Plugin function that takes an instance of Enquirer.\n * @return {Object} Returns the Enquirer instance.\n * @api public\n */\n\n use(plugin) {\n plugin.call(this, this);\n return this;\n }\n\n set Prompt(value) {\n this._Prompt = value;\n }\n get Prompt() {\n return this._Prompt || this.constructor.Prompt;\n }\n\n get prompts() {\n return this.constructor.prompts;\n }\n\n static set Prompt(value) {\n this._Prompt = value;\n }\n static get Prompt() {\n return this._Prompt || require('./lib/prompt');\n }\n\n static get prompts() {\n return require('./lib/prompts');\n }\n\n static get types() {\n return require('./lib/types');\n }\n\n /**\n * Prompt function that takes a \"question\" object or array of question objects,\n * and returns an object with responses from the user.\n *\n * ```js\n * const { prompt } = require('enquirer');\n * const response = await prompt({\n * type: 'input',\n * name: 'username',\n * message: 'What is your username?'\n * });\n * console.log(response);\n * ```\n * @name Enquirer#prompt\n * @param {Array|Object} `questions` Options objects for one or more prompts to run.\n * @return {Promise} Promise that returns an \"answers\" object with the user's responses.\n * @api public\n */\n\n static get prompt() {\n const fn = (questions, ...rest) => {\n let enquirer = new this(...rest);\n let emit = enquirer.emit.bind(enquirer);\n enquirer.emit = (...args) => {\n fn.emit(...args);\n return emit(...args);\n };\n return enquirer.prompt(questions);\n };\n utils.mixinEmitter(fn, new Events());\n return fn;\n }\n}\n\nutils.mixinEmitter(Enquirer, new Events());\nconst prompts = Enquirer.prompts;\n\nfor (let name of Object.keys(prompts)) {\n let key = name.toLowerCase();\n\n let run = options => new prompts[name](options).run();\n Enquirer.prompt[key] = run;\n Enquirer[key] = run;\n\n if (!Enquirer[name]) {\n Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] });\n }\n}\n\nconst exp = name => {\n utils.defineExport(Enquirer, name, () => Enquirer.types[name]);\n};\n\nexp('ArrayPrompt');\nexp('AuthPrompt');\nexp('BooleanPrompt');\nexp('NumberPrompt');\nexp('StringPrompt');\n\nmodule.exports = Enquirer;\n","'use strict';\n\nconst isTerm = process.env.TERM_PROGRAM === 'Apple_Terminal';\nconst colors = require('ansi-colors');\nconst utils = require('./utils');\nconst ansi = module.exports = exports;\nconst ESC = '\\u001b[';\nconst BEL = '\\u0007';\nlet hidden = false;\n\nconst code = ansi.code = {\n bell: BEL,\n beep: BEL,\n beginning: `${ESC}G`,\n down: `${ESC}J`,\n esc: ESC,\n getPosition: `${ESC}6n`,\n hide: `${ESC}?25l`,\n line: `${ESC}2K`,\n lineEnd: `${ESC}K`,\n lineStart: `${ESC}1K`,\n restorePosition: ESC + (isTerm ? '8' : 'u'),\n savePosition: ESC + (isTerm ? '7' : 's'),\n screen: `${ESC}2J`,\n show: `${ESC}?25h`,\n up: `${ESC}1J`\n};\n\nconst cursor = ansi.cursor = {\n get hidden() {\n return hidden;\n },\n\n hide() {\n hidden = true;\n return code.hide;\n },\n show() {\n hidden = false;\n return code.show;\n },\n\n forward: (count = 1) => `${ESC}${count}C`,\n backward: (count = 1) => `${ESC}${count}D`,\n nextLine: (count = 1) => `${ESC}E`.repeat(count),\n prevLine: (count = 1) => `${ESC}F`.repeat(count),\n\n up: (count = 1) => count ? `${ESC}${count}A` : '',\n down: (count = 1) => count ? `${ESC}${count}B` : '',\n right: (count = 1) => count ? `${ESC}${count}C` : '',\n left: (count = 1) => count ? `${ESC}${count}D` : '',\n\n to(x, y) {\n return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`;\n },\n\n move(x = 0, y = 0) {\n let res = '';\n res += (x < 0) ? cursor.left(-x) : (x > 0) ? cursor.right(x) : '';\n res += (y < 0) ? cursor.up(-y) : (y > 0) ? cursor.down(y) : '';\n return res;\n },\n\n restore(state = {}) {\n let { after, cursor, initial, input, prompt, size, value } = state;\n initial = utils.isPrimitive(initial) ? String(initial) : '';\n input = utils.isPrimitive(input) ? String(input) : '';\n value = utils.isPrimitive(value) ? String(value) : '';\n\n if (size) {\n let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length);\n let diff = input.length - cursor;\n if (diff > 0) {\n codes += ansi.cursor.left(diff);\n }\n return codes;\n }\n\n if (value || after) {\n let pos = (!input && !!initial) ? -initial.length : -input.length + cursor;\n if (after) pos -= after.length;\n if (input === '' && initial && !prompt.includes(initial)) {\n pos += initial.length;\n }\n return ansi.cursor.move(pos);\n }\n }\n};\n\nconst erase = ansi.erase = {\n screen: code.screen,\n up: code.up,\n down: code.down,\n line: code.line,\n lineEnd: code.lineEnd,\n lineStart: code.lineStart,\n lines(n) {\n let str = '';\n for (let i = 0; i < n; i++) {\n str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : '');\n }\n if (n) str += ansi.code.beginning;\n return str;\n }\n};\n\nansi.clear = (input = '', columns = process.stdout.columns) => {\n if (!columns) return erase.line + cursor.to(0);\n let width = str => [...colors.unstyle(str)].length;\n let lines = input.split(/\\r?\\n/);\n let rows = 0;\n for (let line of lines) {\n rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns);\n }\n return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0);\n};\n","'use strict';\n\n/**\n * Actions are mappings from keypress event names to method names\n * in the prompts.\n */\n\nexports.ctrl = {\n a: 'first',\n b: 'backward',\n c: 'cancel',\n d: 'deleteForward',\n e: 'last',\n f: 'forward',\n g: 'reset',\n i: 'tab',\n k: 'cutForward',\n l: 'reset',\n n: 'newItem',\n m: 'cancel',\n j: 'submit',\n p: 'search',\n r: 'remove',\n s: 'save',\n u: 'undo',\n w: 'cutLeft',\n x: 'toggleCursor',\n v: 'paste'\n};\n\nexports.shift = {\n up: 'shiftUp',\n down: 'shiftDown',\n left: 'shiftLeft',\n right: 'shiftRight',\n tab: 'prev'\n};\n\nexports.fn = {\n up: 'pageUp',\n down: 'pageDown',\n left: 'pageLeft',\n right: 'pageRight',\n delete: 'deleteForward'\n};\n\n// <alt> on Windows\nexports.option = {\n b: 'backward',\n f: 'forward',\n d: 'cutRight',\n left: 'cutLeft',\n up: 'altUp',\n down: 'altDown'\n};\n\nexports.keys = {\n pageup: 'pageUp', // <fn>+<up> (mac), <Page Up> (windows)\n pagedown: 'pageDown', // <fn>+<down> (mac), <Page Down> (windows)\n home: 'home', // <fn>+<left> (mac), <home> (windows)\n end: 'end', // <fn>+<right> (mac), <end> (windows)\n cancel: 'cancel',\n delete: 'deleteForward',\n backspace: 'delete',\n down: 'down',\n enter: 'submit',\n escape: 'cancel',\n left: 'left',\n space: 'space',\n number: 'number',\n return: 'submit',\n right: 'right',\n tab: 'next',\n up: 'up'\n};\n","'use strict';\n\nconst unique = arr => arr.filter((v, i) => arr.lastIndexOf(v) === i);\nconst compact = arr => unique(arr).filter(Boolean);\n\nmodule.exports = (action, data = {}, value = '') => {\n let { past = [], present = '' } = data;\n let rest, prev;\n\n switch (action) {\n case 'prev':\n case 'undo':\n rest = past.slice(0, past.length - 1);\n prev = past[past.length - 1] || '';\n return {\n past: compact([value, ...rest]),\n present: prev\n };\n\n case 'next':\n case 'redo':\n rest = past.slice(1);\n prev = past[0] || '';\n return {\n past: compact([...rest, value]),\n present: prev\n };\n\n case 'save':\n return {\n past: compact([...past, value]),\n present: ''\n };\n\n case 'remove':\n prev = compact(past.filter(v => v !== value));\n present = '';\n\n if (prev.length) {\n present = prev.pop();\n }\n\n return {\n past: prev,\n present\n };\n\n default: {\n throw new Error(`Invalid action: \"${action}\"`);\n }\n }\n};\n","'use strict';\n\nconst colors = require('ansi-colors');\nconst clean = (str = '') => {\n return typeof str === 'string' ? str.replace(/^['\"]|['\"]$/g, '') : '';\n};\n\n/**\n * This file contains the interpolation and rendering logic for\n * the Snippet prompt.\n */\n\nclass Item {\n constructor(token) {\n this.name = token.key;\n this.field = token.field || {};\n this.value = clean(token.initial || this.field.initial || '');\n this.message = token.message || this.name;\n this.cursor = 0;\n this.input = '';\n this.lines = [];\n }\n}\n\nconst tokenize = async(options = {}, defaults = {}, fn = token => token) => {\n let unique = new Set();\n let fields = options.fields || [];\n let input = options.template;\n let tabstops = [];\n let items = [];\n let keys = [];\n let line = 1;\n\n if (typeof input === 'function') {\n input = await input();\n }\n\n let i = -1;\n let next = () => input[++i];\n let peek = () => input[i + 1];\n let push = token => {\n token.line = line;\n tabstops.push(token);\n };\n\n push({ type: 'bos', value: '' });\n\n while (i < input.length - 1) {\n let value = next();\n\n if (/^[^\\S\\n ]$/.test(value)) {\n push({ type: 'text', value });\n continue;\n }\n\n if (value === '\\n') {\n push({ type: 'newline', value });\n line++;\n continue;\n }\n\n if (value === '\\\\') {\n value += next();\n push({ type: 'text', value });\n continue;\n }\n\n if ((value === '$' || value === '#' || value === '{') && peek() === '{') {\n let n = next();\n value += n;\n\n let token = { type: 'template', open: value, inner: '', close: '', value };\n let ch;\n\n while ((ch = next())) {\n if (ch === '}') {\n if (peek() === '}') ch += next();\n token.value += ch;\n token.close = ch;\n break;\n }\n\n if (ch === ':') {\n token.initial = '';\n token.key = token.inner;\n } else if (token.initial !== void 0) {\n token.initial += ch;\n }\n\n token.value += ch;\n token.inner += ch;\n }\n\n token.template = token.open + (token.initial || token.inner) + token.close;\n token.key = token.key || token.inner;\n\n if (defaults.hasOwnProperty(token.key)) {\n token.initial = defaults[token.key];\n }\n\n token = fn(token);\n push(token);\n\n keys.push(token.key);\n unique.add(token.key);\n\n let item = items.find(item => item.name === token.key);\n token.field = fields.find(ch => ch.name === token.key);\n\n if (!item) {\n item = new Item(token);\n items.push(item);\n }\n\n item.lines.push(token.line - 1);\n continue;\n }\n\n let last = tabstops[tabstops.length - 1];\n if (last.type === 'text' && last.line === line) {\n last.value += value;\n } else {\n push({ type: 'text', value });\n }\n }\n\n push({ type: 'eos', value: '' });\n return { input, tabstops, unique, keys, items };\n};\n\nmodule.exports = async prompt => {\n let options = prompt.options;\n let required = new Set(options.required === true ? [] : (options.required || []));\n let defaults = { ...options.values, ...options.initial };\n let { tabstops, items, keys } = await tokenize(options, defaults);\n\n let result = createFn('result', prompt, options);\n let format = createFn('format', prompt, options);\n let isValid = createFn('validate', prompt, options, true);\n let isVal = prompt.isValue.bind(prompt);\n\n return async(state = {}, submitted = false) => {\n let index = 0;\n\n state.required = required;\n state.items = items;\n state.keys = keys;\n state.output = '';\n\n let validate = async(value, state, item, index) => {\n let error = await isValid(value, state, item, index);\n if (error === false) {\n return 'Invalid field ' + item.name;\n }\n return error;\n };\n\n for (let token of tabstops) {\n let value = token.value;\n let key = token.key;\n\n if (token.type !== 'template') {\n if (value) state.output += value;\n continue;\n }\n\n if (token.type === 'template') {\n let item = items.find(ch => ch.name === key);\n\n if (options.required === true) {\n state.required.add(item.name);\n }\n\n let val = [item.input, state.values[item.value], item.value, value].find(isVal);\n let field = item.field || {};\n let message = field.message || token.inner;\n\n if (submitted) {\n let error = await validate(state.values[key], state, item, index);\n if ((error && typeof error === 'string') || error === false) {\n state.invalid.set(key, error);\n continue;\n }\n\n state.invalid.delete(key);\n let res = await result(state.values[key], state, item, index);\n state.output += colors.unstyle(res);\n continue;\n }\n\n item.placeholder = false;\n\n let before = value;\n value = await format(value, state, item, index);\n\n if (val !== value) {\n state.values[key] = val;\n value = prompt.styles.typing(val);\n state.missing.delete(message);\n\n } else {\n state.values[key] = void 0;\n val = `<${message}>`;\n value = prompt.styles.primary(val);\n item.placeholder = true;\n\n if (state.required.has(key)) {\n state.missing.add(message);\n }\n }\n\n if (state.missing.has(message) && state.validating) {\n value = prompt.styles.warning(val);\n }\n\n if (state.invalid.has(key) && state.validating) {\n value = prompt.styles.danger(val);\n }\n\n if (index === state.index) {\n if (before !== value) {\n value = prompt.styles.underline(value);\n } else {\n value = prompt.styles.heading(colors.unstyle(value));\n }\n }\n\n index++;\n }\n\n if (value) {\n state.output += value;\n }\n }\n\n let lines = state.output.split('\\n').map(l => ' ' + l);\n let len = items.length;\n let done = 0;\n\n for (let item of items) {\n if (state.invalid.has(item.name)) {\n item.lines.forEach(i => {\n if (lines[i][0] !== ' ') return;\n lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1);\n });\n }\n\n if (prompt.isValue(state.values[item.name])) {\n done++;\n }\n }\n\n state.completed = ((done / len) * 100).toFixed(0);\n state.output = lines.join('\\n');\n return state.output;\n };\n};\n\nfunction createFn(prop, prompt, options, fallback) {\n return (value, state, item, index) => {\n if (typeof item.field[prop] === 'function') {\n return item.field[prop].call(prompt, value, state, item, index);\n }\n return [fallback, value].find(v => prompt.isValue(v));\n };\n}\n","'use strict';\n\nconst readline = require('readline');\nconst combos = require('./combos');\n\n/* eslint-disable no-control-regex */\nconst metaKeyCodeRe = /^(?:\\x1b)([a-zA-Z0-9])$/;\nconst fnKeyRe = /^(?:\\x1b+)(O|N|\\[|\\[\\[)(?:(\\d+)(?:;(\\d+))?([~^$])|(?:1;)?(\\d+)?([a-zA-Z]))/;\nconst keyName = {\n /* xterm/gnome ESC O letter */\n 'OP': 'f1',\n 'OQ': 'f2',\n 'OR': 'f3',\n 'OS': 'f4',\n /* xterm/rxvt ESC [ number ~ */\n '[11~': 'f1',\n '[12~': 'f2',\n '[13~': 'f3',\n '[14~': 'f4',\n /* from Cygwin and used in libuv */\n '[[A': 'f1',\n '[[B': 'f2',\n '[[C': 'f3',\n '[[D': 'f4',\n '[[E': 'f5',\n /* common */\n '[15~': 'f5',\n '[17~': 'f6',\n '[18~': 'f7',\n '[19~': 'f8',\n '[20~': 'f9',\n '[21~': 'f10',\n '[23~': 'f11',\n '[24~': 'f12',\n /* xterm ESC [ letter */\n '[A': 'up',\n '[B': 'down',\n '[C': 'right',\n '[D': 'left',\n '[E': 'clear',\n '[F': 'end',\n '[H': 'home',\n /* xterm/gnome ESC O letter */\n 'OA': 'up',\n 'OB': 'down',\n 'OC': 'right',\n 'OD': 'left',\n 'OE': 'clear',\n 'OF': 'end',\n 'OH': 'home',\n /* xterm/rxvt ESC [ number ~ */\n '[1~': 'home',\n '[2~': 'insert',\n '[3~': 'delete',\n '[4~': 'end',\n '[5~': 'pageup',\n '[6~': 'pagedown',\n /* putty */\n '[[5~': 'pageup',\n '[[6~': 'pagedown',\n /* rxvt */\n '[7~': 'home',\n '[8~': 'end',\n /* rxvt keys with modifiers */\n '[a': 'up',\n '[b': 'down',\n '[c': 'right',\n '[d': 'left',\n '[e': 'clear',\n\n '[2$': 'insert',\n '[3$': 'delete',\n '[5$': 'pageup',\n '[6$': 'pagedown',\n '[7$': 'home',\n '[8$': 'end',\n\n 'Oa': 'up',\n 'Ob': 'down',\n 'Oc': 'right',\n 'Od': 'left',\n 'Oe': 'clear',\n\n '[2^': 'insert',\n '[3^': 'delete',\n '[5^': 'pageup',\n '[6^': 'pagedown',\n '[7^': 'home',\n '[8^': 'end',\n /* misc. */\n '[Z': 'tab',\n}\n\nfunction isShiftKey(code) {\n return ['[a', '[b', '[c', '[d', '[e', '[2$', '[3$', '[5$', '[6$', '[7$', '[8$', '[Z'].includes(code)\n}\n\nfunction isCtrlKey(code) {\n return [ 'Oa', 'Ob', 'Oc', 'Od', 'Oe', '[2^', '[3^', '[5^', '[6^', '[7^', '[8^'].includes(code)\n}\n\nconst keypress = (s = '', event = {}) => {\n let parts;\n let key = {\n name: event.name,\n ctrl: false,\n meta: false,\n shift: false,\n option: false,\n sequence: s,\n raw: s,\n ...event\n };\n\n if (Buffer.isBuffer(s)) {\n if (s[0] > 127 && s[1] === void 0) {\n s[0] -= 128;\n s = '\\x1b' + String(s);\n } else {\n s = String(s);\n }\n } else if (s !== void 0 && typeof s !== 'string') {\n s = String(s);\n } else if (!s) {\n s = key.sequence || '';\n }\n\n key.sequence = key.sequence || s || key.name;\n\n if (s === '\\r') {\n // carriage return\n key.raw = void 0;\n key.name = 'return';\n } else if (s === '\\n') {\n // enter, should have been called linefeed\n key.name = 'enter';\n } else if (s === '\\t') {\n // tab\n key.name = 'tab';\n } else if (s === '\\b' || s === '\\x7f' || s === '\\x1b\\x7f' || s === '\\x1b\\b') {\n // backspace or ctrl+h\n key.name = 'backspace';\n key.meta = s.charAt(0) === '\\x1b';\n } else if (s === '\\x1b' || s === '\\x1b\\x1b') {\n // escape key\n key.name = 'escape';\n key.meta = s.length === 2;\n } else if (s === ' ' || s === '\\x1b ') {\n key.name = 'space';\n key.meta = s.length === 2;\n } else if (s <= '\\x1a') {\n // ctrl+letter\n key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1);\n key.ctrl = true;\n } else if (s.length === 1 && s >= '0' && s <= '9') {\n // number\n key.name = 'number';\n } else if (s.length === 1 && s >= 'a' && s <= 'z') {\n // lowercase letter\n key.name = s;\n } else if (s.length === 1 && s >= 'A' && s <= 'Z') {\n // shift+letter\n key.name = s.toLowerCase();\n key.shift = true;\n } else if ((parts = metaKeyCodeRe.exec(s))) {\n // meta+character key\n key.meta = true;\n key.shift = /^[A-Z]$/.test(parts[1]);\n } else if ((parts = fnKeyRe.exec(s))) {\n let segs = [...s];\n\n if (segs[0] === '\\u001b' && segs[1] === '\\u001b') {\n key.option = true;\n }\n\n // ansi escape sequence\n // reassemble the key code leaving out leading \\x1b's,\n // the modifier key bitflag and any meaningless \"1;\" sequence\n let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join('');\n let modifier = (parts[3] || parts[5] || 1) - 1;\n\n // Parse the key modifier\n key.ctrl = !!(modifier & 4);\n key.meta = !!(modifier & 10);\n key.shift = !!(modifier & 1);\n key.code = code;\n\n key.name = keyName[code];\n key.shift = isShiftKey(code) || key.shift;\n key.ctrl = isCtrlKey(code) || key.ctrl;\n }\n return key;\n};\n\nkeypress.listen = (options = {}, onKeypress) => {\n let { stdin } = options;\n\n if (!stdin || (stdin !== process.stdin && !stdin.isTTY)) {\n throw new Error('Invalid stream passed');\n }\n\n let rl = readline.createInterface({ terminal: true, input: stdin });\n readline.emitKeypressEvents(stdin, rl);\n\n let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl);\n let isRaw = stdin.isRaw;\n\n if (stdin.isTTY) stdin.setRawMode(true);\n stdin.on('keypress', on);\n rl.resume();\n\n let off = () => {\n if (stdin.isTTY) stdin.setRawMode(isRaw);\n stdin.removeListener('keypress', on);\n rl.pause();\n rl.close();\n };\n\n return off;\n};\n\nkeypress.action = (buf, key, customActions) => {\n let obj = { ...combos, ...customActions };\n if (key.ctrl) {\n key.action = obj.ctrl[key.name];\n return key;\n }\n\n if (key.option && obj.option) {\n key.action = obj.option[key.name];\n return key;\n }\n\n if (key.shift) {\n key.action = obj.shift[key.name];\n return key;\n }\n\n key.action = obj.keys[key.name];\n return key;\n};\n\nmodule.exports = keypress;\n","'use strict';\n\nconst utils = require('./utils');\n\n/**\n * Render a placeholder value with cursor and styling based on the\n * position of the cursor.\n *\n * @param {Object} `prompt` Prompt instance.\n * @param {String} `input` Input string.\n * @param {String} `initial` The initial user-provided value.\n * @param {Number} `pos` Current cursor position.\n * @param {Boolean} `showCursor` Render a simulated cursor using the inverse primary style.\n * @return {String} Returns the styled placeholder string.\n * @api public\n */\n\nmodule.exports = (prompt, options = {}) => {\n prompt.cursorHide();\n\n let { input = '', initial = '', pos, showCursor = true, color } = options;\n let style = color || prompt.styles.placeholder;\n let inverse = utils.inverse(prompt.styles.primary);\n let blinker = str => inverse(prompt.styles.black(str));\n let output = input;\n let char = ' ';\n let reverse = blinker(char);\n\n if (prompt.blink && prompt.blink.off === true) {\n blinker = str => str;\n reverse = '';\n }\n\n if (showCursor && pos === 0 && initial === '' && input === '') {\n return blinker(char);\n }\n\n if (showCursor && pos === 0 && (input === initial || input === '')) {\n return blinker(initial[0]) + style(initial.slice(1));\n }\n\n initial = utils.isPrimitive(initial) ? `${initial}` : '';\n input = utils.isPrimitive(input) ? `${input}` : '';\n\n let placeholder = initial && initial.startsWith(input) && initial !== input;\n let cursor = placeholder ? blinker(initial[input.length]) : reverse;\n\n if (pos !== input.length && showCursor === true) {\n output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1);\n cursor = '';\n }\n\n if (showCursor === false) {\n cursor = '';\n }\n\n if (placeholder) {\n let raw = prompt.styles.unstyle(output + cursor);\n return output + cursor + style(initial.slice(raw.length));\n }\n\n return output + cursor;\n};\n","'use strict';\n\nconst Events = require('events');\nconst colors = require('ansi-colors');\nconst keypress = require('./keypress');\nconst timer = require('./timer');\nconst State = require('./state');\nconst theme = require('./theme');\nconst utils = require('./utils');\nconst ansi = require('./ansi');\n\n/**\n * Base class for creating a new Prompt.\n * @param {Object} `options` Question object.\n */\n\nclass Prompt extends Events {\n constructor(options = {}) {\n super();\n this.name = options.name;\n this.type = options.type;\n this.options = options;\n theme(this);\n timer(this);\n this.state = new State(this);\n this.initial = [options.initial, options.default].find(v => v != null);\n this.stdout = options.stdout || process.stdout;\n this.stdin = options.stdin || process.stdin;\n this.scale = options.scale || 1;\n this.term = this.options.term || process.env.TERM_PROGRAM;\n this.margin = margin(this.options.margin);\n this.setMaxListeners(0);\n setOptions(this);\n }\n\n async keypress(input, event = {}) {\n this.keypressed = true;\n let key = keypress.action(input, keypress(input, event), this.options.actions);\n this.state.keypress = key;\n this.emit('keypress', input, key);\n this.emit('state', this.state.clone());\n let fn = this.options[key.action] || this[key.action] || this.dispatch;\n if (typeof fn === 'function') {\n return await fn.call(this, input, key);\n }\n this.alert();\n }\n\n alert() {\n delete this.state.alert;\n if (this.options.show === false) {\n this.emit('alert');\n } else {\n this.stdout.write(ansi.code.beep);\n }\n }\n\n cursorHide() {\n this.stdout.write(ansi.cursor.hide());\n utils.onExit(() => this.cursorShow());\n }\n\n cursorShow() {\n this.stdout.write(ansi.cursor.show());\n }\n\n write(str) {\n if (!str) return;\n if (this.stdout && this.state.show !== false) {\n this.stdout.write(str);\n }\n this.state.buffer += str;\n }\n\n clear(lines = 0) {\n let buffer = this.state.buffer;\n this.state.buffer = '';\n if ((!buffer && !lines) || this.options.show === false) return;\n this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width));\n }\n\n restore() {\n if (this.state.closed || this.options.show === false) return;\n\n let { prompt, after, rest } = this.sections();\n let { cursor, initial = '', input = '', value = '' } = this;\n\n let size = this.state.size = rest.length;\n let state = { after, cursor, initial, input, prompt, size, value };\n let codes = ansi.cursor.restore(state);\n if (codes) {\n this.stdout.write(codes);\n }\n }\n\n sections() {\n let { buffer, input, prompt } = this.state;\n prompt = colors.unstyle(prompt);\n let buf = colors.unstyle(buffer);\n let idx = buf.indexOf(prompt);\n let header = buf.slice(0, idx);\n let rest = buf.slice(idx);\n let lines = rest.split('\\n');\n let first = lines[0];\n let last = lines[lines.length - 1];\n let promptLine = prompt + (input ? ' ' + input : '');\n let len = promptLine.length;\n let after = len < first.length ? first.slice(len + 1) : '';\n return { header, prompt: first, after, rest: lines.slice(1), last };\n }\n\n async submit() {\n this.state.submitted = true;\n this.state.validating = true;\n\n // this will only be called when the prompt is directly submitted\n // without initializing, i.e. when the prompt is skipped, etc. Otherwize,\n // \"options.onSubmit\" is will be handled by the \"initialize()\" method.\n if (this.options.onSubmit) {\n await this.options.onSubmit.call(this, this.name, this.value, this);\n }\n\n let result = this.state.error || await this.validate(this.value, this.state);\n if (result !== true) {\n let error = '\\n' + this.symbols.pointer + ' ';\n\n if (typeof result === 'string') {\n error += result.trim();\n } else {\n error += 'Invalid input';\n }\n\n this.state.error = '\\n' + this.styles.danger(error);\n this.state.submitted = false;\n await this.render();\n await this.alert();\n this.state.validating = false;\n this.state.error = void 0;\n return;\n }\n\n this.state.validating = false;\n await this.render();\n await this.close();\n\n this.value = await this.result(this.value);\n this.emit('submit', this.value);\n }\n\n async cancel(err) {\n this.state.cancelled = this.state.submitted = true;\n\n await this.render();\n await this.close();\n\n if (typeof this.options.onCancel === 'function') {\n await this.options.onCancel.call(this, this.name, this.value, this);\n }\n\n this.emit('cancel', await this.error(err));\n }\n\n async close() {\n this.state.closed = true;\n\n try {\n let sections = this.sections();\n let lines = Math.ceil(sections.prompt.length / this.width);\n if (sections.rest) {\n this.write(ansi.cursor.down(sections.rest.length));\n }\n this.write('\\n'.repeat(lines));\n } catch (err) { /* do nothing */ }\n\n this.emit('close');\n }\n\n start() {\n if (!this.stop && this.options.show !== false) {\n this.stop = keypress.listen(this, this.keypress.bind(this));\n this.once('close', this.stop);\n }\n }\n\n async skip() {\n this.skipped = this.options.skip === true;\n if (typeof this.options.skip === 'function') {\n this.skipped = await this.options.skip.call(this, this.name, this.value);\n }\n return this.skipped;\n }\n\n async initialize() {\n let { format, options, result } = this;\n\n this.format = () => format.call(this, this.value);\n this.result = () => result.call(this, this.value);\n\n if (typeof options.initial === 'function') {\n this.initial = await options.initial.call(this, this);\n }\n\n if (typeof options.onRun === 'function') {\n await options.onRun.call(this, this);\n }\n\n // if \"options.onSubmit\" is defined, we wrap the \"submit\" method to guarantee\n // that \"onSubmit\" will always called first thing inside the submit\n // method, regardless of how it's handled in inheriting prompts.\n if (typeof options.onSubmit === 'function') {\n let onSubmit = options.onSubmit.bind(this);\n let submit = this.submit.bind(this);\n delete this.options.onSubmit;\n this.submit = async() => {\n await onSubmit(this.name, this.value, this);\n return submit();\n };\n }\n\n await this.start();\n await this.render();\n }\n\n render() {\n throw new Error('expected prompt to have a custom render method');\n }\n\n run() {\n return new Promise(async(resolve, reject) => {\n this.once('submit', resolve);\n this.once('cancel', reject);\n if (await this.skip()) {\n this.render = () => {};\n return this.submit();\n }\n await this.initialize();\n this.emit('run');\n });\n }\n\n async element(name, choice, i) {\n let { options, state, symbols, timers } = this;\n let timer = timers && timers[name];\n state.timer = timer;\n let value = options[name] || state[name] || symbols[name];\n let val = choice && choice[name] != null ? choice[name] : await value;\n if (val === '') return val;\n\n let res = await this.resolve(val, state, choice, i);\n if (!res && choice && choice[name]) {\n return this.resolve(value, state, choice, i);\n }\n return res;\n }\n\n async prefix() {\n let element = await this.element('prefix') || this.symbols;\n let timer = this.timers && this.timers.prefix;\n let state = this.state;\n state.timer = timer;\n if (utils.isObject(element)) element = element[state.status] || element.pending;\n if (!utils.hasColor(element)) {\n let style = this.styles[state.status] || this.styles.pending;\n return style(element);\n }\n return element;\n }\n\n async message() {\n let message = await this.element('message');\n if (!utils.hasColor(message)) {\n return this.styles.strong(message);\n }\n return message;\n }\n\n async separator() {\n let element = await this.element('separator') || this.symbols;\n let timer = this.timers && this.timers.separator;\n let state = this.state;\n state.timer = timer;\n let value = element[state.status] || element.pending || state.separator;\n let ele = await this.resolve(value, state);\n if (utils.isObject(ele)) ele = ele[state.status] || ele.pending;\n if (!utils.hasColor(ele)) {\n return this.styles.muted(ele);\n }\n return ele;\n }\n\n async pointer(choice, i) {\n let val = await this.element('pointer', choice, i);\n\n if (typeof val === 'string' && utils.hasColor(val)) {\n return val;\n }\n\n if (val) {\n let styles = this.styles;\n let focused = this.index === i;\n let style = focused ? styles.primary : val => val;\n let ele = await this.resolve(val[focused ? 'on' : 'off'] || val, this.state);\n let styled = !utils.hasColor(ele) ? style(ele) : ele;\n return focused ? styled : ' '.repeat(ele.length);\n }\n }\n\n async indicator(choice, i) {\n let val = await this.element('indicator', choice, i);\n if (typeof val === 'string' && utils.hasColor(val)) {\n return val;\n }\n if (val) {\n let styles = this.styles;\n let enabled = choice.enabled === true;\n let style = enabled ? styles.success : styles.dark;\n let ele = val[enabled ? 'on' : 'off'] || val;\n return !utils.hasColor(ele) ? style(ele) : ele;\n }\n return '';\n }\n\n body() {\n return null;\n }\n\n footer() {\n if (this.state.status === 'pending') {\n return this.element('footer');\n }\n }\n\n header() {\n if (this.state.status === 'pending') {\n return this.element('header');\n }\n }\n\n async hint() {\n if (this.state.status === 'pending' && !this.isValue(this.state.input)) {\n let hint = await this.element('hint');\n if (!utils.hasColor(hint)) {\n return this.styles.muted(hint);\n }\n return hint;\n }\n }\n\n error(err) {\n return !this.state.submitted ? (err || this.state.error) : '';\n }\n\n format(value) {\n return value;\n }\n\n result(value) {\n return value;\n }\n\n validate(value) {\n if (this.options.required === true) {\n return this.isValue(value);\n }\n return true;\n }\n\n isValue(value) {\n return value != null && value !== '';\n }\n\n resolve(value, ...args) {\n return utils.resolve(this, value, ...args);\n }\n\n get base() {\n return Prompt.prototype;\n }\n\n get style() {\n return this.styles[this.state.status];\n }\n\n get height() {\n return this.options.rows || utils.height(this.stdout, 25);\n }\n get width() {\n return this.options.columns || utils.width(this.stdout, 80);\n }\n get size() {\n return { width: this.width, height: this.height };\n }\n\n set cursor(value) {\n this.state.cursor = value;\n }\n get cursor() {\n return this.state.cursor;\n }\n\n set input(value) {\n this.state.input = value;\n }\n get input() {\n return this.state.input;\n }\n\n set value(value) {\n this.state.value = value;\n }\n get value() {\n let { input, value } = this.state;\n let result = [value, input].find(this.isValue.bind(this));\n return this.isValue(result) ? result : this.initial;\n }\n\n static get prompt() {\n return options => new this(options).run();\n }\n}\n\nfunction setOptions(prompt) {\n let isValidKey = key => {\n return prompt[key] === void 0 || typeof prompt[key] === 'function';\n };\n\n let ignore = [\n 'actions',\n 'choices',\n 'initial',\n 'margin',\n 'roles',\n 'styles',\n 'symbols',\n 'theme',\n 'timers',\n 'value'\n ];\n\n let ignoreFn = [\n 'body',\n 'footer',\n 'error',\n 'header',\n 'hint',\n 'indicator',\n 'message',\n 'prefix',\n 'separator',\n 'skip'\n ];\n\n for (let key of Object.keys(prompt.options)) {\n if (ignore.includes(key)) continue;\n if (/^on[A-Z]/.test(key)) continue;\n let option = prompt.options[key];\n if (typeof option === 'function' && isValidKey(key)) {\n if (!ignoreFn.includes(key)) {\n prompt[key] = option.bind(prompt);\n }\n } else if (typeof prompt[key] !== 'function') {\n prompt[key] = option;\n }\n }\n}\n\nfunction margin(value) {\n if (typeof value === 'number') {\n value = [value, value, value, value];\n }\n let arr = [].concat(value || []);\n let pad = i => i % 2 === 0 ? '\\n' : ' ';\n let res = [];\n for (let i = 0; i < 4; i++) {\n let char = pad(i);\n if (arr[i]) {\n res.push(char.repeat(arr[i]));\n } else {\n res.push('');\n }\n }\n return res;\n}\n\nmodule.exports = Prompt;\n","'use strict';\n\nconst Select = require('./select');\n\nconst highlight = (input, color) => {\n let val = input.toLowerCase();\n return str => {\n let s = str.toLowerCase();\n let i = s.indexOf(val);\n let colored = color(str.slice(i, i + val.length));\n return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str;\n };\n};\n\nclass AutoComplete extends Select {\n constructor(options) {\n super(options);\n this.cursorShow();\n }\n\n moveCursor(n) {\n this.state.cursor += n;\n }\n\n dispatch(ch) {\n return this.append(ch);\n }\n\n space(ch) {\n return this.options.multiple ? super.space(ch) : this.append(ch);\n }\n\n append(ch) {\n let { cursor, input } = this.state;\n this.input = input.slice(0, cursor) + ch + input.slice(cursor);\n this.moveCursor(1);\n return this.complete();\n }\n\n delete() {\n let { cursor, input } = this.state;\n if (!input) return this.alert();\n this.input = input.slice(0, cursor - 1) + input.slice(cursor);\n this.moveCursor(-1);\n return this.complete();\n }\n\n deleteForward() {\n let { cursor, input } = this.state;\n if (input[cursor] === void 0) return this.alert();\n this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1);\n return this.complete();\n }\n\n number(ch) {\n return this.append(ch);\n }\n\n async complete() {\n this.completing = true;\n this.choices = await this.suggest(this.input, this.state._choices);\n this.state.limit = void 0; // allow getter/setter to reset limit\n this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index);\n await this.render();\n this.completing = false;\n }\n\n suggest(input = this.input, choices = this.state._choices) {\n if (typeof this.options.suggest === 'function') {\n return this.options.suggest.call(this, input, choices);\n }\n let str = input.toLowerCase();\n return choices.filter(ch => ch.message.toLowerCase().includes(str));\n }\n\n pointer() {\n return '';\n }\n\n format() {\n if (!this.focused) return this.input;\n if (this.options.multiple && this.state.submitted) {\n return this.selected.map(ch => this.styles.primary(ch.message)).join(', ');\n }\n if (this.state.submitted) {\n let value = this.value = this.input = this.focused.value;\n return this.styles.primary(value);\n }\n return this.input;\n }\n\n async render() {\n if (this.state.status !== 'pending') return super.render();\n let style = this.options.highlight\n ? this.options.highlight.bind(this)\n : this.styles.placeholder;\n\n let color = highlight(this.input, style);\n let choices = this.choices;\n this.choices = choices.map(ch => ({ ...ch, message: color(ch.message) }));\n await super.render();\n this.choices = choices;\n }\n\n submit() {\n if (this.options.multiple) {\n this.value = this.selected.map(ch => ch.name);\n }\n return super.submit();\n }\n}\n\nmodule.exports = AutoComplete;\n","'use strict';\n\nconst AuthPrompt = require('../types/auth');\n\nfunction defaultAuthenticate(value, state) {\n if (value.username === this.options.username && value.password === this.options.password) {\n return true;\n }\n return false;\n}\n\nconst factory = (authenticate = defaultAuthenticate) => {\n const choices = [\n { name: 'username', message: 'username' },\n {\n name: 'password',\n message: 'password',\n format(input) {\n if (this.options.showPassword) {\n return input;\n }\n let color = this.state.submitted ? this.styles.primary : this.styles.muted;\n return color(this.symbols.asterisk.repeat(input.length));\n }\n }\n ];\n\n class BasicAuthPrompt extends AuthPrompt.create(authenticate) {\n constructor(options) {\n super({ ...options, choices });\n }\n\n static create(authenticate) {\n return factory(authenticate);\n }\n }\n\n return BasicAuthPrompt;\n};\n\nmodule.exports = factory();\n","'use strict';\n\nconst BooleanPrompt = require('../types/boolean');\n\nclass ConfirmPrompt extends BooleanPrompt {\n constructor(options) {\n super(options);\n this.default = this.options.default || (this.initial ? '(Y/n)' : '(y/N)');\n }\n}\n\nmodule.exports = ConfirmPrompt;\n\n","'use strict';\n\nconst Select = require('./select');\nconst Form = require('./form');\nconst form = Form.prototype;\n\nclass Editable extends Select {\n constructor(options) {\n super({ ...options, multiple: true });\n this.align = [this.options.align, 'left'].find(v => v != null);\n this.emptyError = '';\n this.values = {};\n }\n\n dispatch(char, key) {\n let choice = this.focused;\n let parent = choice.parent || {};\n if (!choice.editable && !parent.editable) {\n if (char === 'a' || char === 'i') return super[char]();\n }\n return form.dispatch.call(this, char, key);\n }\n\n append(char, key) {\n return form.append.call(this, char, key);\n }\n\n delete(char, key) {\n return form.delete.call(this, char, key);\n }\n\n space(char) {\n return this.focused.editable ? this.append(char) : super.space();\n }\n\n number(char) {\n return this.focused.editable ? this.append(char) : super.number(char);\n }\n\n next() {\n return this.focused.editable ? form.next.call(this) : super.next();\n }\n\n prev() {\n return this.focused.editable ? form.prev.call(this) : super.prev();\n }\n\n async indicator(choice, i) {\n let symbol = choice.indicator || '';\n let value = choice.editable ? symbol : super.indicator(choice, i);\n return await this.resolve(value, this.state, choice, i) || '';\n }\n\n indent(choice) {\n return choice.role === 'heading' ? '' : (choice.editable ? ' ' : ' ');\n }\n\n async renderChoice(choice, i) {\n choice.indent = '';\n if (choice.editable) return form.renderChoice.call(this, choice, i);\n return super.renderChoice(choice, i);\n }\n\n error() {\n return '';\n }\n\n footer() {\n return this.state.error;\n }\n\n async validate() {\n let result = true;\n\n for (let choice of this.choices) {\n if (typeof choice.validate !== 'function') {\n continue;\n }\n\n if (choice.role === 'heading') {\n continue;\n }\n\n let val = choice.parent ? this.value[choice.parent.name] : this.value;\n\n if (choice.editable) {\n val = choice.value === choice.name ? choice.initial || '' : choice.value;\n } else if (!this.isDisabled(choice)) {\n val = choice.enabled === true;\n }\n\n result = await choice.validate(val, this.state);\n\n if (result !== true) {\n break;\n }\n }\n\n if (result !== true) {\n this.state.error = typeof result === 'string' ? result : 'Invalid Input';\n }\n\n return result;\n }\n\n submit() {\n if (this.focused.newChoice === true) return super.submit();\n if (this.choices.some(ch => ch.newChoice)) {\n return this.alert();\n }\n\n this.value = {};\n\n for (let choice of this.choices) {\n let val = choice.parent ? this.value[choice.parent.name] : this.value;\n\n if (choice.role === 'heading') {\n this.value[choice.name] = {};\n continue;\n }\n\n if (choice.editable) {\n val[choice.name] = choice.value === choice.name\n ? (choice.initial || '')\n : choice.value;\n\n } else if (!this.isDisabled(choice)) {\n val[choice.name] = choice.enabled === true;\n }\n }\n\n return this.base.submit.call(this);\n }\n}\n\nmodule.exports = Editable;\n","'use strict';\n\nconst colors = require('ansi-colors');\nconst SelectPrompt = require('./select');\nconst placeholder = require('../placeholder');\n\nclass FormPrompt extends SelectPrompt {\n constructor(options) {\n super({ ...options, multiple: true });\n this.type = 'form';\n this.initial = this.options.initial;\n this.align = [this.options.align, 'right'].find(v => v != null);\n this.emptyError = '';\n this.values = {};\n }\n\n async reset(first) {\n await super.reset();\n if (first === true) this._index = this.index;\n this.index = this._index;\n this.values = {};\n this.choices.forEach(choice => choice.reset && choice.reset());\n return this.render();\n }\n\n dispatch(char) {\n return !!char && this.append(char);\n }\n\n append(char) {\n let choice = this.focused;\n if (!choice) return this.alert();\n let { cursor, input } = choice;\n choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor);\n choice.cursor++;\n return this.render();\n }\n\n delete() {\n let choice = this.focused;\n if (!choice || choice.cursor <= 0) return this.alert();\n let { cursor, input } = choice;\n choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor);\n choice.cursor--;\n return this.render();\n }\n\n deleteForward() {\n let choice = this.focused;\n if (!choice) return this.alert();\n let { cursor, input } = choice;\n if (input[cursor] === void 0) return this.alert();\n let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1);\n choice.value = choice.input = str;\n return this.render();\n }\n\n right() {\n let choice = this.focused;\n if (!choice) return this.alert();\n if (choice.cursor >= choice.input.length) return this.alert();\n choice.cursor++;\n return this.render();\n }\n\n left() {\n let choice = this.focused;\n if (!choice) return this.alert();\n if (choice.cursor <= 0) return this.alert();\n choice.cursor--;\n return this.render();\n }\n\n space(ch, key) {\n return this.dispatch(ch, key);\n }\n\n number(ch, key) {\n return this.dispatch(ch, key);\n }\n\n next() {\n let ch = this.focused;\n if (!ch) return this.alert();\n let { initial, input } = ch;\n if (initial && initial.startsWith(input) && input !== initial) {\n ch.value = ch.input = initial;\n ch.cursor = ch.value.length;\n return this.render();\n }\n return super.next();\n }\n\n prev() {\n let ch = this.focused;\n if (!ch) return this.alert();\n if (ch.cursor === 0) return super.prev();\n ch.value = ch.input = '';\n ch.cursor = 0;\n return this.render();\n }\n\n separator() {\n return '';\n }\n\n format(value) {\n return !this.state.submitted ? super.format(value) : '';\n }\n\n pointer() {\n return '';\n }\n\n indicator(choice) {\n return choice.input ? '⦿' : '⊙';\n }\n\n async choiceSeparator(choice, i) {\n let sep = await this.resolve(choice.separator, this.state, choice, i) || ':';\n return sep ? ' ' + this.styles.disabled(sep) : '';\n }\n\n async renderChoice(choice, i) {\n await this.onChoice(choice, i);\n\n let { state, styles } = this;\n let { cursor, initial = '', name, hint, input = '' } = choice;\n let { muted, submitted, primary, danger } = styles;\n\n let help = hint;\n let focused = this.index === i;\n let validate = choice.validate || (() => true);\n let sep = await this.choiceSeparator(choice, i);\n let msg = choice.message;\n\n if (this.align === 'right') msg = msg.padStart(this.longest + 1, ' ');\n if (this.align === 'left') msg = msg.padEnd(this.longest + 1, ' ');\n\n // re-populate the form values (answers) object\n let value = this.values[name] = (input || initial);\n let color = input ? 'success' : 'dark';\n\n if ((await validate.call(choice, value, this.state)) !== true) {\n color = 'danger';\n }\n\n let style = styles[color];\n let indicator = style(await this.indicator(choice, i)) + (choice.pad || '');\n\n let indent = this.indent(choice);\n let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(' ');\n\n if (state.submitted) {\n msg = colors.unstyle(msg);\n input = submitted(input);\n help = '';\n return line();\n }\n\n if (choice.format) {\n input = await choice.format.call(this, input, choice, i);\n } else {\n let color = this.styles.muted;\n let options = { input, initial, pos: cursor, showCursor: focused, color };\n input = placeholder(this, options);\n }\n\n if (!this.isValue(input)) {\n input = this.styles.muted(this.symbols.ellipsis);\n }\n\n if (choice.result) {\n this.values[name] = await choice.result.call(this, value, choice, i);\n }\n\n if (focused) {\n msg = primary(msg);\n }\n\n if (choice.error) {\n input += (input ? ' ' : '') + danger(choice.error.trim());\n } else if (choice.hint) {\n input += (input ? ' ' : '') + muted(choice.hint.trim());\n }\n\n return line();\n }\n\n async submit() {\n this.value = this.values;\n return super.base.submit.call(this);\n }\n}\n\nmodule.exports = FormPrompt;\n","'use strict';\n\nconst utils = require('../utils');\n\nconst define = (key, fn) => {\n utils.defineExport(exports, key, fn);\n utils.defineExport(exports, key.toLowerCase(), fn);\n};\n\ndefine('AutoComplete', () => require('./autocomplete'));\ndefine('BasicAuth', () => require('./basicauth'));\ndefine('Confirm', () => require('./confirm'));\ndefine('Editable', () => require('./editable'));\ndefine('Form', () => require('./form'));\ndefine('Input', () => require('./input'));\ndefine('Invisible', () => require('./invisible'));\ndefine('List', () => require('./list'));\ndefine('MultiSelect', () => require('./multiselect'));\ndefine('Numeral', () => require('./numeral'));\ndefine('Password', () => require('./password'));\ndefine('Scale', () => require('./scale'));\ndefine('Select', () => require('./select'));\ndefine('Snippet', () => require('./snippet'));\ndefine('Sort', () => require('./sort'));\ndefine('Survey', () => require('./survey'));\ndefine('Text', () => require('./text'));\ndefine('Toggle', () => require('./toggle'));\ndefine('Quiz', () => require('./quiz'));\n","'use strict';\n\nconst Prompt = require('../types/string');\nconst completer = require('../completer');\n\nclass Input extends Prompt {\n constructor(options) {\n super(options);\n let history = this.options.history;\n if (history && history.store) {\n let initial = history.values || this.initial;\n this.autosave = !!history.autosave;\n this.store = history.store;\n this.data = this.store.get('values') || { past: [], present: initial };\n this.initial = this.data.present || this.data.past[this.data.past.length - 1];\n }\n }\n\n completion(action) {\n if (!this.store) return this.alert();\n this.data = completer(action, this.data, this.input);\n if (!this.data.present) return this.alert();\n this.input = this.data.present;\n this.cursor = this.input.length;\n return this.render();\n }\n\n altUp() {\n return this.completion('prev');\n }\n\n altDown() {\n return this.completion('next');\n }\n\n prev() {\n this.save();\n return super.prev();\n }\n\n save() {\n if (!this.store) return;\n this.data = completer('save', this.data, this.input);\n this.store.set('values', this.data);\n }\n\n submit() {\n if (this.store && this.autosave === true) {\n this.save();\n }\n return super.submit();\n }\n}\n\nmodule.exports = Input;\n","'use strict';\n\nconst StringPrompt = require('../types/string');\n\nclass InvisiblePrompt extends StringPrompt {\n format() {\n return '';\n }\n}\n\nmodule.exports = InvisiblePrompt;\n","'use strict';\n\nconst StringPrompt = require('../types/string');\n\nclass ListPrompt extends StringPrompt {\n constructor(options = {}) {\n super(options);\n this.sep = this.options.separator || /, */;\n this.initial = options.initial || '';\n }\n\n split(input = this.value) {\n return input ? String(input).split(this.sep) : [];\n }\n\n format() {\n let style = this.state.submitted ? this.styles.primary : val => val;\n return this.list.map(style).join(', ');\n }\n\n async submit(value) {\n let result = this.state.error || await this.validate(this.list, this.state);\n if (result !== true) {\n this.state.error = result;\n return super.submit();\n }\n this.value = this.list;\n return super.submit();\n }\n\n get list() {\n return this.split();\n }\n}\n\nmodule.exports = ListPrompt;\n","'use strict';\n\nconst Select = require('./select');\n\nclass MultiSelect extends Select {\n constructor(options) {\n super({ ...options, multiple: true });\n }\n}\n\nmodule.exports = MultiSelect;\n","module.exports = require('../types/number');\n","'use strict';\n\nconst StringPrompt = require('../types/string');\n\nclass PasswordPrompt extends StringPrompt {\n constructor(options) {\n super(options);\n this.cursorShow();\n }\n\n format(input = this.input) {\n if (!this.keypressed) return '';\n let color = this.state.submitted ? this.styles.primary : this.styles.muted;\n return color(this.symbols.asterisk.repeat(input.length));\n }\n}\n\nmodule.exports = PasswordPrompt;\n","'use strict';\n\nconst SelectPrompt = require('./select');\n\nclass Quiz extends SelectPrompt {\n constructor(options) {\n super(options);\n if (typeof this.options.correctChoice !== 'number' || this.options.correctChoice < 0) {\n throw new Error('Please specify the index of the correct answer from the list of choices');\n }\n }\n\n async toChoices(value, parent) {\n let choices = await super.toChoices(value, parent);\n if (choices.length < 2) {\n throw new Error('Please give at least two choices to the user');\n }\n if (this.options.correctChoice > choices.length) {\n throw new Error('Please specify the index of the correct answer from the list of choices');\n }\n return choices;\n }\n\n check(state) {\n return state.index === this.options.correctChoice;\n }\n\n async result(selected) {\n return {\n selectedAnswer: selected,\n correctAnswer: this.options.choices[this.options.correctChoice].value,\n correct: await this.check(this.state)\n };\n }\n}\n\nmodule.exports = Quiz;\n","'use strict';\n\nconst colors = require('ansi-colors');\nconst ArrayPrompt = require('../types/array');\nconst utils = require('../utils');\n\nclass LikertScale extends ArrayPrompt {\n constructor(options = {}) {\n super(options);\n this.widths = [].concat(options.messageWidth || 50);\n this.align = [].concat(options.align || 'left');\n this.linebreak = options.linebreak || false;\n this.edgeLength = options.edgeLength || 3;\n this.newline = options.newline || '\\n ';\n let start = options.startNumber || 1;\n if (typeof this.scale === 'number') {\n this.scaleKey = false;\n this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start }));\n }\n }\n\n async reset() {\n this.tableized = false;\n await super.reset();\n return this.render();\n }\n\n tableize() {\n if (this.tableized === true) return;\n this.tableized = true;\n let longest = 0;\n\n for (let ch of this.choices) {\n longest = Math.max(longest, ch.message.length);\n ch.scaleIndex = ch.initial || 2;\n ch.scale = [];\n\n for (let i = 0; i < this.scale.length; i++) {\n ch.scale.push({ index: i });\n }\n }\n this.widths[0] = Math.min(this.widths[0], longest + 3);\n }\n\n async dispatch(s, key) {\n if (this.multiple) {\n return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key);\n }\n this.alert();\n }\n\n heading(msg, item, i) {\n return this.styles.strong(msg);\n }\n\n separator() {\n return this.styles.muted(this.symbols.ellipsis);\n }\n\n right() {\n let choice = this.focused;\n if (choice.scaleIndex >= this.scale.length - 1) return this.alert();\n choice.scaleIndex++;\n return this.render();\n }\n\n left() {\n let choice = this.focused;\n if (choice.scaleIndex <= 0) return this.alert();\n choice.scaleIndex--;\n return this.render();\n }\n\n indent() {\n return '';\n }\n\n format() {\n if (this.state.submitted) {\n let values = this.choices.map(ch => this.styles.info(ch.index));\n return values.join(', ');\n }\n return '';\n }\n\n pointer() {\n return '';\n }\n\n /**\n * Render the scale \"Key\". Something like:\n * @return {String}\n */\n\n renderScaleKey() {\n if (this.scaleKey === false) return '';\n if (this.state.submitted) return '';\n let scale = this.scale.map(item => ` ${item.name} - ${item.message}`);\n let key = ['', ...scale].map(item => this.styles.muted(item));\n return key.join('\\n');\n }\n\n /**\n * Render the heading row for the scale.\n * @return {String}\n */\n\n renderScaleHeading(max) {\n let keys = this.scale.map(ele => ele.name);\n if (typeof this.options.renderScaleHeading === 'function') {\n keys = this.options.renderScaleHeading.call(this, max);\n }\n let diff = this.scaleLength - keys.join('').length;\n let spacing = Math.round(diff / (keys.length - 1));\n let names = keys.map(key => this.styles.strong(key));\n let headings = names.join(' '.repeat(spacing));\n let padding = ' '.repeat(this.widths[0]);\n return this.margin[3] + padding + this.margin[1] + headings;\n }\n\n /**\n * Render a scale indicator => ◯ or ◉ by default\n */\n\n scaleIndicator(choice, item, i) {\n if (typeof this.options.scaleIndicator === 'function') {\n return this.options.scaleIndicator.call(this, choice, item, i);\n }\n let enabled = choice.scaleIndex === item.index;\n if (item.disabled) return this.styles.hint(this.symbols.radio.disabled);\n if (enabled) return this.styles.success(this.symbols.radio.on);\n return this.symbols.radio.off;\n }\n\n /**\n * Render the actual scale => ◯────◯────◉────◯────◯\n */\n\n renderScale(choice, i) {\n let scale = choice.scale.map(item => this.scaleIndicator(choice, item, i));\n let padding = this.term === 'Hyper' ? '' : ' ';\n return scale.join(padding + this.symbols.line.repeat(this.edgeLength));\n }\n\n /**\n * Render a choice, including scale =>\n * \"The website is easy to navigate. ◯───◯───◉───◯───◯\"\n */\n\n async renderChoice(choice, i) {\n await this.onChoice(choice, i);\n\n let focused = this.index === i;\n let pointer = await this.pointer(choice, i);\n let hint = await choice.hint;\n\n if (hint && !utils.hasColor(hint)) {\n hint = this.styles.muted(hint);\n }\n\n let pad = str => this.margin[3] + str.replace(/\\s+$/, '').padEnd(this.widths[0], ' ');\n let newline = this.newline;\n let ind = this.indent(choice);\n let message = await this.resolve(choice.message, this.state, choice, i);\n let scale = await this.renderScale(choice, i);\n let margin = this.margin[1] + this.margin[3];\n this.scaleLength = colors.unstyle(scale).length;\n this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length);\n let msg = utils.wordWrap(message, { width: this.widths[0], newline });\n let lines = msg.split('\\n').map(line => pad(line) + this.margin[1]);\n\n if (focused) {\n scale = this.styles.info(scale);\n lines = lines.map(line => this.styles.info(line));\n }\n\n lines[0] += scale;\n\n if (this.linebreak) lines.push('');\n return [ind + pointer, lines.join('\\n')].filter(Boolean);\n }\n\n async renderChoices() {\n if (this.state.submitted) return '';\n this.tableize();\n let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i));\n let visible = await Promise.all(choices);\n let heading = await this.renderScaleHeading();\n return this.margin[0] + [heading, ...visible.map(v => v.join(' '))].join('\\n');\n }\n\n async render() {\n let { submitted, size } = this.state;\n\n let prefix = await this.prefix();\n let separator = await this.separator();\n let message = await this.message();\n\n let prompt = '';\n if (this.options.promptLine !== false) {\n prompt = [prefix, message, separator, ''].join(' ');\n this.state.prompt = prompt;\n }\n\n let header = await this.header();\n let output = await this.format();\n let key = await this.renderScaleKey();\n let help = await this.error() || await this.hint();\n let body = await this.renderChoices();\n let footer = await this.footer();\n let err = this.emptyError;\n\n if (output) prompt += output;\n if (help && !prompt.includes(help)) prompt += ' ' + help;\n\n if (submitted && !output && !body.trim() && this.multiple && err != null) {\n prompt += this.styles.danger(err);\n }\n\n this.clear(size);\n this.write([header, prompt, key, body, footer].filter(Boolean).join('\\n'));\n if (!this.state.submitted) {\n this.write(this.margin[2]);\n }\n this.restore();\n }\n\n submit() {\n this.value = {};\n for (let choice of this.choices) {\n this.value[choice.name] = choice.scaleIndex;\n }\n return this.base.submit.call(this);\n }\n}\n\nmodule.exports = LikertScale;\n","'use strict';\n\nconst ArrayPrompt = require('../types/array');\nconst utils = require('../utils');\n\nclass SelectPrompt extends ArrayPrompt {\n constructor(options) {\n super(options);\n this.emptyError = this.options.emptyError || 'No items were selected';\n }\n\n async dispatch(s, key) {\n if (this.multiple) {\n return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key);\n }\n this.alert();\n }\n\n separator() {\n if (this.options.separator) return super.separator();\n let sep = this.styles.muted(this.symbols.ellipsis);\n return this.state.submitted ? super.separator() : sep;\n }\n\n pointer(choice, i) {\n return (!this.multiple || this.options.pointer) ? super.pointer(choice, i) : '';\n }\n\n indicator(choice, i) {\n return this.multiple ? super.indicator(choice, i) : '';\n }\n\n choiceMessage(choice, i) {\n let message = this.resolve(choice.message, this.state, choice, i);\n if (choice.role === 'heading' && !utils.hasColor(message)) {\n message = this.styles.strong(message);\n }\n return this.resolve(message, this.state, choice, i);\n }\n\n choiceSeparator() {\n return ':';\n }\n\n async renderChoice(choice, i) {\n await this.onChoice(choice, i);\n\n let focused = this.index === i;\n let pointer = await this.pointer(choice, i);\n let check = await this.indicator(choice, i) + (choice.pad || '');\n let hint = await this.resolve(choice.hint, this.state, choice, i);\n\n if (hint && !utils.hasColor(hint)) {\n hint = this.styles.muted(hint);\n }\n\n let ind = this.indent(choice);\n let msg = await this.choiceMessage(choice, i);\n let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(' ');\n\n if (choice.role === 'heading') {\n return line();\n }\n\n if (choice.disabled) {\n if (!utils.hasColor(msg)) {\n msg = this.styles.disabled(msg);\n }\n return line();\n }\n\n if (focused) {\n msg = this.styles.em(msg);\n }\n\n return line();\n }\n\n async renderChoices() {\n if (this.state.loading === 'choices') {\n return this.styles.warning('Loading choices');\n }\n\n if (this.state.submitted) return '';\n let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i));\n let visible = await Promise.all(choices);\n if (!visible.length) visible.push(this.styles.danger('No matching choices'));\n let result = this.margin[0] + visible.join('\\n');\n let header;\n\n if (this.options.choicesHeader) {\n header = await this.resolve(this.options.choicesHeader, this.state);\n }\n\n return [header, result].filter(Boolean).join('\\n');\n }\n\n format() {\n if (!this.state.submitted || this.state.cancelled) return '';\n if (Array.isArray(this.selected)) {\n return this.selected.map(choice => this.styles.primary(choice.name)).join(', ');\n }\n return this.styles.primary(this.selected.name);\n }\n\n async render() {\n let { submitted, size } = this.state;\n\n let prompt = '';\n let header = await this.header();\n let prefix = await this.prefix();\n let separator = await this.separator();\n let message = await this.message();\n\n if (this.options.promptLine !== false) {\n prompt = [prefix, message, separator, ''].join(' ');\n this.state.prompt = prompt;\n }\n\n let output = await this.format();\n let help = (await this.error()) || (await this.hint());\n let body = await this.renderChoices();\n let footer = await this.footer();\n\n if (output) prompt += output;\n if (help && !prompt.includes(help)) prompt += ' ' + help;\n\n if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) {\n prompt += this.styles.danger(this.emptyError);\n }\n\n this.clear(size);\n this.write([header, prompt, body, footer].filter(Boolean).join('\\n'));\n this.write(this.margin[2]);\n this.restore();\n }\n}\n\nmodule.exports = SelectPrompt;\n","'use strict';\n\nconst colors = require('ansi-colors');\nconst interpolate = require('../interpolate');\nconst Prompt = require('../prompt');\n\nclass SnippetPrompt extends Prompt {\n constructor(options) {\n super(options);\n this.cursorHide();\n this.reset(true);\n }\n\n async initialize() {\n this.interpolate = await interpolate(this);\n await super.initialize();\n }\n\n async reset(first) {\n this.state.keys = [];\n this.state.invalid = new Map();\n this.state.missing = new Set();\n this.state.completed = 0;\n this.state.values = {};\n\n if (first !== true) {\n await this.initialize();\n await this.render();\n }\n }\n\n moveCursor(n) {\n let item = this.getItem();\n this.cursor += n;\n item.cursor += n;\n }\n\n dispatch(ch, key) {\n if (!key.code && !key.ctrl && ch != null && this.getItem()) {\n this.append(ch, key);\n return;\n }\n this.alert();\n }\n\n append(ch, key) {\n let item = this.getItem();\n let prefix = item.input.slice(0, this.cursor);\n let suffix = item.input.slice(this.cursor);\n this.input = item.input = `${prefix}${ch}${suffix}`;\n this.moveCursor(1);\n this.render();\n }\n\n delete() {\n let item = this.getItem();\n if (this.cursor <= 0 || !item.input) return this.alert();\n let suffix = item.input.slice(this.cursor);\n let prefix = item.input.slice(0, this.cursor - 1);\n this.input = item.input = `${prefix}${suffix}`;\n this.moveCursor(-1);\n this.render();\n }\n\n increment(i) {\n return i >= this.state.keys.length - 1 ? 0 : i + 1;\n }\n\n decrement(i) {\n return i <= 0 ? this.state.keys.length - 1 : i - 1;\n }\n\n first() {\n this.state.index = 0;\n this.render();\n }\n\n last() {\n this.state.index = this.state.keys.length - 1;\n this.render();\n }\n\n right() {\n if (this.cursor >= this.input.length) return this.alert();\n this.moveCursor(1);\n this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.alert();\n this.moveCursor(-1);\n this.render();\n }\n\n prev() {\n this.state.index = this.decrement(this.state.index);\n this.getItem();\n this.render();\n }\n\n next() {\n this.state.index = this.increment(this.state.index);\n this.getItem();\n this.render();\n }\n\n up() {\n this.prev();\n }\n\n down() {\n this.next();\n }\n\n format(value) {\n let color = this.state.completed < 100 ? this.styles.warning : this.styles.success;\n if (this.state.submitted === true && this.state.completed !== 100) {\n color = this.styles.danger;\n }\n return color(`${this.state.completed}% completed`);\n }\n\n async render() {\n let { index, keys = [], submitted, size } = this.state;\n\n let newline = [this.options.newline, '\\n'].find(v => v != null);\n let prefix = await this.prefix();\n let separator = await this.separator();\n let message = await this.message();\n\n let prompt = [prefix, message, separator].filter(Boolean).join(' ');\n this.state.prompt = prompt;\n\n let header = await this.header();\n let error = (await this.error()) || '';\n let hint = (await this.hint()) || '';\n let body = submitted ? '' : await this.interpolate(this.state);\n\n let key = this.state.key = keys[index] || '';\n let input = await this.format(key);\n let footer = await this.footer();\n if (input) prompt += ' ' + input;\n if (hint && !input && this.state.completed === 0) prompt += ' ' + hint;\n\n this.clear(size);\n let lines = [header, prompt, body, footer, error.trim()];\n this.write(lines.filter(Boolean).join(newline));\n this.restore();\n }\n\n getItem(name) {\n let { items, keys, index } = this.state;\n let item = items.find(ch => ch.name === keys[index]);\n if (item && item.input != null) {\n this.input = item.input;\n this.cursor = item.cursor;\n }\n return item;\n }\n\n async submit() {\n if (typeof this.interpolate !== 'function') await this.initialize();\n await this.interpolate(this.state, true);\n\n let { invalid, missing, output, values } = this.state;\n if (invalid.size) {\n let err = '';\n for (let [key, value] of invalid) err += `Invalid ${key}: ${value}\\n`;\n this.state.error = err;\n return super.submit();\n }\n\n if (missing.size) {\n this.state.error = 'Required: ' + [...missing.keys()].join(', ');\n return super.submit();\n }\n\n let lines = colors.unstyle(output).split('\\n');\n let result = lines.map(v => v.slice(1)).join('\\n');\n this.value = { values, result };\n return super.submit();\n }\n}\n\nmodule.exports = SnippetPrompt;\n","'use strict';\n\nconst hint = '(Use <shift>+<up/down> to sort)';\nconst Prompt = require('./select');\n\nclass Sort extends Prompt {\n constructor(options) {\n super({ ...options, reorder: false, sort: true, multiple: true });\n this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this));\n }\n\n indicator() {\n return '';\n }\n\n async renderChoice(choice, i) {\n let str = await super.renderChoice(choice, i);\n let sym = this.symbols.identicalTo + ' ';\n let pre = (this.index === i && this.sorting) ? this.styles.muted(sym) : ' ';\n if (this.options.drag === false) pre = '';\n if (this.options.numbered === true) {\n return pre + `${i + 1} - ` + str;\n }\n return pre + str;\n }\n\n get selected() {\n return this.choices;\n }\n\n submit() {\n this.value = this.choices.map(choice => choice.value);\n return super.submit();\n }\n}\n\nmodule.exports = Sort;\n","'use strict';\n\nconst ArrayPrompt = require('../types/array');\n\nclass Survey extends ArrayPrompt {\n constructor(options = {}) {\n super(options);\n this.emptyError = options.emptyError || 'No items were selected';\n this.term = process.env.TERM_PROGRAM;\n\n if (!this.options.header) {\n let header = ['', '4 - Strongly Agree', '3 - Agree', '2 - Neutral', '1 - Disagree', '0 - Strongly Disagree', ''];\n header = header.map(ele => this.styles.muted(ele));\n this.state.header = header.join('\\n ');\n }\n }\n\n async toChoices(...args) {\n if (this.createdScales) return false;\n this.createdScales = true;\n let choices = await super.toChoices(...args);\n for (let choice of choices) {\n choice.scale = createScale(5, this.options);\n choice.scaleIdx = 2;\n }\n return choices;\n }\n\n dispatch() {\n this.alert();\n }\n\n space() {\n let choice = this.focused;\n let ele = choice.scale[choice.scaleIdx];\n let selected = ele.selected;\n choice.scale.forEach(e => (e.selected = false));\n ele.selected = !selected;\n return this.render();\n }\n\n indicator() {\n return '';\n }\n\n pointer() {\n return '';\n }\n\n separator() {\n return this.styles.muted(this.symbols.ellipsis);\n }\n\n right() {\n let choice = this.focused;\n if (choice.scaleIdx >= choice.scale.length - 1) return this.alert();\n choice.scaleIdx++;\n return this.render();\n }\n\n left() {\n let choice = this.focused;\n if (choice.scaleIdx <= 0) return this.alert();\n choice.scaleIdx--;\n return this.render();\n }\n\n indent() {\n return ' ';\n }\n\n async renderChoice(item, i) {\n await this.onChoice(item, i);\n let focused = this.index === i;\n let isHyper = this.term === 'Hyper';\n let n = !isHyper ? 8 : 9;\n let s = !isHyper ? ' ' : '';\n let ln = this.symbols.line.repeat(n);\n let sp = ' '.repeat(n + (isHyper ? 0 : 1));\n let dot = enabled => (enabled ? this.styles.success('◉') : '◯') + s;\n\n let num = i + 1 + '.';\n let color = focused ? this.styles.heading : this.styles.noop;\n let msg = await this.resolve(item.message, this.state, item, i);\n let indent = this.indent(item);\n let scale = indent + item.scale.map((e, i) => dot(i === item.scaleIdx)).join(ln);\n let val = i => i === item.scaleIdx ? color(i) : i;\n let next = indent + item.scale.map((e, i) => val(i)).join(sp);\n\n let line = () => [num, msg].filter(Boolean).join(' ');\n let lines = () => [line(), scale, next, ' '].filter(Boolean).join('\\n');\n\n if (focused) {\n scale = this.styles.cyan(scale);\n next = this.styles.cyan(next);\n }\n\n return lines();\n }\n\n async renderChoices() {\n if (this.state.submitted) return '';\n let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i));\n let visible = await Promise.all(choices);\n if (!visible.length) visible.push(this.styles.danger('No matching choices'));\n return visible.join('\\n');\n }\n\n format() {\n if (this.state.submitted) {\n let values = this.choices.map(ch => this.styles.info(ch.scaleIdx));\n return values.join(', ');\n }\n return '';\n }\n\n async render() {\n let { submitted, size } = this.state;\n\n let prefix = await this.prefix();\n let separator = await this.separator();\n let message = await this.message();\n\n let prompt = [prefix, message, separator].filter(Boolean).join(' ');\n this.state.prompt = prompt;\n\n let header = await this.header();\n let output = await this.format();\n let help = await this.error() || await this.hint();\n let body = await this.renderChoices();\n let footer = await this.footer();\n\n if (output || !help) prompt += ' ' + output;\n if (help && !prompt.includes(help)) prompt += ' ' + help;\n\n if (submitted && !output && !body && this.multiple && this.type !== 'form') {\n prompt += this.styles.danger(this.emptyError);\n }\n\n this.clear(size);\n this.write([prompt, header, body, footer].filter(Boolean).join('\\n'));\n this.restore();\n }\n\n submit() {\n this.value = {};\n for (let choice of this.choices) {\n this.value[choice.name] = choice.scaleIdx;\n }\n return this.base.submit.call(this);\n }\n}\n\nfunction createScale(n, options = {}) {\n if (Array.isArray(options.scale)) {\n return options.scale.map(ele => ({ ...ele }));\n }\n let scale = [];\n for (let i = 1; i < n + 1; i++) scale.push({ i, selected: false });\n return scale;\n}\n\nmodule.exports = Survey;\n","module.exports = require('./input');\n","'use strict';\n\nconst BooleanPrompt = require('../types/boolean');\n\nclass TogglePrompt extends BooleanPrompt {\n async initialize() {\n await super.initialize();\n this.value = this.initial = !!this.options.initial;\n this.disabled = this.options.disabled || 'no';\n this.enabled = this.options.enabled || 'yes';\n await this.render();\n }\n\n reset() {\n this.value = this.initial;\n this.render();\n }\n\n delete() {\n this.alert();\n }\n\n toggle() {\n this.value = !this.value;\n this.render();\n }\n\n enable() {\n if (this.value === true) return this.alert();\n this.value = true;\n this.render();\n }\n disable() {\n if (this.value === false) return this.alert();\n this.value = false;\n this.render();\n }\n\n up() {\n this.toggle();\n }\n down() {\n this.toggle();\n }\n right() {\n this.toggle();\n }\n left() {\n this.toggle();\n }\n next() {\n this.toggle();\n }\n prev() {\n this.toggle();\n }\n\n dispatch(ch = '', key) {\n switch (ch.toLowerCase()) {\n case ' ':\n return this.toggle();\n case '1':\n case 'y':\n case 't':\n return this.enable();\n case '0':\n case 'n':\n case 'f':\n return this.disable();\n default: {\n return this.alert();\n }\n }\n }\n\n format() {\n let active = str => this.styles.primary.underline(str);\n let value = [\n this.value ? this.disabled : active(this.disabled),\n this.value ? active(this.enabled) : this.enabled\n ];\n return value.join(this.styles.muted(' / '));\n }\n\n async render() {\n let { size } = this.state;\n\n let header = await this.header();\n let prefix = await this.prefix();\n let separator = await this.separator();\n let message = await this.message();\n\n let output = await this.format();\n let help = (await this.error()) || (await this.hint());\n let footer = await this.footer();\n\n let prompt = [prefix, message, separator, output].join(' ');\n this.state.prompt = prompt;\n\n if (help && !prompt.includes(help)) prompt += ' ' + help;\n\n this.clear(size);\n this.write([header, prompt, footer].filter(Boolean).join('\\n'));\n this.write(this.margin[2]);\n this.restore();\n }\n}\n\nmodule.exports = TogglePrompt;\n","'use strict';\n\nconst utils = require('./utils');\nconst roles = {\n default(prompt, choice) {\n return choice;\n },\n checkbox(prompt, choice) {\n throw new Error('checkbox role is not implemented yet');\n },\n editable(prompt, choice) {\n throw new Error('editable role is not implemented yet');\n },\n expandable(prompt, choice) {\n throw new Error('expandable role is not implemented yet');\n },\n heading(prompt, choice) {\n choice.disabled = '';\n choice.indicator = [choice.indicator, ' '].find(v => v != null);\n choice.message = choice.message || '';\n return choice;\n },\n input(prompt, choice) {\n throw new Error('input role is not implemented yet');\n },\n option(prompt, choice) {\n return roles.default(prompt, choice);\n },\n radio(prompt, choice) {\n throw new Error('radio role is not implemented yet');\n },\n separator(prompt, choice) {\n choice.disabled = '';\n choice.indicator = [choice.indicator, ' '].find(v => v != null);\n choice.message = choice.message || prompt.symbols.line.repeat(5);\n return choice;\n },\n spacer(prompt, choice) {\n return choice;\n }\n};\n\nmodule.exports = (name, options = {}) => {\n let role = utils.merge({}, roles, options.roles);\n return role[name] || role.default;\n};\n","'use strict';\n\nconst { define, width } = require('./utils');\n\nclass State {\n constructor(prompt) {\n let options = prompt.options;\n define(this, '_prompt', prompt);\n this.type = prompt.type;\n this.name = prompt.name;\n this.message = '';\n this.header = '';\n this.footer = '';\n this.error = '';\n this.hint = '';\n this.input = '';\n this.cursor = 0;\n this.index = 0;\n this.lines = 0;\n this.tick = 0;\n this.prompt = '';\n this.buffer = '';\n this.width = width(options.stdout || process.stdout);\n Object.assign(this, options);\n this.name = this.name || this.message;\n this.message = this.message || this.name;\n this.symbols = prompt.symbols;\n this.styles = prompt.styles;\n this.required = new Set();\n this.cancelled = false;\n this.submitted = false;\n }\n\n clone() {\n let state = { ...this };\n state.status = this.status;\n state.buffer = Buffer.from(state.buffer);\n delete state.clone;\n return state;\n }\n\n set color(val) {\n this._color = val;\n }\n get color() {\n let styles = this.prompt.styles;\n if (this.cancelled) return styles.cancelled;\n if (this.submitted) return styles.submitted;\n let color = this._color || styles[this.status];\n return typeof color === 'function' ? color : styles.pending;\n }\n\n set loading(value) {\n this._loading = value;\n }\n get loading() {\n if (typeof this._loading === 'boolean') return this._loading;\n if (this.loadingChoices) return 'choices';\n return false;\n }\n\n get status() {\n if (this.cancelled) return 'cancelled';\n if (this.submitted) return 'submitted';\n return 'pending';\n }\n}\n\nmodule.exports = State;\n","'use strict';\n\nconst utils = require('./utils');\nconst colors = require('ansi-colors');\n\nconst styles = {\n default: colors.noop,\n noop: colors.noop,\n\n /**\n * Modifiers\n */\n\n set inverse(custom) {\n this._inverse = custom;\n },\n get inverse() {\n return this._inverse || utils.inverse(this.primary);\n },\n\n set complement(custom) {\n this._complement = custom;\n },\n get complement() {\n return this._complement || utils.complement(this.primary);\n },\n\n /**\n * Main color\n */\n\n primary: colors.cyan,\n\n /**\n * Main palette\n */\n\n success: colors.green,\n danger: colors.magenta,\n strong: colors.bold,\n warning: colors.yellow,\n muted: colors.dim,\n disabled: colors.gray,\n dark: colors.dim.gray,\n underline: colors.underline,\n\n set info(custom) {\n this._info = custom;\n },\n get info() {\n return this._info || this.primary;\n },\n\n set em(custom) {\n this._em = custom;\n },\n get em() {\n return this._em || this.primary.underline;\n },\n\n set heading(custom) {\n this._heading = custom;\n },\n get heading() {\n return this._heading || this.muted.underline;\n },\n\n /**\n * Statuses\n */\n\n set pending(custom) {\n this._pending = custom;\n },\n get pending() {\n return this._pending || this.primary;\n },\n\n set submitted(custom) {\n this._submitted = custom;\n },\n get submitted() {\n return this._submitted || this.success;\n },\n\n set cancelled(custom) {\n this._cancelled = custom;\n },\n get cancelled() {\n return this._cancelled || this.danger;\n },\n\n /**\n * Special styling\n */\n\n set typing(custom) {\n this._typing = custom;\n },\n get typing() {\n return this._typing || this.dim;\n },\n\n set placeholder(custom) {\n this._placeholder = custom;\n },\n get placeholder() {\n return this._placeholder || this.primary.dim;\n },\n\n set highlight(custom) {\n this._highlight = custom;\n },\n get highlight() {\n return this._highlight || this.inverse;\n }\n};\n\nstyles.merge = (options = {}) => {\n if (options.styles && typeof options.styles.enabled === 'boolean') {\n colors.enabled = options.styles.enabled;\n }\n if (options.styles && typeof options.styles.visible === 'boolean') {\n colors.visible = options.styles.visible;\n }\n\n let result = utils.merge({}, styles, options.styles);\n delete result.merge;\n\n for (let key of Object.keys(colors)) {\n if (!result.hasOwnProperty(key)) {\n Reflect.defineProperty(result, key, { get: () => colors[key] });\n }\n }\n\n for (let key of Object.keys(colors.styles)) {\n if (!result.hasOwnProperty(key)) {\n Reflect.defineProperty(result, key, { get: () => colors[key] });\n }\n }\n return result;\n};\n\nmodule.exports = styles;\n","'use strict';\n\nconst isWindows = process.platform === 'win32';\nconst colors = require('ansi-colors');\nconst utils = require('./utils');\n\nconst symbols = {\n ...colors.symbols,\n upDownDoubleArrow: '⇕',\n upDownDoubleArrow2: '⬍',\n upDownArrow: '↕',\n asterisk: '*',\n asterism: '⁂',\n bulletWhite: '◦',\n electricArrow: '⌁',\n ellipsisLarge: '⋯',\n ellipsisSmall: '…',\n fullBlock: '█',\n identicalTo: '≡',\n indicator: colors.symbols.check,\n leftAngle: '',\n mark: '※',\n minus: '',\n multiplication: '×',\n obelus: '÷',\n percent: '%',\n pilcrow: '¶',\n pilcrow2: '❡',\n pencilUpRight: '✐',\n pencilDownRight: '✎',\n pencilRight: '✏',\n plus: '+',\n plusMinus: '±',\n pointRight: '☞',\n rightAngle: '',\n section: '§',\n hexagon: { off: '⬡', on: '⬢', disabled: '⬢' },\n ballot: { on: '☑', off: '☐', disabled: '☒' },\n stars: { on: '★', off: '☆', disabled: '☆' },\n folder: { on: '▼', off: '▶', disabled: '▶' },\n prefix: {\n pending: colors.symbols.question,\n submitted: colors.symbols.check,\n cancelled: colors.symbols.cross\n },\n separator: {\n pending: colors.symbols.pointerSmall,\n submitted: colors.symbols.middot,\n cancelled: colors.symbols.middot\n },\n radio: {\n off: isWindows ? '( )' : '◯',\n on: isWindows ? '(*)' : '◉',\n disabled: isWindows ? '(|)' : 'Ⓘ'\n },\n numbers: ['⓪', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳', '㉑', '㉒', '㉓', '㉔', '㉕', '㉖', '㉗', '㉘', '㉙', '㉚', '㉛', '㉜', '㉝', '㉞', '㉟', '㊱', '㊲', '㊳', '㊴', '㊵', '㊶', '㊷', '㊸', '㊹', '㊺', '㊻', '㊼', '㊽', '㊾', '㊿']\n};\n\nsymbols.merge = options => {\n let result = utils.merge({}, colors.symbols, symbols, options.symbols);\n delete result.merge;\n return result;\n};\n\nmodule.exports = symbols;\n\n","'use strict';\n\nconst styles = require('./styles');\nconst symbols = require('./symbols');\nconst utils = require('./utils');\n\nmodule.exports = prompt => {\n prompt.options = utils.merge({}, prompt.options.theme, prompt.options);\n prompt.symbols = symbols.merge(prompt.options);\n prompt.styles = styles.merge(prompt.options);\n};\n","'use strict';\n\nmodule.exports = prompt => {\n prompt.timers = prompt.timers || {};\n\n let timers = prompt.options.timers;\n if (!timers) return;\n\n for (let key of Object.keys(timers)) {\n let opts = timers[key];\n if (typeof opts === 'number') {\n opts = { interval: opts };\n }\n create(prompt, key, opts);\n }\n};\n\nfunction create(prompt, name, options = {}) {\n let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 };\n let ms = options.interval || 120;\n timer.frames = options.frames || [];\n timer.loading = true;\n\n let interval = setInterval(() => {\n timer.ms = Date.now() - timer.start;\n timer.tick++;\n prompt.render();\n }, ms);\n\n timer.stop = () => {\n timer.loading = false;\n clearInterval(interval);\n };\n\n Reflect.defineProperty(timer, 'interval', { value: interval });\n prompt.once('close', () => timer.stop());\n return timer.stop;\n}\n","'use strict';\n\nconst colors = require('ansi-colors');\nconst Prompt = require('../prompt');\nconst roles = require('../roles');\nconst utils = require('../utils');\nconst { reorder, scrollUp, scrollDown, isObject, swap } = utils;\n\nclass ArrayPrompt extends Prompt {\n constructor(options) {\n super(options);\n this.cursorHide();\n this.maxSelected = options.maxSelected || Infinity;\n this.multiple = options.multiple || false;\n this.initial = options.initial || 0;\n this.delay = options.delay || 0;\n this.longest = 0;\n this.num = '';\n }\n\n async initialize() {\n if (typeof this.options.initial === 'function') {\n this.initial = await this.options.initial.call(this);\n }\n await this.reset(true);\n await super.initialize();\n }\n\n async reset() {\n let { choices, initial, autofocus, suggest } = this.options;\n this.state._choices = [];\n this.state.choices = [];\n\n this.choices = await Promise.all(await this.toChoices(choices));\n this.choices.forEach(ch => (ch.enabled = false));\n\n if (typeof suggest !== 'function' && this.selectable.length === 0) {\n throw new Error('At least one choice must be selectable');\n }\n\n if (isObject(initial)) initial = Object.keys(initial);\n if (Array.isArray(initial)) {\n if (autofocus != null) this.index = this.findIndex(autofocus);\n initial.forEach(v => this.enable(this.find(v)));\n await this.render();\n } else {\n if (autofocus != null) initial = autofocus;\n if (typeof initial === 'string') initial = this.findIndex(initial);\n if (typeof initial === 'number' && initial > -1) {\n this.index = Math.max(0, Math.min(initial, this.choices.length));\n this.enable(this.find(this.index));\n }\n }\n\n if (this.isDisabled(this.focused)) {\n await this.down();\n }\n }\n\n async toChoices(value, parent) {\n this.state.loadingChoices = true;\n let choices = [];\n let index = 0;\n\n let toChoices = async(items, parent) => {\n if (typeof items === 'function') items = await items.call(this);\n if (items instanceof Promise) items = await items;\n\n for (let i = 0; i < items.length; i++) {\n let choice = items[i] = await this.toChoice(items[i], index++, parent);\n choices.push(choice);\n\n if (choice.choices) {\n await toChoices(choice.choices, choice);\n }\n }\n return choices;\n };\n\n return toChoices(value, parent)\n .then(choices => {\n this.state.loadingChoices = false;\n return choices;\n });\n }\n\n async toChoice(ele, i, parent) {\n if (typeof ele === 'function') ele = await ele.call(this, this);\n if (ele instanceof Promise) ele = await ele;\n if (typeof ele === 'string') ele = { name: ele };\n\n if (ele.normalized) return ele;\n ele.normalized = true;\n\n let origVal = ele.value;\n let role = roles(ele.role, this.options);\n ele = role(this, ele);\n\n if (typeof ele.disabled === 'string' && !ele.hint) {\n ele.hint = ele.disabled;\n ele.disabled = true;\n }\n\n if (ele.disabled === true && ele.hint == null) {\n ele.hint = '(disabled)';\n }\n\n // if the choice was already normalized, return it\n if (ele.index != null) return ele;\n ele.name = ele.name || ele.key || ele.title || ele.value || ele.message;\n ele.message = ele.message || ele.name || '';\n ele.value = [ele.value, ele.name].find(this.isValue.bind(this));\n\n ele.input = '';\n ele.index = i;\n ele.cursor = 0;\n\n utils.define(ele, 'parent', parent);\n ele.level = parent ? parent.level + 1 : 1;\n if (ele.indent == null) {\n ele.indent = parent ? parent.indent + ' ' : (ele.indent || '');\n }\n\n ele.path = parent ? parent.path + '.' + ele.name : ele.name;\n ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele)));\n\n if (!this.isDisabled(ele)) {\n this.longest = Math.max(this.longest, colors.unstyle(ele.message).length);\n }\n\n // shallow clone the choice first\n let choice = { ...ele };\n\n // then allow the choice to be reset using the \"original\" values\n ele.reset = (input = choice.input, value = choice.value) => {\n for (let key of Object.keys(choice)) ele[key] = choice[key];\n ele.input = input;\n ele.value = value;\n };\n\n if (origVal == null && typeof ele.initial === 'function') {\n ele.input = await ele.initial.call(this, this.state, ele, i);\n }\n\n return ele;\n }\n\n async onChoice(choice, i) {\n this.emit('choice', choice, i, this);\n\n if (typeof choice.onChoice === 'function') {\n await choice.onChoice.call(this, this.state, choice, i);\n }\n }\n\n async addChoice(ele, i, parent) {\n let choice = await this.toChoice(ele, i, parent);\n this.choices.push(choice);\n this.index = this.choices.length - 1;\n this.limit = this.choices.length;\n return choice;\n }\n\n async newItem(item, i, parent) {\n let ele = { name: 'New choice name?', editable: true, newChoice: true, ...item };\n let choice = await this.addChoice(ele, i, parent);\n\n choice.updateChoice = () => {\n delete choice.newChoice;\n choice.name = choice.message = choice.input;\n choice.input = '';\n choice.cursor = 0;\n };\n\n return this.render();\n }\n\n indent(choice) {\n if (choice.indent == null) {\n return choice.level > 1 ? ' '.repeat(choice.level - 1) : '';\n }\n return choice.indent;\n }\n\n dispatch(s, key) {\n if (this.multiple && this[key.name]) return this[key.name]();\n this.alert();\n }\n\n focus(choice, enabled) {\n if (typeof enabled !== 'boolean') enabled = choice.enabled;\n if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) {\n return this.alert();\n }\n this.index = choice.index;\n choice.enabled = enabled && !this.isDisabled(choice);\n return choice;\n }\n\n space() {\n if (!this.multiple) return this.alert();\n this.toggle(this.focused);\n return this.render();\n }\n\n a() {\n if (this.maxSelected < this.choices.length) return this.alert();\n let enabled = this.selectable.every(ch => ch.enabled);\n this.choices.forEach(ch => (ch.enabled = !enabled));\n return this.render();\n }\n\n i() {\n // don't allow choices to be inverted if it will result in\n // more than the maximum number of allowed selected items.\n if (this.choices.length - this.selected.length > this.maxSelected) {\n return this.alert();\n }\n this.choices.forEach(ch => (ch.enabled = !ch.enabled));\n return this.render();\n }\n\n g(choice = this.focused) {\n if (!this.choices.some(ch => !!ch.parent)) return this.a();\n this.toggle((choice.parent && !choice.choices) ? choice.parent : choice);\n return this.render();\n }\n\n toggle(choice, enabled) {\n if (!choice.enabled && this.selected.length >= this.maxSelected) {\n return this.alert();\n }\n\n if (typeof enabled !== 'boolean') enabled = !choice.enabled;\n choice.enabled = enabled;\n\n if (choice.choices) {\n choice.choices.forEach(ch => this.toggle(ch, enabled));\n }\n\n let parent = choice.parent;\n while (parent) {\n let choices = parent.choices.filter(ch => this.isDisabled(ch));\n parent.enabled = choices.every(ch => ch.enabled === true);\n parent = parent.parent;\n }\n\n reset(this, this.choices);\n this.emit('toggle', choice, this);\n return choice;\n }\n\n enable(choice) {\n if (this.selected.length >= this.maxSelected) return this.alert();\n choice.enabled = !this.isDisabled(choice);\n choice.choices && choice.choices.forEach(this.enable.bind(this));\n return choice;\n }\n\n disable(choice) {\n choice.enabled = false;\n choice.choices && choice.choices.forEach(this.disable.bind(this));\n return choice;\n }\n\n number(n) {\n this.num += n;\n\n let number = num => {\n let i = Number(num);\n if (i > this.choices.length - 1) return this.alert();\n\n let focused = this.focused;\n let choice = this.choices.find(ch => i === ch.index);\n\n if (!choice.enabled && this.selected.length >= this.maxSelected) {\n return this.alert();\n }\n\n if (this.visible.indexOf(choice) === -1) {\n let choices = reorder(this.choices);\n let actualIdx = choices.indexOf(choice);\n\n if (focused.index > actualIdx) {\n let start = choices.slice(actualIdx, actualIdx + this.limit);\n let end = choices.filter(ch => !start.includes(ch));\n this.choices = start.concat(end);\n } else {\n let pos = actualIdx - this.limit + 1;\n this.choices = choices.slice(pos).concat(choices.slice(0, pos));\n }\n }\n\n this.index = this.choices.indexOf(choice);\n this.toggle(this.focused);\n return this.render();\n };\n\n clearTimeout(this.numberTimeout);\n\n return new Promise(resolve => {\n let len = this.choices.length;\n let num = this.num;\n\n let handle = (val = false, res) => {\n clearTimeout(this.numberTimeout);\n if (val) res = number(num);\n this.num = '';\n resolve(res);\n };\n\n if (num === '0' || (num.length === 1 && Number(num + '0') > len)) {\n return handle(true);\n }\n\n if (Number(num) > len) {\n return handle(false, this.alert());\n }\n\n this.numberTimeout = setTimeout(() => handle(true), this.delay);\n });\n }\n\n home() {\n this.choices = reorder(this.choices);\n this.index = 0;\n return this.render();\n }\n\n end() {\n let pos = this.choices.length - this.limit;\n let choices = reorder(this.choices);\n this.choices = choices.slice(pos).concat(choices.slice(0, pos));\n this.index = this.limit - 1;\n return this.render();\n }\n\n first() {\n this.index = 0;\n return this.render();\n }\n\n last() {\n this.index = this.visible.length - 1;\n return this.render();\n }\n\n prev() {\n if (this.visible.length <= 1) return this.alert();\n return this.up();\n }\n\n next() {\n if (this.visible.length <= 1) return this.alert();\n return this.down();\n }\n\n right() {\n if (this.cursor >= this.input.length) return this.alert();\n this.cursor++;\n return this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.alert();\n this.cursor--;\n return this.render();\n }\n\n up() {\n let len = this.choices.length;\n let vis = this.visible.length;\n let idx = this.index;\n if (this.options.scroll === false && idx === 0) {\n return this.alert();\n }\n if (len > vis && idx === 0) {\n return this.scrollUp();\n }\n this.index = ((idx - 1 % len) + len) % len;\n if (this.isDisabled()) {\n return this.up();\n }\n return this.render();\n }\n\n down() {\n let len = this.choices.length;\n let vis = this.visible.length;\n let idx = this.index;\n if (this.options.scroll === false && idx === vis - 1) {\n return this.alert();\n }\n if (len > vis && idx === vis - 1) {\n return this.scrollDown();\n }\n this.index = (idx + 1) % len;\n if (this.isDisabled()) {\n return this.down();\n }\n return this.render();\n }\n\n scrollUp(i = 0) {\n this.choices = scrollUp(this.choices);\n this.index = i;\n if (this.isDisabled()) {\n return this.up();\n }\n return this.render();\n }\n\n scrollDown(i = this.visible.length - 1) {\n this.choices = scrollDown(this.choices);\n this.index = i;\n if (this.isDisabled()) {\n return this.down();\n }\n return this.render();\n }\n\n async shiftUp() {\n if (this.options.sort === true) {\n this.sorting = true;\n this.swap(this.index - 1);\n await this.up();\n this.sorting = false;\n return;\n }\n return this.scrollUp(this.index);\n }\n\n async shiftDown() {\n if (this.options.sort === true) {\n this.sorting = true;\n this.swap(this.index + 1);\n await this.down();\n this.sorting = false;\n return;\n }\n return this.scrollDown(this.index);\n }\n\n pageUp() {\n if (this.visible.length <= 1) return this.alert();\n this.limit = Math.max(this.limit - 1, 0);\n this.index = Math.min(this.limit - 1, this.index);\n this._limit = this.limit;\n if (this.isDisabled()) {\n return this.up();\n }\n return this.render();\n }\n\n pageDown() {\n if (this.visible.length >= this.choices.length) return this.alert();\n this.index = Math.max(0, this.index);\n this.limit = Math.min(this.limit + 1, this.choices.length);\n this._limit = this.limit;\n if (this.isDisabled()) {\n return this.down();\n }\n return this.render();\n }\n\n swap(pos) {\n swap(this.choices, this.index, pos);\n }\n\n isDisabled(choice = this.focused) {\n let keys = ['disabled', 'collapsed', 'hidden', 'completing', 'readonly'];\n if (choice && keys.some(key => choice[key] === true)) {\n return true;\n }\n return choice && choice.role === 'heading';\n }\n\n isEnabled(choice = this.focused) {\n if (Array.isArray(choice)) return choice.every(ch => this.isEnabled(ch));\n if (choice.choices) {\n let choices = choice.choices.filter(ch => !this.isDisabled(ch));\n return choice.enabled && choices.every(ch => this.isEnabled(ch));\n }\n return choice.enabled && !this.isDisabled(choice);\n }\n\n isChoice(choice, value) {\n return choice.name === value || choice.index === Number(value);\n }\n\n isSelected(choice) {\n if (Array.isArray(this.initial)) {\n return this.initial.some(value => this.isChoice(choice, value));\n }\n return this.isChoice(choice, this.initial);\n }\n\n map(names = [], prop = 'value') {\n return [].concat(names || []).reduce((acc, name) => {\n acc[name] = this.find(name, prop);\n return acc;\n }, {});\n }\n\n filter(value, prop) {\n let isChoice = (ele, i) => [ele.name, i].includes(value);\n let fn = typeof value === 'function' ? value : isChoice;\n let choices = this.options.multiple ? this.state._choices : this.choices;\n let result = choices.filter(fn);\n if (prop) {\n return result.map(ch => ch[prop]);\n }\n return result;\n }\n\n find(value, prop) {\n if (isObject(value)) return prop ? value[prop] : value;\n let isChoice = (ele, i) => [ele.name, i].includes(value);\n let fn = typeof value === 'function' ? value : isChoice;\n let choice = this.choices.find(fn);\n if (choice) {\n return prop ? choice[prop] : choice;\n }\n }\n\n findIndex(value) {\n return this.choices.indexOf(this.find(value));\n }\n\n async submit() {\n let choice = this.focused;\n if (!choice) return this.alert();\n\n if (choice.newChoice) {\n if (!choice.input) return this.alert();\n choice.updateChoice();\n return this.render();\n }\n\n if (this.choices.some(ch => ch.newChoice)) {\n return this.alert();\n }\n\n let { reorder, sort } = this.options;\n let multi = this.multiple === true;\n let value = this.selected;\n if (value === void 0) {\n return this.alert();\n }\n\n // re-sort choices to original order\n if (Array.isArray(value) && reorder !== false && sort !== true) {\n value = utils.reorder(value);\n }\n\n this.value = multi ? value.map(ch => ch.name) : value.name;\n return super.submit();\n }\n\n set choices(choices = []) {\n this.state._choices = this.state._choices || [];\n this.state.choices = choices;\n\n for (let choice of choices) {\n if (!this.state._choices.some(ch => ch.name === choice.name)) {\n this.state._choices.push(choice);\n }\n }\n\n if (!this._initial && this.options.initial) {\n this._initial = true;\n let init = this.initial;\n if (typeof init === 'string' || typeof init === 'number') {\n let choice = this.find(init);\n if (choice) {\n this.initial = choice.index;\n this.focus(choice, true);\n }\n }\n }\n }\n get choices() {\n return reset(this, this.state.choices || []);\n }\n\n set visible(visible) {\n this.state.visible = visible;\n }\n get visible() {\n return (this.state.visible || this.choices).slice(0, this.limit);\n }\n\n set limit(num) {\n this.state.limit = num;\n }\n get limit() {\n let { state, options, choices } = this;\n let limit = state.limit || this._limit || options.limit || choices.length;\n return Math.min(limit, this.height);\n }\n\n set value(value) {\n super.value = value;\n }\n get value() {\n if (typeof super.value !== 'string' && super.value === this.initial) {\n return this.input;\n }\n return super.value;\n }\n\n set index(i) {\n this.state.index = i;\n }\n get index() {\n return Math.max(0, this.state ? this.state.index : 0);\n }\n\n get enabled() {\n return this.filter(this.isEnabled.bind(this));\n }\n\n get focused() {\n let choice = this.choices[this.index];\n if (choice && this.state.submitted && this.multiple !== true) {\n choice.enabled = true;\n }\n return choice;\n }\n\n get selectable() {\n return this.choices.filter(choice => !this.isDisabled(choice));\n }\n\n get selected() {\n return this.multiple ? this.enabled : this.focused;\n }\n}\n\nfunction reset(prompt, choices) {\n if (choices instanceof Promise) return choices;\n if (typeof choices === 'function') {\n if (utils.isAsyncFn(choices)) return choices;\n choices = choices.call(prompt, prompt);\n }\n for (let choice of choices) {\n if (Array.isArray(choice.choices)) {\n let items = choice.choices.filter(ch => !prompt.isDisabled(ch));\n choice.enabled = items.every(ch => ch.enabled === true);\n }\n if (prompt.isDisabled(choice) === true) {\n delete choice.enabled;\n }\n }\n return choices;\n}\n\nmodule.exports = ArrayPrompt;\n","'use strict';\n\nconst FormPrompt = require('../prompts/form');\n\nconst defaultAuthenticate = () => {\n throw new Error('expected prompt to have a custom authenticate method');\n};\n\nconst factory = (authenticate = defaultAuthenticate) => {\n\n class AuthPrompt extends FormPrompt {\n constructor(options) {\n super(options);\n }\n\n async submit() {\n this.value = await authenticate.call(this, this.values, this.state);\n super.base.submit.call(this);\n }\n\n static create(authenticate) {\n return factory(authenticate);\n }\n }\n\n return AuthPrompt;\n};\n\nmodule.exports = factory();\n","'use strict';\n\nconst Prompt = require('../prompt');\nconst { isPrimitive, hasColor } = require('../utils');\n\nclass BooleanPrompt extends Prompt {\n constructor(options) {\n super(options);\n this.cursorHide();\n }\n\n async initialize() {\n let initial = await this.resolve(this.initial, this.state);\n this.input = await this.cast(initial);\n await super.initialize();\n }\n\n dispatch(ch) {\n if (!this.isValue(ch)) return this.alert();\n this.input = ch;\n return this.submit();\n }\n\n format(value) {\n let { styles, state } = this;\n return !state.submitted ? styles.primary(value) : styles.success(value);\n }\n\n cast(input) {\n return this.isTrue(input);\n }\n\n isTrue(input) {\n return /^[ty1]/i.test(input);\n }\n\n isFalse(input) {\n return /^[fn0]/i.test(input);\n }\n\n isValue(value) {\n return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value));\n }\n\n async hint() {\n if (this.state.status === 'pending') {\n let hint = await this.element('hint');\n if (!hasColor(hint)) {\n return this.styles.muted(hint);\n }\n return hint;\n }\n }\n\n async render() {\n let { input, size } = this.state;\n\n let prefix = await this.prefix();\n let sep = await this.separator();\n let msg = await this.message();\n let hint = this.styles.muted(this.default);\n\n let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(' ');\n this.state.prompt = promptLine;\n\n let header = await this.header();\n let value = this.value = this.cast(input);\n let output = await this.format(value);\n let help = (await this.error()) || (await this.hint());\n let footer = await this.footer();\n\n if (help && !promptLine.includes(help)) output += ' ' + help;\n promptLine += ' ' + output;\n\n this.clear(size);\n this.write([header, promptLine, footer].filter(Boolean).join('\\n'));\n this.restore();\n }\n\n set value(value) {\n super.value = value;\n }\n get value() {\n return this.cast(super.value);\n }\n}\n\nmodule.exports = BooleanPrompt;\n","module.exports = {\n ArrayPrompt: require('./array'),\n AuthPrompt: require('./auth'),\n BooleanPrompt: require('./boolean'),\n NumberPrompt: require('./number'),\n StringPrompt: require('./string')\n};\n","'use strict';\n\nconst StringPrompt = require('./string');\n\nclass NumberPrompt extends StringPrompt {\n constructor(options = {}) {\n super({ style: 'number', ...options });\n this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity;\n this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity;\n this.delay = options.delay != null ? options.delay : 1000;\n this.float = options.float !== false;\n this.round = options.round === true || options.float === false;\n this.major = options.major || 10;\n this.minor = options.minor || 1;\n this.initial = options.initial != null ? options.initial : '';\n this.input = String(this.initial);\n this.cursor = this.input.length;\n this.cursorShow();\n }\n\n append(ch) {\n if (!/[-+.]/.test(ch) || (ch === '.' && this.input.includes('.'))) {\n return this.alert('invalid number');\n }\n return super.append(ch);\n }\n\n number(ch) {\n return super.append(ch);\n }\n\n next() {\n if (this.input && this.input !== this.initial) return this.alert();\n if (!this.isValue(this.initial)) return this.alert();\n this.input = this.initial;\n this.cursor = String(this.initial).length;\n return this.render();\n }\n\n up(number) {\n let step = number || this.minor;\n let num = this.toNumber(this.input);\n if (num > this.max + step) return this.alert();\n this.input = `${num + step}`;\n return this.render();\n }\n\n down(number) {\n let step = number || this.minor;\n let num = this.toNumber(this.input);\n if (num < this.min - step) return this.alert();\n this.input = `${num - step}`;\n return this.render();\n }\n\n shiftDown() {\n return this.down(this.major);\n }\n\n shiftUp() {\n return this.up(this.major);\n }\n\n format(input = this.input) {\n if (typeof this.options.format === 'function') {\n return this.options.format.call(this, input);\n }\n return this.styles.info(input);\n }\n\n toNumber(value = '') {\n return this.float ? +value : Math.round(+value);\n }\n\n isValue(value) {\n return /^[-+]?[0-9]+((\\.)|(\\.[0-9]+))?$/.test(value);\n }\n\n submit() {\n let value = [this.input, this.initial].find(v => this.isValue(v));\n this.value = this.toNumber(value || 0);\n return super.submit();\n }\n}\n\nmodule.exports = NumberPrompt;\n","'use strict';\n\nconst Prompt = require('../prompt');\nconst placeholder = require('../placeholder');\nconst { isPrimitive } = require('../utils');\n\nclass StringPrompt extends Prompt {\n constructor(options) {\n super(options);\n this.initial = isPrimitive(this.initial) ? String(this.initial) : '';\n if (this.initial) this.cursorHide();\n this.state.prevCursor = 0;\n this.state.clipboard = [];\n }\n\n async keypress(input, key = {}) {\n let prev = this.state.prevKeypress;\n this.state.prevKeypress = key;\n if (this.options.multiline === true && key.name === 'return') {\n if (!prev || prev.name !== 'return') {\n return this.append('\\n', key);\n }\n }\n return super.keypress(input, key);\n }\n\n moveCursor(n) {\n this.cursor += n;\n }\n\n reset() {\n this.input = this.value = '';\n this.cursor = 0;\n return this.render();\n }\n\n dispatch(ch, key) {\n if (!ch || key.ctrl || key.code) return this.alert();\n this.append(ch);\n }\n\n append(ch) {\n let { cursor, input } = this.state;\n this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor);\n this.moveCursor(String(ch).length);\n this.render();\n }\n\n insert(str) {\n this.append(str);\n }\n\n delete() {\n let { cursor, input } = this.state;\n if (cursor <= 0) return this.alert();\n this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor);\n this.moveCursor(-1);\n this.render();\n }\n\n deleteForward() {\n let { cursor, input } = this.state;\n if (input[cursor] === void 0) return this.alert();\n this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1);\n this.render();\n }\n\n cutForward() {\n let pos = this.cursor;\n if (this.input.length <= pos) return this.alert();\n this.state.clipboard.push(this.input.slice(pos));\n this.input = this.input.slice(0, pos);\n this.render();\n }\n\n cutLeft() {\n let pos = this.cursor;\n if (pos === 0) return this.alert();\n let before = this.input.slice(0, pos);\n let after = this.input.slice(pos);\n let words = before.split(' ');\n this.state.clipboard.push(words.pop());\n this.input = words.join(' ');\n this.cursor = this.input.length;\n this.input += after;\n this.render();\n }\n\n paste() {\n if (!this.state.clipboard.length) return this.alert();\n this.insert(this.state.clipboard.pop());\n this.render();\n }\n\n toggleCursor() {\n if (this.state.prevCursor) {\n this.cursor = this.state.prevCursor;\n this.state.prevCursor = 0;\n } else {\n this.state.prevCursor = this.cursor;\n this.cursor = 0;\n }\n this.render();\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.input.length - 1;\n this.render();\n }\n\n next() {\n let init = this.initial != null ? String(this.initial) : '';\n if (!init || !init.startsWith(this.input)) return this.alert();\n this.input = this.initial;\n this.cursor = this.initial.length;\n this.render();\n }\n\n prev() {\n if (!this.input) return this.alert();\n this.reset();\n }\n\n backward() {\n return this.left();\n }\n\n forward() {\n return this.right();\n }\n\n right() {\n if (this.cursor >= this.input.length) return this.alert();\n this.moveCursor(1);\n return this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.alert();\n this.moveCursor(-1);\n return this.render();\n }\n\n isValue(value) {\n return !!value;\n }\n\n async format(input = this.value) {\n let initial = await this.resolve(this.initial, this.state);\n if (!this.state.submitted) {\n return placeholder(this, { input, initial, pos: this.cursor });\n }\n return this.styles.submitted(input || initial);\n }\n\n async render() {\n let size = this.state.size;\n\n let prefix = await this.prefix();\n let separator = await this.separator();\n let message = await this.message();\n\n let prompt = [prefix, message, separator].filter(Boolean).join(' ');\n this.state.prompt = prompt;\n\n let header = await this.header();\n let output = await this.format();\n let help = (await this.error()) || (await this.hint());\n let footer = await this.footer();\n\n if (help && !output.includes(help)) output += ' ' + help;\n prompt += ' ' + output;\n\n this.clear(size);\n this.write([header, prompt, footer].filter(Boolean).join('\\n'));\n this.restore();\n }\n}\n\nmodule.exports = StringPrompt;\n","'use strict';\n\nconst toString = Object.prototype.toString;\nconst colors = require('ansi-colors');\nlet called = false;\nlet fns = [];\n\nconst complements = {\n 'yellow': 'blue',\n 'cyan': 'red',\n 'green': 'magenta',\n 'black': 'white',\n 'blue': 'yellow',\n 'red': 'cyan',\n 'magenta': 'green',\n 'white': 'black'\n};\n\nexports.longest = (arr, prop) => {\n return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0);\n};\n\nexports.hasColor = str => !!str && colors.hasColor(str);\n\nconst isObject = exports.isObject = val => {\n return val !== null && typeof val === 'object' && !Array.isArray(val);\n};\n\nexports.nativeType = val => {\n return toString.call(val).slice(8, -1).toLowerCase().replace(/\\s/g, '');\n};\n\nexports.isAsyncFn = val => {\n return exports.nativeType(val) === 'asyncfunction';\n};\n\nexports.isPrimitive = val => {\n return val != null && typeof val !== 'object' && typeof val !== 'function';\n};\n\nexports.resolve = (context, value, ...rest) => {\n if (typeof value === 'function') {\n return value.call(context, ...rest);\n }\n return value;\n};\n\nexports.scrollDown = (choices = []) => [...choices.slice(1), choices[0]];\nexports.scrollUp = (choices = []) => [choices.pop(), ...choices];\n\nexports.reorder = (arr = []) => {\n let res = arr.slice();\n res.sort((a, b) => {\n if (a.index > b.index) return 1;\n if (a.index < b.index) return -1;\n return 0;\n });\n return res;\n};\n\nexports.swap = (arr, index, pos) => {\n let len = arr.length;\n let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos;\n let choice = arr[index];\n arr[index] = arr[idx];\n arr[idx] = choice;\n};\n\nexports.width = (stream, fallback = 80) => {\n let columns = (stream && stream.columns) ? stream.columns : fallback;\n if (stream && typeof stream.getWindowSize === 'function') {\n columns = stream.getWindowSize()[0];\n }\n if (process.platform === 'win32') {\n return columns - 1;\n }\n return columns;\n};\n\nexports.height = (stream, fallback = 20) => {\n let rows = (stream && stream.rows) ? stream.rows : fallback;\n if (stream && typeof stream.getWindowSize === 'function') {\n rows = stream.getWindowSize()[1];\n }\n return rows;\n};\n\nexports.wordWrap = (str, options = {}) => {\n if (!str) return str;\n\n if (typeof options === 'number') {\n options = { width: options };\n }\n\n let { indent = '', newline = ('\\n' + indent), width = 80 } = options;\n let spaces = (newline + indent).match(/[^\\S\\n]/g) || [];\n width -= spaces.length;\n let source = `.{1,${width}}([\\\\s\\\\u200B]+|$)|[^\\\\s\\\\u200B]+?([\\\\s\\\\u200B]+|$)`;\n let output = str.trim();\n let regex = new RegExp(source, 'g');\n let lines = output.match(regex) || [];\n lines = lines.map(line => line.replace(/\\n$/, ''));\n if (options.padEnd) lines = lines.map(line => line.padEnd(width, ' '));\n if (options.padStart) lines = lines.map(line => line.padStart(width, ' '));\n return indent + lines.join(newline);\n};\n\nexports.unmute = color => {\n let name = color.stack.find(n => colors.keys.color.includes(n));\n if (name) {\n return colors[name];\n }\n let bg = color.stack.find(n => n.slice(2) === 'bg');\n if (bg) {\n return colors[name.slice(2)];\n }\n return str => str;\n};\n\nexports.pascal = str => str ? str[0].toUpperCase() + str.slice(1) : '';\n\nexports.inverse = color => {\n if (!color || !color.stack) return color;\n let name = color.stack.find(n => colors.keys.color.includes(n));\n if (name) {\n let col = colors['bg' + exports.pascal(name)];\n return col ? col.black : color;\n }\n let bg = color.stack.find(n => n.slice(0, 2) === 'bg');\n if (bg) {\n return colors[bg.slice(2).toLowerCase()] || color;\n }\n return colors.none;\n};\n\nexports.complement = color => {\n if (!color || !color.stack) return color;\n let name = color.stack.find(n => colors.keys.color.includes(n));\n let bg = color.stack.find(n => n.slice(0, 2) === 'bg');\n if (name && !bg) {\n return colors[complements[name] || name];\n }\n if (bg) {\n let lower = bg.slice(2).toLowerCase();\n let comp = complements[lower];\n if (!comp) return color;\n return colors['bg' + exports.pascal(comp)] || color;\n }\n return colors.none;\n};\n\nexports.meridiem = date => {\n let hours = date.getHours();\n let minutes = date.getMinutes();\n let ampm = hours >= 12 ? 'pm' : 'am';\n hours = hours % 12;\n let hrs = hours === 0 ? 12 : hours;\n let min = minutes < 10 ? '0' + minutes : minutes;\n return hrs + ':' + min + ' ' + ampm;\n};\n\n/**\n * Set a value on the given object.\n * @param {Object} obj\n * @param {String} prop\n * @param {any} value\n */\n\nexports.set = (obj = {}, prop = '', val) => {\n return prop.split('.').reduce((acc, k, i, arr) => {\n let value = arr.length - 1 > i ? (acc[k] || {}) : val;\n if (!exports.isObject(value) && i < arr.length - 1) value = {};\n return (acc[k] = value);\n }, obj);\n};\n\n/**\n * Get a value from the given object.\n * @param {Object} obj\n * @param {String} prop\n */\n\nexports.get = (obj = {}, prop = '', fallback) => {\n let value = obj[prop] == null\n ? prop.split('.').reduce((acc, k) => acc && acc[k], obj)\n : obj[prop];\n return value == null ? fallback : value;\n};\n\nexports.mixin = (target, b) => {\n if (!isObject(target)) return b;\n if (!isObject(b)) return target;\n for (let key of Object.keys(b)) {\n let desc = Object.getOwnPropertyDescriptor(b, key);\n if (desc.hasOwnProperty('value')) {\n if (target.hasOwnProperty(key) && isObject(desc.value)) {\n let existing = Object.getOwnPropertyDescriptor(target, key);\n if (isObject(existing.value)) {\n target[key] = exports.merge({}, target[key], b[key]);\n } else {\n Reflect.defineProperty(target, key, desc);\n }\n } else {\n Reflect.defineProperty(target, key, desc);\n }\n } else {\n Reflect.defineProperty(target, key, desc);\n }\n }\n return target;\n};\n\nexports.merge = (...args) => {\n let target = {};\n for (let ele of args) exports.mixin(target, ele);\n return target;\n};\n\nexports.mixinEmitter = (obj, emitter) => {\n let proto = emitter.constructor.prototype;\n for (let key of Object.keys(proto)) {\n let val = proto[key];\n if (typeof val === 'function') {\n exports.define(obj, key, val.bind(emitter));\n } else {\n exports.define(obj, key, val);\n }\n }\n};\n\nexports.onExit = callback => {\n const onExit = (quit, code) => {\n if (called) return;\n\n called = true;\n fns.forEach(fn => fn());\n\n if (quit === true) {\n process.exit(128 + code);\n }\n };\n\n if (fns.length === 0) {\n process.once('SIGTERM', onExit.bind(null, true, 15));\n process.once('SIGINT', onExit.bind(null, true, 2));\n process.once('exit', onExit);\n }\n\n fns.push(callback);\n};\n\nexports.define = (obj, key, value) => {\n Reflect.defineProperty(obj, key, { value });\n};\n\nexports.defineExport = (obj, key, fn) => {\n let custom;\n Reflect.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n set(val) {\n custom = val;\n },\n get() {\n return custom ? custom() : fn();\n }\n });\n};\n"],"names":[],"sourceRoot":""}