text: #!/usr/bin/env node
  "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("os")),n=e(require("child_process")),r=e(require("tty")),i=e(require("path")),a=e(require("fs")),u=e(require("util")),o=e(require("stream")),s=e(require("events")),l=e(require("buffer")),c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}function h(e,t){return e(t={exports:{}},t.exports),t.exports}var f=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const d=e=>!!Number.isInteger(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var p=d,g=d;p.default=g;var m=e=>{if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g,"  "))||0===e.length)return 0;e=f(e);let t=0;for(let n=0;n<e.length;n++){const r=e.codePointAt(n);r<=31||r>=127&&r<=159||(r>=768&&r<=879||(r>65535&&n++,t+=p(r)?2:1))}return t};const{FORCE_COLOR:b,NODE_DISABLE_COLORS:y,TERM:C}=process.env,_={enabled:!y&&"dumb"!==C&&"0"!==b,reset:E(0,0),bold:E(1,22),dim:E(2,22),italic:E(3,23),underline:E(4,24),inverse:E(7,27),hidden:E(8,28),strikethrough:E(9,29),black:E(30,39),red:E(31,39),green:E(32,39),yellow:E(33,39),blue:E(34,39),magenta:E(35,39),cyan:E(36,39),white:E(37,39),gray:E(90,39),grey:E(90,39),bgBlack:E(40,49),bgRed:E(41,49),bgGreen:E(42,49),bgYellow:E(43,49),bgBlue:E(44,49),bgMagenta:E(45,49),bgCyan:E(46,49),bgWhite:E(47,49)};function F(e,t){let n,r=0,i="",a="";for(;r<e.length;r++)n=e[r],i+=n.open,a+=n.close,t.includes(n.close)&&(t=t.replace(n.rgx,n.close+n.open));return i+t+a}function E(e,t){let n={open:`[${e}m`,close:`[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(this.has.includes(e)||(this.has.push(e),this.keys.push(n)),void 0===t?this:_.enabled?F(this.keys,t+""):t+""):void 0===t?function(e,t){let n={has:e,keys:t};return n.reset=_.reset.bind(n),n.bold=_.bold.bind(n),n.dim=_.dim.bind(n),n.italic=_.italic.bind(n),n.underline=_.underline.bind(n),n.inverse=_.inverse.bind(n),n.hidden=_.hidden.bind(n),n.strikethrough=_.strikethrough.bind(n),n.black=_.black.bind(n),n.red=_.red.bind(n),n.green=_.green.bind(n),n.yellow=_.yellow.bind(n),n.blue=_.blue.bind(n),n.magenta=_.magenta.bind(n),n.cyan=_.cyan.bind(n),n.white=_.white.bind(n),n.gray=_.gray.bind(n),n.grey=_.grey.bind(n),n.bgBlack=_.bgBlack.bind(n),n.bgRed=_.bgRed.bind(n),n.bgGreen=_.bgGreen.bind(n),n.bgYellow=_.bgYellow.bind(n),n.bgBlue=_.bgBlue.bind(n),n.bgMagenta=_.bgMagenta.bind(n),n.bgCyan=_.bgCyan.bind(n),n.bgWhite=_.bgWhite.bind(n),n}([e],[n]):_.enabled?F([n],t+""):t+""}}var w=_;const{red:v,blue:k,green:B,italic:A}=w;const x=(e,t=2)=>Number(Math.round(parseFloat(e+"e"+t))+"e-"+t).toFixed(t);const S=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:null==e?"":"object"==typeof e?(e=>{let t="";return Object.keys(e).forEach(n=>{let r=e[n];"number"==typeof r&&(r=x(r,0)),t+=`${k(n)}${r} `}),t})(e):e.join("");const O=(e,t=null)=>{let n=t;"number"!=typeof t&&(n=m(S(t)));let r=[];for(let i=0;i<(t?e-n:e);i++)r.push(" ");return r.join("")};var j={asyncForEach:async(e,t)=>{for(let n=0;n<e.length;n++)await t(e[n],n,e)},toRoundNumber:x,toStringValue:S,spaces:O,spacedText:(e,t)=>`${t} ${O(e,m(S(t))+1)}`,repeat:(e,t=null)=>{let n=[];for(let r=0;r<e;r++)n.push(t);return n.join("")},stylelizeValue:e=>{if(null==e)return`${A("null")}`;if("boolean"!=typeof e&&!e)return"";let t=e.toString();return"true"==t?`${B("True")}`:"false"==t?`${v("False")}`:t.includes("/")?`${k().italic(t)}`:t},centerText:(e,t)=>{let n=[],r=m(t)%2==0;e=(e-m(t))/2;for(let t=0;t<e;t++)n.push(" ");n.push(t);for(let t=0;t<e-(r?0:1);t++)n.push(" ");return n.join("")},breakText:(e,t)=>{if("array"==typeof e)return e;let n=[];if(m(e)>t){let r=e.split(" "),i="";return r.forEach((e,r)=>{m(i+" "+e)<t?i=i+" "+e:(n.push(i),i=e)}),n}return[e]}};var T={defaultSettings:{borderType:"single",borderColor:"dim",frameWidth:80,indentBlock:5}};const{defaultSettings:I}=T,L={single:{line:"━",midLine:"─",side:"┃",topStart:"┏",topEnd:"┓",bottomStart:"┗",bottomEnd:"┛",midStart:"┠",midEnd:"┨"},double:{line:"═",midLine:"─",side:"║",topStart:"╔",topEnd:"╗",bottomStart:"╚",bottomEnd:"╝",midStart:"╟",midEnd:"╢"}};var z={border:(e,t)=>{t||(t=I);let n=L[t.borderType][e];return w[t.borderColor]&&(n=w[t.borderColor](n)),n}},R=Object.prototype.toString,M=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;if("boolean"===t)return"boolean";if("string"===t)return"string";if("number"===t)return"number";if("symbol"===t)return"symbol";if("function"===t)return function(e,t){return"GeneratorFunction"===N(e)}(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){if(e.constructor&&"function"==typeof e.constructor.isBuffer)return e.constructor.isBuffer(e);return!1}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(N(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(t=R.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")};function N(e){return"function"==typeof e.constructor?e.constructor.name:null}var P={get:"function",set:"function",configurable:"boolean",enumerable:"boolean"};function $(e,t){return{}.hasOwnProperty.call(e,t)}var U=function(e,t){if("string"==typeof t)return void 0!==Object.getOwnPropertyDescriptor(e,t);if("object"!==M(e))return!1;if($(e,"value")||$(e,"writable"))return!1;if(!$(e,"get")||"function"!=typeof e.get)return!1;if($(e,"set")&&"function"!=typeof e[n]&&void 0!==e[n])return!1;for(var n in e)if(P.hasOwnProperty(n)&&M(e[n])!==P[n]&&void 0!==e[n])return!1;return!0},W=function(e,t){return"object"===M(e)&&("get"in e?U(e,t):function(e,t){var n={configurable:"boolean",enumerable:"boolean",writable:"boolean"};if("object"!==M(e))return!1;if("string"==typeof t)return void 0!==Object.getOwnPropertyDescriptor(e,t);if(!("value"in e||"writable"in e))return!1;for(var r in e)if("value"!==r&&n.hasOwnProperty(r)&&M(e[r])!==n[r]&&void 0!==e[r])return!1;return!0}(e,t))},Z=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("expected an object or function.");if("string"!=typeof t)throw new TypeError("expected `prop` to be a string.");return W(n)&&("set"in n||"get"in n)?Object.defineProperty(e,t,n):Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})},q=function(e){return null!=e&&(H(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&H(e.slice(0,0))}(e)||!!e._isBuffer)};function H(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var K=Object.prototype.toString,V=function(e){var t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";if(!0===e||!1===e||e instanceof Boolean)return"boolean";if("string"==typeof e||e instanceof String)return"string";if("number"==typeof e||e instanceof Number)return"number";if("function"==typeof e||e instanceof Function)return"function";if(void 0!==Array.isArray&&Array.isArray(e))return"array";if(e instanceof RegExp)return"regexp";if(e instanceof Date)return"date";var t=K.call(e);return"[object RegExp]"===t?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"[object Error]"===t?"error":q(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array]"===t?"float64array":"object"}(e);if("string"===t){if(!e.trim())return!1}else if("number"!==t)return!1;return e-e+1>=0};function G(e,t){var n,r=process&&process[t]||e[t];if(r)return"function"==typeof r.getWindowSize&&J(n=r.getWindowSize())?{width:n[0],height:n[1],type:t}:J(n=[r.columns,r.rows])?{width:Number(n[0]),height:Number(n[1]),type:t}:void 0}function Y(){if(process&&process.env){var e=[process.env.COLUMNS,process.env.ROWS];if(J(e))return{width:Number(e[0]),height:Number(e[1]),type:"process.env"}}}function X(e,t){var n=e.tty||r;if(n&&"function"==typeof n.getWindowSize){var i=n.getWindowSize(t);if(J(i))return{width:Number(i[1]),height:Number(i[0]),type:"tty"}}}function J(e){return Array.isArray(e)&&V(e[0])&&V(e[1])}var Q={get:function(e){return G(e=e||{},"stdout")||G(e,"stderr")||Y()||X(e)},env:Y,tty:X,tput:function(){try{var e=n.execSync("tput cols && tput lines",{stdio:["ignore","pipe",process.stderr]}).toString().trim().split("\n");if(J(e))return{width:Number(e[0]),height:Number(e[1]),type:"tput"}}catch(e){}},win:function(){if(t.release().startsWith("10")){var e=n.execSync("wmic path Win32_VideoController get CurrentHorizontalResolution,CurrentVerticalResolution").toString().match(/\d+/g);if(J(e))return{width:Number(e[0]),height:Number(e[1]),type:"windows"}}}},ee=h((function(e){e.exports=Q.get(),e.exports&&(Z(e.exports,"get",Q.get),Z(e.exports,"env",Q.env),Z(e.exports,"tty",Q.tty),Z(e.exports,"tput",Q.tput),Z(e.exports,"win",Q.win))})),te=h((function(e,t){const{spaces:n,repeat:r,centerText:i,stylelizeValue:a,breakText:u,toStringValue:o,spacedText:s,asyncForEach:l}=j,{border:c}=z,{defaultSettings:D}=T,{red:h,yellow:f,bgBlue:d,green:p,bold:g}=w,b=ee.width<D.frameWidth+2*D.indentBlock+2?ee.width-2*D.indentBlock:D.frameWidth;t.FRAME_WIDTH=b;const y=b/10;t.PADDING=y;const C=b-2*y;t.CONTENT_WIDTH;const _=e=>e?console.log(e):console.log();t.LOGG=_;t.START=(e,t)=>{t=t?Object.assign(D,t):D,_("\n"),_(n(y+t.indentBlock)+d().black(" "+e+" ")),_("\n")};const F=(e=null,t=null)=>{if(t=t?Object.assign(D,t):D,null==e)return void _(`${n(t.indentBlock)}${c("side",t)}${n(b)}${c("side",t)}`);"string"==typeof e&&(e=u(e,C));let r="";t.prepend&&(r=t.prepend),e.forEach((e,i)=>{e=0==i?`${r?r+" ":""}${e}`:`${r?n(m(r))+" ":""}${e}`,_(n(t.indentBlock)+c("side",t)+n(y)+s(C,e)+n(y)+c("side",t))})};t.BLOCK_LINE=F;t.EMPTY=e=>{_()};t.BLOCK_ROW_LINE=(e,t=null)=>{t=t?Object.assign(D,t):D;let n="";e=e.map(e=>o(e));let r=Math.floor(C/e.length)-1;e.forEach(e=>{n+=s(r,e)}),F(n)};t.BLOCK_LINE_SUCCESS=(e,t=null)=>{(t=t?Object.assign(D,t):D).prepend=p("✔"),F(e,t)};const E=(e,t=null)=>{(t=t?Object.assign(D,t):D).prepend=h("×"),F(e,t)};t.BLOCK_LINE_ERROR=E;const v=(e,t)=>{(t=t?Object.assign(D,t):D).prepend=f("!"),F(e,t)};t.BLOCK_LINE_WARNING=v;t.BLOCK_START=(e=null,t=null)=>{t=t?Object.assign(D,t):D,_(e?`${n(t.indentBlock)}${c("topStart",t)}${r(Math.floor(b/3),c("line",t))}${i(b-2*Math.floor(b/3),g(e))}${r(Math.floor(b/3),c("line",t))}${c("topEnd",t)}`:`${n(t.indentBlock)}${c("topStart",t)}${r(b,c("line",t))}${c("topEnd",t)}`),F()};const k=(e=null,t=null)=>{t=t?Object.assign(D,t):D,_(e?`${n(t.indentBlock)}${c("midStart",t)}${r(Math.floor(b/3),c("midLine",t))}${i(b-2*Math.floor(b/3),g(e))}${r(Math.floor(b/3),`${c("midLine",t)}`)}${c("midEnd")}`:`${n(t.indentBlock)}${c("midStart",t)}${r(b,c("midLine",t))}${c("midEnd",t)}`),F()};t.BLOCK_MID=k;const B=(e,t=null)=>{t=t?Object.assign(D,t):D,F(null,t),_(`${n(t.indentBlock)}${c("bottomStart",t)}${r(b,`${c("line",t)}`)}${c("bottomEnd",t)}`)};t.BLOCK_END=B;t.BLOCK_SETTINGS=async(e,t=null)=>{t=t?Object.assign(D,t):D;let r=[];await l(Object.keys(e),t=>{let i,u=a(e[t]);switch(t){case"src":case"dest":case"template":0==e[t]&&null!==e[t]&&(i=!0);break;default:i=!1}i&&(u=`${h("×")} ${u}`);let o=`${g(t)}${n(20,t)}${u}`;r.push(o)}),F(null,t),r.forEach(e=>{F(e,t)}),F(null,t)};t.BLOCK_WARNINGS=(e,t=null)=>{if(t=t?Object.assign(D,t):D,!e||e.length<1)return!1;F(null,t),k(`${f("! Warnings")}`,t),e.forEach(e=>{v(e,t)})};t.BLOCK_ERRORS=(e,t=null)=>{if(t=t?Object.assign(D,t):D,!e||e.length<1)return!1;F(null,t),k(`${h("× Errors")}`,t),e.forEach(e=>{E(e,t)}),B(0,t),process.exit()}})),ne=(te.FRAME_WIDTH,te.PADDING,te.LOGG,te.START,te.BLOCK_LINE,te.EMPTY,te.BLOCK_ROW_LINE,te.BLOCK_LINE_SUCCESS,te.BLOCK_LINE_ERROR,te.BLOCK_LINE_WARNING,te.BLOCK_START,te.BLOCK_MID,te.BLOCK_END,te.BLOCK_SETTINGS,te.BLOCK_WARNINGS,te.BLOCK_ERRORS,{...te,...j}),re=function(e){return!!e&&!!e.then&&"function"==typeof e.then},ie={applyMiddleware:function(e,t,n,r){const i=new Error("middleware cannot return a promise when applyBeforeValidation is true");return n.reduce((n,a)=>{if(a.applyBeforeValidation!==r)return n;if(re(n))return n.then(e=>Promise.all([e,a(e,t)])).then(([e,t])=>Object.assign(e,t));{const u=a(e,t);if(r&&re(u))throw i;return re(u)?u.then(e=>Object.assign(n,e)):Object.assign(n,u)}},e)},commandMiddlewareFactory:function(e){return e?e.map(e=>(e.applyBeforeValidation=!1,e)):[]},globalMiddlewareFactory:function(e,t){return function(n,r=!1){if(ke("<array|function> [boolean]",[n,r],arguments.length),Array.isArray(n)){for(let e=0;e<n.length;e++){if("function"!=typeof n[e])throw Error("middleware must be a function");n[e].applyBeforeValidation=r}Array.prototype.push.apply(e,n)}else"function"==typeof n&&(n.applyBeforeValidation=r,e.push(n));return t}}};const ae=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);return 0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=(e=>{let t=!1,n=!1,r=!1;for(let i=0;i<e.length;i++){const a=e[i];t&&/[a-zA-Z]/.test(a)&&a.toUpperCase()===a?(e=e.slice(0,i)+"-"+e.slice(i),t=!1,r=n,n=!0,i++):n&&r&&/[a-zA-Z]/.test(a)&&a.toLowerCase()===a?(e=e.slice(0,i-1)+"-"+e.slice(i-1),r=n,n=!1,t=!0):(t=a.toLowerCase()===a&&a.toUpperCase()!==a,r=n,n=a.toUpperCase()===a&&a.toLowerCase()!==a)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),n=e,t.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n);var n};var ue=ae,oe=ae;ue.default=oe;var se=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");return t=void 0===t?"_":t,e.replace(/([a-z\d])([A-Z])/g,"$1"+t+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+t+"$2").toLowerCase()};function le(e,t){t||(t={}),e=function(e){if(Array.isArray(e))return e.map(e=>"string"!=typeof e?e+"":e);e=e.trim();for(var t=0,n=null,r=null,i=null,a=[],u=0;u<e.length;u++)n=r," "!==(r=e.charAt(u))||i?(r===i?i=null:"'"!==r&&'"'!==r||i||(i=r),a[t]||(a[t]=""),a[t]+=r):" "!==n&&t++;return a}(e);var n=function(e){var t=[],n=!0,r={};Object.keys(e).forEach((function(n){t.push([].concat(e[n],n))}));for(;n;){n=!1;for(var i=0;i<t.length;i++)for(var a=i+1;a<t.length;a++){if(t[i].filter((function(e){return-1!==t[a].indexOf(e)})).length){t[i]=t[i].concat(t[a]),t.splice(a,1),n=!0;break}}}return t.forEach((function(e){e=e.filter((function(e,t,n){return n.indexOf(e)===t})),r[e.pop()]=e})),r}(t.alias||{}),r=Object.assign({"short-option-groups":!0,"camel-case-expansion":!0,"dot-notation":!0,"parse-numbers":!0,"boolean-negation":!0,"negation-prefix":"no-","duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"populate--":!1,"combine-arrays":!1,"set-placeholder-key":!1,"halt-at-non-option":!1,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},t.configuration),a=t.default||{},o=t.configObjects||[],s=t.envPrefix,l=r["populate--"],c=l?"--":"_",h={},f={},d=t.__||u.format,p=null,g={aliases:{},arrays:{},bools:{},strings:{},numbers:{},counts:{},normalize:{},configs:{},nargs:{},coercions:{},keys:[]},m=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,b=new RegExp("^--"+r["negation-prefix"]+"(.+)");[].concat(t.array).filter(Boolean).forEach((function(e){var t=e.key||e;const n=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();n&&(g[n][t]=!0),g.arrays[t]=!0,g.keys.push(t)})),[].concat(t.boolean).filter(Boolean).forEach((function(e){g.bools[e]=!0,g.keys.push(e)})),[].concat(t.string).filter(Boolean).forEach((function(e){g.strings[e]=!0,g.keys.push(e)})),[].concat(t.number).filter(Boolean).forEach((function(e){g.numbers[e]=!0,g.keys.push(e)})),[].concat(t.count).filter(Boolean).forEach((function(e){g.counts[e]=!0,g.keys.push(e)})),[].concat(t.normalize).filter(Boolean).forEach((function(e){g.normalize[e]=!0,g.keys.push(e)})),Object.keys(t.narg||{}).forEach((function(e){g.nargs[e]=t.narg[e],g.keys.push(e)})),Object.keys(t.coerce||{}).forEach((function(e){g.coercions[e]=t.coerce[e],g.keys.push(e)})),Array.isArray(t.config)||"string"==typeof t.config?[].concat(t.config).filter(Boolean).forEach((function(e){g.configs[e]=!0})):Object.keys(t.config||{}).forEach((function(e){g.configs[e]=t.config[e]})),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){g.aliases[e]||(g.aliases[e]=[].concat(n[e]||[]),g.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&r["camel-case-expansion"]){var n=ue(t);n!==e&&-1===g.aliases[e].indexOf(n)&&(g.aliases[e].push(n),h[n]=!0)}})),g.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&r["camel-case-expansion"]){var n=se(t,"-");n!==e&&-1===g.aliases[e].indexOf(n)&&(g.aliases[e].push(n),h[n]=!0)}})),g.aliases[e].forEach((function(t){g.aliases[t]=[e].concat(g.aliases[e].filter((function(e){return t!==e})))})))}))}))}(t.key,n,t.default,g.arrays),Object.keys(a).forEach((function(e){(g.aliases[e]||[]).forEach((function(t){a[t]=a[e]}))})),Object.keys(g.counts).find(e=>P(e,g.arrays)?(p=Error(d("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):P(e,g.nargs)?(p=Error(d("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0):void 0);for(var y={_:[]},C=[],_=0;_<e.length;_++){var F,E,w,v,k,B,A=e[_];if("--"!==A&&U(A))y._.push(A);else if(A.match(/^--.+=/)||!r["short-option-groups"]&&A.match(/^-.+=/))P((v=A.match(/^--?([^=]+)=([\s\S]*)$/))[1],g.nargs)?(e.splice(_+1,0,v[2]),_=S(_,v[1],e)):P(v[1],g.arrays)?(e.splice(_+1,0,v[2]),_=O(_,v[1],e)):j(v[1],v[2]);else if(A.match(b)&&r["boolean-negation"])j(E=A.match(b)[1],!!P(E,g.arrays)&&[!1]);else if(A.match(/^--.+/)||!r["short-option-groups"]&&A.match(/^-[^-]+/))!1!==P(E=A.match(/^--?(.+)/)[1],g.nargs)?_=S(_,E,e):P(E,g.arrays)?_=O(_,E,e):void 0===(k=e[_+1])||k.match(/^-/)&&!k.match(m)||P(E,g.bools)||P(E,g.counts)?/^(true|false)$/.test(k)?(j(E,k),_++):j(E,W(E)):(j(E,k),_++);else if(A.match(/^-.\..+=/))j((v=A.match(/^-([^=]+)=([\s\S]*)$/))[1],v[2]);else if(A.match(/^-.\..+/)&&!A.match(m))k=e[_+1],E=A.match(/^-(.\..+)/)[1],void 0===k||k.match(/^-/)||P(E,g.bools)||P(E,g.counts)?j(E,W(E)):(j(E,k),_++);else if(A.match(/^-[^-]+/)&&!A.match(m)){w=A.slice(1,-1).split(""),F=!1;for(var x=0;x<w.length;x++){if(k=A.slice(x+2),w[x+1]&&"="===w[x+1]){B=A.slice(x+3),P(E=w[x],g.nargs)?(e.splice(_+1,0,B),_=S(_,E,e)):P(E,g.arrays)?(e.splice(_+1,0,B),_=O(_,E,e)):j(E,B),F=!0;break}if("-"!==k){if(/[A-Za-z]/.test(w[x])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(k)){j(w[x],k),F=!0;break}if(w[x+1]&&w[x+1].match(/\W/)){j(w[x],k),F=!0;break}j(w[x],W(w[x]))}else j(w[x],k)}E=A.slice(-1)[0],F||"-"===E||(!1!==P(E,g.nargs)?_=S(_,E,e):P(E,g.arrays)?_=O(_,E,e):void 0===(k=e[_+1])||/^(-|--)[^-]/.test(k)&&!k.match(m)||P(E,g.bools)||P(E,g.counts)?/^(true|false)$/.test(k)?(j(E,k),_++):j(E,W(E)):(j(E,k),_++))}else{if("--"===A){C=e.slice(_+1);break}if(r["halt-at-non-option"]){C=e.slice(_);break}y._.push(I("_",A))}}function S(e,t,n){var r;const i=P(t,g.nargs);if(0===i)return j(t,W(t)),e;var a=0;for(r=e+1;r<n.length&&(!n[r].match(/^-[^0-9]/)||n[r].match(m)||U(n[r]));r++)a++;a<i&&(p=Error(d("Not enough arguments following: %s",t)));const u=Math.min(a,i);for(r=e+1;r<u+e+1;r++)j(t,n[r]);return e+u}function O(e,t,n){let r=[],i=n[e+1];if(P(t,g.bools)&&!/^(true|false)$/.test(i))r.push(!0);else if(Z(i)||/^-/.test(i)&&!m.test(i)&&!U(i)){if(a.hasOwnProperty(t)){const e=a[t];r=Array.isArray(e)?e:[e]}}else for(var u=e+1;u<n.length&&(i=n[u],!/^-/.test(i)||m.test(i)||U(i));u++)e=u,r.push(T(t,i));return j(t,r),e}function j(e,t){if(/-/.test(e)&&r["camel-case-expansion"]){var n=e.split(".").map((function(e){return ue(e)})).join(".");!function e(t,n){g.aliases[t]&&g.aliases[t].length||(g.aliases[t]=[n],h[n]=!0);g.aliases[n]&&g.aliases[n].length||e(n,t)}(e,n)}var a=T(e,t),u=e.split(".");(N(y,u,a),g.aliases[e]&&g.aliases[e].forEach((function(e){e=e.split("."),N(y,e,a)})),u.length>1&&r["dot-notation"]&&(g.aliases[u[0]]||[]).forEach((function(e){e=e.split(".");var t=[].concat(u);t.shift(),e=e.concat(t),N(y,e,a)})),P(e,g.normalize)&&!P(e,g.arrays))&&[e].concat(g.aliases[e]||[]).forEach((function(e){y.__defineSetter__(e,(function(e){t=i.normalize(e)})),y.__defineGetter__(e,(function(){return"string"==typeof t?i.normalize(t):t}))}))}function T(e,t){"string"!=typeof t||"'"!==t[0]&&'"'!==t[0]||t[t.length-1]!==t[0]||(t=t.substring(1,t.length-1)),(P(e,g.bools)||P(e,g.counts))&&"string"==typeof t&&(t="true"===t);var n=Array.isArray(t)?t.map((function(t){return I(e,t)})):I(e,t);return P(e,g.counts)&&(Z(n)||"boolean"==typeof n)&&(n=ce),P(e,g.normalize)&&P(e,g.arrays)&&(n=Array.isArray(t)?t.map(i.normalize):i.normalize(t)),n}function I(e,t){if(!P(e,g.strings)&&!P(e,g.bools)&&!Array.isArray(t)){(null!=(n=t)&&("number"==typeof n||!!/^0x[0-9a-f]+$/i.test(n)||!(n.length>1&&"0"===n[0])&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(n))&&r["parse-numbers"]&&Number.isSafeInteger(Math.floor(t))||!Z(t)&&P(e,g.numbers))&&(t=Number(t))}var n;return t}function L(e,t){Object.keys(e).forEach((function(n){var i=e[n],a=t?t+"."+n:n;"object"==typeof i&&null!==i&&!Array.isArray(i)&&r["dot-notation"]?L(i,a):(!M(y,a.split("."))||P(a,g.arrays)&&r["combine-arrays"])&&j(a,i)}))}function z(e,t){if(void 0!==s){var n="string"==typeof s?s:"";Object.keys(process.env).forEach((function(r){if(""===n||0===r.lastIndexOf(n,0)){var i=r.split("__").map((function(e,t){return 0===t&&(e=e.substring(n.length)),ue(e)}));(t&&g.configs[i.join(".")]||!t)&&!M(e,i)&&j(i.join("."),process.env[r])}}))}}function R(e,t,n,r=!1){Object.keys(n).forEach((function(i){M(e,i.split("."))||(N(e,i.split("."),n[i]),r&&(f[i]=!0),(t[i]||[]).forEach((function(t){M(e,t.split("."))||N(e,t.split("."),n[i])})))}))}function M(e,t){var n=e;r["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){n=n[e]||{}}));var i=t[t.length-1];return"object"==typeof n&&i in n}function N(e,t,n){var i=e;r["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e,t){"object"==typeof i&&void 0===i[e]&&(i[e]={}),"object"!=typeof i[e]||Array.isArray(i[e])?(Array.isArray(i[e])?i[e].push({}):i[e]=[i[e],{}],i=i[e][i[e].length-1]):i=i[e]}));var a=t[t.length-1],u=P(t.join("."),g.arrays),o=Array.isArray(n),s=r["duplicate-arguments-array"];!s&&P(a,g.nargs)&&(s=!0,(!Z(i[a])&&1===g.nargs[a]||Array.isArray(i[a])&&i[a].length===g.nargs[a])&&(i[a]=void 0)),n===ce?i[a]=ce(i[a]):Array.isArray(i[a])?s&&u&&o?i[a]=r["flatten-duplicate-arrays"]?i[a].concat(n):(Array.isArray(i[a][0])?i[a]:[i[a]]).concat([n]):s||Boolean(u)!==Boolean(o)?i[a]=i[a].concat([n]):i[a]=n:void 0===i[a]&&u?i[a]=o?n:[n]:s&&void 0!==i[a]&&!P(a,g.counts)?i[a]=[i[a],n]:i[a]=n}function P(e,t){let n=[].concat(g.aliases[e]||[],e).find(e=>t.hasOwnProperty(e));return!!n&&t[n]}function $(e){return[].concat(...Object.keys(g).map(e=>g[e])).some((function(t){return t[e]}))}function U(e){return r["unknown-options-as-args"]&&function(e){if(e.match(m))return!1;if(function(e){if(e.match(m)||!e.match(/^-[^-]+/))return!1;for(var t,n=!0,r=e.slice(1).split(""),i=0;i<r.length;i++){if(t=e.slice(i+2),!$(r[i])){n=!1;break}if(r[i+1]&&"="===r[i+1]||"-"===t||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||r[i+1]&&r[i+1].match(/\W/))break}return n}(e))return!1;return!function(e,...t){return[].concat(...t).some((function(t){var n=e.match(t);return n&&$(n[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,b,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?)\d+$/,/^-+([^=]+?)\W+.*$/)}(e)}function W(e){return!P(e,g.bools)&&!P(e,g.counts)&&`${e}`in a?a[e]:function(e){return{boolean:!0,string:"",number:void 0,array:[]}[e]}(function(e){var t="boolean";P(e,g.strings)?t="string":P(e,g.numbers)?t="number":P(e,g.bools)?t="boolean":P(e,g.arrays)&&(t="array");return t}(e))}function Z(e){return void 0===e}return z(y,!0),z(y,!1),function(e){var t={};R(t,g.aliases,a),Object.keys(g.configs).forEach((function(n){var r=e[n]||t[n];if(r)try{var a=null,u=i.resolve(process.cwd(),r);if("function"==typeof g.configs[n]){try{a=g.configs[n](u)}catch(e){a=e}if(a instanceof Error)return void(p=a)}else a=D();L(a)}catch(t){e[n]&&(p=Error(d("Invalid JSON config file: %s",r)))}}))}(y),function(){if(void 0===o)return;o.forEach((function(e){L(e)}))}(),R(y,g.aliases,a,!0),function(e){var t,n={};Object.keys(e).forEach((function(r){if(!n.hasOwnProperty(r)&&"function"==typeof(t=P(r,g.coercions)))try{var i=I(r,t(e[r]));[].concat(g.aliases[r]||[],r).forEach(t=>{n[t]=e[t]=i})}catch(e){p=e}}))}(y),r["set-placeholder-key"]&&function(e){g.keys.forEach(t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)})}(y),Object.keys(g.counts).forEach((function(e){M(y,e.split("."))||j(e,0)})),l&&C.length&&(y[c]=[]),C.forEach((function(e){y[c].push(e)})),r["camel-case-expansion"]&&r["strip-dashed"]&&Object.keys(y).filter(e=>"--"!==e&&e.includes("-")).forEach(e=>{delete y[e]}),r["strip-aliased"]&&[].concat(...Object.keys(n).map(e=>n[e])).forEach(e=>{r["camel-case-expansion"]&&delete y[e.split(".").map(e=>ue(e)).join(".")],delete y[e]}),{argv:y,error:p,aliases:g.aliases,newAliases:h,defaulted:f,configuration:r}}function ce(e){return void 0!==e?e+1:1}function De(e,t){return le(e.slice(),t).argv}De.detailed=function(e,t){return le(e.slice(),t)};var he=De,fe=i.join,de=i.resolve,pe=i.dirname,ge={extensions:["js","json","coffee"],recurse:!0,rename:function(e){return e},visit:function(e){return e}};var me=function e(t,n,r){var i={};for(var u in n&&!r&&"string"!=typeof n&&(r=n,n=null),r=r||{},ge)void 0===r[u]&&(r[u]=ge[u]);return n=n?de(pe(t.filename),n):pe(t.filename),a.readdirSync(n).forEach((function(u){var o,s,l,c=fe(n,u);a.statSync(c).isDirectory()&&r.recurse?(o=e(t,c,r),Object.keys(o).length&&(i[r.rename(u,c,u)]=o)):c!==t.filename&&function(e,t,n){return new RegExp("\\.("+n.extensions.join("|")+")$","i").test(t)&&!(n.include&&n.include instanceof RegExp&&!n.include.test(e))&&!(n.include&&"function"==typeof n.include&&!n.include(e,t))&&!(n.exclude&&n.exclude instanceof RegExp&&n.exclude.test(e))&&!(n.exclude&&"function"==typeof n.exclude&&n.exclude(e,t))}(c,u,r)&&(s=u.substring(0,u.lastIndexOf(".")),l=t.require(c),i[r.rename(s,c,u)]=r.visit(l,c,u)||l)})),i},be=ge;me.defaults=be;const ye=u.inspect,{applyMiddleware:Ce,commandMiddlewareFactory:_e}=ie,Fe=/(^\*)|(^\$0)/;var Ee=function(e,t,n,r){const a={};let u,o={},s={};function l(e){return!e.getUsageInstance().getUsageDisabled()&&0===e.getUsageInstance().getUsage().length}function c(e,t){const n=Fe.test(t.original)?t.original.replace(Fe,"").trim():t.original,r=e.filter(e=>!Fe.test(e));return r.push(n),`$0 ${r.join(" ")}`}function h(e,t,n,r){const i=e.cmd[0];e.variadic?n[i]=t._.splice(0).map(String):t._.length&&(n[i]=[String(t._.shift())])}function f(t,n,r){const i=Object.assign({},e.getOptions());i.default=Object.assign(r.default,i.default),i.alias=Object.assign(r.alias,i.alias),i.array=i.array.concat(r.array),delete i.config;const a=[];if(Object.keys(n).forEach(e=>{n[e].map(t=>{i.configuration["unknown-options-as-args"]&&(i.key[e]=!0),a.push(`--${e}`),a.push(t)})}),!a.length)return;const u=Object.assign({},i.configuration,{"populate--":!0}),o=he.detailed(a,Object.assign({},i,{configuration:u}));if(o.error)e.getUsageInstance().fail(o.error.message,o.error);else{const e=Object.keys(n);Object.keys(n).forEach(t=>{[].push.apply(e,o.aliases[t])}),Object.keys(o.argv).forEach(r=>{-1!==e.indexOf(r)&&(n[r]||(n[r]=o.argv[r]),t[r]=o.argv[r])})}}r=r||[],a.addHandler=function(e,n,r,l,c){let h=[];const f=_e(c);if(l=l||(()=>{}),Array.isArray(e))h=e.slice(1),e=e[0];else if("object"==typeof e){let t=Array.isArray(e.command)||"string"==typeof e.command?e.command:function(e){const t=function(e){for(var t,n=0,r=Object.keys(D.cache);n<r.length;n++)if((t=D.cache[r[n]]).exports===e)return t;return null}(e);if(!t)throw new Error(`No command name given for module: ${ye(e)}`);return n=t.filename,i.basename(n,i.extname(n));var n}(e);return e.aliases&&(t=[].concat(t).concat(e.aliases)),void a.addHandler(t,function(e){for(let t,n=["describe","description","desc"],r=0,i=n.length;r<i;r++)if(t=e[n[r]],"string"==typeof t||"boolean"==typeof t)return t;return!1}(e),e.builder,e.handler,e.middlewares)}if("object"==typeof r&&r.builder&&"function"==typeof r.handler)return void a.addHandler([e].concat(h),n,r.builder,r.handler,r.middlewares);const d=a.parseCommand(e);h=h.map(e=>a.parseCommand(e).cmd);let p=!1;const g=[d.cmd].concat(h).filter(e=>!Fe.test(e)||(p=!0,!1));0===g.length&&p&&g.push("$0"),p&&(d.cmd=g[0],h=g.slice(1),e=e.replace(Fe,d.cmd)),h.forEach(e=>{s[e]=d.cmd}),!1!==n&&t.command(e,n,p,h),o[d.cmd]={original:e,description:n,handler:l,builder:r||{},middlewares:f,demanded:d.demanded,optional:d.optional},p&&(u=o[d.cmd])},a.addDirectory=function(e,t,n,r,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const u="function"==typeof i.visit?i.visit:e=>e;i.visit=function(e,n,r){const i=u(e,n,r);if(i){if(~t.files.indexOf(n))return i;t.files.push(n),a.addHandler(i)}return i},me({require:n,filename:r},e,i)},a.parseCommand=function(e){const t=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r={cmd:t.shift().replace(n,""),demanded:[],optional:[]};return t.forEach((e,i)=>{let a=!1;e=e.replace(/\s/g,""),/\.+[\]>]/.test(e)&&i===t.length-1&&(a=!0),/^\[/.test(e)?r.optional.push({cmd:e.replace(n,"").split("|"),variadic:a}):r.demanded.push({cmd:e.replace(n,"").split("|"),variadic:a})}),r},a.getCommands=()=>Object.keys(o).concat(Object.keys(s)),a.getCommandHandlers=()=>o,a.hasDefaultCommand=()=>!!u,a.runCommand=function(e,t,i,D){let d=i.aliases;const p=o[e]||o[s[e]]||u,g=t.getContext();let m=g.files.length;const b=g.commands.slice();let y=i.argv,C=null,_={};e&&(g.commands.push(e),g.fullCommands.push(p.original)),"function"==typeof p.builder?(C=p.builder(t.reset(i.aliases)),C&&"function"==typeof C._parseArgs||(C=t),l(C)&&C.getUsageInstance().usage(c(b,p),p.description),y=C._parseArgs(null,null,!0,D),d=C.parsed.aliases):"object"==typeof p.builder&&(C=t.reset(i.aliases),l(C)&&C.getUsageInstance().usage(c(b,p),p.description),Object.keys(p.builder).forEach(e=>{C.option(e,p.builder[e])}),y=C._parseArgs(null,null,!0,D),d=C.parsed.aliases),t._hasOutput()||(_=function(e,t,r,i){t._=t._.slice(r.commands.length);const u=e.demanded.slice(0),o=e.optional.slice(0),s={};n.positionalCount(u.length,t._.length);for(;u.length;){h(u.shift(),t,s)}for(;o.length;){h(o.shift(),t,s)}return t._=r.commands.concat(t._),f(t,s,a.cmdToParseOptions(e.original)),s}(p,y,g));const F=r.slice(0).concat(p.middlewares);if(Ce(y,t,F,!0),t._hasOutput()||t._runValidation(y,d,_,t.parsed.error),p.handler&&!t._hasOutput()){let e;t._setHasOutput(),!!t.getOptions().configuration["populate--"]||t._copyDoubleDash(y),y=Ce(y,t,F,!1),e=re(y)?y.then(e=>p.handler(e)):p.handler(y);const n=t.getHandlerFinishCommand();re(e)?(t.getUsageInstance().cacheHelpMessage(),e.then(e=>{n&&n(e)}).catch(e=>{try{t.getUsageInstance().fail(null,e)}catch(e){}})):n&&n(e)}return e&&(g.commands.pop(),g.fullCommands.pop()),m=g.files.length-m,m>0&&g.files.splice(-1*m,m),y},a.runDefaultBuilderOn=function(e){if(l(e)){const t=Fe.test(u.original)?u.original:u.original.replace(/^[^[\]<>]*/,"$0 ");e.getUsageInstance().usage(t,u.description)}const t=u.builder;"function"==typeof t?t(e):Object.keys(t).forEach(n=>{e.option(n,t[n])})},a.cmdToParseOptions=function(e){const t={array:[],default:{},alias:{},demand:{}},n=a.parseCommand(e);return n.demanded.forEach(e=>{const n=e.cmd.slice(0),r=n.shift();e.variadic&&(t.array.push(r),t.default[r]=[]),n.forEach(e=>{t.alias[r]=e}),t.demand[r]=!0}),n.optional.forEach(e=>{const n=e.cmd.slice(0),r=n.shift();e.variadic&&(t.array.push(r),t.default[r]=[]),n.forEach(e=>{t.alias[r]=e})}),t},a.reset=()=>(o={},s={},u=void 0,a);let d=[];return a.freeze=()=>{let e={};d.push(e),e.handlers=o,e.aliasMap=s,e.defaultCommand=u},a.unfreeze=()=>{let e=d.pop();o=e.handlers,s=e.aliasMap,u=e.defaultCommand},a};function we(e){this.name="YError",this.message=e||"yargs error",Error.captureStackTrace(this,we)}we.prototype=Object.create(Error.prototype),we.prototype.constructor=we;var ve=we,ke=function(e,t,n){try{let r=0,i={demanded:[],optional:[]};"object"==typeof e?(n=t,t=e):i=Be.parseCommand(`cmd ${e}`);const a=[].slice.call(t);for(;a.length&&void 0===a[a.length-1];)a.pop();if((n=n||a.length)<i.demanded.length)throw new ve(`Not enough arguments provided. Expected ${i.demanded.length} but received ${a.length}.`);const u=i.demanded.length+i.optional.length;if(n>u)throw new ve(`Too many arguments provided. Expected max ${u} but received ${n}.`);i.demanded.forEach(e=>{const t=xe(a.shift());0===e.cmd.filter(e=>e===t||"*"===e).length&&Se(t,e.cmd,r,!1),r+=1}),i.optional.forEach(e=>{if(0===a.length)return;const t=xe(a.shift());0===e.cmd.filter(e=>e===t||"*"===e).length&&Se(t,e.cmd,r,!0),r+=1})}catch(e){console.warn(e.stack)}};const Be=Ee(),Ae=["first","second","third","fourth","fifth","sixth"];function xe(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function Se(e,t,n,r){throw new ve(`Invalid ${Ae[n]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var Oe={completionShTemplate:'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n#    or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_yargs_completions()\n{\n    local cur_word args type_list\n\n    cur_word="${COMP_WORDS[COMP_CWORD]}"\n    args=("${COMP_WORDS[@]}")\n\n    # ask yargs to generate completions.\n    type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n    COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n    # if no match was found, fall back to filename completion\n    if [ ${#COMPREPLY[@]} -eq 0 ]; then\n      COMPREPLY=()\n    fi\n\n    return 0\n}\ncomplete -o default -F _yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n',completionZshTemplate:'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n#    or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n  local reply\n  local si=$IFS\n  IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n  IFS=$si\n  _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n'},je=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const Te=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var Ie=Te,Le=Te;Ie.default=Le;const ze=e=>{if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g,"  "))||0===e.length)return 0;e=je(e);let t=0;for(let n=0;n<e.length;n++){const r=e.codePointAt(n);r<=31||r>=127&&r<=159||(r>=768&&r<=879||(r>65535&&n++,t+=Ie(r)?2:1))}return t};var Re=ze,Me=ze;Re.default=Me;var Ne=function(e,t){const n={};return t=t||((e,t)=>!0),Object.keys(e||{}).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n},Pe=function(e){[process.stdout,process.stderr].forEach((function(t){t._handle&&t.isTTY&&"function"==typeof t._handle.setBlocking&&t._handle.setBlocking(e)}))},$e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Ue={};for(const e of Object.keys($e))Ue[$e[e]]=e;const We={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ze=We;for(const e of Object.keys(We)){if(!("channels"in We[e]))throw new Error("missing channels property: "+e);if(!("labels"in We[e]))throw new Error("missing channel labels property: "+e);if(We[e].labels.length!==We[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=We[e];delete We[e].channels,delete We[e].labels,Object.defineProperty(We[e],"channels",{value:t}),Object.defineProperty(We[e],"labels",{value:n})}function qe(e){const t=function(){const e={},t=Object.keys(Ze);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){const e=n.pop(),r=Object.keys(Ze[e]);for(let i=r.length,a=0;a<i;a++){const i=r[a],u=t[i];-1===u.distance&&(u.distance=t[e].distance+1,u.parent=e,n.unshift(i))}}return t}function He(e,t){return function(n){return t(e(n))}}function Ke(e,t){const n=[t[e].parent,e];let r=Ze[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=He(Ze[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}We.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),u=a-i;let o,s;a===i?o=0:t===a?o=(n-r)/u:n===a?o=2+(r-t)/u:r===a&&(o=4+(t-n)/u),o=Math.min(60*o,360),o<0&&(o+=360);const l=(i+a)/2;return s=a===i?0:l<=.5?u/(a+i):u/(2-a-i),[o,100*s,100*l]},We.rgb.hsv=function(e){let t,n,r,i,a;const u=e[0]/255,o=e[1]/255,s=e[2]/255,l=Math.max(u,o,s),c=l-Math.min(u,o,s),D=function(e){return(l-e)/6/c+.5};return 0===c?(i=0,a=0):(a=c/l,t=D(u),n=D(o),r=D(s),u===l?i=r-n:o===l?i=1/3+t-r:s===l&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*l]},We.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=We.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*a,100*r]},We.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},We.rgb.keyword=function(e){const t=Ue[e];if(t)return t;let n,r=1/0;for(const t of Object.keys($e)){const u=(a=$e[t],((i=e)[0]-a[0])**2+(i[1]-a[1])**2+(i[2]-a[2])**2);u<r&&(r=u,n=t)}var i,a;return n},We.keyword.rgb=function(e){return $e[e]},We.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},We.rgb.lab=function(e){const t=We.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},We.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,a,u;if(0===n)return u=255*r,[u,u,u];i=r<.5?r*(1+n):r+n-r*n;const o=2*r-i,s=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,u=6*a<1?o+6*(i-o)*a:2*a<1?i:3*a<2?o+(i-o)*(2/3-a)*6:o,s[e]=255*u;return s},We.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},We.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,a=t-Math.floor(t),u=255*r*(1-n),o=255*r*(1-n*a),s=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,s,u];case 1:return[o,r,u];case 2:return[u,r,s];case 3:return[u,o,r];case 4:return[s,u,r];case 5:return[r,u,o]}},We.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let a,u;u=(2-n)*r;const o=(2-n)*i;return a=n*i,a/=o<=1?o:2-o,a=a||0,u/=2,[t,100*a,100*u]},We.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let a;i>1&&(n/=i,r/=i);const u=Math.floor(6*t),o=1-r;a=6*t-u,0!=(1&u)&&(a=1-a);const s=n+a*(o-n);let l,c,D;switch(u){default:case 6:case 0:l=o,c=s,D=n;break;case 1:l=s,c=o,D=n;break;case 2:l=n,c=o,D=s;break;case 3:l=n,c=s,D=o;break;case 4:l=s,c=n,D=o;break;case 5:l=o,c=n,D=s}return[255*l,255*c,255*D]},We.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},We.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,a,u;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,u=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,u=u>.0031308?1.055*u**(1/2.4)-.055:12.92*u,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),u=Math.min(Math.max(0,u),1),[255*i,255*a,255*u]},We.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},We.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const i=n**3,a=t**3,u=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=u>.008856?u:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},We.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},We.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},We.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let a=null===t?We.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let u=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===a&&(u+=60),u},We.hsv.ansi16=function(e){return We.rgb.ansi16(We.hsv.rgb(e),e[2])},We.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},We.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},We.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},We.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},We.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},We.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),u=i-a;let o,s;return o=u<1?a/(1-u):0,s=u<=0?0:i===t?(n-r)/u%6:i===n?2+(r-t)/u:4+(t-n)/u,s/=6,s%=1,[360*s,100*u,100*o]},We.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},We.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},We.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],a=t%1*6,u=a%1,o=1-u;let s=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=u,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=u;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=u,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return s=(1-n)*r,[255*(n*i[0]+s),255*(n*i[1]+s),255*(n*i[2]+s)]},We.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},We.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},We.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},We.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},We.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},We.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},We.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},We.gray.hsl=function(e){return[0,0,e[0]]},We.gray.hsv=We.gray.hsl,We.gray.hwb=function(e){return[0,100,e[0]]},We.gray.cmyk=function(e){return[0,0,0,e[0]]},We.gray.lab=function(e){return[e[0],0,0]},We.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},We.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Ve={};Object.keys(Ze).forEach(e=>{Ve[e]={},Object.defineProperty(Ve[e],"channels",{value:Ze[e].channels}),Object.defineProperty(Ve[e],"labels",{value:Ze[e].labels});const t=function(e){const t=qe(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){const e=r[i];null!==t[e].parent&&(n[e]=Ke(e,t))}return n}(e);Object.keys(t).forEach(n=>{const r=t[n];Ve[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(r),Ve[e][n].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)})});var Ge=Ve,Ye=h((function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},i=e=>e,a=(e,t,n)=>[e,t,n],u=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let o;const s=(e,t,n,r)=>{void 0===o&&(o=Ge);const i=r?10:0,a={};for(const[r,u]of Object.entries(o)){const o="ansi16"===r?"ansi":r;r===t?a[o]=e(n,i):"object"==typeof u&&(a[o]=e(u[t],i))}return a};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(const[t,n]of Object.entries(o)){for(const[t,r]of Object.entries(n))o[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=o[t],e.set(r[0],r[1]);Object.defineProperty(o,t,{value:n,enumerable:!1})}return Object.defineProperty(o,"codes",{value:e,enumerable:!1}),o.color.close="[39m",o.bgColor.close="[49m",u(o.color,"ansi",()=>s(t,"ansi16",i,!1)),u(o.color,"ansi256",()=>s(n,"ansi256",i,!1)),u(o.color,"ansi16m",()=>s(r,"rgb",a,!1)),u(o.bgColor,"ansi",()=>s(t,"ansi16",i,!0)),u(o.bgColor,"ansi256",()=>s(n,"ansi256",i,!0)),u(o.bgColor,"ansi16m",()=>s(r,"rgb",a,!0)),o}})}));const Xe=new Set(["",""]),Je=e=>`${Xe.values().next().value}[${e}m`,Qe=(e,t,n)=>{const r=[...t];let i=!1,a=Re(je(e[e.length-1]));for(const[t,u]of r.entries()){const o=Re(u);if(a+o<=n?e[e.length-1]+=u:(e.push(u),a=0),Xe.has(u))i=!0;else if(i&&"m"===u){i=!1;continue}i||(a+=o,a===n&&t<r.length-1&&(e.push(""),a=0))}!a&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},et=e=>{const t=e.split(" ");let n=t.length;for(;n>0&&!(Re(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")},tt=(e,t,n={})=>{if(!1!==n.trim&&""===e.trim())return"";let r,i="",a="";const u=(e=>e.split(" ").map(e=>Re(e)))(e);let o=[""];for(const[r,i]of e.split(" ").entries()){!1!==n.trim&&(o[o.length-1]=o[o.length-1].trimLeft());let e=Re(o[o.length-1]);if(0!==r&&(e>=t&&(!1===n.wordWrap||!1===n.trim)&&(o.push(""),e=0),(e>0||!1===n.trim)&&(o[o.length-1]+=" ",e++)),n.hard&&u[r]>t){const n=t-e,a=1+Math.floor((u[r]-n-1)/t);Math.floor((u[r]-1)/t)<a&&o.push(""),Qe(o,i,t)}else{if(e+u[r]>t&&e>0&&u[r]>0){if(!1===n.wordWrap&&e<t){Qe(o,i,t);continue}o.push("")}e+u[r]>t&&!1===n.wordWrap?Qe(o,i,t):o[o.length-1]+=i}}!1!==n.trim&&(o=o.map(et)),i=o.join("\n");for(const[e,t]of[...i].entries()){if(a+=t,Xe.has(t)){const t=parseFloat(/\d[^m]*/.exec(i.slice(e,e+4)));r=39===t?null:t}const n=Ye.codes.get(Number(r));r&&n&&("\n"===i[e+1]?a+=Je(n):"\n"===t&&(a+=Je(r)))}return a};const nt={right:function(e,t){e=e.trim();const n=Re(e);if(n<t)return" ".repeat(t-n)+e;return e},center:function(e,t){e=e.trim();const n=Re(e);if(n>=t)return e;return" ".repeat(t-n>>1)+e}};class rt{constructor(e){this.width=e.width,this.wrap=e.wrap,this.rows=[]}span(...e){this.div(...e).span=!0}resetOutput(){this.rows=[]}div(...e){if(0===e.length&&this.div(""),this.wrap&&this._shouldApplyLayoutDSL(...e))return this._applyLayoutDSL(e[0]);const t=e.map(e=>"string"==typeof e?this._colFromString(e):e);return this.rows.push(t),t}_shouldApplyLayoutDSL(...e){return 1===e.length&&"string"==typeof e[0]&&/[\t\n]/.test(e[0])}_applyLayoutDSL(e){const t=e.split("\n").map(e=>e.split("\t"));let n=0;return t.forEach(e=>{e.length>1&&Re(e[0])>n&&(n=Math.min(Math.floor(.5*this.width),Re(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this._measurePadding(t),width:0===r&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}_colFromString(e){return{text:e,padding:this._measurePadding(e)}}_measurePadding(e){const t=je(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){const e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join("\n")}rowToString(e,t){return this._rasterize(e).forEach((n,r)=>{let i="";n.forEach((n,a)=>{const{width:u}=e[a],o=this._negatePadding(e[a]);let s=n;o>Re(n)&&(s+=" ".repeat(o-Re(n))),e[a].align&&"left"!==e[a].align&&this.wrap&&(s=nt[e[a].align](s,o),Re(s)<o&&(s+=" ".repeat(u-Re(s)-1)));const l=e[a].padding||[0,0,0,0];l[3]&&(i+=" ".repeat(l[3])),i+=it(e[a],s,"| "),i+=s,i+=it(e[a],s," |"),l[1]&&(i+=" ".repeat(l[1])),0===r&&t.length>0&&(i=this._renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,""),span:e.span})}),t}_renderInline(e,t){const n=e.match(/^ */)[0].length,r=t.text,i=Re(r.trimRight());return t.span?this.wrap?n<i?e:(t.hidden=!0,r.trimRight()+" ".repeat(n-i)+e.trimLeft()):(t.hidden=!0,r+e):e}_rasterize(e){const t=[],n=this._columnWidths(e);let r;return e.forEach((e,i)=>{var a,u,o;e.width=n[i],r=this.wrap?(a=e.text,u=this._negatePadding(e),o={hard:!0},String(a).normalize().replace(/\r\n/g,"\n").split("\n").map(e=>tt(e,u,o)).join("\n")).split("\n"):e.text.split("\n"),e.border&&(r.unshift("."+"-".repeat(this._negatePadding(e)+2)+"."),r.push("'"+"-".repeat(this._negatePadding(e)+2)+"'")),e.padding&&(r.unshift(...new Array(e.padding[0]||0).fill("")),r.push(...new Array(e.padding[2]||0).fill(""))),r.forEach((e,n)=>{t[n]||t.push([]);const r=t[n];for(let e=0;e<i;e++)void 0===r[e]&&r.push("");r.push(e)})}),t}_negatePadding(e){let t=e.width;return e.padding&&(t-=(e.padding[3]||0)+(e.padding[1]||0)),e.border&&(t-=4),t}_columnWidths(e){if(!this.wrap)return e.map(e=>e.width||Re(e.text));let t=e.length,n=this.width;const r=e.map(e=>{if(e.width)return t--,n-=e.width,e.width}),i=t?Math.floor(n/t):0;return r.map((t,n)=>void 0===t?Math.max(i,function(e){const t=e.padding||[],n=1+(t[3]||0)+(t[1]||0);if(e.border)return n+4;return n}(e[n])):t)}}function it(e,t,n){return e.border?/[.']-+[.']/.test(t)?"":0!==t.trim().length?n:"  ":""}function at(){if("object"==typeof process&&process.stdout&&process.stdout.columns)return process.stdout.columns}var ut=function(e,t){const n=t.__,r={},a=[];r.failFn=function(e){a.push(e)};let u=null,o=!0;r.showHelpOnFail=function(e,t){return"string"==typeof e?(t=e,e=!0):void 0===e&&(e=!0),u=t,o=e,r};let s=!1;r.fail=function(t,n){const i=e._getLoggerInstance();if(!a.length){if(e.getExitProcess()&&Pe(!0),s||(s=!0,o&&(e.showHelp("error"),i.error()),(t||n)&&i.error(t||n),u&&((t||n)&&i.error(""),i.error(u))),n=n||new ve(t),e.getExitProcess())return e.exit(1);if(e._hasParseCallback())return e.exit(1,n);throw n}for(let e=a.length-1;e>=0;--e)a[e](t,n,r)};let l=[],c=!1;r.usage=(e,t)=>null===e?(c=!0,void(l=[])):(c=!1,l.push([e,t||""]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>c,r.getPositionalGroupName=()=>n("Positionals:");let D=[];r.example=(e,t)=>{D.push([e,t||""])};let h=[];r.command=function(e,t,n,r){n&&(h=h.map(e=>(e[2]=!1,e))),h.push([e,t||"",n,r])},r.getCommands=()=>h;let f={};r.describe=function(e,t){"object"==typeof e?Object.keys(e).forEach(t=>{r.describe(t,e[t])}):f[e]=t},r.getDescriptions=()=>f;let d=[];r.epilog=e=>{d.push(e)};let p,g=!1;function m(){return g||(p="object"==typeof process&&process.stdout&&process.stdout.columns?Math.min(80,process.stdout.columns):80,g=!0),p}r.wrap=e=>{g=!0,p=e};r.deferY18nLookup=e=>"__yargsString__:"+e;function b(e,t,n){let r=0;return Array.isArray(e)||(e=Object.keys(e).map(t=>[e[t]])),e.forEach(e=>{r=Math.max(Re(n?`${n} ${e[0]}`:e[0]),r)}),t&&(r=Math.min(r,parseInt(.5*t,10))),r}let y;function C(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}function _(e,t){let r=`[${n("default:")} `;if(void 0===e&&!t)return null;if(t)r+=t;else switch(typeof e){case"string":r+=`"${e}"`;break;case"object":r+=JSON.stringify(e);break;default:r+=e}return`${r}]`}r.help=function(){if(y)return y;!function(){const t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach(i=>{n.alias[i].forEach(a=>{f[a]&&r.describe(i,f[a]),a in t&&e.demandOption(i,t[a]),~n.boolean.indexOf(a)&&e.boolean(i),~n.count.indexOf(a)&&e.count(i),~n.string.indexOf(a)&&e.string(i),~n.normalize.indexOf(a)&&e.normalize(i),~n.array.indexOf(a)&&e.array(i),~n.number.indexOf(a)&&e.number(i)})})}();const t=e.customScriptName?e.$0:i.basename(e.$0),a=e.getDemandedOptions(),u=e.getDemandedCommands(),o=e.getGroups(),s=e.getOptions();let p=[];p=p.concat(Object.keys(f)),p=p.concat(Object.keys(a)),p=p.concat(Object.keys(u)),p=p.concat(Object.keys(s.default)),p=p.filter(C),p=Object.keys(p.reduce((e,t)=>("_"!==t&&(e[t]=!0),e),{}));const g=m(),F=function(e={}){return new rt({width:e.width||at()||80,wrap:!1!==e.wrap})}({width:g,wrap:!!g});if(!c)if(l.length)l.forEach(e=>{F.div(`${e[0].replace(/\$0/g,t)}`),e[1]&&F.div({text:`${e[1]}`,padding:[1,0,0,0]})}),F.div();else if(h.length){let e=null;e=u._?`${t} <${n("command")}>\n`:`${t} [${n("command")}]\n`,F.div(`${e}`)}if(h.length){F.div(n("Commands:"));const r=e.getContext(),i=r.commands.length?`${r.commands.join(" ")} `:"";!0===e.getParserConfiguration()["sort-commands"]&&(h=h.sort((e,t)=>e[0].localeCompare(t[0]))),h.forEach(e=>{const r=`${t} ${i}${e[0].replace(/^\$0 ?/,"")}`;F.span({text:r,padding:[0,2,0,2],width:b(h,g,`${t}${i}`)+4},{text:e[1]});const a=[];e[2]&&a.push(`[${n("default:").slice(0,-1)}]`),e[3]&&e[3].length&&a.push(`[${n("aliases:")} ${e[3].join(", ")}]`),a.length?F.div({text:a.join(" "),padding:[0,0,0,2],align:"right"}):F.div()}),F.div()}const E=(Object.keys(s.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);if(p=p.filter(t=>!e.parsed.newAliases[t]&&E.every(e=>-1===(s.alias[e]||[]).indexOf(t))),o["Options:"]||(o["Options:"]=[]),function(e,t,n){let r=[],i=null;Object.keys(n).forEach(e=>{r=r.concat(n[e])}),e.forEach(e=>{i=[e].concat(t[e]),i.some(e=>-1!==r.indexOf(e))||n["Options:"].push(e)})}(p,s.alias,o),Object.keys(o).forEach(e=>{if(!o[e].length)return;const t=o[e].filter(C).map(e=>{if(~E.indexOf(e))return e;for(let t,n=0;void 0!==(t=E[n]);n++)if(~(s.alias[t]||[]).indexOf(e))return t;return e});if(t.length<1)return;F.div(n(e));const i=t.reduce((t,n)=>(t[n]=[n].concat(s.alias[n]||[]).map(t=>e===r.getPositionalGroupName()?t:(/^[^0-9]$/.test(t)?"-":"--")+t).join(", "),t),{});t.forEach(e=>{const t=i[e];let u=f[e]||"",o=null;~u.lastIndexOf("__yargsString__:")&&(u=n(u.substring("__yargsString__:".length))),~s.boolean.indexOf(e)&&(o=`[${n("boolean")}]`),~s.count.indexOf(e)&&(o=`[${n("count")}]`),~s.string.indexOf(e)&&(o=`[${n("string")}]`),~s.normalize.indexOf(e)&&(o=`[${n("string")}]`),~s.array.indexOf(e)&&(o=`[${n("array")}]`),~s.number.indexOf(e)&&(o=`[${n("number")}]`);const l=[o,e in a?`[${n("required")}]`:null,s.choices&&s.choices[e]?`[${n("choices:")} ${r.stringifiedValues(s.choices[e])}]`:null,_(s.default[e],s.defaultDescription[e])].filter(Boolean).join(" ");F.span({text:t,padding:[0,2,0,2],width:b(i,g)+4},u),l?F.div({text:l,padding:[0,0,0,2],align:"right"}):F.div()}),F.div()}),D.length&&(F.div(n("Examples:")),D.forEach(e=>{e[0]=e[0].replace(/\$0/g,t)}),D.forEach(e=>{""===e[1]?F.div({text:e[0],padding:[0,2,0,2]}):F.div({text:e[0],padding:[0,2,0,2],width:b(D,g)+4},{text:e[1]})}),F.div()),d.length>0){const e=d.map(e=>e.replace(/\$0/g,t)).join("\n");F.div(`${e}\n`)}return F.toString().replace(/\s*$/,"")},r.cacheHelpMessage=function(){y=this.help()},r.showHelp=t=>{const n=e._getLoggerInstance();t||(t="error"),("function"==typeof t?t:n[t])(r.help())},r.functionDescription=e=>["(",e.name?se(e.name,"-"):n("generated-value"),")"].join(""),r.stringifiedValues=function(e,t){let n="";const r=t||", ",i=[].concat(e);return e&&i.length?(i.forEach(e=>{n.length&&(n+=r),n+=JSON.stringify(e)}),n):n};let F=null;r.version=e=>{F=e},r.showVersion=()=>{e._getLoggerInstance().log(F)},r.reset=function(e){return u=null,s=!1,l=[],c=!1,d=[],D=[],h=[],f=Ne(f,(t,n)=>!e[t]),r};let E=[];return r.freeze=function(){let e={};E.push(e),e.failMessage=u,e.failureOutput=s,e.usages=l,e.usageDisabled=c,e.epilogs=d,e.examples=D,e.commands=h,e.descriptions=f},r.unfreeze=function(){let e=E.pop();u=e.failMessage,s=e.failureOutput,l=e.usages,c=e.usageDisabled,d=e.epilogs,D=e.examples,h=e.commands,f=e.descriptions},r},ot=function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const n=[];let r,i;for(r=0;r<=t.length;r++)n[r]=[r];for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]};const st=["$0","--","_"];function lt(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles="boolean"!=typeof e.updateFiles||e.updateFiles,this.locale=e.locale||"en",this.fallbackToLanguage="boolean"!=typeof e.fallbackToLanguage||e.fallbackToLanguage,this.cache={},this.writeQueue=[]}lt.prototype.__=function(){if("string"!=typeof arguments[0])return this._taggedLiteral.apply(this,arguments);var e=Array.prototype.slice.call(arguments),t=e.shift(),n=function(){};return"function"==typeof e[e.length-1]&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite([this.directory,this.locale,n])):n(),u.format.apply(u,[this.cache[this.locale][t]||t].concat(e))},lt.prototype._taggedLiteral=function(e){var t=arguments,n="";return e.forEach((function(e,r){var i=t[r+1];n+=e,void 0!==i&&(n+="%s")})),this.__.apply(null,[n].concat([].slice.call(arguments,1)))},lt.prototype._enqueueWrite=function(e){this.writeQueue.push(e),1===this.writeQueue.length&&this._processWriteQueue()},lt.prototype._processWriteQueue=function(){var e=this,t=this.writeQueue[0],n=t[0],r=t[1],i=t[2],u=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);a.writeFile(u,o,"utf-8",(function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)}))},lt.prototype._readLocaleFile=function(){var e={},t=this._resolveLocaleFile(this.directory,this.locale);try{e=JSON.parse(a.readFileSync(t,"utf-8"))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+t),"ENOENT"!==n.code)throw n;e={}}this.cache[this.locale]=e},lt.prototype._resolveLocaleFile=function(e,t){var n=i.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){var r=i.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(n=r)}return n},lt.prototype._fileExistsSync=function(e){try{return a.statSync(e).isFile()}catch(e){return!1}},lt.prototype.__n=function(){var e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};"function"==typeof e[e.length-1]&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();var a=1===r?t:n;this.cache[this.locale][t]&&(a=this.cache[this.locale][t][1===r?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite([this.directory,this.locale,i])):i();var o=[a];return~a.indexOf("%d")&&o.push(r),u.format.apply(u,o.concat(e))},lt.prototype.setLocale=function(e){this.locale=e},lt.prototype.getLocale=function(){return this.locale},lt.prototype.updateLocale=function(e){for(var t in this.cache[this.locale]||this._readLocaleFile(),e)this.cache[this.locale][t]=e[t]};let ct=[];var Dt=function e(t,n,r){let u={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return u;const o=/\.json|\..*rc$/.test(t.extends);let s=null;if(o)s=function(e,t){return i.resolve(e,t)}(n,t.extends);else try{s=D.resolve(t.extends)}catch(e){}if(!s&&!o)return t;!function(e){if(ct.indexOf(e)>-1)throw new ve(`Circular extended configurations: '${e}'.`)}(s),ct.push(s),u=o?JSON.parse(a.readFileSync(s,"utf8")):D(t.extends),delete t.extends,u=e(u,i.dirname(s),r)}return ct=[],r?function e(t,n){const r={},i=e=>e&&"object"==typeof e&&!Array.isArray(e);Object.assign(r,t);for(let a of Object.keys(n))i(n[a])&&i(r[a])?r[a]=e(t[a],n[a]):r[a]=n[a];return r}(u,t):Object.assign({},u,t)},ht=function(e){if(void 0===e&&(e=2),e>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+e+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var t=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var n=(new Error).stack;if(Error.prepareStackTrace=t,null!==n&&"object"==typeof n)return n[e]?n[e].getFileName():void 0};const ft=(e,...t)=>new Promise(n=>{n(e(...t))});var dt=ft,pt=ft;dt.default=pt;const gt=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let n=0;const r=()=>{n--,t.length>0&&t.shift()()},i=(e,t,...i)=>{n++;const a=dt(e,...i);t(a),a.then(r,r)},a=(r,...a)=>new Promise(u=>((r,a,...u)=>{n<e?i(r,a,...u):t.push(i.bind(null,r,a,...u))})(r,u,...a));return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.length}}),a};var mt=gt,bt=gt;mt.default=bt;class yt extends Error{constructor(e){super(),this.value=e}}const Ct=async(e,t)=>t(await e),_t=async e=>{const t=await Promise.all(e);if(!0===t[1])throw new yt(t[0]);return!1},Ft=async(e,t,n)=>{n={concurrency:1/0,preserveOrder:!0,...n};const r=mt(n.concurrency),i=[...e].map(e=>[e,r(Ct,e,t)]),a=mt(n.preserveOrder?1:1/0);try{await Promise.all(i.map(e=>a(_t,e)))}catch(e){if(e instanceof yt)return e.value;throw e}};var Et=Ft,wt=Ft;Et.default=wt;const{promisify:vt}=u,kt=vt(a.stat),Bt=vt(a.lstat),At={directory:"isDirectory",file:"isFile"};function xt({type:e}){if(!(e in At))throw new Error(`Invalid type specified: ${e}`)}const St=(e,t)=>void 0===e||t[At[e]]();var Ot=async(e,t)=>{xt(t={cwd:process.cwd(),type:"file",allowSymlinks:!0,...t});const n=t.allowSymlinks?kt:Bt;return Et(e,async e=>{try{const r=await n(i.resolve(t.cwd,e));return St(t.type,r)}catch(e){return!1}},t)};Ot.sync=(e,t)=>{xt(t={cwd:process.cwd(),allowSymlinks:!0,type:"file",...t});const n=t.allowSymlinks?a.statSync:a.lstatSync;for(const r of e)try{const e=n(i.resolve(t.cwd,r));if(St(t.type,e))return r}catch(e){}};const{promisify:jt}=u,Tt=jt(a.access);var It=async e=>{try{return await Tt(e),!0}catch(e){return!1}};It.sync=e=>{try{return a.accessSync(e),!0}catch(e){return!1}};var Lt=h((function(e){const t=Symbol("findUp.stop");e.exports=async(e,n={})=>{let r=i.resolve(n.cwd||"");const{root:a}=i.parse(r),u=[].concat(e),o=async t=>{if("function"!=typeof e)return Ot(u,t);const n=await e(t.cwd);return"string"==typeof n?Ot([n],t):n};for(;;){const e=await o({...n,cwd:r});if(e===t)return;if(e)return i.resolve(r,e);if(r===a)return;r=i.dirname(r)}},e.exports.sync=(e,n={})=>{let r=i.resolve(n.cwd||"");const{root:a}=i.parse(r),u=[].concat(e),o=t=>{if("function"!=typeof e)return Ot.sync(u,t);const n=e(t.cwd);return"string"==typeof n?Ot.sync([n],t):n};for(;;){const e=o({...n,cwd:r});if(e===t)return;if(e)return i.resolve(r,e);if(r===a)return;r=i.dirname(r)}},e.exports.exists=It,e.exports.sync.exists=It.sync,e.exports.stop=t}));Lt.sync,Lt.exists,Lt.stop;var zt=h((function(e,t){const{globalMiddlewareFactory:n}=ie;function r(e,t){return i.relative(e,t)}(t=e.exports=function(e,t,u){e=e||[];const o={};let s=null,l=null,c={},h=[],f="",d={},p=null,g=null,m=null;const b=function(e){var t=new lt(e);for(var n in t)"function"==typeof t[n]&&(t[n]=t[n].bind(t));return t}({directory:i.resolve(__dirname,"./locales"),updateFiles:!1});o.middleware=n(h,o),t||(t=process.cwd());o.scriptName=function(e){return o.customScriptName=!0,o.$0=e,o},/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])?o.$0=process.argv.slice(1,2):o.$0=process.argv.slice(0,1);o.$0=o.$0.map((e,n)=>{const i=r(t,e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<e.length?i:e}).join(" ").trim(),void 0!==process.env._&&process.argv[1]===process.env._&&(o.$0=process.env._.replace(`${i.dirname(process.execPath)}/`,""));const y={resets:-1,commands:[],fullCommands:[],files:[]};let C;o.getContext=()=>y,o.resetOptions=o.reset=function(e){y.resets++,e=e||{},C=C||{};const t={};t.local=C.local?C.local:[],t.configObjects=C.configObjects?C.configObjects:[];const n={};t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(d,Object.keys(c).reduce((e,t)=>{const r=c[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),c={};return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach(e=>{t[e]=(C[e]||[]).filter(e=>!n[e])}),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","coerce"].forEach(e=>{t[e]=Ne(C[e],(e,t)=>!n[e])}),t.envPrefix=C.envPrefix,C=t,p=p?p.reset(n):ut(o,b),g=g?g.reset(n):function(e,t,n){const r=n.__,i=n.__n,a={nonOptionCount:function(n){const i=e.getDemandedCommands(),a=n._.length-e.getContext().commands.length;i._&&(a<i._.min||a>i._.max)&&(a<i._.min?void 0!==i._.minMsg?t.fail(i._.minMsg?i._.minMsg.replace(/\$0/g,a).replace(/\$1/,i._.min):null):t.fail(r("Not enough non-option arguments: got %s, need at least %s",a,i._.min)):a>i._.max&&(void 0!==i._.maxMsg?t.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,a).replace(/\$1/,i._.max):null):t.fail(r("Too many non-option arguments: got %s, maximum of %s",a,i._.max))))},positionalCount:function(e,n){n<e&&t.fail(r("Not enough non-option arguments: got %s, need at least %s",n,e))},requiredArguments:function(n){const r=e.getDemandedOptions();let a=null;if(Object.keys(r).forEach(e=>{n.hasOwnProperty(e)&&void 0!==n[e]||(a=a||{},a[e]=r[e])}),a){const e=[];Object.keys(a).forEach(t=>{const n=a[t];n&&e.indexOf(n)<0&&e.push(n)});const n=e.length?`\n${e.join("\n")}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(a).length,Object.keys(a).join(", ")+n))}},unknownArguments:function(n,r,u){const o=e.getCommandInstance().getCommands(),s=[],l=e.getContext();Object.keys(n).forEach(t=>{-1!==st.indexOf(t)||u.hasOwnProperty(t)||e._getParseContext().hasOwnProperty(t)||a.isValidAndSomeAliasIsNotNew(t,r)||s.push(t)}),(l.commands.length>0||o.length>0)&&n._.slice(l.commands.length).forEach(e=>{-1===o.indexOf(e)&&s.push(e)}),s.length>0&&t.fail(i("Unknown argument: %s","Unknown arguments: %s",s.length,s.join(", ")))},isValidAndSomeAliasIsNotNew:function(t,n){if(!n.hasOwnProperty(t))return!1;const r=e.parsed.newAliases;for(let e of[t,...n[t]])if(!r.hasOwnProperty(e)||!r[t])return!0;return!1},limitedChoices:function(n){const i=e.getOptions(),a={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach(e=>{-1===st.indexOf(e)&&i.choices.hasOwnProperty(e)&&[].concat(n[e]).forEach(t=>{-1===i.choices[e].indexOf(t)&&void 0!==t&&(a[e]=(a[e]||[]).concat(t))})});const u=Object.keys(a);if(!u.length)return;let o=r("Invalid values:");u.forEach(e=>{o+=`\n  ${r("Argument: %s, Given: %s, Choices: %s",e,t.stringifiedValues(a[e]),t.stringifiedValues(i.choices[e]))}`}),t.fail(o)}};let u=[];a.check=function(e,t){u.push({func:e,global:t})},a.customChecks=function(e,n){for(let i,a=0;void 0!==(i=u[a]);a++){const a=i.func;let u=null;try{u=a(e,n)}catch(e){t.fail(e.message?e.message:e,e);continue}u?("string"==typeof u||u instanceof Error)&&t.fail(u.toString(),u):t.fail(r("Argument check failed: %s",a.toString()))}};let o={};function s(e,t){let n=Number(t);return t="number"==typeof(t=isNaN(n)?t:n)?e._.length>=t:t.match(/^--no-.+/)?!e[t=t.match(/^--no-(.+)/)[1]]:e[t]}a.implies=function(t,n){ke("<string|object> [array|number|string]",[t,n],arguments.length),"object"==typeof t?Object.keys(t).forEach(e=>{a.implies(e,t[e])}):(e.global(t),o[t]||(o[t]=[]),Array.isArray(n)?n.forEach(e=>a.implies(t,e)):o[t].push(n))},a.getImplied=function(){return o},a.implications=function(e){const n=[];if(Object.keys(o).forEach(t=>{const r=t;(o[t]||[]).forEach(t=>{let i=r;const a=t;i=s(e,i),t=s(e,t),i&&!t&&n.push(` ${r} -> ${a}`)})}),n.length){let e=`${r("Implications failed:")}\n`;n.forEach(t=>{e+=t}),t.fail(e)}};let l={};a.conflicts=function(t,n){ke("<string|object> [array|string]",[t,n],arguments.length),"object"==typeof t?Object.keys(t).forEach(e=>{a.conflicts(e,t[e])}):(e.global(t),l[t]||(l[t]=[]),Array.isArray(n)?n.forEach(e=>a.conflicts(t,e)):l[t].push(n))},a.getConflicting=()=>l,a.conflicting=function(e){Object.keys(e).forEach(n=>{l[n]&&l[n].forEach(i=>{i&&void 0!==e[n]&&void 0!==e[i]&&t.fail(r("Arguments %s and %s are mutually exclusive",n,i))})})},a.recommendCommands=function(e,n){const i=ot;n=n.sort((e,t)=>t.length-e.length);let a=null,u=1/0;for(let t,r=0;void 0!==(t=n[r]);r++){const n=i(e,t);n<=3&&n<u&&(u=n,a=t)}a&&t.fail(r("Did you mean %s?",a))},a.reset=function(e){return o=Ne(o,(t,n)=>!e[t]),l=Ne(l,(t,n)=>!e[t]),u=u.filter(e=>e.global),a};let c=[];return a.freeze=function(){let e={};c.push(e),e.implied=o,e.checks=u,e.conflicting=l},a.unfreeze=function(){let e=c.pop();o=e.implied,u=e.checks,l=e.conflicting},a}(o,p,b),s=s?s.reset():Ee(o,p,g,h),l||(l=function(e,t,n){const r={completionKey:"get-yargs-completions"};let a;r.setParsed=function(e){a=e.aliases};const u=process.env.SHELL&&-1!==process.env.SHELL.indexOf("zsh")||process.env.ZSH_NAME&&-1!==process.env.ZSH_NAME.indexOf("zsh");r.getCompletion=function(r,i){const s=[],l=r.length?r[r.length-1]:"",c=e.parse(r,!0),D=e.getContext().commands;if(o){if(o.length<3){const e=o(l,c);return"function"==typeof e.then?e.then(e=>{process.nextTick(()=>{i(e)})}).catch(e=>{process.nextTick(()=>{throw e})}):i(e)}return o(l,c,e=>{i(e)})}const h=n.getCommandHandlers();for(let t=0,n=r.length;t<n;++t)if(h[r[t]]&&h[r[t]].builder){const n=h[r[t]].builder;if("function"==typeof n){const t=e.reset();return n(t),t.argv}}if(l.match(/^-/)||D[D.length-1]===l||t.getCommands().forEach(e=>{const t=n.parseCommand(e[0]).cmd;if(-1===r.indexOf(t))if(u){const n=e[1]||"";s.push(t.replace(/:/g,"\\:")+":"+n)}else s.push(t)}),l.match(/^-/)||""===l&&0===s.length){const n=t.getDescriptions();Object.keys(e.getOptions().key).forEach(e=>{if([e].concat(a[e]||[]).every(e=>-1===r.indexOf(`--${e}`))){const t=e=>/^[^0-9]$/.test(e),r=!(e=>/^--/.test(e))(l)&&t(e)?"-":"--";if(u){const t=n[e]||"";s.push(r+`${e.replace(/:/g,"\\:")}:${t.replace("__yargsString__:","")}`)}else s.push(r+e)}})}i(s)},r.generateCompletionScript=function(e,t){let n=u?Oe.completionZshTemplate:Oe.completionShTemplate;const r=i.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)};let o=null;return r.registerFunction=e=>{o=e},r}(o,p,s)),R=null,f="",P=null,N=!1,o.parsed=!1,o},o.resetOptions();let _=[];function F(){let e={};_.push(e),e.options=C,e.configObjects=C.configObjects.slice(0),e.exitProcess=z,e.groups=c,p.freeze(),g.freeze(),s.freeze(),e.strict=O,e.completionCommand=R,e.output=f,e.exitError=P,e.hasOutput=N,e.parsed=o.parsed,e.parseFn=x,e.parseContext=S,e.handlerFinishCommand=m}function E(){let e=_.pop();C=e.options,C.configObjects=e.configObjects,z=e.exitProcess,c=e.groups,f=e.output,P=e.exitError,N=e.hasOutput,o.parsed=e.parsed,p.unfreeze(),g.unfreeze(),s.unfreeze(),O=e.strict,R=e.completionCommand,x=e.parseFn,S=e.parseContext,m=e.handlerFinishCommand}function w(e,t,n){(t=[].concat(t)).forEach(t=>{C[e].push(t)})}function v(e,t,n,r,i){if(Array.isArray(r)){const t={};r.forEach(e=>{t[e]=i}),e(t)}else"object"==typeof r?Object.keys(r).forEach(t=>{e(t,r[t])}):C[n][r]=t?(C[n][r]||[]).concat(i):i}function k(e){Object.keys(C).forEach(t=>{const n=C[t];Array.isArray(n)?~n.indexOf(e)&&n.splice(n.indexOf(e),1):"object"==typeof n&&delete n[e]}),delete p.getDescriptions()[e]}o.boolean=function(e){return ke("<array|string>",[e],arguments.length),w("boolean",e),o},o.array=function(e){return ke("<array|string>",[e],arguments.length),w("array",e),o},o.number=function(e){return ke("<array|string>",[e],arguments.length),w("number",e),o},o.normalize=function(e){return ke("<array|string>",[e],arguments.length),w("normalize",e),o},o.count=function(e){return ke("<array|string>",[e],arguments.length),w("count",e),o},o.string=function(e){return ke("<array|string>",[e],arguments.length),w("string",e),o},o.requiresArg=function(e){return ke("<array|string>",[e],arguments.length),v(o.nargs,!1,"narg",e,1),o},o.skipValidation=function(e){return ke("<array|string>",[e],arguments.length),w("skipValidation",e),o},o.nargs=function(e,t){return ke("<string|object|array> [number]",[e,t],arguments.length),v(o.nargs,!1,"narg",e,t),o},o.choices=function(e,t){return ke("<object|string|array> [string|array]",[e,t],arguments.length),v(o.choices,!0,"choices",e,t),o},o.alias=function(e,t){return ke("<object|string|array> [string|array]",[e,t],arguments.length),v(o.alias,!0,"alias",e,t),o},o.default=o.defaults=function(e,t,n){return ke("<object|string|array> [*] [string]",[e,t,n],arguments.length),n&&(C.defaultDescription[e]=n),"function"==typeof t&&(C.defaultDescription[e]||(C.defaultDescription[e]=p.functionDescription(t)),t=t.call()),v(o.default,!1,"default",e,t),o},o.describe=function(e,t){return ke("<object|string|array> [string]",[e,t],arguments.length),v(o.describe,!1,"key",e,!0),p.describe(e,t),o},o.demandOption=function(e,t){return ke("<object|string|array> [string]",[e,t],arguments.length),v(o.demandOption,!1,"demandedOptions",e,t),o},o.coerce=function(e,t){return ke("<object|string|array> [function]",[e,t],arguments.length),v(o.coerce,!1,"coerce",e,t),o},o.config=function(e,n,r){return ke("[object|string] [string|function] [function]",[e,n,r],arguments.length),"object"==typeof e?(e=Dt(e,t,o.getParserConfiguration()["deep-merge-config"]),C.configObjects=(C.configObjects||[]).concat(e),o):("function"==typeof n&&(r=n,n=null),e=e||"config",o.describe(e,n||p.deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(e=>{C.config[e]=r||!0}),o)},o.example=function(e,t){return ke("<string> [string]",[e,t],arguments.length),p.example(e,t),o},o.command=function(e,t,n,r,i){return ke("<string|array|object> [string|boolean] [function|object] [function] [array]",[e,t,n,r,i],arguments.length),s.addHandler(e,t,n,r,i),o},o.commandDir=function(e,t){ke("<string> [object]",[e,t],arguments.length);const n=u||D;return s.addDirectory(e,o.getContext(),n,ht(),t),o},o.demand=o.required=o.require=function(e,t,n){return Array.isArray(t)?(t.forEach(e=>{o.demandOption(e,n)}),t=1/0):"number"!=typeof t&&(n=t,t=1/0),"number"==typeof e?o.demandCommand(e,t,n,n):Array.isArray(e)?e.forEach(e=>{o.demandOption(e,n)}):"string"==typeof n?o.demandOption(e,n):!0!==n&&void 0!==n||o.demandOption(e),o},o.demandCommand=function(e,t,n,r){return ke("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,n,r],arguments.length),void 0===e&&(e=1),"number"!=typeof t&&(n=t,t=1/0),o.global("_",!1),C.demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},o},o.getDemandedOptions=()=>(ke([],0),C.demandedOptions),o.getDemandedCommands=()=>(ke([],0),C.demandedCommands),o.implies=function(e,t){return ke("<string|object> [number|string|array]",[e,t],arguments.length),g.implies(e,t),o},o.conflicts=function(e,t){return ke("<string|object> [string|array]",[e,t],arguments.length),g.conflicts(e,t),o},o.usage=function(e,t,n,r){if(ke("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,n,r],arguments.length),void 0!==t){if((e||"").match(/^\$0( |$)/))return o.command(e,t,n,r);throw new ve(".usage() description must start with $0 if being used as alias for .command()")}return p.usage(e),o},o.epilogue=o.epilog=function(e){return ke("<string>",[e],arguments.length),p.epilog(e),o},o.fail=function(e){return ke("<function>",[e],arguments.length),p.failFn(e),o},o.onFinishCommand=function(e){return ke("<function>",[e],arguments.length),m=e,o},o.getHandlerFinishCommand=()=>m,o.check=function(e,t){return ke("<function> [boolean]",[e,t],arguments.length),g.check(e,!1!==t),o},o.global=function(e,t){return ke("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),!1!==t?C.local=C.local.filter(t=>-1===e.indexOf(t)):e.forEach(e=>{-1===C.local.indexOf(e)&&C.local.push(e)}),o},o.pkgConf=function(e,n){ke("<string> [string]",[e,n],arguments.length);let r=null;const i=A(n||t);return i[e]&&"object"==typeof i[e]&&(r=Dt(i[e],n||t,o.getParserConfiguration()["deep-merge-config"]),C.configObjects=(C.configObjects||[]).concat(r)),o};const B={};function A(e){const t=e||"*";if(B[t])return B[t];const n=Lt;let r={};try{let t=e||function(e){var t=(e=e||D).main;return t&&function(e){return/\\iisnode\\/.test(e.filename)}(t)?function(e){return e.children.length?e.children[0].filename:e.filename}(t):t?t.filename:process.cwd()}(u||D);!e&&i.extname(t)&&(t=i.dirname(t));const o=n.sync("package.json",{cwd:t});r=JSON.parse(a.readFileSync(o))}catch(e){}return B[t]=r||{},B[t]}let x=null,S=null;o.parse=function(t,n,r){if(ke("[string|array] [function|boolean|object] [function]",[t,n,r],arguments.length),F(),void 0===t){const t=o._parseArgs(e),n=o.parsed;return E(),o.parsed=n,t}"object"==typeof n&&(S=n,n=r),"function"==typeof n&&(x=n,n=null),n||(e=t),x&&(z=!1);const i=o._parseArgs(t,n);return l.setParsed(o.parsed),x&&x(P,i,f),E(),i},o._getParseContext=()=>S||{},o._hasParseCallback=()=>!!x,o.option=o.options=function(e,t){if(ke("<string|object> [object]",[e,t],arguments.length),"object"==typeof e)Object.keys(e).forEach(t=>{o.options(t,e[t])});else{"object"!=typeof t&&(t={}),C.key[e]=!0,t.alias&&o.alias(e,t.alias);const n=t.demand||t.required||t.require;n&&o.demand(e,n),t.demandOption&&o.demandOption(e,"string"==typeof t.demandOption?t.demandOption:void 0),"conflicts"in t&&o.conflicts(e,t.conflicts),"default"in t&&o.default(e,t.default),"implies"in t&&o.implies(e,t.implies),"nargs"in t&&o.nargs(e,t.nargs),t.config&&o.config(e,t.configParser),t.normalize&&o.normalize(e),"choices"in t&&o.choices(e,t.choices),"coerce"in t&&o.coerce(e,t.coerce),"group"in t&&o.group(e,t.group),(t.boolean||"boolean"===t.type)&&(o.boolean(e),t.alias&&o.boolean(t.alias)),(t.array||"array"===t.type)&&(o.array(e),t.alias&&o.array(t.alias)),(t.number||"number"===t.type)&&(o.number(e),t.alias&&o.number(t.alias)),(t.string||"string"===t.type)&&(o.string(e),t.alias&&o.string(t.alias)),(t.count||"count"===t.type)&&o.count(e),"boolean"==typeof t.global&&o.global(e,t.global),t.defaultDescription&&(C.defaultDescription[e]=t.defaultDescription),t.skipValidation&&o.skipValidation(e);const r=t.describe||t.description||t.desc;o.describe(e,r),t.hidden&&o.hide(e),t.requiresArg&&o.requiresArg(e)}return o},o.getOptions=()=>C,o.positional=function(e,t){if(ke("<string> <object>",[e,t],arguments.length),0===y.resets)throw new ve(".positional() can only be called in a command's builder function");const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=Ne(t,(e,t)=>{let r=-1!==n.indexOf(e);return"type"===e&&-1===["string","number","boolean"].indexOf(t)&&(r=!1),r});const r=y.fullCommands[y.fullCommands.length-1],i=r?s.cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Object.keys(i).forEach(n=>{Array.isArray(i[n])?-1!==i[n].indexOf(e)&&(t[n]=!0):!i[n][e]||n in t||(t[n]=i[n][e])}),o.group(e,p.getPositionalGroupName()),o.option(e,t)},o.group=function(e,t){ke("<string|array> <string>",[e,t],arguments.length);const n=d[t]||c[t];d[t]&&delete d[t];const r={};return c[t]=(n||[]).concat(e).filter(e=>!r[e]&&(r[e]=!0)),o},o.getGroups=()=>Object.assign({},c,d),o.env=function(e){return ke("[string|boolean]",[e],arguments.length),C.envPrefix=!1===e?void 0:e||"",o},o.wrap=function(e){return ke("<number|null|undefined>",[e],arguments.length),p.wrap(e),o};let O=!1;o.strict=function(e){return ke("[boolean]",[e],arguments.length),O=!1!==e,o},o.getStrict=()=>O;let j={};o.parserConfiguration=function(e){return ke("<object>",[e],arguments.length),j=e,o},o.getParserConfiguration=()=>j,o.showHelp=function(t){return ke("[string|function]",[t],arguments.length),o.parsed||o._parseArgs(e),s.hasDefaultCommand()&&(y.resets++,s.runDefaultBuilderOn(o,!0)),p.showHelp(t),o};let T=null;function I(){return A().version||"unknown"}o.version=function(e,t,n){const r="version";if(ke("[boolean|string] [string] [string]",[e,t,n],arguments.length),T&&(k(T),p.version(void 0),T=null),0===arguments.length)n=I(),e=r;else if(1===arguments.length){if(!1===e)return o;n=e,e=r}else 2===arguments.length&&(n=t,t=null);return T="string"==typeof e?e:r,t=t||p.deferY18nLookup("Show version number"),p.version(n||void 0),o.boolean(T),o.describe(T,t),o};let L=null;o.addHelpOpt=o.help=function(e,t){const n="help";return ke("[string|boolean] [string]",[e,t],arguments.length),L&&(k(L),L=null),1===arguments.length&&!1===e||(L="string"==typeof e?e:n,o.boolean(L),o.describe(L,t||p.deferY18nLookup("Show help"))),o};C.showHiddenOpt="show-hidden",o.addShowHiddenOpt=o.showHidden=function(e,t){if(ke("[string|boolean] [string]",[e,t],arguments.length),1===arguments.length&&!1===e)return o;const n="string"==typeof e?e:"show-hidden";return o.boolean(n),o.describe(n,t||p.deferY18nLookup("Show hidden options")),C.showHiddenOpt=n,o},o.hide=function(e){return ke("<string|object>",[e],arguments.length),C.hiddenOptions.push(e),o},o.showHelpOnFail=function(e,t){return ke("[boolean|string] [string]",[e,t],arguments.length),p.showHelpOnFail(e,t),o};var z=!0;o.exitProcess=function(e){return ke("[boolean]",[e],arguments.length),"boolean"!=typeof e&&(e=!0),z=e,o},o.getExitProcess=()=>z;var R=null;o.completion=function(e,t,n){return ke("[string] [string|boolean|function] [function]",[e,t,n],arguments.length),"function"==typeof t&&(n=t,t=null),R=e||R||"completion",t||!1===t||(t="generate completion script"),o.command(R,t),n&&l.registerFunction(n),o},o.showCompletionScript=function(e,t){return ke("[string] [string]",[e,t],arguments.length),e=e||o.$0,$.log(l.generateCompletionScript(e,t||R||"completion")),o},o.getCompletion=function(e,t){ke("<array> <function>",[e,t],arguments.length),l.getCompletion(e,t)},o.locale=function(e){return ke("[string]",[e],arguments.length),0===arguments.length?(W(),b.getLocale()):(M=!1,b.setLocale(e),o)},o.updateStrings=o.updateLocale=function(e){return ke("<object>",[e],arguments.length),M=!1,b.updateLocale(e),o};let M=!0;o.detectLocale=function(e){return ke("<boolean>",[e],arguments.length),M=e,o},o.getDetectLocale=()=>M;var N=!1,P=null;o.exit=(e,t)=>{N=!0,P=t,z&&process.exit(e)};const $={log(){const e=[];for(let t=0;t<arguments.length;t++)e.push(arguments[t]);o._hasParseCallback()||console.log.apply(console,e),N=!0,f.length&&(f+="\n"),f+=e.join(" ")},error(){const e=[];for(let t=0;t<arguments.length;t++)e.push(arguments[t]);o._hasParseCallback()||console.error.apply(console,e),N=!0,f.length&&(f+="\n"),f+=e.join(" ")}};let U;function W(){if(!M)return;const e=process.env.LC_ALL||process.env.LC_MESSAGES||process.env.LANG||process.env.LANGUAGE||"en_US";o.locale(e.replace(/[.:].*/,""))}return o._getLoggerInstance=()=>$,o._hasOutput=()=>N,o._setHasOutput=()=>{N=!0},o.recommendCommands=function(e){return ke("[boolean]",[e],arguments.length),U="boolean"!=typeof e||e,o},o.getUsageInstance=()=>p,o.getValidationInstance=()=>g,o.getCommandInstance=()=>s,o.terminalWidth=()=>(ke([],0),void 0!==process.stdout.columns?process.stdout.columns:null),Object.defineProperty(o,"argv",{get:()=>o._parseArgs(e),enumerable:!0}),o._parseArgs=function(t,n,r,i){let a=!!r;t=t||e,C.__=b.__,C.configuration=o.getParserConfiguration();const u=!!C.configuration["populate--"],c=Object.assign({},C.configuration,{"populate--":!0}),D=he.detailed(t,Object.assign({},C,{configuration:c}));let h=D.argv;S&&(h=Object.assign({},h,S));const f=D.aliases;h.$0=o.$0,o.parsed=D;try{if(W(),n)return u||r?h:o._copyDoubleDash(h);if(L){~[L].concat(f[L]||[]).filter(e=>e.length>1).indexOf(h._[h._.length-1])&&(h._.pop(),h[L]=!0)}const e=s.getCommands(),c=l.completionKey in h,d=h[L]||c,m=d&&(e.length>1||"$0"!==e[0]);if(h._.length){if(e.length){let t;for(let n,r=i||0;void 0!==h._[r];r++){if(n=String(h._[r]),~e.indexOf(n)&&n!==R){const e=s.runCommand(n,o,D,r+1);return u?e:o._copyDoubleDash(e)}if(!t&&n!==R){t=n;break}}if(s.hasDefaultCommand()&&!m){const e=s.runCommand(null,o,D);return u?e:o._copyDoubleDash(e)}U&&t&&!d&&g.recommendCommands(t,e)}R&&~h._.indexOf(R)&&!c&&(z&&Pe(!0),o.showCompletionScript(),o.exit(0))}else if(s.hasDefaultCommand()&&!m){const e=s.runCommand(null,o,D);return u?e:o._copyDoubleDash(e)}if(c){z&&Pe(!0);const e=t.slice(t.indexOf(`--${l.completionKey}`)+1);return l.getCompletion(e,e=>{(e||[]).forEach(e=>{$.log(e)}),o.exit(0)}),u||r?h:o._copyDoubleDash(h)}if(N||Object.keys(h).forEach(e=>{e===L&&h[e]?(z&&Pe(!0),a=!0,o.showHelp("log"),o.exit(0)):e===T&&h[e]&&(z&&Pe(!0),a=!0,p.showVersion(),o.exit(0))}),!a&&C.skipValidation.length>0&&(a=Object.keys(h).some(e=>C.skipValidation.indexOf(e)>=0&&!0===h[e])),!a){if(D.error)throw new ve(D.error.message);c||o._runValidation(h,f,{},D.error)}}catch(e){if(!(e instanceof ve))throw e;p.fail(e.message,e)}return u||r?h:o._copyDoubleDash(h)},o._copyDoubleDash=function(e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch(e){}return e},o._runValidation=function(e,t,n,r){if(r)throw new ve(r.message);g.nonOptionCount(e),g.requiredArguments(e),O&&g.unknownArguments(e,t,n),g.customChecks(e,t),g.limitedChoices(e),g.implications(e),g.conflicting(e)},o.help(),o.version(),o}).Parser=he,t.rebase=r}));zt.Parser,zt.rebase;Mt(process.argv.slice(2));var Rt=Mt;function Mt(e,t){const n=zt(e,t,D);var r;return r=n,Object.keys(r).forEach(e=>{"argv"===e?Mt.__defineGetter__(e,r.__lookupGetter__(e)):"function"==typeof r[e]?Mt[e]=r[e].bind(r):(Mt.__defineGetter__("$0",()=>r.$0),Mt.__defineGetter__("parsed",()=>r.parsed))}),n}var Nt={asyncForEach:async(e,t)=>{for(let n=0;n<e.length;n++)await t(e[n],n,e)},WAIT:async()=>new Promise(e=>{setTimeout(()=>{e("resolved")},0)}),pathOnly:e=>{let t=e;const n=e.split("/");return n[n.length-1].includes(".")&&(n.pop(),t=n.join("/")),t},isDir:e=>!i.extname(i.basename(e)),getExt:e=>i.extname(e.replace(".template",""))};const Pt=a.promises,$t=Rt.argv,{WAIT:Ut}=Nt,Wt=async e=>{const t=[];let n=i.extname(i.basename(e.settings.destination));if(!!n){(await(async e=>({ext:await Pt.readdir(e.settings.templatePath).then(e=>e.map(e=>i.extname(e.replace(".template",""))))}))(e)).ext.includes(n)?e.settings.ext=[n.replace(".","")]:t.push("woops.. I don't know this extenstion")}return{...e,error:t}},Zt=e=>{const t=[];return e.settings.template&&e.settings.ext&&t.push("You can't use a template AND specify an output extension."),e.settings.template||e.settings.ext||t.push("You have to specify either an output extension or a template."),{...e,error:t}},qt=e=>("string"==typeof e.settings.ext&&(e.settings.ext=[e.settings.ext]),"string"==typeof e.settings.filename&&(e.settings.filename=[e.settings.filename]),"string"==typeof e.settings.template&&(e.settings.template=[e.settings.template]),{...e}),Ht=e=>{const t=[];return e.settings.ext&&e.settings.ext.includes("procreate")&&null==e.settings.title&&t.push("Procreate files need a title."),{...e,error:t}},Kt=async e=>(ne.BLOCK_START("Settings"),ne.BLOCK_SETTINGS(e.settings),e.error&&ne.BLOCK_ERRORS(e.error),e.warning&&ne.BLOCK_WARNINGS(e.warning),e);var Vt={SETTINGS:async()=>(async()=>(await Ut(),{settings:{title:$t.title?$t.title:null,source:$t.src?$t.src:null,destination:$t.dest?$t.dest:null,ext:$t.type?$t.type:null,template:$t.template?$t.template:null,prefix:$t.prefix?`${$t.prefix}-`:"",combine:!!$t.combine,filename:$t.filename?$t.filename:null,output:$t.output?$t.output:["hex"],templatePath:$t.templatePath?$t.templatePath:i.join(__dirname,"../../templates")}}))().then(Wt).then(Zt).then(qt).then(Ht).then(Kt).then(e=>e)};const{SETTINGS:Gt}=Vt,{WAIT:Yt}=Nt;var Xt={START:async()=>(await Yt(),ne.START("Start building!"),Gt)};const{pathOnly:Jt}=Nt,{lstat:Qt,mkdir:en}=a.promises;var tn={FOLDERS:async e=>{const t=Jt(e.settings.destination);try{await Qt(t)}catch(e){await en(t,{recursive:!0})}return e}};const nn=a.promises,{asyncForEach:rn}=Nt,an=e=>({...e,source:e.source.filter(e=>".json"==e.type)}),un=e=>(e.error&&ne.BLOCK_ERRORS(e.error),e.warning&&ne.BLOCK_WARNINGS(e.warning),e);var on={SOURCE:async e=>(async e=>{if(!e.settings.source)return{...e};let t=[],n=[],r=e.settings.source;return t=!i.extname(i.basename(r))?await nn.readdir(r).then(e=>e.map(e=>i.join(r,e))):[r],await rn(t,async e=>{const t=await nn.readFile(e).then(e=>e.toString());n.push({name:i.basename(e).replace(i.extname(e),""),file:i.basename(e),type:i.extname(i.basename(e)),path:r,data:t,parsed:JSON.parse(t)})}),{...e,source:n}})(e).then(an).then(un).then(e=>e)};const sn=a.promises,ln=e=>{if(!e.settings.template)return e;let t=[];return("string"==typeof e.settings.template?[e.settings.template]:e.settings.template).forEach(e=>{t.push({name:i.basename(e),file:e,path:e})}),{...e,templates:t}},cn=async e=>{if(e.settings.template)return e;let t=e.settings.ext;return{...e,templates:await sn.readdir(i.join(__dirname,"../../templates")).then(e=>e.filter(e=>t.includes(i.extname(e).replace(".",""))).map(e=>({name:i.basename(e),file:e,path:i.join(__dirname,"../../templates",e)})))}},Dn=async e=>{try{return Promise.all(e.templates.map(async e=>({...e,data:await sn.readFile(e.path).then(e=>e.toString())}))).then(t=>({...e,templates:t}))}catch(e){console.log(e)}},hn=e=>(e.templates.length>1?ne.BLOCK_MID("Template files"):ne.BLOCK_MID("Template file"),e.templates.forEach(e=>{ne.BLOCK_LINE(e.name)}),ne.BLOCK_LINE(),e.error&&ne.BLOCK_ERRORS(e.error),e.warning&&ne.BLOCK_WARNINGS(e.warning),e);var fn={TEMPLATES:async e=>(async e=>e)(e).then(ln).then(cn).then(Dn).then(hn).then(e=>e)};const dn=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null};const pn=e=>{const{r:t,g:n,b:r}=e;return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};var gn={...{hexToRgb:dn,hexToHsl:e=>{const t=dn(e),n=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(n,r,i),u=Math.min(n,r,i);let o=(a+u)/2,s=0,l=0;return a!=u&&(s=o<.5?(a-u)/(a+u):(a-u)/(2-a-u),l=n==a?(r-i)/(a-u):r==a?2+(i-n)/(a-u):4+(n-r)/(a-u)),o*=100,s*=100,l*=60,l<0&&(l+=360),result={h:l,s:s,l:o}},rgbToAnsi:pn,hexToAnsi:e=>pn(dn(e))},...{isHex:e=>/^#[0-9A-F]{6}$/i.test(e)}};const{hexToRgb:mn,hexToHsl:bn}=gn,{WAIT:yn}=Nt,{bold:Cn,yellow:_n}=w,Fn=e=>(e.source.length>1?ne.BLOCK_MID("Source Files"):ne.BLOCK_MID("Source File"),e.dataSets.forEach(e=>{ne.BLOCK_LINE(`${_n().bold(e.name.toUpperCase())}`),ne.BLOCK_LINE(),ne.BLOCK_ROW_LINE([`${Cn("name")}`,`${Cn("hex")}`,`${Cn("hsl")}`,`${Cn("rgb")}`]),ne.BLOCK_LINE(),e.colors.forEach(e=>{ne.BLOCK_ROW_LINE([e.name,e.hex,e.hsl,e.rgb])}),ne.BLOCK_LINE()}),e.error&&ne.BLOCK_ERRORS(e.error),e.warning&&ne.BLOCK_WARNINGS(e.warning),e),En=e=>{if(!e.settings.combine)return e;let t=e.dataSets[0];for(let n=1;n<e.dataSets.length;n++)t.colors=[...t.colors,...e.dataSets[n].colors];return{...e,dataSets:[t]}};var wn,vn={CONVERT:async e=>(async e=>{await yn();let t=[];return e.source.forEach(e=>{const n=[];Object.keys(e.parsed).forEach(t=>{const r=e.parsed[t];n.push({name:t,hex:r,rgb:mn(r),hsl:bn(r)})}),t.push({name:e.name,colors:n})}),{...e,dataSets:t}})(e).then(En).then(Fn).then(e=>e)},kn=h((function(e,t){var n=/[|\\{}()[\]^$+*?.]/g;t.escapeRegExpChars=function(e){return e?String(e).replace(n,"\\$&"):""};var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},i=/[&<>'"]/g;function a(e){return r[e]||e}t.escapeXML=function(e){return null==e?"":String(e).replace(i,a)},t.escapeXML.toString=function(){return Function.prototype.toString.call(this)+';\nvar _ENCODE_HTML_RULES = {\n      "&": "&amp;"\n    , "<": "&lt;"\n    , ">": "&gt;"\n    , \'"\': "&#34;"\n    , "\'": "&#39;"\n    }\n  , _MATCH_HTML = /[&<>\'"]/g;\nfunction encode_char(c) {\n  return _ENCODE_HTML_RULES[c] || c;\n};\n'},t.shallowCopy=function(e,t){for(var n in t=t||{})e[n]=t[n];return e},t.shallowCopyFromList=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];void 0!==t[i]&&(e[i]=t[i])}return e},t.cache={_data:{},set:function(e,t){this._data[e]=t},get:function(e){return this._data[e]},remove:function(e){delete this._data[e]},reset:function(){this._data={}}}})),Bn=(kn.escapeRegExpChars,kn.escapeXML,kn.shallowCopy,kn.shallowCopyFromList,kn.cache,"sha512-cuIMtJwxvzumSAkqaaoGY/L6Fc/t6YvoP9/VIaK0V/CyqKLEQ8sqODmYfy/cjXEdZ9+OOL8TecbJu+1RsofGDw=="),An={},xn={type:"range",registry:!0,raw:"ejs@^3.0.1",name:"ejs",escapedName:"ejs",rawSpec:"^3.0.1",saveSpec:null,fetchSpec:"^3.0.1"},Sn=["#USER","/"],On="https://registry.npmjs.org/ejs/-/ejs-3.0.1.tgz",jn="30c8f6ee9948502cc32e85c37a3f8b39b5a614a5",Tn="/Users/silvandiepen/Repos/_projects/guyner",In={name:"Matthew Eernisse",email:"mde@fleegix.org",url:"http://fleegix.org"},Ln={url:"https://github.com/mde/ejs/issues"},zn={},Rn={browserify:"^13.1.1",eslint:"^4.14.0","git-directory-deploy":"^1.5.1",jake:"^10.3.1",jsdoc:"^3.4.0","lru-cache":"^4.0.1",mocha:"^5.0.5","uglify-js":"^3.3.16"},Mn={node:">=0.10.0"},Nn="https://github.com/mde/ejs",Pn=["template","engine","ejs"],$n={type:"git",url:"git://github.com/mde/ejs.git"},Un={postinstall:"node ./postinstall.js",test:"mocha"},Wn={_from:"ejs@^3.0.1",_id:"ejs@3.0.1",_inBundle:!1,_integrity:Bn,_location:"/ejs",_phantomChildren:An,_requested:xn,_requiredBy:Sn,_resolved:On,_shasum:jn,_spec:"ejs@^3.0.1",_where:Tn,author:In,bugs:Ln,bundleDependencies:!1,dependencies:zn,deprecated:!1,description:"Embedded JavaScript templates",devDependencies:Rn,engines:Mn,homepage:Nn,keywords:Pn,license:"Apache-2.0",main:"./lib/ejs.js",name:"ejs",repository:$n,scripts:Un,version:"3.0.1"},Zn=(wn=Object.freeze({__proto__:null,_from:"ejs@^3.0.1",_id:"ejs@3.0.1",_inBundle:!1,_integrity:Bn,_location:"/ejs",_phantomChildren:An,_requested:xn,_requiredBy:Sn,_resolved:On,_shasum:jn,_spec:"ejs@^3.0.1",_where:Tn,author:In,bugs:Ln,bundleDependencies:!1,dependencies:zn,deprecated:!1,description:"Embedded JavaScript templates",devDependencies:Rn,engines:Mn,homepage:Nn,keywords:Pn,license:"Apache-2.0",main:"./lib/ejs.js",name:"ejs",repository:$n,scripts:Un,version:"3.0.1",default:Wn}))&&wn.default||wn,qn=h((function(e,t){
  /**
   * @file Embedded JavaScript templating engine. {@link http://ejs.co}
   * @author Matthew Eernisse <mde@fleegix.org>
   * @author Tiancheng "Timothy" Gu <timothygu99@gmail.com>
   * @project EJS
   * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
   */
  var n=!1,r=Zn.version,u=["delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace","strict","filename","async"],o=u.concat("cache"),s=/^\uFEFF/;function l(e,n){var r,i=e.filename,a=arguments.length>1;if(e.cache){if(!i)throw new Error("cache option requires a filename");if(r=t.cache.get(i))return r;a||(n=D(i).toString().replace(s,""))}else if(!a){if(!i)throw new Error("Internal EJS error: no file name or template provided");n=D(i).toString().replace(s,"")}return r=t.compile(n,e),e.cache&&t.cache.set(i,r),r}function c(e,n,r){var i;if(!r){if("function"==typeof t.promiseImpl)return new t.promiseImpl((function(t,r){try{t(i=l(e)(n))}catch(e){r(e)}}));throw new Error("Please provide a callback function")}try{i=l(e)(n)}catch(e){return r(e)}r(null,i)}function D(e){return t.fileLoader(e)}function h(e,n){var r=kn.shallowCopy({},n);return r.filename=function(e,n){var r,i,u=n.views,o=/^[A-Za-z]+:\\|^\//.exec(e);if(o&&o.length)r=t.resolveInclude(e.replace(/^\/*/,""),n.root||"/",!0);else if(n.filename&&(i=t.resolveInclude(e,n.filename),a.existsSync(i)&&(r=i)),r||Array.isArray(u)&&u.some((function(n){return i=t.resolveInclude(e,n,!0),a.existsSync(i)}))&&(r=i),!r)throw new Error('Could not find the include file "'+n.escapeFunction(e)+'"');return r}(e,r),l(r)}function f(e,t,n,r,i){var a=t.split("\n"),u=Math.max(r-3,0),o=Math.min(a.length,r+3),s=i(n),l=a.slice(u,o).map((function(e,t){var n=t+u+1;return(n==r?" >> ":"    ")+n+"| "+e})).join("\n");throw e.path=s,e.message=(s||"ejs")+":"+r+"\n"+l+"\n\n"+e.message,e}function d(e){return e.replace(/;(\s*$)/,"$1")}function p(e,n){n=n||{};var r={};this.templateText=e,this.mode=null,this.truncate=!1,this.currentLine=1,this.source="",this.dependencies=[],r.client=n.client||!1,r.escapeFunction=n.escape||n.escapeFunction||kn.escapeXML,r.compileDebug=!1!==n.compileDebug,r.debug=!!n.debug,r.filename=n.filename,r.openDelimiter=n.openDelimiter||t.openDelimiter||"<",r.closeDelimiter=n.closeDelimiter||t.closeDelimiter||">",r.delimiter=n.delimiter||t.delimiter||"%",r.strict=n.strict||!1,r.context=n.context,r.cache=n.cache||!1,r.rmWhitespace=n.rmWhitespace,r.root=n.root,r.outputFunctionName=n.outputFunctionName,r.localsName=n.localsName||t.localsName||"locals",r.views=n.views,r.async=n.async,r.destructuredLocals=n.destructuredLocals,r.legacyInclude=void 0===n.legacyInclude||!!n.legacyInclude,r.strict?r._with=!1:r._with=void 0===n._with||n._with,this.opts=r,this.regex=this.createRegex()}t.cache=kn.cache,t.fileLoader=a.readFileSync,t.localsName="locals",t.promiseImpl=new Function("return this;")().Promise,t.resolveInclude=function(e,t,n){var r=i.dirname,a=i.extname,u=(0,i.resolve)(n?t:r(t),e);return a(e)||(u+=".ejs"),u},t.compile=function(e,t){return t&&t.scope&&(n||(console.warn("`scope` option is deprecated and will be removed in EJS 3"),n=!0),t.context||(t.context=t.scope),delete t.scope),new p(e,t).compile()},t.render=function(e,t,n){var r=t||{},i=n||{};return 2==arguments.length&&kn.shallowCopyFromList(i,r,u),l(i,e)(r)},t.renderFile=function(){var e,t,n,r=Array.prototype.slice.call(arguments),i=r.shift(),a={filename:i};return"function"==typeof arguments[arguments.length-1]&&(e=r.pop()),r.length?(t=r.shift(),r.length?kn.shallowCopy(a,r.pop()):(t.settings&&(t.settings.views&&(a.views=t.settings.views),t.settings["view cache"]&&(a.cache=!0),(n=t.settings["view options"])&&kn.shallowCopy(a,n)),kn.shallowCopyFromList(a,t,o)),a.filename=i):t={},c(a,t,e)},t.Template=p,t.clearCache=function(){t.cache.reset()},p.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"},p.prototype={createRegex:function(){var e="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",t=kn.escapeRegExpChars(this.opts.delimiter),n=kn.escapeRegExpChars(this.opts.openDelimiter),r=kn.escapeRegExpChars(this.opts.closeDelimiter);return e=e.replace(/%/g,t).replace(/</g,n).replace(/>/g,r),new RegExp(e)},compile:function(){var e,t,n,r=this.opts,a="",u="",o=r.escapeFunction;if(!this.source){if(this.generateSource(),a+='  var __output = "";\n  function __append(s) { if (s !== undefined && s !== null) __output += s }\n',r.outputFunctionName&&(a+="  var "+r.outputFunctionName+" = __append;\n"),r.destructuredLocals&&r.destructuredLocals.length){for(var s="  var __locals = ("+r.localsName+" || {}),\n",l=0;l<r.destructuredLocals.length;l++){var c=r.destructuredLocals[l];l>0&&(s+=",\n  "),s+=c+" = __locals."+c}a+=s+";\n"}!1!==r._with&&(a+="  with ("+r.localsName+" || {}) {\n",u+="  }\n"),u+="  return __output;\n",this.source=a+this.source+u}e=r.compileDebug?"var __line = 1\n  , __lines = "+JSON.stringify(this.templateText)+"\n  , __filename = "+(r.filename?JSON.stringify(r.filename):"undefined")+";\ntry {\n"+this.source+"} catch (e) {\n  rethrow(e, __lines, __filename, __line, escapeFn);\n}\n":this.source,r.client&&(e="escapeFn = escapeFn || "+o.toString()+";\n"+e,r.compileDebug&&(e="rethrow = rethrow || "+f.toString()+";\n"+e)),r.strict&&(e='"use strict";\n'+e),r.debug&&console.log(e),r.compileDebug&&r.filename&&(e=e+"\n//# sourceURL="+r.filename+"\n");try{if(r.async)try{n=new Function("return (async function(){}).constructor;")()}catch(e){throw e instanceof SyntaxError?new Error("This environment does not support async/await"):e}else n=Function;t=new n(r.localsName+", escapeFn, include, rethrow",e)}catch(e){throw e instanceof SyntaxError&&(r.filename&&(e.message+=" in "+r.filename),e.message+=" while compiling ejs\n\n",e.message+="If the above error is not helpful, you may want to try EJS-Lint:\n",e.message+="https://github.com/RyanZim/EJS-Lint",r.async||(e.message+="\n",e.message+="Or, if you meant to create an async function, pass `async: true` as an option.")),e}var D=r.client?t:function(e){return t.apply(r.context,[e||{},o,function(t,n){var i=kn.shallowCopy({},e);return n&&(i=kn.shallowCopy(i,n)),h(t,r)(i)},f])};if(D.dependencies=this.dependencies,r.filename&&"function"==typeof Object.defineProperty){var d=r.filename,p=i.basename(d,i.extname(d));try{Object.defineProperty(D,"name",{value:p,writable:!1,enumerable:!1,configurable:!0})}catch(e){}}return D},generateSource:function(){this.opts.rmWhitespace&&(this.templateText=this.templateText.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var e=this,t=this.parseTemplateText(),n=this.opts.delimiter,r=this.opts.openDelimiter,i=this.opts.closeDelimiter;t&&t.length&&t.forEach((function(a,u){var o;if(0===a.indexOf(r+n)&&0!==a.indexOf(r+n+n)&&(o=t[u+2])!=n+i&&o!="-"+n+i&&o!="_"+n+i)throw new Error('Could not find matching close tag for "'+a+'".');e.scanLine(a)}))},parseTemplateText:function(){for(var e,t=this.templateText,n=this.regex,r=n.exec(t),i=[];r;)0!==(e=r.index)&&(i.push(t.substring(0,e)),t=t.slice(e)),i.push(r[0]),t=t.slice(r[0].length),r=n.exec(t);return t&&i.push(t),i},_addOutput:function(e){if(this.truncate&&(e=e.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!e)return e;e=(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/"/g,'\\"'),this.source+='    ; __append("'+e+'")\n'},scanLine:function(e){var t,n=this.opts.delimiter,r=this.opts.openDelimiter,i=this.opts.closeDelimiter;switch(t=e.split("\n").length-1,e){case r+n:case r+n+"_":this.mode=p.modes.EVAL;break;case r+n+"=":this.mode=p.modes.ESCAPED;break;case r+n+"-":this.mode=p.modes.RAW;break;case r+n+"#":this.mode=p.modes.COMMENT;break;case r+n+n:this.mode=p.modes.LITERAL,this.source+='    ; __append("'+e.replace(r+n+n,r+n)+'")\n';break;case n+n+i:this.mode=p.modes.LITERAL,this.source+='    ; __append("'+e.replace(n+n+i,n+i)+'")\n';break;case n+i:case"-"+n+i:case"_"+n+i:this.mode==p.modes.LITERAL&&this._addOutput(e),this.mode=null,this.truncate=0===e.indexOf("-")||0===e.indexOf("_");break;default:if(this.mode){switch(this.mode){case p.modes.EVAL:case p.modes.ESCAPED:case p.modes.RAW:e.lastIndexOf("//")>e.lastIndexOf("\n")&&(e+="\n")}switch(this.mode){case p.modes.EVAL:this.source+="    ; "+e+"\n";break;case p.modes.ESCAPED:this.source+="    ; __append(escapeFn("+d(e)+"))\n";break;case p.modes.RAW:this.source+="    ; __append("+d(e)+")\n";break;case p.modes.COMMENT:break;case p.modes.LITERAL:this._addOutput(e)}}else this._addOutput(e)}this.opts.compileDebug&&t&&(this.currentLine+=t,this.source+="    ; __line = "+this.currentLine+"\n")}},t.escapeXML=kn.escapeXML,t.__express=t.renderFile,t.VERSION=r,t.name="ejs","undefined"!=typeof window&&(window.ejs=t)}));qn.cache,qn.fileLoader,qn.localsName,qn.promiseImpl,qn.resolveInclude,qn.compile,qn.render,qn.renderFile,qn.Template,qn.clearCache,qn.escapeXML,qn.__express,qn.VERSION,qn.name;const Hn=e=>e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"$").replace(/[^A-Za-z0-9]+/g,"$").replace(/([a-z])([A-Z])/g,(e,t,n)=>t+"$"+n).toLowerCase().replace(/(\$)(\w?)/g,(e,t,n)=>n.toUpperCase()):"";var Kn={lowercase:e=>e.toLowerCase(),PascalCase:Hn,camelCase:e=>e?String(Hn(e).charAt(0).toLowerCase()+Hn(e).slice(1)):"",kebabCase:e=>e&&e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map(e=>e.toLowerCase()).join("-"),snake_case:e=>e&&e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map(e=>e.toLowerCase()).join("_"),toRoundNumber:(e,t=2)=>Number(Math.round(parseFloat(e+"e"+t))+"e-"+t).toFixed(t),safeVariable:e=>isNaN(e.charAt(0))?e:`_${e}`};const{asyncForEach:Vn,WAIT:Gn,isDir:Yn,getExt:Xn}=Nt,Jn=e=>(e.error&&ne.BLOCK_ERRORS(e.error),e.warning&&ne.BLOCK_WARNINGS(e.warning),e),Qn=async e=>{let t=[];return await Vn(e.templates,async n=>{let r=0;await Vn(e.dataSets,a=>{const u=e.settings.destination;let o,s,l,c;Yn(u)?(l=u,o=a.name+Xn(n.name)):(l=u.replace(i.basename(u),""),o=i.basename(u)),c=Xn(o),e.settings.filename&&(o=e.settings.filename[r]+c),s=i.join(l,o),t.push({name:o,ext:c,data:qn.render(n.data,{settings:e.settings,colors:a.colors,_:Kn}),path:s}),r++})}),{...e,files:t}};var er={BUILD:async e=>(async e=>{await Gn();const t=[];if(!e.settings.filename)return e;if(e.settings.filename.length<2){let t=[];if(e.dataSets.length>1){let n=0;e.dataSets.forEach(r=>{n++,t.push(e.settings.filename+`-${n}`)}),e.settings.filename=t}}else e.settings.filename.length!==e.dataSets.length&&(e.settings.filename.length>e.dataSets.length?t.push("You have more filenames, than source files"):t.push("You have more sourcefiles, than filenames"));return{...e,error:t}})(e).then(Jn).then(Qn).then(e=>e)},tr=h((function(e){"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,u=arguments.length;switch(u){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,n)}));case 4:return process.nextTick((function(){e.call(null,t,n,r)}));default:for(i=new Array(u-1),a=0;a<i.length;)i[a++]=arguments[a];return process.nextTick((function(){e.apply(null,i)}))}}}:e.exports=process})),nr=(tr.nextTick,{}.toString),rr=Array.isArray||function(e){return"[object Array]"==nr.call(e)},ir=o,ar=h((function(e,t){var n=l.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function i(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=l:(r(l,t),t.Buffer=i),r(n,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return l.SlowBuffer(e)}}));ar.Buffer;function ur(e){return Object.prototype.toString.call(e)}var or={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===ur(e)},isBoolean:function(e){return"boolean"==typeof e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e},isNumber:function(e){return"number"==typeof e},isString:function(e){return"string"==typeof e},isSymbol:function(e){return"symbol"==typeof e},isUndefined:function(e){return void 0===e},isRegExp:function(e){return"[object RegExp]"===ur(e)},isObject:function(e){return"object"==typeof e&&null!==e},isDate:function(e){return"[object Date]"===ur(e)},isError:function(e){return"[object Error]"===ur(e)||e instanceof Error},isFunction:function(e){return"function"==typeof e},isPrimitive:function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},isBuffer:Buffer.isBuffer},sr=h((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),lr=h((function(e){try{var t=u;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=sr}})),cr=h((function(e){var t=ar.Buffer;e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);if(1===this.length)return this.head.data;for(var n,r,i,a=t.allocUnsafe(e>>>0),u=this.head,o=0;u;)n=u.data,r=a,i=o,n.copy(r,i),o+=u.data.length,u=u.next;return a},e}(),u&&u.inspect&&u.inspect.custom&&(e.exports.prototype[u.inspect.custom]=function(){var e=u.inspect({length:this.length});return this.constructor.name+" "+e})}));function Dr(e,t){e.emit("error",t)}var hr=function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||tr.nextTick(Dr,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(tr.nextTick(Dr,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},fr=function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},dr=u.deprecate,pr=kr;function gr(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}var mr,br=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:tr.nextTick;kr.WritableState=vr;var yr=Object.create(or);yr.inherits=lr;var Cr,_r={deprecate:dr},Fr=ar.Buffer,Er=c.Uint8Array||function(){};function wr(){}function vr(e,t){e=e||{};var n=t instanceof(mr=mr||Ir);this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===e.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(tr.nextTick(i,r),tr.nextTick(jr,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),jr(e,t))}(e,n,r,t,i);else{var a=Sr(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||xr(e,n),r?br(Ar,e,n,a,i):Ar(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new gr(this)}function kr(e){if(mr=mr||Ir,!(Cr.call(kr,this)||this instanceof mr))return new kr(e);this._writableState=new vr(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),ir.call(this)}function Br(e,t,n,r,i,a,u){t.writelen=r,t.writecb=u,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function Ar(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),jr(e,t)}function xr(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var u=0,o=!0;n;)i[u]=n,n.isBuf||(o=!1),n=n.next,u+=1;i.allBuffers=o,Br(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new gr(t),t.bufferedRequestCount=0}else{for(;n;){var s=n.chunk,l=n.encoding,c=n.callback;if(Br(e,t,!1,t.objectMode?1:s.length,s,l,c),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function Sr(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Or(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),jr(e,t)}))}function jr(e,t){var n=Sr(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,tr.nextTick(Or,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}yr.inherits(kr,ir),vr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(vr.prototype,"buffer",{get:_r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(Cr=Function.prototype[Symbol.hasInstance],Object.defineProperty(kr,Symbol.hasInstance,{value:function(e){return!!Cr.call(this,e)||this===kr&&(e&&e._writableState instanceof vr)}})):Cr=function(e){return e instanceof this},kr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},kr.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,u=!i.objectMode&&(r=e,Fr.isBuffer(r)||r instanceof Er);return u&&!Fr.isBuffer(e)&&(e=function(e){return Fr.from(e)}(e)),"function"==typeof t&&(n=t,t=null),u?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=wr),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),tr.nextTick(t,n)}(this,n):(u||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),tr.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,a){if(!n){var u=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Fr.from(t,n));return t}(t,r,i);r!==u&&(n=!0,i="buffer",r=u)}var o=t.objectMode?1:r.length;t.length+=o;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Br(e,t,!1,o,r,i,a);return s}(this,i,u,e,t,n)),a},kr.prototype.cork=function(){this._writableState.corked++},kr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||xr(this,e))},kr.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(kr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),kr.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},kr.prototype._writev=null,kr.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,jr(e,t),n&&(t.finished?tr.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(kr.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),kr.prototype.destroy=hr,kr.prototype._undestroy=fr,kr.prototype._destroy=function(e,t){this.end(),t(e)};var Tr=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},Ir=Nr,Lr=Object.create(or);Lr.inherits=lr,Lr.inherits(Nr,ni);for(var zr=Tr(pr.prototype),Rr=0;Rr<zr.length;Rr++){var Mr=zr[Rr];Nr.prototype[Mr]||(Nr.prototype[Mr]=pr.prototype[Mr])}function Nr(e){if(!(this instanceof Nr))return new Nr(e);ni.call(this,e),pr.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Pr)}function Pr(){this.allowHalfOpen||this._writableState.ended||tr.nextTick($r,this)}function $r(e){e.end()}Object.defineProperty(Nr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Nr.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Nr.prototype._destroy=function(e,t){this.push(null),this.end(),tr.nextTick(t,e)};var Ur=ar.Buffer,Wr=Ur.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var Zr=qr;function qr(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(Ur.isEncoding===Wr||!Wr(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=Vr,this.end=Gr,t=4;break;case"utf8":this.fillLast=Kr,t=4;break;case"base64":this.text=Yr,this.end=Xr,t=3;break;default:return this.write=Jr,void(this.end=Qr)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ur.allocUnsafe(t)}function Hr(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function Kr(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function Vr(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Gr(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function Yr(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function Xr(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Jr(e){return e.toString(this.encoding)}function Qr(e){return e&&e.length?this.write(e):""}qr.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},qr.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},qr.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=Hr(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=Hr(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=Hr(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},qr.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var ei,ti={StringDecoder:Zr},ni=Di;Di.ReadableState=ci;s.EventEmitter;var ri=function(e,t){return e.listeners(t).length},ii=ar.Buffer,ai=c.Uint8Array||function(){};var ui=Object.create(or);ui.inherits=lr;var oi,si=void 0;si=u&&u.debuglog?u.debuglog("stream"):function(){},ui.inherits(Di,ir);var li=["error","close","destroy","pause","resume"];function ci(e,t){e=e||{};var n=t instanceof(ei=ei||Ir);this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new cr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(oi||(oi=ti.StringDecoder),this.decoder=new oi(e.encoding),this.encoding=e.encoding)}function Di(e){if(ei=ei||Ir,!(this instanceof Di))return new Di(e);this._readableState=new ci(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),ir.call(this)}function hi(e,t,n,r,i){var a,u=e._readableState;null===t?(u.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,pi(e)}(e,u)):(i||(a=function(e,t){var n;r=t,ii.isBuffer(r)||r instanceof ai||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(u,t)),a?e.emit("error",a):u.objectMode||t&&t.length>0?("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===ii.prototype||(t=function(e){return ii.from(e)}(t)),r?u.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):fi(e,u,t,!0):u.ended?e.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?fi(e,u,t,!1):mi(e,u)):fi(e,u,t,!1))):r||(u.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(u)}function fi(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&pi(e)),mi(e,t)}Object.defineProperty(Di.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),Di.prototype.destroy=hr,Di.prototype._undestroy=fr,Di.prototype._destroy=function(e,t){this.push(null),t(e)},Di.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=ii.from(e,t),t=""),n=!0),hi(this,e,t,!1,n)},Di.prototype.unshift=function(e){return hi(this,e,null,!0,!1)},Di.prototype.isPaused=function(){return!1===this._readableState.flowing},Di.prototype.setEncoding=function(e){return oi||(oi=ti.StringDecoder),this._readableState.decoder=new oi(e),this._readableState.encoding=e,this};function di(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function pi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(si("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?tr.nextTick(gi,e):gi(e))}function gi(e){si("emit readable"),e.emit("readable"),_i(e)}function mi(e,t){t.readingMore||(t.readingMore=!0,tr.nextTick(bi,e,t))}function bi(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(si("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function yi(e){si("readable nexttick read 0"),e.read(0)}function Ci(e,t){t.reading||(si("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),_i(e),t.flowing&&!t.reading&&e.read(0)}function _i(e){var t=e._readableState;for(si("flow",t.flowing);t.flowing&&null!==e.read(););}function Fi(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var a=n.data,u=e>a.length?a.length:e;if(u===a.length?i+=a:i+=a.slice(0,e),0===(e-=u)){u===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(u));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=ii.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var a=r.data,u=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,u),0===(e-=u)){u===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(u));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function Ei(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,tr.nextTick(wi,t,e))}function wi(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function vi(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Di.prototype.read=function(e){si("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return si("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Ei(this):pi(this),null;if(0===(e=di(e,t))&&t.ended)return 0===t.length&&Ei(this),null;var r,i=t.needReadable;return si("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&si("length less than watermark",i=!0),t.ended||t.reading?si("reading or ended",i=!1):i&&(si("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=di(n,t))),null===(r=e>0?Fi(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&Ei(this)),null!==r&&this.emit("data",r),r},Di.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},Di.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,si("pipe count=%d opts=%j",r.pipesCount,t);var i=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?u:d;function a(t,i){si("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,si("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("drain",o),e.removeListener("error",D),e.removeListener("unpipe",a),n.removeListener("end",u),n.removeListener("end",d),n.removeListener("data",c),s=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||o())}function u(){si("onend"),e.end()}r.endEmitted?tr.nextTick(i):n.once("end",i),e.on("unpipe",a);var o=function(e){return function(){var t=e._readableState;si("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&ri(e,"data")&&(t.flowing=!0,_i(e))}}(n);e.on("drain",o);var s=!1;var l=!1;function c(t){si("ondata"),l=!1,!1!==e.write(t)||l||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==vi(r.pipes,e))&&!s&&(si("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function D(t){si("onerror",t),d(),e.removeListener("error",D),0===ri(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",f),d()}function f(){si("onfinish"),e.removeListener("close",h),d()}function d(){si("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?rr(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",D),e.once("close",h),e.once("finish",f),e.emit("pipe",n),r.flowing||(si("pipe resume"),n.resume()),e},Di.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var u=vi(t.pipes,e);return-1===u||(t.pipes.splice(u,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},Di.prototype.on=function(e,t){var n=ir.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&pi(this):tr.nextTick(yi,this))}return n},Di.prototype.addListener=Di.prototype.on,Di.prototype.resume=function(){var e=this._readableState;return e.flowing||(si("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,tr.nextTick(Ci,e,t))}(this,e)),this},Di.prototype.pause=function(){return si("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(si("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Di.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(si("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(si("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<li.length;a++)e.on(li[a],this.emit.bind(this,li[a]));return this._read=function(t){si("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(Di.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Di._fromList=Fi;var ki=xi,Bi=Object.create(or);function Ai(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function xi(e){if(!(this instanceof xi))return new xi(e);Ir.call(this,e),this._transformState={afterTransform:Ai.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",Si)}function Si(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){Oi(e,t,n)})):Oi(this,null,null)}function Oi(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}Bi.inherits=lr,Bi.inherits(xi,Ir),xi.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ir.prototype.push.call(this,e,t)},xi.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},xi.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},xi.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},xi.prototype._destroy=function(e,t){var n=this;Ir.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))};var ji=Ii,Ti=Object.create(or);function Ii(e){if(!(this instanceof Ii))return new Ii(e);ki.call(this,e)}Ti.inherits=lr,Ti.inherits(Ii,ki),Ii.prototype._transform=function(e,t,n){n(null,e)};var Li,zi,Ri=h((function(e,t){"disable"===process.env.READABLE_STREAM&&o?(e.exports=o,(t=e.exports=o.Readable).Readable=o.Readable,t.Writable=o.Writable,t.Duplex=o.Duplex,t.Transform=o.Transform,t.PassThrough=o.PassThrough,t.Stream=o):((t=e.exports=ni).Stream=o||t,t.Readable=t,t.Writable=pr,t.Duplex=Ir,t.Transform=ki,t.PassThrough=ji)})),Mi=(Ri.Readable,Ri.Writable,Ri.Duplex,Ri.Transform,Ri.PassThrough,Ri.Stream,h((function(e,t){if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer="undefined"!=typeof Buffer,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var n=new ArrayBuffer(0);try{t.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),t.blob=0===r.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!Ri.Readable}catch(e){t.nodestream=!1}}))),Ni=(Mi.base64,Mi.array,Mi.string,Mi.arraybuffer,Mi.nodebuffer,Mi.uint8array,Mi.blob,Mi.nodestream,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Pi=function(e){for(var t,n,r,i,a,u,o,s=[],l=0,c=e.length,D=c,h="string"!==ga.getTypeOf(e);l<e.length;)D=c-l,h?(t=e[l++],n=l<c?e[l++]:0,r=l<c?e[l++]:0):(t=e.charCodeAt(l++),n=l<c?e.charCodeAt(l++):0,r=l<c?e.charCodeAt(l++):0),i=t>>2,a=(3&t)<<4|n>>4,u=D>1?(15&n)<<2|r>>6:64,o=D>2?63&r:64,s.push(Ni.charAt(i)+Ni.charAt(a)+Ni.charAt(u)+Ni.charAt(o));return s.join("")},$i=function(e){var t,n,r,i,a,u,o=0,s=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var l,c=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===Ni.charAt(64)&&c--,e.charAt(e.length-2)===Ni.charAt(64)&&c--,c%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=Mi.uint8array?new Uint8Array(0|c):new Array(0|c);o<e.length;)t=Ni.indexOf(e.charAt(o++))<<2|(i=Ni.indexOf(e.charAt(o++)))>>4,n=(15&i)<<4|(a=Ni.indexOf(e.charAt(o++)))>>2,r=(3&a)<<6|(u=Ni.indexOf(e.charAt(o++))),l[s++]=t,64!==a&&(l[s++]=n),64!==u&&(l[s++]=r);return l},Ui="undefined"!=typeof Buffer,Wi=function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},Zi=function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},qi=function(e){return Buffer.isBuffer(e)},Hi=function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume},Ki="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)},Vi=c.MutationObserver||c.WebKitMutationObserver;if(process.browser)if(Vi){var Gi=0,Yi=new Vi(ea),Xi=c.document.createTextNode("");Yi.observe(Xi,{characterData:!0}),Li=function(){Xi.data=Gi=++Gi%2}}else if(c.setImmediate||void 0===c.MessageChannel)Li="document"in c&&"onreadystatechange"in c.document.createElement("script")?function(){var e=c.document.createElement("script");e.onreadystatechange=function(){ea(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},c.document.documentElement.appendChild(e)}:function(){setTimeout(ea,0)};else{var Ji=new c.MessageChannel;Ji.port1.onmessage=ea,Li=function(){Ji.port2.postMessage(0)}}else Li=function(){process.nextTick(ea)};var Qi=[];function ea(){var e,t;zi=!0;for(var n=Qi.length;n;){for(t=Qi,Qi=[],e=-1;++e<n;)t[e]();n=Qi.length}zi=!1}var ta=function(e){1!==Qi.push(e)||zi||Li()};function na(){}var ra={},ia=["REJECTED"],aa=["FULFILLED"],ua=["PENDING"];if(!process.browser)var oa=["UNHANDLED"];var sa=la;function la(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=ua,this.queue=[],this.outcome=void 0,process.browser||(this.handled=oa),e!==na&&fa(this,e)}function ca(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function Da(e,t,n){ta((function(){var r;try{r=t(n)}catch(t){return ra.reject(e,t)}r===e?ra.reject(e,new TypeError("Cannot resolve promise with itself")):ra.resolve(e,r)}))}function ha(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function fa(e,t){var n=!1;function r(t){n||(n=!0,ra.reject(e,t))}function i(t){n||(n=!0,ra.resolve(e,t))}var a=da((function(){t(i,r)}));"error"===a.status&&r(a.value)}function da(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}la.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},la.prototype.catch=function(e){return this.then(null,e)},la.prototype.then=function(e,t){if("function"!=typeof e&&this.state===aa||"function"!=typeof t&&this.state===ia)return this;var n=new this.constructor(na);(process.browser||this.handled===oa&&(this.handled=null),this.state!==ua)?Da(n,this.state===aa?e:t,this.outcome):this.queue.push(new ca(n,e,t));return n},ca.prototype.callFulfilled=function(e){ra.resolve(this.promise,e)},ca.prototype.otherCallFulfilled=function(e){Da(this.promise,this.onFulfilled,e)},ca.prototype.callRejected=function(e){ra.reject(this.promise,e)},ca.prototype.otherCallRejected=function(e){Da(this.promise,this.onRejected,e)},ra.resolve=function(e,t){var n=da(ha,t);if("error"===n.status)return ra.reject(e,n.value);var r=n.value;if(r)fa(e,r);else{e.state=aa,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},ra.reject=function(e,t){e.state=ia,e.outcome=t,process.browser||e.handled===oa&&ta((function(){e.handled===oa&&process.emit("unhandledRejection",t,e)}));for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},la.resolve=function(e){if(e instanceof this)return e;return ra.resolve(new this(na),e)},la.reject=function(e){var t=new this(na);return ra.reject(t,e)},la.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var i=new Array(n),a=0,u=-1,o=new this(na);for(;++u<n;)s(e[u],u);return o;function s(e,u){t.resolve(e).then((function(e){i[u]=e,++a!==n||r||(r=!0,ra.resolve(o,i))}),(function(e){r||(r=!0,ra.reject(o,e))}))}},la.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var i=-1,a=new this(na);for(;++i<n;)u=e[i],t.resolve(u).then((function(e){r||(r=!0,ra.resolve(a,e))}),(function(e){r||(r=!0,ra.reject(a,e))}));var u;return a};var pa={Promise:"undefined"!=typeof Promise?Promise:sa},ga=h((function(e,t){function n(e){return e}function r(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}t.newBlob=function(e,n){t.checkSupport("blob");try{return new Blob([e],{type:n})}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(n)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var i={stringifyByChunk:function(e,t,n){var r=[],i=0,a=e.length;if(a<=n)return String.fromCharCode.apply(null,e);for(;i<a;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,a)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,a)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return Mi.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return Mi.nodebuffer&&1===String.fromCharCode.apply(null,Zi(1)).length}catch(e){return!1}}()}};function a(e){var n=65536,r=t.getTypeOf(e),a=!0;if("uint8array"===r?a=i.applyCanBeUsed.uint8array:"nodebuffer"===r&&(a=i.applyCanBeUsed.nodebuffer),a)for(;n>1;)try{return i.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return i.stringifyByChar(e)}function u(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}t.applyFromCharCode=a;var o={};o.string={string:n,array:function(e){return r(e,new Array(e.length))},arraybuffer:function(e){return o.string.uint8array(e).buffer},uint8array:function(e){return r(e,new Uint8Array(e.length))},nodebuffer:function(e){return r(e,Zi(e.length))}},o.array={string:a,array:n,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return Wi(e)}},o.arraybuffer={string:function(e){return a(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:n,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return Wi(new Uint8Array(e))}},o.uint8array={string:a,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:n,nodebuffer:function(e){return Wi(e)}},o.nodebuffer={string:a,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return o.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:n},t.transformTo=function(e,n){if(n||(n=""),!e)return n;t.checkSupport(e);var r=t.getTypeOf(n);return o[r][e](n)},t.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":Mi.nodebuffer&&qi(e)?"nodebuffer":Mi.uint8array&&e instanceof Uint8Array?"uint8array":Mi.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(e){if(!Mi[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},t.delay=function(e,t,n){Ki((function(){e.apply(n||null,t||[])}))},t.inherits=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n},t.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},t.prepareContent=function(e,n,i,a,u){return pa.Promise.resolve(n).then((function(e){return Mi.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new pa.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):e})).then((function(n){var o,s=t.getTypeOf(n);return s?("arraybuffer"===s?n=t.transformTo("uint8array",n):"string"===s&&(u?n=$i(n):i&&!0!==a&&(n=r(o=n,Mi.uint8array?new Uint8Array(o.length):new Array(o.length)))),n):pa.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}}));ga.newBlob,ga.applyFromCharCode,ga.transformTo,ga.getTypeOf,ga.checkSupport,ga.MAX_VALUE_16BITS,ga.MAX_VALUE_32BITS,ga.pretty,ga.delay,ga.inherits,ga.extend,ga.prepareContent;function ma(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}ma.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};var ba=ma,ya=h((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;n[254]=n[254]=1;function i(){ba.call(this,"utf-8 decode"),this.leftOver=null}function a(){ba.call(this,"utf-8 encode")}t.utf8encode=function(e){return Mi.nodebuffer?Wi(e,"utf-8"):function(e){var t,n,r,i,a,u=e.length,o=0;for(i=0;i<u;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<u&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),o+=n<128?1:n<2048?2:n<65536?3:4;for(t=Mi.uint8array?new Uint8Array(o):new Array(o),a=0,i=0;a<o;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<u&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t}(e)},t.utf8decode=function(e){return Mi.nodebuffer?ga.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,a,u=e.length,o=new Array(2*u);for(r=0,t=0;t<u;)if((i=e[t++])<128)o[r++]=i;else if((a=n[i])>4)o[r++]=65533,t+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&t<u;)i=i<<6|63&e[t++],a--;a>1?o[r++]=65533:i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|1023&i)}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),ga.applyFromCharCode(o)}(e=ga.transformTo(Mi.uint8array?"uint8array":"array",e))},ga.inherits(i,ba),i.prototype.processChunk=function(e){var r=ga.transformTo(Mi.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Mi.uint8array){var i=r;(r=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),r.set(i,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),u=r;a!==r.length&&(Mi.uint8array?(u=r.subarray(0,a),this.leftOver=r.subarray(a,r.length)):(u=r.slice(0,a),this.leftOver=r.slice(a,r.length))),this.push({data:t.utf8decode(u),meta:e.meta})},i.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=i,ga.inherits(a,ba),a.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=a}));ya.utf8encode,ya.utf8decode,ya.Utf8DecodeWorker,ya.Utf8EncodeWorker;function Ca(e){ba.call(this,"ConvertWorker to "+e),this.destType=e}ga.inherits(Ca,ba),Ca.prototype.processChunk=function(e){this.push({data:ga.transformTo(this.destType,e.data),meta:e.meta})};var _a=Ca,Fa=Ri.Readable;function Ea(e,t,n){Fa.call(this,t),this._helper=e;var r=this;e.on("data",(function(e,t){r.push(e)||r._helper.pause(),n&&n(t)})).on("error",(function(e){r.emit("error",e)})).on("end",(function(){r.push(null)}))}ga.inherits(Ea,Fa),Ea.prototype._read=function(){this._helper.resume()};var wa=Ea,va=null;if(Mi.nodestream)try{va=wa}catch(e){}function ka(e,t){return new pa.Promise((function(n,r){var i=[],a=e._internalType,u=e._outputType,o=e._mimeType;e.on("data",(function(e,n){i.push(e),t&&t(n)})).on("error",(function(e){i=[],r(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return ga.newBlob(ga.transformTo("arraybuffer",t),n);case"base64":return Pi(t);default:return ga.transformTo(e,t)}}(u,function(e,t){var n,r=0,i=null,a=0;for(n=0;n<t.length;n++)a+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(a),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,i),o);n(e)}catch(e){r(e)}i=[]})).resume()}))}function Ba(e,t,n){var r=t;switch(t){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=t,this._mimeType=n,ga.checkSupport(r),this._worker=e.pipe(new _a(r)),e.lock()}catch(e){this._worker=new ba("error"),this._worker.error(e)}}Ba.prototype={accumulate:function(e){return ka(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){ga.delay(t,arguments,n)})),this},resume:function(){return ga.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(ga.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new va(this,{objectMode:"nodebuffer"!==this._outputType},e)}};var Aa=Ba,xa={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null};function Sa(e){ba.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=ga.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}ga.inherits(Sa,ba),Sa.prototype.cleanUp=function(){ba.prototype.cleanUp.call(this),this.data=null},Sa.prototype.resume=function(){return!!ba.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,ga.delay(this._tickAndRepeat,[],this)),!0)},Sa.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(ga.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sa.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Oa=Sa;function ja(e){ba.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}ga.inherits(ja,ba),ja.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}ba.prototype.processChunk.call(this,e)};var Ta=ja;var Ia=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var La=function(e,t){return void 0!==e&&e.length?"string"!==ga.getTypeOf(e)?function(e,t,n,r){var i=Ia,a=r+n;e^=-1;for(var u=r;u<a;u++)e=e>>>8^i[255&(e^t[u])];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var i=Ia,a=r+n;e^=-1;for(var u=r;u<a;u++)e=e>>>8^i[255&(e^t.charCodeAt(u))];return-1^e}(0|t,e,e.length,0):0};function za(){ba.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}ga.inherits(za,ba),za.prototype.processChunk=function(e){this.streamInfo.crc32=La(e.data,this.streamInfo.crc32||0),this.push(e)};var Ra=za;function Ma(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}Ma.prototype={getContentWorker:function(){var e=new Oa(pa.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Ta("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Oa(pa.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Ma.createWorkerFrom=function(e,t,n){return e.pipe(new Ra).pipe(new Ta("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Ta("compressedSize")).withStreamInfo("compression",t)};var Na=Ma,Pa=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Pa.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!r&&(t=t.pipe(new ya.Utf8EncodeWorker)),!i&&r&&(t=t.pipe(new ya.Utf8DecodeWorker))}catch(e){(t=new ba("error")).error(e)}return new Aa(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Na&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new ya.Utf8EncodeWorker)),Na.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Na?this._data.getContentWorker():this._data instanceof ba?this._data:new Oa(this._data)}};for(var $a=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Ua=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Wa=0;Wa<$a.length;Wa++)Pa.prototype[$a[Wa]]=Ua;var Za=Pa,qa=h((function(e,t){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,u;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(u=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],u.set(a,i),i+=a.length;return u}},a={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(n)}));qa.assign,qa.shrinkBuf,qa.setTyped,qa.Buf8,qa.Buf16,qa.Buf32;function Ha(e){for(var t=e.length;--t>=0;)e[t]=0}var Ka=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Va=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ga=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ya=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xa=new Array(576);Ha(Xa);var Ja=new Array(60);Ha(Ja);var Qa=new Array(512);Ha(Qa);var eu=new Array(256);Ha(eu);var tu=new Array(29);Ha(tu);var nu,ru,iu,au=new Array(30);function uu(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function ou(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function su(e){return e<256?Qa[e]:Qa[256+(e>>>7)]}function lu(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function cu(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,lu(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Du(e,t,n){cu(e,n[2*t],n[2*t+1])}function hu(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function fu(e,t,n){var r,i,a=new Array(16),u=0;for(r=1;r<=15;r++)a[r]=u=u+n[r-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=hu(a[o]++,o))}}function du(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function pu(e){e.bi_valid>8?lu(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function gu(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function mu(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&gu(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!gu(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function bu(e,t,n){var r,i,a,u,o=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===r?Du(e,i,t):(Du(e,(a=eu[i])+256+1,t),0!==(u=Ka[a])&&cu(e,i-=tu[a],u),Du(e,a=su(--r),n),0!==(u=Va[a])&&cu(e,r-=au[a],u))}while(o<e.last_lit);Du(e,256,t)}function yu(e,t){var n,r,i,a=t.dyn_tree,u=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<s;n++)0!==a[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=u[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)mu(e,a,n);i=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mu(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,mu(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,u,o,s=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,D=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,d=t.stat_desc.max_length,p=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(a=s[2*s[2*(r=e.heap[n])+1]+1]+1)>d&&(a=d,p++),s[2*r+1]=a,r>l||(e.bl_count[a]++,u=0,r>=f&&(u=h[r-f]),o=s[2*r],e.opt_len+=o*(a+u),D&&(e.static_len+=o*(c[2*r+1]+u)));if(0!==p){do{for(a=d-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[d]--,p-=2}while(p>0);for(a=d;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>l||(s[2*i+1]!==a&&(e.opt_len+=(a-s[2*i+1])*s[2*i],s[2*i+1]=a),r--)}}(e,t),fu(a,l,e.bl_count)}function Cu(e,t,n){var r,i,a=-1,u=t[1],o=0,s=7,l=4;for(0===u&&(s=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=u,u=t[2*(r+1)+1],++o<s&&i===u||(o<l?e.bl_tree[2*i]+=o:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,a=i,0===u?(s=138,l=3):i===u?(s=6,l=3):(s=7,l=4))}function _u(e,t,n){var r,i,a=-1,u=t[1],o=0,s=7,l=4;for(0===u&&(s=138,l=3),r=0;r<=n;r++)if(i=u,u=t[2*(r+1)+1],!(++o<s&&i===u)){if(o<l)do{Du(e,i,e.bl_tree)}while(0!=--o);else 0!==i?(i!==a&&(Du(e,i,e.bl_tree),o--),Du(e,16,e.bl_tree),cu(e,o-3,2)):o<=10?(Du(e,17,e.bl_tree),cu(e,o-3,3)):(Du(e,18,e.bl_tree),cu(e,o-11,7));o=0,a=i,0===u?(s=138,l=3):i===u?(s=6,l=3):(s=7,l=4)}}Ha(au);var Fu=!1;function Eu(e,t,n,r){cu(e,0+(r?1:0),3),function(e,t,n,r){pu(e),r&&(lu(e,n),lu(e,~n)),qa.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}var wu={_tr_init:function(e){Fu||(!function(){var e,t,n,r,i,a=new Array(16);for(n=0,r=0;r<28;r++)for(tu[r]=n,e=0;e<1<<Ka[r];e++)eu[n++]=r;for(eu[n-1]=r,i=0,r=0;r<16;r++)for(au[r]=i,e=0;e<1<<Va[r];e++)Qa[i++]=r;for(i>>=7;r<30;r++)for(au[r]=i<<7,e=0;e<1<<Va[r]-7;e++)Qa[256+i++]=r;for(t=0;t<=15;t++)a[t]=0;for(e=0;e<=143;)Xa[2*e+1]=8,e++,a[8]++;for(;e<=255;)Xa[2*e+1]=9,e++,a[9]++;for(;e<=279;)Xa[2*e+1]=7,e++,a[7]++;for(;e<=287;)Xa[2*e+1]=8,e++,a[8]++;for(fu(Xa,287,a),e=0;e<30;e++)Ja[2*e+1]=5,Ja[2*e]=hu(e,5);nu=new uu(Xa,Ka,257,286,15),ru=new uu(Ja,Va,0,30,15),iu=new uu(new Array(0),Ga,0,19,7)}(),Fu=!0),e.l_desc=new ou(e.dyn_ltree,nu),e.d_desc=new ou(e.dyn_dtree,ru),e.bl_desc=new ou(e.bl_tree,iu),e.bi_buf=0,e.bi_valid=0,du(e)},_tr_stored_block:Eu,_tr_flush_block:function(e,t,n,r){var i,a,u=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),yu(e,e.l_desc),yu(e,e.d_desc),u=function(e){var t;for(Cu(e,e.dyn_ltree,e.l_desc.max_code),Cu(e,e.dyn_dtree,e.d_desc.max_code),yu(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Ya[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?Eu(e,t,n,r):4===e.strategy||a===i?(cu(e,2+(r?1:0),3),bu(e,Xa,Ja)):(cu(e,4+(r?1:0),3),function(e,t,n,r){var i;for(cu(e,t-257,5),cu(e,n-1,5),cu(e,r-4,4),i=0;i<r;i++)cu(e,e.bl_tree[2*Ya[i]+1],3);_u(e,e.dyn_ltree,t-1),_u(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),bu(e,e.dyn_ltree,e.dyn_dtree)),du(e),r&&pu(e)},_tr_tally:function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(eu[n]+256+1)]++,e.dyn_dtree[2*su(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){cu(e,2,3),Du(e,256,Xa),function(e){16===e.bi_valid?(lu(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}};var vu=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,u=0;0!==n;){n-=u=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--u);i%=65521,a%=65521}return i|a<<16|0};var ku=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var Bu,Au=function(e,t,n,r){var i=ku,a=r+n;e^=-1;for(var u=r;u<a;u++)e=e>>>8^i[255&(e^t[u])];return-1^e},xu={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Su(e,t){return e.msg=xu[t],t}function Ou(e){return(e<<1)-(e>4?9:0)}function ju(e){for(var t=e.length;--t>=0;)e[t]=0}function Tu(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(qa.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function Iu(e,t){wu._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Tu(e.strm)}function Lu(e,t){e.pending_buf[e.pending++]=t}function zu(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Ru(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,qa.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=vu(e.adler,t,i,n):2===e.state.wrap&&(e.adler=Au(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function Mu(e,t){var n,r,i=e.max_chain_length,a=e.strstart,u=e.prev_length,o=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,D=e.prev,h=e.strstart+258,f=l[a+u-1],d=l[a+u];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(l[(n=t)+u]===d&&l[n+u-1]===f&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do{}while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<h);if(r=258-(h-a),a=h-258,r>u){if(e.match_start=t,u=r,r>=o)break;f=l[a+u-1],d=l[a+u]}}}while((t=D[t&c])>s&&0!=--i);return u<=e.lookahead?u:e.lookahead}function Nu(e){var t,n,r,i,a,u=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){qa.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);i+=u}if(0===e.strm.avail_in)break;if(n=Ru(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+3-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function Pu(e,t){for(var n,r;;){if(e.lookahead<262){if(Nu(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=Mu(e,n)),e.match_length>=3)if(r=wu._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=wu._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Iu(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(Iu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Iu(e,!1),0===e.strm.avail_out)?1:2}function $u(e,t){for(var n,r,i;;){if(e.lookahead<262){if(Nu(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=Mu(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=wu._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Iu(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=wu._tr_tally(e,0,e.window[e.strstart-1]))&&Iu(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=wu._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(Iu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Iu(e,!1),0===e.strm.avail_out)?1:2}function Uu(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function Wu(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new qa.Buf16(1146),this.dyn_dtree=new qa.Buf16(122),this.bl_tree=new qa.Buf16(78),ju(this.dyn_ltree),ju(this.dyn_dtree),ju(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new qa.Buf16(16),this.heap=new qa.Buf16(573),ju(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new qa.Buf16(573),ju(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Zu(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,wu._tr_init(t),0):Su(e,-2)}function qu(e){var t,n=Zu(e);return 0===n&&((t=e.state).window_size=2*t.w_size,ju(t.head),t.max_lazy_match=Bu[t.level].max_lazy,t.good_match=Bu[t.level].good_length,t.nice_match=Bu[t.level].nice_length,t.max_chain_length=Bu[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function Hu(e,t,n,r,i,a){if(!e)return-2;var u=1;if(-1===t&&(t=6),r<0?(u=0,r=-r):r>15&&(u=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return Su(e,-2);8===r&&(r=9);var o=new Wu;return e.state=o,o.strm=e,o.wrap=u,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new qa.Buf8(2*o.w_size),o.head=new qa.Buf16(o.hash_size),o.prev=new qa.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new qa.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=a,o.method=n,qu(e)}Bu=[new Uu(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Nu(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Iu(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Iu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(Iu(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Iu(e,!1),e.strm.avail_out),1)})),new Uu(4,4,8,4,Pu),new Uu(4,5,16,8,Pu),new Uu(4,6,32,32,Pu),new Uu(4,4,16,16,$u),new Uu(8,16,32,32,$u),new Uu(8,16,128,128,$u),new Uu(8,32,128,256,$u),new Uu(32,128,258,1024,$u),new Uu(32,258,258,4096,$u)];var Ku={deflateInit:function(e,t){return Hu(e,t,8,15,8,0)},deflateInit2:Hu,deflateReset:qu,deflateResetKeep:Zu,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,i,a;if(!e||!e.state||t>5||t<0)return e?Su(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Su(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,Lu(r,31),Lu(r,139),Lu(r,8),r.gzhead?(Lu(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Lu(r,255&r.gzhead.time),Lu(r,r.gzhead.time>>8&255),Lu(r,r.gzhead.time>>16&255),Lu(r,r.gzhead.time>>24&255),Lu(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Lu(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Lu(r,255&r.gzhead.extra.length),Lu(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Au(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Lu(r,0),Lu(r,0),Lu(r,0),Lu(r,0),Lu(r,0),Lu(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Lu(r,3),r.status=113);else{var u=8+(r.w_bits-8<<4)<<8;u|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(u|=32),u+=31-u%31,r.status=113,zu(r,u),0!==r.strstart&&(zu(r,e.adler>>>16),zu(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Au(e.adler,r.pending_buf,r.pending-i,i)),Tu(e),i=r.pending,r.pending!==r.pending_buf_size));)Lu(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Au(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Au(e.adler,r.pending_buf,r.pending-i,i)),Tu(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Lu(r,a)}while(0!==a);r.gzhead.hcrc&&r.pending>i&&(e.adler=Au(e.adler,r.pending_buf,r.pending-i,i)),0===a&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Au(e.adler,r.pending_buf,r.pending-i,i)),Tu(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Lu(r,a)}while(0!==a);r.gzhead.hcrc&&r.pending>i&&(e.adler=Au(e.adler,r.pending_buf,r.pending-i,i)),0===a&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Tu(e),r.pending+2<=r.pending_buf_size&&(Lu(r,255&e.adler),Lu(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Tu(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Ou(t)<=Ou(n)&&4!==t)return Su(e,-5);if(666===r.status&&0!==e.avail_in)return Su(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var o=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Nu(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=wu._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Iu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(Iu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Iu(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,i,a,u=e.window;;){if(e.lookahead<=258){if(Nu(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=u[i=e.strstart-1])===u[++i]&&r===u[++i]&&r===u[++i]){a=e.strstart+258;do{}while(r===u[++i]&&r===u[++i]&&r===u[++i]&&r===u[++i]&&r===u[++i]&&r===u[++i]&&r===u[++i]&&r===u[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=wu._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=wu._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Iu(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(Iu(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Iu(e,!1),0===e.strm.avail_out)?1:2}(r,t):Bu[r.level].func(r,t);if(3!==o&&4!==o||(r.status=666),1===o||3===o)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===o&&(1===t?wu._tr_align(r):5!==t&&(wu._tr_stored_block(r,0,0,!1),3===t&&(ju(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Tu(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(Lu(r,255&e.adler),Lu(r,e.adler>>8&255),Lu(r,e.adler>>16&255),Lu(r,e.adler>>24&255),Lu(r,255&e.total_in),Lu(r,e.total_in>>8&255),Lu(r,e.total_in>>16&255),Lu(r,e.total_in>>24&255)):(zu(r,e.adler>>>16),zu(r,65535&e.adler)),Tu(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Su(e,-2):(e.state=null,113===t?Su(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,i,a,u,o,s,l,c=t.length;if(!e||!e.state)return-2;if(2===(a=(n=e.state).wrap)||1===a&&42!==n.status||n.lookahead)return-2;for(1===a&&(e.adler=vu(e.adler,t,c,0)),n.wrap=0,c>=n.w_size&&(0===a&&(ju(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new qa.Buf8(n.w_size),qa.arraySet(l,t,c-n.w_size,n.w_size,0),t=l,c=n.w_size),u=e.avail_in,o=e.next_in,s=e.input,e.avail_in=c,e.next_in=0,e.input=t,Nu(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=2,Nu(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=o,e.input=s,e.avail_in=u,n.wrap=a,0},deflateInfo:"pako deflate (from Nodeca project)"},Vu=!0,Gu=!0;try{String.fromCharCode.apply(null,[0])}catch(e){Vu=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Gu=!1}for(var Yu=new qa.Buf8(256),Xu=0;Xu<256;Xu++)Yu[Xu]=Xu>=252?6:Xu>=248?5:Xu>=240?4:Xu>=224?3:Xu>=192?2:1;Yu[254]=Yu[254]=1;function Ju(e,t){if(t<65534&&(e.subarray&&Gu||!e.subarray&&Vu))return String.fromCharCode.apply(null,qa.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}var Qu=function(e){var t,n,r,i,a,u=e.length,o=0;for(i=0;i<u;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<u&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),o+=n<128?1:n<2048?2:n<65536?3:4;for(t=new qa.Buf8(o),a=0,i=0;a<o;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<u&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},eo=function(e){return Ju(e,e.length)},to=function(e){for(var t=new qa.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},no=function(e,t){var n,r,i,a,u=t||e.length,o=new Array(2*u);for(r=0,n=0;n<u;)if((i=e[n++])<128)o[r++]=i;else if((a=Yu[i])>4)o[r++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n<u;)i=i<<6|63&e[n++],a--;a>1?o[r++]=65533:i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|1023&i)}return Ju(o,r)},ro=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Yu[e[n]]>t?n:t};var io=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ao=Object.prototype.toString;function uo(e){if(!(this instanceof uo))return new uo(e);this.options=qa.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new io,this.strm.avail_out=0;var n=Ku.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(xu[n]);if(t.header&&Ku.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Qu(t.dictionary):"[object ArrayBuffer]"===ao.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Ku.deflateSetDictionary(this.strm,r)))throw new Error(xu[n]);this._dict_set=!0}}function oo(e,t){var n=new uo(t);if(n.push(e,!0),n.err)throw n.msg||xu[n.err];return n.result}uo.prototype.push=function(e,t){var n,r,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=Qu(e):"[object ArrayBuffer]"===ao.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new qa.Buf8(a),i.next_out=0,i.avail_out=a),1!==(n=Ku.deflate(i,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(eo(qa.shrinkBuf(i.output,i.next_out))):this.onData(qa.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==n);return 4===r?(n=Ku.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),i.avail_out=0,!0)},uo.prototype.onData=function(e){this.chunks.push(e)},uo.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=qa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var so={Deflate:uo,deflate:oo,deflateRaw:function(e,t){return(t=t||{}).raw=!0,oo(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,oo(e,t)}},lo=function(e,t){var n,r,i,a,u,o,s,l,c,D,h,f,d,p,g,m,b,y,C,_,F,E,w,v,k;n=e.state,r=e.next_in,v=e.input,i=r+(e.avail_in-5),a=e.next_out,k=e.output,u=a-(t-e.avail_out),o=a+(e.avail_out-257),s=n.dmax,l=n.wsize,c=n.whave,D=n.wnext,h=n.window,f=n.hold,d=n.bits,p=n.lencode,g=n.distcode,m=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{d<15&&(f+=v[r++]<<d,d+=8,f+=v[r++]<<d,d+=8),y=p[f&m];t:for(;;){if(f>>>=C=y>>>24,d-=C,0===(C=y>>>16&255))k[a++]=65535&y;else{if(!(16&C)){if(0==(64&C)){y=p[(65535&y)+(f&(1<<C)-1)];continue t}if(32&C){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}_=65535&y,(C&=15)&&(d<C&&(f+=v[r++]<<d,d+=8),_+=f&(1<<C)-1,f>>>=C,d-=C),d<15&&(f+=v[r++]<<d,d+=8,f+=v[r++]<<d,d+=8),y=g[f&b];n:for(;;){if(f>>>=C=y>>>24,d-=C,!(16&(C=y>>>16&255))){if(0==(64&C)){y=g[(65535&y)+(f&(1<<C)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(F=65535&y,d<(C&=15)&&(f+=v[r++]<<d,(d+=8)<C&&(f+=v[r++]<<d,d+=8)),(F+=f&(1<<C)-1)>s){e.msg="invalid distance too far back",n.mode=30;break e}if(f>>>=C,d-=C,F>(C=a-u)){if((C=F-C)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,w=h,0===D){if(E+=l-C,C<_){_-=C;do{k[a++]=h[E++]}while(--C);E=a-F,w=k}}else if(D<C){if(E+=l+D-C,(C-=D)<_){_-=C;do{k[a++]=h[E++]}while(--C);if(E=0,D<_){_-=C=D;do{k[a++]=h[E++]}while(--C);E=a-F,w=k}}}else if(E+=D-C,C<_){_-=C;do{k[a++]=h[E++]}while(--C);E=a-F,w=k}for(;_>2;)k[a++]=w[E++],k[a++]=w[E++],k[a++]=w[E++],_-=3;_&&(k[a++]=w[E++],_>1&&(k[a++]=w[E++]))}else{E=a-F;do{k[a++]=k[E++],k[a++]=k[E++],k[a++]=k[E++],_-=3}while(_>2);_&&(k[a++]=k[E++],_>1&&(k[a++]=k[E++]))}break}}break}}while(r<i&&a<o);r-=_=d>>3,f&=(1<<(d-=_<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<o?o-a+257:257-(a-o),n.hold=f,n.bits=d},co=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Do=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ho=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],fo=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],po=function(e,t,n,r,i,a,u,o){var s,l,c,D,h,f,d,p,g,m=o.bits,b=0,y=0,C=0,_=0,F=0,E=0,w=0,v=0,k=0,B=0,A=null,x=0,S=new qa.Buf16(16),O=new qa.Buf16(16),j=null,T=0;for(b=0;b<=15;b++)S[b]=0;for(y=0;y<r;y++)S[t[n+y]]++;for(F=m,_=15;_>=1&&0===S[_];_--);if(F>_&&(F=_),0===_)return i[a++]=20971520,i[a++]=20971520,o.bits=1,0;for(C=1;C<_&&0===S[C];C++);for(F<C&&(F=C),v=1,b=1;b<=15;b++)if(v<<=1,(v-=S[b])<0)return-1;if(v>0&&(0===e||1!==_))return-1;for(O[1]=0,b=1;b<15;b++)O[b+1]=O[b]+S[b];for(y=0;y<r;y++)0!==t[n+y]&&(u[O[t[n+y]]++]=y);if(0===e?(A=j=u,f=19):1===e?(A=co,x-=257,j=Do,T-=257,f=256):(A=ho,j=fo,f=-1),B=0,y=0,b=C,h=a,E=F,w=0,c=-1,D=(k=1<<F)-1,1===e&&k>852||2===e&&k>592)return 1;for(;;){d=b-w,u[y]<f?(p=0,g=u[y]):u[y]>f?(p=j[T+u[y]],g=A[x+u[y]]):(p=96,g=0),s=1<<b-w,C=l=1<<E;do{i[h+(B>>w)+(l-=s)]=d<<24|p<<16|g|0}while(0!==l);for(s=1<<b-1;B&s;)s>>=1;if(0!==s?(B&=s-1,B+=s):B=0,y++,0==--S[b]){if(b===_)break;b=t[n+u[y]]}if(b>F&&(B&D)!==c){for(0===w&&(w=F),h+=C,v=1<<(E=b-w);E+w<_&&!((v-=S[E+w])<=0);)E++,v<<=1;if(k+=1<<E,1===e&&k>852||2===e&&k>592)return 1;i[c=B&D]=F<<24|E<<16|h-a|0}}return 0!==B&&(i[h+B]=b-w<<24|64<<16|0),o.bits=F,0};function go(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function mo(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new qa.Buf16(320),this.work=new qa.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function bo(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new qa.Buf32(852),t.distcode=t.distdyn=new qa.Buf32(592),t.sane=1,t.back=-1,0):-2}function yo(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,bo(e)):-2}function Co(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,yo(e))):-2}function _o(e,t){var n,r;return e?(r=new mo,e.state=r,r.window=null,0!==(n=Co(e,t))&&(e.state=null),n):-2}var Fo,Eo,wo=!0;function vo(e){if(wo){var t;for(Fo=new qa.Buf32(512),Eo=new qa.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(po(1,e.lens,0,288,Fo,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;po(2,e.lens,0,32,Eo,0,e.work,{bits:5}),wo=!1}e.lencode=Fo,e.lenbits=9,e.distcode=Eo,e.distbits=5}function ko(e,t,n,r){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new qa.Buf8(a.wsize)),r>=a.wsize?(qa.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>r&&(i=r),qa.arraySet(a.window,t,n-r,i,a.wnext),(r-=i)?(qa.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}var Bo={inflateReset:yo,inflateReset2:Co,inflateResetKeep:bo,inflateInit:function(e){return _o(e,15)},inflateInit2:_o,inflate:function(e,t){var n,r,i,a,u,o,s,l,c,D,h,f,d,p,g,m,b,y,C,_,F,E,w,v,k=0,B=new qa.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),u=e.next_out,i=e.output,s=e.avail_out,a=e.next_in,r=e.input,o=e.avail_in,l=n.hold,c=n.bits,D=o,h=s,E=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;c<16;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(2&n.wrap&&35615===l){n.check=0,B[0]=255&l,B[1]=l>>>8&255,n.check=Au(n.check,B,2,0),l=0,c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",n.mode=30;break}if(c-=4,F=8+(15&(l>>>=4)),0===n.wbits)n.wbits=F;else if(F>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<F,e.adler=n.check=1,n.mode=512&l?10:12,l=0,c=0;break;case 2:for(;c<16;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(n.flags=l,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&(B[0]=255&l,B[1]=l>>>8&255,n.check=Au(n.check,B,2,0)),l=0,c=0,n.mode=3;case 3:for(;c<32;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}n.head&&(n.head.time=l),512&n.flags&&(B[0]=255&l,B[1]=l>>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,n.check=Au(n.check,B,4,0)),l=0,c=0,n.mode=4;case 4:for(;c<16;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&(B[0]=255&l,B[1]=l>>>8&255,n.check=Au(n.check,B,2,0)),l=0,c=0,n.mode=5;case 5:if(1024&n.flags){for(;c<16;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&(B[0]=255&l,B[1]=l>>>8&255,n.check=Au(n.check,B,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((f=n.length)>o&&(f=o),f&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),qa.arraySet(n.head.extra,r,a,f,F)),512&n.flags&&(n.check=Au(n.check,r,f,a)),o-=f,a+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===o)break e;f=0;do{F=r[a+f++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F))}while(F&&f<o);if(512&n.flags&&(n.check=Au(n.check,r,f,a)),o-=f,a+=f,F)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===o)break e;f=0;do{F=r[a+f++],n.head&&F&&n.length<65536&&(n.head.comment+=String.fromCharCode(F))}while(F&&f<o);if(512&n.flags&&(n.check=Au(n.check,r,f,a)),o-=f,a+=f,F)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;c<16;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;c<32;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}e.adler=n.check=go(l),l=0,c=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=u,e.avail_out=s,e.next_in=a,e.avail_in=o,n.hold=l,n.bits=c,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){l>>>=7&c,c-=7&c,n.mode=27;break}for(;c<3;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}switch(n.last=1&l,c-=1,3&(l>>>=1)){case 0:n.mode=14;break;case 1:if(vo(n),n.mode=20,6===t){l>>>=2,c-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}l>>>=2,c-=2;break;case 14:for(l>>>=7&c,c-=7&c;c<32;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&l,l=0,c=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(f=n.length){if(f>o&&(f=o),f>s&&(f=s),0===f)break e;qa.arraySet(i,r,a,f,u),o-=f,a+=f,s-=f,u+=f,n.length-=f;break}n.mode=12;break;case 17:for(;c<14;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(n.nlen=257+(31&l),l>>>=5,c-=5,n.ndist=1+(31&l),l>>>=5,c-=5,n.ncode=4+(15&l),l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;c<3;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}n.lens[A[n.have++]]=7&l,l>>>=3,c-=3}for(;n.have<19;)n.lens[A[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,w={bits:n.lenbits},E=po(0,n.lens,0,19,n.lencode,0,n.work,w),n.lenbits=w.bits,E){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;m=(k=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,b=65535&k,!((g=k>>>24)<=c);){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(b<16)l>>>=g,c-=g,n.lens[n.have++]=b;else{if(16===b){for(v=g+2;c<v;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(l>>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}F=n.lens[n.have-1],f=3+(3&l),l>>>=2,c-=2}else if(17===b){for(v=g+3;c<v;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}c-=g,F=0,f=3+(7&(l>>>=g)),l>>>=3,c-=3}else{for(v=g+7;c<v;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}c-=g,F=0,f=11+(127&(l>>>=g)),l>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;f--;)n.lens[n.have++]=F}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,w={bits:n.lenbits},E=po(1,n.lens,0,n.nlen,n.lencode,0,n.work,w),n.lenbits=w.bits,E){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,w={bits:n.distbits},E=po(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,w),n.distbits=w.bits,E){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(o>=6&&s>=258){e.next_out=u,e.avail_out=s,e.next_in=a,e.avail_in=o,n.hold=l,n.bits=c,lo(e,h),u=e.next_out,i=e.output,s=e.avail_out,a=e.next_in,r=e.input,o=e.avail_in,l=n.hold,c=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;m=(k=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,b=65535&k,!((g=k>>>24)<=c);){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(m&&0==(240&m)){for(y=g,C=m,_=b;m=(k=n.lencode[_+((l&(1<<y+C)-1)>>y)])>>>16&255,b=65535&k,!(y+(g=k>>>24)<=c);){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}l>>>=y,c-=y,n.back+=y}if(l>>>=g,c-=g,n.back+=g,n.length=b,0===m){n.mode=26;break}if(32&m){n.back=-1,n.mode=12;break}if(64&m){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&m,n.mode=22;case 22:if(n.extra){for(v=n.extra;c<v;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;m=(k=n.distcode[l&(1<<n.distbits)-1])>>>16&255,b=65535&k,!((g=k>>>24)<=c);){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(0==(240&m)){for(y=g,C=m,_=b;m=(k=n.distcode[_+((l&(1<<y+C)-1)>>y)])>>>16&255,b=65535&k,!(y+(g=k>>>24)<=c);){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}l>>>=y,c-=y,n.back+=y}if(l>>>=g,c-=g,n.back+=g,64&m){e.msg="invalid distance code",n.mode=30;break}n.offset=b,n.extra=15&m,n.mode=24;case 24:if(n.extra){for(v=n.extra;c<v;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(f=h-s,n.offset>f){if((f=n.offset-f)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}f>n.wnext?(f-=n.wnext,d=n.wsize-f):d=n.wnext-f,f>n.length&&(f=n.length),p=n.window}else p=i,d=u-n.offset,f=n.length;f>s&&(f=s),s-=f,n.length-=f;do{i[u++]=p[d++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;i[u++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;c<32;){if(0===o)break e;o--,l|=r[a++]<<c,c+=8}if(h-=s,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Au(n.check,i,h,u-h):vu(n.check,i,h,u-h)),h=s,(n.flags?l:go(l))!==n.check){e.msg="incorrect data check",n.mode=30;break}l=0,c=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;c<32;){if(0===o)break e;o--,l+=r[a++]<<c,c+=8}if(l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}l=0,c=0}n.mode=29;case 29:E=1;break e;case 30:E=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=u,e.avail_out=s,e.next_in=a,e.avail_in=o,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&ko(e,e.output,e.next_out,h-e.avail_out),D-=e.avail_in,h-=e.avail_out,e.total_in+=D,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Au(n.check,i,h,e.next_out-h):vu(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===D&&0===h||4===t)&&0===E&&(E=-5),E},inflateEnd:function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},inflateGetHeader:function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},inflateSetDictionary:function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&vu(1,t,r,0)!==n.check?-3:ko(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):-2},inflateInfo:"pako inflate (from Nodeca project)"},Ao={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};var xo=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},So=Object.prototype.toString;function Oo(e){if(!(this instanceof Oo))return new Oo(e);this.options=qa.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new io,this.strm.avail_out=0;var n=Bo.inflateInit2(this.strm,t.windowBits);if(n!==Ao.Z_OK)throw new Error(xu[n]);if(this.header=new xo,Bo.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Qu(t.dictionary):"[object ArrayBuffer]"===So.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Bo.inflateSetDictionary(this.strm,t.dictionary))!==Ao.Z_OK))throw new Error(xu[n])}function jo(e,t){var n=new Oo(t);if(n.push(e,!0),n.err)throw n.msg||xu[n.err];return n.result}Oo.prototype.push=function(e,t){var n,r,i,a,u,o=this.strm,s=this.options.chunkSize,l=this.options.dictionary,c=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?Ao.Z_FINISH:Ao.Z_NO_FLUSH,"string"==typeof e?o.input=to(e):"[object ArrayBuffer]"===So.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new qa.Buf8(s),o.next_out=0,o.avail_out=s),(n=Bo.inflate(o,Ao.Z_NO_FLUSH))===Ao.Z_NEED_DICT&&l&&(n=Bo.inflateSetDictionary(this.strm,l)),n===Ao.Z_BUF_ERROR&&!0===c&&(n=Ao.Z_OK,c=!1),n!==Ao.Z_STREAM_END&&n!==Ao.Z_OK)return this.onEnd(n),this.ended=!0,!1;o.next_out&&(0!==o.avail_out&&n!==Ao.Z_STREAM_END&&(0!==o.avail_in||r!==Ao.Z_FINISH&&r!==Ao.Z_SYNC_FLUSH)||("string"===this.options.to?(i=ro(o.output,o.next_out),a=o.next_out-i,u=no(o.output,i),o.next_out=a,o.avail_out=s-a,a&&qa.arraySet(o.output,o.output,i,a,0),this.onData(u)):this.onData(qa.shrinkBuf(o.output,o.next_out)))),0===o.avail_in&&0===o.avail_out&&(c=!0)}while((o.avail_in>0||0===o.avail_out)&&n!==Ao.Z_STREAM_END);return n===Ao.Z_STREAM_END&&(r=Ao.Z_FINISH),r===Ao.Z_FINISH?(n=Bo.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Ao.Z_OK):r!==Ao.Z_SYNC_FLUSH||(this.onEnd(Ao.Z_OK),o.avail_out=0,!0)},Oo.prototype.onData=function(e){this.chunks.push(e)},Oo.prototype.onEnd=function(e){e===Ao.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=qa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var To={Inflate:Oo,inflate:jo,inflateRaw:function(e,t){return(t=t||{}).raw=!0,jo(e,t)},ungzip:jo},Io={};(0,qa.assign)(Io,so,To,Ao);var Lo=Io,zo="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function Ro(e,t){ba.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}ga.inherits(Ro,ba),Ro.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(ga.transformTo(zo,e.data),!1)},Ro.prototype.flush=function(){ba.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},Ro.prototype.cleanUp=function(){ba.prototype.cleanUp.call(this),this._pako=null},Ro.prototype._createPako=function(){this._pako=new Lo[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Mo={STORE:{magic:"\0\0",compressWorker:function(e){return new ba("STORE compression")},uncompressWorker:function(){return new ba("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new Ro("Deflate",e)},uncompressWorker:function(){return new Ro("Inflate",{})}}},No="PK",Po="PK",$o="PK",Uo="PK",Wo="PK",Zo="PK\b",qo=function(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r},Ho=function(e,t,n,r,i,a){var u,o,s=e.file,l=e.compression,c=a!==ya.utf8encode,D=ga.transformTo("string",a(s.name)),h=ga.transformTo("string",ya.utf8encode(s.name)),f=s.comment,d=ga.transformTo("string",a(f)),p=ga.transformTo("string",ya.utf8encode(f)),g=h.length!==s.name.length,m=p.length!==f.length,b="",y="",C="",_=s.dir,F=s.date,E={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(E.crc32=e.crc32,E.compressedSize=e.compressedSize,E.uncompressedSize=e.uncompressedSize);var w=0;t&&(w|=8),c||!g&&!m||(w|=2048);var v=0,k=0;_&&(v|=16),"UNIX"===i?(k=798,v|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(s.unixPermissions,_)):(k=20,v|=function(e,t){return 63&(e||0)}(s.dosPermissions)),u=F.getUTCHours(),u<<=6,u|=F.getUTCMinutes(),u<<=5,u|=F.getUTCSeconds()/2,o=F.getUTCFullYear()-1980,o<<=4,o|=F.getUTCMonth()+1,o<<=5,o|=F.getUTCDate(),g&&(y=qo(1,1)+qo(La(D),4)+h,b+="up"+qo(y.length,2)+y),m&&(C=qo(1,1)+qo(La(d),4)+p,b+="uc"+qo(C.length,2)+C);var B="";return B+="\n\0",B+=qo(w,2),B+=l.magic,B+=qo(u,2),B+=qo(o,2),B+=qo(E.crc32,4),B+=qo(E.compressedSize,4),B+=qo(E.uncompressedSize,4),B+=qo(D.length,2),B+=qo(b.length,2),{fileRecord:No+B+D+b,dirRecord:Po+qo(k,2)+B+qo(d.length,2)+"\0\0\0\0"+qo(v,4)+qo(r,4)+D+b+d}},Ko=function(e){return Zo+qo(e.crc32,4)+qo(e.compressedSize,4)+qo(e.uncompressedSize,4)};function Vo(e,t,n,r){ba.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}ga.inherits(Vo,ba),Vo.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,ba.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Vo.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ho(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Vo.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ho(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Ko(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Vo.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,r=function(e,t,n,r,i){var a=ga.transformTo("string",i(r));return $o+"\0\0\0\0"+qo(e,2)+qo(e,2)+qo(t,4)+qo(n,4)+qo(a.length,2)+a}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},Vo.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},Vo.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},Vo.prototype.resume=function(){return!!ba.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},Vo.prototype.error=function(e){var t=this._sources;if(!ba.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},Vo.prototype.lock=function(){ba.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};var Go=Vo,Yo=function(e,t,n){var r=new Go(t.streamFiles,n,t.platform,t.encodeFileName),i=0;try{e.forEach((function(e,n){i++;var a=function(e,t){var n=e||t,r=Mo[n];if(!r)throw new Error(n+" is not a valid compression method !");return r}(n.options.compression,t.compression),u=n.options.compressionOptions||t.compressionOptions||{},o=n.dir,s=n.date;n._compressWorker(a,u).withStreamInfo("file",{name:e,dir:o,date:s,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(r)})),r.entriesCount=i}catch(e){r.error(e)}return r};function Xo(e,t){ba.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}ga.inherits(Xo,ba),Xo.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},Xo.prototype.pause=function(){return!!ba.prototype.pause.call(this)&&(this._stream.pause(),!0)},Xo.prototype.resume=function(){return!!ba.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)};var Jo=Xo,Qo=function(e,t,n){var r,i=ga.getTypeOf(t),a=ga.extend(n||{},xa);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=ts(e)),a.createFolders&&(r=es(e))&&ns.call(this,r,!0);var u="string"===i&&!1===a.binary&&!1===a.base64;n&&void 0!==n.binary||(a.binary=!u),(t instanceof Na&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var o=null;o=t instanceof Na||t instanceof ba?t:Ui&&Hi(t)?new Jo(e,t):ga.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var s=new Za(e,o,a);this.files[e]=s},es=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},ts=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},ns=function(e,t){return t=void 0!==t?t:xa.createFolders,e=ts(e),this.files[e]||Qo.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function rs(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var is={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(rs(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return(e=this.root+e,Qo.call(this,e,t,n),this)},folder:function(e){if(!e)return this;if(rs(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=ns.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=ga.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:ya.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");ga.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=Yo(this,n,r)}catch(e){(t=new ba("error")).error(e)}return new Aa(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};function as(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}as.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return ga.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var us=as;function os(e){us.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}ga.inherits(os,us),os.prototype.byteAt=function(e){return this.data[this.zero+e]},os.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},os.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},os.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ss=os;function ls(e){us.call(this,e)}ga.inherits(ls,us),ls.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},ls.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},ls.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},ls.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var cs=ls;function Ds(e){ss.call(this,e)}ga.inherits(Ds,ss),Ds.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var hs=Ds;function fs(e){hs.call(this,e)}ga.inherits(fs,hs),fs.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ds=fs,ps=function(e){var t=ga.getTypeOf(e);return ga.checkSupport(t),"string"!==t||Mi.uint8array?"nodebuffer"===t?new ds(e):Mi.uint8array?new hs(ga.transformTo("uint8array",e)):new ss(ga.transformTo("array",e)):new cs(e)};function gs(e,t){this.options=e,this.loadOptions=t}gs.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Mo)if(Mo.hasOwnProperty(t)&&Mo[t].magic===e)return Mo[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+ga.pretty(this.compressionMethod)+" unknown (inner file : "+ga.transformTo("string",this.fileName)+")");this.decompressed=new Na(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=ps(this.extraFields[1].value);this.uncompressedSize===ga.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===ga.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===ga.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===ga.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r}},handleUTF8:function(){var e=Mi.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=ya.utf8decode(this.fileName),this.fileCommentStr=ya.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=ga.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var i=ga.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=ps(e.value);return 1!==t.readInt(1)||La(this.fileName)!==t.readInt(4)?null:ya.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=ps(e.value);return 1!==t.readInt(1)||La(this.fileComment)!==t.readInt(4)?null:ya.utf8decode(t.readData(e.length-5))}return null}};var ms=gs;function bs(e){this.files=[],this.loadOptions=e}bs.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+ga.pretty(t)+", expected "+ga.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=Mi.uint8array?"uint8array":"array",n=ga.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(No),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(Po);)(e=new ms({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature($o);if(e<0)throw!this.isSignature(0,No)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature($o),this.readBlockEndOfCentral(),this.diskNumber===ga.MAX_VALUE_16BITS||this.diskWithCentralDirStart===ga.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===ga.MAX_VALUE_16BITS||this.centralDirRecords===ga.MAX_VALUE_16BITS||this.centralDirSize===ga.MAX_VALUE_32BITS||this.centralDirOffset===ga.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(Uo))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(Uo),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,Wo)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(Wo),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(Wo),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(r>0)this.isSignature(t,Po)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=ps(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var ys=bs;function Cs(e){return new pa.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new Ra);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function _s(){if(!(this instanceof _s))return new _s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new _s;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}_s.prototype=is,_s.prototype.loadAsync=function(e,t){var n=this;return t=ga.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:ya.utf8decode}),Ui&&Hi(e)?pa.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):ga.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new ys(t);return n.load(e),n})).then((function(e){var n=[pa.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var i=0;i<r.length;i++)n.push(Cs(r[i]));return pa.Promise.all(n)})).then((function(e){for(var r=e.shift(),i=r.files,a=0;a<i.length;a++){var u=i[a];n.file(u.fileNameStr,u.decompressed,{binary:!0,optimizedBinaryString:!0,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:t.createFolders})}return r.zipComment.length&&(n.comment=r.zipComment),n}))},_s.support=Mi,_s.defaults=xa,_s.version="3.2.0",_s.loadAsync=function(e,t){return(new _s).loadAsync(e,t)},_s.external=pa;var Fs=_s;const{asyncForEach:Es,pathOnly:ws}=Nt,{blue:vs}=w,{writeFile:ks}=a.promises,{join:Bs}=i,As=async e=>(await Es(e.files,async t=>{".swatches"==t.ext?(async(e,t)=>{const n=new Fs;n.file("Swatches.json",t.data),await n.generateAsync({type:"nodebuffer"}).then((async function(n){await ks(t.path,n).finally(()=>e).catch(t=>({...e,error:[t]})),await ks(Bs(ws(t.path),"Swatches.json"),t.data).finally(()=>e).catch(t=>({...e,error:[t]}))}))})(e,t):await ks(t.path,t.data).finally(()=>e).catch(t=>({...e,error:[t]}))}),e),xs=e=>{e.files.length>1?ne.BLOCK_MID("Writing files"):ne.BLOCK_MID("Writing file"),e.files.forEach(e=>{ne.BLOCK_LINE_SUCCESS(`${e.name} ${vs().italic(e.path)}`)}),e.error&&ne.BLOCK_ERRORS(e.error),e.warning&&ne.BLOCK_WARNINGS(e.warning)};var Ss={WRITE:async e=>As(e).then(xs).then(e=>e)};var Os={FINISH:()=>{ne.BLOCK_END()}};const{START:js}=Xt,{SETTINGS:Ts}=Vt,{FOLDERS:Is}=tn,{SOURCE:Ls}=on,{TEMPLATES:zs}=fn,{CONVERT:Rs}=vn,{BUILD:Ms}=er,{WRITE:Ns}=Ss,{FINISH:Ps}=Os;var $s={START:js,SETTINGS:Ts,FOLDERS:Is,SOURCE:Ls,TEMPLATES:zs,CONVERT:Rs,BUILD:Ms,WRITE:Ns,FINISH:Ps};$s.START().then($s.SETTINGS).then($s.SOURCE).then($s.FOLDERS).then($s.CONVERT).then($s.TEMPLATES).then($s.BUILD).then($s.WRITE).then($s.FINISH);
  