@telia-ace/alliance-cli 2.0.2-next.1 → 2.0.3-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-OOIQVG5V.js +402 -0
- package/dist/chunk-MCRDX3J3.js +3 -0
- package/dist/chunk-PTAOP3HK.js +32 -0
- package/dist/chunk-X62RPJPI.js +8 -0
- package/dist/index.js +1 -1
- package/dist/{jwt-CBZJK4VQ.js → jwt-63BXU2GA.js} +1 -1
- package/dist/prompt-ZH6TPIKX.js +47 -0
- package/dist/{public-key-EMTOLL7G.js → public-key-PRKWBUJ7.js} +1 -1
- package/dist/{serve-F7KZZRPZ.js → serve-DU72MF5O.js} +1 -1
- package/dist/upgrade-XXVWWXAA.js +4 -0
- package/package.json +6 -6
- package/dist/build-MB2KHY27.js +0 -320
- package/dist/chunk-2GL2UYTF.js +0 -25
- package/dist/chunk-CTYZYGF2.js +0 -7
- package/dist/chunk-KNIZSLDR.js +0 -8
- package/dist/prompt-XHIHFZ5S.js +0 -47
- package/dist/upgrade-4OTHE3EK.js +0 -4
package/dist/chunk-2GL2UYTF.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createRequire as c__createRequire } from 'node:module';
|
|
2
|
-
const require = c__createRequire(import.meta.url);
|
|
3
|
-
var FD=Object.create;var L=Object.defineProperty;var tD=Object.getOwnPropertyDescriptor;var eD=Object.getOwnPropertyNames;var rD=Object.getPrototypeOf,oD=Object.prototype.hasOwnProperty;var HD=(F=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(F,{get:(u,t)=>(typeof require<"u"?require:u)[t]}):F)(function(F){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+F+'" is not supported')});var KD=(F,u)=>()=>(F&&(u=F(F=0)),u);var JD=(F,u)=>()=>(u||F((u={exports:{}}).exports,u),u.exports),jD=(F,u)=>{for(var t in u)L(F,t,{get:u[t],enumerable:!0})},P=(F,u,t,r)=>{if(u&&typeof u=="object"||typeof u=="function")for(let e of eD(u))!oD.call(F,e)&&e!==t&&L(F,e,{get:()=>u[e],enumerable:!(r=tD(u,e))||r.enumerable});return F};var qD=(F,u,t)=>(t=F!=null?FD(rD(F)):{},P(u||!F||!F.__esModule?L(t,"default",{value:F,enumerable:!0}):t,F)),XD=F=>P(L({},"__esModule",{value:!0}),F);var C={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},k={silent:{level:-1},fatal:{level:C.fatal},error:{level:C.error},warn:{level:C.warn},log:{level:C.log},info:{level:C.info},success:{level:C.success},fail:{level:C.fail},ready:{level:C.info},start:{level:C.info},box:{level:C.info},debug:{level:C.debug},trace:{level:C.trace},verbose:{level:C.verbose}};function S(F){return F!==null&&typeof F=="object"}function w(F,u,t=".",r){if(!S(u))return w(F,{},t,r);let e=Object.assign({},u);for(let o in F){if(o==="__proto__"||o==="constructor")continue;let D=F[o];D!=null&&(r&&r(e,o,D,t)||(Array.isArray(D)&&Array.isArray(e[o])?e[o]=[...D,...e[o]]:S(D)&&S(e[o])?e[o]=w(D,e[o],(t?`${t}.`:"")+o.toString(),r):e[o]=D))}return e}function nD(F){return(...u)=>u.reduce((t,r)=>w(t,r,"",F),{})}var sD=nD();function CD(F){return Object.prototype.toString.call(F)==="[object Object]"}function ED(F){return!(!CD(F)||!F.message&&!F.args||F.stack)}var b=!1,U=[],E=class F{constructor(u={}){let t=u.types||k;this.options=sD({...u,defaults:{...u.defaults},level:R(u.level,t),reporters:[...u.reporters||[]]},{types:k,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let r in t){let e={type:r,...this.options.defaults,...t[r]};this[r]=this._wrapLogFn(e),this[r].raw=this._wrapLogFn(e,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(u){this.options.level=R(u,this.options.types,this.options.level)}prompt(u,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(u,t)}create(u){let t=new F({...this.options,...u});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(u){return this.create({...this.options,defaults:{...this.options.defaults,...u}})}withTag(u){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+u:u})}addReporter(u){return this.options.reporters.push(u),this}removeReporter(u){if(u){let t=this.options.reporters.indexOf(u);if(t>=0)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(u){return this.options.reporters=Array.isArray(u)?u:[u],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let u in this.options.types)console["__"+u]||(console["__"+u]=console[u]),console[u]=this[u].raw}restoreConsole(){for(let u in this.options.types)console["__"+u]&&(console[u]=console["__"+u],delete console["__"+u])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(u,t){u&&(u.__write||(u.__write=u.write),u.write=r=>{this[t].raw(String(r).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(u){u&&u.__write&&(u.write=u.__write,delete u.__write)}pauseLogs(){b=!0}resumeLogs(){b=!1;let u=U.splice(0);for(let t of u)t[0]._logFn(t[1],t[2])}mockTypes(u){let t=u||this.options.mockFn;if(this._mockFn=t,typeof t=="function")for(let r in this.options.types)this[r]=t(r,this.options.types[r])||this[r],this[r].raw=this[r]}_wrapLogFn(u,t){return(...r)=>{if(b){U.push([this,u,r,t]);return}return this._logFn(u,r,t)}}_logFn(u,t,r){if((u.level||0)>this.level)return!1;let e={date:new Date,args:[],...u,level:R(u.level,this.options.types)};!r&&t.length===1&&ED(t[0])?Object.assign(e,t[0]):e.args=[...t],e.message&&(e.args.unshift(e.message),delete e.message),e.additional&&(Array.isArray(e.additional)||(e.additional=e.additional.split(`
|
|
4
|
-
`)),e.args.push(`
|
|
5
|
-
`+e.additional.join(`
|
|
6
|
-
`)),delete e.additional),e.type=typeof e.type=="string"?e.type.toLowerCase():"log",e.tag=typeof e.tag=="string"?e.tag:"";let o=(s=!1)=>{let x=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&x>0){let l=[...this._lastLog.object.args];x>1&&l.push(`(repeated ${x} times)`),this._log({...this._lastLog.object,args:l}),this._lastLog.count=1}s&&(this._lastLog.object=e,this._log(e))};clearTimeout(this._lastLog.timeout);let D=this._lastLog.time&&e.date?e.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=e.date,D<this.options.throttle)try{let s=JSON.stringify([e.type,e.tag,e.args]),x=this._lastLog.serialized===s;if(this._lastLog.serialized=s,x&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(o,this.options.throttle);return}}catch{}o(!0)}_log(u){for(let t of this.options.reporters)t.log(u,{options:this.options})}};function R(F,u={},t=3){return F===void 0?t:typeof F=="number"?F:u[F]&&u[F].level!==void 0?u[F].level:t}E.prototype.add=E.prototype.addReporter;E.prototype.remove=E.prototype.removeReporter;E.prototype.clear=E.prototype.removeReporter;E.prototype.withScope=E.prototype.withTag;E.prototype.mock=E.prototype.mockTypes;E.prototype.pause=E.prototype.pauseLogs;E.prototype.resume=E.prototype.resumeLogs;function W(F={}){return new E(F)}import{formatWithOptions as iD}from"node:util";import{sep as xD}from"node:path";function O(F){let u=process.cwd()+xD;return F.split(`
|
|
7
|
-
`).splice(1).map(r=>r.trim().replace("file://","").replace(u,""))}function aD(F,u){return(u.__write||u.write).call(u,F)}var N=F=>F?`[${F}]`:"",m=class{formatStack(u,t){return" "+O(u).join(`
|
|
8
|
-
`)}formatArgs(u,t){let r=u.map(e=>e&&typeof e.stack=="string"?e.message+`
|
|
9
|
-
`+this.formatStack(e.stack,t):e);return iD(t,...r)}formatDate(u,t){return t.date?u.toLocaleTimeString():""}filterAndJoin(u){return u.filter(Boolean).join(" ")}formatLogObj(u,t){let r=this.formatArgs(u.args,t);return u.type==="box"?`
|
|
10
|
-
`+[N(u.tag),u.title&&u.title,...r.split(`
|
|
11
|
-
`)].filter(Boolean).map(e=>" > "+e).join(`
|
|
12
|
-
`)+`
|
|
13
|
-
`:this.filterAndJoin([N(u.type),N(u.tag),r])}log(u,t){let r=this.formatLogObj(u,{columns:t.options.stdout.columns||0,...t.options.formatOptions});return aD(r+`
|
|
14
|
-
`,u.level<2?t.options.stderr||process.stderr:t.options.stdout||process.stdout)}};import*as v from"node:tty";var{env:h={},argv:V=[],platform:lD=""}=typeof process>"u"?{}:process,BD="NO_COLOR"in h||V.includes("--no-color"),cD="FORCE_COLOR"in h||V.includes("--color"),AD=lD==="win32",z=h.TERM==="dumb",fD=v&&v.isatty&&v.isatty(1)&&h.TERM&&!z,pD="CI"in h&&("GITHUB_ACTIONS"in h||"GITLAB_CI"in h||"CIRCLECI"in h),hD=!BD&&(cD||AD&&!z||fD||pD);function Z(F,u,t,r,e=u.slice(0,Math.max(0,F))+r,o=u.slice(Math.max(0,F+t.length)),D=o.indexOf(t)){return e+(D<0?o:Z(D,o,t,r))}function gD(F,u,t,r,e){return F<0?t+u+r:t+Z(F,u,r,e)+r}function dD(F,u,t=F,r=F.length+1){return e=>e||!(e===""||e===void 0)?gD((""+e).indexOf(u,r),e,F,u,t):""}function n(F,u,t){return dD(`\x1B[${F}m`,`\x1B[${u}m`,t)}var G={reset:n(0,0),bold:n(1,22,"\x1B[22m\x1B[1m"),dim:n(2,22,"\x1B[22m\x1B[2m"),italic:n(3,23),underline:n(4,24),inverse:n(7,27),hidden:n(8,28),strikethrough:n(9,29),black:n(30,39),red:n(31,39),green:n(32,39),yellow:n(33,39),blue:n(34,39),magenta:n(35,39),cyan:n(36,39),white:n(37,39),gray:n(90,39),bgBlack:n(40,49),bgRed:n(41,49),bgGreen:n(42,49),bgYellow:n(43,49),bgBlue:n(44,49),bgMagenta:n(45,49),bgCyan:n(46,49),bgWhite:n(47,49),blackBright:n(90,39),redBright:n(91,39),greenBright:n(92,39),yellowBright:n(93,39),blueBright:n(94,39),magentaBright:n(95,39),cyanBright:n(96,39),whiteBright:n(97,39),bgBlackBright:n(100,49),bgRedBright:n(101,49),bgGreenBright:n(102,49),bgYellowBright:n(103,49),bgBlueBright:n(104,49),bgMagentaBright:n(105,49),bgCyanBright:n(106,49),bgWhiteBright:n(107,49)};function mD(F=hD){return F?G:Object.fromEntries(Object.keys(G).map(u=>[u,String]))}var a=mD();function H(F,u="reset"){return a[F]||a[u]}function eu(F,u){return H(F)(u)}var _D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");function d(F){return F.replace(new RegExp(_D,"g"),"")}var Y={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},yD={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function K(F,u={}){let t={...u,style:{...yD,...u.style}},r=F.split(`
|
|
15
|
-
`),e=[],o=H(t.style.borderColor),D={...typeof t.style.borderStyle=="string"?Y[t.style.borderStyle]||Y.solid:t.style.borderStyle};if(o)for(let i in D)D[i]=o(D[i]);let s=t.style.padding%2===0?t.style.padding:t.style.padding+1,x=r.length+s,l=Math.max(...r.map(i=>i.length))+s,c=l+s,B=t.style.marginLeft>0?" ".repeat(t.style.marginLeft):"";if(t.style.marginTop>0&&e.push("".repeat(t.style.marginTop)),t.title){let i=D.h.repeat(Math.floor((l-d(t.title).length)/2)),g=D.h.repeat(l-d(t.title).length-d(i).length+s);e.push(`${B}${D.tl}${i}${t.title}${g}${D.tr}`)}else e.push(`${B}${D.tl}${D.h.repeat(c)}${D.tr}`);let p=t.style.valign==="center"?Math.floor((x-r.length)/2):t.style.valign==="top"?x-r.length-s:x-r.length;for(let i=0;i<x;i++)if(i<p||i>=p+r.length)e.push(`${B}${D.v}${" ".repeat(c)}${D.v}`);else{let g=r[i-p],DD=" ".repeat(s),uD=" ".repeat(l-d(g).length);e.push(`${B}${D.v}${DD}${g}${uD}${D.v}`)}return e.push(`${B}${D.bl}${D.h.repeat(c)}${D.br}`),t.style.marginBottom>0&&e.push("".repeat(t.style.marginBottom)),e.join(`
|
|
16
|
-
`)}import A from"node:process";var LD=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];function vD(F){for(let u of LD){let t=u[1]||u[0];if(F[t])return{name:u[0].toLowerCase(),...u[2]}}return F.SHELL&&F.SHELL==="/bin/jsh"?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var T=typeof process<"u"?process:{},_=T.env||{},q=vD(_),ID=typeof process<"u"&&process.env&&process.env.NODE_ENV||"";T.platform;q.name;var X=y(_.CI)||q.ci!==!1,TD=y(T.stdout&&T.stdout.isTTY),SD=y(_.DEBUG),$=ID==="test"||y(_.TEST);y(_.MINIMAL);function y(F){return F?F!=="false":!1}function bD({onlyFirst:F=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,F?void 0:"g")}var RD=bD();function wD(F){if(typeof F!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof F}\``);return F.replace(RD,"")}function ND(F){return F&&F.__esModule&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F}var Q={exports:{}};(function(F){var u={};F.exports=u,u.eastAsianWidth=function(r){var e=r.charCodeAt(0),o=r.length==2?r.charCodeAt(1):0,D=e;return 55296<=e&&e<=56319&&56320<=o&&o<=57343&&(e&=1023,o&=1023,D=e<<10|o,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(r){var e=this.eastAsianWidth(r);return e=="F"||e=="W"||e=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){for(var e=t(r),o=0,D=0;D<e.length;D++)o=o+this.characterLength(e[D]);return o},u.slice=function(r,e,o){textLen=u.length(r),e=e||0,o=o||1,e<0&&(e=textLen+e),o<0&&(o=textLen+o);for(var D="",s=0,x=t(r),l=0;l<x.length;l++){var c=x[l],B=u.length(c);if(s>=e-(B==2?1:0))if(s+B<=o)D+=c;else break;s+=B}return D}})(Q);var OD=Q.exports,MD=ND(OD),$D=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function PD(F,u){if(typeof F!="string"||F.length===0||(u={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...u},u.countAnsiEscapeCodes||(F=wD(F)),F.length===0))return 0;let t=u.ambiguousIsNarrow?1:2,r=0;for(let{segment:e}of new Intl.Segmenter().segment(F)){let o=e.codePointAt(0);if(o<=31||o>=127&&o<=159||o>=768&&o<=879)continue;if($D().test(e)){r+=2;continue}switch(MD.eastAsianWidth(e)){case"F":case"W":{r+=2;break}case"A":{r+=t;break}default:r+=1}}return r}function kD(){return A.platform!=="win32"?A.env.TERM!=="linux":!!A.env.CI||!!A.env.WT_SESSION||!!A.env.TERMINUS_SUBLIME||A.env.ConEmuTask==="{cmd::Cmder}"||A.env.TERM_PROGRAM==="Terminus-Sublime"||A.env.TERM_PROGRAM==="vscode"||A.env.TERM==="xterm-256color"||A.env.TERM==="alacritty"||A.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var UD={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},WD={0:"red",1:"yellow"},GD=kD(),f=(F,u)=>GD?F:u,J={error:f("\u2716","\xD7"),fatal:f("\u2716","\xD7"),ready:f("\u2714","\u221A"),warn:f("\u26A0","\u203C"),info:f("\u2139","i"),success:f("\u2714","\u221A"),debug:f("\u2699","D"),trace:f("\u2192","\u2192"),fail:f("\u2716","\xD7"),start:f("\u25D0","o"),log:""};function j(F){return Intl.Segmenter?PD(F):d(F).length}var M=class extends m{formatStack(u){return`
|
|
17
|
-
`+O(u).map(t=>" "+t.replace(/^at +/,r=>a.gray(r)).replace(/\((.+)\)/,(r,e)=>`(${a.cyan(e)})`)).join(`
|
|
18
|
-
`)}formatType(u,t,r){let e=UD[u.type]||WD[u.level]||"gray";if(t)return VD(e)(a.black(` ${u.type.toUpperCase()} `));let o=typeof J[u.type]=="string"?J[u.type]:u.icon||u.type;return o?YD(e)(o):""}formatLogObj(u,t){let[r,...e]=this.formatArgs(u.args,t).split(`
|
|
19
|
-
`);if(u.type==="box")return K(I(r+(e.length>0?`
|
|
20
|
-
`+e.join(`
|
|
21
|
-
`):"")),{title:u.title?I(u.title):void 0,style:u.style});let o=this.formatDate(u.date,t),D=o&&a.gray(o),s=u.badge??u.level<2,x=this.formatType(u,s,t),l=u.tag?a.gray(u.tag):"",c,B=this.filterAndJoin([x,I(r)]),p=this.filterAndJoin(t.columns?[l,D]:[l]),i=(t.columns||0)-j(B)-j(p)-2;if(c=i>0&&(t.columns||0)>=80?B+" ".repeat(i)+p:(p?`${a.gray(`[${p}]`)} `:"")+B,c+=I(e.length>0?`
|
|
22
|
-
`+e.join(`
|
|
23
|
-
`):""),u.type==="trace"){let g=new Error("Trace: "+u.message);c+=this.formatStack(g.stack||"")}return s?`
|
|
24
|
-
`+c+`
|
|
25
|
-
`:c}};function I(F){return F.replace(/`([^`]+)`/gm,(u,t)=>a.cyan(t)).replace(/\s+_([^_]+)_\s+/gm,(u,t)=>` ${a.underline(t)} `)}function YD(F="white"){return a[F]||a.white}function VD(F="bgWhite"){return a[`bg${F[0].toUpperCase()}${F.slice(1)}`]||a.bgWhite}function zD(F={}){let u=ZD();return process.env.CONSOLA_LEVEL&&(u=Number.parseInt(process.env.CONSOLA_LEVEL)??u),W({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...r)=>import("./prompt-XHIHFZ5S.js").then(e=>e.prompt(...r)),reporters:F.reporters||[F.fancy??!(X||$)?new M:new m],...F})}function ZD(){return SD?C.debug:$?C.warn:C.info}var Eu=zD();export{HD as a,KD as b,JD as c,jD as d,qD as e,XD as f,a as g,H as h,eu as i,ND as j,kD as k,Eu as l};
|
package/dist/chunk-CTYZYGF2.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as c__createRequire } from 'node:module';
|
|
2
|
-
const require = c__createRequire(import.meta.url);
|
|
3
|
-
import{g,l as p}from"./chunk-2GL2UYTF.js";function U(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function y(e,n=""){let t=[];for(let o of e)for(let[a,r]of o.entries())t[a]=Math.max(t[a]||0,r.length);return e.map(o=>o.map((a,r)=>n+a[r===0?"padStart":"padEnd"](t[r])).join(" ")).join(`
|
|
4
|
-
`)}function m(e){return typeof e=="function"?e():e}var w=class extends Error{constructor(n,t){super(n),this.code=t,this.name="CLIError"}},_=/\d/,j=["-","_","/","."];function S(e=""){if(!_.test(e))return e!==e.toLowerCase()}function v(e,n){let t=n??j,o=[];if(!e||typeof e!="string")return o;let a="",r,l;for(let i of e){let s=t.includes(i);if(s===!0){o.push(a),a="",r=void 0;continue}let u=S(i);if(l===!1){if(r===!1&&u===!0){o.push(a),a=i,r=u;continue}if(r===!0&&u===!1&&a.length>1){let c=a.at(-1);o.push(a.slice(0,Math.max(0,a.length-1))),a=c+i,r=u;continue}}a+=i,r=u,l=s}return o.push(a),o}function E(e){return e?e[0].toUpperCase()+e.slice(1):""}function R(e){return e?e[0].toLowerCase()+e.slice(1):""}function k(e,n){return e?(Array.isArray(e)?e:v(e)).map(t=>E(n?.normalize?t.toLowerCase():t)).join(""):""}function q(e,n){return R(k(e||"",n))}function I(e,n){return e?(Array.isArray(e)?e:v(e)).map(t=>t.toLowerCase()).join(n??"-"):""}function x(e){return e==null?[]:Array.isArray(e)?e:[e]}function H(e,n,t,o){let a,r=e[n],l=~o.string.indexOf(n)?t==null||t===!0?"":String(t):typeof t=="boolean"?t:~o.boolean.indexOf(n)?t==="false"?!1:t==="true"||(e._.push((a=+t,a*0===0?a:t)),!!t):(a=+t,a*0===0?a:t);e[n]=r==null?l:Array.isArray(r)?r.concat(l):[r,l]}function T(e=[],n={}){let t,o,a,r,l,i={_:[]},s=0,u=0,c=0,A=e.length,C=n.alias!==void 0,f=n.unknown!==void 0,d=n.default!==void 0;if(n.alias=n.alias||{},n.string=x(n.string),n.boolean=x(n.boolean),C)for(t in n.alias)for(o=n.alias[t]=x(n.alias[t]),s=0;s<o.length;s++)(n.alias[o[s]]=o.concat(t)).splice(s,1);for(s=n.boolean.length;s-- >0;)for(o=n.alias[n.boolean[s]]||[],u=o.length;u-- >0;)n.boolean.push(o[u]);for(s=n.string.length;s-- >0;)for(o=n.alias[n.string[s]]||[],u=o.length;u-- >0;)n.string.push(o[u]);if(d){for(t in n.default)if(r=typeof n.default[t],o=n.alias[t]=n.alias[t]||[],n[r]!==void 0)for(n[r].push(t),s=0;s<o.length;s++)n[r].push(o[s])}let h=f?Object.keys(n.alias):[];for(s=0;s<A;s++){if(a=e[s],a==="--"){i._=i._.concat(e.slice(++s));break}for(u=0;u<a.length&&a.charCodeAt(u)===45;u++);if(u===0)i._.push(a);else if(a.substring(u,u+3)==="no-"){if(r=a.slice(Math.max(0,u+3)),f&&!~h.indexOf(r))return n.unknown(a);i[r]=!1}else{for(c=u+1;c<a.length&&a.charCodeAt(c)!==61;c++);for(r=a.substring(u,c),l=a.slice(Math.max(0,++c))||s+1===A||(""+e[s+1]).charCodeAt(0)===45||e[++s],o=u===2?[r]:r,c=0;c<o.length;c++){if(r=o[c],f&&!~h.indexOf(r))return n.unknown("-".repeat(u)+r);H(i,r,c+1<o.length||l,n)}}}if(d)for(t in n.default)i[t]===void 0&&(i[t]=n.default[t]);if(C)for(t in i)for(o=n.alias[t]||[];o.length>0;)i[o.shift()]=i[t];return i}function P(e,n){let t={boolean:[],string:[],mixed:[],alias:{},default:{}},o=O(n);for(let i of o)i.type!=="positional"&&(i.type==="string"?t.string.push(i.name):i.type==="boolean"&&t.boolean.push(i.name),i.default!==void 0&&(t.default[i.name]=i.default),i.alias&&(t.alias[i.name]=i.alias));let a=T(e,t),[...r]=a._,l=new Proxy(a,{get(i,s){return i[s]??i[q(s)]??i[I(s)]}});for(let[,i]of o.entries())if(i.type==="positional"){let s=r.shift();if(s!==void 0)l[i.name]=s;else{if(i.default===void 0&&i.required!==!1)throw new w(`Missing required positional argument: ${i.name.toUpperCase()}`,"EARG");l[i.name]=i.default}}else if(i.required&&l[i.name]===void 0)throw new w(`Missing required argument: --${i.name}`,"EARG");return l}function O(e){let n=[];for(let[t,o]of Object.entries(e||{}))n.push({...o,name:t,alias:U(o.alias)});return n}async function N(e,n){let t=await m(e.args||{}),o=P(n.rawArgs,t),a={rawArgs:n.rawArgs,args:o,data:n.data,cmd:e};typeof e.setup=="function"&&await e.setup(a);let r;try{let l=await m(e.subCommands);if(l&&Object.keys(l).length>0){let i=n.rawArgs.findIndex(u=>!u.startsWith("-")),s=n.rawArgs[i];if(s){if(!l[s])throw new w(`Unknown command \`${s}\``,"E_UNKNOWN_COMMAND");let u=await m(l[s]);u&&await N(u,{rawArgs:n.rawArgs.slice(i+1)})}else if(!e.run)throw new w("No command specified.","E_NO_COMMAND")}typeof e.run=="function"&&(r=await e.run(a))}finally{typeof e.cleanup=="function"&&await e.cleanup(a)}return{result:r}}async function $(e,n,t){let o=await m(e.subCommands);if(o&&Object.keys(o).length>0){let a=n.findIndex(i=>!i.startsWith("-")),r=n[a],l=await m(o[r]);if(l)return $(l,n.slice(a+1),e)}return[e,t]}async function D(e,n){try{p.log(await G(e,n)+`
|
|
5
|
-
`)}catch(t){p.error(t)}}async function G(e,n){let t=await m(e.meta||{}),o=O(await m(e.args||{})),a=await m(n?.meta||{}),r=`${a.name?`${a.name} `:""}`+(t.name||process.argv[1]),l=[],i=[],s=[],u=[];for(let f of o)if(f.type==="positional"){let d=f.name.toUpperCase(),h=f.required!==!1&&f.default===void 0,b=f.default?`="${f.default}"`:"";i.push(["`"+d+b+"`",f.description||"",f.valueHint?`<${f.valueHint}>`:""]),u.push(h?`<${d}>`:`[${d}]`)}else{let d=f.required===!0&&f.default===void 0,h=(f.type==="boolean"&&f.default===!0?[...(f.alias||[]).map(b=>`--no-${b}`),`--no-${f.name}`].join(", "):[...(f.alias||[]).map(b=>`-${b}`),`--${f.name}`].join(", "))+(f.type==="string"&&(f.valueHint||f.default)?`=${f.valueHint?`<${f.valueHint}>`:`"${f.default||""}"`}`:"");l.push(["`"+h+(d?" (required)":"")+"`",f.description||""]),d&&u.push(h)}if(e.subCommands){let f=[],d=await m(e.subCommands);for(let[h,b]of Object.entries(d)){let M=await m(b),L=await m(M?.meta);s.push([`\`${h}\``,L?.description||""]),f.push(h)}u.push(f.join("|"))}let c=[],A=t.version||a.version;c.push(g.gray(`${t.description} (${r+(A?` v${A}`:"")})`),"");let C=l.length>0||i.length>0;return c.push(`${g.underline(g.bold("USAGE"))} \`${r}${C?" [OPTIONS]":""} ${u.join(" ")}\``,""),i.length>0&&(c.push(g.underline(g.bold("ARGUMENTS")),""),c.push(y(i," ")),c.push("")),l.length>0&&(c.push(g.underline(g.bold("OPTIONS")),""),c.push(y(l," ")),c.push("")),s.length>0&&(c.push(g.underline(g.bold("COMMANDS")),""),c.push(y(s," ")),c.push("",`Use \`${r} <command> --help\` for more information about a command.`)),c.filter(f=>typeof f=="string").join(`
|
|
6
|
-
`)}async function ee(e,n={}){let t=n.rawArgs||process.argv.slice(2),o=n.showUsage||D;try{if(t.includes("--help")||t.includes("-h"))await o(...await $(e,t)),process.exit(0);else if(t.length===1&&t[0]==="--version"){let a=typeof e.meta=="function"?await e.meta():await e.meta;if(!a?.version)throw new w("No version specified","E_NO_VERSION");p.log(a.version)}else await N(e,{rawArgs:t})}catch(a){let r=a instanceof w;r||p.error(a,`
|
|
7
|
-
`),r&&await o(...await $(e,t)),p.error(a.message),process.exit(1)}}export{ee as a};
|
package/dist/chunk-KNIZSLDR.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as c__createRequire } from 'node:module';
|
|
2
|
-
const require = c__createRequire(import.meta.url);
|
|
3
|
-
import{h as R,i as Oe,l as $}from"./chunk-2GL2UYTF.js";import{existsSync as L,readFileSync as dt}from"node:fs";import{relative as Ae,resolve as V}from"node:path";var b;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{let a={};for(let i of s)a[i]=i;return a},t.getValidEnumValues=s=>{let a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(let o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let a=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(let i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(b||(b={}));var Re;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Re||(Re={}));var f=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),D=t=>{switch(typeof t){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(t)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(t)?f.array:t===null?f.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?f.promise:typeof Map<"u"&&t instanceof Map?f.map:typeof Set<"u"&&t instanceof Set?f.set:typeof Date<"u"&&t instanceof Date?f.date:f.object;default:return f.unknown}},c=b.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),lt=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),T=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,l=0;for(;l<i.path.length;){let d=i.path[l];l===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(r(i))):o[d]=o[d]||{_errors:[]},o=o[d],l++}}};return s(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,b.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};T.create=t=>new T(t);var de=(t,e)=>{let r;switch(t.code){case c.invalid_type:t.received===f.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case c.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,b.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:r=`Unrecognized key(s) in object: ${b.joinValues(t.keys,", ")}`;break;case c.invalid_union:r="Invalid input";break;case c.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${b.joinValues(t.options)}`;break;case c.invalid_enum_value:r=`Invalid enum value. Expected ${b.joinValues(t.options)}, received '${t.received}'`;break;case c.invalid_arguments:r="Invalid function arguments";break;case c.invalid_return_type:r="Invalid function return type";break;case c.invalid_date:r="Invalid date";break;case c.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:b.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case c.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case c.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case c.custom:r="Invalid input";break;case c.invalid_intersection_types:r="Intersection results could not be merged";break;case c.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case c.not_finite:r="Number must be finite";break;default:r=e.defaultError,b.assertNever(t)}return{message:r}},qe=de;function ft(t){qe=t}function ke(){return qe}var Te=t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="",l=n.filter(d=>!!d).slice().reverse();for(let d of l)o=d(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},pt=[];function u(t,e){let r=ke(),n=Te({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===de?void 0:de].filter(s=>!!s)});t.common.issues.push(n)}var x=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return m;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let a=await s.key,i=await s.value;n.push({key:a,value:i})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}},m=Object.freeze({status:"aborted"}),ce=t=>({status:"dirty",value:t}),w=t=>({status:"valid",value:t}),$e=t=>t.status==="aborted",Pe=t=>t.status==="dirty",ye=t=>t.status==="valid",ve=t=>typeof Promise<"u"&&t instanceof Promise;function Ce(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function Je(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}var p;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(p||(p={}));var me,ge,N=class{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},We=(t,e)=>{if(ye(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new T(t.common.issues);return this._error=r,this._error}}};function v(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{var l,d;let{message:y}=t;return i.code==="invalid_enum_value"?{message:y??o.defaultError}:typeof o.data>"u"?{message:(l=y??n)!==null&&l!==void 0?l:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(d=y??r)!==null&&d!==void 0?d:o.defaultError}},description:s}}var _=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return D(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:D(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new x,ctx:{common:e.parent.common,data:e.data,parsedType:D(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(ve(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:D(e)},a=this._parseSync({data:e,path:s.path,parent:s});return We(s,a)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:D(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(ve(s)?s:Promise.resolve(s));return We(n,a)}refine(e,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{let i=e(s),o=()=>a.addIssue({code:c.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new C({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return E.create(this,this._def)}nullable(){return I.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M.create(this,this._def)}promise(){return W.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return X.create(this,e,this._def)}transform(e){return new C({...v(this._def),schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ne({...v(this._def),innerType:this,defaultValue:r,typeName:h.ZodDefault})}brand(){return new _e({typeName:h.ZodBranded,type:this,...v(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new se({...v(this._def),innerType:this,catchValue:r,typeName:h.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return ae.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ht=/^c[^\s-]{8,}$/i,mt=/^[0-9a-z]+$/,gt=/^[0-9A-HJKMNP-TV-Z]{26}$/,yt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,vt=/^[a-z0-9_-]{21}$/i,_t=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ie,wt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Tt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ct=new RegExp(`^${Fe}$`);function He(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function St(t){return new RegExp(`^${He(t)}$`)}function Ye(t){let e=`${Fe}T${He(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Et(t,e){return!!((e==="v4"||!e)&&wt.test(t)||(e==="v6"||!e)&&kt.test(t))}var z=class t extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){let a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.string,received:a.parsedType}),m}let n=new x,s;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?u(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&u(s,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")bt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"email",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Ie||(Ie=new RegExp(xt,"u")),Ie.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"emoji",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")yt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"uuid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")vt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"nanoid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")ht.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")mt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid2",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")gt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ulid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),u(s,{validation:"url",code:c.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"regex",code:c.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),u(s,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Ye(a).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:c.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Ct.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:c.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?St(a).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:c.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?_t.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"duration",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Et(e.data,a.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ip",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Tt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64",code:c.invalid_string,message:a.message}),n.dirty()):b.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:c.invalid_string,...p.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...p.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...p.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...p.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...p.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...p.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...p.errToObj(r)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};z.create=t=>{var e;return new z({checks:[],typeName:h.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...v(t)})};function Nt(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=parseInt(t.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return a%i/Math.pow(10,s)}var q=class t extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){let a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.number,received:a.parsedType}),m}let n,s=new x;for(let a of this._def.checks)a.kind==="int"?b.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Nt(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:c.not_finite,message:a.message}),s.dirty()):b.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,p.toString(r))}gt(e,r){return this.setLimit("min",e,!1,p.toString(r))}lte(e,r){return this.setLimit("max",e,!0,p.toString(r))}lt(e,r){return this.setLimit("max",e,!1,p.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:p.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&b.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};q.create=t=>new q({checks:[],typeName:h.ZodNumber,coerce:t?.coerce||!1,...v(t)});var J=class t extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==f.bigint){let a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.bigint,received:a.parsedType}),m}let n,s=new x;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),u(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):b.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,p.toString(r))}gt(e,r){return this.setLimit("min",e,!1,p.toString(r))}lte(e,r){return this.setLimit("max",e,!0,p.toString(r))}lt(e,r){return this.setLimit("max",e,!1,p.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:p.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};J.create=t=>{var e;return new J({checks:[],typeName:h.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...v(t)})};var F=class extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){let n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.boolean,received:n.parsedType}),m}return w(e.data)}};F.create=t=>new F({typeName:h.ZodBoolean,coerce:t?.coerce||!1,...v(t)});var H=class t extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){let a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_type,expected:f.date,received:a.parsedType}),m}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return u(a,{code:c.invalid_date}),m}let n=new x,s;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):b.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};H.create=t=>new H({checks:[],coerce:t?.coerce||!1,typeName:h.ZodDate,...v(t)});var ue=class extends _{_parse(e){if(this._getType(e)!==f.symbol){let n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.symbol,received:n.parsedType}),m}return w(e.data)}};ue.create=t=>new ue({typeName:h.ZodSymbol,...v(t)});var Y=class extends _{_parse(e){if(this._getType(e)!==f.undefined){let n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.undefined,received:n.parsedType}),m}return w(e.data)}};Y.create=t=>new Y({typeName:h.ZodUndefined,...v(t)});var G=class extends _{_parse(e){if(this._getType(e)!==f.null){let n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.null,received:n.parsedType}),m}return w(e.data)}};G.create=t=>new G({typeName:h.ZodNull,...v(t)});var U=class extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}};U.create=t=>new U({typeName:h.ZodAny,...v(t)});var Z=class extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}};Z.create=t=>new Z({typeName:h.ZodUnknown,...v(t)});var A=class extends _{_parse(e){let r=this._getOrReturnCtx(e);return u(r,{code:c.invalid_type,expected:f.never,received:r.parsedType}),m}};A.create=t=>new A({typeName:h.ZodNever,...v(t)});var le=class extends _{_parse(e){if(this._getType(e)!==f.undefined){let n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.void,received:n.parsedType}),m}return w(e.data)}};le.create=t=>new le({typeName:h.ZodVoid,...v(t)});var M=class t extends _{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==f.array)return u(r,{code:c.invalid_type,expected:f.array,received:r.parsedType}),m;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(i||o)&&(u(r,{code:i?c.too_big:c.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(u(r,{code:c.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(u(r,{code:c.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new N(r,i,r.path,o)))).then(i=>x.mergeArray(n,i));let a=[...r.data].map((i,o)=>s.type._parseSync(new N(r,i,r.path,o)));return x.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:p.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:p.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:p.toString(r)}})}nonempty(e){return this.min(1,e)}};M.create=(t,e)=>new M({type:t,minLength:null,maxLength:null,exactLength:null,typeName:h.ZodArray,...v(e)});function oe(t){if(t instanceof k){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=E.create(oe(n))}return new k({...t._def,shape:()=>e})}else return t instanceof M?new M({...t._def,type:oe(t.element)}):t instanceof E?E.create(oe(t.unwrap())):t instanceof I?I.create(oe(t.unwrap())):t instanceof O?O.create(t.items.map(e=>oe(e))):t}var k=class t extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=b.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==f.object){let d=this._getOrReturnCtx(e);return u(d,{code:c.invalid_type,expected:f.object,received:d.parsedType}),m}let{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof A&&this._def.unknownKeys==="strip"))for(let d in s.data)i.includes(d)||o.push(d);let l=[];for(let d of i){let y=a[d],S=s.data[d];l.push({key:{status:"valid",value:d},value:y._parse(new N(s,S,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof A){let d=this._def.unknownKeys;if(d==="passthrough")for(let y of o)l.push({key:{status:"valid",value:y},value:{status:"valid",value:s.data[y]}});else if(d==="strict")o.length>0&&(u(s,{code:c.unrecognized_keys,keys:o}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let y of o){let S=s.data[y];l.push({key:{status:"valid",value:y},value:d._parse(new N(s,S,s.path,y)),alwaysSet:y in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let d=[];for(let y of l){let S=await y.key,Ue=await y.value;d.push({key:S,value:Ue,alwaysSet:y.alwaysSet})}return d}).then(d=>x.mergeObjectSync(n,d)):x.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,a,i,o;let l=(i=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=p.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:h.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return b.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return b.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return oe(this)}partial(e){let r={};return b.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return b.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof E;)a=a._def.innerType;r[n]=a}}),new t({...this._def,shape:()=>r})}keyof(){return Ge(b.objectKeys(this.shape))}};k.create=(t,e)=>new k({shape:()=>t,unknownKeys:"strip",catchall:A.create(),typeName:h.ZodObject,...v(e)});k.strictCreate=(t,e)=>new k({shape:()=>t,unknownKeys:"strict",catchall:A.create(),typeName:h.ZodObject,...v(e)});k.lazycreate=(t,e)=>new k({shape:t,unknownKeys:"strip",catchall:A.create(),typeName:h.ZodObject,...v(e)});var K=class extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new T(o.ctx.common.issues));return u(r,{code:c.invalid_union,unionErrors:i}),m}if(r.common.async)return Promise.all(n.map(async a=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a,i=[];for(let l of n){let d={...r,common:{...r.common,issues:[]},parent:null},y=l._parseSync({data:r.data,path:r.path,parent:d});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(l=>new T(l));return u(r,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}};K.create=(t,e)=>new K({options:t,typeName:h.ZodUnion,...v(e)});var P=t=>t instanceof Q?P(t.schema):t instanceof C?P(t.innerType()):t instanceof ee?[t.value]:t instanceof te?t.options:t instanceof re?b.objectValues(t.enum):t instanceof ne?P(t._def.innerType):t instanceof Y?[void 0]:t instanceof G?[null]:t instanceof E?[void 0,...P(t.unwrap())]:t instanceof I?[null,...P(t.unwrap())]:t instanceof _e||t instanceof ae?P(t.unwrap()):t instanceof se?P(t._def.innerType):[],Se=class t extends _{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.object)return u(r,{code:c.invalid_type,expected:f.object,received:r.parsedType}),m;let n=this.discriminator,s=r.data[n],a=this.optionsMap.get(s);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(u(r,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let a of r){let i=P(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new t({typeName:h.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...v(n)})}};function Ze(t,e){let r=D(t),n=D(e);if(t===e)return{valid:!0,data:t};if(r===f.object&&n===f.object){let s=b.objectKeys(e),a=b.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(let o of a){let l=Ze(t[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(r===f.array&&n===f.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let a=0;a<t.length;a++){let i=t[a],o=e[a],l=Ze(i,o);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===f.date&&n===f.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var X=class extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if($e(a)||$e(i))return m;let o=Ze(a.value,i.value);return o.valid?((Pe(a)||Pe(i))&&r.dirty(),{status:r.value,value:o.data}):(u(n,{code:c.invalid_intersection_types}),m)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};X.create=(t,e,r)=>new X({left:t,right:e,typeName:h.ZodIntersection,...v(r)});var O=class t extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return u(n,{code:c.invalid_type,expected:f.array,received:n.parsedType}),m;if(n.data.length<this._def.items.length)return u(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&n.data.length>this._def.items.length&&(u(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((i,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new N(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>x.mergeArray(r,i)):x.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};O.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new O({items:t,typeName:h.ZodTuple,rest:null,...v(e)})};var Ee=class t extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return u(n,{code:c.invalid_type,expected:f.object,received:n.parsedType}),m;let s=[],a=this._def.keyType,i=this._def.valueType;for(let o in n.data)s.push({key:a._parse(new N(n,o,n.path,o)),value:i._parse(new N(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?x.mergeObjectAsync(r,s):x.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof _?new t({keyType:e,valueType:r,typeName:h.ZodRecord,...v(n)}):new t({keyType:z.create(),valueType:e,typeName:h.ZodRecord,...v(r)})}},fe=class extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return u(n,{code:c.invalid_type,expected:f.map,received:n.parsedType}),m;let s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,l],d)=>({key:s._parse(new N(n,o,n.path,[d,"key"])),value:a._parse(new N(n,l,n.path,[d,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of i){let d=await l.key,y=await l.value;if(d.status==="aborted"||y.status==="aborted")return m;(d.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(d.value,y.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let l of i){let d=l.key,y=l.value;if(d.status==="aborted"||y.status==="aborted")return m;(d.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(d.value,y.value)}return{status:r.value,value:o}}}};fe.create=(t,e,r)=>new fe({valueType:e,keyType:t,typeName:h.ZodMap,...v(r)});var pe=class t extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return u(n,{code:c.invalid_type,expected:f.set,received:n.parsedType}),m;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(u(n,{code:c.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(u(n,{code:c.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let a=this._def.valueType;function i(l){let d=new Set;for(let y of l){if(y.status==="aborted")return m;y.status==="dirty"&&r.dirty(),d.add(y.value)}return{status:r.value,value:d}}let o=[...n.data.values()].map((l,d)=>a._parse(new N(n,l,n.path,d)));return n.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:p.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:p.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};pe.create=(t,e)=>new pe({valueType:t,minSize:null,maxSize:null,typeName:h.ZodSet,...v(e)});var Ne=class t extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.function)return u(r,{code:c.invalid_type,expected:f.function,received:r.parsedType}),m;function n(o,l){return Te({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ke(),de].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:l}})}function s(o,l){return Te({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ke(),de].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:l}})}let a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof W){let o=this;return w(async function(...l){let d=new T([]),y=await o._def.args.parseAsync(l,a).catch(je=>{throw d.addIssue(n(l,je)),d}),S=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(S,a).catch(je=>{throw d.addIssue(s(S,je)),d})})}else{let o=this;return w(function(...l){let d=o._def.args.safeParse(l,a);if(!d.success)throw new T([n(l,d.error)]);let y=Reflect.apply(i,this,d.data),S=o._def.returns.safeParse(y,a);if(!S.success)throw new T([s(y,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:O.create(e).rest(Z.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||O.create([]).rest(Z.create()),returns:r||Z.create(),typeName:h.ZodFunction,...v(n)})}},Q=class extends _{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Q.create=(t,e)=>new Q({getter:t,typeName:h.ZodLazy,...v(e)});var ee=class extends _{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return u(r,{received:r.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}};ee.create=(t,e)=>new ee({value:t,typeName:h.ZodLiteral,...v(e)});function Ge(t,e){return new te({values:t,typeName:h.ZodEnum,...v(e)})}var te=class t extends _{constructor(){super(...arguments),me.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return u(r,{expected:b.joinValues(n),received:r.parsedType,code:c.invalid_type}),m}if(Ce(this,me,"f")||Je(this,me,new Set(this._def.values),"f"),!Ce(this,me,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return u(r,{received:r.data,code:c.invalid_enum_value,options:n}),m}return w(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};me=new WeakMap;te.create=Ge;var re=class extends _{constructor(){super(...arguments),ge.set(this,void 0)}_parse(e){let r=b.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){let s=b.objectValues(r);return u(n,{expected:b.joinValues(s),received:n.parsedType,code:c.invalid_type}),m}if(Ce(this,ge,"f")||Je(this,ge,new Set(b.getValidEnumValues(this._def.values)),"f"),!Ce(this,ge,"f").has(e.data)){let s=b.objectValues(r);return u(n,{received:n.data,code:c.invalid_enum_value,options:s}),m}return w(e.data)}get enum(){return this._def.values}};ge=new WeakMap;re.create=(t,e)=>new re({values:t,typeName:h.ZodNativeEnum,...v(e)});var W=class extends _{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.promise&&r.common.async===!1)return u(r,{code:c.invalid_type,expected:f.promise,received:r.parsedType}),m;let n=r.parsedType===f.promise?r.data:Promise.resolve(r.data);return w(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};W.create=(t,e)=>new W({type:t,typeName:h.ZodPromise,...v(e)});var C=class extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===h.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{u(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){let i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return m;let l=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return l.status==="aborted"?m:l.status==="dirty"||r.value==="dirty"?ce(l.value):l});{if(r.value==="aborted")return m;let o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?m:o.status==="dirty"||r.value==="dirty"?ce(o.value):o}}if(s.type==="refinement"){let i=o=>{let l=s.refinement(o,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?m:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ye(i))return i;let o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>ye(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):i);b.assertNever(s)}};C.create=(t,e,r)=>new C({schema:t,typeName:h.ZodEffects,effect:e,...v(r)});C.createWithPreprocess=(t,e,r)=>new C({schema:e,effect:{type:"preprocess",transform:t},typeName:h.ZodEffects,...v(r)});var E=class extends _{_parse(e){return this._getType(e)===f.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};E.create=(t,e)=>new E({innerType:t,typeName:h.ZodOptional,...v(e)});var I=class extends _{_parse(e){return this._getType(e)===f.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};I.create=(t,e)=>new I({innerType:t,typeName:h.ZodNullable,...v(e)});var ne=class extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ne.create=(t,e)=>new ne({innerType:t,typeName:h.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});var se=class extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ve(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new T(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};se.create=(t,e)=>new se({innerType:t,typeName:h.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});var he=class extends _{_parse(e){if(this._getType(e)!==f.nan){let n=this._getOrReturnCtx(e);return u(n,{code:c.invalid_type,expected:f.nan,received:n.parsedType}),m}return{status:"valid",value:e.data}}};he.create=t=>new he({typeName:h.ZodNaN,...v(t)});var At=Symbol("zod_brand"),_e=class extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},be=class t extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?m:a.status==="dirty"?(r.dirty(),ce(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?m:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:h.ZodPipeline})}},ae=class extends _{_parse(e){let r=this._def.innerType._parse(e),n=s=>(ye(s)&&(s.value=Object.freeze(s.value)),s);return ve(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};ae.create=(t,e)=>new ae({innerType:t,typeName:h.ZodReadonly,...v(e)});function Ke(t,e={},r){return t?U.create().superRefine((n,s)=>{var a,i;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(i=(a=o.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,d=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...d,fatal:l})}}):U.create()}var jt={object:k.lazycreate},h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Ot=(t,e={message:`Input not instance of ${t.name}`})=>Ke(r=>r instanceof t,e),Xe=z.create,Qe=q.create,It=he.create,Rt=J.create,et=F.create,$t=H.create,Pt=ue.create,Zt=Y.create,Mt=G.create,Lt=U.create,Vt=Z.create,Dt=A.create,zt=le.create,Ut=M.create,Wt=k.create,Bt=k.strictCreate,qt=K.create,Jt=Se.create,Ft=X.create,Ht=O.create,Yt=Ee.create,Gt=fe.create,Kt=pe.create,Xt=Ne.create,Qt=Q.create,er=ee.create,tr=te.create,rr=re.create,nr=W.create,Be=C.create,sr=E.create,ar=I.create,ir=C.createWithPreprocess,or=be.create,cr=()=>Xe().optional(),dr=()=>Qe().optional(),ur=()=>et().optional(),lr={string:t=>z.create({...t,coerce:!0}),number:t=>q.create({...t,coerce:!0}),boolean:t=>F.create({...t,coerce:!0}),bigint:t=>J.create({...t,coerce:!0}),date:t=>H.create({...t,coerce:!0})},fr=m,g=Object.freeze({__proto__:null,defaultErrorMap:de,setErrorMap:ft,getErrorMap:ke,makeIssue:Te,EMPTY_PATH:pt,addIssueToContext:u,ParseStatus:x,INVALID:m,DIRTY:ce,OK:w,isAborted:$e,isDirty:Pe,isValid:ye,isAsync:ve,get util(){return b},get objectUtil(){return Re},ZodParsedType:f,getParsedType:D,ZodType:_,datetimeRegex:Ye,ZodString:z,ZodNumber:q,ZodBigInt:J,ZodBoolean:F,ZodDate:H,ZodSymbol:ue,ZodUndefined:Y,ZodNull:G,ZodAny:U,ZodUnknown:Z,ZodNever:A,ZodVoid:le,ZodArray:M,ZodObject:k,ZodUnion:K,ZodDiscriminatedUnion:Se,ZodIntersection:X,ZodTuple:O,ZodRecord:Ee,ZodMap:fe,ZodSet:pe,ZodFunction:Ne,ZodLazy:Q,ZodLiteral:ee,ZodEnum:te,ZodNativeEnum:re,ZodPromise:W,ZodEffects:C,ZodTransformer:C,ZodOptional:E,ZodNullable:I,ZodDefault:ne,ZodCatch:se,ZodNaN:he,BRAND:At,ZodBranded:_e,ZodPipeline:be,ZodReadonly:ae,custom:Ke,Schema:_,ZodSchema:_,late:jt,get ZodFirstPartyTypeKind(){return h},coerce:lr,any:Lt,array:Ut,bigint:Rt,boolean:et,date:$t,discriminatedUnion:Jt,effect:Be,enum:tr,function:Xt,instanceof:Ot,intersection:Ft,lazy:Qt,literal:er,map:Gt,nan:It,nativeEnum:rr,never:Dt,null:Mt,nullable:ar,number:Qe,object:Wt,oboolean:ur,onumber:dr,optional:sr,ostring:cr,pipeline:or,preprocess:ir,promise:nr,record:Yt,set:Kt,strictObject:Bt,string:Xe,symbol:Pt,transformer:Be,tuple:Ht,undefined:Zt,union:qt,unknown:Vt,void:zt,NEVER:fr,ZodIssueCode:c,quotelessJson:lt,ZodError:T});var pr=g.object({}),hr=g.object({alias:g.object({}).passthrough().default({}).describe("Equivalent to `vite.resolve.alias`.\n\nhttps://vitejs.dev/config/shared-options.html#resolve-alias"),plugins:g.any().array().default([]).describe("Equivalent to `vite.plugins`.\n\nhttps://vitejs.dev/config/shared-options.html#plugins")}),mr=g.object({server:g.number().default(3e3).describe("The port that the dev server should use."),gateway:g.number().default(3001).describe("The port that the api gateway should use.")}),gr=g.object({apps:g.string().array().default([]).describe(`Additional apps to include.
|
|
4
|
-
|
|
5
|
-
Note: additional apps need to be added as devDependencies.`),ports:mr.default({}).describe("Options for ports."),open:g.boolean().default(!1).describe("Whether the dev server should automatically open in your browser or not."),logging:g.boolean().default(!1).describe("Whether the dev server and browser console should output more log information or not.")}),yr=g.object({mode:g.string().default("production").describe("Which mode to use when building the app. [production | development]"),watch:g.boolean().default(!1).describe("Whether the build should start watching and rebuild when files change or not.")}),vr=g.object({app:g.string().default("./src/app.ts").describe("The entry file for the app."),manifest:g.string().default("./src/manifest.json").describe("The entry file for the app manifest.")}),xe=g.object({vite:hr.default({}).describe("Options related to Vite."),server:gr.default({}).describe("Options related to the dev server."),entries:vr.default({}).describe("Options related to the app entry points."),build:yr.default({}).describe("Options related to app build."),experimental:pr.default({}).describe("Experimental options.")}),_r=g.enum(["build","serve"]),br=g.object({command:_r,mode:g.string()}),xr=g.function().args(br).returns(xe.or(g.promise(xe))),Yr=g.function().args(g.union([xe,xr]));var wr=g.enum(["necessary","functional","analytics","marketing"]),kr=g.object({purpose:g.string().describe("Purpose of the storing the value."),category:wr.describe("Category of the storage value - necessary, functional, analytics or marketing."),lifespan:g.string().describe("Basic description of how long the value will be stored.")}),Tr=g.record(kr.describe("Key used when writing to the storage.")),Cr=g.object({value:g.string().describe("The localization token default value."),description:g.string().describe("The localization token description.")}),Sr=g.object({localization:g.record(Cr.describe("Key used when getting the localized text.")).default({}).describe("Translateable texts used in the app")}),Er=g.object({common:g.object({order:g.number().optional().describe("Order of the capability in the common capabilities list."),variant:g.enum(["primary","secondary","expressive","destructive","text","primary-white","secondary-white","expressive-white","tertiary-purple"]).default("secondary").describe("Variant of the capability button.")}).optional().describe("Common capability configuration."),label:g.string().optional().describe("Label for the capability.")}),Nr=g.object({name:g.string().describe("URL friendly name of the app."),endpoints:g.string().array().default([]).describe("Endpoints that should be communicated with using the API gateway."),permissions:g.string().array().default([]).describe("Permissions that can be added to user roles."),resources:Sr.default({}).describe("Resources used by the app."),storage:Tr.default({}).describe("Cookies, session storage, and local storage values that are used by the app."),capabilities:g.record(Er.describe("Capability key.")).default({}).describe("Capabilities that the app has.")}).passthrough();function tt(t,e){let r=Nr.safeParse(t);return r.success?r.data:rt(r.error.format(),e?[e]:[]).join(`
|
|
6
|
-
`)}function rt(t,e=[],r=""){t._errors?.length&&e.push(`${r} - ${t._errors.join(" + ")}`);for(let[n,s]of Object.entries(t))n==="_errors"||!s||typeof s!="object"||Array.isArray(s)||rt(s,e,r?`${r}.${n}`:n);return e}function Me(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Le(t,e,r=".",n){if(!Me(e))return Le(t,{},r,n);let s=Object.assign({},e);for(let a in t){if(a==="__proto__"||a==="constructor")continue;let i=t[a];i!=null&&(n&&n(s,a,i,r)||(Array.isArray(i)&&Array.isArray(s[a])?s[a]=[...i,...s[a]]:Me(i)&&Me(s[a])?s[a]=Le(i,s[a],(r?`${r}.`:"")+a.toString(),n):s[a]=i))}return s}function Ve(t){return(...e)=>e.reduce((r,n)=>Le(r,n,"",t),{})}var nt=Ve(),Qr=Ve((t,e,r)=>{if(t[e]!==void 0&&typeof r=="function")return t[e]=r(t[e]),!0}),en=Ve((t,e,r)=>{if(Array.isArray(t[e])&&typeof r=="function")return t[e]=r(t[e]),!0});var Ar=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,jr=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Or=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Ir(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Rr(t);return}return e}function Rr(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function De(t,e={}){if(typeof t!="string")return t;let r=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return r.slice(1,-1);if(r.length<=9){let n=r.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!Or.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(Ar.test(t)||jr.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,Ir)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}import{createServer as $r}from"node:net";import{networkInterfaces as Pr}from"node:os";var Zr=new Set([1,7,9,11,13,15,17,19,20,21,22,23,25,37,42,43,53,69,77,79,87,95,101,102,103,104,109,110,111,113,115,117,119,123,135,137,139,143,161,179,389,427,465,512,513,514,515,526,530,531,532,540,548,554,556,563,587,601,636,989,990,993,995,1719,1720,1723,2049,3659,4045,5060,5061,6e3,6566,6665,6666,6667,6668,6669,6697,10080]);function Mr(t){return Zr.has(t)}function Lr(t){return!Mr(t)}function Vr(t,e){t&&console.log(`[get-port] ${e}`)}function st(t,e){return new Promise(r=>{let n=$r();n.unref(),n.on("error",()=>{r(!1)}),n.listen({port:t,host:e},()=>{let{port:s}=n.address();n.close(()=>{r(Lr(s)&&s)})})})}function Dr(t){let e=new Set(t);for(let r of Object.values(Pr()))for(let n of r||[])n.address&&!n.internal&&!n.address.startsWith("fe80::")&&e.add(n.address);return[...e]}function zr(t){return t?`on host ${JSON.stringify(t)}`:"on any host"}async function ze(t,e=process.env.HOST,r){if(e||(e=Dr([void 0,"0.0.0.0"])),!Array.isArray(e))return st(t,e);for(let n of e){let s=await st(t,n);if(s===!1)return t<1024&&r&&Vr(r,`Unable to listen to the privileged port ${t} ${zr(n)}`),!1;t===0&&s!==0&&(t=s)}return t}import{loadConfigFromFile as Ur}from"vite";var j=R("yellow"),B=R("green"),at=R("red"),it=R("cyan"),we=R("bold"),ot=R("underline"),yn=R("italic"),vn=R("magentaBright"),ut={"arg.build.watch":"Whether the build should start watching and rebuild when files change or not.","arg.config":"The path to the app configuration file.","arg.debug":"Whether to output debug information or not.","arg.entries.app":"The entry file for the app.","arg.entries.manifest":"The entry file for the app manifest.","arg.jwt.app":"Token app name.","arg.jwt.expiration":"Token expiration time compatible with https://npmjs.com/package/ms.","arg.jwt.user.email":"Token user email.","arg.jwt.user.firstName":"Token user first name.","arg.jwt.user.lastName":"Token user last name.","arg.jwt.user.permission":"Token user permission(s).","arg.jwt.user.sub":"Token user sub.","arg.jwt.workspace":"Token workspace name.","arg.jwt.organization":"Token organization name.","arg.mode":"Which mode to use when building the app.","arg.public-key.clean":"Whether to exclude the -----BEGIN PUBLIC KEY----- prefix and -----END PUBLIC KEY----- suffix or not.","arg.public-key.type":"Type of public key.","arg.serve.logging":"Whether the server and browser console should output more log information or not.","arg.serve.open":"Whether the server should automatically open in your browser or not.","arg.serve.ports.gateway":"The port that the gateway should use.","arg.serve.ports.server":"The port that the server should use.","arg.upgrade.next":"Whether or not the CLI should include the 'next' tag when upgrading @telia-ace packages.","changes.upgraded":`Upgraded ${j("'{{pkg}}'")} to ${B("'{{v}}'")}`,"command.build":"Builds an Alliance app.","command.jwt":"Creates an Alliance JWT.","command.public-key":"Creates a public key used to verify an Alliance JWT.","command.serve":"Starts the Alliance development server.","command.upgrade":"Upgrades Alliance app(s).","errors.invalid-manifest":"Invalid app manifest","errors.no-entry":"Could not find any app and/or manifest entry file at '{{app}}' or '{{manifest}}'","errors.npm-error":"Could not get upgrade information from NPM.","errors.port-busy":"Port {{busy}} is busy","info.gateway-url":`${we("Gateway:")} ${ot(it("{{url}}"))}`,"info.header.changes":"Changes","info.header.recommendations":"Recommendations","info.header.warnings":"Warnings","info.next-steps":"Next steps:","info.server-url":`${we("Server:")} ${ot(it("{{url}}"))}`,"info.steps.install":`Run ${j("'{{cmd}}'")} to install the changed package versions`,"info.steps.warnings":`Address the ${at("warnings")} and ${j("recommendations")} detailed above`,"info.stop-server":we("Press CTRL + C to stop the server."),"info.upgraded":`Upgraded ${j("'{{pkg}}'")} to ${B("'{{v}}'")}`,"recommendations.update.webprovisions-registry-app":`Remove ${j("'{{pkg}}'")} and install ${B("'{{wpPkg}}'")} (preferably as a dev dependency)`,"recommendations.update.webprovisions-registry-config":`Add ${j("'@webprovisions-registry:registry=https://registry.webprovisions.io'")} to the ${B("'.npmrc'")} file to always use the Webprovisions registry for Webprovisions packages`,"recommendations.add.webprovisions-registry-config":`Create a ${B("'.npmrc'")} file containing ${j("'@webprovisions-registry:registry=https://registry.webprovisions.io'")} to always use the Webprovisions registry for Webprovisions packages`,"recommendations.upgrade":`Upgrade ${j("'{{pkg}}'")} to ${B("'{{v}}'")}`,"warnings.set":`Set ${j("'{{property}}'")} to ${B("'{{new}}'")}`,"warnings.change":`Change ${j("'{{property}}'")} from ${at("'{{current}}'")} to ${B("'{{new}}'")}`,"warnings.remove":`Remove ${j("'{{property}}'")}{{alt}}`},_n=Object.keys(ut);function ie(t,e={}){return Object.entries(e).reduce((r,[n,s])=>r.replaceAll(`{{${n}}}`,String(s)),ut[t]).trim()}var bn={type:"string",description:ie("arg.config"),required:!1,alias:"c",valueHint:"./alliance.config.ts"},xn={type:"boolean",description:ie("arg.debug"),required:!1,default:!1,alias:"d"};function wn({debug:t,input:e,output:r}){t&&($.log(we(Oe("cyan","Input:"))),console.log(JSON.stringify(e,null,2),`
|
|
7
|
-
`),$.log(we(Oe("cyan","Output:")))),console.log(r,`
|
|
8
|
-
`)}var ct=["./src/app.ts","./src/app.js","./src/app.mts","./src/app.mjs","./src/app.cts","./src/app.cjs"],Wr=["alliance.config.js","alliance.config.mjs","alliance.config.ts","alliance.config.cjs","alliance.config.mts","alliance.config.cts","alliance.config.json"];async function Br(t,e){let r;if(e?r=V(process.cwd(),e):r=Jr(),r&&L(r)){if(r.endsWith(".json"))return De(dt(r).toString());try{return(await Ur(t,r))?.config||{}}catch(n){$.error(n.message),process.exit(1)}}return{}}function qr(t){let e=V(process.cwd(),t.app);if(t.manifest=V(process.cwd(),t.manifest),!ct.includes(t.app))return t.app=e,t;for(let r of ct){let n=V(process.cwd(),r);if(L(n)){t.app=n;break}}return t}function Jr(){let t=Wr.reduce((e,r)=>{if(e.length)return e;let n=V(process.cwd(),r);return L(n)?n:e},"");if(L(t))return t}async function kn(t,e="",r={}){let n=nt(r,await Br(t,e));!n.build?.mode&&(n.build?.watch||t.command==="serve")&&(n.build={...n.build,mode:"development"});let s=xe.parse(n);return t.command==="serve"&&(await ze(s.server.ports.server)||($.error(ie("errors.port-busy",{busy:s.server.ports.server})),process.exit(1)),await ze(s.server.ports.gateway)||($.error(ie("errors.port-busy",{busy:s.server.ports.gateway})),process.exit(1))),{...s,entries:qr(s.entries)}}function Tn(t,e){let r={};if(L(e.entries.manifest)){let n=De(dt(e.entries.manifest).toString()),s=tt(n,ie("errors.invalid-manifest"));typeof s=="string"&&($.error(s),process.exit(1)),r.ALLIANCE_APP_MANIFEST=s,r.ALLIANCE_APP_NAME=JSON.stringify(s.name)}return t==="build"&&(!L(e.entries.manifest)||!L(e.entries.app))&&($.error(ie("errors.no-entry",{app:Ae(process.cwd(),V(e.entries.app)),manifest:Ae(process.cwd(),V(e.entries.manifest))})),process.exit(1)),t==="serve"&&(r.ALLIANCE_ENVIRONMENT={logging:e.server.logging}),r}function Cn({entries:t,server:e}){let r=[];L(t.app)&&L(t.manifest)&&r.push({packageName:"entry",appImportPath:t.app,manifestImportPath:t.manifest});for(let n of e.apps)r.push({packageName:n,appImportPath:`${n}/app`,manifestImportPath:`${n}/manifest`});return r.length||($.error(ie("errors.no-entry",{app:Ae(process.cwd(),V(t.app)),manifest:Ae(process.cwd(),V(t.manifest))})),process.exit(1)),r}export{De as a,j as b,B as c,at as d,it as e,we as f,ot as g,_n as h,ie as i,bn as j,xn as k,wn as l,kn as m,Tn as n,Cn as o};
|
package/dist/prompt-XHIHFZ5S.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createRequire as c__createRequire } from 'node:module';
|
|
2
|
-
const require = c__createRequire(import.meta.url);
|
|
3
|
-
import{g as i,j as K,k as P}from"./chunk-2GL2UYTF.js";import{stdin as FD,stdout as rD}from"node:process";import z from"node:readline";import{WriteStream as iD}from"node:tty";import sD from"tty";var _="\x1B",a=`${_}[`,CD="\x07",k={to(t,u){return u?`${a}${u+1};${t+1}H`:`${a}${t+1}G`},move(t,u){let e="";return t<0?e+=`${a}${-t}D`:t>0&&(e+=`${a}${t}C`),u<0?e+=`${a}${-u}A`:u>0&&(e+=`${a}${u}B`),e},up:(t=1)=>`${a}${t}A`,down:(t=1)=>`${a}${t}B`,forward:(t=1)=>`${a}${t}C`,backward:(t=1)=>`${a}${t}D`,nextLine:(t=1)=>`${a}E`.repeat(t),prevLine:(t=1)=>`${a}F`.repeat(t),left:`${a}G`,hide:`${a}?25l`,show:`${a}?25h`,save:`${_}7`,restore:`${_}8`},nD={up:(t=1)=>`${a}S`.repeat(t),down:(t=1)=>`${a}T`.repeat(t)},ED={screen:`${a}2J`,up:(t=1)=>`${a}1J`.repeat(t),down:(t=1)=>`${a}J`.repeat(t),line:`${a}2K`,lineEnd:`${a}K`,lineStart:`${a}1K`,lines(t){let u="";for(let e=0;e<t;e++)u+=this.line+(e<t-1?k.up():"");return t&&(u+=k.left),u}},A={cursor:k,scroll:nD,erase:ED,beep:CD},I={exports:{}},oD=sD,aD=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||oD.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),E=(t,u,e=t)=>F=>{let r=""+F,s=r.indexOf(u,t.length);return~s?t+Q(r,u,e,s)+u:t+r+u},Q=(t,u,e,F)=>{let r=t.substring(0,F)+e,s=t.substring(F+u.length),D=s.indexOf(u);return~D?r+Q(s,u,e,D):r+s},DD=(t=aD)=>({isColorSupported:t,reset:t?u=>`\x1B[0m${u}\x1B[0m`:String,bold:t?E("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:t?E("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:t?E("\x1B[3m","\x1B[23m"):String,underline:t?E("\x1B[4m","\x1B[24m"):String,inverse:t?E("\x1B[7m","\x1B[27m"):String,hidden:t?E("\x1B[8m","\x1B[28m"):String,strikethrough:t?E("\x1B[9m","\x1B[29m"):String,black:t?E("\x1B[30m","\x1B[39m"):String,red:t?E("\x1B[31m","\x1B[39m"):String,green:t?E("\x1B[32m","\x1B[39m"):String,yellow:t?E("\x1B[33m","\x1B[39m"):String,blue:t?E("\x1B[34m","\x1B[39m"):String,magenta:t?E("\x1B[35m","\x1B[39m"):String,cyan:t?E("\x1B[36m","\x1B[39m"):String,white:t?E("\x1B[37m","\x1B[39m"):String,gray:t?E("\x1B[90m","\x1B[39m"):String,bgBlack:t?E("\x1B[40m","\x1B[49m"):String,bgRed:t?E("\x1B[41m","\x1B[49m"):String,bgGreen:t?E("\x1B[42m","\x1B[49m"):String,bgYellow:t?E("\x1B[43m","\x1B[49m"):String,bgBlue:t?E("\x1B[44m","\x1B[49m"):String,bgMagenta:t?E("\x1B[45m","\x1B[49m"):String,bgCyan:t?E("\x1B[46m","\x1B[49m"):String,bgWhite:t?E("\x1B[47m","\x1B[49m"):String});I.exports=DD();I.exports.createColors=DD;var cD=I.exports,w=K(cD);function lD({onlyFirst:t=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,t?void 0:"g")}function uD(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(lD(),"")}var T={},hD={get exports(){return T},set exports(t){T=t}};(function(t){var u={};t.exports=u,u.eastAsianWidth=function(F){var r=F.charCodeAt(0),s=F.length==2?F.charCodeAt(1):0,D=r;return 55296<=r&&r<=56319&&56320<=s&&s<=57343&&(r&=1023,s&=1023,D=r<<10|s,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(F){var r=this.eastAsianWidth(F);return r=="F"||r=="W"||r=="A"?2:1};function e(F){return F.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(F){for(var r=e(F),s=0,D=0;D<r.length;D++)s=s+this.characterLength(r[D]);return s},u.slice=function(F,r,s){textLen=u.length(F),r=r||0,s=s||1,r<0&&(r=textLen+r),s<0&&(s=textLen+s);for(var D="",C=0,h=e(F),c=0;c<h.length;c++){var B=h[c],l=u.length(B);if(C>=r-(l==2?1:0))if(C+l<=s)D+=B;else break;C+=l}return D}})(hD);var BD=T,AD=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function $(t,u={}){if(typeof t!="string"||t.length===0||(u={ambiguousIsNarrow:!0,...u},t=uD(t),t.length===0))return 0;t=t.replace(AD()," ");let e=u.ambiguousIsNarrow?1:2,F=0;for(let r of t){let s=r.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(BD.eastAsianWidth(r)){case"F":case"W":F+=2;break;case"A":F+=e;break;default:F+=1}}return F}var y=10,q=(t=0)=>u=>`\x1B[${u+t}m`,G=(t=0)=>u=>`\x1B[${38+t};5;${u}m`,H=(t=0)=>(u,e,F)=>`\x1B[${38+t};2;${u};${e};${F}m`,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(o.modifier);var mD=Object.keys(o.color),gD=Object.keys(o.bgColor);[...mD,...gD];function pD(){let t=new Map;for(let[u,e]of Object.entries(o)){for(let[F,r]of Object.entries(e))o[F]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[F]=o[F],t.set(r[0],r[1]);Object.defineProperty(o,u,{value:e,enumerable:!1})}return Object.defineProperty(o,"codes",{value:t,enumerable:!1}),o.color.close="\x1B[39m",o.bgColor.close="\x1B[49m",o.color.ansi=q(),o.color.ansi256=G(),o.color.ansi16m=H(),o.bgColor.ansi=q(y),o.bgColor.ansi256=G(y),o.bgColor.ansi16m=H(y),Object.defineProperties(o,{rgbToAnsi256:{value:(u,e,F)=>u===e&&e===F?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(e/255*5)+Math.round(F/255*5),enumerable:!1},hexToRgb:{value:u=>{let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!e)return[0,0,0];let[F]=e;F.length===3&&(F=[...F].map(s=>s+s).join(""));let r=Number.parseInt(F,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>o.rgbToAnsi256(...o.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let e,F,r;if(u>=232)e=((u-232)*10+8)/255,F=e,r=e;else{u-=16;let C=u%36;e=Math.floor(u/36)/5,F=Math.floor(C/6)/5,r=C%6/5}let s=Math.max(e,F,r)*2;if(s===0)return 30;let D=30+(Math.round(r)<<2|Math.round(F)<<1|Math.round(e));return s===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,e,F)=>o.ansi256ToAnsi(o.rgbToAnsi256(u,e,F)),enumerable:!1},hexToAnsi:{value:u=>o.ansi256ToAnsi(o.hexToAnsi256(u)),enumerable:!1}}),o}var dD=pD(),f=new Set(["\x1B","\x9B"]),$D=39,L="\x07",tD="[",bD="]",eD="m",N=`${bD}8;;`,Y=t=>`${f.values().next().value}${tD}${t}${eD}`,Z=t=>`${f.values().next().value}${N}${t}${L}`,vD=t=>t.split(" ").map(u=>$(u)),S=(t,u,e)=>{let F=[...u],r=!1,s=!1,D=$(uD(t[t.length-1]));for(let[C,h]of F.entries()){let c=$(h);if(D+c<=e?t[t.length-1]+=h:(t.push(h),D=0),f.has(h)&&(r=!0,s=F.slice(C+1).join("").startsWith(N)),r){s?h===L&&(r=!1,s=!1):h===eD&&(r=!1);continue}D+=c,D===e&&C<F.length-1&&(t.push(""),D=0)}!D&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},fD=t=>{let u=t.split(" "),e=u.length;for(;e>0&&!($(u[e-1])>0);)e--;return e===u.length?t:u.slice(0,e).join(" ")+u.slice(e).join("")},xD=(t,u,e={})=>{if(e.trim!==!1&&t.trim()==="")return"";let F="",r,s,D=vD(t),C=[""];for(let[c,B]of t.split(" ").entries()){e.trim!==!1&&(C[C.length-1]=C[C.length-1].trimStart());let l=$(C[C.length-1]);if(c!==0&&(l>=u&&(e.wordWrap===!1||e.trim===!1)&&(C.push(""),l=0),(l>0||e.trim===!1)&&(C[C.length-1]+=" ",l++)),e.hard&&D[c]>u){let g=u-l,b=1+Math.floor((D[c]-g-1)/u);Math.floor((D[c]-1)/u)<b&&C.push(""),S(C,B,u);continue}if(l+D[c]>u&&l>0&&D[c]>0){if(e.wordWrap===!1&&l<u){S(C,B,u);continue}C.push("")}if(l+D[c]>u&&e.wordWrap===!1){S(C,B,u);continue}C[C.length-1]+=B}e.trim!==!1&&(C=C.map(c=>fD(c)));let h=[...C.join(`
|
|
4
|
-
`)];for(let[c,B]of h.entries()){if(F+=B,f.has(B)){let{groups:g}=new RegExp(`(?:\\${tD}(?<code>\\d+)m|\\${N}(?<uri>.*)${L})`).exec(h.slice(c).join(""))||{groups:{}};if(g.code!==void 0){let b=Number.parseFloat(g.code);r=b===$D?void 0:b}else g.uri!==void 0&&(s=g.uri.length===0?void 0:g.uri)}let l=dD.codes.get(Number(r));h[c+1]===`
|
|
5
|
-
`?(s&&(F+=Z("")),r&&l&&(F+=Y(l))):B===`
|
|
6
|
-
`&&(r&&l&&(F+=Y(r)),s&&(F+=Z(s)))}return F};function J(t,u,e){return String(t).normalize().replace(/\r\n/g,`
|
|
7
|
-
`).split(`
|
|
8
|
-
`).map(F=>xD(F,u,e)).join(`
|
|
9
|
-
`)}function wD(t,u){if(t===u)return;let e=t.split(`
|
|
10
|
-
`),F=u.split(`
|
|
11
|
-
`),r=[];for(let s=0;s<Math.max(e.length,F.length);s++)e[s]!==F[s]&&r.push(s);return r}var yD=Symbol("clack:cancel");function v(t,u){t.isTTY&&t.setRawMode(u)}var U=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),SD=new Set(["up","down","left","right","space","enter"]),p=class{constructor({render:u,input:e=FD,output:F=rD,...r},s=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=u.bind(this),this._track=s,this.input=e,this.output=F}prompt(){let u=new iD(0);return u._write=(e,F,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(u),this.rl=z.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),z.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),v(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((e,F)=>{this.once("submit",()=>{this.output.write(A.cursor.show),this.output.off("resize",this.render),v(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(A.cursor.show),this.output.off("resize",this.render),v(this.input,!1),e(yD)})})}on(u,e){let F=this.subscribers.get(u)??[];F.push({cb:e}),this.subscribers.set(u,F)}once(u,e){let F=this.subscribers.get(u)??[];F.push({cb:e,once:!0}),this.subscribers.set(u,F)}emit(u,...e){let F=this.subscribers.get(u)??[],r=[];for(let s of F)s.cb(...e),s.once&&r.push(()=>F.splice(F.indexOf(s),1));for(let s of r)s()}unsubscribe(){this.subscribers.clear()}onKeypress(u,e){if(this.state==="error"&&(this.state="active"),e?.name&&!this._track&&U.has(e.name)&&this.emit("cursor",U.get(e.name)),e?.name&&SD.has(e.name)&&this.emit("cursor",e.name),u&&(u.toLowerCase()==="y"||u.toLowerCase()==="n")&&this.emit("confirm",u.toLowerCase()==="y"),u&&this.emit("key",u.toLowerCase()),e?.name==="return"){if(this.opts.validate){let F=this.opts.validate(this.value);F&&(this.error=F,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}u===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
12
|
-
`),v(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let u=J(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
13
|
-
`).length-1;this.output.write(A.cursor.move(-999,u*-1))}render(){let u=J(this._render(this)??"",process.stdout.columns,{hard:!0});if(u!==this._prevFrame){if(this.state==="initial")this.output.write(A.cursor.hide);else{let e=wD(this._prevFrame,u);if(this.restoreCursor(),e&&e?.length===1){let F=e[0];this.output.write(A.cursor.move(0,F)),this.output.write(A.erase.lines(1));let r=u.split(`
|
|
14
|
-
`);this.output.write(r[F]),this._prevFrame=u,this.output.write(A.cursor.move(0,r.length-F-1));return}else if(e&&e?.length>1){let F=e[0];this.output.write(A.cursor.move(0,F)),this.output.write(A.erase.down());let r=u.split(`
|
|
15
|
-
`).slice(F);this.output.write(r.join(`
|
|
16
|
-
`)),this._prevFrame=u;return}this.output.write(A.erase.down())}this.output.write(u),this.state==="initial"&&(this.state="active"),this._prevFrame=u}}},V=class extends p{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(u){super(u,!1),this.value=!!u.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",e=>{this.output.write(A.cursor.move(0,-1)),this.value=e,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},j=class extends p{constructor(u){super(u,!1),this.cursor=0,this.options=u.options,this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===u.cursorAt),0),this.on("key",e=>{e==="a"&&this.toggleAll()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let u=this.value.length===this.options.length;this.value=u?[]:this.options.map(e=>e.value)}toggleValue(){let u=this.value.includes(this._value);this.value=u?this.value.filter(e=>e!==this._value):[...this.value,this._value]}},M=class extends p{constructor(u){super(u,!1),this.cursor=0,this.options=u.options,this.cursor=this.options.findIndex(({value:e})=>e===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},O=class extends p{constructor(u){super(u),this.valueWithCursor="",this.on("finalize",()=>{this.value||(this.value=u.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${w.inverse(w.hidden("_"))}`;else{let e=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor);this.valueWithCursor=`${e}${w.inverse(F[0])}${F.slice(1)}`}})}get cursor(){return this._cursor}},_D=P(),m=(t,u)=>_D?t:u,kD=m("\u276F",">"),TD=m("\u25A0","x"),VD=m("\u25B2","x"),jD=m("\u2714","\u221A"),n="",d="",W=m("\u25CF",">"),R=m("\u25CB"," "),MD=m("\u25FB","[\u2022]"),X=m("\u25FC","[+]"),OD=m("\u25FB","[ ]"),x=t=>{switch(t){case"initial":case"active":return i.cyan(kD);case"cancel":return i.red(TD);case"error":return i.yellow(VD);case"submit":return i.green(jD)}},WD=t=>new O({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,render(){let u=`${i.gray(n)}
|
|
17
|
-
${x(this.state)} ${t.message}
|
|
18
|
-
`,e=t.placeholder?i.inverse(t.placeholder[0])+i.dim(t.placeholder.slice(1)):i.inverse(i.hidden("_")),F=this.value?this.valueWithCursor:e;switch(this.state){case"error":return`${u.trim()}
|
|
19
|
-
${i.yellow(n)} ${F}
|
|
20
|
-
${i.yellow(d)} ${i.yellow(this.error)}
|
|
21
|
-
`;case"submit":return`${u}${i.gray(n)} ${i.dim(this.value||t.placeholder)}`;case"cancel":return`${u}${i.gray(n)} ${i.strikethrough(i.dim(this.value??""))}${this.value?.trim()?`
|
|
22
|
-
`+i.gray(n):""}`;default:return`${u}${i.cyan(n)} ${F}
|
|
23
|
-
${i.cyan(d)}
|
|
24
|
-
`}}}).prompt(),RD=t=>{let u=t.active??"Yes",e=t.inactive??"No";return new V({active:u,inactive:e,initialValue:t.initialValue??!0,render(){let F=`${i.gray(n)}
|
|
25
|
-
${x(this.state)} ${t.message}
|
|
26
|
-
`,r=this.value?u:e;switch(this.state){case"submit":return`${F}${i.gray(n)} ${i.dim(r)}`;case"cancel":return`${F}${i.gray(n)} ${i.strikethrough(i.dim(r))}
|
|
27
|
-
${i.gray(n)}`;default:return`${F}${i.cyan(n)} ${this.value?`${i.green(W)} ${u}`:`${i.dim(R)} ${i.dim(u)}`} ${i.dim("/")} ${this.value?`${i.dim(R)} ${i.dim(e)}`:`${i.green(W)} ${e}`}
|
|
28
|
-
${i.cyan(d)}
|
|
29
|
-
`}}}).prompt()},ID=t=>{let u=(e,F)=>{let r=e.label??String(e.value);switch(F){case"active":return`${i.green(W)} ${r} ${e.hint?i.dim(`(${e.hint})`):""}`;case"selected":return`${i.dim(r)}`;case"cancelled":return`${i.strikethrough(i.dim(r))}`}return`${i.dim(R)} ${i.dim(r)}`};return new M({options:t.options,initialValue:t.initialValue,render(){let e=`${i.gray(n)}
|
|
30
|
-
${x(this.state)} ${t.message}
|
|
31
|
-
`;switch(this.state){case"submit":return`${e}${i.gray(n)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${e}${i.gray(n)} ${u(this.options[this.cursor],"cancelled")}
|
|
32
|
-
${i.gray(n)}`;default:return`${e}${i.cyan(n)} ${this.options.map((F,r)=>u(F,r===this.cursor?"active":"inactive")).join(`
|
|
33
|
-
${i.cyan(n)} `)}
|
|
34
|
-
${i.cyan(d)}
|
|
35
|
-
`}}}).prompt()},LD=t=>{let u=(e,F)=>{let r=e.label??String(e.value);switch(F){case"active":return`${i.cyan(MD)} ${r} ${e.hint?i.dim(`(${e.hint})`):""}`;case"selected":return`${i.green(X)} ${i.dim(r)}`;case"cancelled":return`${i.strikethrough(i.dim(r))}`;case"active-selected":return`${i.green(X)} ${r} ${e.hint?i.dim(`(${e.hint})`):""}`;case"submitted":return`${i.dim(r)}`}return`${i.dim(OD)} ${i.dim(r)}`};return new j({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(e){if(this.required&&e.length===0)return`Please select at least one option.
|
|
36
|
-
${i.reset(i.dim(`Press ${i.gray(i.bgWhite(i.inverse(" space ")))} to select, ${i.gray(i.bgWhite(i.inverse(" enter ")))} to submit`))}`},render(){let e=`${i.gray(n)}
|
|
37
|
-
${x(this.state)} ${t.message}
|
|
38
|
-
`;switch(this.state){case"submit":return`${e}${i.gray(n)} ${this.options.filter(({value:F})=>this.value.includes(F)).map(F=>u(F,"submitted")).join(i.dim(", "))||i.dim("none")}`;case"cancel":{let F=this.options.filter(({value:r})=>this.value.includes(r)).map(r=>u(r,"cancelled")).join(i.dim(", "));return`${e}${i.gray(n)} ${F.trim()?`${F}
|
|
39
|
-
${i.gray(n)}`:""}`}case"error":{let F=this.error.split(`
|
|
40
|
-
`).map((r,s)=>s===0?`${i.yellow(d)} ${i.yellow(r)}`:` ${r}`).join(`
|
|
41
|
-
`);return e+i.yellow(n)+" "+this.options.map((r,s)=>{let D=this.value.includes(r.value),C=s===this.cursor;return C&&D?u(r,"active-selected"):D?u(r,"selected"):u(r,C?"active":"inactive")}).join(`
|
|
42
|
-
${i.yellow(n)} `)+`
|
|
43
|
-
`+F+`
|
|
44
|
-
`}default:return`${e}${i.cyan(n)} ${this.options.map((F,r)=>{let s=this.value.includes(F.value),D=r===this.cursor;return D&&s?u(F,"active-selected"):s?u(F,"selected"):u(F,D?"active":"inactive")}).join(`
|
|
45
|
-
${i.cyan(n)} `)}
|
|
46
|
-
${i.cyan(d)}
|
|
47
|
-
`}}}).prompt()};async function ZD(t,u={}){if(!u.type||u.type==="text")return await WD({message:t,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial});if(u.type==="confirm")return await RD({message:t,initialValue:u.initial});if(u.type==="select")return await ID({message:t,options:u.options.map(e=>typeof e=="string"?{value:e,label:e}:e)});if(u.type==="multiselect")return await LD({message:t,options:u.options.map(e=>typeof e=="string"?{value:e,label:e}:e),required:u.required});throw new Error(`Unknown prompt type: ${u.type}`)}export{ZD as prompt};
|
package/dist/upgrade-4OTHE3EK.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createRequire as c__createRequire } from 'node:module';
|
|
2
|
-
const require = c__createRequire(import.meta.url);
|
|
3
|
-
import{a as _,b as F,c as P,d as N,e as H,f as E,g as z,h as B,i as p}from"./chunk-KNIZSLDR.js";import"./chunk-CTYZYGF2.js";import{a as C,c as D,e as me,l as A}from"./chunk-2GL2UYTF.js";var Q=D((Ie,K)=>{"use strict";var X=process.platform==="win32",he=X?"\\\\+":"\\/",G=X?"\\\\":"/",ye="((?:[^/]*(?:/|$))*)",we="([^/]*)",j=`((?:[^${G}]*(?:${G}|$))*)`,be=`([^${G}]*)`;function xe(e,{extended:r=!1,globstar:n=!1,strict:l=!1,filepath:t=!1,flags:s=""}={}){let c="",a="",g={regex:"",segments:[]},w=!1,d=!1,h=[];function o(f,{split:m,last:S,only:v}={}){v!=="path"&&(c+=f),t&&v!=="regex"&&(g.regex+=f==="\\/"?he:f,m?(S&&(a+=f),a!==""&&(s.includes("g")||(a=`^${a}$`),g.segments.push(new RegExp(a,s))),a=""):a+=f)}let i,u;for(let f=0;f<e.length;f++){if(i=e[f],u=e[f+1],["\\","$","^",".","="].includes(i)){o(`\\${i}`);continue}if(i==="/"){o(`\\${i}`,{split:!0}),u==="/"&&!l&&(c+="?");continue}if(i==="("){if(h.length){o(i);continue}o(`\\${i}`);continue}if(i===")"){if(h.length){o(i);let m=h.pop();o(m==="@"?"{1}":m==="!"?"([^/]*)":m);continue}o(`\\${i}`);continue}if(i==="|"){if(h.length){o(i);continue}o(`\\${i}`);continue}if(i==="+"){if(u==="("&&r){h.push(i);continue}o(`\\${i}`);continue}if(i==="@"&&r&&u==="("){h.push(i);continue}if(i==="!"){if(r){if(d){o("^");continue}if(u==="("){h.push(i),o("(?!"),f++;continue}o(`\\${i}`);continue}o(`\\${i}`);continue}if(i==="?"){if(r){u==="("?h.push(i):o(".");continue}o(`\\${i}`);continue}if(i==="["){if(d&&u===":"){f++;let m="";for(;e[++f]!==":";)m+=e[f];m==="alnum"?o("(\\w|\\d)"):m==="space"?o("\\s"):m==="digit"&&o("\\d"),f++;continue}if(r){d=!0,o(i);continue}o(`\\${i}`);continue}if(i==="]"){if(r){d=!1,o(i);continue}o(`\\${i}`);continue}if(i==="{"){if(r){w=!0,o("(");continue}o(`\\${i}`);continue}if(i==="}"){if(r){w=!1,o(")");continue}o(`\\${i}`);continue}if(i===","){if(w){o("|");continue}o(`\\${i}`);continue}if(i==="*"){if(u==="("&&r){h.push(i);continue}let m=e[f-1],S=1;for(;e[f+1]==="*";)S++,f++;let v=e[f+1];n?S>1&&(m==="/"||m===void 0)&&(v==="/"||v===void 0)?(o(ye,{only:"regex"}),o(j,{only:"path",last:!0,split:!0}),f++):(o(we,{only:"regex"}),o(be,{only:"path"})):o(".*");continue}o(i)}s.includes("g")||(c=`^${c}$`,a=`^${a}$`,t&&(g.regex=`^${g.regex}$`));let y={regex:new RegExp(c,s)};return t&&(g.segments.push(new RegExp(a,s)),g.regex=new RegExp(g.regex,s),g.globstar=new RegExp(s.includes("g")?j:`^${j}$`,s),y.path=g),y}K.exports=xe});var Z=D((Me,Y)=>{"use strict";var $e=C("os"),U=C("path"),ve=$e.platform()==="win32",Ce={"{":"}","(":")","[":"]"},Re=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\)|(\\).|([@?!+*]\(.*\)))/,Se=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;function V(e,{strict:r=!0}={}){if(e==="")return!1;let n,l=r?Re:Se;for(;n=l.exec(e);){if(n[2])return!0;let t=n.index+n[0].length,s=n[1],c=s?Ce[s]:null;if(s&&c){let a=e.indexOf(c,t);a!==-1&&(t=a+1)}e=e.slice(t)}return!1}function Ae(e,{strict:r=!1}={}){ve&&e.includes("/")&&(e=e.split("\\").join("/")),/[\{\[].*[\/]*.*[\}\]]$/.test(e)&&(e+="/"),e+="a";do e=U.dirname(e);while(V(e,{strict:r})||/(^|[^\\])([\{\[]|\([^\)]+$)/.test(e));return e.replace(/\\([\*\?\|\[\]\(\)\{\}])/g,"$1")}function Pe(e,r={}){let n=Ae(e,r),l=V(e,r),t;return n!="."?(t=e.substr(n.length),t.startsWith("/")&&(t=t.substr(1))):t=e,l||(n=U.dirname(e),t=n!=="."?e.substr(n.length):e),t.startsWith("./")&&(t=t.substr(2)),t.startsWith("/")&&(t=t.substr(1)),{base:n,glob:t,isGlob:l}}Y.exports=Pe});var ie=D((Fe,te)=>{"use strict";var I=C("fs"),Ee=Q(),{promisify:ee}=C("util"),ze=Z(),{join:q,resolve:J,relative:Oe}=C("path"),ke=/(^|[\\\/])\.[^\\\/\.]/g,We=ee(I.readdir),Te=ee(I.stat),L={};async function ne(e,r,n,l,t="",s=0){let c=n.segments[s],a=J(l.cwd,r,t),g=await We(a),{dot:w,filesOnly:d}=l,h=0,o=g.length,i,u,y,f,m;for(;h<o;h++)if(u=q(a,i=g[h]),y=t?q(t,i):i,!(!w&&ke.test(y))){if(m=n.regex.test(y),(f=L[y])===void 0&&(L[y]=f=I.lstatSync(u)),!f.isDirectory()){m&&e.push(Oe(l.cwd,u));continue}c&&!c.test(i)||(!d&&m&&e.push(q(r,y)),await ne(e,r,n,l,y,c&&c.toString()!==n.globstar&&s+1))}}te.exports=async function(e,r={}){if(!e)return[];let n=ze(e);if(r.cwd=r.cwd||".",!n.isGlob)try{let s=J(r.cwd,e),c=await Te(s);return r.filesOnly&&!c.isFile()?[]:r.absolute?[s]:[e]}catch(s){if(s.code!="ENOENT")throw s;return[]}r.flush&&(L={});let l=[],{path:t}=Ee(n.glob,{filepath:!0,globstar:!0,extended:!0});return t.globstar=t.globstar.toString(),await ne(l,n.base,t,r,".",0),r.absolute?l.map(s=>J(r.cwd,s)):l}});import{existsSync as O,readFileSync as W,writeFileSync as De}from"node:fs";import{dirname as _e,relative as se,resolve as x,sep as M}from"node:path";var le=me(ie(),1);import Ne from"detect-indent";import{loadFile as je}from"magicast";import{getDefaultExportOptions as Ge}from"magicast/helpers";import{run as qe}from"npm-check-updates";function b(...e){let r=" ";return(n,l)=>e.reduce((t,s)=>typeof s=="number"?`${new Array(s).fill(r).join("")}${t}`:typeof s=="string"?`${s}${t}`:s(t),B.includes(n)?p(n,l):n)}async function ce(e){let r=await qe({deep:!0,cwd:process.cwd(),filter:n=>n.startsWith($)||n.startsWith(R)||["typescript","vite"].includes(n),target:n=>(n.startsWith($)||n.startsWith(R))&&e?"@next":"@latest"});return r||(A.error(p("errors.npm-error")),process.exit(1)),Promise.all(Object.entries(r).filter(([n])=>{try{return W(x(n)).toString().includes($)}catch{return!1}}).map(async([n,l])=>{let t=x(_e(n)),s=x(t,"tsconfig.json"),c=x(t,"package.json"),a=x(t,".npmrc"),[g]=await(0,le.default)(`${oe(t)}/alliance.config*`);return{path:oe(se(process.cwd(),t)),packageJson:O(c)?k(c,t):void 0,tsConfigJson:O(s)?k(s,t):void 0,allianceConfig:O(g)?k(g,t):void 0,npmConfig:O(a)?k(a,t):void 0,upgrades:l}}))}async function ae({tsConfigJson:e}){if(!e)return;let{warn:r,error:n,output:l}=T(e.relative);try{let t=_(W(e.full).toString());t?.compilerOptions?.moduleResolution?.toLowerCase()!=="bundler"&&r(p("warnings.change",{property:"compilerOptions.moduleResolution",current:t?.compilerOptions?.moduleResolution,new:"bundler"}))}catch(t){n(t)}l()}async function fe({npmConfig:e}){let{error:r,output:n,recommend:l}=T(e?.relative||".npmrc");if(!e)l(p("recommendations.add.webprovisions-registry-config"));else try{W(e.full).toString().includes(`${ge}:registry=https://registry.webprovisions.io`)||l(p("recommendations.update.webprovisions-registry-config"))}catch(t){r(t)}n()}async function ue({allianceConfig:e}){if(!e)return;let{warn:r,error:n,output:l}=T(e.relative,!1);try{let t=await je(e.full),s=Ge(t);typeof s?.experimental?.logging=="boolean"&&r(p("warnings.remove",{property:"experimental.logging",alt:`, use ${P("'server.logging'")} instead`})),typeof s?.server?.mode<"u"&&r(p("warnings.remove",{property:"server.mode",alt:", no longer supported"}))}catch(t){n(t)}l()}async function pe({packageJson:e,allianceConfig:r,tsConfigJson:n,upgrades:l}){if(!e)return;let{change:t,warn:s,output:c,error:a,recommend:g}=T(e.relative,!!r||!!n);try{let w=W(e.full).toString(),d=_(w);if(d.publishConfig?.registry!=="https://registry.webprovisions.io"&&s(p("warnings.set",{property:"publishConfig.registry",new:"https://registry.webprovisions.io"})),d.publishConfig?.access!=="public"&&s(p("warnings.set",{property:"publishConfig.access",new:"public"})),d.alliance?.apps&&s(p("warnings.remove",{property:"alliance.apps",alt:`, use the app config ${P("'server.apps'")} option instead`})),d.scripts){let o=Object.entries(d.scripts).filter(([i,u])=>u.includes("create alliance")||u.includes("create-alliance"));for(let[i,u]of o)try{u.includes("serve")||u.includes("server")?(s(p("warnings.change",{property:`scripts.${i}`,current:u,new:"npx @telia-ace/alliance-cli serve"})),u.includes("--server-mode")&&s(p("warnings.remove",{property:"--server-mode",alt:", no longer supported"}))):u.includes("build")&&s(p("warnings.change",{property:`scripts.${i}`,current:u,new:"npx @telia-ace/alliance-cli build"}))}catch(y){a(y)}}for(let o of Object.keys({...d?.dependencies,...d?.devDependencies})){if(!o.startsWith(re))continue;let i=o.replace(re,"");g(p("recommendations.update.webprovisions-registry-app",{pkg:o,wpPkg:`${R}${i}`}))}let h=o=>{if(o)for(let i of Object.keys(o))!i.startsWith($)&&!i.startsWith(R)||!l[i]||(o[i]=l[i])};h(d.dependencies),h(d.devDependencies);for(let[o,i]of Object.entries(l))o.startsWith($)||o.startsWith(R)?t(p("changes.upgraded",{pkg:o,v:i})):g(p("recommendations.upgrade",{pkg:o,v:i}));De(e.full,JSON.stringify(d,null,Ne(w).indent))}catch(w){a(w)}c()}var $="@telia-ace",ge="@webprovisions-registry",re=`${$}/alliance-app-`,R=`${ge}/alliance-app-`;function T(e,r=!0){let n=[],l=[],t=[],s=[];return{warn:c=>l.push(c),change:c=>n.push(c),recommend:c=>t.push(c),error:c=>s.push(c),output:()=>{if(!n.length&&!l.length&&!t.length)return;console.log(b(H,1)(e));let c=b("- ",2);if(n.length){console.log(b(2,P)("info.header.changes"));for(let a of n)console.log(c(a))}if(l.length){console.log(b(2,N)("info.header.warnings"));for(let a of l)console.log(c(a))}if(t.length){console.log(b(2,F)("info.header.recommendations"));for(let a of t)console.log(c(a))}if(s.length){console.log(b(2,N)("Errors"));for(let a of s)A.error(c(a))}r&&console.log()}}}function oe(e){return e.replaceAll(M,"/")}function k(e,r=process.cwd()){let n=x(process.cwd(),e);return{full:n.replaceAll(M,"/"),relative:se(r,n).replaceAll(M,"/")}}function de(){let e=Je();return A.log(b(z,E)("info.next-steps")),console.log([p("info.steps.warnings"),p("info.steps.install",{cmd:`${e} install`})].map(r=>b("- ",1)(r)).join(`
|
|
4
|
-
`))}function Je(){try{if(!process.env.npm_config_user_agent)return"npm";let r=process.env.npm_config_user_agent.split(" ")[0],n=r.lastIndexOf("/"),l=r.substring(0,n);return l==="npminstall"?"cnpm":l}catch{return"npm"}}var on={meta:{name:"upgrade",description:p("command.upgrade")},args:{next:{type:"boolean",description:p("arg.upgrade.next"),default:!1,required:!1,alias:"n"}},async run(e){let r=await ce(e.args.next);for(let n of r)console.log(),console.log(b(z,E)(n.path||"root")),await fe(n),await pe(n),await ae(n),await ue(n);console.log(),de(),console.log()}};export{on as default};
|