@builder.io/dev-tools 1.21.3 → 1.21.5

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/server/index.cjs CHANGED
@@ -1,40 +1,40 @@
1
- "use strict";var rT=Object.create;var Fi=Object.defineProperty;var nT=Object.getOwnPropertyDescriptor;var oT=Object.getOwnPropertyNames;var iT=Object.getPrototypeOf,sT=Object.prototype.hasOwnProperty;var aT=(e,t,r)=>t in e?Fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wa=(e,t)=>{for(var r in t)Fi(e,r,{get:t[r],enumerable:!0})},xh=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of oT(t))!sT.call(e,o)&&o!==r&&Fi(e,o,{get:()=>t[o],enumerable:!(n=nT(t,o))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?rT(iT(e)):{},xh(t||!e||!e.__esModule?Fi(r,"default",{value:e,enumerable:!0}):r,e)),uT=e=>xh(Fi({},"__esModule",{value:!0}),e);var Je=(e,t,r)=>aT(e,typeof t!="symbol"?t+"":t,r);var Ph=S((w4,_h)=>{"use strict";_h.exports=function(){if(process.env.npm_config_user_agent)return lT(process.env.npm_config_user_agent)};function lT(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});var Ta=S((s9,ng)=>{"use strict";var Uc={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},ET={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},_T={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Uc.up():"");return e&&(t+=Uc.left),t}};ng.exports={cursor:Uc,scroll:ET,erase:_T,beep:"\x07"}});var Wn=S((a9,Vc)=>{var Fa=process||{},og=Fa.argv||[],Aa=Fa.env||{},PT=!(Aa.NO_COLOR||og.includes("--no-color"))&&(!!Aa.FORCE_COLOR||og.includes("--color")||Fa.platform==="win32"||(Fa.stdout||{}).isTTY&&Aa.TERM!=="dumb"||!!Aa.CI),TT=(e,t,r=e)=>n=>{let o=""+n,s=o.indexOf(t,e.length);return~s?e+AT(o,t,r,s)+t:e+o+t},AT=(e,t,r,n)=>{let o="",s=0;do o+=e.substring(s,n)+r,s=n+t.length,n=e.indexOf(t,s);while(~n);return o+e.substring(s)},ig=(e=PT)=>{let t=e?TT:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Vc.exports=ig();Vc.exports.createColors=ig});var By=S((X7,Ha)=>{Ha.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Ha.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;Ha.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var yl=S((eH,zy)=>{var gl=By();zy.exports={isSpaceSeparator(e){return typeof e=="string"&&gl.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||gl.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||gl.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var qy=S((tH,Hy)=>{var tt=yl(),vl,Et,un,Ka,Pn,br,rt,bl,Wi;Hy.exports=function(t,r){vl=String(t),Et="start",un=[],Ka=0,Pn=1,br=0,rt=void 0,bl=void 0,Wi=void 0;do rt=ER(),TR[Et]();while(rt.type!=="eof");return typeof r=="function"?Cl({"":Wi},"",r):Wi};function Cl(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),i=Cl(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Cl(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var Y,W,Gi,an,oe;function ER(){for(Y="default",W="",Gi=!1,an=1;;){oe=cn();let e=Uy[Y]();if(e)return e}}function cn(){if(vl[Ka])return String.fromCodePoint(vl.codePointAt(Ka))}function A(){let e=cn();return e===`
2
- `?(Pn++,br=0):e?br+=e.length:br++,e&&(Ka+=e.length),e}var Uy={default(){switch(oe){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
1
+ "use strict";var rT=Object.create;var Fi=Object.defineProperty;var nT=Object.getOwnPropertyDescriptor;var oT=Object.getOwnPropertyNames;var iT=Object.getPrototypeOf,sT=Object.prototype.hasOwnProperty;var aT=(e,t,r)=>t in e?Fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wa=(e,t)=>{for(var r in t)Fi(e,r,{get:t[r],enumerable:!0})},xh=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of oT(t))!sT.call(e,o)&&o!==r&&Fi(e,o,{get:()=>t[o],enumerable:!(n=nT(t,o))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?rT(iT(e)):{},xh(t||!e||!e.__esModule?Fi(r,"default",{value:e,enumerable:!0}):r,e)),uT=e=>xh(Fi({},"__esModule",{value:!0}),e);var Ge=(e,t,r)=>aT(e,typeof t!="symbol"?t+"":t,r);var Ph=S((b4,_h)=>{"use strict";_h.exports=function(){if(process.env.npm_config_user_agent)return lT(process.env.npm_config_user_agent)};function lT(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});var Ta=S((a9,ng)=>{"use strict";var Uc={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},ET={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},_T={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Uc.up():"");return e&&(t+=Uc.left),t}};ng.exports={cursor:Uc,scroll:ET,erase:_T,beep:"\x07"}});var Wn=S((u9,Vc)=>{var Fa=process||{},og=Fa.argv||[],Aa=Fa.env||{},PT=!(Aa.NO_COLOR||og.includes("--no-color"))&&(!!Aa.FORCE_COLOR||og.includes("--color")||Fa.platform==="win32"||(Fa.stdout||{}).isTTY&&Aa.TERM!=="dumb"||!!Aa.CI),TT=(e,t,r=e)=>n=>{let o=""+n,s=o.indexOf(t,e.length);return~s?e+AT(o,t,r,s)+t:e+o+t},AT=(e,t,r,n)=>{let o="",s=0;do o+=e.substring(s,n)+r,s=n+t.length,n=e.indexOf(t,s);while(~n);return o+e.substring(s)},ig=(e=PT)=>{let t=e?TT:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Vc.exports=ig();Vc.exports.createColors=ig});var By=S((eH,Ha)=>{Ha.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Ha.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;Ha.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var yl=S((tH,zy)=>{var gl=By();zy.exports={isSpaceSeparator(e){return typeof e=="string"&&gl.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||gl.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||gl.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var qy=S((rH,Hy)=>{var tt=yl(),vl,Et,un,Ka,Tn,br,rt,bl,Wi;Hy.exports=function(t,r){vl=String(t),Et="start",un=[],Ka=0,Tn=1,br=0,rt=void 0,bl=void 0,Wi=void 0;do rt=ER(),TR[Et]();while(rt.type!=="eof");return typeof r=="function"?Cl({"":Wi},"",r):Wi};function Cl(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),i=Cl(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Cl(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var Y,W,Gi,an,oe;function ER(){for(Y="default",W="",Gi=!1,an=1;;){oe=cn();let e=Uy[Y]();if(e)return e}}function cn(){if(vl[Ka])return String.fromCodePoint(vl.codePointAt(Ka))}function A(){let e=cn();return e===`
2
+ `?(Tn++,br=0):e?br+=e.length:br++,e&&(Ka+=e.length),e}var Uy={default(){switch(oe){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
3
3
  `:case"\r":case"\u2028":case"\u2029":A();return;case"/":A(),Y="comment";return;case void 0:return A(),Fe("eof")}if(tt.isSpaceSeparator(oe)){A();return}return Uy[Et]()},comment(){switch(oe){case"*":A(),Y="multiLineComment";return;case"/":A(),Y="singleLineComment";return}throw Re(A())},multiLineComment(){switch(oe){case"*":A(),Y="multiLineCommentAsterisk";return;case void 0:throw Re(A())}A()},multiLineCommentAsterisk(){switch(oe){case"*":A();return;case"/":A(),Y="default";return;case void 0:throw Re(A())}A(),Y="multiLineComment"},singleLineComment(){switch(oe){case`
4
4
  `:case"\r":case"\u2028":case"\u2029":A(),Y="default";return;case void 0:return A(),Fe("eof")}A()},value(){switch(oe){case"{":case"[":return Fe("punctuator",A());case"n":return A(),Xn("ull"),Fe("null",null);case"t":return A(),Xn("rue"),Fe("boolean",!0);case"f":return A(),Xn("alse"),Fe("boolean",!1);case"-":case"+":A()==="-"&&(an=-1),Y="sign";return;case".":W=A(),Y="decimalPointLeading";return;case"0":W=A(),Y="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":W=A(),Y="decimalInteger";return;case"I":return A(),Xn("nfinity"),Fe("numeric",1/0);case"N":return A(),Xn("aN"),Fe("numeric",NaN);case'"':case"'":Gi=A()==='"',W="",Y="string";return}throw Re(A())},identifierNameStartEscape(){if(oe!=="u")throw Re(A());A();let e=wl();switch(e){case"$":case"_":break;default:if(!tt.isIdStartChar(e))throw jy();break}W+=e,Y="identifierName"},identifierName(){switch(oe){case"$":case"_":case"\u200C":case"\u200D":W+=A();return;case"\\":A(),Y="identifierNameEscape";return}if(tt.isIdContinueChar(oe)){W+=A();return}return Fe("identifier",W)},identifierNameEscape(){if(oe!=="u")throw Re(A());A();let e=wl();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!tt.isIdContinueChar(e))throw jy();break}W+=e,Y="identifierName"},sign(){switch(oe){case".":W=A(),Y="decimalPointLeading";return;case"0":W=A(),Y="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":W=A(),Y="decimalInteger";return;case"I":return A(),Xn("nfinity"),Fe("numeric",an*(1/0));case"N":return A(),Xn("aN"),Fe("numeric",NaN)}throw Re(A())},zero(){switch(oe){case".":W+=A(),Y="decimalPoint";return;case"e":case"E":W+=A(),Y="decimalExponent";return;case"x":case"X":W+=A(),Y="hexadecimal";return}return Fe("numeric",an*0)},decimalInteger(){switch(oe){case".":W+=A(),Y="decimalPoint";return;case"e":case"E":W+=A(),Y="decimalExponent";return}if(tt.isDigit(oe)){W+=A();return}return Fe("numeric",an*Number(W))},decimalPointLeading(){if(tt.isDigit(oe)){W+=A(),Y="decimalFraction";return}throw Re(A())},decimalPoint(){switch(oe){case"e":case"E":W+=A(),Y="decimalExponent";return}if(tt.isDigit(oe)){W+=A(),Y="decimalFraction";return}return Fe("numeric",an*Number(W))},decimalFraction(){switch(oe){case"e":case"E":W+=A(),Y="decimalExponent";return}if(tt.isDigit(oe)){W+=A();return}return Fe("numeric",an*Number(W))},decimalExponent(){switch(oe){case"+":case"-":W+=A(),Y="decimalExponentSign";return}if(tt.isDigit(oe)){W+=A(),Y="decimalExponentInteger";return}throw Re(A())},decimalExponentSign(){if(tt.isDigit(oe)){W+=A(),Y="decimalExponentInteger";return}throw Re(A())},decimalExponentInteger(){if(tt.isDigit(oe)){W+=A();return}return Fe("numeric",an*Number(W))},hexadecimal(){if(tt.isHexDigit(oe)){W+=A(),Y="hexadecimalInteger";return}throw Re(A())},hexadecimalInteger(){if(tt.isHexDigit(oe)){W+=A();return}return Fe("numeric",an*Number(W))},string(){switch(oe){case"\\":A(),W+=_R();return;case'"':if(Gi)return A(),Fe("string",W);W+=A();return;case"'":if(!Gi)return A(),Fe("string",W);W+=A();return;case`
5
- `:case"\r":throw Re(A());case"\u2028":case"\u2029":AR(oe);break;case void 0:throw Re(A())}W+=A()},start(){switch(oe){case"{":case"[":return Fe("punctuator",A())}Y="value"},beforePropertyName(){switch(oe){case"$":case"_":W=A(),Y="identifierName";return;case"\\":A(),Y="identifierNameStartEscape";return;case"}":return Fe("punctuator",A());case'"':case"'":Gi=A()==='"',Y="string";return}if(tt.isIdStartChar(oe)){W+=A(),Y="identifierName";return}throw Re(A())},afterPropertyName(){if(oe===":")return Fe("punctuator",A());throw Re(A())},beforePropertyValue(){Y="value"},afterPropertyValue(){switch(oe){case",":case"}":return Fe("punctuator",A())}throw Re(A())},beforeArrayValue(){if(oe==="]")return Fe("punctuator",A());Y="value"},afterArrayValue(){switch(oe){case",":case"]":return Fe("punctuator",A())}throw Re(A())},end(){throw Re(A())}};function Fe(e,t){return{type:e,value:t,line:Pn,column:br}}function Xn(e){for(let t of e){if(cn()!==t)throw Re(A());A()}}function _R(){switch(cn()){case"b":return A(),"\b";case"f":return A(),"\f";case"n":return A(),`
5
+ `:case"\r":throw Re(A());case"\u2028":case"\u2029":AR(oe);break;case void 0:throw Re(A())}W+=A()},start(){switch(oe){case"{":case"[":return Fe("punctuator",A())}Y="value"},beforePropertyName(){switch(oe){case"$":case"_":W=A(),Y="identifierName";return;case"\\":A(),Y="identifierNameStartEscape";return;case"}":return Fe("punctuator",A());case'"':case"'":Gi=A()==='"',Y="string";return}if(tt.isIdStartChar(oe)){W+=A(),Y="identifierName";return}throw Re(A())},afterPropertyName(){if(oe===":")return Fe("punctuator",A());throw Re(A())},beforePropertyValue(){Y="value"},afterPropertyValue(){switch(oe){case",":case"}":return Fe("punctuator",A())}throw Re(A())},beforeArrayValue(){if(oe==="]")return Fe("punctuator",A());Y="value"},afterArrayValue(){switch(oe){case",":case"]":return Fe("punctuator",A())}throw Re(A())},end(){throw Re(A())}};function Fe(e,t){return{type:e,value:t,line:Tn,column:br}}function Xn(e){for(let t of e){if(cn()!==t)throw Re(A());A()}}function _R(){switch(cn()){case"b":return A(),"\b";case"f":return A(),"\f";case"n":return A(),`
6
6
  `;case"r":return A(),"\r";case"t":return A()," ";case"v":return A(),"\v";case"0":if(A(),tt.isDigit(cn()))throw Re(A());return"\0";case"x":return A(),PR();case"u":return A(),wl();case`
7
7
  `:case"\u2028":case"\u2029":return A(),"";case"\r":return A(),cn()===`
8
- `&&A(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Re(A());case void 0:throw Re(A())}return A()}function PR(){let e="",t=cn();if(!tt.isHexDigit(t)||(e+=A(),t=cn(),!tt.isHexDigit(t)))throw Re(A());return e+=A(),String.fromCodePoint(parseInt(e,16))}function wl(){let e="",t=4;for(;t-- >0;){let r=cn();if(!tt.isHexDigit(r))throw Re(A());e+=A()}return String.fromCodePoint(parseInt(e,16))}var TR={start(){if(rt.type==="eof")throw eo();Dl()},beforePropertyName(){switch(rt.type){case"identifier":case"string":bl=rt.value,Et="afterPropertyName";return;case"punctuator":qa();return;case"eof":throw eo()}},afterPropertyName(){if(rt.type==="eof")throw eo();Et="beforePropertyValue"},beforePropertyValue(){if(rt.type==="eof")throw eo();Dl()},beforeArrayValue(){if(rt.type==="eof")throw eo();if(rt.type==="punctuator"&&rt.value==="]"){qa();return}Dl()},afterPropertyValue(){if(rt.type==="eof")throw eo();switch(rt.value){case",":Et="beforePropertyName";return;case"}":qa()}},afterArrayValue(){if(rt.type==="eof")throw eo();switch(rt.value){case",":Et="beforeArrayValue";return;case"]":qa()}},end(){}};function Dl(){let e;switch(rt.type){case"punctuator":switch(rt.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=rt.value;break}if(Wi===void 0)Wi=e;else{let t=un[un.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,bl,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")un.push(e),Array.isArray(e)?Et="beforeArrayValue":Et="beforePropertyName";else{let t=un[un.length-1];t==null?Et="end":Array.isArray(t)?Et="afterArrayValue":Et="afterPropertyValue"}}function qa(){un.pop();let e=un[un.length-1];e==null?Et="end":Array.isArray(e)?Et="afterArrayValue":Et="afterPropertyValue"}function Re(e){return Ga(e===void 0?`JSON5: invalid end of input at ${Pn}:${br}`:`JSON5: invalid character '${Vy(e)}' at ${Pn}:${br}`)}function eo(){return Ga(`JSON5: invalid end of input at ${Pn}:${br}`)}function jy(){return br-=5,Ga(`JSON5: invalid identifier character at ${Pn}:${br}`)}function AR(e){console.warn(`JSON5: '${Vy(e)}' in strings is not valid ECMAScript; consider escaping`)}function Vy(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function Ga(e){let t=new SyntaxError(e);return t.lineNumber=Pn,t.columnNumber=br,t}});var Gy=S((rH,Ky)=>{var xl=yl();Ky.exports=function(t,r,n){let o=[],s="",i,a,u="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){i=[];for(let f of r){let g;typeof f=="string"?g=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(g=String(f)),g!==void 0&&i.indexOf(g)<0&&i.push(g)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),u=" ".substr(0,n)):typeof n=="string"&&(u=n.substr(0,10)),l("",{"":t});function l(f,g){let y=g[f];switch(y!=null&&(typeof y.toJSON5=="function"?y=y.toJSON5(f):typeof y.toJSON=="function"&&(y=y.toJSON(f))),a&&(y=a.call(g,f,y)),y instanceof Number?y=Number(y):y instanceof String?y=String(y):y instanceof Boolean&&(y=y.valueOf()),y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y=="string")return p(y,!1);if(typeof y=="number")return String(y);if(typeof y=="object")return Array.isArray(y)?m(y):d(y)}function p(f){let g={"'":.1,'"':.2},y={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let T=0;T<f.length;T++){let E=f[T];switch(E){case"'":case'"':g[E]++,b+=E;continue;case"\0":if(xl.isDigit(f[T+1])){b+="\\x00";continue}}if(y[E]){b+=y[E];continue}if(E<" "){let F=E.charCodeAt(0).toString(16);b+="\\x"+("00"+F).substring(F.length);continue}b+=E}let w=c||Object.keys(g).reduce((T,E)=>g[T]<g[E]?T:E);return b=b.replace(new RegExp(w,"g"),y[w]),w+b+w}function d(f){if(o.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");o.push(f);let g=s;s=s+u;let y=i||Object.keys(f),b=[];for(let T of y){let E=l(T,f);if(E!==void 0){let F=h(T)+":";u!==""&&(F+=" "),F+=E,b.push(F)}}let w;if(b.length===0)w="{}";else{let T;if(u==="")T=b.join(","),w="{"+T+"}";else{let E=`,
8
+ `&&A(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Re(A());case void 0:throw Re(A())}return A()}function PR(){let e="",t=cn();if(!tt.isHexDigit(t)||(e+=A(),t=cn(),!tt.isHexDigit(t)))throw Re(A());return e+=A(),String.fromCodePoint(parseInt(e,16))}function wl(){let e="",t=4;for(;t-- >0;){let r=cn();if(!tt.isHexDigit(r))throw Re(A());e+=A()}return String.fromCodePoint(parseInt(e,16))}var TR={start(){if(rt.type==="eof")throw eo();Dl()},beforePropertyName(){switch(rt.type){case"identifier":case"string":bl=rt.value,Et="afterPropertyName";return;case"punctuator":qa();return;case"eof":throw eo()}},afterPropertyName(){if(rt.type==="eof")throw eo();Et="beforePropertyValue"},beforePropertyValue(){if(rt.type==="eof")throw eo();Dl()},beforeArrayValue(){if(rt.type==="eof")throw eo();if(rt.type==="punctuator"&&rt.value==="]"){qa();return}Dl()},afterPropertyValue(){if(rt.type==="eof")throw eo();switch(rt.value){case",":Et="beforePropertyName";return;case"}":qa()}},afterArrayValue(){if(rt.type==="eof")throw eo();switch(rt.value){case",":Et="beforeArrayValue";return;case"]":qa()}},end(){}};function Dl(){let e;switch(rt.type){case"punctuator":switch(rt.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=rt.value;break}if(Wi===void 0)Wi=e;else{let t=un[un.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,bl,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")un.push(e),Array.isArray(e)?Et="beforeArrayValue":Et="beforePropertyName";else{let t=un[un.length-1];t==null?Et="end":Array.isArray(t)?Et="afterArrayValue":Et="afterPropertyValue"}}function qa(){un.pop();let e=un[un.length-1];e==null?Et="end":Array.isArray(e)?Et="afterArrayValue":Et="afterPropertyValue"}function Re(e){return Ga(e===void 0?`JSON5: invalid end of input at ${Tn}:${br}`:`JSON5: invalid character '${Vy(e)}' at ${Tn}:${br}`)}function eo(){return Ga(`JSON5: invalid end of input at ${Tn}:${br}`)}function jy(){return br-=5,Ga(`JSON5: invalid identifier character at ${Tn}:${br}`)}function AR(e){console.warn(`JSON5: '${Vy(e)}' in strings is not valid ECMAScript; consider escaping`)}function Vy(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function Ga(e){let t=new SyntaxError(e);return t.lineNumber=Tn,t.columnNumber=br,t}});var Gy=S((nH,Ky)=>{var xl=yl();Ky.exports=function(t,r,n){let o=[],s="",i,a,u="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){i=[];for(let f of r){let g;typeof f=="string"?g=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(g=String(f)),g!==void 0&&i.indexOf(g)<0&&i.push(g)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),u=" ".substr(0,n)):typeof n=="string"&&(u=n.substr(0,10)),l("",{"":t});function l(f,g){let y=g[f];switch(y!=null&&(typeof y.toJSON5=="function"?y=y.toJSON5(f):typeof y.toJSON=="function"&&(y=y.toJSON(f))),a&&(y=a.call(g,f,y)),y instanceof Number?y=Number(y):y instanceof String?y=String(y):y instanceof Boolean&&(y=y.valueOf()),y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y=="string")return p(y,!1);if(typeof y=="number")return String(y);if(typeof y=="object")return Array.isArray(y)?m(y):d(y)}function p(f){let g={"'":.1,'"':.2},y={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let T=0;T<f.length;T++){let E=f[T];switch(E){case"'":case'"':g[E]++,b+=E;continue;case"\0":if(xl.isDigit(f[T+1])){b+="\\x00";continue}}if(y[E]){b+=y[E];continue}if(E<" "){let F=E.charCodeAt(0).toString(16);b+="\\x"+("00"+F).substring(F.length);continue}b+=E}let w=c||Object.keys(g).reduce((T,E)=>g[T]<g[E]?T:E);return b=b.replace(new RegExp(w,"g"),y[w]),w+b+w}function d(f){if(o.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");o.push(f);let g=s;s=s+u;let y=i||Object.keys(f),b=[];for(let T of y){let E=l(T,f);if(E!==void 0){let F=h(T)+":";u!==""&&(F+=" "),F+=E,b.push(F)}}let w;if(b.length===0)w="{}";else{let T;if(u==="")T=b.join(","),w="{"+T+"}";else{let E=`,
9
9
  `+s;T=b.join(E),w=`{
10
10
  `+s+T+`,
11
11
  `+g+"}"}}return o.pop(),s=g,w}function h(f){if(f.length===0)return p(f,!0);let g=String.fromCodePoint(f.codePointAt(0));if(!xl.isIdStartChar(g))return p(f,!0);for(let y=g.length;y<f.length;y++)if(!xl.isIdContinueChar(String.fromCodePoint(f.codePointAt(y))))return p(f,!0);return f}function m(f){if(o.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");o.push(f);let g=s;s=s+u;let y=[];for(let w=0;w<f.length;w++){let T=l(String(w),f);y.push(T!==void 0?T:"null")}let b;if(y.length===0)b="[]";else if(u==="")b="["+y.join(",")+"]";else{let w=`,
12
12
  `+s,T=y.join(w);b=`[
13
13
  `+s+T+`,
14
- `+g+"]"}return o.pop(),s=g,b}}});var Zy=S((nH,Wy)=>{var FR=qy(),RR=Gy(),$R={parse:FR,stringify:RR};Wy.exports=$R});var Pl=S(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.throwUnsupportedData=Tn.throwUnknownDataType=Tn.getType=void 0;function pD(e){return Object.prototype.toString.call(e)}Tn.getType=pD;function o$(e){throw new TypeError("unsupported data type: "+pD(e))}Tn.throwUnknownDataType=o$;function i$(e){throw new TypeError("unsupported data type: "+e)}Tn.throwUnsupportedData=i$});var $l=S(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.s_to_num=mt.int_str_to_s=mt.num_to_s=mt.big_int_to_s=mt.int_to_s=mt.s_to_big_int=mt.s_to_int=void 0;var ln="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);ln+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);ln+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);ln+=t}var Lo=ln.length,Al={};for(let e=0;e<Lo;e++){let t=ln[e];Al[t]=e}function Fl(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],s=Al[o];s*=r,t+=s,r*=Lo}return t}mt.s_to_int=Fl;function dD(e){let t=BigInt(0),r=BigInt(1),n=BigInt(Lo);for(let o=e.length-1;o>=0;o--){let s=e[o],i=BigInt(Al[s]);i*=r,t+=i,r*=n}return t}mt.s_to_big_int=dD;function Rl(e){if(e===0)return ln[0];let t=[];for(;e!==0;){let r=e%Lo,n=ln[r];t.push(n),e-=r,e/=Lo}return t.reverse().join("")}mt.int_to_s=Rl;function fD(e){let t=BigInt(0),r=BigInt(Lo);if(e===t)return ln[0];let n=[];for(;e!==t;){let o=e%r,s=ln[Number(o)];n.push(s),e/=r}return n.reverse().join("")}mt.big_int_to_s=fD;function mD(e){return e.split("").reverse().join("")}function hD(e){if(e<0)return"-"+hD(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,i]=t.split("e");t=s,r="0e"+i}else return Rl(e);let n;r&&([r,n]=r.split("e")),t=Za(t),r=mD(r),r=Za(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=Za(n),o+=n}return o}mt.num_to_s=hD;function Za(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?Rl(t):":"+fD(BigInt(e))}mt.int_str_to_s=Za;function Tl(e){return e[0]===":"?dD(e.substring(1)).toString():Fl(e).toString()}function gD(e){if(e[0]==="-")return-gD(e.substr(1));let[t,r,n]=e.split(".");if(!r)return Fl(t);t=Tl(t),r=Tl(r),r=mD(r);let o=t+"."+r;if(n){o+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=Tl(n),o+=s?-n:+n}return+o}mt.s_to_num=gD});var Il=S(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.decodeStr=ht.encodeStr=ht.decodeBool=ht.encodeBool=ht.decodeKey=ht.decodeNum=ht.encodeNum=void 0;var kl=$l();function s$(e){return"n|"+(0,kl.num_to_s)(e)}ht.encodeNum=s$;function a$(e){return e=e.replace("n|",""),(0,kl.s_to_num)(e)}ht.decodeNum=a$;function u$(e){return typeof e=="number"?e:(0,kl.s_to_int)(e)}ht.decodeKey=u$;function c$(e){return e?"b|T":"b|F"}ht.encodeBool=c$;function l$(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}ht.decodeBool=l$;function p$(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}ht.encodeStr=p$;function d$(e){return e[0]+e[1]==="s|"?e.substr(2):e}ht.decodeStr=d$});var Nl=S(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.config=void 0;Ja.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var Bl=S(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.addValue=ar.makeInMemoryMemory=ar.makeInMemoryCache=ar.makeInMemoryStore=ar.memToValues=void 0;var Ll=Nl(),Ol=Pl(),Ml=Il(),f$=$l();function m$(e){return e.store.toArray()}ar.memToValues=m$;function yD(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}ar.makeInMemoryStore=yD;function DD(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}ar.makeInMemoryCache=DD;function h$(){return{store:yD(),cache:DD(),keyCount:0}}ar.makeInMemoryMemory=h$;function ro(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,f$.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function g$(e,t){Ll.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=Ji(e,t,void 0);return e.cache.setSchema(r,n),n}function Ji(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return Ji(e,null,r);break;case"object":if(t===null)return ro(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let s=t[o],i=s===null?"_":Ji(e,s,t);n+="|"+i}return n==="a"&&(n="a|"),ro(e,n)}else{let n=Object.keys(t);if(n.length===0)return ro(e,"o|");let o="o",s=g$(e,n);o+="|"+s;for(let i of n){let a=t[i],u=Ji(e,a,t);o+="|"+u}return ro(e,o)}case"boolean":return ro(e,(0,Ml.encodeBool)(t));case"number":return Number.isNaN(t)?(Ll.config.error_on_nan&&(0,Ol.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(Ll.config.error_on_infinite&&(0,Ol.throwUnsupportedData)("[number Infinity]"),""):ro(e,(0,Ml.encodeNum)(t));case"string":return ro(e,(0,Ml.encodeStr)(t))}return(0,Ol.throwUnknownDataType)(t)}ar.addValue=Ji});var jl=S(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.decompress=An.decode=An.compress=void 0;var y$=Pl(),Ya=Il(),zl=Bl();function D$(e){let t=(0,zl.makeInMemoryMemory)(),r=(0,zl.addValue)(t,e,void 0);return[(0,zl.memToValues)(t),r]}An.compress=D$;function v$(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],s=Yi(e,o),i=n.length;i-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<i;a++){let u=s[a-2],c=n[a];c=Yi(e,c),r[u]=c}return r}function C$(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let s=0;s<n;s++){let i=r[s+1];i=Yi(e,i),o[s]=i}return o}function Yi(e,t){if(t===""||t==="_")return null;let r=(0,Ya.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,Ya.decodeBool)(n);case"o|":return v$(e,n);case"n|":return(0,Ya.decodeNum)(n);case"a|":return C$(e,n);default:return(0,Ya.decodeStr)(n)}}return(0,y$.throwUnknownDataType)(n)}An.decode=Yi;function w$(e){let[t,r]=e;return Yi(t,r)}An.decompress=w$});var CD=S(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.trimUndefinedRecursively=Bo.trimUndefined=void 0;function b$(e){for(let t in e)e[t]===void 0&&delete e[t]}Bo.trimUndefined=b$;function x$(e){vD(e,new Set)}Bo.trimUndefinedRecursively=x$;function vD(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&vD(n,t)}}});var xD=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.config=gt.trimUndefinedRecursively=gt.trimUndefined=gt.addValue=gt.decode=gt.decompress=gt.compress=void 0;var wD=jl();Object.defineProperty(gt,"compress",{enumerable:!0,get:function(){return wD.compress}});Object.defineProperty(gt,"decompress",{enumerable:!0,get:function(){return wD.decompress}});var S$=jl();Object.defineProperty(gt,"decode",{enumerable:!0,get:function(){return S$.decode}});var E$=Bl();Object.defineProperty(gt,"addValue",{enumerable:!0,get:function(){return E$.addValue}});var bD=CD();Object.defineProperty(gt,"trimUndefined",{enumerable:!0,get:function(){return bD.trimUndefined}});Object.defineProperty(gt,"trimUndefinedRecursively",{enumerable:!0,get:function(){return bD.trimUndefinedRecursively}});var _$=Nl();Object.defineProperty(gt,"config",{enumerable:!0,get:function(){return _$.config}})});var KD=S((IW,qD)=>{"use strict";var UD=require("child_process"),gk=UD.spawn,yk=UD.exec;qD.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},o={};switch(n[e]=[],o[e]=1,process.platform){case"win32":yk("taskkill /pid "+e+" /T /F",r);break;case"darwin":HD(e,n,o,function(){zD(n,t,r)});break;default:VD(e,n,o,function(s){return gk("ps",["-o","pid","--no-headers","--ppid",s])},function(){zD(n,t,r)});break}};function zD(e,t,r){var n={};try{Object.keys(e).forEach(function(o){e[o].forEach(function(s){n[s]||(jD(s,t),n[s]=1)}),n[o]||(jD(o,t),n[o]=1)})}catch(o){if(r)return r(o);throw o}if(r)return r()}function jD(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function VD(e,t,r,n,o){var s=n(e),i="";s.stdout.on("data",function(c){var c=c.toString("ascii");i+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&o();return}i.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,VD(c,t,r,n,o)})};s.on("close",a)}function HD(e,t,r,n){try{let o="";try{o=execSync("pgrep -P "+e,{encoding:"utf8",timeout:2e3,maxBuffer:1024*1024})}catch(i){if(i.status!==1)throw i}delete r[e];let s=o.trim().split(`
15
- `).filter(Boolean);if(s.length===0){Object.keys(r).length===0&&n();return}s.forEach(function(i){let a=parseInt(i,10);isNaN(a)||(t[e].push(a),t[a]=[],r[a]=1,HD(a,t,r,n))})}catch{delete r[e],Object.keys(r).length===0&&n()}}});var cu=S(ur=>{"use strict";ur.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ur.find=(e,t)=>e.nodes.find(r=>r.type===t);ur.exceedsLimit=(e,t,r=1,n)=>n===!1||!ur.isInteger(e)||!ur.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;ur.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};ur.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;ur.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;ur.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ur.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);ur.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let s=n[o];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var lu=S((yZ,QD)=>{"use strict";var YD=cu();QD.exports=(e,t={})=>{let r=(n,o={})=>{let s=t.escapeInvalid&&YD.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||i)&&YD.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var ev=S((DZ,XD)=>{"use strict";XD.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var cv=S((vZ,uv)=>{"use strict";var tv=ev(),no=(e,t,r)=>{if(tv(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(tv(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),s=String(n.shorthand),i=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+o+s+i+a;if(no.cache.hasOwnProperty(u))return no.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let f=e+"|"+t;return n.capture?`(${f})`:n.wrap===!1?f:`(?:${f})`}let p=av(e)||av(t),d={min:e,max:t,a:c,b:l},h=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),c<0){let f=l<0?Math.abs(l):1;m=rv(f,Math.abs(c),d,n),c=d.a=0}return l>=0&&(h=rv(c,l,d,n)),d.negatives=m,d.positives=h,d.result=Sk(m,h,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&h.length+m.length>1&&(d.result=`(?:${d.result})`),no.cache[u]=d,d.result};function Sk(e,t,r){let n=ip(e,t,"-",!1,r)||[],o=ip(t,e,"",!1,r)||[],s=ip(e,t,"-?",!0,r)||[];return n.concat(s).concat(o).join("|")}function Ek(e,t){let r=1,n=1,o=ov(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=ov(e,r);for(o=iv(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=iv(t+1,n)-1;return s=[...s],s.sort(Tk),s}function _k(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Pk(e,t),o=n.length,s="",i=0;for(let a=0;a<o;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=Ak(u,c,r):i++}return i&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function rv(e,t,r,n){let o=Ek(e,t),s=[],i=e,a;for(let u=0;u<o.length;u++){let c=o[u],l=_k(String(i),String(c),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+sv(a.count),i=c+1;continue}r.isPadded&&(p=Fk(c,r,n)),l.string=p+l.pattern+sv(l.count),s.push(l),i=c+1,a=l}return s}function ip(e,t,r,n,o){let s=[];for(let i of e){let{string:a}=i;!n&&!nv(t,"string",a)&&s.push(r+a),n&&nv(t,"string",a)&&s.push(r+a)}return s}function Pk(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function Tk(e,t){return e>t?1:t>e?-1:0}function nv(e,t,r){return e.some(n=>n[t]===r)}function ov(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function iv(e,t){return e-e%Math.pow(10,t)}function sv(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Ak(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function av(e){return/^-?(0+)\d/.test(e)}function Fk(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}no.cache={};no.clearCache=()=>no.cache={};uv.exports=no});var up=S((CZ,gv)=>{"use strict";var Rk=require("util"),pv=cv(),lv=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),$k=e=>t=>e===!0?Number(t):String(t),sp=e=>typeof e=="number"||typeof e=="string"&&e!=="",ns=e=>Number.isInteger(+e),ap=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},kk=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Ik=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},du=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},Nk=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",o="",s="",i;return e.positives.length&&(o=e.positives.map(a=>du(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>du(String(a),r)).join("|")})`),o&&s?i=`${o}|${s}`:i=o||s,t.wrap?`(${n}${i})`:i},dv=(e,t,r,n)=>{if(r)return pv(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let s=String.fromCharCode(t);return`[${o}-${s}]`},fv=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return pv(e,t,r)},mv=(...e)=>new RangeError("Invalid range arguments: "+Rk.inspect(...e)),hv=(e,t,r)=>{if(r.strictRanges===!0)throw mv([e,t]);return[]},Ok=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Mk=(e,t,r=1,n={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(n.strictRanges===!0)throw mv([e,t]);return[]}o===0&&(o=0),s===0&&(s=0);let i=o>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=ap(a)||ap(u)||ap(c),p=l?Math.max(a.length,u.length,c.length):0,d=l===!1&&kk(e,t,n)===!1,h=n.transform||$k(d);if(n.toRegex&&r===1)return dv(du(e,p),du(t,p),!0,n);let m={negatives:[],positives:[]},f=b=>m[b<0?"negatives":"positives"].push(Math.abs(b)),g=[],y=0;for(;i?o>=s:o<=s;)n.toRegex===!0&&r>1?f(o):g.push(Ik(h(o,y),p,d)),o=i?o-r:o+r,y++;return n.toRegex===!0?r>1?Nk(m,n,p):fv(g,null,{wrap:!1,...n}):g},Lk=(e,t,r=1,n={})=>{if(!ns(e)&&e.length>1||!ns(t)&&t.length>1)return hv(e,t,n);let o=n.transform||(d=>String.fromCharCode(d)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,u=Math.min(s,i),c=Math.max(s,i);if(n.toRegex&&r===1)return dv(u,c,!1,n);let l=[],p=0;for(;a?s>=i:s<=i;)l.push(o(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?fv(l,null,{wrap:!1,options:n}):l},pu=(e,t,r,n={})=>{if(t==null&&sp(e))return[e];if(!sp(e)||!sp(t))return hv(e,t,n);if(typeof r=="function")return pu(e,t,1,{transform:r});if(lv(r))return pu(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,ns(r)?ns(e)&&ns(t)?Mk(e,t,r,o):Lk(e,t,Math.max(Math.abs(r),1),o):r!=null&&!lv(r)?Ok(r,o):pu(e,t,1,r)};gv.exports=pu});var vv=S((wZ,Dv)=>{"use strict";var Bk=up(),yv=cu(),zk=(e,t={})=>{let r=(n,o={})=>{let s=yv.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||i===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=yv.reduce(n.nodes),p=Bk(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};Dv.exports=zk});var bv=S((bZ,wv)=>{"use strict";var jk=up(),Cv=lu(),jo=cu(),oo=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?jo.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let s of o)n.push(oo(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?oo(o,s,r):o+s);return jo.flatten(n)},Uk=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,s={})=>{o.queue=[];let i=s,a=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(o.invalid||o.dollar){a.push(oo(a.pop(),Cv(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(oo(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let p=jo.reduce(o.nodes);if(jo.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=jk(...p,t);d.length===0&&(d=Cv(o,t)),a.push(oo(a.pop(),d)),o.nodes=[];return}let u=jo.encloseBrace(o),c=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let p=0;p<o.nodes.length;p++){let d=o.nodes[p];if(d.type==="comma"&&o.type==="brace"){p===1&&c.push(""),c.push("");continue}if(d.type==="close"){a.push(oo(a.pop(),c,u));continue}if(d.value&&d.type!=="open"){c.push(oo(c.pop(),d.value));continue}d.nodes&&n(d,o)}return c};return jo.flatten(n(e))};wv.exports=Uk});var Sv=S((xZ,xv)=>{"use strict";xv.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
16
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Av=S((SZ,Tv)=>{"use strict";var Vk=lu(),{MAX_LENGTH:Ev,CHAR_BACKSLASH:cp,CHAR_BACKTICK:Hk,CHAR_COMMA:qk,CHAR_DOT:Kk,CHAR_LEFT_PARENTHESES:Gk,CHAR_RIGHT_PARENTHESES:Wk,CHAR_LEFT_CURLY_BRACE:Zk,CHAR_RIGHT_CURLY_BRACE:Jk,CHAR_LEFT_SQUARE_BRACKET:_v,CHAR_RIGHT_SQUARE_BRACKET:Pv,CHAR_DOUBLE_QUOTE:Yk,CHAR_SINGLE_QUOTE:Qk,CHAR_NO_BREAK_SPACE:Xk,CHAR_ZERO_WIDTH_NOBREAK_SPACE:eI}=Sv(),tI=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Ev,r.maxLength):Ev;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},s=[o],i=o,a=o,u=0,c=e.length,l=0,p=0,d,h=()=>e[l++],m=f=>{if(f.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&f.type==="text"){a.value+=f.value;return}return i.nodes.push(f),f.parent=i,f.prev=a,a=f,f};for(m({type:"bos"});l<c;)if(i=s[s.length-1],d=h(),!(d===eI||d===Xk)){if(d===cp){m({type:"text",value:(t.keepEscaping?d:"")+h()});continue}if(d===Pv){m({type:"text",value:"\\"+d});continue}if(d===_v){u++;let f;for(;l<c&&(f=h());){if(d+=f,f===_v){u++;continue}if(f===cp){d+=h();continue}if(f===Pv&&(u--,u===0))break}m({type:"text",value:d});continue}if(d===Gk){i=m({type:"paren",nodes:[]}),s.push(i),m({type:"text",value:d});continue}if(d===Wk){if(i.type!=="paren"){m({type:"text",value:d});continue}i=s.pop(),m({type:"text",value:d}),i=s[s.length-1];continue}if(d===Yk||d===Qk||d===Hk){let f=d,g;for(t.keepQuotes!==!0&&(d="");l<c&&(g=h());){if(g===cp){d+=g+h();continue}if(g===f){t.keepQuotes===!0&&(d+=g);break}d+=g}m({type:"text",value:d});continue}if(d===Zk){p++;let g={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||i.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};i=m(g),s.push(i),m({type:"open",value:d});continue}if(d===Jk){if(i.type!=="brace"){m({type:"text",value:d});continue}let f="close";i=s.pop(),i.close=!0,m({type:f,value:d}),p--,i=s[s.length-1];continue}if(d===qk&&p>0){if(i.ranges>0){i.ranges=0;let f=i.nodes.shift();i.nodes=[f,{type:"text",value:Vk(i)}]}m({type:"comma",value:d}),i.commas++;continue}if(d===Kk&&p>0&&i.commas===0){let f=i.nodes;if(p===0||f.length===0){m({type:"text",value:d});continue}if(a.type==="dot"){if(i.range=[],a.value+=d,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){f.pop();let g=f[f.length-1];g.value+=a.value+d,a=g,i.ranges--;continue}m({type:"dot",value:d});continue}m({type:"text",value:d})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(y=>{y.nodes||(y.type==="open"&&(y.isOpen=!0),y.type==="close"&&(y.isClose=!0),y.nodes||(y.type="text"),y.invalid=!0)});let f=s[s.length-1],g=f.nodes.indexOf(i);f.nodes.splice(g,1,...i.nodes)}while(s.length>0);return m({type:"eos"}),o};Tv.exports=tI});var $v=S((EZ,Rv)=>{"use strict";var Fv=lu(),rI=vv(),nI=bv(),oI=Av(),Gt=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=Gt.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(Gt.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Gt.parse=(e,t={})=>oI(e,t);Gt.stringify=(e,t={})=>Fv(typeof e=="string"?Gt.parse(e,t):e,t);Gt.compile=(e,t={})=>(typeof e=="string"&&(e=Gt.parse(e,t)),rI(e,t));Gt.expand=(e,t={})=>{typeof e=="string"&&(e=Gt.parse(e,t));let r=nI(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Gt.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Gt.compile(e,t):Gt.expand(e,t);Rv.exports=Gt});var os=S((_Z,Mv)=>{"use strict";var iI=require("path"),Wr="\\\\/",kv=`[^${Wr}]`,fn="\\.",sI="\\+",aI="\\?",fu="\\/",uI="(?=.)",Iv="[^/]",lp=`(?:${fu}|$)`,Nv=`(?:^|${fu})`,pp=`${fn}{1,2}${lp}`,cI=`(?!${fn})`,lI=`(?!${Nv}${pp})`,pI=`(?!${fn}{0,1}${lp})`,dI=`(?!${pp})`,fI=`[^.${fu}]`,mI=`${Iv}*?`,Ov={DOT_LITERAL:fn,PLUS_LITERAL:sI,QMARK_LITERAL:aI,SLASH_LITERAL:fu,ONE_CHAR:uI,QMARK:Iv,END_ANCHOR:lp,DOTS_SLASH:pp,NO_DOT:cI,NO_DOTS:lI,NO_DOT_SLASH:pI,NO_DOTS_SLASH:dI,QMARK_NO_DOT:fI,STAR:mI,START_ANCHOR:Nv},hI={...Ov,SLASH_LITERAL:`[${Wr}]`,QMARK:kv,STAR:`${kv}*?`,DOTS_SLASH:`${fn}{1,2}(?:[${Wr}]|$)`,NO_DOT:`(?!${fn})`,NO_DOTS:`(?!(?:^|[${Wr}])${fn}{1,2}(?:[${Wr}]|$))`,NO_DOT_SLASH:`(?!${fn}{0,1}(?:[${Wr}]|$))`,NO_DOTS_SLASH:`(?!${fn}{1,2}(?:[${Wr}]|$))`,QMARK_NO_DOT:`[^.${Wr}]`,START_ANCHOR:`(?:^|[${Wr}])`,END_ANCHOR:`(?:[${Wr}]|$)`},gI={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Mv.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:gI,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:iI.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?hI:Ov}}});var is=S(It=>{"use strict";var yI=require("path"),DI=process.platform==="win32",{REGEX_BACKSLASH:vI,REGEX_REMOVE_BACKSLASH:CI,REGEX_SPECIAL_CHARS:wI,REGEX_SPECIAL_CHARS_GLOBAL:bI}=os();It.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);It.hasRegexChars=e=>wI.test(e);It.isRegexChar=e=>e.length===1&&It.hasRegexChars(e);It.escapeRegex=e=>e.replace(bI,"\\$1");It.toPosixSlashes=e=>e.replace(vI,"/");It.removeBackslashes=e=>e.replace(CI,t=>t==="\\"?"":t);It.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};It.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:DI===!0||yI.sep==="\\";It.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?It.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};It.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};It.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",s=`${n}(?:${e})${o}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var qv=S((TZ,Hv)=>{"use strict";var Lv=is(),{CHAR_ASTERISK:dp,CHAR_AT:xI,CHAR_BACKWARD_SLASH:ss,CHAR_COMMA:SI,CHAR_DOT:fp,CHAR_EXCLAMATION_MARK:mp,CHAR_FORWARD_SLASH:Vv,CHAR_LEFT_CURLY_BRACE:hp,CHAR_LEFT_PARENTHESES:gp,CHAR_LEFT_SQUARE_BRACKET:EI,CHAR_PLUS:_I,CHAR_QUESTION_MARK:Bv,CHAR_RIGHT_CURLY_BRACE:PI,CHAR_RIGHT_PARENTHESES:zv,CHAR_RIGHT_SQUARE_BRACKET:TI}=os(),jv=e=>e===Vv||e===ss,Uv=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},AI=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,s=[],i=[],a=[],u=e,c=-1,l=0,p=0,d=!1,h=!1,m=!1,f=!1,g=!1,y=!1,b=!1,w=!1,T=!1,E=!1,F=0,$,I,k={value:"",depth:0,isGlob:!1},R=()=>c>=n,v=()=>u.charCodeAt(c+1),z=()=>($=I,u.charCodeAt(++c));for(;c<n;){I=z();let je;if(I===ss){b=k.backslashes=!0,I=z(),I===hp&&(y=!0);continue}if(y===!0||I===hp){for(F++;R()!==!0&&(I=z());){if(I===ss){b=k.backslashes=!0,z();continue}if(I===hp){F++;continue}if(y!==!0&&I===fp&&(I=z())===fp){if(d=k.isBrace=!0,m=k.isGlob=!0,E=!0,o===!0)continue;break}if(y!==!0&&I===SI){if(d=k.isBrace=!0,m=k.isGlob=!0,E=!0,o===!0)continue;break}if(I===PI&&(F--,F===0)){y=!1,d=k.isBrace=!0,E=!0;break}}if(o===!0)continue;break}if(I===Vv){if(s.push(c),i.push(k),k={value:"",depth:0,isGlob:!1},E===!0)continue;if($===fp&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(I===_I||I===xI||I===dp||I===Bv||I===mp)===!0&&v()===gp){if(m=k.isGlob=!0,f=k.isExtglob=!0,E=!0,I===mp&&c===l&&(T=!0),o===!0){for(;R()!==!0&&(I=z());){if(I===ss){b=k.backslashes=!0,I=z();continue}if(I===zv){m=k.isGlob=!0,E=!0;break}}continue}break}if(I===dp){if($===dp&&(g=k.isGlobstar=!0),m=k.isGlob=!0,E=!0,o===!0)continue;break}if(I===Bv){if(m=k.isGlob=!0,E=!0,o===!0)continue;break}if(I===EI){for(;R()!==!0&&(je=z());){if(je===ss){b=k.backslashes=!0,z();continue}if(je===TI){h=k.isBracket=!0,m=k.isGlob=!0,E=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&I===mp&&c===l){w=k.negated=!0,l++;continue}if(r.noparen!==!0&&I===gp){if(m=k.isGlob=!0,o===!0){for(;R()!==!0&&(I=z());){if(I===gp){b=k.backslashes=!0,I=z();continue}if(I===zv){E=!0;break}}continue}break}if(m===!0){if(E=!0,o===!0)continue;break}}r.noext===!0&&(f=!1,m=!1);let V=u,K="",x="";l>0&&(K=u.slice(0,l),u=u.slice(l),p-=l),V&&m===!0&&p>0?(V=u.slice(0,p),x=u.slice(p)):m===!0?(V="",x=u):V=u,V&&V!==""&&V!=="/"&&V!==u&&jv(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===!0&&(x&&(x=Lv.removeBackslashes(x)),V&&b===!0&&(V=Lv.removeBackslashes(V)));let _={prefix:K,input:e,start:l,base:V,glob:x,isBrace:d,isBracket:h,isGlob:m,isExtglob:f,isGlobstar:g,negated:w,negatedExtglob:T};if(r.tokens===!0&&(_.maxDepth=0,jv(I)||i.push(k),_.tokens=i),r.parts===!0||r.tokens===!0){let je;for(let de=0;de<s.length;de++){let Rr=je?je+1:l,$r=s[de],Vt=e.slice(Rr,$r);r.tokens&&(de===0&&l!==0?(i[de].isPrefix=!0,i[de].value=K):i[de].value=Vt,Uv(i[de]),_.maxDepth+=i[de].depth),(de!==0||Vt!=="")&&a.push(Vt),je=$r}if(je&&je+1<e.length){let de=e.slice(je+1);a.push(de),r.tokens&&(i[i.length-1].value=de,Uv(i[i.length-1]),_.maxDepth+=i[i.length-1].depth)}_.slashes=s,_.parts=a}return _};Hv.exports=AI});var Wv=S((AZ,Gv)=>{"use strict";var mu=os(),Wt=is(),{MAX_LENGTH:hu,POSIX_REGEX_SOURCE:FI,REGEX_NON_SPECIAL_CHARS:RI,REGEX_SPECIAL_CHARS_BACKREF:$I,REPLACEMENTS:Kv}=mu,kI=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>Wt.escapeRegex(o)).join("..")}return r},Uo=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,yp=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Kv[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(hu,r.maxLength):hu,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},i=[s],a=r.capture?"":"?:",u=Wt.isWindows(t),c=mu.globChars(u),l=mu.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:f,NO_DOT:g,NO_DOT_SLASH:y,NO_DOTS_SLASH:b,QMARK:w,QMARK_NO_DOT:T,STAR:E,START_ANCHOR:F}=c,$=L=>`(${a}(?:(?!${F}${L.dot?f:p}).)*?)`,I=r.dot?"":g,k=r.dot?w:T,R=r.bash===!0?$(r):E;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let v={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Wt.removePrefix(e,v),o=e.length;let z=[],V=[],K=[],x=s,_,je=()=>v.index===o-1,de=v.peek=(L=1)=>e[v.index+L],Rr=v.advance=()=>e[++v.index]||"",$r=()=>e.slice(v.index+1),Vt=(L="",Ae=0)=>{v.consumed+=L,v.index+=Ae},ya=L=>{v.output+=L.output!=null?L.output:L.value,Vt(L.value)},eT=()=>{let L=1;for(;de()==="!"&&(de(2)!=="("||de(3)==="?");)Rr(),v.start++,L++;return L%2===0?!1:(v.negated=!0,v.start++,!0)},Da=L=>{v[L]++,K.push(L)},Hn=L=>{v[L]--,K.pop()},ne=L=>{if(x.type==="globstar"){let Ae=v.braces>0&&(L.type==="comma"||L.type==="brace"),O=L.extglob===!0||z.length&&(L.type==="pipe"||L.type==="paren");L.type!=="slash"&&L.type!=="paren"&&!Ae&&!O&&(v.output=v.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=R,v.output+=x.output)}if(z.length&&L.type!=="paren"&&(z[z.length-1].inner+=L.value),(L.value||L.output)&&ya(L),x&&x.type==="text"&&L.type==="text"){x.value+=L.value,x.output=(x.output||"")+L.value;return}L.prev=x,i.push(L),x=L},va=(L,Ae)=>{let O={...l[Ae],conditions:1,inner:""};O.prev=x,O.parens=v.parens,O.output=v.output;let ee=(r.capture?"(":"")+O.open;Da("parens"),ne({type:L,value:Ae,output:v.output?"":m}),ne({type:"paren",extglob:!0,value:Rr(),output:ee}),z.push(O)},tT=L=>{let Ae=L.close+(r.capture?")":""),O;if(L.type==="negate"){let ee=R;if(L.inner&&L.inner.length>1&&L.inner.includes("/")&&(ee=$(r)),(ee!==R||je()||/^\)+$/.test($r()))&&(Ae=L.close=`)$))${ee}`),L.inner.includes("*")&&(O=$r())&&/^\.[^\\/.]+$/.test(O)){let Ue=yp(O,{...t,fastpaths:!1}).output;Ae=L.close=`)${Ue})${ee})`}L.prev.type==="bos"&&(v.negatedExtglob=!0)}ne({type:"paren",extglob:!0,value:_,output:Ae}),Hn("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let L=!1,Ae=e.replace($I,(O,ee,Ue,bt,Ze,Rc)=>bt==="\\"?(L=!0,O):bt==="?"?ee?ee+bt+(Ze?w.repeat(Ze.length):""):Rc===0?k+(Ze?w.repeat(Ze.length):""):w.repeat(Ue.length):bt==="."?p.repeat(Ue.length):bt==="*"?ee?ee+bt+(Ze?R:""):R:ee?O:`\\${O}`);return L===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,O=>O.length%2===0?"\\\\":O?"\\":"")),Ae===e&&r.contains===!0?(v.output=e,v):(v.output=Wt.wrapOutput(Ae,v,t),v)}for(;!je();){if(_=Rr(),_==="\0")continue;if(_==="\\"){let O=de();if(O==="/"&&r.bash!==!0||O==="."||O===";")continue;if(!O){_+="\\",ne({type:"text",value:_});continue}let ee=/^\\+/.exec($r()),Ue=0;if(ee&&ee[0].length>2&&(Ue=ee[0].length,v.index+=Ue,Ue%2!==0&&(_+="\\")),r.unescape===!0?_=Rr():_+=Rr(),v.brackets===0){ne({type:"text",value:_});continue}}if(v.brackets>0&&(_!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&_===":"){let O=x.value.slice(1);if(O.includes("[")&&(x.posix=!0,O.includes(":"))){let ee=x.value.lastIndexOf("["),Ue=x.value.slice(0,ee),bt=x.value.slice(ee+2),Ze=FI[bt];if(Ze){x.value=Ue+Ze,v.backtrack=!0,Rr(),!s.output&&i.indexOf(x)===1&&(s.output=m);continue}}}(_==="["&&de()!==":"||_==="-"&&de()==="]")&&(_=`\\${_}`),_==="]"&&(x.value==="["||x.value==="[^")&&(_=`\\${_}`),r.posix===!0&&_==="!"&&x.value==="["&&(_="^"),x.value+=_,ya({value:_});continue}if(v.quotes===1&&_!=='"'){_=Wt.escapeRegex(_),x.value+=_,ya({value:_});continue}if(_==='"'){v.quotes=v.quotes===1?0:1,r.keepQuotes===!0&&ne({type:"text",value:_});continue}if(_==="("){Da("parens"),ne({type:"paren",value:_});continue}if(_===")"){if(v.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Uo("opening","("));let O=z[z.length-1];if(O&&v.parens===O.parens+1){tT(z.pop());continue}ne({type:"paren",value:_,output:v.parens?")":"\\)"}),Hn("parens");continue}if(_==="["){if(r.nobracket===!0||!$r().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Uo("closing","]"));_=`\\${_}`}else Da("brackets");ne({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){ne({type:"text",value:_,output:`\\${_}`});continue}if(v.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Uo("opening","["));ne({type:"text",value:_,output:`\\${_}`});continue}Hn("brackets");let O=x.value.slice(1);if(x.posix!==!0&&O[0]==="^"&&!O.includes("/")&&(_=`/${_}`),x.value+=_,ya({value:_}),r.literalBrackets===!1||Wt.hasRegexChars(O))continue;let ee=Wt.escapeRegex(x.value);if(v.output=v.output.slice(0,-x.value.length),r.literalBrackets===!0){v.output+=ee,x.value=ee;continue}x.value=`(${a}${ee}|${x.value})`,v.output+=x.value;continue}if(_==="{"&&r.nobrace!==!0){Da("braces");let O={type:"brace",value:_,output:"(",outputIndex:v.output.length,tokensIndex:v.tokens.length};V.push(O),ne(O);continue}if(_==="}"){let O=V[V.length-1];if(r.nobrace===!0||!O){ne({type:"text",value:_,output:_});continue}let ee=")";if(O.dots===!0){let Ue=i.slice(),bt=[];for(let Ze=Ue.length-1;Ze>=0&&(i.pop(),Ue[Ze].type!=="brace");Ze--)Ue[Ze].type!=="dots"&&bt.unshift(Ue[Ze].value);ee=kI(bt,r),v.backtrack=!0}if(O.comma!==!0&&O.dots!==!0){let Ue=v.output.slice(0,O.outputIndex),bt=v.tokens.slice(O.tokensIndex);O.value=O.output="\\{",_=ee="\\}",v.output=Ue;for(let Ze of bt)v.output+=Ze.output||Ze.value}ne({type:"brace",value:_,output:ee}),Hn("braces"),V.pop();continue}if(_==="|"){z.length>0&&z[z.length-1].conditions++,ne({type:"text",value:_});continue}if(_===","){let O=_,ee=V[V.length-1];ee&&K[K.length-1]==="braces"&&(ee.comma=!0,O="|"),ne({type:"comma",value:_,output:O});continue}if(_==="/"){if(x.type==="dot"&&v.index===v.start+1){v.start=v.index+1,v.consumed="",v.output="",i.pop(),x=s;continue}ne({type:"slash",value:_,output:h});continue}if(_==="."){if(v.braces>0&&x.type==="dot"){x.value==="."&&(x.output=p);let O=V[V.length-1];x.type="dots",x.output+=_,x.value+=_,O.dots=!0;continue}if(v.braces+v.parens===0&&x.type!=="bos"&&x.type!=="slash"){ne({type:"text",value:_,output:p});continue}ne({type:"dot",value:_,output:p});continue}if(_==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&de()==="("&&de(2)!=="?"){va("qmark",_);continue}if(x&&x.type==="paren"){let ee=de(),Ue=_;if(ee==="<"&&!Wt.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(ee)||ee==="<"&&!/<([!=]|\w+>)/.test($r()))&&(Ue=`\\${_}`),ne({type:"text",value:_,output:Ue});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){ne({type:"qmark",value:_,output:T});continue}ne({type:"qmark",value:_,output:w});continue}if(_==="!"){if(r.noextglob!==!0&&de()==="("&&(de(2)!=="?"||!/[!=<:]/.test(de(3)))){va("negate",_);continue}if(r.nonegate!==!0&&v.index===0){eT();continue}}if(_==="+"){if(r.noextglob!==!0&&de()==="("&&de(2)!=="?"){va("plus",_);continue}if(x&&x.value==="("||r.regex===!1){ne({type:"plus",value:_,output:d});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||v.parens>0){ne({type:"plus",value:_});continue}ne({type:"plus",value:d});continue}if(_==="@"){if(r.noextglob!==!0&&de()==="("&&de(2)!=="?"){ne({type:"at",extglob:!0,value:_,output:""});continue}ne({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let O=RI.exec($r());O&&(_+=O[0],v.index+=O[0].length),ne({type:"text",value:_});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=_,x.output=R,v.backtrack=!0,v.globstar=!0,Vt(_);continue}let L=$r();if(r.noextglob!==!0&&/^\([^?]/.test(L)){va("star",_);continue}if(x.type==="star"){if(r.noglobstar===!0){Vt(_);continue}let O=x.prev,ee=O.prev,Ue=O.type==="slash"||O.type==="bos",bt=ee&&(ee.type==="star"||ee.type==="globstar");if(r.bash===!0&&(!Ue||L[0]&&L[0]!=="/")){ne({type:"star",value:_,output:""});continue}let Ze=v.braces>0&&(O.type==="comma"||O.type==="brace"),Rc=z.length&&(O.type==="pipe"||O.type==="paren");if(!Ue&&O.type!=="paren"&&!Ze&&!Rc){ne({type:"star",value:_,output:""});continue}for(;L.slice(0,3)==="/**";){let Ca=e[v.index+4];if(Ca&&Ca!=="/")break;L=L.slice(3),Vt("/**",3)}if(O.type==="bos"&&je()){x.type="globstar",x.value+=_,x.output=$(r),v.output=x.output,v.globstar=!0,Vt(_);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&!bt&&je()){v.output=v.output.slice(0,-(O.output+x.output).length),O.output=`(?:${O.output}`,x.type="globstar",x.output=$(r)+(r.strictSlashes?")":"|$)"),x.value+=_,v.globstar=!0,v.output+=O.output+x.output,Vt(_);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&L[0]==="/"){let Ca=L[1]!==void 0?"|$":"";v.output=v.output.slice(0,-(O.output+x.output).length),O.output=`(?:${O.output}`,x.type="globstar",x.output=`${$(r)}${h}|${h}${Ca})`,x.value+=_,v.output+=O.output+x.output,v.globstar=!0,Vt(_+Rr()),ne({type:"slash",value:"/",output:""});continue}if(O.type==="bos"&&L[0]==="/"){x.type="globstar",x.value+=_,x.output=`(?:^|${h}|${$(r)}${h})`,v.output=x.output,v.globstar=!0,Vt(_+Rr()),ne({type:"slash",value:"/",output:""});continue}v.output=v.output.slice(0,-x.output.length),x.type="globstar",x.output=$(r),x.value+=_,v.output+=x.output,v.globstar=!0,Vt(_);continue}let Ae={type:"star",value:_,output:R};if(r.bash===!0){Ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(Ae.output=I+Ae.output),ne(Ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){Ae.output=_,ne(Ae);continue}(v.index===v.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(v.output+=y,x.output+=y):r.dot===!0?(v.output+=b,x.output+=b):(v.output+=I,x.output+=I),de()!=="*"&&(v.output+=m,x.output+=m)),ne(Ae)}for(;v.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Uo("closing","]"));v.output=Wt.escapeLast(v.output,"["),Hn("brackets")}for(;v.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Uo("closing",")"));v.output=Wt.escapeLast(v.output,"("),Hn("parens")}for(;v.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Uo("closing","}"));v.output=Wt.escapeLast(v.output,"{"),Hn("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&ne({type:"maybe_slash",value:"",output:`${h}?`}),v.backtrack===!0){v.output="";for(let L of v.tokens)v.output+=L.output!=null?L.output:L.value,L.suffix&&(v.output+=L.suffix)}return v};yp.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(hu,r.maxLength):hu,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=Kv[e]||e;let s=Wt.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=mu.globChars(s),f=r.dot?p:l,g=r.dot?d:l,y=r.capture?"":"?:",b={negated:!1,prefix:""},w=r.bash===!0?".*?":h;r.capture&&(w=`(${w})`);let T=I=>I.noglobstar===!0?w:`(${y}(?:(?!${m}${I.dot?c:i}).)*?)`,E=I=>{switch(I){case"*":return`${f}${u}${w}`;case".*":return`${i}${u}${w}`;case"*.*":return`${f}${w}${i}${u}${w}`;case"*/*":return`${f}${w}${a}${u}${g}${w}`;case"**":return f+T(r);case"**/*":return`(?:${f}${T(r)}${a})?${g}${u}${w}`;case"**/*.*":return`(?:${f}${T(r)}${a})?${g}${w}${i}${u}${w}`;case"**/.*":return`(?:${f}${T(r)}${a})?${i}${u}${w}`;default:{let k=/^(.*?)\.(\w+)$/.exec(I);if(!k)return;let R=E(k[1]);return R?R+i+k[2]:void 0}}},F=Wt.removePrefix(e,b),$=E(F);return $&&r.strictSlashes!==!0&&($+=`${a}?`),$};Gv.exports=yp});var Jv=S((FZ,Zv)=>{"use strict";var II=require("path"),NI=qv(),Dp=Wv(),vp=is(),OI=os(),MI=e=>e&&typeof e=="object"&&!Array.isArray(e),qe=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>qe(d,t,r));return d=>{for(let h of l){let m=h(d);if(m)return m}return!1}}let n=MI(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},s=vp.isWindows(t),i=n?qe.compileRe(e,t):qe.makeRe(e,t,!1,!0),a=i.state;delete i.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=qe(o.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:d,match:h,output:m}=qe.test(l,i,t,{glob:e,posix:s}),f={glob:e,state:a,regex:i,posix:s,input:l,output:m,match:h,isMatch:d};return typeof o.onResult=="function"&&o.onResult(f),d===!1?(f.isMatch=!1,p?f:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(f),f.isMatch=!1,p?f:!1):(typeof o.onMatch=="function"&&o.onMatch(f),p?f:!0)};return r&&(c.state=a),c};qe.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},i=s.format||(o?vp.toPosixSlashes:null),a=e===n,u=a&&i?i(e):e;return a===!1&&(u=i?i(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=qe.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};qe.matchBase=(e,t,r,n=vp.isWindows(r))=>(t instanceof RegExp?t:qe.makeRe(t,r)).test(II.basename(e));qe.isMatch=(e,t,r)=>qe(t,r)(e);qe.parse=(e,t)=>Array.isArray(e)?e.map(r=>qe.parse(r,t)):Dp(e,{...t,fastpaths:!1});qe.scan=(e,t)=>NI(e,t);qe.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},s=o.contains?"":"^",i=o.contains?"":"$",a=`${s}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=qe.toRegex(a,t);return n===!0&&(u.state=e),u};qe.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Dp.fastpaths(e,t)),o.output||(o=Dp(e,t)),qe.compileRe(o,t,r,n)};qe.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};qe.constants=OI;Zv.exports=qe});var Qv=S((RZ,Yv)=>{"use strict";Yv.exports=Jv()});var wp=S(($Z,nC)=>{"use strict";var eC=require("util"),tC=$v(),Zr=Qv(),Cp=is(),Xv=e=>e===""||e==="./",rC=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},$e=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,s=new Set,i=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=Zr(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&i++;for(let h of e){let m=p(h,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),o.add(m.output)))}}let c=(i===t.length?[...s]:[...o]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};$e.match=$e;$e.matcher=(e,t)=>Zr(e,t);$e.isMatch=(e,t,r)=>Zr(t,r)(e);$e.any=$e.isMatch;$e.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],s=a=>{r.onResult&&r.onResult(a),o.push(a.output)},i=new Set($e(e,t,{...r,onResult:s}));for(let a of o)i.has(a)||n.add(a);return[...n]};$e.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${eC.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>$e.contains(e,n,r));if(typeof t=="string"){if(Xv(e)||Xv(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return $e.isMatch(e,t,{...r,contains:!0})};$e.matchKeys=(e,t,r)=>{if(!Cp.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=$e(Object.keys(e),t,r),o={};for(let s of n)o[s]=e[s];return o};$e.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Zr(String(o),r);if(n.some(i=>s(i)))return!0}return!1};$e.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Zr(String(o),r);if(!n.every(i=>s(i)))return!1}return!0};$e.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${eC.inspect(e)}"`);return[].concat(t).every(n=>Zr(n,r)(e))};$e.capture=(e,t,r)=>{let n=Cp.isWindows(r),s=Zr.makeRe(String(e),{...r,capture:!0}).exec(n?Cp.toPosixSlashes(t):t);if(s)return s.slice(1).map(i=>i===void 0?"":i)};$e.makeRe=(...e)=>Zr.makeRe(...e);$e.scan=(...e)=>Zr.scan(...e);$e.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of tC(String(n),t))r.push(Zr.parse(o,t));return r};$e.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!rC(e)?[e]:tC(e,t)};$e.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return $e.braces(e,{...t,expand:!0})};$e.hasBraces=rC;nC.exports=$e});var iC=S((GZ,oC)=>{var Vo=1e3,Ho=Vo*60,qo=Ho*60,io=qo*24,jI=io*7,UI=io*365.25;oC.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return VI(e);if(r==="number"&&isFinite(e))return t.long?qI(e):HI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function VI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*UI;case"weeks":case"week":case"w":return r*jI;case"days":case"day":case"d":return r*io;case"hours":case"hour":case"hrs":case"hr":case"h":return r*qo;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ho;case"seconds":case"second":case"secs":case"sec":case"s":return r*Vo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function HI(e){var t=Math.abs(e);return t>=io?Math.round(e/io)+"d":t>=qo?Math.round(e/qo)+"h":t>=Ho?Math.round(e/Ho)+"m":t>=Vo?Math.round(e/Vo)+"s":e+"ms"}function qI(e){var t=Math.abs(e);return t>=io?gu(e,t,io,"day"):t>=qo?gu(e,t,qo,"hour"):t>=Ho?gu(e,t,Ho,"minute"):t>=Vo?gu(e,t,Vo,"second"):e+" ms"}function gu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var bp=S((WZ,sC)=>{function KI(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=a,r.humanize=iC(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,h,m;function f(...g){if(!f.enabled)return;let y=f,b=Number(new Date),w=b-(p||b);y.diff=w,y.prev=p,y.curr=b,p=b,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let T=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(F,$)=>{if(F==="%%")return"%";T++;let I=r.formatters[$];if(typeof I=="function"){let k=g[T];F=I.call(y,k),g.splice(T,1),T--}return F}),r.formatArgs.call(y,g),(y.log||r.log).apply(y,g)}return f.namespace=l,f.useColors=r.useColors(),f.color=r.selectColor(l),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,m=r.enabled(l)),m),set:g=>{d=g}}),typeof r.init=="function"&&r.init(f),f}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,h=0,m=-1,f=0;for(;d<l.length;)if(h<p.length&&(p[h]===l[d]||p[h]==="*"))p[h]==="*"?(m=h,f=d,h++):(d++,h++);else if(m!==-1)h=m+1,f++,d=f;else return!1;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function i(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}sC.exports=KI});var aC=S((Nt,yu)=>{Nt.formatArgs=WI;Nt.save=ZI;Nt.load=JI;Nt.useColors=GI;Nt.storage=YI();Nt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Nt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function GI(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function WI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+yu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Nt.log=console.debug||console.log||(()=>{});function ZI(e){try{e?Nt.storage.setItem("debug",e):Nt.storage.removeItem("debug")}catch{}}function JI(){let e;try{e=Nt.storage.getItem("debug")||Nt.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function YI(){try{return localStorage}catch{}}yu.exports=bp()(Nt);var{formatters:QI}=yu.exports;QI.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var cC=S((ZZ,uC)=>{"use strict";uC.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var dC=S((JZ,pC)=>{"use strict";var XI=require("os"),lC=require("tty"),cr=cC(),{env:nt}=process,kn;cr("no-color")||cr("no-colors")||cr("color=false")||cr("color=never")?kn=0:(cr("color")||cr("colors")||cr("color=true")||cr("color=always"))&&(kn=1);"FORCE_COLOR"in nt&&(nt.FORCE_COLOR==="true"?kn=1:nt.FORCE_COLOR==="false"?kn=0:kn=nt.FORCE_COLOR.length===0?1:Math.min(parseInt(nt.FORCE_COLOR,10),3));function xp(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Sp(e,t){if(kn===0)return 0;if(cr("color=16m")||cr("color=full")||cr("color=truecolor"))return 3;if(cr("color=256"))return 2;if(e&&!t&&kn===void 0)return 0;let r=kn||0;if(nt.TERM==="dumb")return r;if(process.platform==="win32"){let n=XI.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in nt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in nt)||nt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in nt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(nt.TEAMCITY_VERSION)?1:0;if(nt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in nt){let n=parseInt((nt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(nt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(nt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(nt.TERM)||"COLORTERM"in nt?1:r}function e1(e){let t=Sp(e,e&&e.isTTY);return xp(t)}pC.exports={supportsColor:e1,stdout:xp(Sp(!0,lC.isatty(1))),stderr:xp(Sp(!0,lC.isatty(2)))}});var mC=S((ot,vu)=>{var t1=require("tty"),Du=require("util");ot.init=u1;ot.log=i1;ot.formatArgs=n1;ot.save=s1;ot.load=a1;ot.useColors=r1;ot.destroy=Du.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ot.colors=[6,2,3,4,5,1];try{let e=dC();e&&(e.stderr||e).level>=2&&(ot.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ot.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function r1(){return"colors"in ot.inspectOpts?!!ot.inspectOpts.colors:t1.isatty(process.stderr.fd)}function n1(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
14
+ `+g+"]"}return o.pop(),s=g,b}}});var Zy=S((oH,Wy)=>{var FR=qy(),RR=Gy(),$R={parse:FR,stringify:RR};Wy.exports=$R});var Pl=S(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.throwUnsupportedData=An.throwUnknownDataType=An.getType=void 0;function pD(e){return Object.prototype.toString.call(e)}An.getType=pD;function o$(e){throw new TypeError("unsupported data type: "+pD(e))}An.throwUnknownDataType=o$;function i$(e){throw new TypeError("unsupported data type: "+e)}An.throwUnsupportedData=i$});var $l=S(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.s_to_num=mt.int_str_to_s=mt.num_to_s=mt.big_int_to_s=mt.int_to_s=mt.s_to_big_int=mt.s_to_int=void 0;var ln="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);ln+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);ln+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);ln+=t}var Lo=ln.length,Al={};for(let e=0;e<Lo;e++){let t=ln[e];Al[t]=e}function Fl(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],s=Al[o];s*=r,t+=s,r*=Lo}return t}mt.s_to_int=Fl;function dD(e){let t=BigInt(0),r=BigInt(1),n=BigInt(Lo);for(let o=e.length-1;o>=0;o--){let s=e[o],i=BigInt(Al[s]);i*=r,t+=i,r*=n}return t}mt.s_to_big_int=dD;function Rl(e){if(e===0)return ln[0];let t=[];for(;e!==0;){let r=e%Lo,n=ln[r];t.push(n),e-=r,e/=Lo}return t.reverse().join("")}mt.int_to_s=Rl;function fD(e){let t=BigInt(0),r=BigInt(Lo);if(e===t)return ln[0];let n=[];for(;e!==t;){let o=e%r,s=ln[Number(o)];n.push(s),e/=r}return n.reverse().join("")}mt.big_int_to_s=fD;function mD(e){return e.split("").reverse().join("")}function hD(e){if(e<0)return"-"+hD(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,i]=t.split("e");t=s,r="0e"+i}else return Rl(e);let n;r&&([r,n]=r.split("e")),t=Za(t),r=mD(r),r=Za(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=Za(n),o+=n}return o}mt.num_to_s=hD;function Za(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?Rl(t):":"+fD(BigInt(e))}mt.int_str_to_s=Za;function Tl(e){return e[0]===":"?dD(e.substring(1)).toString():Fl(e).toString()}function gD(e){if(e[0]==="-")return-gD(e.substr(1));let[t,r,n]=e.split(".");if(!r)return Fl(t);t=Tl(t),r=Tl(r),r=mD(r);let o=t+"."+r;if(n){o+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=Tl(n),o+=s?-n:+n}return+o}mt.s_to_num=gD});var Il=S(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.decodeStr=ht.encodeStr=ht.decodeBool=ht.encodeBool=ht.decodeKey=ht.decodeNum=ht.encodeNum=void 0;var kl=$l();function s$(e){return"n|"+(0,kl.num_to_s)(e)}ht.encodeNum=s$;function a$(e){return e=e.replace("n|",""),(0,kl.s_to_num)(e)}ht.decodeNum=a$;function u$(e){return typeof e=="number"?e:(0,kl.s_to_int)(e)}ht.decodeKey=u$;function c$(e){return e?"b|T":"b|F"}ht.encodeBool=c$;function l$(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}ht.decodeBool=l$;function p$(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}ht.encodeStr=p$;function d$(e){return e[0]+e[1]==="s|"?e.substr(2):e}ht.decodeStr=d$});var Nl=S(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.config=void 0;Ja.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var Bl=S(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.addValue=ar.makeInMemoryMemory=ar.makeInMemoryCache=ar.makeInMemoryStore=ar.memToValues=void 0;var Ll=Nl(),Ol=Pl(),Ml=Il(),f$=$l();function m$(e){return e.store.toArray()}ar.memToValues=m$;function yD(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}ar.makeInMemoryStore=yD;function DD(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}ar.makeInMemoryCache=DD;function h$(){return{store:yD(),cache:DD(),keyCount:0}}ar.makeInMemoryMemory=h$;function ro(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,f$.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function g$(e,t){Ll.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=Ji(e,t,void 0);return e.cache.setSchema(r,n),n}function Ji(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return Ji(e,null,r);break;case"object":if(t===null)return ro(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let s=t[o],i=s===null?"_":Ji(e,s,t);n+="|"+i}return n==="a"&&(n="a|"),ro(e,n)}else{let n=Object.keys(t);if(n.length===0)return ro(e,"o|");let o="o",s=g$(e,n);o+="|"+s;for(let i of n){let a=t[i],u=Ji(e,a,t);o+="|"+u}return ro(e,o)}case"boolean":return ro(e,(0,Ml.encodeBool)(t));case"number":return Number.isNaN(t)?(Ll.config.error_on_nan&&(0,Ol.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(Ll.config.error_on_infinite&&(0,Ol.throwUnsupportedData)("[number Infinity]"),""):ro(e,(0,Ml.encodeNum)(t));case"string":return ro(e,(0,Ml.encodeStr)(t))}return(0,Ol.throwUnknownDataType)(t)}ar.addValue=Ji});var jl=S(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.decompress=Fn.decode=Fn.compress=void 0;var y$=Pl(),Ya=Il(),zl=Bl();function D$(e){let t=(0,zl.makeInMemoryMemory)(),r=(0,zl.addValue)(t,e,void 0);return[(0,zl.memToValues)(t),r]}Fn.compress=D$;function v$(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],s=Yi(e,o),i=n.length;i-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<i;a++){let u=s[a-2],c=n[a];c=Yi(e,c),r[u]=c}return r}function C$(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let s=0;s<n;s++){let i=r[s+1];i=Yi(e,i),o[s]=i}return o}function Yi(e,t){if(t===""||t==="_")return null;let r=(0,Ya.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,Ya.decodeBool)(n);case"o|":return v$(e,n);case"n|":return(0,Ya.decodeNum)(n);case"a|":return C$(e,n);default:return(0,Ya.decodeStr)(n)}}return(0,y$.throwUnknownDataType)(n)}Fn.decode=Yi;function w$(e){let[t,r]=e;return Yi(t,r)}Fn.decompress=w$});var CD=S(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.trimUndefinedRecursively=Bo.trimUndefined=void 0;function b$(e){for(let t in e)e[t]===void 0&&delete e[t]}Bo.trimUndefined=b$;function x$(e){vD(e,new Set)}Bo.trimUndefinedRecursively=x$;function vD(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&vD(n,t)}}});var xD=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.config=gt.trimUndefinedRecursively=gt.trimUndefined=gt.addValue=gt.decode=gt.decompress=gt.compress=void 0;var wD=jl();Object.defineProperty(gt,"compress",{enumerable:!0,get:function(){return wD.compress}});Object.defineProperty(gt,"decompress",{enumerable:!0,get:function(){return wD.decompress}});var S$=jl();Object.defineProperty(gt,"decode",{enumerable:!0,get:function(){return S$.decode}});var E$=Bl();Object.defineProperty(gt,"addValue",{enumerable:!0,get:function(){return E$.addValue}});var bD=CD();Object.defineProperty(gt,"trimUndefined",{enumerable:!0,get:function(){return bD.trimUndefined}});Object.defineProperty(gt,"trimUndefinedRecursively",{enumerable:!0,get:function(){return bD.trimUndefinedRecursively}});var _$=Nl();Object.defineProperty(gt,"config",{enumerable:!0,get:function(){return _$.config}})});var KD=S((NW,qD)=>{"use strict";var UD=require("child_process"),gk=UD.spawn,yk=UD.exec;qD.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},o={};switch(n[e]=[],o[e]=1,process.platform){case"win32":yk("taskkill /pid "+e+" /T /F",r);break;case"darwin":HD(e,n,o,function(){zD(n,t,r)});break;default:VD(e,n,o,function(s){return gk("ps",["-o","pid","--no-headers","--ppid",s])},function(){zD(n,t,r)});break}};function zD(e,t,r){var n={};try{Object.keys(e).forEach(function(o){e[o].forEach(function(s){n[s]||(jD(s,t),n[s]=1)}),n[o]||(jD(o,t),n[o]=1)})}catch(o){if(r)return r(o);throw o}if(r)return r()}function jD(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function VD(e,t,r,n,o){var s=n(e),i="";s.stdout.on("data",function(c){var c=c.toString("ascii");i+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&o();return}i.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,VD(c,t,r,n,o)})};s.on("close",a)}function HD(e,t,r,n){try{let o="";try{o=execSync("pgrep -P "+e,{encoding:"utf8",timeout:2e3,maxBuffer:1024*1024})}catch(i){if(i.status!==1)throw i}delete r[e];let s=o.trim().split(`
15
+ `).filter(Boolean);if(s.length===0){Object.keys(r).length===0&&n();return}s.forEach(function(i){let a=parseInt(i,10);isNaN(a)||(t[e].push(a),t[a]=[],r[a]=1,HD(a,t,r,n))})}catch{delete r[e],Object.keys(r).length===0&&n()}}});var cu=S(ur=>{"use strict";ur.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ur.find=(e,t)=>e.nodes.find(r=>r.type===t);ur.exceedsLimit=(e,t,r=1,n)=>n===!1||!ur.isInteger(e)||!ur.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;ur.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};ur.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;ur.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;ur.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ur.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);ur.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let s=n[o];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var lu=S((DZ,QD)=>{"use strict";var YD=cu();QD.exports=(e,t={})=>{let r=(n,o={})=>{let s=t.escapeInvalid&&YD.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||i)&&YD.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var ev=S((vZ,XD)=>{"use strict";XD.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var cv=S((CZ,uv)=>{"use strict";var tv=ev(),no=(e,t,r)=>{if(tv(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(tv(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),s=String(n.shorthand),i=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+o+s+i+a;if(no.cache.hasOwnProperty(u))return no.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let f=e+"|"+t;return n.capture?`(${f})`:n.wrap===!1?f:`(?:${f})`}let p=av(e)||av(t),d={min:e,max:t,a:c,b:l},h=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),c<0){let f=l<0?Math.abs(l):1;m=rv(f,Math.abs(c),d,n),c=d.a=0}return l>=0&&(h=rv(c,l,d,n)),d.negatives=m,d.positives=h,d.result=Sk(m,h,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&h.length+m.length>1&&(d.result=`(?:${d.result})`),no.cache[u]=d,d.result};function Sk(e,t,r){let n=ip(e,t,"-",!1,r)||[],o=ip(t,e,"",!1,r)||[],s=ip(e,t,"-?",!0,r)||[];return n.concat(s).concat(o).join("|")}function Ek(e,t){let r=1,n=1,o=ov(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=ov(e,r);for(o=iv(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=iv(t+1,n)-1;return s=[...s],s.sort(Tk),s}function _k(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Pk(e,t),o=n.length,s="",i=0;for(let a=0;a<o;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=Ak(u,c,r):i++}return i&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function rv(e,t,r,n){let o=Ek(e,t),s=[],i=e,a;for(let u=0;u<o.length;u++){let c=o[u],l=_k(String(i),String(c),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+sv(a.count),i=c+1;continue}r.isPadded&&(p=Fk(c,r,n)),l.string=p+l.pattern+sv(l.count),s.push(l),i=c+1,a=l}return s}function ip(e,t,r,n,o){let s=[];for(let i of e){let{string:a}=i;!n&&!nv(t,"string",a)&&s.push(r+a),n&&nv(t,"string",a)&&s.push(r+a)}return s}function Pk(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function Tk(e,t){return e>t?1:t>e?-1:0}function nv(e,t,r){return e.some(n=>n[t]===r)}function ov(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function iv(e,t){return e-e%Math.pow(10,t)}function sv(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Ak(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function av(e){return/^-?(0+)\d/.test(e)}function Fk(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}no.cache={};no.clearCache=()=>no.cache={};uv.exports=no});var up=S((wZ,gv)=>{"use strict";var Rk=require("util"),pv=cv(),lv=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),$k=e=>t=>e===!0?Number(t):String(t),sp=e=>typeof e=="number"||typeof e=="string"&&e!=="",ns=e=>Number.isInteger(+e),ap=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},kk=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Ik=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},du=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},Nk=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",o="",s="",i;return e.positives.length&&(o=e.positives.map(a=>du(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>du(String(a),r)).join("|")})`),o&&s?i=`${o}|${s}`:i=o||s,t.wrap?`(${n}${i})`:i},dv=(e,t,r,n)=>{if(r)return pv(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let s=String.fromCharCode(t);return`[${o}-${s}]`},fv=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return pv(e,t,r)},mv=(...e)=>new RangeError("Invalid range arguments: "+Rk.inspect(...e)),hv=(e,t,r)=>{if(r.strictRanges===!0)throw mv([e,t]);return[]},Ok=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Mk=(e,t,r=1,n={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(n.strictRanges===!0)throw mv([e,t]);return[]}o===0&&(o=0),s===0&&(s=0);let i=o>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=ap(a)||ap(u)||ap(c),p=l?Math.max(a.length,u.length,c.length):0,d=l===!1&&kk(e,t,n)===!1,h=n.transform||$k(d);if(n.toRegex&&r===1)return dv(du(e,p),du(t,p),!0,n);let m={negatives:[],positives:[]},f=b=>m[b<0?"negatives":"positives"].push(Math.abs(b)),g=[],y=0;for(;i?o>=s:o<=s;)n.toRegex===!0&&r>1?f(o):g.push(Ik(h(o,y),p,d)),o=i?o-r:o+r,y++;return n.toRegex===!0?r>1?Nk(m,n,p):fv(g,null,{wrap:!1,...n}):g},Lk=(e,t,r=1,n={})=>{if(!ns(e)&&e.length>1||!ns(t)&&t.length>1)return hv(e,t,n);let o=n.transform||(d=>String.fromCharCode(d)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,u=Math.min(s,i),c=Math.max(s,i);if(n.toRegex&&r===1)return dv(u,c,!1,n);let l=[],p=0;for(;a?s>=i:s<=i;)l.push(o(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?fv(l,null,{wrap:!1,options:n}):l},pu=(e,t,r,n={})=>{if(t==null&&sp(e))return[e];if(!sp(e)||!sp(t))return hv(e,t,n);if(typeof r=="function")return pu(e,t,1,{transform:r});if(lv(r))return pu(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,ns(r)?ns(e)&&ns(t)?Mk(e,t,r,o):Lk(e,t,Math.max(Math.abs(r),1),o):r!=null&&!lv(r)?Ok(r,o):pu(e,t,1,r)};gv.exports=pu});var vv=S((bZ,Dv)=>{"use strict";var Bk=up(),yv=cu(),zk=(e,t={})=>{let r=(n,o={})=>{let s=yv.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||i===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=yv.reduce(n.nodes),p=Bk(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};Dv.exports=zk});var bv=S((xZ,wv)=>{"use strict";var jk=up(),Cv=lu(),jo=cu(),oo=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?jo.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let s of o)n.push(oo(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?oo(o,s,r):o+s);return jo.flatten(n)},Uk=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,s={})=>{o.queue=[];let i=s,a=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(o.invalid||o.dollar){a.push(oo(a.pop(),Cv(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(oo(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let p=jo.reduce(o.nodes);if(jo.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=jk(...p,t);d.length===0&&(d=Cv(o,t)),a.push(oo(a.pop(),d)),o.nodes=[];return}let u=jo.encloseBrace(o),c=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let p=0;p<o.nodes.length;p++){let d=o.nodes[p];if(d.type==="comma"&&o.type==="brace"){p===1&&c.push(""),c.push("");continue}if(d.type==="close"){a.push(oo(a.pop(),c,u));continue}if(d.value&&d.type!=="open"){c.push(oo(c.pop(),d.value));continue}d.nodes&&n(d,o)}return c};return jo.flatten(n(e))};wv.exports=Uk});var Sv=S((SZ,xv)=>{"use strict";xv.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
16
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Av=S((EZ,Tv)=>{"use strict";var Vk=lu(),{MAX_LENGTH:Ev,CHAR_BACKSLASH:cp,CHAR_BACKTICK:Hk,CHAR_COMMA:qk,CHAR_DOT:Kk,CHAR_LEFT_PARENTHESES:Gk,CHAR_RIGHT_PARENTHESES:Wk,CHAR_LEFT_CURLY_BRACE:Zk,CHAR_RIGHT_CURLY_BRACE:Jk,CHAR_LEFT_SQUARE_BRACKET:_v,CHAR_RIGHT_SQUARE_BRACKET:Pv,CHAR_DOUBLE_QUOTE:Yk,CHAR_SINGLE_QUOTE:Qk,CHAR_NO_BREAK_SPACE:Xk,CHAR_ZERO_WIDTH_NOBREAK_SPACE:eI}=Sv(),tI=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Ev,r.maxLength):Ev;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},s=[o],i=o,a=o,u=0,c=e.length,l=0,p=0,d,h=()=>e[l++],m=f=>{if(f.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&f.type==="text"){a.value+=f.value;return}return i.nodes.push(f),f.parent=i,f.prev=a,a=f,f};for(m({type:"bos"});l<c;)if(i=s[s.length-1],d=h(),!(d===eI||d===Xk)){if(d===cp){m({type:"text",value:(t.keepEscaping?d:"")+h()});continue}if(d===Pv){m({type:"text",value:"\\"+d});continue}if(d===_v){u++;let f;for(;l<c&&(f=h());){if(d+=f,f===_v){u++;continue}if(f===cp){d+=h();continue}if(f===Pv&&(u--,u===0))break}m({type:"text",value:d});continue}if(d===Gk){i=m({type:"paren",nodes:[]}),s.push(i),m({type:"text",value:d});continue}if(d===Wk){if(i.type!=="paren"){m({type:"text",value:d});continue}i=s.pop(),m({type:"text",value:d}),i=s[s.length-1];continue}if(d===Yk||d===Qk||d===Hk){let f=d,g;for(t.keepQuotes!==!0&&(d="");l<c&&(g=h());){if(g===cp){d+=g+h();continue}if(g===f){t.keepQuotes===!0&&(d+=g);break}d+=g}m({type:"text",value:d});continue}if(d===Zk){p++;let g={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||i.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};i=m(g),s.push(i),m({type:"open",value:d});continue}if(d===Jk){if(i.type!=="brace"){m({type:"text",value:d});continue}let f="close";i=s.pop(),i.close=!0,m({type:f,value:d}),p--,i=s[s.length-1];continue}if(d===qk&&p>0){if(i.ranges>0){i.ranges=0;let f=i.nodes.shift();i.nodes=[f,{type:"text",value:Vk(i)}]}m({type:"comma",value:d}),i.commas++;continue}if(d===Kk&&p>0&&i.commas===0){let f=i.nodes;if(p===0||f.length===0){m({type:"text",value:d});continue}if(a.type==="dot"){if(i.range=[],a.value+=d,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){f.pop();let g=f[f.length-1];g.value+=a.value+d,a=g,i.ranges--;continue}m({type:"dot",value:d});continue}m({type:"text",value:d})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(y=>{y.nodes||(y.type==="open"&&(y.isOpen=!0),y.type==="close"&&(y.isClose=!0),y.nodes||(y.type="text"),y.invalid=!0)});let f=s[s.length-1],g=f.nodes.indexOf(i);f.nodes.splice(g,1,...i.nodes)}while(s.length>0);return m({type:"eos"}),o};Tv.exports=tI});var $v=S((_Z,Rv)=>{"use strict";var Fv=lu(),rI=vv(),nI=bv(),oI=Av(),Gt=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=Gt.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(Gt.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Gt.parse=(e,t={})=>oI(e,t);Gt.stringify=(e,t={})=>Fv(typeof e=="string"?Gt.parse(e,t):e,t);Gt.compile=(e,t={})=>(typeof e=="string"&&(e=Gt.parse(e,t)),rI(e,t));Gt.expand=(e,t={})=>{typeof e=="string"&&(e=Gt.parse(e,t));let r=nI(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Gt.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Gt.compile(e,t):Gt.expand(e,t);Rv.exports=Gt});var os=S((PZ,Mv)=>{"use strict";var iI=require("path"),Wr="\\\\/",kv=`[^${Wr}]`,mn="\\.",sI="\\+",aI="\\?",fu="\\/",uI="(?=.)",Iv="[^/]",lp=`(?:${fu}|$)`,Nv=`(?:^|${fu})`,pp=`${mn}{1,2}${lp}`,cI=`(?!${mn})`,lI=`(?!${Nv}${pp})`,pI=`(?!${mn}{0,1}${lp})`,dI=`(?!${pp})`,fI=`[^.${fu}]`,mI=`${Iv}*?`,Ov={DOT_LITERAL:mn,PLUS_LITERAL:sI,QMARK_LITERAL:aI,SLASH_LITERAL:fu,ONE_CHAR:uI,QMARK:Iv,END_ANCHOR:lp,DOTS_SLASH:pp,NO_DOT:cI,NO_DOTS:lI,NO_DOT_SLASH:pI,NO_DOTS_SLASH:dI,QMARK_NO_DOT:fI,STAR:mI,START_ANCHOR:Nv},hI={...Ov,SLASH_LITERAL:`[${Wr}]`,QMARK:kv,STAR:`${kv}*?`,DOTS_SLASH:`${mn}{1,2}(?:[${Wr}]|$)`,NO_DOT:`(?!${mn})`,NO_DOTS:`(?!(?:^|[${Wr}])${mn}{1,2}(?:[${Wr}]|$))`,NO_DOT_SLASH:`(?!${mn}{0,1}(?:[${Wr}]|$))`,NO_DOTS_SLASH:`(?!${mn}{1,2}(?:[${Wr}]|$))`,QMARK_NO_DOT:`[^.${Wr}]`,START_ANCHOR:`(?:^|[${Wr}])`,END_ANCHOR:`(?:[${Wr}]|$)`},gI={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Mv.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:gI,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:iI.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?hI:Ov}}});var is=S(It=>{"use strict";var yI=require("path"),DI=process.platform==="win32",{REGEX_BACKSLASH:vI,REGEX_REMOVE_BACKSLASH:CI,REGEX_SPECIAL_CHARS:wI,REGEX_SPECIAL_CHARS_GLOBAL:bI}=os();It.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);It.hasRegexChars=e=>wI.test(e);It.isRegexChar=e=>e.length===1&&It.hasRegexChars(e);It.escapeRegex=e=>e.replace(bI,"\\$1");It.toPosixSlashes=e=>e.replace(vI,"/");It.removeBackslashes=e=>e.replace(CI,t=>t==="\\"?"":t);It.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};It.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:DI===!0||yI.sep==="\\";It.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?It.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};It.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};It.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",s=`${n}(?:${e})${o}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var qv=S((AZ,Hv)=>{"use strict";var Lv=is(),{CHAR_ASTERISK:dp,CHAR_AT:xI,CHAR_BACKWARD_SLASH:ss,CHAR_COMMA:SI,CHAR_DOT:fp,CHAR_EXCLAMATION_MARK:mp,CHAR_FORWARD_SLASH:Vv,CHAR_LEFT_CURLY_BRACE:hp,CHAR_LEFT_PARENTHESES:gp,CHAR_LEFT_SQUARE_BRACKET:EI,CHAR_PLUS:_I,CHAR_QUESTION_MARK:Bv,CHAR_RIGHT_CURLY_BRACE:PI,CHAR_RIGHT_PARENTHESES:zv,CHAR_RIGHT_SQUARE_BRACKET:TI}=os(),jv=e=>e===Vv||e===ss,Uv=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},AI=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,s=[],i=[],a=[],u=e,c=-1,l=0,p=0,d=!1,h=!1,m=!1,f=!1,g=!1,y=!1,b=!1,w=!1,T=!1,E=!1,F=0,$,I,k={value:"",depth:0,isGlob:!1},R=()=>c>=n,v=()=>u.charCodeAt(c+1),z=()=>($=I,u.charCodeAt(++c));for(;c<n;){I=z();let je;if(I===ss){b=k.backslashes=!0,I=z(),I===hp&&(y=!0);continue}if(y===!0||I===hp){for(F++;R()!==!0&&(I=z());){if(I===ss){b=k.backslashes=!0,z();continue}if(I===hp){F++;continue}if(y!==!0&&I===fp&&(I=z())===fp){if(d=k.isBrace=!0,m=k.isGlob=!0,E=!0,o===!0)continue;break}if(y!==!0&&I===SI){if(d=k.isBrace=!0,m=k.isGlob=!0,E=!0,o===!0)continue;break}if(I===PI&&(F--,F===0)){y=!1,d=k.isBrace=!0,E=!0;break}}if(o===!0)continue;break}if(I===Vv){if(s.push(c),i.push(k),k={value:"",depth:0,isGlob:!1},E===!0)continue;if($===fp&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(I===_I||I===xI||I===dp||I===Bv||I===mp)===!0&&v()===gp){if(m=k.isGlob=!0,f=k.isExtglob=!0,E=!0,I===mp&&c===l&&(T=!0),o===!0){for(;R()!==!0&&(I=z());){if(I===ss){b=k.backslashes=!0,I=z();continue}if(I===zv){m=k.isGlob=!0,E=!0;break}}continue}break}if(I===dp){if($===dp&&(g=k.isGlobstar=!0),m=k.isGlob=!0,E=!0,o===!0)continue;break}if(I===Bv){if(m=k.isGlob=!0,E=!0,o===!0)continue;break}if(I===EI){for(;R()!==!0&&(je=z());){if(je===ss){b=k.backslashes=!0,z();continue}if(je===TI){h=k.isBracket=!0,m=k.isGlob=!0,E=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&I===mp&&c===l){w=k.negated=!0,l++;continue}if(r.noparen!==!0&&I===gp){if(m=k.isGlob=!0,o===!0){for(;R()!==!0&&(I=z());){if(I===gp){b=k.backslashes=!0,I=z();continue}if(I===zv){E=!0;break}}continue}break}if(m===!0){if(E=!0,o===!0)continue;break}}r.noext===!0&&(f=!1,m=!1);let V=u,K="",x="";l>0&&(K=u.slice(0,l),u=u.slice(l),p-=l),V&&m===!0&&p>0?(V=u.slice(0,p),x=u.slice(p)):m===!0?(V="",x=u):V=u,V&&V!==""&&V!=="/"&&V!==u&&jv(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===!0&&(x&&(x=Lv.removeBackslashes(x)),V&&b===!0&&(V=Lv.removeBackslashes(V)));let _={prefix:K,input:e,start:l,base:V,glob:x,isBrace:d,isBracket:h,isGlob:m,isExtglob:f,isGlobstar:g,negated:w,negatedExtglob:T};if(r.tokens===!0&&(_.maxDepth=0,jv(I)||i.push(k),_.tokens=i),r.parts===!0||r.tokens===!0){let je;for(let de=0;de<s.length;de++){let Rr=je?je+1:l,$r=s[de],Vt=e.slice(Rr,$r);r.tokens&&(de===0&&l!==0?(i[de].isPrefix=!0,i[de].value=K):i[de].value=Vt,Uv(i[de]),_.maxDepth+=i[de].depth),(de!==0||Vt!=="")&&a.push(Vt),je=$r}if(je&&je+1<e.length){let de=e.slice(je+1);a.push(de),r.tokens&&(i[i.length-1].value=de,Uv(i[i.length-1]),_.maxDepth+=i[i.length-1].depth)}_.slashes=s,_.parts=a}return _};Hv.exports=AI});var Wv=S((FZ,Gv)=>{"use strict";var mu=os(),Wt=is(),{MAX_LENGTH:hu,POSIX_REGEX_SOURCE:FI,REGEX_NON_SPECIAL_CHARS:RI,REGEX_SPECIAL_CHARS_BACKREF:$I,REPLACEMENTS:Kv}=mu,kI=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>Wt.escapeRegex(o)).join("..")}return r},Uo=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,yp=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Kv[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(hu,r.maxLength):hu,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},i=[s],a=r.capture?"":"?:",u=Wt.isWindows(t),c=mu.globChars(u),l=mu.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:f,NO_DOT:g,NO_DOT_SLASH:y,NO_DOTS_SLASH:b,QMARK:w,QMARK_NO_DOT:T,STAR:E,START_ANCHOR:F}=c,$=L=>`(${a}(?:(?!${F}${L.dot?f:p}).)*?)`,I=r.dot?"":g,k=r.dot?w:T,R=r.bash===!0?$(r):E;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let v={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Wt.removePrefix(e,v),o=e.length;let z=[],V=[],K=[],x=s,_,je=()=>v.index===o-1,de=v.peek=(L=1)=>e[v.index+L],Rr=v.advance=()=>e[++v.index]||"",$r=()=>e.slice(v.index+1),Vt=(L="",Ae=0)=>{v.consumed+=L,v.index+=Ae},ya=L=>{v.output+=L.output!=null?L.output:L.value,Vt(L.value)},eT=()=>{let L=1;for(;de()==="!"&&(de(2)!=="("||de(3)==="?");)Rr(),v.start++,L++;return L%2===0?!1:(v.negated=!0,v.start++,!0)},Da=L=>{v[L]++,K.push(L)},Hn=L=>{v[L]--,K.pop()},ne=L=>{if(x.type==="globstar"){let Ae=v.braces>0&&(L.type==="comma"||L.type==="brace"),O=L.extglob===!0||z.length&&(L.type==="pipe"||L.type==="paren");L.type!=="slash"&&L.type!=="paren"&&!Ae&&!O&&(v.output=v.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=R,v.output+=x.output)}if(z.length&&L.type!=="paren"&&(z[z.length-1].inner+=L.value),(L.value||L.output)&&ya(L),x&&x.type==="text"&&L.type==="text"){x.value+=L.value,x.output=(x.output||"")+L.value;return}L.prev=x,i.push(L),x=L},va=(L,Ae)=>{let O={...l[Ae],conditions:1,inner:""};O.prev=x,O.parens=v.parens,O.output=v.output;let ee=(r.capture?"(":"")+O.open;Da("parens"),ne({type:L,value:Ae,output:v.output?"":m}),ne({type:"paren",extglob:!0,value:Rr(),output:ee}),z.push(O)},tT=L=>{let Ae=L.close+(r.capture?")":""),O;if(L.type==="negate"){let ee=R;if(L.inner&&L.inner.length>1&&L.inner.includes("/")&&(ee=$(r)),(ee!==R||je()||/^\)+$/.test($r()))&&(Ae=L.close=`)$))${ee}`),L.inner.includes("*")&&(O=$r())&&/^\.[^\\/.]+$/.test(O)){let Ue=yp(O,{...t,fastpaths:!1}).output;Ae=L.close=`)${Ue})${ee})`}L.prev.type==="bos"&&(v.negatedExtglob=!0)}ne({type:"paren",extglob:!0,value:_,output:Ae}),Hn("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let L=!1,Ae=e.replace($I,(O,ee,Ue,bt,Je,Rc)=>bt==="\\"?(L=!0,O):bt==="?"?ee?ee+bt+(Je?w.repeat(Je.length):""):Rc===0?k+(Je?w.repeat(Je.length):""):w.repeat(Ue.length):bt==="."?p.repeat(Ue.length):bt==="*"?ee?ee+bt+(Je?R:""):R:ee?O:`\\${O}`);return L===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,O=>O.length%2===0?"\\\\":O?"\\":"")),Ae===e&&r.contains===!0?(v.output=e,v):(v.output=Wt.wrapOutput(Ae,v,t),v)}for(;!je();){if(_=Rr(),_==="\0")continue;if(_==="\\"){let O=de();if(O==="/"&&r.bash!==!0||O==="."||O===";")continue;if(!O){_+="\\",ne({type:"text",value:_});continue}let ee=/^\\+/.exec($r()),Ue=0;if(ee&&ee[0].length>2&&(Ue=ee[0].length,v.index+=Ue,Ue%2!==0&&(_+="\\")),r.unescape===!0?_=Rr():_+=Rr(),v.brackets===0){ne({type:"text",value:_});continue}}if(v.brackets>0&&(_!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&_===":"){let O=x.value.slice(1);if(O.includes("[")&&(x.posix=!0,O.includes(":"))){let ee=x.value.lastIndexOf("["),Ue=x.value.slice(0,ee),bt=x.value.slice(ee+2),Je=FI[bt];if(Je){x.value=Ue+Je,v.backtrack=!0,Rr(),!s.output&&i.indexOf(x)===1&&(s.output=m);continue}}}(_==="["&&de()!==":"||_==="-"&&de()==="]")&&(_=`\\${_}`),_==="]"&&(x.value==="["||x.value==="[^")&&(_=`\\${_}`),r.posix===!0&&_==="!"&&x.value==="["&&(_="^"),x.value+=_,ya({value:_});continue}if(v.quotes===1&&_!=='"'){_=Wt.escapeRegex(_),x.value+=_,ya({value:_});continue}if(_==='"'){v.quotes=v.quotes===1?0:1,r.keepQuotes===!0&&ne({type:"text",value:_});continue}if(_==="("){Da("parens"),ne({type:"paren",value:_});continue}if(_===")"){if(v.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Uo("opening","("));let O=z[z.length-1];if(O&&v.parens===O.parens+1){tT(z.pop());continue}ne({type:"paren",value:_,output:v.parens?")":"\\)"}),Hn("parens");continue}if(_==="["){if(r.nobracket===!0||!$r().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Uo("closing","]"));_=`\\${_}`}else Da("brackets");ne({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){ne({type:"text",value:_,output:`\\${_}`});continue}if(v.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Uo("opening","["));ne({type:"text",value:_,output:`\\${_}`});continue}Hn("brackets");let O=x.value.slice(1);if(x.posix!==!0&&O[0]==="^"&&!O.includes("/")&&(_=`/${_}`),x.value+=_,ya({value:_}),r.literalBrackets===!1||Wt.hasRegexChars(O))continue;let ee=Wt.escapeRegex(x.value);if(v.output=v.output.slice(0,-x.value.length),r.literalBrackets===!0){v.output+=ee,x.value=ee;continue}x.value=`(${a}${ee}|${x.value})`,v.output+=x.value;continue}if(_==="{"&&r.nobrace!==!0){Da("braces");let O={type:"brace",value:_,output:"(",outputIndex:v.output.length,tokensIndex:v.tokens.length};V.push(O),ne(O);continue}if(_==="}"){let O=V[V.length-1];if(r.nobrace===!0||!O){ne({type:"text",value:_,output:_});continue}let ee=")";if(O.dots===!0){let Ue=i.slice(),bt=[];for(let Je=Ue.length-1;Je>=0&&(i.pop(),Ue[Je].type!=="brace");Je--)Ue[Je].type!=="dots"&&bt.unshift(Ue[Je].value);ee=kI(bt,r),v.backtrack=!0}if(O.comma!==!0&&O.dots!==!0){let Ue=v.output.slice(0,O.outputIndex),bt=v.tokens.slice(O.tokensIndex);O.value=O.output="\\{",_=ee="\\}",v.output=Ue;for(let Je of bt)v.output+=Je.output||Je.value}ne({type:"brace",value:_,output:ee}),Hn("braces"),V.pop();continue}if(_==="|"){z.length>0&&z[z.length-1].conditions++,ne({type:"text",value:_});continue}if(_===","){let O=_,ee=V[V.length-1];ee&&K[K.length-1]==="braces"&&(ee.comma=!0,O="|"),ne({type:"comma",value:_,output:O});continue}if(_==="/"){if(x.type==="dot"&&v.index===v.start+1){v.start=v.index+1,v.consumed="",v.output="",i.pop(),x=s;continue}ne({type:"slash",value:_,output:h});continue}if(_==="."){if(v.braces>0&&x.type==="dot"){x.value==="."&&(x.output=p);let O=V[V.length-1];x.type="dots",x.output+=_,x.value+=_,O.dots=!0;continue}if(v.braces+v.parens===0&&x.type!=="bos"&&x.type!=="slash"){ne({type:"text",value:_,output:p});continue}ne({type:"dot",value:_,output:p});continue}if(_==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&de()==="("&&de(2)!=="?"){va("qmark",_);continue}if(x&&x.type==="paren"){let ee=de(),Ue=_;if(ee==="<"&&!Wt.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(ee)||ee==="<"&&!/<([!=]|\w+>)/.test($r()))&&(Ue=`\\${_}`),ne({type:"text",value:_,output:Ue});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){ne({type:"qmark",value:_,output:T});continue}ne({type:"qmark",value:_,output:w});continue}if(_==="!"){if(r.noextglob!==!0&&de()==="("&&(de(2)!=="?"||!/[!=<:]/.test(de(3)))){va("negate",_);continue}if(r.nonegate!==!0&&v.index===0){eT();continue}}if(_==="+"){if(r.noextglob!==!0&&de()==="("&&de(2)!=="?"){va("plus",_);continue}if(x&&x.value==="("||r.regex===!1){ne({type:"plus",value:_,output:d});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||v.parens>0){ne({type:"plus",value:_});continue}ne({type:"plus",value:d});continue}if(_==="@"){if(r.noextglob!==!0&&de()==="("&&de(2)!=="?"){ne({type:"at",extglob:!0,value:_,output:""});continue}ne({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let O=RI.exec($r());O&&(_+=O[0],v.index+=O[0].length),ne({type:"text",value:_});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=_,x.output=R,v.backtrack=!0,v.globstar=!0,Vt(_);continue}let L=$r();if(r.noextglob!==!0&&/^\([^?]/.test(L)){va("star",_);continue}if(x.type==="star"){if(r.noglobstar===!0){Vt(_);continue}let O=x.prev,ee=O.prev,Ue=O.type==="slash"||O.type==="bos",bt=ee&&(ee.type==="star"||ee.type==="globstar");if(r.bash===!0&&(!Ue||L[0]&&L[0]!=="/")){ne({type:"star",value:_,output:""});continue}let Je=v.braces>0&&(O.type==="comma"||O.type==="brace"),Rc=z.length&&(O.type==="pipe"||O.type==="paren");if(!Ue&&O.type!=="paren"&&!Je&&!Rc){ne({type:"star",value:_,output:""});continue}for(;L.slice(0,3)==="/**";){let Ca=e[v.index+4];if(Ca&&Ca!=="/")break;L=L.slice(3),Vt("/**",3)}if(O.type==="bos"&&je()){x.type="globstar",x.value+=_,x.output=$(r),v.output=x.output,v.globstar=!0,Vt(_);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&!bt&&je()){v.output=v.output.slice(0,-(O.output+x.output).length),O.output=`(?:${O.output}`,x.type="globstar",x.output=$(r)+(r.strictSlashes?")":"|$)"),x.value+=_,v.globstar=!0,v.output+=O.output+x.output,Vt(_);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&L[0]==="/"){let Ca=L[1]!==void 0?"|$":"";v.output=v.output.slice(0,-(O.output+x.output).length),O.output=`(?:${O.output}`,x.type="globstar",x.output=`${$(r)}${h}|${h}${Ca})`,x.value+=_,v.output+=O.output+x.output,v.globstar=!0,Vt(_+Rr()),ne({type:"slash",value:"/",output:""});continue}if(O.type==="bos"&&L[0]==="/"){x.type="globstar",x.value+=_,x.output=`(?:^|${h}|${$(r)}${h})`,v.output=x.output,v.globstar=!0,Vt(_+Rr()),ne({type:"slash",value:"/",output:""});continue}v.output=v.output.slice(0,-x.output.length),x.type="globstar",x.output=$(r),x.value+=_,v.output+=x.output,v.globstar=!0,Vt(_);continue}let Ae={type:"star",value:_,output:R};if(r.bash===!0){Ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(Ae.output=I+Ae.output),ne(Ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){Ae.output=_,ne(Ae);continue}(v.index===v.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(v.output+=y,x.output+=y):r.dot===!0?(v.output+=b,x.output+=b):(v.output+=I,x.output+=I),de()!=="*"&&(v.output+=m,x.output+=m)),ne(Ae)}for(;v.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Uo("closing","]"));v.output=Wt.escapeLast(v.output,"["),Hn("brackets")}for(;v.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Uo("closing",")"));v.output=Wt.escapeLast(v.output,"("),Hn("parens")}for(;v.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Uo("closing","}"));v.output=Wt.escapeLast(v.output,"{"),Hn("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&ne({type:"maybe_slash",value:"",output:`${h}?`}),v.backtrack===!0){v.output="";for(let L of v.tokens)v.output+=L.output!=null?L.output:L.value,L.suffix&&(v.output+=L.suffix)}return v};yp.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(hu,r.maxLength):hu,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=Kv[e]||e;let s=Wt.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=mu.globChars(s),f=r.dot?p:l,g=r.dot?d:l,y=r.capture?"":"?:",b={negated:!1,prefix:""},w=r.bash===!0?".*?":h;r.capture&&(w=`(${w})`);let T=I=>I.noglobstar===!0?w:`(${y}(?:(?!${m}${I.dot?c:i}).)*?)`,E=I=>{switch(I){case"*":return`${f}${u}${w}`;case".*":return`${i}${u}${w}`;case"*.*":return`${f}${w}${i}${u}${w}`;case"*/*":return`${f}${w}${a}${u}${g}${w}`;case"**":return f+T(r);case"**/*":return`(?:${f}${T(r)}${a})?${g}${u}${w}`;case"**/*.*":return`(?:${f}${T(r)}${a})?${g}${w}${i}${u}${w}`;case"**/.*":return`(?:${f}${T(r)}${a})?${i}${u}${w}`;default:{let k=/^(.*?)\.(\w+)$/.exec(I);if(!k)return;let R=E(k[1]);return R?R+i+k[2]:void 0}}},F=Wt.removePrefix(e,b),$=E(F);return $&&r.strictSlashes!==!0&&($+=`${a}?`),$};Gv.exports=yp});var Jv=S((RZ,Zv)=>{"use strict";var II=require("path"),NI=qv(),Dp=Wv(),vp=is(),OI=os(),MI=e=>e&&typeof e=="object"&&!Array.isArray(e),qe=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>qe(d,t,r));return d=>{for(let h of l){let m=h(d);if(m)return m}return!1}}let n=MI(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},s=vp.isWindows(t),i=n?qe.compileRe(e,t):qe.makeRe(e,t,!1,!0),a=i.state;delete i.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=qe(o.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:d,match:h,output:m}=qe.test(l,i,t,{glob:e,posix:s}),f={glob:e,state:a,regex:i,posix:s,input:l,output:m,match:h,isMatch:d};return typeof o.onResult=="function"&&o.onResult(f),d===!1?(f.isMatch=!1,p?f:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(f),f.isMatch=!1,p?f:!1):(typeof o.onMatch=="function"&&o.onMatch(f),p?f:!0)};return r&&(c.state=a),c};qe.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},i=s.format||(o?vp.toPosixSlashes:null),a=e===n,u=a&&i?i(e):e;return a===!1&&(u=i?i(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=qe.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};qe.matchBase=(e,t,r,n=vp.isWindows(r))=>(t instanceof RegExp?t:qe.makeRe(t,r)).test(II.basename(e));qe.isMatch=(e,t,r)=>qe(t,r)(e);qe.parse=(e,t)=>Array.isArray(e)?e.map(r=>qe.parse(r,t)):Dp(e,{...t,fastpaths:!1});qe.scan=(e,t)=>NI(e,t);qe.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},s=o.contains?"":"^",i=o.contains?"":"$",a=`${s}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=qe.toRegex(a,t);return n===!0&&(u.state=e),u};qe.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Dp.fastpaths(e,t)),o.output||(o=Dp(e,t)),qe.compileRe(o,t,r,n)};qe.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};qe.constants=OI;Zv.exports=qe});var Qv=S(($Z,Yv)=>{"use strict";Yv.exports=Jv()});var wp=S((kZ,nC)=>{"use strict";var eC=require("util"),tC=$v(),Zr=Qv(),Cp=is(),Xv=e=>e===""||e==="./",rC=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},$e=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,s=new Set,i=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=Zr(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&i++;for(let h of e){let m=p(h,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),o.add(m.output)))}}let c=(i===t.length?[...s]:[...o]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};$e.match=$e;$e.matcher=(e,t)=>Zr(e,t);$e.isMatch=(e,t,r)=>Zr(t,r)(e);$e.any=$e.isMatch;$e.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],s=a=>{r.onResult&&r.onResult(a),o.push(a.output)},i=new Set($e(e,t,{...r,onResult:s}));for(let a of o)i.has(a)||n.add(a);return[...n]};$e.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${eC.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>$e.contains(e,n,r));if(typeof t=="string"){if(Xv(e)||Xv(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return $e.isMatch(e,t,{...r,contains:!0})};$e.matchKeys=(e,t,r)=>{if(!Cp.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=$e(Object.keys(e),t,r),o={};for(let s of n)o[s]=e[s];return o};$e.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Zr(String(o),r);if(n.some(i=>s(i)))return!0}return!1};$e.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Zr(String(o),r);if(!n.every(i=>s(i)))return!1}return!0};$e.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${eC.inspect(e)}"`);return[].concat(t).every(n=>Zr(n,r)(e))};$e.capture=(e,t,r)=>{let n=Cp.isWindows(r),s=Zr.makeRe(String(e),{...r,capture:!0}).exec(n?Cp.toPosixSlashes(t):t);if(s)return s.slice(1).map(i=>i===void 0?"":i)};$e.makeRe=(...e)=>Zr.makeRe(...e);$e.scan=(...e)=>Zr.scan(...e);$e.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of tC(String(n),t))r.push(Zr.parse(o,t));return r};$e.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!rC(e)?[e]:tC(e,t)};$e.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return $e.braces(e,{...t,expand:!0})};$e.hasBraces=rC;nC.exports=$e});var iC=S((WZ,oC)=>{var Vo=1e3,Ho=Vo*60,qo=Ho*60,io=qo*24,jI=io*7,UI=io*365.25;oC.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return VI(e);if(r==="number"&&isFinite(e))return t.long?qI(e):HI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function VI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*UI;case"weeks":case"week":case"w":return r*jI;case"days":case"day":case"d":return r*io;case"hours":case"hour":case"hrs":case"hr":case"h":return r*qo;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ho;case"seconds":case"second":case"secs":case"sec":case"s":return r*Vo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function HI(e){var t=Math.abs(e);return t>=io?Math.round(e/io)+"d":t>=qo?Math.round(e/qo)+"h":t>=Ho?Math.round(e/Ho)+"m":t>=Vo?Math.round(e/Vo)+"s":e+"ms"}function qI(e){var t=Math.abs(e);return t>=io?gu(e,t,io,"day"):t>=qo?gu(e,t,qo,"hour"):t>=Ho?gu(e,t,Ho,"minute"):t>=Vo?gu(e,t,Vo,"second"):e+" ms"}function gu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var bp=S((ZZ,sC)=>{function KI(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=a,r.humanize=iC(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,h,m;function f(...g){if(!f.enabled)return;let y=f,b=Number(new Date),w=b-(p||b);y.diff=w,y.prev=p,y.curr=b,p=b,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let T=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(F,$)=>{if(F==="%%")return"%";T++;let I=r.formatters[$];if(typeof I=="function"){let k=g[T];F=I.call(y,k),g.splice(T,1),T--}return F}),r.formatArgs.call(y,g),(y.log||r.log).apply(y,g)}return f.namespace=l,f.useColors=r.useColors(),f.color=r.selectColor(l),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,m=r.enabled(l)),m),set:g=>{d=g}}),typeof r.init=="function"&&r.init(f),f}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,h=0,m=-1,f=0;for(;d<l.length;)if(h<p.length&&(p[h]===l[d]||p[h]==="*"))p[h]==="*"?(m=h,f=d,h++):(d++,h++);else if(m!==-1)h=m+1,f++,d=f;else return!1;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function i(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}sC.exports=KI});var aC=S((Nt,yu)=>{Nt.formatArgs=WI;Nt.save=ZI;Nt.load=JI;Nt.useColors=GI;Nt.storage=YI();Nt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Nt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function GI(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function WI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+yu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Nt.log=console.debug||console.log||(()=>{});function ZI(e){try{e?Nt.storage.setItem("debug",e):Nt.storage.removeItem("debug")}catch{}}function JI(){let e;try{e=Nt.storage.getItem("debug")||Nt.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function YI(){try{return localStorage}catch{}}yu.exports=bp()(Nt);var{formatters:QI}=yu.exports;QI.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var cC=S((JZ,uC)=>{"use strict";uC.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var dC=S((YZ,pC)=>{"use strict";var XI=require("os"),lC=require("tty"),cr=cC(),{env:nt}=process,kn;cr("no-color")||cr("no-colors")||cr("color=false")||cr("color=never")?kn=0:(cr("color")||cr("colors")||cr("color=true")||cr("color=always"))&&(kn=1);"FORCE_COLOR"in nt&&(nt.FORCE_COLOR==="true"?kn=1:nt.FORCE_COLOR==="false"?kn=0:kn=nt.FORCE_COLOR.length===0?1:Math.min(parseInt(nt.FORCE_COLOR,10),3));function xp(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Sp(e,t){if(kn===0)return 0;if(cr("color=16m")||cr("color=full")||cr("color=truecolor"))return 3;if(cr("color=256"))return 2;if(e&&!t&&kn===void 0)return 0;let r=kn||0;if(nt.TERM==="dumb")return r;if(process.platform==="win32"){let n=XI.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in nt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in nt)||nt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in nt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(nt.TEAMCITY_VERSION)?1:0;if(nt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in nt){let n=parseInt((nt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(nt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(nt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(nt.TERM)||"COLORTERM"in nt?1:r}function e1(e){let t=Sp(e,e&&e.isTTY);return xp(t)}pC.exports={supportsColor:e1,stdout:xp(Sp(!0,lC.isatty(1))),stderr:xp(Sp(!0,lC.isatty(2)))}});var mC=S((ot,vu)=>{var t1=require("tty"),Du=require("util");ot.init=u1;ot.log=i1;ot.formatArgs=n1;ot.save=s1;ot.load=a1;ot.useColors=r1;ot.destroy=Du.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ot.colors=[6,2,3,4,5,1];try{let e=dC();e&&(e.stderr||e).level>=2&&(ot.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ot.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function r1(){return"colors"in ot.inspectOpts?!!ot.inspectOpts.colors:t1.isatty(process.stderr.fd)}function n1(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
17
17
  `).join(`
18
18
  `+s),e.push(o+"m+"+vu.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=o1()+t+" "+e[0]}function o1(){return ot.inspectOpts.hideDate?"":new Date().toISOString()+" "}function i1(...e){return process.stderr.write(Du.formatWithOptions(ot.inspectOpts,...e)+`
19
19
  `)}function s1(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function a1(){return process.env.DEBUG}function u1(e){e.inspectOpts={};let t=Object.keys(ot.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ot.inspectOpts[t[r]]}vu.exports=bp()(ot);var{formatters:fC}=vu.exports;fC.o=function(e){return this.inspectOpts.colors=this.useColors,Du.inspect(e,this.inspectOpts).split(`
20
- `).map(t=>t.trim()).join(" ")};fC.O=function(e){return this.inspectOpts.colors=this.useColors,Du.inspect(e,this.inspectOpts)}});var Cu=S((YZ,Ep)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ep.exports=aC():Ep.exports=mC()});var gC=S((QZ,hC)=>{var as;hC.exports=function(){if(!as){try{as=Cu()("follow-redirects")}catch{}typeof as!="function"&&(as=function(){})}as.apply(null,arguments)}});var wC=S((XZ,Mp)=>{var cs=require("url"),us=cs.URL,c1=require("http"),l1=require("https"),Fp=require("stream").Writable,Rp=require("assert"),yC=gC();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=ao(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var $p=!1;try{Rp(new us(""))}catch(e){$p=e.code==="ERR_INVALID_URL"}var p1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],kp=["abort","aborted","connect","error","socket","timeout"],Ip=Object.create(null);kp.forEach(function(e){Ip[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Pp=ls("ERR_INVALID_URL","Invalid URL",TypeError),Tp=ls("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),d1=ls("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Tp),f1=ls("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m1=ls("ERR_STREAM_WRITE_AFTER_END","write after end"),h1=Fp.prototype.destroy||vC;function Ot(e,t){Fp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof Tp?o:new Tp({cause:o}))}},this._performRequest()}Ot.prototype=Object.create(Fp.prototype);Ot.prototype.abort=function(){Op(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ot.prototype.destroy=function(e){return Op(this._currentRequest,e),h1.call(this,e),this};Ot.prototype.write=function(e,t,r){if(this._ending)throw new m1;if(!so(e)&&!D1(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ao(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new f1),this.abort())};Ot.prototype.end=function(e,t,r){if(ao(e)?(r=e,e=t=null):ao(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(e,t,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};Ot.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Ot.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Ot.prototype.setTimeout=function(e,t){var r=this;function n(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function o(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(i)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Ot.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Ot.prototype,e,{get:function(){return this._currentRequest[e]}})});Ot.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Ot.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of kp)n.on(o,Ip[o]);if(this._currentUrl=/^\//.test(this._options.path)?cs.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,a=this._requestBodyBuffers;(function u(c){if(n===i._currentRequest)if(c)i.emit("error",c);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,u)}else i._ended&&n.end()})()}};Ot.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Op(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new d1;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_p(/^content-/i,this._options.headers));var i=_p(/^host$/i,this._options.headers),a=Np(this._currentUrl),u=i||a.host,c=/^\w+:/.test(r)?this._currentUrl:cs.format(Object.assign(a,{host:u})),l=g1(r,c);if(yC("redirecting to",l.href),this._isRedirect=!0,Ap(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!y1(l.host,u))&&_p(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),ao(o)){var p={headers:e.headers,statusCode:t},d={url:c,method:s,headers:n};o(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function DC(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var o=n+":",s=r[o]=e[n],i=t[n]=Object.create(s);function a(c,l,p){return v1(c)?c=Ap(c):so(c)?c=Ap(Np(c)):(p=l,l=CC(c),c={protocol:o}),ao(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=r,!so(l.host)&&!so(l.hostname)&&(l.hostname="::1"),Rp.equal(l.protocol,o,"protocol mismatch"),yC("options",l),new Ot(l,p)}function u(c,l,p){var d=i.request(c,l,p);return d.end(),d}Object.defineProperties(i,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function vC(){}function Np(e){var t;if($p)t=new us(e);else if(t=CC(cs.parse(e)),!so(t.protocol))throw new Pp({input:e});return t}function g1(e,t){return $p?new us(e,t):Np(cs.resolve(t,e))}function CC(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Pp({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Pp({input:e.href||e});return e}function Ap(e,t){var r=t||{};for(var n of p1)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function _p(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function ls(e,t,r){function n(o){ao(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function Op(e,t){for(var r of kp)e.removeListener(r,Ip[r]);e.on("error",vC),e.destroy(t)}function y1(e,t){Rp(so(e)&&so(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function so(e){return typeof e=="string"||e instanceof String}function ao(e){return typeof e=="function"}function D1(e){return typeof e=="object"&&"length"in e}function v1(e){return us&&e instanceof us}Mp.exports=DC({http:c1,https:l1});Mp.exports.wrap=DC});var ps=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isSSL=void 0;Zt.setupOutgoing=x1;Zt.setupSocket=S1;Zt.getPort=E1;Zt.hasEncryptedConnection=SC;Zt.urlJoin=EC;Zt.rewriteCookieProperty=_C;Zt.toURL=PC;var C1=require("node:tls"),w1=/(^|,)\s*upgrade\s*($|,)/i;Zt.isSSL=/^https|wss/;var b1="trailer",bC=[":method",":path",":scheme",":authority","connection","keep-alive"];function x1(e,t,r,n){let o=t[n||"target"];e.port=+(o.port??(o.protocol!==void 0&&Zt.isSSL.test(o.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=o[a];e.method=t.method||r.method,e.headers={...r.headers},r.headers?.[":authority"]&&(e.headers.host=r.headers[":authority"]),t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(b1==a.toLowerCase()){delete e.headers[a];break}if(r.httpVersionMajor>1)for(let a of bC)delete e.headers[a];t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),o.protocol!==void 0&&Zt.isSSL.test(o.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!w1.test(e.headers.connection))&&(e.headers.connection="close"));let s=o&&t.prependPath!==!1&&"pathname"in o?xC(`${o.pathname}${o.search??""}`):"/",i=t.toProxy?r.url:xC(r.url);if(i=t.ignorePath?"":i,e.path=EC(s,i??""),t.changeOrigin&&(e.headers.host=o.protocol!==void 0&&P1(e.port,o.protocol)&&!_1(e.host)?e.host+":"+e.port:e.host),e.url="href"in o&&o.href||(o.protocol==="https"?"https":"http")+"://"+e.host+(e.port?":"+e.port:""),r.httpVersionMajor>1)for(let a of bC)delete e.headers[a];return e}function S1(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function E1(e){let t=e.headers[":authority"]||e.headers.host,r=t?t.match(/:(\d+)/):"";return r?r[1]:SC(e)?"443":"80"}function SC(e){let t=e.connection;return t instanceof C1.TLSSocket&&t.encrypted||!!t.pair}function EC(...e){let t=[],r="";e.forEach((o,s)=>{let i=o.indexOf("?");i!==-1&&(t.push(o.substring(i+1)),e[s]=o.substring(0,i))}),r=t.filter(Boolean).join("&");let n="";for(let o of e)o&&(n.endsWith("/")?o.startsWith("/")?n+=o.slice(1):n+=o:o.startsWith("/")?n+=o:n+="/"+o);return r?n+"?"+r:n}function _C(e,t,r){return Array.isArray(e)?e.map(n=>_C(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,o,s)=>{let i;if(s in t)i=t[s];else if("*"in t)i=t["*"];else return n;return i?o+i:""})}function _1(e){return!!~e.indexOf(":")}function xC(e){if(e===""||e?.startsWith("?"))return e;let t=PC(e);return`${t.pathname??""}${t.search??""}`}function PC(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://base.invalid${e}`),new URL(e,"http://base.invalid"))}function P1(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var Lp=S(_t=>{"use strict";var T1=_t&&_t.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),A1=_t&&_t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),F1=_t&&_t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&T1(r,t,n[o]);return A1(r,t),r}})();Object.defineProperty(_t,"__esModule",{value:!0});_t.OUTGOING_PASSES=void 0;_t.removeChunked=TC;_t.setConnection=AC;_t.setRedirectHostRewrite=FC;_t.writeHeaders=RC;_t.writeStatusCode=$C;var wu=F1(ps()),R1=/^201|30(1|2|7|8)$/;function TC(e,t,r){delete r.headers["transfer-encoding"]}function AC(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function FC(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&R1.test(`${r.statusCode}`)){let o=wu.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let i=wu.toURL(s);if(o.host!=i.host)return;n.hostRewrite?i.host=n.hostRewrite:n.autoRewrite&&(i.host=e.headers[":authority"]??e.headers.host??""),n.protocolRewrite&&(i.protocol=n.protocolRewrite),r.headers.location=i.toString()}}function RC(e,t,r,n){let o=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,i=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(o&&c.toLowerCase()==="set-cookie"&&(l=wu.rewriteCookieProperty(l,o,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=wu.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(i&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c;if(e.httpVersionMajor>1&&(l==="connection"||l==="keep-alive"))continue;let p=r.headers[l];i&&u&&(l=u[l]??l),a(l,p)}}function $C(e,t,r){t.statusCode=r.statusCode,r.statusMessage&&e.httpVersionMajor===1&&(t.statusMessage=r.statusMessage)}_t.OUTGOING_PASSES={removeChunked:TC,setConnection:AC,setRedirectHostRewrite:FC,writeHeaders:RC,writeStatusCode:$C}});var LC=S(Mt=>{"use strict";var $1=Mt&&Mt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),k1=Mt&&Mt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bu=Mt&&Mt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&$1(r,t,n[o]);return k1(r,t),r}})();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.WEB_PASSES=void 0;Mt.deleteLength=IC;Mt.timeout=NC;Mt.XHeaders=OC;Mt.stream=MC;var I1=bu(require("node:http")),N1=bu(require("node:https")),O1=bu(wC()),Ko=bu(ps()),M1=Lp(),L1=require("node:stream"),kC=Object.values(M1.OUTGOING_PASSES),B1={http:I1,https:N1};function IC(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function NC(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function OC(e,t,r){if(!r.xfwd)return;let n=Ko.hasEncryptedConnection(e),o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Ko.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+o[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers[":authority"]||e.headers.host||""}function MC(e,t,r,n,o,s){if(o.emit("start",e,t,r.target||r.forward),r.fetch||r.fetchOptions||process.env.FORCE_FETCH_PATH==="true")return z1(e,t,r,n,o,s);let i=r.followRedirects?O1:B1,a=i.http,u=i.https;if(r.forward){let m=r.forward.protocol==="https:"?u:a,f=Ko.setupOutgoing(r.ssl||{},r,e,"forward"),g=m.request(f),y=h(g,r.forward);if(e.on("error",y),g.on("error",y),(r.buffer||e).pipe(g),!r.target)return t.end()}let c=r.target.protocol==="https:"?u:a,l=Ko.setupOutgoing(r.ssl||{},r,e),p=c.request(l);p.on("socket",m=>{o&&!p.getHeader("expect")&&o.emit("proxyReq",p,e,t,r,m)}),r.proxyTimeout&&p.setTimeout(r.proxyTimeout,()=>{p.destroy()}),t.on("close",()=>{!t.writableFinished&&p.destroy()});let d=h(p,r.target);e.on("error",d),p.on("error",d);function h(m,f){return g=>{if(e.socket.destroyed&&g.code==="ECONNRESET"){o.emit("econnreset",g,e,t,f),m.destroy();return}s?s(g,e,t,f):o.emit("error",g,e,t,f)}}(r.buffer||e).pipe(p),p.on("response",m=>{if(o?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let f of kC)f(e,t,m,r);t.finished?o?.emit("end",e,t,m):(m.on("end",()=>{o?.emit("end",e,t,m)}),r.selfHandleResponse||m.pipe(t))})}async function z1(e,t,r,n,o,s){let i=(h,m)=>{let f=h;f.code===void 0&&f.cause?.code&&(f.code=f.cause.code),s?s(h,e,t,m):o.emit("error",h,e,t,m)};e.on("error",h=>{if(e.socket.destroyed&&h.code==="ECONNRESET"){let m=r.target||r.forward;m&&o.emit("econnreset",h,e,t,m);return}i(h)});let a=r.fetch||fetch,u=r.fetchOptions??{},c=h=>{let m={method:h.method,...u.requestOptions},f=new Headers(u.requestOptions?.headers);if(!u.requestOptions?.headers&&h.headers){for(let[g,y]of Object.entries(h.headers))if(typeof g=="string")if(Array.isArray(y))for(let b of y)f.append(g,b);else y!=null&&f.append(g,y)}return r.auth&&f.set("authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`),r.proxyTimeout&&(m.signal=AbortSignal.timeout(r.proxyTimeout)),m.headers=f,r.buffer?m.body=r.buffer:e.method!=="GET"&&e.method!=="HEAD"&&(m.body=e,m.duplex="half"),m};if(r.forward){let h=Ko.setupOutgoing(r.ssl||{},r,e,"forward"),m=c(h),f=new URL(h.url).origin+h.path;if(f.startsWith("ws")&&(f=f.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(m,e,t,r)}catch(g){i(g,r.forward);return}try{let g=await a(f,m);if(u.onAfterResponse)try{await u.onAfterResponse(g,e,t,r)}catch(y){i(y,r.forward);return}}catch(g){i(g,r.forward)}if(!r.target)return t.end()}let l=Ko.setupOutgoing(r.ssl||{},r,e),p=c(l),d=new URL(l.url).origin+l.path;if(d.startsWith("ws")&&(d=d.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(p,e,t,r)}catch(h){i(h,r.target);return}try{let h=await a(d,p);if(u.onAfterResponse)try{await u.onAfterResponse(h,e,t,r)}catch(f){i(f,r.target);return}let m={statusCode:h.status,statusMessage:h.statusText,headers:Object.fromEntries(h.headers.entries()),rawHeaders:Object.entries(h.headers).flatMap(([f,g])=>Array.isArray(g)?g.flatMap(y=>y!=null?[f,y]:[]):g!=null?[f,g]:[])};if(o?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let f of kC)f(e,t,m,r);if(t.writableEnded)o?.emit("end",e,t,m);else{let f=h.body?L1.Readable.from(h.body):null;f?(f.on("error",g=>{i(g,r.target)}),f.on("end",()=>{o?.emit("end",e,t,m)}),r.selfHandleResponse?f.resume():f.pipe(t,{end:!0})):o?.emit("end",e,t,m)}}catch(h){i(h,r.target)}}Mt.WEB_PASSES={deleteLength:IC,timeout:NC,XHeaders:OC,stream:MC}});var Vp=S(yt=>{"use strict";var j1=yt&&yt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),U1=yt&&yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Up=yt&&yt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&j1(r,t,n[o]);return U1(r,t),r}})(),V1=yt&&yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});yt.WS_PASSES=void 0;yt.numOpenSockets=Z1;yt.checkMethodAndHeader=zC;yt.XHeaders=jC;yt.stream=UC;var H1=Up(require("node:http")),q1=Up(require("node:https")),Go=Up(ps()),K1=Lp(),G1=V1(Cu()),Wo=(0,G1.default)("http-proxy-3:ws-incoming"),W1=Object.values(K1.OUTGOING_PASSES);function BC(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),Wo("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var Bp=BC("socket"),zp=BC("proxySocket"),jp=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(t,r){return this.headers[t]=r,this}};function Z1(){return Bp()+zp()}function zC(e,t){if(Wo("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function jC(e,t,r){if(!r.xfwd)return;Wo("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Go.getPort(e),proto:Go.hasEncryptedConnection(e)?"wss":"ws"};for(let o of["for","port","proto"])e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o]}function UC(e,t,r,n,o,s){Wo("websocket: new stream");let i=[];Bp({add:t});let a=()=>{for(let h of i)h.end()};t.on("close",()=>{Bp({rm:t}),a()}),t.on("error",a);let u=(h,m)=>Object.keys(m).reduce((f,g)=>{let y=m[g];if(!Array.isArray(y))return f.push(g+": "+y),f;for(let b=0;b<y.length;b++)f.push(g+": "+y[b]);return f},[h]).join(`\r
20
+ `).map(t=>t.trim()).join(" ")};fC.O=function(e){return this.inspectOpts.colors=this.useColors,Du.inspect(e,this.inspectOpts)}});var Cu=S((QZ,Ep)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ep.exports=aC():Ep.exports=mC()});var gC=S((XZ,hC)=>{var as;hC.exports=function(){if(!as){try{as=Cu()("follow-redirects")}catch{}typeof as!="function"&&(as=function(){})}as.apply(null,arguments)}});var wC=S((eJ,Mp)=>{var cs=require("url"),us=cs.URL,c1=require("http"),l1=require("https"),Fp=require("stream").Writable,Rp=require("assert"),yC=gC();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=ao(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var $p=!1;try{Rp(new us(""))}catch(e){$p=e.code==="ERR_INVALID_URL"}var p1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],kp=["abort","aborted","connect","error","socket","timeout"],Ip=Object.create(null);kp.forEach(function(e){Ip[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Pp=ls("ERR_INVALID_URL","Invalid URL",TypeError),Tp=ls("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),d1=ls("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Tp),f1=ls("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m1=ls("ERR_STREAM_WRITE_AFTER_END","write after end"),h1=Fp.prototype.destroy||vC;function Ot(e,t){Fp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof Tp?o:new Tp({cause:o}))}},this._performRequest()}Ot.prototype=Object.create(Fp.prototype);Ot.prototype.abort=function(){Op(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ot.prototype.destroy=function(e){return Op(this._currentRequest,e),h1.call(this,e),this};Ot.prototype.write=function(e,t,r){if(this._ending)throw new m1;if(!so(e)&&!D1(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ao(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new f1),this.abort())};Ot.prototype.end=function(e,t,r){if(ao(e)?(r=e,e=t=null):ao(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(e,t,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};Ot.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Ot.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Ot.prototype.setTimeout=function(e,t){var r=this;function n(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function o(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(i)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Ot.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Ot.prototype,e,{get:function(){return this._currentRequest[e]}})});Ot.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Ot.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of kp)n.on(o,Ip[o]);if(this._currentUrl=/^\//.test(this._options.path)?cs.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,a=this._requestBodyBuffers;(function u(c){if(n===i._currentRequest)if(c)i.emit("error",c);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,u)}else i._ended&&n.end()})()}};Ot.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Op(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new d1;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_p(/^content-/i,this._options.headers));var i=_p(/^host$/i,this._options.headers),a=Np(this._currentUrl),u=i||a.host,c=/^\w+:/.test(r)?this._currentUrl:cs.format(Object.assign(a,{host:u})),l=g1(r,c);if(yC("redirecting to",l.href),this._isRedirect=!0,Ap(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!y1(l.host,u))&&_p(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),ao(o)){var p={headers:e.headers,statusCode:t},d={url:c,method:s,headers:n};o(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function DC(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var o=n+":",s=r[o]=e[n],i=t[n]=Object.create(s);function a(c,l,p){return v1(c)?c=Ap(c):so(c)?c=Ap(Np(c)):(p=l,l=CC(c),c={protocol:o}),ao(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=r,!so(l.host)&&!so(l.hostname)&&(l.hostname="::1"),Rp.equal(l.protocol,o,"protocol mismatch"),yC("options",l),new Ot(l,p)}function u(c,l,p){var d=i.request(c,l,p);return d.end(),d}Object.defineProperties(i,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function vC(){}function Np(e){var t;if($p)t=new us(e);else if(t=CC(cs.parse(e)),!so(t.protocol))throw new Pp({input:e});return t}function g1(e,t){return $p?new us(e,t):Np(cs.resolve(t,e))}function CC(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Pp({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Pp({input:e.href||e});return e}function Ap(e,t){var r=t||{};for(var n of p1)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function _p(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function ls(e,t,r){function n(o){ao(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function Op(e,t){for(var r of kp)e.removeListener(r,Ip[r]);e.on("error",vC),e.destroy(t)}function y1(e,t){Rp(so(e)&&so(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function so(e){return typeof e=="string"||e instanceof String}function ao(e){return typeof e=="function"}function D1(e){return typeof e=="object"&&"length"in e}function v1(e){return us&&e instanceof us}Mp.exports=DC({http:c1,https:l1});Mp.exports.wrap=DC});var ps=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isSSL=void 0;Zt.setupOutgoing=x1;Zt.setupSocket=S1;Zt.getPort=E1;Zt.hasEncryptedConnection=SC;Zt.urlJoin=EC;Zt.rewriteCookieProperty=_C;Zt.toURL=PC;var C1=require("node:tls"),w1=/(^|,)\s*upgrade\s*($|,)/i;Zt.isSSL=/^https|wss/;var b1="trailer",bC=[":method",":path",":scheme",":authority","connection","keep-alive"];function x1(e,t,r,n){let o=t[n||"target"];e.port=+(o.port??(o.protocol!==void 0&&Zt.isSSL.test(o.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=o[a];e.method=t.method||r.method,e.headers={...r.headers},r.headers?.[":authority"]&&(e.headers.host=r.headers[":authority"]),t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(b1==a.toLowerCase()){delete e.headers[a];break}if(r.httpVersionMajor>1)for(let a of bC)delete e.headers[a];t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),o.protocol!==void 0&&Zt.isSSL.test(o.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!w1.test(e.headers.connection))&&(e.headers.connection="close"));let s=o&&t.prependPath!==!1&&"pathname"in o?xC(`${o.pathname}${o.search??""}`):"/",i=t.toProxy?r.url:xC(r.url);if(i=t.ignorePath?"":i,e.path=EC(s,i??""),t.changeOrigin&&(e.headers.host=o.protocol!==void 0&&P1(e.port,o.protocol)&&!_1(e.host)?e.host+":"+e.port:e.host),e.url="href"in o&&o.href||(o.protocol==="https"?"https":"http")+"://"+e.host+(e.port?":"+e.port:""),r.httpVersionMajor>1)for(let a of bC)delete e.headers[a];return e}function S1(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function E1(e){let t=e.headers[":authority"]||e.headers.host,r=t?t.match(/:(\d+)/):"";return r?r[1]:SC(e)?"443":"80"}function SC(e){let t=e.connection;return t instanceof C1.TLSSocket&&t.encrypted||!!t.pair}function EC(...e){let t=[],r="";e.forEach((o,s)=>{let i=o.indexOf("?");i!==-1&&(t.push(o.substring(i+1)),e[s]=o.substring(0,i))}),r=t.filter(Boolean).join("&");let n="";for(let o of e)o&&(n.endsWith("/")?o.startsWith("/")?n+=o.slice(1):n+=o:o.startsWith("/")?n+=o:n+="/"+o);return r?n+"?"+r:n}function _C(e,t,r){return Array.isArray(e)?e.map(n=>_C(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,o,s)=>{let i;if(s in t)i=t[s];else if("*"in t)i=t["*"];else return n;return i?o+i:""})}function _1(e){return!!~e.indexOf(":")}function xC(e){if(e===""||e?.startsWith("?"))return e;let t=PC(e);return`${t.pathname??""}${t.search??""}`}function PC(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://base.invalid${e}`),new URL(e,"http://base.invalid"))}function P1(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var Lp=S(_t=>{"use strict";var T1=_t&&_t.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),A1=_t&&_t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),F1=_t&&_t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&T1(r,t,n[o]);return A1(r,t),r}})();Object.defineProperty(_t,"__esModule",{value:!0});_t.OUTGOING_PASSES=void 0;_t.removeChunked=TC;_t.setConnection=AC;_t.setRedirectHostRewrite=FC;_t.writeHeaders=RC;_t.writeStatusCode=$C;var wu=F1(ps()),R1=/^201|30(1|2|7|8)$/;function TC(e,t,r){delete r.headers["transfer-encoding"]}function AC(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function FC(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&R1.test(`${r.statusCode}`)){let o=wu.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let i=wu.toURL(s);if(o.host!=i.host)return;n.hostRewrite?i.host=n.hostRewrite:n.autoRewrite&&(i.host=e.headers[":authority"]??e.headers.host??""),n.protocolRewrite&&(i.protocol=n.protocolRewrite),r.headers.location=i.toString()}}function RC(e,t,r,n){let o=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,i=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(o&&c.toLowerCase()==="set-cookie"&&(l=wu.rewriteCookieProperty(l,o,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=wu.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(i&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c;if(e.httpVersionMajor>1&&(l==="connection"||l==="keep-alive"))continue;let p=r.headers[l];i&&u&&(l=u[l]??l),a(l,p)}}function $C(e,t,r){t.statusCode=r.statusCode,r.statusMessage&&e.httpVersionMajor===1&&(t.statusMessage=r.statusMessage)}_t.OUTGOING_PASSES={removeChunked:TC,setConnection:AC,setRedirectHostRewrite:FC,writeHeaders:RC,writeStatusCode:$C}});var LC=S(Mt=>{"use strict";var $1=Mt&&Mt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),k1=Mt&&Mt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bu=Mt&&Mt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&$1(r,t,n[o]);return k1(r,t),r}})();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.WEB_PASSES=void 0;Mt.deleteLength=IC;Mt.timeout=NC;Mt.XHeaders=OC;Mt.stream=MC;var I1=bu(require("node:http")),N1=bu(require("node:https")),O1=bu(wC()),Ko=bu(ps()),M1=Lp(),L1=require("node:stream"),kC=Object.values(M1.OUTGOING_PASSES),B1={http:I1,https:N1};function IC(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function NC(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function OC(e,t,r){if(!r.xfwd)return;let n=Ko.hasEncryptedConnection(e),o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Ko.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+o[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers[":authority"]||e.headers.host||""}function MC(e,t,r,n,o,s){if(o.emit("start",e,t,r.target||r.forward),r.fetch||r.fetchOptions||process.env.FORCE_FETCH_PATH==="true")return z1(e,t,r,n,o,s);let i=r.followRedirects?O1:B1,a=i.http,u=i.https;if(r.forward){let m=r.forward.protocol==="https:"?u:a,f=Ko.setupOutgoing(r.ssl||{},r,e,"forward"),g=m.request(f),y=h(g,r.forward);if(e.on("error",y),g.on("error",y),(r.buffer||e).pipe(g),!r.target)return t.end()}let c=r.target.protocol==="https:"?u:a,l=Ko.setupOutgoing(r.ssl||{},r,e),p=c.request(l);p.on("socket",m=>{o&&!p.getHeader("expect")&&o.emit("proxyReq",p,e,t,r,m)}),r.proxyTimeout&&p.setTimeout(r.proxyTimeout,()=>{p.destroy()}),t.on("close",()=>{!t.writableFinished&&p.destroy()});let d=h(p,r.target);e.on("error",d),p.on("error",d);function h(m,f){return g=>{if(e.socket.destroyed&&g.code==="ECONNRESET"){o.emit("econnreset",g,e,t,f),m.destroy();return}s?s(g,e,t,f):o.emit("error",g,e,t,f)}}(r.buffer||e).pipe(p),p.on("response",m=>{if(o?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let f of kC)f(e,t,m,r);t.finished?o?.emit("end",e,t,m):(m.on("end",()=>{o?.emit("end",e,t,m)}),r.selfHandleResponse||m.pipe(t))})}async function z1(e,t,r,n,o,s){let i=(h,m)=>{let f=h;f.code===void 0&&f.cause?.code&&(f.code=f.cause.code),s?s(h,e,t,m):o.emit("error",h,e,t,m)};e.on("error",h=>{if(e.socket.destroyed&&h.code==="ECONNRESET"){let m=r.target||r.forward;m&&o.emit("econnreset",h,e,t,m);return}i(h)});let a=r.fetch||fetch,u=r.fetchOptions??{},c=h=>{let m={method:h.method,...u.requestOptions},f=new Headers(u.requestOptions?.headers);if(!u.requestOptions?.headers&&h.headers){for(let[g,y]of Object.entries(h.headers))if(typeof g=="string")if(Array.isArray(y))for(let b of y)f.append(g,b);else y!=null&&f.append(g,y)}return r.auth&&f.set("authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`),r.proxyTimeout&&(m.signal=AbortSignal.timeout(r.proxyTimeout)),m.headers=f,r.buffer?m.body=r.buffer:e.method!=="GET"&&e.method!=="HEAD"&&(m.body=e,m.duplex="half"),m};if(r.forward){let h=Ko.setupOutgoing(r.ssl||{},r,e,"forward"),m=c(h),f=new URL(h.url).origin+h.path;if(f.startsWith("ws")&&(f=f.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(m,e,t,r)}catch(g){i(g,r.forward);return}try{let g=await a(f,m);if(u.onAfterResponse)try{await u.onAfterResponse(g,e,t,r)}catch(y){i(y,r.forward);return}}catch(g){i(g,r.forward)}if(!r.target)return t.end()}let l=Ko.setupOutgoing(r.ssl||{},r,e),p=c(l),d=new URL(l.url).origin+l.path;if(d.startsWith("ws")&&(d=d.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(p,e,t,r)}catch(h){i(h,r.target);return}try{let h=await a(d,p);if(u.onAfterResponse)try{await u.onAfterResponse(h,e,t,r)}catch(f){i(f,r.target);return}let m={statusCode:h.status,statusMessage:h.statusText,headers:Object.fromEntries(h.headers.entries()),rawHeaders:Object.entries(h.headers).flatMap(([f,g])=>Array.isArray(g)?g.flatMap(y=>y!=null?[f,y]:[]):g!=null?[f,g]:[])};if(o?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let f of kC)f(e,t,m,r);if(t.writableEnded)o?.emit("end",e,t,m);else{let f=h.body?L1.Readable.from(h.body):null;f?(f.on("error",g=>{i(g,r.target)}),f.on("end",()=>{o?.emit("end",e,t,m)}),r.selfHandleResponse?f.resume():f.pipe(t,{end:!0})):o?.emit("end",e,t,m)}}catch(h){i(h,r.target)}}Mt.WEB_PASSES={deleteLength:IC,timeout:NC,XHeaders:OC,stream:MC}});var Vp=S(yt=>{"use strict";var j1=yt&&yt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),U1=yt&&yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Up=yt&&yt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&j1(r,t,n[o]);return U1(r,t),r}})(),V1=yt&&yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});yt.WS_PASSES=void 0;yt.numOpenSockets=Z1;yt.checkMethodAndHeader=zC;yt.XHeaders=jC;yt.stream=UC;var H1=Up(require("node:http")),q1=Up(require("node:https")),Go=Up(ps()),K1=Lp(),G1=V1(Cu()),Wo=(0,G1.default)("http-proxy-3:ws-incoming"),W1=Object.values(K1.OUTGOING_PASSES);function BC(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),Wo("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var Bp=BC("socket"),zp=BC("proxySocket"),jp=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(t,r){return this.headers[t]=r,this}};function Z1(){return Bp()+zp()}function zC(e,t){if(Wo("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function jC(e,t,r){if(!r.xfwd)return;Wo("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Go.getPort(e),proto:Go.hasEncryptedConnection(e)?"wss":"ws"};for(let o of["for","port","proto"])e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o]}function UC(e,t,r,n,o,s){Wo("websocket: new stream");let i=[];Bp({add:t});let a=()=>{for(let h of i)h.end()};t.on("close",()=>{Bp({rm:t}),a()}),t.on("error",a);let u=(h,m)=>Object.keys(m).reduce((f,g)=>{let y=m[g];if(!Array.isArray(y))return f.push(g+": "+y),f;for(let b=0;b<y.length;b++)f.push(g+": "+y[b]);return f},[h]).join(`\r
21
21
  `)+`\r
22
22
  \r
23
23
  `;Go.setupSocket(t),n&&n.length&&t.unshift(n);let c=Go.isSSL.test(r.target.protocol)?q1:H1,l=Go.setupOutgoing(r.ssl||{},r,e),p=c.request(l);o&&o.emit("proxyReqWs",p,e,t,r,n),p.on("error",d),p.on("upgrade",(h,m,f)=>{Wo("upgrade"),zp({add:m}),i.push(m),m.on("close",()=>{zp({rm:m})}),m.on("error",d),m.on("end",()=>{o.emit("close",h,m,f)}),m.on("close",()=>{t.end()}),Go.setupSocket(m),f&&f.length&&m.unshift(f),t.write(u("HTTP/1.1 101 Switching Protocols",h.headers)),m.pipe(t).pipe(m),o.emit("open",m)});function d(h){s?s(h,e,t):o.emit("error",h,e,t),t.destroySoon()}p.on("response",h=>{Wo("got non-ws HTTP response",{statusCode:h.statusCode,statusMessage:h.statusMessage});let m=new jp;for(let y of W1)y(e,m,h,r);let f=y=>{t.write(y)};e.httpVersion==="1.1"&&h.headers["content-length"]===void 0&&(m.headers["transfer-encoding"]="chunked",f=y=>{t.write(y.length.toString(16)),t.write(`\r
24
24
  `),t.write(y),t.write(`\r
25
- `)});let g=u(`HTTP/${e.httpVersion} ${h.statusCode} ${h.statusMessage}`,m.headers);t.destroyed?h.resume():(t.write(g),h.on("data",y=>{f(y)}),h.on("end",()=>{f(""),t.destroySoon()}))}),p.end()}yt.WS_PASSES={checkMethodAndHeader:zC,XHeaders:jC,stream:UC}});var HC=S(lr=>{"use strict";var J1=lr&&lr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Y1=lr&&lr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),VC=lr&&lr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&J1(r,t,n[o]);return Y1(r,t),r}})(),Q1=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lr,"__esModule",{value:!0});lr.ProxyServer=void 0;var X1=VC(require("node:http")),eN=VC(require("node:http2")),tN=LC(),rN=Vp(),nN=require("node:events"),oN=Q1(Cu()),iN=ps(),xu=(0,oN.default)("http-proxy-3"),Hp=class e extends nN.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(xu("createRightProxy",{type:r}),n=>(...o)=>{let s=o[0];xu("proxy: ",{type:r,path:s.url});let i=o[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&i.on("error",d=>{this.emit("error",d,s,i)});let u=o.length-1,c,l;typeof o[u]=="function"&&(l=o[u],u--);let p;!(o[u]instanceof Buffer)&&o[u]!==i?(p={...n,...o[u]},u--):p={...n},o[u]instanceof Buffer&&(c=o[u]);for(let d of["target","forward"])typeof p[d]=="string"&&(p[d]=(0,iN.toURL)(p[d]));if(!p.target&&!p.forward){this.emit("error",new Error("Must set target or forward"),s,i);return}for(let d of a)if(d(s,i,p,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{xu("listen",{port:r,hostname:n});let o=(s,i)=>{this.web(s,i)};return this._server=this.options.ssl?eN.createSecureServer({...this.options.ssl,allowHTTP1:!0},o):X1.createServer(o),this.options.ws&&this._server.on("upgrade",(s,i,a)=>{this.ws(s,i,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i,0,o)},this.after=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i++,0,o)},xu("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(tN.WEB_PASSES),this.wsPasses=Object.values(rN.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};lr.ProxyServer=Hp});var qC=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.numOpenSockets=Jr.ProxyServer=void 0;Jr.createProxyServer=Kp;Jr.createServer=Kp;Jr.createProxy=Kp;var qp=HC();Object.defineProperty(Jr,"ProxyServer",{enumerable:!0,get:function(){return qp.ProxyServer}});var sN=Vp();Object.defineProperty(Jr,"numOpenSockets",{enumerable:!0,get:function(){return sN.numOpenSockets}});function Kp(e={}){return new qp.ProxyServer(e)}Jr.default=qp.ProxyServer});var WC=S(Gp=>{"use strict";Gp.parse=fN;Gp.serialize=mN;var aN=Object.prototype.toString,uN=Object.prototype.hasOwnProperty,cN=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lN=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,pN=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,dN=/^[\u0020-\u003A\u003D-\u007E]*$/;function fN(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var o=t&&t.decode||hN,s=0,i=0,a=0;do{if(i=e.indexOf("=",s),i===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(i>a){s=e.lastIndexOf(";",i-1)+1;continue}var u=KC(e,s,i),c=GC(e,i,u),l=e.slice(u,c);if(!uN.call(r,l)){var p=KC(e,i+1,a),d=GC(e,a,p);e.charCodeAt(p)===34&&e.charCodeAt(d-1)===34&&(p++,d--);var h=e.slice(p,d);r[l]=yN(h,o)}s=a+1}while(s<n);return r}function KC(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function GC(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function mN(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!cN.test(e))throw new TypeError("argument name is invalid");var o=n(t);if(!lN.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(!r)return s;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+i}if(r.domain){if(!pN.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!dN.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!gN(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function hN(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function gN(e){return aN.call(e)==="[object Date]"}function yN(e,t){try{return t(e)}catch{return e}}});var YC=S(Su=>{var JC=require("crypto");Su.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+JC.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};Su.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=Su.sign(r,t);return ZC(n)==ZC(e)?r:!1};function ZC(e){return JC.createHash("sha1").update(e).digest("hex")}});var tw=S((uJ,Zo)=>{"use strict";var DN=WC(),vN=YC();Zo.exports=CN;Zo.exports.JSONCookie=QC;Zo.exports.JSONCookies=Wp;Zo.exports.signedCookie=XC;Zo.exports.signedCookies=ew;function CN(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(o,s,i){if(o.cookies)return i();var a=o.headers.cookie;if(o.secret=r[0],o.cookies=Object.create(null),o.signedCookies=Object.create(null),!a)return i();o.cookies=DN.parse(a,t),r.length!==0&&(o.signedCookies=ew(o.cookies,r),o.signedCookies=Wp(o.signedCookies)),o.cookies=Wp(o.cookies),i()}}function QC(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function Wp(e){for(var t=Object.keys(e),r,n,o=0;o<t.length;o++)r=t[o],n=QC(e[r]),n&&(e[r]=n);return e}function XC(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var o=vN.unsign(e.slice(2),r[n]);if(o!==!1)return o}return!1}}function ew(e,t){for(var r=Object.keys(e),n,o,s=Object.create(null),i,a=0;a<r.length;a++)o=r[a],i=e[o],n=XC(i,t),i!==n&&(s[o]=n,delete e[o]);return s}});var Fs=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var Ts=class{};le._CodeOrName=Ts;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var po=class extends Ts{constructor(t){if(super(),!le.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=po;var fr=class extends Ts{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof po&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=fr;le.nil=new fr("");function X0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)lf(r,t[n]),r.push(e[++n]);return new fr(r)}le._=X0;var cf=new fr("+");function eS(e,...t){let r=[As(e[0])],n=0;for(;n<t.length;)r.push(cf),lf(r,t[n]),r.push(cf,As(e[++n]));return jM(r),new fr(r)}le.str=eS;function lf(e,t){t instanceof fr?e.push(...t._items):t instanceof po?e.push(t):e.push(HM(t))}le.addCodeArg=lf;function jM(e){let t=1;for(;t<e.length-1;){if(e[t]===cf){let r=UM(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function UM(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof po||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof po))return`"${e}${t.slice(1)}`}function VM(e,t){return t.emptyStr()?e:e.emptyStr()?t:eS`${e}${t}`}le.strConcat=VM;function HM(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:As(Array.isArray(e)?e.join(","):e)}function qM(e){return new fr(As(e))}le.stringify=qM;function As(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=As;function KM(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new fr(`.${e}`):X0`[${e}]`}le.getProperty=KM;function GM(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new fr(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=GM;function WM(e){return new fr(e.toString())}le.regexpCode=WM});var ff=S(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.ValueScope=zt.ValueScopeName=zt.Scope=zt.varKinds=zt.UsedValueState=void 0;var Bt=Fs(),pf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ku;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ku||(zt.UsedValueState=Ku={}));zt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Gu=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Bt.Name?t:this.name(t)}name(t){return new Bt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};zt.Scope=Gu;var Wu=class extends Bt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Bt._)`.${new Bt.Name(r)}[${n}]`}};zt.ValueScopeName=Wu;var ZM=(0,Bt._)`\n`,df=class extends Gu{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?ZM:Bt.nil}}get(){return this._scope}name(t){return new Wu(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let u=this._scope[s]||(this._scope[s]=[]),c=u.length;return u[c]=r.ref,o.setValue(r,{property:s,itemIndex:c}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Bt._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let s=Bt.nil;for(let i in t){let a=t[i];if(!a)continue;let u=n[i]=n[i]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,Ku.Started);let l=r(c);if(l){let p=this.opts.es5?zt.varKinds.var:zt.varKinds.const;s=(0,Bt._)`${s}${p} ${c} = ${l};${this.opts._n}`}else if(l=o?.(c))s=(0,Bt._)`${s}${l}${this.opts._n}`;else throw new pf(c);u.set(c,Ku.Completed)})}return s}};zt.ValueScope=df});var Q=S(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.or=X.and=X.not=X.CodeGen=X.operators=X.varKinds=X.ValueScopeName=X.ValueScope=X.Scope=X.Name=X.regexpCode=X.stringify=X.getProperty=X.nil=X.strConcat=X.str=X._=void 0;var ie=Fs(),_r=ff(),Nn=Fs();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return Nn._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return Nn.str}});Object.defineProperty(X,"strConcat",{enumerable:!0,get:function(){return Nn.strConcat}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return Nn.nil}});Object.defineProperty(X,"getProperty",{enumerable:!0,get:function(){return Nn.getProperty}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return Nn.stringify}});Object.defineProperty(X,"regexpCode",{enumerable:!0,get:function(){return Nn.regexpCode}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return Nn.Name}});var Qu=ff();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return Qu.Scope}});Object.defineProperty(X,"ValueScope",{enumerable:!0,get:function(){return Qu.ValueScope}});Object.defineProperty(X,"ValueScopeName",{enumerable:!0,get:function(){return Qu.ValueScopeName}});Object.defineProperty(X,"varKinds",{enumerable:!0,get:function(){return Qu.varKinds}});X.operators={GT:new ie._Code(">"),GTE:new ie._Code(">="),LT:new ie._Code("<"),LTE:new ie._Code("<="),EQ:new ie._Code("==="),NEQ:new ie._Code("!=="),NOT:new ie._Code("!"),OR:new ie._Code("||"),AND:new ie._Code("&&"),ADD:new ie._Code("+")};var yn=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},mf=class extends yn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?_r.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=si(this.rhs,t,r)),this}get names(){return this.rhs instanceof ie._CodeOrName?this.rhs.names:{}}},Zu=class extends yn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ie.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=si(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ie.Name?{}:{...this.lhs.names};return Yu(t,this.rhs)}},hf=class extends Zu{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},gf=class extends yn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},yf=class extends yn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Df=class extends yn{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},vf=class extends yn{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=si(this.code,t,r),this}get names(){return this.code instanceof ie._CodeOrName?this.code.names:{}}},Rs=class extends yn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(t,r)||(JM(t,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>ho(t,r.names),{})}},Dn=class extends Rs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Cf=class extends Rs{},ii=class extends Dn{};ii.kind="else";var fo=class e extends Dn{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ii(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(tS(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=si(this.condition,t,r),this}get names(){let t=super.names;return Yu(t,this.condition),this.else&&ho(t,this.else.names),t}};fo.kind="if";var mo=class extends Dn{};mo.kind="for";var wf=class extends mo{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=si(this.iteration,t,r),this}get names(){return ho(super.names,this.iteration.names)}},bf=class extends mo{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?_r.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=Yu(super.names,this.from);return Yu(t,this.to)}},Ju=class extends mo{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=si(this.iterable,t,r),this}get names(){return ho(super.names,this.iterable.names)}},$s=class extends Dn{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};$s.kind="func";var ks=class extends Rs{render(t){return"return "+super.render(t)}};ks.kind="return";var xf=class extends Dn{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&ho(t,this.catch.names),this.finally&&ho(t,this.finally.names),t}},Is=class extends Dn{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Is.kind="catch";var Ns=class extends Dn{render(t){return"finally"+super.render(t)}};Ns.kind="finally";var Sf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
26
- `:""},this._extScope=t,this._scope=new _r.Scope({parent:t}),this._nodes=[new Cf]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new mf(t,s,n)),s}const(t,r,n){return this._def(_r.varKinds.const,t,r,n)}let(t,r,n){return this._def(_r.varKinds.let,t,r,n)}var(t,r,n){return this._def(_r.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Zu(t,r,n))}add(t,r){return this._leafNode(new hf(t,X.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ie.nil&&this._leafNode(new vf(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ie.addCodeArg)(r,o));return r.push("}"),new ie._Code(r)}if(t,r,n){if(this._blockNode(new fo(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new fo(t))}else(){return this._elseNode(new ii)}endIf(){return this._endBlockNode(fo,ii)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new wf(t),r)}forRange(t,r,n,o,s=this.opts.es5?_r.varKinds.var:_r.varKinds.let){let i=this._scope.toName(t);return this._for(new bf(s,i,r,n),()=>o(i))}forOf(t,r,n,o=_r.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let i=r instanceof ie.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ie._)`${i}.length`,a=>{this.var(s,(0,ie._)`${i}[${a}]`),n(s)})}return this._for(new Ju("of",o,s,r),()=>n(s))}forIn(t,r,n,o=this.opts.es5?_r.varKinds.var:_r.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ie._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new Ju("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(mo)}label(t){return this._leafNode(new gf(t))}break(t){return this._leafNode(new yf(t))}return(t){let r=new ks;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ks)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new xf;if(this._blockNode(o),this.code(t),r){let s=this.name("e");this._currNode=o.catch=new Is(s),r(s)}return n&&(this._currNode=o.finally=new Ns,this.code(n)),this._endBlockNode(Is,Ns)}throw(t){return this._leafNode(new Df(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ie.nil,n,o){return this._blockNode(new $s(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode($s)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof fo))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};X.CodeGen=Sf;function ho(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Yu(e,t){return t instanceof ie._CodeOrName?ho(e,t.names):e}function si(e,t,r){if(e instanceof ie.Name)return n(e);if(!o(e))return e;return new ie._Code(e._items.reduce((s,i)=>(i instanceof ie.Name&&(i=n(i)),i instanceof ie._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||t[s.str]!==1?s:(delete t[s.str],i)}function o(s){return s instanceof ie._Code&&s._items.some(i=>i instanceof ie.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function JM(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function tS(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ie._)`!${Ef(e)}`}X.not=tS;var YM=rS(X.operators.AND);function QM(...e){return e.reduce(YM)}X.and=QM;var XM=rS(X.operators.OR);function eL(...e){return e.reduce(XM)}X.or=eL;function rS(e){return(t,r)=>t===ie.nil?r:r===ie.nil?t:(0,ie._)`${Ef(t)} ${e} ${Ef(r)}`}function Ef(e){return e instanceof ie.Name?e:(0,ie._)`(${e})`}});var pe=S(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.checkStrictMode=te.getErrorPath=te.Type=te.useFunc=te.setEvaluated=te.evaluatedPropsToName=te.mergeEvaluated=te.eachItem=te.unescapeJsonPointer=te.escapeJsonPointer=te.escapeFragment=te.unescapeFragment=te.schemaRefOrVal=te.schemaHasRulesButRef=te.schemaHasRules=te.checkUnknownRules=te.alwaysValidSchema=te.toHash=void 0;var xe=Q(),tL=Fs();function rL(e){let t={};for(let r of e)t[r]=!0;return t}te.toHash=rL;function nL(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(iS(e,t),!sS(t,e.self.RULES.all))}te.alwaysValidSchema=nL;function iS(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let s in t)o[s]||cS(e,`unknown keyword: "${s}"`)}te.checkUnknownRules=iS;function sS(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}te.schemaHasRules=sS;function oL(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}te.schemaHasRulesButRef=oL;function iL({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,xe._)`${r}`}return(0,xe._)`${e}${t}${(0,xe.getProperty)(n)}`}te.schemaRefOrVal=iL;function sL(e){return aS(decodeURIComponent(e))}te.unescapeFragment=sL;function aL(e){return encodeURIComponent(Pf(e))}te.escapeFragment=aL;function Pf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}te.escapeJsonPointer=Pf;function aS(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}te.unescapeJsonPointer=aS;function uL(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}te.eachItem=uL;function nS({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let u=i===void 0?s:i instanceof xe.Name?(s instanceof xe.Name?e(o,s,i):t(o,s,i),i):s instanceof xe.Name?(t(o,i,s),s):r(s,i);return a===xe.Name&&!(u instanceof xe.Name)?n(o,u):u}}te.mergeEvaluated={props:nS({mergeNames:(e,t,r)=>e.if((0,xe._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,xe._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,xe._)`${r} || {}`).code((0,xe._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,xe._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,xe._)`${r} || {}`),Tf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:uS}),items:nS({mergeNames:(e,t,r)=>e.if((0,xe._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,xe._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,xe._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,xe._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function uS(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,xe._)`{}`);return t!==void 0&&Tf(e,r,t),r}te.evaluatedPropsToName=uS;function Tf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,xe._)`${t}${(0,xe.getProperty)(n)}`,!0))}te.setEvaluated=Tf;var oS={};function cL(e,t){return e.scopeValue("func",{ref:t,code:oS[t.code]||(oS[t.code]=new tL._Code(t.code))})}te.useFunc=cL;var _f;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(_f||(te.Type=_f={}));function lL(e,t,r){if(e instanceof xe.Name){let n=t===_f.Num;return r?n?(0,xe._)`"[" + ${e} + "]"`:(0,xe._)`"['" + ${e} + "']"`:n?(0,xe._)`"/" + ${e}`:(0,xe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,xe.getProperty)(e).toString():"/"+Pf(e)}te.getErrorPath=lL;function cS(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}te.checkStrictMode=cS});var vn=S(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var vt=Q(),pL={data:new vt.Name("data"),valCxt:new vt.Name("valCxt"),instancePath:new vt.Name("instancePath"),parentData:new vt.Name("parentData"),parentDataProperty:new vt.Name("parentDataProperty"),rootData:new vt.Name("rootData"),dynamicAnchors:new vt.Name("dynamicAnchors"),vErrors:new vt.Name("vErrors"),errors:new vt.Name("errors"),this:new vt.Name("this"),self:new vt.Name("self"),scope:new vt.Name("scope"),json:new vt.Name("json"),jsonPos:new vt.Name("jsonPos"),jsonLen:new vt.Name("jsonLen"),jsonPart:new vt.Name("jsonPart")};Af.default=pL});var Os=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.extendErrors=Ct.resetErrorsCount=Ct.reportExtraError=Ct.reportError=Ct.keyword$DataError=Ct.keywordError=void 0;var ue=Q(),Xu=pe(),Pt=vn();Ct.keywordError={message:({keyword:e})=>(0,ue.str)`must pass "${e}" keyword validation`};Ct.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ue.str)`"${e}" keyword must be ${t} ($data)`:(0,ue.str)`"${e}" keyword is invalid ($data)`};function dL(e,t=Ct.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,u=dS(e,t,r);n??(i||a)?lS(s,u):pS(o,(0,ue._)`[${u}]`)}Ct.reportError=dL;function fL(e,t=Ct.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=dS(e,t,r);lS(o,a),s||i||pS(n,Pt.default.vErrors)}Ct.reportExtraError=fL;function mL(e,t){e.assign(Pt.default.errors,t),e.if((0,ue._)`${Pt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ue._)`${Pt.default.vErrors}.length`,t),()=>e.assign(Pt.default.vErrors,null)))}Ct.resetErrorsCount=mL;function hL({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,Pt.default.errors,a=>{e.const(i,(0,ue._)`${Pt.default.vErrors}[${a}]`),e.if((0,ue._)`${i}.instancePath === undefined`,()=>e.assign((0,ue._)`${i}.instancePath`,(0,ue.strConcat)(Pt.default.instancePath,s.errorPath))),e.assign((0,ue._)`${i}.schemaPath`,(0,ue.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,ue._)`${i}.schema`,r),e.assign((0,ue._)`${i}.data`,n))})}Ct.extendErrors=hL;function lS(e,t){let r=e.const("err",t);e.if((0,ue._)`${Pt.default.vErrors} === null`,()=>e.assign(Pt.default.vErrors,(0,ue._)`[${r}]`),(0,ue._)`${Pt.default.vErrors}.push(${r})`),e.code((0,ue._)`${Pt.default.errors}++`)}function pS(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,ue._)`new ${e.ValidationError}(${t})`):(r.assign((0,ue._)`${n}.errors`,t),r.return(!1))}var go={keyword:new ue.Name("keyword"),schemaPath:new ue.Name("schemaPath"),params:new ue.Name("params"),propertyName:new ue.Name("propertyName"),message:new ue.Name("message"),schema:new ue.Name("schema"),parentSchema:new ue.Name("parentSchema")};function dS(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ue._)`{}`:gL(e,t,r)}function gL(e,t,r={}){let{gen:n,it:o}=e,s=[yL(o,r),DL(e,r)];return vL(e,t,s),n.object(...s)}function yL({errorPath:e},{instancePath:t}){let r=t?(0,ue.str)`${e}${(0,Xu.getErrorPath)(t,Xu.Type.Str)}`:e;return[Pt.default.instancePath,(0,ue.strConcat)(Pt.default.instancePath,r)]}function DL({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,ue.str)`${t}/${e}`;return r&&(o=(0,ue.str)`${o}${(0,Xu.getErrorPath)(r,Xu.Type.Str)}`),[go.schemaPath,o]}function vL(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:p}=a;n.push([go.keyword,o],[go.params,typeof t=="function"?t(e):t||(0,ue._)`{}`]),u.messages&&n.push([go.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([go.schema,i],[go.parentSchema,(0,ue._)`${l}${p}`],[Pt.default.data,s]),c&&n.push([go.propertyName,c])}});var mS=S(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.boolOrEmptySchema=ai.topBoolOrEmptySchema=void 0;var CL=Os(),wL=Q(),bL=vn(),xL={message:"boolean schema is false"};function SL(e){let{gen:t,schema:r,validateName:n}=e;r===!1?fS(e,!1):typeof r=="object"&&r.$async===!0?t.return(bL.default.data):(t.assign((0,wL._)`${n}.errors`,null),t.return(!0))}ai.topBoolOrEmptySchema=SL;function EL(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),fS(e)):r.var(t,!0)}ai.boolOrEmptySchema=EL;function fS(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,CL.reportError)(o,xL,void 0,t)}});var Ff=S(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.getRules=ui.isJSONType=void 0;var _L=["string","number","integer","boolean","null","object","array"],PL=new Set(_L);function TL(e){return typeof e=="string"&&PL.has(e)}ui.isJSONType=TL;function AL(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ui.getRules=AL});var Rf=S(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.shouldUseRule=On.shouldUseGroup=On.schemaHasRulesForType=void 0;function FL({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&hS(e,n)}On.schemaHasRulesForType=FL;function hS(e,t){return t.rules.some(r=>gS(e,r))}On.shouldUseGroup=hS;function gS(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}On.shouldUseRule=gS});var Ms=S(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.reportTypeError=wt.checkDataTypes=wt.checkDataType=wt.coerceAndCheckDataType=wt.getJSONTypes=wt.getSchemaTypes=wt.DataType=void 0;var RL=Ff(),$L=Rf(),kL=Os(),J=Q(),yS=pe(),ci;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ci||(wt.DataType=ci={}));function IL(e){let t=DS(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}wt.getSchemaTypes=IL;function DS(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(RL.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}wt.getJSONTypes=DS;function NL(e,t){let{gen:r,data:n,opts:o}=e,s=OL(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&(0,$L.schemaHasRulesForType)(e,t[0]));if(i){let a=kf(t,n,o.strictNumbers,ci.Wrong);r.if(a,()=>{s.length?ML(e,t,s):If(e)})}return i}wt.coerceAndCheckDataType=NL;var vS=new Set(["string","number","integer","boolean","null"]);function OL(e,t){return t?e.filter(r=>vS.has(r)||t==="array"&&r==="array"):[]}function ML(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",(0,J._)`typeof ${o}`),a=n.let("coerced",(0,J._)`undefined`);s.coerceTypes==="array"&&n.if((0,J._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,J._)`${o}[0]`).assign(i,(0,J._)`typeof ${o}`).if(kf(t,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,J._)`${a} !== undefined`);for(let c of r)(vS.has(c)||c==="array"&&s.coerceTypes==="array")&&u(c);n.else(),If(e),n.endIf(),n.if((0,J._)`${a} !== undefined`,()=>{n.assign(o,a),LL(e,a)});function u(c){switch(c){case"string":n.elseIf((0,J._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,J._)`"" + ${o}`).elseIf((0,J._)`${o} === null`).assign(a,(0,J._)`""`);return;case"number":n.elseIf((0,J._)`${i} == "boolean" || ${o} === null
25
+ `)});let g=u(`HTTP/${e.httpVersion} ${h.statusCode} ${h.statusMessage}`,m.headers);t.destroyed?h.resume():(t.write(g),h.on("data",y=>{f(y)}),h.on("end",()=>{f(""),t.destroySoon()}))}),p.end()}yt.WS_PASSES={checkMethodAndHeader:zC,XHeaders:jC,stream:UC}});var HC=S(lr=>{"use strict";var J1=lr&&lr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Y1=lr&&lr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),VC=lr&&lr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&J1(r,t,n[o]);return Y1(r,t),r}})(),Q1=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lr,"__esModule",{value:!0});lr.ProxyServer=void 0;var X1=VC(require("node:http")),eN=VC(require("node:http2")),tN=LC(),rN=Vp(),nN=require("node:events"),oN=Q1(Cu()),iN=ps(),xu=(0,oN.default)("http-proxy-3"),Hp=class e extends nN.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(xu("createRightProxy",{type:r}),n=>(...o)=>{let s=o[0];xu("proxy: ",{type:r,path:s.url});let i=o[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&i.on("error",d=>{this.emit("error",d,s,i)});let u=o.length-1,c,l;typeof o[u]=="function"&&(l=o[u],u--);let p;!(o[u]instanceof Buffer)&&o[u]!==i?(p={...n,...o[u]},u--):p={...n},o[u]instanceof Buffer&&(c=o[u]);for(let d of["target","forward"])typeof p[d]=="string"&&(p[d]=(0,iN.toURL)(p[d]));if(!p.target&&!p.forward){this.emit("error",new Error("Must set target or forward"),s,i);return}for(let d of a)if(d(s,i,p,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{xu("listen",{port:r,hostname:n});let o=(s,i)=>{this.web(s,i)};return this._server=this.options.ssl?eN.createSecureServer({...this.options.ssl,allowHTTP1:!0},o):X1.createServer(o),this.options.ws&&this._server.on("upgrade",(s,i,a)=>{this.ws(s,i,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i,0,o)},this.after=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i++,0,o)},xu("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(tN.WEB_PASSES),this.wsPasses=Object.values(rN.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};lr.ProxyServer=Hp});var qC=S(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.numOpenSockets=Jr.ProxyServer=void 0;Jr.createProxyServer=Kp;Jr.createServer=Kp;Jr.createProxy=Kp;var qp=HC();Object.defineProperty(Jr,"ProxyServer",{enumerable:!0,get:function(){return qp.ProxyServer}});var sN=Vp();Object.defineProperty(Jr,"numOpenSockets",{enumerable:!0,get:function(){return sN.numOpenSockets}});function Kp(e={}){return new qp.ProxyServer(e)}Jr.default=qp.ProxyServer});var WC=S(Gp=>{"use strict";Gp.parse=fN;Gp.serialize=mN;var aN=Object.prototype.toString,uN=Object.prototype.hasOwnProperty,cN=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lN=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,pN=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,dN=/^[\u0020-\u003A\u003D-\u007E]*$/;function fN(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var o=t&&t.decode||hN,s=0,i=0,a=0;do{if(i=e.indexOf("=",s),i===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(i>a){s=e.lastIndexOf(";",i-1)+1;continue}var u=KC(e,s,i),c=GC(e,i,u),l=e.slice(u,c);if(!uN.call(r,l)){var p=KC(e,i+1,a),d=GC(e,a,p);e.charCodeAt(p)===34&&e.charCodeAt(d-1)===34&&(p++,d--);var h=e.slice(p,d);r[l]=yN(h,o)}s=a+1}while(s<n);return r}function KC(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function GC(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function mN(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!cN.test(e))throw new TypeError("argument name is invalid");var o=n(t);if(!lN.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(!r)return s;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+i}if(r.domain){if(!pN.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!dN.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!gN(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function hN(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function gN(e){return aN.call(e)==="[object Date]"}function yN(e,t){try{return t(e)}catch{return e}}});var YC=S(Su=>{var JC=require("crypto");Su.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+JC.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};Su.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=Su.sign(r,t);return ZC(n)==ZC(e)?r:!1};function ZC(e){return JC.createHash("sha1").update(e).digest("hex")}});var tw=S((cJ,Zo)=>{"use strict";var DN=WC(),vN=YC();Zo.exports=CN;Zo.exports.JSONCookie=QC;Zo.exports.JSONCookies=Wp;Zo.exports.signedCookie=XC;Zo.exports.signedCookies=ew;function CN(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(o,s,i){if(o.cookies)return i();var a=o.headers.cookie;if(o.secret=r[0],o.cookies=Object.create(null),o.signedCookies=Object.create(null),!a)return i();o.cookies=DN.parse(a,t),r.length!==0&&(o.signedCookies=ew(o.cookies,r),o.signedCookies=Wp(o.signedCookies)),o.cookies=Wp(o.cookies),i()}}function QC(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function Wp(e){for(var t=Object.keys(e),r,n,o=0;o<t.length;o++)r=t[o],n=QC(e[r]),n&&(e[r]=n);return e}function XC(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var o=vN.unsign(e.slice(2),r[n]);if(o!==!1)return o}return!1}}function ew(e,t){for(var r=Object.keys(e),n,o,s=Object.create(null),i,a=0;a<r.length;a++)o=r[a],i=e[o],n=XC(i,t),i!==n&&(s[o]=n,delete e[o]);return s}});var Fs=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var Ts=class{};le._CodeOrName=Ts;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var po=class extends Ts{constructor(t){if(super(),!le.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=po;var fr=class extends Ts{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof po&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=fr;le.nil=new fr("");function X0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)lf(r,t[n]),r.push(e[++n]);return new fr(r)}le._=X0;var cf=new fr("+");function eS(e,...t){let r=[As(e[0])],n=0;for(;n<t.length;)r.push(cf),lf(r,t[n]),r.push(cf,As(e[++n]));return UM(r),new fr(r)}le.str=eS;function lf(e,t){t instanceof fr?e.push(...t._items):t instanceof po?e.push(t):e.push(qM(t))}le.addCodeArg=lf;function UM(e){let t=1;for(;t<e.length-1;){if(e[t]===cf){let r=VM(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function VM(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof po||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof po))return`"${e}${t.slice(1)}`}function HM(e,t){return t.emptyStr()?e:e.emptyStr()?t:eS`${e}${t}`}le.strConcat=HM;function qM(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:As(Array.isArray(e)?e.join(","):e)}function KM(e){return new fr(As(e))}le.stringify=KM;function As(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=As;function GM(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new fr(`.${e}`):X0`[${e}]`}le.getProperty=GM;function WM(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new fr(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=WM;function ZM(e){return new fr(e.toString())}le.regexpCode=ZM});var ff=S(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.ValueScope=zt.ValueScopeName=zt.Scope=zt.varKinds=zt.UsedValueState=void 0;var Bt=Fs(),pf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ku;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ku||(zt.UsedValueState=Ku={}));zt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Gu=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Bt.Name?t:this.name(t)}name(t){return new Bt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};zt.Scope=Gu;var Wu=class extends Bt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Bt._)`.${new Bt.Name(r)}[${n}]`}};zt.ValueScopeName=Wu;var JM=(0,Bt._)`\n`,df=class extends Gu{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?JM:Bt.nil}}get(){return this._scope}name(t){return new Wu(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let u=this._scope[s]||(this._scope[s]=[]),c=u.length;return u[c]=r.ref,o.setValue(r,{property:s,itemIndex:c}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Bt._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let s=Bt.nil;for(let i in t){let a=t[i];if(!a)continue;let u=n[i]=n[i]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,Ku.Started);let l=r(c);if(l){let p=this.opts.es5?zt.varKinds.var:zt.varKinds.const;s=(0,Bt._)`${s}${p} ${c} = ${l};${this.opts._n}`}else if(l=o?.(c))s=(0,Bt._)`${s}${l}${this.opts._n}`;else throw new pf(c);u.set(c,Ku.Completed)})}return s}};zt.ValueScope=df});var Q=S(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.or=X.and=X.not=X.CodeGen=X.operators=X.varKinds=X.ValueScopeName=X.ValueScope=X.Scope=X.Name=X.regexpCode=X.stringify=X.getProperty=X.nil=X.strConcat=X.str=X._=void 0;var ie=Fs(),_r=ff(),Nn=Fs();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return Nn._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return Nn.str}});Object.defineProperty(X,"strConcat",{enumerable:!0,get:function(){return Nn.strConcat}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return Nn.nil}});Object.defineProperty(X,"getProperty",{enumerable:!0,get:function(){return Nn.getProperty}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return Nn.stringify}});Object.defineProperty(X,"regexpCode",{enumerable:!0,get:function(){return Nn.regexpCode}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return Nn.Name}});var Qu=ff();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return Qu.Scope}});Object.defineProperty(X,"ValueScope",{enumerable:!0,get:function(){return Qu.ValueScope}});Object.defineProperty(X,"ValueScopeName",{enumerable:!0,get:function(){return Qu.ValueScopeName}});Object.defineProperty(X,"varKinds",{enumerable:!0,get:function(){return Qu.varKinds}});X.operators={GT:new ie._Code(">"),GTE:new ie._Code(">="),LT:new ie._Code("<"),LTE:new ie._Code("<="),EQ:new ie._Code("==="),NEQ:new ie._Code("!=="),NOT:new ie._Code("!"),OR:new ie._Code("||"),AND:new ie._Code("&&"),ADD:new ie._Code("+")};var Dn=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},mf=class extends Dn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?_r.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=si(this.rhs,t,r)),this}get names(){return this.rhs instanceof ie._CodeOrName?this.rhs.names:{}}},Zu=class extends Dn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ie.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=si(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ie.Name?{}:{...this.lhs.names};return Yu(t,this.rhs)}},hf=class extends Zu{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},gf=class extends Dn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},yf=class extends Dn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Df=class extends Dn{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},vf=class extends Dn{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=si(this.code,t,r),this}get names(){return this.code instanceof ie._CodeOrName?this.code.names:{}}},Rs=class extends Dn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(t,r)||(YM(t,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>ho(t,r.names),{})}},vn=class extends Rs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Cf=class extends Rs{},ii=class extends vn{};ii.kind="else";var fo=class e extends vn{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ii(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(tS(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=si(this.condition,t,r),this}get names(){let t=super.names;return Yu(t,this.condition),this.else&&ho(t,this.else.names),t}};fo.kind="if";var mo=class extends vn{};mo.kind="for";var wf=class extends mo{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=si(this.iteration,t,r),this}get names(){return ho(super.names,this.iteration.names)}},bf=class extends mo{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?_r.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=Yu(super.names,this.from);return Yu(t,this.to)}},Ju=class extends mo{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=si(this.iterable,t,r),this}get names(){return ho(super.names,this.iterable.names)}},$s=class extends vn{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};$s.kind="func";var ks=class extends Rs{render(t){return"return "+super.render(t)}};ks.kind="return";var xf=class extends vn{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&ho(t,this.catch.names),this.finally&&ho(t,this.finally.names),t}},Is=class extends vn{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Is.kind="catch";var Ns=class extends vn{render(t){return"finally"+super.render(t)}};Ns.kind="finally";var Sf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
26
+ `:""},this._extScope=t,this._scope=new _r.Scope({parent:t}),this._nodes=[new Cf]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new mf(t,s,n)),s}const(t,r,n){return this._def(_r.varKinds.const,t,r,n)}let(t,r,n){return this._def(_r.varKinds.let,t,r,n)}var(t,r,n){return this._def(_r.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Zu(t,r,n))}add(t,r){return this._leafNode(new hf(t,X.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ie.nil&&this._leafNode(new vf(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ie.addCodeArg)(r,o));return r.push("}"),new ie._Code(r)}if(t,r,n){if(this._blockNode(new fo(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new fo(t))}else(){return this._elseNode(new ii)}endIf(){return this._endBlockNode(fo,ii)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new wf(t),r)}forRange(t,r,n,o,s=this.opts.es5?_r.varKinds.var:_r.varKinds.let){let i=this._scope.toName(t);return this._for(new bf(s,i,r,n),()=>o(i))}forOf(t,r,n,o=_r.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let i=r instanceof ie.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ie._)`${i}.length`,a=>{this.var(s,(0,ie._)`${i}[${a}]`),n(s)})}return this._for(new Ju("of",o,s,r),()=>n(s))}forIn(t,r,n,o=this.opts.es5?_r.varKinds.var:_r.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ie._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new Ju("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(mo)}label(t){return this._leafNode(new gf(t))}break(t){return this._leafNode(new yf(t))}return(t){let r=new ks;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ks)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new xf;if(this._blockNode(o),this.code(t),r){let s=this.name("e");this._currNode=o.catch=new Is(s),r(s)}return n&&(this._currNode=o.finally=new Ns,this.code(n)),this._endBlockNode(Is,Ns)}throw(t){return this._leafNode(new Df(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ie.nil,n,o){return this._blockNode(new $s(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode($s)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof fo))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};X.CodeGen=Sf;function ho(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Yu(e,t){return t instanceof ie._CodeOrName?ho(e,t.names):e}function si(e,t,r){if(e instanceof ie.Name)return n(e);if(!o(e))return e;return new ie._Code(e._items.reduce((s,i)=>(i instanceof ie.Name&&(i=n(i)),i instanceof ie._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||t[s.str]!==1?s:(delete t[s.str],i)}function o(s){return s instanceof ie._Code&&s._items.some(i=>i instanceof ie.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function YM(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function tS(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ie._)`!${Ef(e)}`}X.not=tS;var QM=rS(X.operators.AND);function XM(...e){return e.reduce(QM)}X.and=XM;var eL=rS(X.operators.OR);function tL(...e){return e.reduce(eL)}X.or=tL;function rS(e){return(t,r)=>t===ie.nil?r:r===ie.nil?t:(0,ie._)`${Ef(t)} ${e} ${Ef(r)}`}function Ef(e){return e instanceof ie.Name?e:(0,ie._)`(${e})`}});var pe=S(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.checkStrictMode=te.getErrorPath=te.Type=te.useFunc=te.setEvaluated=te.evaluatedPropsToName=te.mergeEvaluated=te.eachItem=te.unescapeJsonPointer=te.escapeJsonPointer=te.escapeFragment=te.unescapeFragment=te.schemaRefOrVal=te.schemaHasRulesButRef=te.schemaHasRules=te.checkUnknownRules=te.alwaysValidSchema=te.toHash=void 0;var xe=Q(),rL=Fs();function nL(e){let t={};for(let r of e)t[r]=!0;return t}te.toHash=nL;function oL(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(iS(e,t),!sS(t,e.self.RULES.all))}te.alwaysValidSchema=oL;function iS(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let s in t)o[s]||cS(e,`unknown keyword: "${s}"`)}te.checkUnknownRules=iS;function sS(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}te.schemaHasRules=sS;function iL(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}te.schemaHasRulesButRef=iL;function sL({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,xe._)`${r}`}return(0,xe._)`${e}${t}${(0,xe.getProperty)(n)}`}te.schemaRefOrVal=sL;function aL(e){return aS(decodeURIComponent(e))}te.unescapeFragment=aL;function uL(e){return encodeURIComponent(Pf(e))}te.escapeFragment=uL;function Pf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}te.escapeJsonPointer=Pf;function aS(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}te.unescapeJsonPointer=aS;function cL(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}te.eachItem=cL;function nS({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let u=i===void 0?s:i instanceof xe.Name?(s instanceof xe.Name?e(o,s,i):t(o,s,i),i):s instanceof xe.Name?(t(o,i,s),s):r(s,i);return a===xe.Name&&!(u instanceof xe.Name)?n(o,u):u}}te.mergeEvaluated={props:nS({mergeNames:(e,t,r)=>e.if((0,xe._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,xe._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,xe._)`${r} || {}`).code((0,xe._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,xe._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,xe._)`${r} || {}`),Tf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:uS}),items:nS({mergeNames:(e,t,r)=>e.if((0,xe._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,xe._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,xe._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,xe._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function uS(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,xe._)`{}`);return t!==void 0&&Tf(e,r,t),r}te.evaluatedPropsToName=uS;function Tf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,xe._)`${t}${(0,xe.getProperty)(n)}`,!0))}te.setEvaluated=Tf;var oS={};function lL(e,t){return e.scopeValue("func",{ref:t,code:oS[t.code]||(oS[t.code]=new rL._Code(t.code))})}te.useFunc=lL;var _f;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(_f||(te.Type=_f={}));function pL(e,t,r){if(e instanceof xe.Name){let n=t===_f.Num;return r?n?(0,xe._)`"[" + ${e} + "]"`:(0,xe._)`"['" + ${e} + "']"`:n?(0,xe._)`"/" + ${e}`:(0,xe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,xe.getProperty)(e).toString():"/"+Pf(e)}te.getErrorPath=pL;function cS(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}te.checkStrictMode=cS});var Cn=S(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var vt=Q(),dL={data:new vt.Name("data"),valCxt:new vt.Name("valCxt"),instancePath:new vt.Name("instancePath"),parentData:new vt.Name("parentData"),parentDataProperty:new vt.Name("parentDataProperty"),rootData:new vt.Name("rootData"),dynamicAnchors:new vt.Name("dynamicAnchors"),vErrors:new vt.Name("vErrors"),errors:new vt.Name("errors"),this:new vt.Name("this"),self:new vt.Name("self"),scope:new vt.Name("scope"),json:new vt.Name("json"),jsonPos:new vt.Name("jsonPos"),jsonLen:new vt.Name("jsonLen"),jsonPart:new vt.Name("jsonPart")};Af.default=dL});var Os=S(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.extendErrors=Ct.resetErrorsCount=Ct.reportExtraError=Ct.reportError=Ct.keyword$DataError=Ct.keywordError=void 0;var ue=Q(),Xu=pe(),Pt=Cn();Ct.keywordError={message:({keyword:e})=>(0,ue.str)`must pass "${e}" keyword validation`};Ct.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ue.str)`"${e}" keyword must be ${t} ($data)`:(0,ue.str)`"${e}" keyword is invalid ($data)`};function fL(e,t=Ct.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,u=dS(e,t,r);n??(i||a)?lS(s,u):pS(o,(0,ue._)`[${u}]`)}Ct.reportError=fL;function mL(e,t=Ct.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=dS(e,t,r);lS(o,a),s||i||pS(n,Pt.default.vErrors)}Ct.reportExtraError=mL;function hL(e,t){e.assign(Pt.default.errors,t),e.if((0,ue._)`${Pt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ue._)`${Pt.default.vErrors}.length`,t),()=>e.assign(Pt.default.vErrors,null)))}Ct.resetErrorsCount=hL;function gL({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,Pt.default.errors,a=>{e.const(i,(0,ue._)`${Pt.default.vErrors}[${a}]`),e.if((0,ue._)`${i}.instancePath === undefined`,()=>e.assign((0,ue._)`${i}.instancePath`,(0,ue.strConcat)(Pt.default.instancePath,s.errorPath))),e.assign((0,ue._)`${i}.schemaPath`,(0,ue.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,ue._)`${i}.schema`,r),e.assign((0,ue._)`${i}.data`,n))})}Ct.extendErrors=gL;function lS(e,t){let r=e.const("err",t);e.if((0,ue._)`${Pt.default.vErrors} === null`,()=>e.assign(Pt.default.vErrors,(0,ue._)`[${r}]`),(0,ue._)`${Pt.default.vErrors}.push(${r})`),e.code((0,ue._)`${Pt.default.errors}++`)}function pS(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,ue._)`new ${e.ValidationError}(${t})`):(r.assign((0,ue._)`${n}.errors`,t),r.return(!1))}var go={keyword:new ue.Name("keyword"),schemaPath:new ue.Name("schemaPath"),params:new ue.Name("params"),propertyName:new ue.Name("propertyName"),message:new ue.Name("message"),schema:new ue.Name("schema"),parentSchema:new ue.Name("parentSchema")};function dS(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ue._)`{}`:yL(e,t,r)}function yL(e,t,r={}){let{gen:n,it:o}=e,s=[DL(o,r),vL(e,r)];return CL(e,t,s),n.object(...s)}function DL({errorPath:e},{instancePath:t}){let r=t?(0,ue.str)`${e}${(0,Xu.getErrorPath)(t,Xu.Type.Str)}`:e;return[Pt.default.instancePath,(0,ue.strConcat)(Pt.default.instancePath,r)]}function vL({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,ue.str)`${t}/${e}`;return r&&(o=(0,ue.str)`${o}${(0,Xu.getErrorPath)(r,Xu.Type.Str)}`),[go.schemaPath,o]}function CL(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:p}=a;n.push([go.keyword,o],[go.params,typeof t=="function"?t(e):t||(0,ue._)`{}`]),u.messages&&n.push([go.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([go.schema,i],[go.parentSchema,(0,ue._)`${l}${p}`],[Pt.default.data,s]),c&&n.push([go.propertyName,c])}});var mS=S(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.boolOrEmptySchema=ai.topBoolOrEmptySchema=void 0;var wL=Os(),bL=Q(),xL=Cn(),SL={message:"boolean schema is false"};function EL(e){let{gen:t,schema:r,validateName:n}=e;r===!1?fS(e,!1):typeof r=="object"&&r.$async===!0?t.return(xL.default.data):(t.assign((0,bL._)`${n}.errors`,null),t.return(!0))}ai.topBoolOrEmptySchema=EL;function _L(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),fS(e)):r.var(t,!0)}ai.boolOrEmptySchema=_L;function fS(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,wL.reportError)(o,SL,void 0,t)}});var Ff=S(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.getRules=ui.isJSONType=void 0;var PL=["string","number","integer","boolean","null","object","array"],TL=new Set(PL);function AL(e){return typeof e=="string"&&TL.has(e)}ui.isJSONType=AL;function FL(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ui.getRules=FL});var Rf=S(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.shouldUseRule=On.shouldUseGroup=On.schemaHasRulesForType=void 0;function RL({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&hS(e,n)}On.schemaHasRulesForType=RL;function hS(e,t){return t.rules.some(r=>gS(e,r))}On.shouldUseGroup=hS;function gS(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}On.shouldUseRule=gS});var Ms=S(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.reportTypeError=wt.checkDataTypes=wt.checkDataType=wt.coerceAndCheckDataType=wt.getJSONTypes=wt.getSchemaTypes=wt.DataType=void 0;var $L=Ff(),kL=Rf(),IL=Os(),J=Q(),yS=pe(),ci;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ci||(wt.DataType=ci={}));function NL(e){let t=DS(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}wt.getSchemaTypes=NL;function DS(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every($L.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}wt.getJSONTypes=DS;function OL(e,t){let{gen:r,data:n,opts:o}=e,s=ML(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&(0,kL.schemaHasRulesForType)(e,t[0]));if(i){let a=kf(t,n,o.strictNumbers,ci.Wrong);r.if(a,()=>{s.length?LL(e,t,s):If(e)})}return i}wt.coerceAndCheckDataType=OL;var vS=new Set(["string","number","integer","boolean","null"]);function ML(e,t){return t?e.filter(r=>vS.has(r)||t==="array"&&r==="array"):[]}function LL(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",(0,J._)`typeof ${o}`),a=n.let("coerced",(0,J._)`undefined`);s.coerceTypes==="array"&&n.if((0,J._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,J._)`${o}[0]`).assign(i,(0,J._)`typeof ${o}`).if(kf(t,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,J._)`${a} !== undefined`);for(let c of r)(vS.has(c)||c==="array"&&s.coerceTypes==="array")&&u(c);n.else(),If(e),n.endIf(),n.if((0,J._)`${a} !== undefined`,()=>{n.assign(o,a),BL(e,a)});function u(c){switch(c){case"string":n.elseIf((0,J._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,J._)`"" + ${o}`).elseIf((0,J._)`${o} === null`).assign(a,(0,J._)`""`);return;case"number":n.elseIf((0,J._)`${i} == "boolean" || ${o} === null
27
27
  || (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,J._)`+${o}`);return;case"integer":n.elseIf((0,J._)`${i} === "boolean" || ${o} === null
28
28
  || (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,J._)`+${o}`);return;case"boolean":n.elseIf((0,J._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,J._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,J._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,J._)`${i} === "string" || ${i} === "number"
29
- || ${i} === "boolean" || ${o} === null`).assign(a,(0,J._)`[${o}]`)}}}function LL({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,J._)`${t} !== undefined`,()=>e.assign((0,J._)`${t}[${r}]`,n))}function $f(e,t,r,n=ci.Correct){let o=n===ci.Correct?J.operators.EQ:J.operators.NEQ,s;switch(e){case"null":return(0,J._)`${t} ${o} null`;case"array":s=(0,J._)`Array.isArray(${t})`;break;case"object":s=(0,J._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i((0,J._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return(0,J._)`typeof ${t} ${o} ${e}`}return n===ci.Correct?s:(0,J.not)(s);function i(a=J.nil){return(0,J.and)((0,J._)`typeof ${t} == "number"`,a,r?(0,J._)`isFinite(${t})`:J.nil)}}wt.checkDataType=$f;function kf(e,t,r,n){if(e.length===1)return $f(e[0],t,r,n);let o,s=(0,yS.toHash)(e);if(s.array&&s.object){let i=(0,J._)`typeof ${t} != "object"`;o=s.null?i:(0,J._)`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=J.nil;s.number&&delete s.integer;for(let i in s)o=(0,J.and)(o,$f(i,t,r,n));return o}wt.checkDataTypes=kf;var BL={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,J._)`{type: ${e}}`:(0,J._)`{type: ${t}}`};function If(e){let t=zL(e);(0,kL.reportError)(t,BL)}wt.reportTypeError=If;function zL(e){let{gen:t,data:r,schema:n}=e,o=(0,yS.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var wS=S(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});ec.assignDefaults=void 0;var li=Q(),jL=pe();function UL(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)CS(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,s)=>CS(e,s,o.default))}ec.assignDefaults=UL;function CS(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=(0,li._)`${s}${(0,li.getProperty)(t)}`;if(o){(0,jL.checkStrictMode)(e,`default is ignored for: ${a}`);return}let u=(0,li._)`${a} === undefined`;i.useDefaults==="empty"&&(u=(0,li._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,li._)`${a} = ${(0,li.stringify)(r)}`)}});var mr=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.validateUnion=Ce.validateArray=Ce.usePattern=Ce.callValidateCode=Ce.schemaProperties=Ce.allSchemaProperties=Ce.noPropertyInData=Ce.propertyInData=Ce.isOwnProperty=Ce.hasPropFunc=Ce.reportMissingProp=Ce.checkMissingProp=Ce.checkReportMissingProp=void 0;var Ie=Q(),Nf=pe(),Mn=vn(),VL=pe();function HL(e,t){let{gen:r,data:n,it:o}=e;r.if(Mf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ie._)`${t}`},!0),e.error()})}Ce.checkReportMissingProp=HL;function qL({gen:e,data:t,it:{opts:r}},n,o){return(0,Ie.or)(...n.map(s=>(0,Ie.and)(Mf(e,t,s,r.ownProperties),(0,Ie._)`${o} = ${s}`)))}Ce.checkMissingProp=qL;function KL(e,t){e.setParams({missingProperty:t},!0),e.error()}Ce.reportMissingProp=KL;function bS(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ie._)`Object.prototype.hasOwnProperty`})}Ce.hasPropFunc=bS;function Of(e,t,r){return(0,Ie._)`${bS(e)}.call(${t}, ${r})`}Ce.isOwnProperty=Of;function GL(e,t,r,n){let o=(0,Ie._)`${t}${(0,Ie.getProperty)(r)} !== undefined`;return n?(0,Ie._)`${o} && ${Of(e,t,r)}`:o}Ce.propertyInData=GL;function Mf(e,t,r,n){let o=(0,Ie._)`${t}${(0,Ie.getProperty)(r)} === undefined`;return n?(0,Ie.or)(o,(0,Ie.not)(Of(e,t,r))):o}Ce.noPropertyInData=Mf;function xS(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Ce.allSchemaProperties=xS;function WL(e,t){return xS(t).filter(r=>!(0,Nf.alwaysValidSchema)(e,t[r]))}Ce.schemaProperties=WL;function ZL({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,u,c){let l=c?(0,Ie._)`${e}, ${t}, ${n}${o}`:t,p=[[Mn.default.instancePath,(0,Ie.strConcat)(Mn.default.instancePath,s)],[Mn.default.parentData,i.parentData],[Mn.default.parentDataProperty,i.parentDataProperty],[Mn.default.rootData,Mn.default.rootData]];i.opts.dynamicRef&&p.push([Mn.default.dynamicAnchors,Mn.default.dynamicAnchors]);let d=(0,Ie._)`${l}, ${r.object(...p)}`;return u!==Ie.nil?(0,Ie._)`${a}.call(${u}, ${d})`:(0,Ie._)`${a}(${d})`}Ce.callValidateCode=ZL;var JL=(0,Ie._)`new RegExp`;function YL({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Ie._)`${o.code==="new RegExp"?JL:(0,VL.useFunc)(e,o)}(${r}, ${n})`})}Ce.usePattern=YL;function QL(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let u=t.const("len",(0,Ie._)`${r}.length`);t.forRange("i",0,u,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:Nf.Type.Num},s),t.if((0,Ie.not)(s),a)})}}Ce.validateArray=QL;function XL(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Nf.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((u,c)=>{let l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(i,(0,Ie._)`${i} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ie.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}Ce.validateUnion=XL});var _S=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.validateKeywordUsage=Qr.validSchemaType=Qr.funcKeywordCode=Qr.macroKeywordCode=void 0;var Tt=Q(),yo=vn(),eB=mr(),tB=Os();function rB(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),u=ES(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:Tt.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Qr.macroKeywordCode=rB;function nB(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:u}=e;iB(u,t);let c=!a&&t.compile?t.compile.call(u.self,s,i,u):t.validate,l=ES(n,o,c),p=n.let("valid");e.block$data(p,d),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function d(){if(t.errors===!1)f(),t.modifying&&SS(e),g(()=>e.error());else{let y=t.async?h():m();t.modifying&&SS(e),g(()=>oB(e,y))}}function h(){let y=n.let("ruleErrs",null);return n.try(()=>f((0,Tt._)`await `),b=>n.assign(p,!1).if((0,Tt._)`${b} instanceof ${u.ValidationError}`,()=>n.assign(y,(0,Tt._)`${b}.errors`),()=>n.throw(b))),y}function m(){let y=(0,Tt._)`${l}.errors`;return n.assign(y,null),f(Tt.nil),y}function f(y=t.async?(0,Tt._)`await `:Tt.nil){let b=u.opts.passContext?yo.default.this:yo.default.self,w=!("compile"in t&&!a||t.schema===!1);n.assign(p,(0,Tt._)`${y}${(0,eB.callValidateCode)(e,l,b,w)}`,t.modifying)}function g(y){var b;n.if((0,Tt.not)((b=t.valid)!==null&&b!==void 0?b:p),y)}}Qr.funcKeywordCode=nB;function SS(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Tt._)`${n.parentData}[${n.parentDataProperty}]`))}function oB(e,t){let{gen:r}=e;r.if((0,Tt._)`Array.isArray(${t})`,()=>{r.assign(yo.default.vErrors,(0,Tt._)`${yo.default.vErrors} === null ? ${t} : ${yo.default.vErrors}.concat(${t})`).assign(yo.default.errors,(0,Tt._)`${yo.default.vErrors}.length`),(0,tB.extendErrors)(e)},()=>e.error())}function iB({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function ES(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Tt.stringify)(r)})}function sB(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Qr.validSchemaType=sB;function aB({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}Qr.validateKeywordUsage=aB});var TS=S(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.extendSubschemaMode=Ln.extendSubschemaData=Ln.getSubschema=void 0;var Xr=Q(),PS=pe();function uB(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Xr._)`${e.schemaPath}${(0,Xr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Xr._)`${e.schemaPath}${(0,Xr.getProperty)(t)}${(0,Xr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,PS.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Ln.getSubschema=uB;function cB(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:l,opts:p}=t,d=a.let("data",(0,Xr._)`${t.data}${(0,Xr.getProperty)(r)}`,!0);u(d),e.errorPath=(0,Xr.str)`${c}${(0,PS.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Xr._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(o!==void 0){let c=o instanceof Xr.Name?o:a.let("data",o,!0);u(c),i!==void 0&&(e.propertyName=i)}s&&(e.dataTypes=s);function u(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Ln.extendSubschemaData=cB;function lB(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Ln.extendSubschemaMode=lB});var Lf=S((one,AS)=>{"use strict";AS.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var RS=S((ine,FS)=>{"use strict";var Bn=FS.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};tc(t,n,o,e,"",e)};Bn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Bn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Bn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Bn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function tc(e,t,r,n,o,s,i,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,u,c);for(var l in n){var p=n[l];if(Array.isArray(p)){if(l in Bn.arrayKeywords)for(var d=0;d<p.length;d++)tc(e,t,r,p[d],o+"/"+l+"/"+d,s,o,l,n,d)}else if(l in Bn.propsKeywords){if(p&&typeof p=="object")for(var h in p)tc(e,t,r,p[h],o+"/"+l+"/"+pB(h),s,o,l,n,h)}else(l in Bn.keywords||e.allKeys&&!(l in Bn.skipKeywords))&&tc(e,t,r,p,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,u,c)}}function pB(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ls=S(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.getSchemaRefs=jt.resolveUrl=jt.normalizeId=jt._getFullPath=jt.getFullPath=jt.inlineRef=void 0;var dB=pe(),fB=Lf(),mB=RS(),hB=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function gB(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Bf(e):t?$S(e)<=t:!1}jt.inlineRef=gB;var yB=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Bf(e){for(let t in e){if(yB.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Bf)||typeof r=="object"&&Bf(r))return!0}return!1}function $S(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!hB.has(r)&&(typeof e[r]=="object"&&(0,dB.eachItem)(e[r],n=>t+=$S(n)),t===1/0))return 1/0}return t}function kS(e,t="",r){r!==!1&&(t=pi(t));let n=e.parse(t);return IS(e,n)}jt.getFullPath=kS;function IS(e,t){return e.serialize(t).split("#")[0]+"#"}jt._getFullPath=IS;var DB=/#\/?$/;function pi(e){return e?e.replace(DB,""):""}jt.normalizeId=pi;function vB(e,t,r){return r=pi(r),e.resolve(t,r)}jt.resolveUrl=vB;var CB=/^[a-z_][-a-z0-9._]*$/i;function wB(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=pi(e[r]||t),s={"":o},i=kS(n,o,!1),a={},u=new Set;return mB(e,{allKeys:!0},(p,d,h,m)=>{if(m===void 0)return;let f=i+d,g=s[m];typeof p[r]=="string"&&(g=y.call(this,p[r])),b.call(this,p.$anchor),b.call(this,p.$dynamicAnchor),s[d]=g;function y(w){let T=this.opts.uriResolver.resolve;if(w=pi(g?T(g,w):w),u.has(w))throw l(w);u.add(w);let E=this.refs[w];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?c(p,E.schema,w):w!==pi(f)&&(w[0]==="#"?(c(p,a[w],w),a[w]=p):this.refs[w]=f),w}function b(w){if(typeof w=="string"){if(!CB.test(w))throw new Error(`invalid anchor "${w}"`);y.call(this,`#${w}`)}}}),a;function c(p,d,h){if(d!==void 0&&!fB(p,d))throw l(h)}function l(p){return new Error(`reference "${p}" resolves to more than one schema`)}}jt.getSchemaRefs=wB});var js=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.getData=zn.KeywordCxt=zn.validateFunctionCode=void 0;var BS=mS(),NS=Ms(),jf=Rf(),rc=Ms(),bB=wS(),zs=_S(),zf=TS(),j=Q(),G=vn(),xB=Ls(),Cn=pe(),Bs=Os();function SB(e){if(US(e)&&(VS(e),jS(e))){PB(e);return}zS(e,()=>(0,BS.topBoolOrEmptySchema)(e))}zn.validateFunctionCode=SB;function zS({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,(0,j._)`${G.default.data}, ${G.default.valCxt}`,n.$async,()=>{e.code((0,j._)`"use strict"; ${OS(r,o)}`),_B(e,o),e.code(s)}):e.func(t,(0,j._)`${G.default.data}, ${EB(o)}`,n.$async,()=>e.code(OS(r,o)).code(s))}function EB(e){return(0,j._)`{${G.default.instancePath}="", ${G.default.parentData}, ${G.default.parentDataProperty}, ${G.default.rootData}=${G.default.data}${e.dynamicRef?(0,j._)`, ${G.default.dynamicAnchors}={}`:j.nil}}={}`}function _B(e,t){e.if(G.default.valCxt,()=>{e.var(G.default.instancePath,(0,j._)`${G.default.valCxt}.${G.default.instancePath}`),e.var(G.default.parentData,(0,j._)`${G.default.valCxt}.${G.default.parentData}`),e.var(G.default.parentDataProperty,(0,j._)`${G.default.valCxt}.${G.default.parentDataProperty}`),e.var(G.default.rootData,(0,j._)`${G.default.valCxt}.${G.default.rootData}`),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,j._)`${G.default.valCxt}.${G.default.dynamicAnchors}`)},()=>{e.var(G.default.instancePath,(0,j._)`""`),e.var(G.default.parentData,(0,j._)`undefined`),e.var(G.default.parentDataProperty,(0,j._)`undefined`),e.var(G.default.rootData,G.default.data),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,j._)`{}`)})}function PB(e){let{schema:t,opts:r,gen:n}=e;zS(e,()=>{r.$comment&&t.$comment&&qS(e),$B(e),n.let(G.default.vErrors,null),n.let(G.default.errors,0),r.unevaluated&&TB(e),HS(e),NB(e)})}function TB(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,j._)`${r}.evaluated`),t.if((0,j._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,j._)`${e.evaluated}.props`,(0,j._)`undefined`)),t.if((0,j._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,j._)`${e.evaluated}.items`,(0,j._)`undefined`))}function OS(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,j._)`/*# sourceURL=${r} */`:j.nil}function AB(e,t){if(US(e)&&(VS(e),jS(e))){FB(e,t);return}(0,BS.boolOrEmptySchema)(e,t)}function jS({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function US(e){return typeof e.schema!="boolean"}function FB(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&qS(e),kB(e),IB(e);let s=n.const("_errs",G.default.errors);HS(e,s),n.var(t,(0,j._)`${s} === ${G.default.errors}`)}function VS(e){(0,Cn.checkUnknownRules)(e),RB(e)}function HS(e,t){if(e.opts.jtd)return MS(e,[],!1,t);let r=(0,NS.getSchemaTypes)(e.schema),n=(0,NS.coerceAndCheckDataType)(e,r);MS(e,r,!n,t)}function RB(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Cn.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function $B(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Cn.checkStrictMode)(e,"default is ignored in the schema root")}function kB(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,xB.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function IB(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function qS({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code((0,j._)`${G.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,j.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,j._)`${G.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function NB(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if((0,j._)`${G.default.errors} === 0`,()=>t.return(G.default.data),()=>t.throw((0,j._)`new ${o}(${G.default.vErrors})`)):(t.assign((0,j._)`${n}.errors`,G.default.vErrors),s.unevaluated&&OB(e),t.return((0,j._)`${G.default.errors} === 0`))}function OB({gen:e,evaluated:t,props:r,items:n}){r instanceof j.Name&&e.assign((0,j._)`${t}.props`,r),n instanceof j.Name&&e.assign((0,j._)`${t}.items`,n)}function MS(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:u,self:c}=e,{RULES:l}=c;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,Cn.schemaHasRulesButRef)(s,l))){o.block(()=>GS(e,"$ref",l.all.$ref.definition));return}u.jtd||MB(e,t),o.block(()=>{for(let d of l.rules)p(d);p(l.post)});function p(d){(0,jf.shouldUseGroup)(s,d)&&(d.type?(o.if((0,rc.checkDataType)(d.type,i,u.strictNumbers)),LS(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,rc.reportTypeError)(e)),o.endIf()):LS(e,d),a||o.if((0,j._)`${G.default.errors} === ${n||0}`))}}function LS(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,bB.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,jf.shouldUseRule)(n,s)&&GS(e,s.keyword,s.definition,t.type)})}function MB(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(LB(e,t),e.opts.allowUnionTypes||BB(e,t),zB(e,e.dataTypes))}function LB(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{KS(e.dataTypes,r)||Uf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),UB(e,t)}}function BB(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Uf(e,"use allowUnionTypes to allow union type keyword")}function zB(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,jf.shouldUseRule)(e.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>jB(t,i))&&Uf(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function jB(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function KS(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function UB(e,t){let r=[];for(let n of e.dataTypes)KS(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Uf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Cn.checkStrictMode)(e,t,e.opts.strictTypes)}var nc=class{constructor(t,r,n){if((0,zs.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Cn.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",WS(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,zs.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",G.default.errors))}result(t,r,n){this.failResult((0,j.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,j.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,j._)`${r} !== undefined && (${(0,j.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Bs.reportExtraError:Bs.reportError)(this,this.def.error,r)}$dataError(){(0,Bs.reportError)(this,this.def.$dataError||Bs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Bs.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=j.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=j.nil,r=j.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,j.or)((0,j._)`${o} === undefined`,r)),t!==j.nil&&n.assign(t,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==j.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,j.or)(i(),a());function i(){if(n.length){if(!(r instanceof j.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,j._)`${(0,rc.checkDataTypes)(u,r,s.opts.strictNumbers,rc.DataType.Wrong)}`}return j.nil}function a(){if(o.validateSchema){let u=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,j._)`!${u}(${r})`}return j.nil}}subschema(t,r){let n=(0,zf.getSubschema)(this.it,t);(0,zf.extendSubschemaData)(n,this.it,t),(0,zf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return AB(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Cn.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Cn.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,j.Name)),!0}};zn.KeywordCxt=nc;function GS(e,t,r,n){let o=new nc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,zs.funcKeywordCode)(o,r):"macro"in r?(0,zs.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,zs.funcKeywordCode)(o,r)}var VB=/^\/(?:[^~]|~0|~1)*$/,HB=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function WS(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return G.default.rootData;if(e[0]==="/"){if(!VB.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=G.default.rootData}else{let c=HB.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+c[1];if(o=c[2],o==="#"){if(l>=t)throw new Error(u("property/index",l));return n[t-l]}if(l>t)throw new Error(u("data",l));if(s=r[t-l],!o)return s}let i=s,a=o.split("/");for(let c of a)c&&(s=(0,j._)`${s}${(0,j.getProperty)((0,Cn.unescapeJsonPointer)(c))}`,i=(0,j._)`${i} && ${s}`);return i;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}zn.getData=WS});var oc=S(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var Vf=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Hf.default=Vf});var Us=S(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var qf=Ls(),Kf=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,qf.resolveUrl)(t,r,n),this.missingSchema=(0,qf.normalizeId)((0,qf.getFullPath)(t,this.missingRef))}};Gf.default=Kf});var sc=S(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.resolveSchema=hr.getCompilingSchema=hr.resolveRef=hr.compileSchema=hr.SchemaEnv=void 0;var Pr=Q(),qB=oc(),Do=vn(),Tr=Ls(),ZS=pe(),KB=js(),di=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Tr.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};hr.SchemaEnv=di;function Zf(e){let t=JS.call(this,e);if(t)return t;let r=(0,Tr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new Pr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;e.$async&&(a=i.scopeValue("Error",{ref:qB.default,code:(0,Pr._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let c={gen:i,allErrors:this.opts.allErrors,data:Do.default.data,parentData:Do.default.parentData,parentDataProperty:Do.default.parentDataProperty,dataNames:[Do.default.data],dataPathArr:[Pr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Pr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Pr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Pr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,KB.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let p=i.toString();l=`${i.scopeRefs(Do.default.scope)}return ${p}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let h=new Function(`${Do.default.self}`,`${Do.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){let{props:m,items:f}=c;h.evaluated={props:m instanceof Pr.Name?void 0:m,items:f instanceof Pr.Name?void 0:f,dynamicProps:m instanceof Pr.Name,dynamicItems:f instanceof Pr.Name},h.source&&(h.source.evaluated=(0,Pr.stringify)(h.evaluated))}return e.validate=h,e}catch(p){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),p}finally{this._compilations.delete(e)}}hr.compileSchema=Zf;function GB(e,t,r){var n;r=(0,Tr.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=JB.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new di({schema:i,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=WB.call(this,s)}hr.resolveRef=GB;function WB(e){return(0,Tr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Zf.call(this,e)}function JS(e){for(let t of this._compilations)if(ZB(t,e))return t}hr.getCompilingSchema=JS;function ZB(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function JB(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ic.call(this,e,t)}function ic(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Tr._getFullPath)(this.opts.uriResolver,r),o=(0,Tr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return Wf.call(this,r,e);let s=(0,Tr.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=ic.call(this,e,i);return typeof a?.schema!="object"?void 0:Wf.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Zf.call(this,i),s===(0,Tr.normalizeId)(t)){let{schema:a}=i,{schemaId:u}=this.opts,c=a[u];return c&&(o=(0,Tr.resolveUrl)(this.opts.uriResolver,o,c)),new di({schema:a,schemaId:u,root:e,baseId:o})}return Wf.call(this,r,i)}}hr.resolveSchema=ic;var YB=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Wf(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,ZS.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!YB.has(a)&&c&&(t=(0,Tr.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,ZS.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Tr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=ic.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new di({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var YS=S((pne,QB)=>{QB.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var XS=S((dne,QS)=>{"use strict";var XB={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};QS.exports={HEX:XB}});var aE=S((fne,sE)=>{"use strict";var{HEX:ez}=XS(),tz=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function nE(e){if(iE(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(tz)||[],[r]=t;return r?{host:nz(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Jf(e,t=!1){let r="",n=!0;for(let o of e){if(ez[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return t&&r.length===0&&(r="0"),r}function rz(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=!1;function u(){if(o.length){if(s===!1){let c=Jf(o);if(c!==void 0)n.push(c);else return r.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(i=!0);continue}else if(l==="%"){if(!u())break;s=!0}else{o.push(l);continue}}return o.length&&(s?r.zone=o.join(""):a?n.push(o.join("")):n.push(Jf(o))),r.address=n.join(""),r}function oE(e){if(iE(e,":")<2)return{host:e,isIPV6:!1};let t=rz(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function nz(e,t){let r="",n=!0,o=e.length;for(let s=0;s<o;s++){let i=e[s];i==="0"&&n?(s+1<=o&&e[s+1]===t||s+1===o)&&(r+=i,n=!1):(i===t?n=!0:n=!1,r+=i)}return r}function iE(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}var eE=/^\.\.?\//u,tE=/^\/\.(?:\/|$)/u,rE=/^\/\.\.(?:\/|$)/u,oz=/^\/?(?:.|\n)*?(?=\/|$)/u;function iz(e){let t=[];for(;e.length;)if(e.match(eE))e=e.replace(eE,"");else if(e.match(tE))e=e.replace(tE,"/");else if(e.match(rE))e=e.replace(rE,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(oz);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function sz(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function az(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=nE(r);if(n.isIPV4)r=n.host;else{let o=oE(n.host);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}sE.exports={recomposeAuthority:az,normalizeComponentEncoding:sz,removeDotSegments:iz,normalizeIPv4:nE,normalizeIPv6:oE,stringArrayToHexStripped:Jf}});var fE=S((mne,dE)=>{"use strict";var uz=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,cz=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function uE(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function cE(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function lE(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function lz(e){return e.secure=uE(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function pz(e){if((e.port===(uE(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function dz(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(cz);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=Yf[o];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function fz(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=Yf[o];s&&(e=s.serialize(e,t));let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function mz(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!uz.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function hz(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var pE={scheme:"http",domainHost:!0,parse:cE,serialize:lE},gz={scheme:"https",domainHost:pE.domainHost,parse:cE,serialize:lE},ac={scheme:"ws",domainHost:!0,parse:lz,serialize:pz},yz={scheme:"wss",domainHost:ac.domainHost,parse:ac.parse,serialize:ac.serialize},Dz={scheme:"urn",parse:dz,serialize:fz,skipNormalize:!0},vz={scheme:"urn:uuid",parse:mz,serialize:hz,skipNormalize:!0},Yf={http:pE,https:gz,ws:ac,wss:yz,urn:Dz,"urn:uuid":vz};dE.exports=Yf});var hE=S((hne,cc)=>{"use strict";var{normalizeIPv6:Cz,normalizeIPv4:wz,removeDotSegments:Vs,recomposeAuthority:bz,normalizeComponentEncoding:uc}=aE(),Qf=fE();function xz(e,t){return typeof e=="string"?e=en(wn(e,t),t):typeof e=="object"&&(e=wn(en(e,t),t)),e}function Sz(e,t,r){let n=Object.assign({scheme:"null"},r),o=mE(wn(e,n),wn(t,n),n,!0);return en(o,{...n,skipEscape:!0})}function mE(e,t,r,n){let o={};return n||(e=wn(en(e,r),r),t=wn(en(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Vs(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Vs(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=Vs(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Vs(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function Ez(e,t,r){return typeof e=="string"?(e=unescape(e),e=en(uc(wn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=en(uc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=en(uc(wn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=en(uc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function en(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],s=Qf[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=bz(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=Vs(a)),i===void 0&&(a=a.replace(/^\/\//u,"/%2F")),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var _z=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function Pz(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||_z[t])return!0;return!1}var Tz=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function wn(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(Tz);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let u=wz(n.host);if(u.isIPV4===!1){let c=Cz(u.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=Qf[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&Pz(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!a||a&&!a.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Xf={SCHEMES:Qf,normalize:xz,resolve:Sz,resolveComponents:mE,equal:Ez,serialize:en,parse:wn};cc.exports=Xf;cc.exports.default=Xf;cc.exports.fastUri=Xf});var yE=S(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var gE=hE();gE.code='require("ajv/dist/runtime/uri").default';em.default=gE});var EE=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CodeGen=pt.Name=pt.nil=pt.stringify=pt.str=pt._=pt.KeywordCxt=void 0;var Az=js();Object.defineProperty(pt,"KeywordCxt",{enumerable:!0,get:function(){return Az.KeywordCxt}});var fi=Q();Object.defineProperty(pt,"_",{enumerable:!0,get:function(){return fi._}});Object.defineProperty(pt,"str",{enumerable:!0,get:function(){return fi.str}});Object.defineProperty(pt,"stringify",{enumerable:!0,get:function(){return fi.stringify}});Object.defineProperty(pt,"nil",{enumerable:!0,get:function(){return fi.nil}});Object.defineProperty(pt,"Name",{enumerable:!0,get:function(){return fi.Name}});Object.defineProperty(pt,"CodeGen",{enumerable:!0,get:function(){return fi.CodeGen}});var Fz=oc(),bE=Us(),Rz=Ff(),Hs=sc(),$z=Q(),qs=Ls(),lc=Ms(),rm=pe(),DE=YS(),kz=yE(),xE=(e,t)=>new RegExp(e,t);xE.code="new RegExp";var Iz=["removeAdditional","useDefaults","coerceTypes"],Nz=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Oz={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Mz={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},vE=200;function Lz(e){var t,r,n,o,s,i,a,u,c,l,p,d,h,m,f,g,y,b,w,T,E,F,$,I,k;let R=e.strict,v=(t=e.code)===null||t===void 0?void 0:t.optimize,z=v===!0||v===void 0?1:v||0,V=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:xE,K=(o=e.uriResolver)!==null&&o!==void 0?o:kz.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&i!==void 0?i:!0,strictNumbers:(u=(a=e.strictNumbers)!==null&&a!==void 0?a:R)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&l!==void 0?l:"log",strictTuples:(d=(p=e.strictTuples)!==null&&p!==void 0?p:R)!==null&&d!==void 0?d:"log",strictRequired:(m=(h=e.strictRequired)!==null&&h!==void 0?h:R)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:z,regExp:V}:{optimize:z,regExp:V},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:vE,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:vE,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(b=e.messages)!==null&&b!==void 0?b:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(T=e.schemaId)!==null&&T!==void 0?T:"$id",addUsedSchema:(E=e.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(F=e.validateSchema)!==null&&F!==void 0?F:!0,validateFormats:($=e.validateFormats)!==null&&$!==void 0?$:!0,unicodeRegExp:(I=e.unicodeRegExp)!==null&&I!==void 0?I:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:K}}var Ks=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...Lz(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new $z.ValueScope({scope:{},prefixes:Nz,es5:r,lines:n}),this.logger=Hz(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,Rz.getRules)(),CE.call(this,Oz,t,"NOT SUPPORTED"),CE.call(this,Mz,t,"DEPRECATED","warn"),this._metaOpts=Uz.call(this),t.formats&&zz.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&jz.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),Bz.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=DE;n==="id"&&(o={...DE},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(l,p){await s.call(this,l.$schema);let d=this._addSchema(l,p);return d.validate||i.call(this,d)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(p){if(!(p instanceof bE.default))throw p;return a.call(this,p),await u.call(this,p.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:p}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${p} cannot be resolved`)}async function u(l){let p=await c.call(this,l);this.refs[l]||await s.call(this,p.$schema),this.refs[l]||this.addSchema(p,l,r)}async function c(l){let p=this._loading[l];if(p)return p;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,n,o);return this}let s;if(typeof t=="object"){let{schemaId:i}=this.opts;if(s=t[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,qs.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(t){let r;for(;typeof(r=wE.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Hs.SchemaEnv({schema:{},schemaId:n});if(r=Hs.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=wE.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,qs.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Kz.call(this,n,r),!r)return(0,rm.eachItem)(n,s=>tm.call(this,s)),this;Wz.call(this,r);let o={...r,type:(0,lc.getJSONTypes)(r.type),schemaType:(0,lc.getJSONTypes)(r.schemaType)};return(0,rm.eachItem)(n,o.type.length===0?s=>tm.call(this,s,o):s=>o.type.forEach(i=>tm.call(this,s,o,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let s=o.split("/").slice(1),i=t;for(let a of s)i=i[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=i[a];c&&l&&(i[a]=SE(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof t=="object")i=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;n=(0,qs.normalizeId)(i||n);let c=qs.getSchemaRefs.call(this,t,n);return u=new Hs.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Hs.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Hs.compileSchema.call(this,t)}finally{this.opts=r}}};Ks.ValidationError=Fz.default;Ks.MissingRefError=bE.default;pt.default=Ks;function CE(e,t,r,n="error"){for(let o in e){let s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function wE(e){return e=(0,qs.normalizeId)(e),this.schemas[e]||this.refs[e]}function Bz(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function zz(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function jz(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function Uz(){let e={...this.opts};for(let t of Iz)delete e[t];return e}var Vz={log(){},warn(){},error(){}};function Hz(e){if(e===!1)return Vz;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var qz=/^[a-z_$][a-z0-9_$:-]*$/i;function Kz(e,t){let{RULES:r}=this;if((0,rm.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!qz.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function tm(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,lc.getJSONTypes)(t.type),schemaType:(0,lc.getJSONTypes)(t.schemaType)}};t.before?Gz.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function Gz(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function Wz(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=SE(t)),e.validateSchema=this.compile(t,!0))}var Zz={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function SE(e){return{anyOf:[e,Zz]}}});var _E=S(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Jz={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};nm.default=Jz});var FE=S(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.callRef=vo.getValidate=void 0;var Yz=Us(),PE=mr(),Ut=Q(),mi=vn(),TE=sc(),pc=pe(),Qz={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:u}=n,{root:c}=s;if((r==="#"||r==="#/")&&o===c.baseId)return p();let l=TE.resolveRef.call(u,c,o,r);if(l===void 0)throw new Yz.default(n.opts.uriResolver,o,r);if(l instanceof TE.SchemaEnv)return d(l);return h(l);function p(){if(s===c)return dc(e,i,s,s.$async);let m=t.scopeValue("root",{ref:c});return dc(e,(0,Ut._)`${m}.validate`,c,c.$async)}function d(m){let f=AE(e,m);dc(e,f,m,m.$async)}function h(m){let f=t.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,Ut.stringify)(m)}:{ref:m}),g=t.name("valid"),y=e.subschema({schema:m,dataTypes:[],schemaPath:Ut.nil,topSchemaRef:f,errSchemaPath:r},g);e.mergeEvaluated(y),e.ok(g)}}};function AE(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ut._)`${r.scopeValue("wrapper",{ref:t})}.validate`}vo.getValidate=AE;function dc(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:u}=s,c=u.passContext?mi.default.this:Ut.nil;n?l():p();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let m=o.let("valid");o.try(()=>{o.code((0,Ut._)`await ${(0,PE.callValidateCode)(e,t,c)}`),h(t),i||o.assign(m,!0)},f=>{o.if((0,Ut._)`!(${f} instanceof ${s.ValidationError})`,()=>o.throw(f)),d(f),i||o.assign(m,!1)}),e.ok(m)}function p(){e.result((0,PE.callValidateCode)(e,t,c),()=>h(t),()=>d(t))}function d(m){let f=(0,Ut._)`${m}.errors`;o.assign(mi.default.vErrors,(0,Ut._)`${mi.default.vErrors} === null ? ${f} : ${mi.default.vErrors}.concat(${f})`),o.assign(mi.default.errors,(0,Ut._)`${mi.default.vErrors}.length`)}function h(m){var f;if(!s.opts.unevaluated)return;let g=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=pc.mergeEvaluated.props(o,g.props,s.props));else{let y=o.var("props",(0,Ut._)`${m}.evaluated.props`);s.props=pc.mergeEvaluated.props(o,y,s.props,Ut.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=pc.mergeEvaluated.items(o,g.items,s.items));else{let y=o.var("items",(0,Ut._)`${m}.evaluated.items`);s.items=pc.mergeEvaluated.items(o,y,s.items,Ut.Name)}}}vo.callRef=dc;vo.default=Qz});var RE=S(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Xz=_E(),e3=FE(),t3=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Xz.default,e3.default];om.default=t3});var $E=S(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var fc=Q(),jn=fc.operators,mc={maximum:{okStr:"<=",ok:jn.LTE,fail:jn.GT},minimum:{okStr:">=",ok:jn.GTE,fail:jn.LT},exclusiveMaximum:{okStr:"<",ok:jn.LT,fail:jn.GTE},exclusiveMinimum:{okStr:">",ok:jn.GT,fail:jn.LTE}},r3={message:({keyword:e,schemaCode:t})=>(0,fc.str)`must be ${mc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,fc._)`{comparison: ${mc[e].okStr}, limit: ${t}}`},n3={keyword:Object.keys(mc),type:"number",schemaType:"number",$data:!0,error:r3,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,fc._)`${r} ${mc[t].fail} ${n} || isNaN(${r})`)}};im.default=n3});var kE=S(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Gs=Q(),o3={message:({schemaCode:e})=>(0,Gs.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Gs._)`{multipleOf: ${e}}`},i3={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:o3,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?(0,Gs._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,Gs._)`${i} !== parseInt(${i})`;e.fail$data((0,Gs._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};sm.default=i3});var NE=S(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});function IE(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}am.default=IE;IE.code='require("ajv/dist/runtime/ucs2length").default'});var OE=S(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var Co=Q(),s3=pe(),a3=NE(),u3={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Co.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Co._)`{limit: ${e}}`},c3={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:u3,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?Co.operators.GT:Co.operators.LT,i=o.opts.unicode===!1?(0,Co._)`${r}.length`:(0,Co._)`${(0,s3.useFunc)(e.gen,a3.default)}(${r})`;e.fail$data((0,Co._)`${i} ${s} ${n}`)}};um.default=c3});var ME=S(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var l3=mr(),hc=Q(),p3={message:({schemaCode:e})=>(0,hc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,hc._)`{pattern: ${e}}`},d3={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:p3,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?(0,hc._)`(new RegExp(${o}, ${i}))`:(0,l3.usePattern)(e,n);e.fail$data((0,hc._)`!${a}.test(${t})`)}};cm.default=d3});var LE=S(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var Ws=Q(),f3={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ws.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ws._)`{limit: ${e}}`},m3={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:f3,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Ws.operators.GT:Ws.operators.LT;e.fail$data((0,Ws._)`Object.keys(${r}).length ${o} ${n}`)}};lm.default=m3});var BE=S(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var Zs=mr(),Js=Q(),h3=pe(),g3={message:({params:{missingProperty:e}})=>(0,Js.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Js._)`{missingProperty: ${e}}`},y3={keyword:"required",type:"object",schemaType:"array",$data:!0,error:g3,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let u=r.length>=a.loopRequired;if(i.allErrors?c():l(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:m}=e.it;for(let f of r)if(h?.[f]===void 0&&!m.has(f)){let g=i.schemaEnv.baseId+i.errSchemaPath,y=`required property "${f}" is not defined at "${g}" (strictRequired)`;(0,h3.checkStrictMode)(i,y,i.opts.strictRequired)}}function c(){if(u||s)e.block$data(Js.nil,p);else for(let h of r)(0,Zs.checkReportMissingProp)(e,h)}function l(){let h=t.let("missing");if(u||s){let m=t.let("valid",!0);e.block$data(m,()=>d(h,m)),e.ok(m)}else t.if((0,Zs.checkMissingProp)(e,r,h)),(0,Zs.reportMissingProp)(e,h),t.else()}function p(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,Zs.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function d(h,m){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(m,(0,Zs.propertyInData)(t,o,h,a.ownProperties)),t.if((0,Js.not)(m),()=>{e.error(),t.break()})},Js.nil)}}};pm.default=y3});var zE=S(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var Ys=Q(),D3={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Ys.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Ys._)`{limit: ${e}}`},v3={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:D3,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Ys.operators.GT:Ys.operators.LT;e.fail$data((0,Ys._)`${r}.length ${o} ${n}`)}};dm.default=v3});var gc=S(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var jE=Lf();jE.code='require("ajv/dist/runtime/equal").default';fm.default=jE});var UE=S(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var mm=Ms(),dt=Q(),C3=pe(),w3=gc(),b3={message:({params:{i:e,j:t}})=>(0,dt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,dt._)`{i: ${e}, j: ${t}}`},x3={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:b3,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let u=t.let("valid"),c=s.items?(0,mm.getSchemaTypes)(s.items):[];e.block$data(u,l,(0,dt._)`${i} === false`),e.ok(u);function l(){let m=t.let("i",(0,dt._)`${r}.length`),f=t.let("j");e.setParams({i:m,j:f}),t.assign(u,!0),t.if((0,dt._)`${m} > 1`,()=>(p()?d:h)(m,f))}function p(){return c.length>0&&!c.some(m=>m==="object"||m==="array")}function d(m,f){let g=t.name("item"),y=(0,mm.checkDataTypes)(c,g,a.opts.strictNumbers,mm.DataType.Wrong),b=t.const("indices",(0,dt._)`{}`);t.for((0,dt._)`;${m}--;`,()=>{t.let(g,(0,dt._)`${r}[${m}]`),t.if(y,(0,dt._)`continue`),c.length>1&&t.if((0,dt._)`typeof ${g} == "string"`,(0,dt._)`${g} += "_"`),t.if((0,dt._)`typeof ${b}[${g}] == "number"`,()=>{t.assign(f,(0,dt._)`${b}[${g}]`),e.error(),t.assign(u,!1).break()}).code((0,dt._)`${b}[${g}] = ${m}`)})}function h(m,f){let g=(0,C3.useFunc)(t,w3.default),y=t.name("outer");t.label(y).for((0,dt._)`;${m}--;`,()=>t.for((0,dt._)`${f} = ${m}; ${f}--;`,()=>t.if((0,dt._)`${g}(${r}[${m}], ${r}[${f}])`,()=>{e.error(),t.assign(u,!1).break(y)})))}}};hm.default=x3});var VE=S(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var gm=Q(),S3=pe(),E3=gc(),_3={message:"must be equal to constant",params:({schemaCode:e})=>(0,gm._)`{allowedValue: ${e}}`},P3={keyword:"const",$data:!0,error:_3,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,gm._)`!${(0,S3.useFunc)(t,E3.default)}(${r}, ${o})`):e.fail((0,gm._)`${s} !== ${r}`)}};ym.default=P3});var HE=S(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var Qs=Q(),T3=pe(),A3=gc(),F3={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Qs._)`{allowedValues: ${e}}`},R3={keyword:"enum",schemaType:"array",$data:!0,error:F3,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,u,c=()=>u??(u=(0,T3.useFunc)(t,A3.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,p);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",s);l=(0,Qs.or)(...o.map((m,f)=>d(h,f)))}e.pass(l);function p(){t.assign(l,!1),t.forOf("v",s,h=>t.if((0,Qs._)`${c()}(${r}, ${h})`,()=>t.assign(l,!0).break()))}function d(h,m){let f=o[m];return typeof f=="object"&&f!==null?(0,Qs._)`${c()}(${r}, ${h}[${m}])`:(0,Qs._)`${r} === ${f}`}}};Dm.default=R3});var qE=S(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var $3=$E(),k3=kE(),I3=OE(),N3=ME(),O3=LE(),M3=BE(),L3=zE(),B3=UE(),z3=VE(),j3=HE(),U3=[$3.default,k3.default,I3.default,N3.default,O3.default,M3.default,L3.default,B3.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},z3.default,j3.default];vm.default=U3});var wm=S(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.validateAdditionalItems=void 0;var wo=Q(),Cm=pe(),V3={message:({params:{len:e}})=>(0,wo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,wo._)`{limit: ${e}}`},H3={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:V3,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Cm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}KE(e,n)}};function KE(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",(0,wo._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,wo._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Cm.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,wo._)`${a} <= ${t.length}`);r.if((0,wo.not)(c),()=>u(c)),e.ok(c)}function u(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:Cm.Type.Num},c),i.allErrors||r.if((0,wo.not)(c),()=>r.break())})}}Xs.validateAdditionalItems=KE;Xs.default=H3});var bm=S(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.validateTuple=void 0;var GE=Q(),yc=pe(),q3=mr(),K3={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return WE(e,"additionalItems",t);r.items=!0,!(0,yc.alwaysValidSchema)(r,t)&&e.ok((0,q3.validateArray)(e))}};function WE(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=yc.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,GE._)`${s}.length`);r.forEach((p,d)=>{(0,yc.alwaysValidSchema)(a,p)||(n.if((0,GE._)`${c} > ${d}`,()=>e.subschema({keyword:i,schemaProp:d,dataProp:d},u)),e.ok(u))});function l(p){let{opts:d,errSchemaPath:h}=a,m=r.length,f=m===p.minItems&&(m===p.maxItems||p[t]===!1);if(d.strictTuples&&!f){let g=`"${i}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,yc.checkStrictMode)(a,g,d.strictTuples)}}}ea.validateTuple=WE;ea.default=K3});var ZE=S(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var G3=bm(),W3={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,G3.validateTuple)(e,"items")};xm.default=W3});var YE=S(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var JE=Q(),Z3=pe(),J3=mr(),Y3=wm(),Q3={message:({params:{len:e}})=>(0,JE.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,JE._)`{limit: ${e}}`},X3={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Q3,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,Z3.alwaysValidSchema)(n,t)&&(o?(0,Y3.validateAdditionalItems)(e,o):e.ok((0,J3.validateArray)(e)))}};Sm.default=X3});var QE=S(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var gr=Q(),Dc=pe(),ej={message:({params:{min:e,max:t}})=>t===void 0?(0,gr.str)`must contain at least ${e} valid item(s)`:(0,gr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,gr._)`{minContains: ${e}}`:(0,gr._)`{minContains: ${e}, maxContains: ${t}}`},tj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:ej,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:u,maxContains:c}=n;s.opts.next?(i=u===void 0?1:u,a=c):i=1;let l=t.const("len",(0,gr._)`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){(0,Dc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,Dc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Dc.alwaysValidSchema)(s,r)){let f=(0,gr._)`${l} >= ${i}`;a!==void 0&&(f=(0,gr._)`${f} && ${l} <= ${a}`),e.pass(f);return}s.items=!0;let p=t.name("valid");a===void 0&&i===1?h(p,()=>t.if(p,()=>t.break())):i===0?(t.let(p,!0),a!==void 0&&t.if((0,gr._)`${o}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,()=>e.reset());function d(){let f=t.name("_valid"),g=t.let("count",0);h(f,()=>t.if(f,()=>m(g)))}function h(f,g){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Dc.Type.Num,compositeRule:!0},f),g()})}function m(f){t.code((0,gr._)`${f}++`),a===void 0?t.if((0,gr._)`${f} >= ${i}`,()=>t.assign(p,!0).break()):(t.if((0,gr._)`${f} > ${a}`,()=>t.assign(p,!1).break()),i===1?t.assign(p,!0):t.if((0,gr._)`${f} >= ${i}`,()=>t.assign(p,!0)))}}};Em.default=tj});var t_=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.validateSchemaDeps=tn.validatePropertyDeps=tn.error=void 0;var _m=Q(),rj=pe(),ta=mr();tn.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,_m.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,_m._)`{property: ${e},
29
+ || ${i} === "boolean" || ${o} === null`).assign(a,(0,J._)`[${o}]`)}}}function BL({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,J._)`${t} !== undefined`,()=>e.assign((0,J._)`${t}[${r}]`,n))}function $f(e,t,r,n=ci.Correct){let o=n===ci.Correct?J.operators.EQ:J.operators.NEQ,s;switch(e){case"null":return(0,J._)`${t} ${o} null`;case"array":s=(0,J._)`Array.isArray(${t})`;break;case"object":s=(0,J._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i((0,J._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return(0,J._)`typeof ${t} ${o} ${e}`}return n===ci.Correct?s:(0,J.not)(s);function i(a=J.nil){return(0,J.and)((0,J._)`typeof ${t} == "number"`,a,r?(0,J._)`isFinite(${t})`:J.nil)}}wt.checkDataType=$f;function kf(e,t,r,n){if(e.length===1)return $f(e[0],t,r,n);let o,s=(0,yS.toHash)(e);if(s.array&&s.object){let i=(0,J._)`typeof ${t} != "object"`;o=s.null?i:(0,J._)`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=J.nil;s.number&&delete s.integer;for(let i in s)o=(0,J.and)(o,$f(i,t,r,n));return o}wt.checkDataTypes=kf;var zL={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,J._)`{type: ${e}}`:(0,J._)`{type: ${t}}`};function If(e){let t=jL(e);(0,IL.reportError)(t,zL)}wt.reportTypeError=If;function jL(e){let{gen:t,data:r,schema:n}=e,o=(0,yS.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var wS=S(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});ec.assignDefaults=void 0;var li=Q(),UL=pe();function VL(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)CS(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,s)=>CS(e,s,o.default))}ec.assignDefaults=VL;function CS(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=(0,li._)`${s}${(0,li.getProperty)(t)}`;if(o){(0,UL.checkStrictMode)(e,`default is ignored for: ${a}`);return}let u=(0,li._)`${a} === undefined`;i.useDefaults==="empty"&&(u=(0,li._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,li._)`${a} = ${(0,li.stringify)(r)}`)}});var mr=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.validateUnion=Ce.validateArray=Ce.usePattern=Ce.callValidateCode=Ce.schemaProperties=Ce.allSchemaProperties=Ce.noPropertyInData=Ce.propertyInData=Ce.isOwnProperty=Ce.hasPropFunc=Ce.reportMissingProp=Ce.checkMissingProp=Ce.checkReportMissingProp=void 0;var Ie=Q(),Nf=pe(),Mn=Cn(),HL=pe();function qL(e,t){let{gen:r,data:n,it:o}=e;r.if(Mf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ie._)`${t}`},!0),e.error()})}Ce.checkReportMissingProp=qL;function KL({gen:e,data:t,it:{opts:r}},n,o){return(0,Ie.or)(...n.map(s=>(0,Ie.and)(Mf(e,t,s,r.ownProperties),(0,Ie._)`${o} = ${s}`)))}Ce.checkMissingProp=KL;function GL(e,t){e.setParams({missingProperty:t},!0),e.error()}Ce.reportMissingProp=GL;function bS(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ie._)`Object.prototype.hasOwnProperty`})}Ce.hasPropFunc=bS;function Of(e,t,r){return(0,Ie._)`${bS(e)}.call(${t}, ${r})`}Ce.isOwnProperty=Of;function WL(e,t,r,n){let o=(0,Ie._)`${t}${(0,Ie.getProperty)(r)} !== undefined`;return n?(0,Ie._)`${o} && ${Of(e,t,r)}`:o}Ce.propertyInData=WL;function Mf(e,t,r,n){let o=(0,Ie._)`${t}${(0,Ie.getProperty)(r)} === undefined`;return n?(0,Ie.or)(o,(0,Ie.not)(Of(e,t,r))):o}Ce.noPropertyInData=Mf;function xS(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Ce.allSchemaProperties=xS;function ZL(e,t){return xS(t).filter(r=>!(0,Nf.alwaysValidSchema)(e,t[r]))}Ce.schemaProperties=ZL;function JL({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,u,c){let l=c?(0,Ie._)`${e}, ${t}, ${n}${o}`:t,p=[[Mn.default.instancePath,(0,Ie.strConcat)(Mn.default.instancePath,s)],[Mn.default.parentData,i.parentData],[Mn.default.parentDataProperty,i.parentDataProperty],[Mn.default.rootData,Mn.default.rootData]];i.opts.dynamicRef&&p.push([Mn.default.dynamicAnchors,Mn.default.dynamicAnchors]);let d=(0,Ie._)`${l}, ${r.object(...p)}`;return u!==Ie.nil?(0,Ie._)`${a}.call(${u}, ${d})`:(0,Ie._)`${a}(${d})`}Ce.callValidateCode=JL;var YL=(0,Ie._)`new RegExp`;function QL({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Ie._)`${o.code==="new RegExp"?YL:(0,HL.useFunc)(e,o)}(${r}, ${n})`})}Ce.usePattern=QL;function XL(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let u=t.const("len",(0,Ie._)`${r}.length`);t.forRange("i",0,u,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:Nf.Type.Num},s),t.if((0,Ie.not)(s),a)})}}Ce.validateArray=XL;function eB(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Nf.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((u,c)=>{let l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(i,(0,Ie._)`${i} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ie.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}Ce.validateUnion=eB});var _S=S(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.validateKeywordUsage=Qr.validSchemaType=Qr.funcKeywordCode=Qr.macroKeywordCode=void 0;var Tt=Q(),yo=Cn(),tB=mr(),rB=Os();function nB(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),u=ES(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:Tt.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Qr.macroKeywordCode=nB;function oB(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:u}=e;sB(u,t);let c=!a&&t.compile?t.compile.call(u.self,s,i,u):t.validate,l=ES(n,o,c),p=n.let("valid");e.block$data(p,d),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function d(){if(t.errors===!1)f(),t.modifying&&SS(e),g(()=>e.error());else{let y=t.async?h():m();t.modifying&&SS(e),g(()=>iB(e,y))}}function h(){let y=n.let("ruleErrs",null);return n.try(()=>f((0,Tt._)`await `),b=>n.assign(p,!1).if((0,Tt._)`${b} instanceof ${u.ValidationError}`,()=>n.assign(y,(0,Tt._)`${b}.errors`),()=>n.throw(b))),y}function m(){let y=(0,Tt._)`${l}.errors`;return n.assign(y,null),f(Tt.nil),y}function f(y=t.async?(0,Tt._)`await `:Tt.nil){let b=u.opts.passContext?yo.default.this:yo.default.self,w=!("compile"in t&&!a||t.schema===!1);n.assign(p,(0,Tt._)`${y}${(0,tB.callValidateCode)(e,l,b,w)}`,t.modifying)}function g(y){var b;n.if((0,Tt.not)((b=t.valid)!==null&&b!==void 0?b:p),y)}}Qr.funcKeywordCode=oB;function SS(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Tt._)`${n.parentData}[${n.parentDataProperty}]`))}function iB(e,t){let{gen:r}=e;r.if((0,Tt._)`Array.isArray(${t})`,()=>{r.assign(yo.default.vErrors,(0,Tt._)`${yo.default.vErrors} === null ? ${t} : ${yo.default.vErrors}.concat(${t})`).assign(yo.default.errors,(0,Tt._)`${yo.default.vErrors}.length`),(0,rB.extendErrors)(e)},()=>e.error())}function sB({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function ES(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Tt.stringify)(r)})}function aB(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Qr.validSchemaType=aB;function uB({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}Qr.validateKeywordUsage=uB});var TS=S(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.extendSubschemaMode=Ln.extendSubschemaData=Ln.getSubschema=void 0;var Xr=Q(),PS=pe();function cB(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Xr._)`${e.schemaPath}${(0,Xr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Xr._)`${e.schemaPath}${(0,Xr.getProperty)(t)}${(0,Xr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,PS.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Ln.getSubschema=cB;function lB(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:l,opts:p}=t,d=a.let("data",(0,Xr._)`${t.data}${(0,Xr.getProperty)(r)}`,!0);u(d),e.errorPath=(0,Xr.str)`${c}${(0,PS.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Xr._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(o!==void 0){let c=o instanceof Xr.Name?o:a.let("data",o,!0);u(c),i!==void 0&&(e.propertyName=i)}s&&(e.dataTypes=s);function u(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Ln.extendSubschemaData=lB;function pB(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Ln.extendSubschemaMode=pB});var Lf=S((cne,AS)=>{"use strict";AS.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var RS=S((lne,FS)=>{"use strict";var Bn=FS.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};tc(t,n,o,e,"",e)};Bn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Bn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Bn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Bn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function tc(e,t,r,n,o,s,i,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,u,c);for(var l in n){var p=n[l];if(Array.isArray(p)){if(l in Bn.arrayKeywords)for(var d=0;d<p.length;d++)tc(e,t,r,p[d],o+"/"+l+"/"+d,s,o,l,n,d)}else if(l in Bn.propsKeywords){if(p&&typeof p=="object")for(var h in p)tc(e,t,r,p[h],o+"/"+l+"/"+dB(h),s,o,l,n,h)}else(l in Bn.keywords||e.allKeys&&!(l in Bn.skipKeywords))&&tc(e,t,r,p,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,u,c)}}function dB(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ls=S(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.getSchemaRefs=jt.resolveUrl=jt.normalizeId=jt._getFullPath=jt.getFullPath=jt.inlineRef=void 0;var fB=pe(),mB=Lf(),hB=RS(),gB=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function yB(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Bf(e):t?$S(e)<=t:!1}jt.inlineRef=yB;var DB=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Bf(e){for(let t in e){if(DB.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Bf)||typeof r=="object"&&Bf(r))return!0}return!1}function $S(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!gB.has(r)&&(typeof e[r]=="object"&&(0,fB.eachItem)(e[r],n=>t+=$S(n)),t===1/0))return 1/0}return t}function kS(e,t="",r){r!==!1&&(t=pi(t));let n=e.parse(t);return IS(e,n)}jt.getFullPath=kS;function IS(e,t){return e.serialize(t).split("#")[0]+"#"}jt._getFullPath=IS;var vB=/#\/?$/;function pi(e){return e?e.replace(vB,""):""}jt.normalizeId=pi;function CB(e,t,r){return r=pi(r),e.resolve(t,r)}jt.resolveUrl=CB;var wB=/^[a-z_][-a-z0-9._]*$/i;function bB(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=pi(e[r]||t),s={"":o},i=kS(n,o,!1),a={},u=new Set;return hB(e,{allKeys:!0},(p,d,h,m)=>{if(m===void 0)return;let f=i+d,g=s[m];typeof p[r]=="string"&&(g=y.call(this,p[r])),b.call(this,p.$anchor),b.call(this,p.$dynamicAnchor),s[d]=g;function y(w){let T=this.opts.uriResolver.resolve;if(w=pi(g?T(g,w):w),u.has(w))throw l(w);u.add(w);let E=this.refs[w];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?c(p,E.schema,w):w!==pi(f)&&(w[0]==="#"?(c(p,a[w],w),a[w]=p):this.refs[w]=f),w}function b(w){if(typeof w=="string"){if(!wB.test(w))throw new Error(`invalid anchor "${w}"`);y.call(this,`#${w}`)}}}),a;function c(p,d,h){if(d!==void 0&&!mB(p,d))throw l(h)}function l(p){return new Error(`reference "${p}" resolves to more than one schema`)}}jt.getSchemaRefs=bB});var js=S(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.getData=zn.KeywordCxt=zn.validateFunctionCode=void 0;var BS=mS(),NS=Ms(),jf=Rf(),rc=Ms(),xB=wS(),zs=_S(),zf=TS(),j=Q(),G=Cn(),SB=Ls(),wn=pe(),Bs=Os();function EB(e){if(US(e)&&(VS(e),jS(e))){TB(e);return}zS(e,()=>(0,BS.topBoolOrEmptySchema)(e))}zn.validateFunctionCode=EB;function zS({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,(0,j._)`${G.default.data}, ${G.default.valCxt}`,n.$async,()=>{e.code((0,j._)`"use strict"; ${OS(r,o)}`),PB(e,o),e.code(s)}):e.func(t,(0,j._)`${G.default.data}, ${_B(o)}`,n.$async,()=>e.code(OS(r,o)).code(s))}function _B(e){return(0,j._)`{${G.default.instancePath}="", ${G.default.parentData}, ${G.default.parentDataProperty}, ${G.default.rootData}=${G.default.data}${e.dynamicRef?(0,j._)`, ${G.default.dynamicAnchors}={}`:j.nil}}={}`}function PB(e,t){e.if(G.default.valCxt,()=>{e.var(G.default.instancePath,(0,j._)`${G.default.valCxt}.${G.default.instancePath}`),e.var(G.default.parentData,(0,j._)`${G.default.valCxt}.${G.default.parentData}`),e.var(G.default.parentDataProperty,(0,j._)`${G.default.valCxt}.${G.default.parentDataProperty}`),e.var(G.default.rootData,(0,j._)`${G.default.valCxt}.${G.default.rootData}`),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,j._)`${G.default.valCxt}.${G.default.dynamicAnchors}`)},()=>{e.var(G.default.instancePath,(0,j._)`""`),e.var(G.default.parentData,(0,j._)`undefined`),e.var(G.default.parentDataProperty,(0,j._)`undefined`),e.var(G.default.rootData,G.default.data),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,j._)`{}`)})}function TB(e){let{schema:t,opts:r,gen:n}=e;zS(e,()=>{r.$comment&&t.$comment&&qS(e),kB(e),n.let(G.default.vErrors,null),n.let(G.default.errors,0),r.unevaluated&&AB(e),HS(e),OB(e)})}function AB(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,j._)`${r}.evaluated`),t.if((0,j._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,j._)`${e.evaluated}.props`,(0,j._)`undefined`)),t.if((0,j._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,j._)`${e.evaluated}.items`,(0,j._)`undefined`))}function OS(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,j._)`/*# sourceURL=${r} */`:j.nil}function FB(e,t){if(US(e)&&(VS(e),jS(e))){RB(e,t);return}(0,BS.boolOrEmptySchema)(e,t)}function jS({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function US(e){return typeof e.schema!="boolean"}function RB(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&qS(e),IB(e),NB(e);let s=n.const("_errs",G.default.errors);HS(e,s),n.var(t,(0,j._)`${s} === ${G.default.errors}`)}function VS(e){(0,wn.checkUnknownRules)(e),$B(e)}function HS(e,t){if(e.opts.jtd)return MS(e,[],!1,t);let r=(0,NS.getSchemaTypes)(e.schema),n=(0,NS.coerceAndCheckDataType)(e,r);MS(e,r,!n,t)}function $B(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,wn.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function kB(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,wn.checkStrictMode)(e,"default is ignored in the schema root")}function IB(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,SB.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function NB(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function qS({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code((0,j._)`${G.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,j.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,j._)`${G.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function OB(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if((0,j._)`${G.default.errors} === 0`,()=>t.return(G.default.data),()=>t.throw((0,j._)`new ${o}(${G.default.vErrors})`)):(t.assign((0,j._)`${n}.errors`,G.default.vErrors),s.unevaluated&&MB(e),t.return((0,j._)`${G.default.errors} === 0`))}function MB({gen:e,evaluated:t,props:r,items:n}){r instanceof j.Name&&e.assign((0,j._)`${t}.props`,r),n instanceof j.Name&&e.assign((0,j._)`${t}.items`,n)}function MS(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:u,self:c}=e,{RULES:l}=c;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,wn.schemaHasRulesButRef)(s,l))){o.block(()=>GS(e,"$ref",l.all.$ref.definition));return}u.jtd||LB(e,t),o.block(()=>{for(let d of l.rules)p(d);p(l.post)});function p(d){(0,jf.shouldUseGroup)(s,d)&&(d.type?(o.if((0,rc.checkDataType)(d.type,i,u.strictNumbers)),LS(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,rc.reportTypeError)(e)),o.endIf()):LS(e,d),a||o.if((0,j._)`${G.default.errors} === ${n||0}`))}}function LS(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,xB.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,jf.shouldUseRule)(n,s)&&GS(e,s.keyword,s.definition,t.type)})}function LB(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(BB(e,t),e.opts.allowUnionTypes||zB(e,t),jB(e,e.dataTypes))}function BB(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{KS(e.dataTypes,r)||Uf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),VB(e,t)}}function zB(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Uf(e,"use allowUnionTypes to allow union type keyword")}function jB(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,jf.shouldUseRule)(e.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>UB(t,i))&&Uf(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function UB(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function KS(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function VB(e,t){let r=[];for(let n of e.dataTypes)KS(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Uf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,wn.checkStrictMode)(e,t,e.opts.strictTypes)}var nc=class{constructor(t,r,n){if((0,zs.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,wn.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",WS(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,zs.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",G.default.errors))}result(t,r,n){this.failResult((0,j.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,j.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,j._)`${r} !== undefined && (${(0,j.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Bs.reportExtraError:Bs.reportError)(this,this.def.error,r)}$dataError(){(0,Bs.reportError)(this,this.def.$dataError||Bs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Bs.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=j.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=j.nil,r=j.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,j.or)((0,j._)`${o} === undefined`,r)),t!==j.nil&&n.assign(t,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==j.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,j.or)(i(),a());function i(){if(n.length){if(!(r instanceof j.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,j._)`${(0,rc.checkDataTypes)(u,r,s.opts.strictNumbers,rc.DataType.Wrong)}`}return j.nil}function a(){if(o.validateSchema){let u=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,j._)`!${u}(${r})`}return j.nil}}subschema(t,r){let n=(0,zf.getSubschema)(this.it,t);(0,zf.extendSubschemaData)(n,this.it,t),(0,zf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return FB(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=wn.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=wn.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,j.Name)),!0}};zn.KeywordCxt=nc;function GS(e,t,r,n){let o=new nc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,zs.funcKeywordCode)(o,r):"macro"in r?(0,zs.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,zs.funcKeywordCode)(o,r)}var HB=/^\/(?:[^~]|~0|~1)*$/,qB=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function WS(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return G.default.rootData;if(e[0]==="/"){if(!HB.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=G.default.rootData}else{let c=qB.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+c[1];if(o=c[2],o==="#"){if(l>=t)throw new Error(u("property/index",l));return n[t-l]}if(l>t)throw new Error(u("data",l));if(s=r[t-l],!o)return s}let i=s,a=o.split("/");for(let c of a)c&&(s=(0,j._)`${s}${(0,j.getProperty)((0,wn.unescapeJsonPointer)(c))}`,i=(0,j._)`${i} && ${s}`);return i;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}zn.getData=WS});var oc=S(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var Vf=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Hf.default=Vf});var Us=S(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var qf=Ls(),Kf=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,qf.resolveUrl)(t,r,n),this.missingSchema=(0,qf.normalizeId)((0,qf.getFullPath)(t,this.missingRef))}};Gf.default=Kf});var sc=S(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.resolveSchema=hr.getCompilingSchema=hr.resolveRef=hr.compileSchema=hr.SchemaEnv=void 0;var Pr=Q(),KB=oc(),Do=Cn(),Tr=Ls(),ZS=pe(),GB=js(),di=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Tr.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};hr.SchemaEnv=di;function Zf(e){let t=JS.call(this,e);if(t)return t;let r=(0,Tr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new Pr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;e.$async&&(a=i.scopeValue("Error",{ref:KB.default,code:(0,Pr._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let c={gen:i,allErrors:this.opts.allErrors,data:Do.default.data,parentData:Do.default.parentData,parentDataProperty:Do.default.parentDataProperty,dataNames:[Do.default.data],dataPathArr:[Pr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Pr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Pr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Pr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,GB.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let p=i.toString();l=`${i.scopeRefs(Do.default.scope)}return ${p}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let h=new Function(`${Do.default.self}`,`${Do.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){let{props:m,items:f}=c;h.evaluated={props:m instanceof Pr.Name?void 0:m,items:f instanceof Pr.Name?void 0:f,dynamicProps:m instanceof Pr.Name,dynamicItems:f instanceof Pr.Name},h.source&&(h.source.evaluated=(0,Pr.stringify)(h.evaluated))}return e.validate=h,e}catch(p){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),p}finally{this._compilations.delete(e)}}hr.compileSchema=Zf;function WB(e,t,r){var n;r=(0,Tr.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=YB.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new di({schema:i,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=ZB.call(this,s)}hr.resolveRef=WB;function ZB(e){return(0,Tr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Zf.call(this,e)}function JS(e){for(let t of this._compilations)if(JB(t,e))return t}hr.getCompilingSchema=JS;function JB(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function YB(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ic.call(this,e,t)}function ic(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Tr._getFullPath)(this.opts.uriResolver,r),o=(0,Tr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return Wf.call(this,r,e);let s=(0,Tr.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=ic.call(this,e,i);return typeof a?.schema!="object"?void 0:Wf.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Zf.call(this,i),s===(0,Tr.normalizeId)(t)){let{schema:a}=i,{schemaId:u}=this.opts,c=a[u];return c&&(o=(0,Tr.resolveUrl)(this.opts.uriResolver,o,c)),new di({schema:a,schemaId:u,root:e,baseId:o})}return Wf.call(this,r,i)}}hr.resolveSchema=ic;var QB=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Wf(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,ZS.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!QB.has(a)&&c&&(t=(0,Tr.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,ZS.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Tr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=ic.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new di({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var YS=S((gne,XB)=>{XB.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var XS=S((yne,QS)=>{"use strict";var ez={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};QS.exports={HEX:ez}});var aE=S((Dne,sE)=>{"use strict";var{HEX:tz}=XS(),rz=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function nE(e){if(iE(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(rz)||[],[r]=t;return r?{host:oz(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Jf(e,t=!1){let r="",n=!0;for(let o of e){if(tz[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return t&&r.length===0&&(r="0"),r}function nz(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=!1;function u(){if(o.length){if(s===!1){let c=Jf(o);if(c!==void 0)n.push(c);else return r.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(i=!0);continue}else if(l==="%"){if(!u())break;s=!0}else{o.push(l);continue}}return o.length&&(s?r.zone=o.join(""):a?n.push(o.join("")):n.push(Jf(o))),r.address=n.join(""),r}function oE(e){if(iE(e,":")<2)return{host:e,isIPV6:!1};let t=nz(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function oz(e,t){let r="",n=!0,o=e.length;for(let s=0;s<o;s++){let i=e[s];i==="0"&&n?(s+1<=o&&e[s+1]===t||s+1===o)&&(r+=i,n=!1):(i===t?n=!0:n=!1,r+=i)}return r}function iE(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}var eE=/^\.\.?\//u,tE=/^\/\.(?:\/|$)/u,rE=/^\/\.\.(?:\/|$)/u,iz=/^\/?(?:.|\n)*?(?=\/|$)/u;function sz(e){let t=[];for(;e.length;)if(e.match(eE))e=e.replace(eE,"");else if(e.match(tE))e=e.replace(tE,"/");else if(e.match(rE))e=e.replace(rE,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(iz);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function az(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function uz(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=nE(r);if(n.isIPV4)r=n.host;else{let o=oE(n.host);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}sE.exports={recomposeAuthority:uz,normalizeComponentEncoding:az,removeDotSegments:sz,normalizeIPv4:nE,normalizeIPv6:oE,stringArrayToHexStripped:Jf}});var fE=S((vne,dE)=>{"use strict";var cz=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,lz=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function uE(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function cE(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function lE(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function pz(e){return e.secure=uE(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function dz(e){if((e.port===(uE(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function fz(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(lz);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=Yf[o];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function mz(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=Yf[o];s&&(e=s.serialize(e,t));let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function hz(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!cz.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function gz(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var pE={scheme:"http",domainHost:!0,parse:cE,serialize:lE},yz={scheme:"https",domainHost:pE.domainHost,parse:cE,serialize:lE},ac={scheme:"ws",domainHost:!0,parse:pz,serialize:dz},Dz={scheme:"wss",domainHost:ac.domainHost,parse:ac.parse,serialize:ac.serialize},vz={scheme:"urn",parse:fz,serialize:mz,skipNormalize:!0},Cz={scheme:"urn:uuid",parse:hz,serialize:gz,skipNormalize:!0},Yf={http:pE,https:yz,ws:ac,wss:Dz,urn:vz,"urn:uuid":Cz};dE.exports=Yf});var hE=S((Cne,cc)=>{"use strict";var{normalizeIPv6:wz,normalizeIPv4:bz,removeDotSegments:Vs,recomposeAuthority:xz,normalizeComponentEncoding:uc}=aE(),Qf=fE();function Sz(e,t){return typeof e=="string"?e=en(bn(e,t),t):typeof e=="object"&&(e=bn(en(e,t),t)),e}function Ez(e,t,r){let n=Object.assign({scheme:"null"},r),o=mE(bn(e,n),bn(t,n),n,!0);return en(o,{...n,skipEscape:!0})}function mE(e,t,r,n){let o={};return n||(e=bn(en(e,r),r),t=bn(en(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Vs(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Vs(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=Vs(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Vs(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function _z(e,t,r){return typeof e=="string"?(e=unescape(e),e=en(uc(bn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=en(uc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=en(uc(bn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=en(uc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function en(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],s=Qf[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=xz(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=Vs(a)),i===void 0&&(a=a.replace(/^\/\//u,"/%2F")),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var Pz=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function Tz(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||Pz[t])return!0;return!1}var Az=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function bn(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(Az);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let u=bz(n.host);if(u.isIPV4===!1){let c=wz(u.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=Qf[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&Tz(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!a||a&&!a.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Xf={SCHEMES:Qf,normalize:Sz,resolve:Ez,resolveComponents:mE,equal:_z,serialize:en,parse:bn};cc.exports=Xf;cc.exports.default=Xf;cc.exports.fastUri=Xf});var yE=S(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var gE=hE();gE.code='require("ajv/dist/runtime/uri").default';em.default=gE});var EE=S(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.CodeGen=pt.Name=pt.nil=pt.stringify=pt.str=pt._=pt.KeywordCxt=void 0;var Fz=js();Object.defineProperty(pt,"KeywordCxt",{enumerable:!0,get:function(){return Fz.KeywordCxt}});var fi=Q();Object.defineProperty(pt,"_",{enumerable:!0,get:function(){return fi._}});Object.defineProperty(pt,"str",{enumerable:!0,get:function(){return fi.str}});Object.defineProperty(pt,"stringify",{enumerable:!0,get:function(){return fi.stringify}});Object.defineProperty(pt,"nil",{enumerable:!0,get:function(){return fi.nil}});Object.defineProperty(pt,"Name",{enumerable:!0,get:function(){return fi.Name}});Object.defineProperty(pt,"CodeGen",{enumerable:!0,get:function(){return fi.CodeGen}});var Rz=oc(),bE=Us(),$z=Ff(),Hs=sc(),kz=Q(),qs=Ls(),lc=Ms(),rm=pe(),DE=YS(),Iz=yE(),xE=(e,t)=>new RegExp(e,t);xE.code="new RegExp";var Nz=["removeAdditional","useDefaults","coerceTypes"],Oz=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Mz={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Lz={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},vE=200;function Bz(e){var t,r,n,o,s,i,a,u,c,l,p,d,h,m,f,g,y,b,w,T,E,F,$,I,k;let R=e.strict,v=(t=e.code)===null||t===void 0?void 0:t.optimize,z=v===!0||v===void 0?1:v||0,V=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:xE,K=(o=e.uriResolver)!==null&&o!==void 0?o:Iz.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&i!==void 0?i:!0,strictNumbers:(u=(a=e.strictNumbers)!==null&&a!==void 0?a:R)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&l!==void 0?l:"log",strictTuples:(d=(p=e.strictTuples)!==null&&p!==void 0?p:R)!==null&&d!==void 0?d:"log",strictRequired:(m=(h=e.strictRequired)!==null&&h!==void 0?h:R)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:z,regExp:V}:{optimize:z,regExp:V},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:vE,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:vE,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(b=e.messages)!==null&&b!==void 0?b:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(T=e.schemaId)!==null&&T!==void 0?T:"$id",addUsedSchema:(E=e.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(F=e.validateSchema)!==null&&F!==void 0?F:!0,validateFormats:($=e.validateFormats)!==null&&$!==void 0?$:!0,unicodeRegExp:(I=e.unicodeRegExp)!==null&&I!==void 0?I:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:K}}var Ks=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...Bz(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new kz.ValueScope({scope:{},prefixes:Oz,es5:r,lines:n}),this.logger=qz(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,$z.getRules)(),CE.call(this,Mz,t,"NOT SUPPORTED"),CE.call(this,Lz,t,"DEPRECATED","warn"),this._metaOpts=Vz.call(this),t.formats&&jz.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&Uz.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),zz.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=DE;n==="id"&&(o={...DE},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(l,p){await s.call(this,l.$schema);let d=this._addSchema(l,p);return d.validate||i.call(this,d)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(p){if(!(p instanceof bE.default))throw p;return a.call(this,p),await u.call(this,p.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:p}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${p} cannot be resolved`)}async function u(l){let p=await c.call(this,l);this.refs[l]||await s.call(this,p.$schema),this.refs[l]||this.addSchema(p,l,r)}async function c(l){let p=this._loading[l];if(p)return p;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,n,o);return this}let s;if(typeof t=="object"){let{schemaId:i}=this.opts;if(s=t[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,qs.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(t){let r;for(;typeof(r=wE.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Hs.SchemaEnv({schema:{},schemaId:n});if(r=Hs.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=wE.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,qs.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Gz.call(this,n,r),!r)return(0,rm.eachItem)(n,s=>tm.call(this,s)),this;Zz.call(this,r);let o={...r,type:(0,lc.getJSONTypes)(r.type),schemaType:(0,lc.getJSONTypes)(r.schemaType)};return(0,rm.eachItem)(n,o.type.length===0?s=>tm.call(this,s,o):s=>o.type.forEach(i=>tm.call(this,s,o,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let s=o.split("/").slice(1),i=t;for(let a of s)i=i[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=i[a];c&&l&&(i[a]=SE(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof t=="object")i=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;n=(0,qs.normalizeId)(i||n);let c=qs.getSchemaRefs.call(this,t,n);return u=new Hs.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Hs.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Hs.compileSchema.call(this,t)}finally{this.opts=r}}};Ks.ValidationError=Rz.default;Ks.MissingRefError=bE.default;pt.default=Ks;function CE(e,t,r,n="error"){for(let o in e){let s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function wE(e){return e=(0,qs.normalizeId)(e),this.schemas[e]||this.refs[e]}function zz(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function jz(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function Uz(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function Vz(){let e={...this.opts};for(let t of Nz)delete e[t];return e}var Hz={log(){},warn(){},error(){}};function qz(e){if(e===!1)return Hz;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var Kz=/^[a-z_$][a-z0-9_$:-]*$/i;function Gz(e,t){let{RULES:r}=this;if((0,rm.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Kz.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function tm(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,lc.getJSONTypes)(t.type),schemaType:(0,lc.getJSONTypes)(t.schemaType)}};t.before?Wz.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function Wz(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function Zz(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=SE(t)),e.validateSchema=this.compile(t,!0))}var Jz={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function SE(e){return{anyOf:[e,Jz]}}});var _E=S(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Yz={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};nm.default=Yz});var FE=S(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.callRef=vo.getValidate=void 0;var Qz=Us(),PE=mr(),Ut=Q(),mi=Cn(),TE=sc(),pc=pe(),Xz={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:u}=n,{root:c}=s;if((r==="#"||r==="#/")&&o===c.baseId)return p();let l=TE.resolveRef.call(u,c,o,r);if(l===void 0)throw new Qz.default(n.opts.uriResolver,o,r);if(l instanceof TE.SchemaEnv)return d(l);return h(l);function p(){if(s===c)return dc(e,i,s,s.$async);let m=t.scopeValue("root",{ref:c});return dc(e,(0,Ut._)`${m}.validate`,c,c.$async)}function d(m){let f=AE(e,m);dc(e,f,m,m.$async)}function h(m){let f=t.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,Ut.stringify)(m)}:{ref:m}),g=t.name("valid"),y=e.subschema({schema:m,dataTypes:[],schemaPath:Ut.nil,topSchemaRef:f,errSchemaPath:r},g);e.mergeEvaluated(y),e.ok(g)}}};function AE(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ut._)`${r.scopeValue("wrapper",{ref:t})}.validate`}vo.getValidate=AE;function dc(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:u}=s,c=u.passContext?mi.default.this:Ut.nil;n?l():p();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let m=o.let("valid");o.try(()=>{o.code((0,Ut._)`await ${(0,PE.callValidateCode)(e,t,c)}`),h(t),i||o.assign(m,!0)},f=>{o.if((0,Ut._)`!(${f} instanceof ${s.ValidationError})`,()=>o.throw(f)),d(f),i||o.assign(m,!1)}),e.ok(m)}function p(){e.result((0,PE.callValidateCode)(e,t,c),()=>h(t),()=>d(t))}function d(m){let f=(0,Ut._)`${m}.errors`;o.assign(mi.default.vErrors,(0,Ut._)`${mi.default.vErrors} === null ? ${f} : ${mi.default.vErrors}.concat(${f})`),o.assign(mi.default.errors,(0,Ut._)`${mi.default.vErrors}.length`)}function h(m){var f;if(!s.opts.unevaluated)return;let g=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=pc.mergeEvaluated.props(o,g.props,s.props));else{let y=o.var("props",(0,Ut._)`${m}.evaluated.props`);s.props=pc.mergeEvaluated.props(o,y,s.props,Ut.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=pc.mergeEvaluated.items(o,g.items,s.items));else{let y=o.var("items",(0,Ut._)`${m}.evaluated.items`);s.items=pc.mergeEvaluated.items(o,y,s.items,Ut.Name)}}}vo.callRef=dc;vo.default=Xz});var RE=S(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var e3=_E(),t3=FE(),r3=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e3.default,t3.default];om.default=r3});var $E=S(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var fc=Q(),jn=fc.operators,mc={maximum:{okStr:"<=",ok:jn.LTE,fail:jn.GT},minimum:{okStr:">=",ok:jn.GTE,fail:jn.LT},exclusiveMaximum:{okStr:"<",ok:jn.LT,fail:jn.GTE},exclusiveMinimum:{okStr:">",ok:jn.GT,fail:jn.LTE}},n3={message:({keyword:e,schemaCode:t})=>(0,fc.str)`must be ${mc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,fc._)`{comparison: ${mc[e].okStr}, limit: ${t}}`},o3={keyword:Object.keys(mc),type:"number",schemaType:"number",$data:!0,error:n3,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,fc._)`${r} ${mc[t].fail} ${n} || isNaN(${r})`)}};im.default=o3});var kE=S(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Gs=Q(),i3={message:({schemaCode:e})=>(0,Gs.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Gs._)`{multipleOf: ${e}}`},s3={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:i3,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?(0,Gs._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,Gs._)`${i} !== parseInt(${i})`;e.fail$data((0,Gs._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};sm.default=s3});var NE=S(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});function IE(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}am.default=IE;IE.code='require("ajv/dist/runtime/ucs2length").default'});var OE=S(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var Co=Q(),a3=pe(),u3=NE(),c3={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Co.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Co._)`{limit: ${e}}`},l3={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:c3,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?Co.operators.GT:Co.operators.LT,i=o.opts.unicode===!1?(0,Co._)`${r}.length`:(0,Co._)`${(0,a3.useFunc)(e.gen,u3.default)}(${r})`;e.fail$data((0,Co._)`${i} ${s} ${n}`)}};um.default=l3});var ME=S(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var p3=mr(),hc=Q(),d3={message:({schemaCode:e})=>(0,hc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,hc._)`{pattern: ${e}}`},f3={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:d3,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?(0,hc._)`(new RegExp(${o}, ${i}))`:(0,p3.usePattern)(e,n);e.fail$data((0,hc._)`!${a}.test(${t})`)}};cm.default=f3});var LE=S(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var Ws=Q(),m3={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ws.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ws._)`{limit: ${e}}`},h3={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:m3,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Ws.operators.GT:Ws.operators.LT;e.fail$data((0,Ws._)`Object.keys(${r}).length ${o} ${n}`)}};lm.default=h3});var BE=S(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var Zs=mr(),Js=Q(),g3=pe(),y3={message:({params:{missingProperty:e}})=>(0,Js.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Js._)`{missingProperty: ${e}}`},D3={keyword:"required",type:"object",schemaType:"array",$data:!0,error:y3,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let u=r.length>=a.loopRequired;if(i.allErrors?c():l(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:m}=e.it;for(let f of r)if(h?.[f]===void 0&&!m.has(f)){let g=i.schemaEnv.baseId+i.errSchemaPath,y=`required property "${f}" is not defined at "${g}" (strictRequired)`;(0,g3.checkStrictMode)(i,y,i.opts.strictRequired)}}function c(){if(u||s)e.block$data(Js.nil,p);else for(let h of r)(0,Zs.checkReportMissingProp)(e,h)}function l(){let h=t.let("missing");if(u||s){let m=t.let("valid",!0);e.block$data(m,()=>d(h,m)),e.ok(m)}else t.if((0,Zs.checkMissingProp)(e,r,h)),(0,Zs.reportMissingProp)(e,h),t.else()}function p(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,Zs.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function d(h,m){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(m,(0,Zs.propertyInData)(t,o,h,a.ownProperties)),t.if((0,Js.not)(m),()=>{e.error(),t.break()})},Js.nil)}}};pm.default=D3});var zE=S(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var Ys=Q(),v3={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Ys.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Ys._)`{limit: ${e}}`},C3={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:v3,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Ys.operators.GT:Ys.operators.LT;e.fail$data((0,Ys._)`${r}.length ${o} ${n}`)}};dm.default=C3});var gc=S(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var jE=Lf();jE.code='require("ajv/dist/runtime/equal").default';fm.default=jE});var UE=S(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var mm=Ms(),dt=Q(),w3=pe(),b3=gc(),x3={message:({params:{i:e,j:t}})=>(0,dt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,dt._)`{i: ${e}, j: ${t}}`},S3={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:x3,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let u=t.let("valid"),c=s.items?(0,mm.getSchemaTypes)(s.items):[];e.block$data(u,l,(0,dt._)`${i} === false`),e.ok(u);function l(){let m=t.let("i",(0,dt._)`${r}.length`),f=t.let("j");e.setParams({i:m,j:f}),t.assign(u,!0),t.if((0,dt._)`${m} > 1`,()=>(p()?d:h)(m,f))}function p(){return c.length>0&&!c.some(m=>m==="object"||m==="array")}function d(m,f){let g=t.name("item"),y=(0,mm.checkDataTypes)(c,g,a.opts.strictNumbers,mm.DataType.Wrong),b=t.const("indices",(0,dt._)`{}`);t.for((0,dt._)`;${m}--;`,()=>{t.let(g,(0,dt._)`${r}[${m}]`),t.if(y,(0,dt._)`continue`),c.length>1&&t.if((0,dt._)`typeof ${g} == "string"`,(0,dt._)`${g} += "_"`),t.if((0,dt._)`typeof ${b}[${g}] == "number"`,()=>{t.assign(f,(0,dt._)`${b}[${g}]`),e.error(),t.assign(u,!1).break()}).code((0,dt._)`${b}[${g}] = ${m}`)})}function h(m,f){let g=(0,w3.useFunc)(t,b3.default),y=t.name("outer");t.label(y).for((0,dt._)`;${m}--;`,()=>t.for((0,dt._)`${f} = ${m}; ${f}--;`,()=>t.if((0,dt._)`${g}(${r}[${m}], ${r}[${f}])`,()=>{e.error(),t.assign(u,!1).break(y)})))}}};hm.default=S3});var VE=S(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var gm=Q(),E3=pe(),_3=gc(),P3={message:"must be equal to constant",params:({schemaCode:e})=>(0,gm._)`{allowedValue: ${e}}`},T3={keyword:"const",$data:!0,error:P3,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,gm._)`!${(0,E3.useFunc)(t,_3.default)}(${r}, ${o})`):e.fail((0,gm._)`${s} !== ${r}`)}};ym.default=T3});var HE=S(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var Qs=Q(),A3=pe(),F3=gc(),R3={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Qs._)`{allowedValues: ${e}}`},$3={keyword:"enum",schemaType:"array",$data:!0,error:R3,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,u,c=()=>u??(u=(0,A3.useFunc)(t,F3.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,p);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",s);l=(0,Qs.or)(...o.map((m,f)=>d(h,f)))}e.pass(l);function p(){t.assign(l,!1),t.forOf("v",s,h=>t.if((0,Qs._)`${c()}(${r}, ${h})`,()=>t.assign(l,!0).break()))}function d(h,m){let f=o[m];return typeof f=="object"&&f!==null?(0,Qs._)`${c()}(${r}, ${h}[${m}])`:(0,Qs._)`${r} === ${f}`}}};Dm.default=$3});var qE=S(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var k3=$E(),I3=kE(),N3=OE(),O3=ME(),M3=LE(),L3=BE(),B3=zE(),z3=UE(),j3=VE(),U3=HE(),V3=[k3.default,I3.default,N3.default,O3.default,M3.default,L3.default,B3.default,z3.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},j3.default,U3.default];vm.default=V3});var wm=S(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.validateAdditionalItems=void 0;var wo=Q(),Cm=pe(),H3={message:({params:{len:e}})=>(0,wo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,wo._)`{limit: ${e}}`},q3={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:H3,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Cm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}KE(e,n)}};function KE(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",(0,wo._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,wo._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Cm.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,wo._)`${a} <= ${t.length}`);r.if((0,wo.not)(c),()=>u(c)),e.ok(c)}function u(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:Cm.Type.Num},c),i.allErrors||r.if((0,wo.not)(c),()=>r.break())})}}Xs.validateAdditionalItems=KE;Xs.default=q3});var bm=S(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.validateTuple=void 0;var GE=Q(),yc=pe(),K3=mr(),G3={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return WE(e,"additionalItems",t);r.items=!0,!(0,yc.alwaysValidSchema)(r,t)&&e.ok((0,K3.validateArray)(e))}};function WE(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=yc.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,GE._)`${s}.length`);r.forEach((p,d)=>{(0,yc.alwaysValidSchema)(a,p)||(n.if((0,GE._)`${c} > ${d}`,()=>e.subschema({keyword:i,schemaProp:d,dataProp:d},u)),e.ok(u))});function l(p){let{opts:d,errSchemaPath:h}=a,m=r.length,f=m===p.minItems&&(m===p.maxItems||p[t]===!1);if(d.strictTuples&&!f){let g=`"${i}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,yc.checkStrictMode)(a,g,d.strictTuples)}}}ea.validateTuple=WE;ea.default=G3});var ZE=S(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var W3=bm(),Z3={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,W3.validateTuple)(e,"items")};xm.default=Z3});var YE=S(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var JE=Q(),J3=pe(),Y3=mr(),Q3=wm(),X3={message:({params:{len:e}})=>(0,JE.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,JE._)`{limit: ${e}}`},ej={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:X3,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,J3.alwaysValidSchema)(n,t)&&(o?(0,Q3.validateAdditionalItems)(e,o):e.ok((0,Y3.validateArray)(e)))}};Sm.default=ej});var QE=S(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var gr=Q(),Dc=pe(),tj={message:({params:{min:e,max:t}})=>t===void 0?(0,gr.str)`must contain at least ${e} valid item(s)`:(0,gr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,gr._)`{minContains: ${e}}`:(0,gr._)`{minContains: ${e}, maxContains: ${t}}`},rj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tj,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:u,maxContains:c}=n;s.opts.next?(i=u===void 0?1:u,a=c):i=1;let l=t.const("len",(0,gr._)`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){(0,Dc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,Dc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Dc.alwaysValidSchema)(s,r)){let f=(0,gr._)`${l} >= ${i}`;a!==void 0&&(f=(0,gr._)`${f} && ${l} <= ${a}`),e.pass(f);return}s.items=!0;let p=t.name("valid");a===void 0&&i===1?h(p,()=>t.if(p,()=>t.break())):i===0?(t.let(p,!0),a!==void 0&&t.if((0,gr._)`${o}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,()=>e.reset());function d(){let f=t.name("_valid"),g=t.let("count",0);h(f,()=>t.if(f,()=>m(g)))}function h(f,g){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Dc.Type.Num,compositeRule:!0},f),g()})}function m(f){t.code((0,gr._)`${f}++`),a===void 0?t.if((0,gr._)`${f} >= ${i}`,()=>t.assign(p,!0).break()):(t.if((0,gr._)`${f} > ${a}`,()=>t.assign(p,!1).break()),i===1?t.assign(p,!0):t.if((0,gr._)`${f} >= ${i}`,()=>t.assign(p,!0)))}}};Em.default=rj});var t_=S(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.validateSchemaDeps=tn.validatePropertyDeps=tn.error=void 0;var _m=Q(),nj=pe(),ta=mr();tn.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,_m.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,_m._)`{property: ${e},
30
30
  missingProperty: ${n},
31
31
  depsCount: ${t},
32
- deps: ${r}}`};var nj={keyword:"dependencies",type:"object",schemaType:"object",error:tn.error,code(e){let[t,r]=oj(e);XE(e,t),e_(e,r)}};function oj({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function XE(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let u=(0,ta.propertyInData)(r,n,i,o.opts.ownProperties);e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(u,()=>{for(let c of a)(0,ta.checkReportMissingProp)(e,c)}):(r.if((0,_m._)`${u} && (${(0,ta.checkMissingProp)(e,a,s)})`),(0,ta.reportMissingProp)(e,s),r.else())}}tn.validatePropertyDeps=XE;function e_(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t)(0,rj.alwaysValidSchema)(s,t[a])||(r.if((0,ta.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let u=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}tn.validateSchemaDeps=e_;tn.default=nj});var n_=S(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var r_=Q(),ij=pe(),sj={message:"property name must be valid",params:({params:e})=>(0,r_._)`{propertyName: ${e.propertyName}}`},aj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:sj,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,ij.alwaysValidSchema)(o,r))return;let s=t.name("valid");t.forIn("key",n,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if((0,r_.not)(s),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(s)}};Pm.default=aj});var Am=S(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var vc=mr(),Ar=Q(),uj=vn(),Cc=pe(),cj={message:"must NOT have additional properties",params:({params:e})=>(0,Ar._)`{additionalProperty: ${e.additionalProperty}}`},lj={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:cj,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,Cc.alwaysValidSchema)(i,r))return;let c=(0,vc.allSchemaProperties)(n.properties),l=(0,vc.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Ar._)`${s} === ${uj.default.errors}`);function p(){t.forIn("key",o,g=>{!c.length&&!l.length?m(g):t.if(d(g),()=>m(g))})}function d(g){let y;if(c.length>8){let b=(0,Cc.schemaRefOrVal)(i,n.properties,"properties");y=(0,vc.isOwnProperty)(t,b,g)}else c.length?y=(0,Ar.or)(...c.map(b=>(0,Ar._)`${g} === ${b}`)):y=Ar.nil;return l.length&&(y=(0,Ar.or)(y,...l.map(b=>(0,Ar._)`${(0,vc.usePattern)(e,b)}.test(${g})`))),(0,Ar.not)(y)}function h(g){t.code((0,Ar._)`delete ${o}[${g}]`)}function m(g){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Cc.alwaysValidSchema)(i,r)){let y=t.name("valid");u.removeAdditional==="failing"?(f(g,y,!1),t.if((0,Ar.not)(y),()=>{e.reset(),h(g)})):(f(g,y),a||t.if((0,Ar.not)(y),()=>t.break()))}}function f(g,y,b){let w={keyword:"additionalProperties",dataProp:g,dataPropType:Cc.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(w,y)}}};Tm.default=lj});var s_=S(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var pj=js(),o_=mr(),Fm=pe(),i_=Am(),dj={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&i_.default.code(new pj.KeywordCxt(s,i_.default,"additionalProperties"));let i=(0,o_.allSchemaProperties)(r);for(let p of i)s.definedProperties.add(p);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=Fm.mergeEvaluated.props(t,(0,Fm.toHash)(i),s.props));let a=i.filter(p=>!(0,Fm.alwaysValidSchema)(s,r[p]));if(a.length===0)return;let u=t.name("valid");for(let p of a)c(p)?l(p):(t.if((0,o_.propertyInData)(t,o,p,s.opts.ownProperties)),l(p),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(u);function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}function l(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};Rm.default=dj});var l_=S($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var a_=mr(),wc=Q(),u_=pe(),c_=pe(),fj={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,a_.allSchemaProperties)(r),u=a.filter(f=>(0,u_.alwaysValidSchema)(s,r[f]));if(a.length===0||u.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof wc.Name)&&(s.props=(0,c_.evaluatedPropsToName)(t,s.props));let{props:p}=s;d();function d(){for(let f of a)c&&h(f),s.allErrors?m(f):(t.var(l,!0),m(f),t.if(l))}function h(f){for(let g in c)new RegExp(f).test(g)&&(0,u_.checkStrictMode)(s,`property ${g} matches pattern ${f} (use allowMatchingProperties)`)}function m(f){t.forIn("key",n,g=>{t.if((0,wc._)`${(0,a_.usePattern)(e,f)}.test(${g})`,()=>{let y=u.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:g,dataPropType:c_.Type.Str},l),s.opts.unevaluated&&p!==!0?t.assign((0,wc._)`${p}[${g}]`,!0):!y&&!s.allErrors&&t.if((0,wc.not)(l),()=>t.break())})})}}};$m.default=fj});var p_=S(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var mj=pe(),hj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,mj.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};km.default=hj});var d_=S(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var gj=mr(),yj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gj.validateUnion,error:{message:"must match a schema in anyOf"}};Im.default=yj});var f_=S(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var bc=Q(),Dj=pe(),vj={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,bc._)`{passingSchemas: ${e.passing}}`},Cj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:vj,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),u=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(i,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,p)=>{let d;(0,Dj.alwaysValidSchema)(o,l)?t.var(u,!0):d=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&t.if((0,bc._)`${u} && ${i}`).assign(i,!1).assign(a,(0,bc._)`[${a}, ${p}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(a,p),d&&e.mergeEvaluated(d,bc.Name)})})}}};Nm.default=Cj});var m_=S(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var wj=pe(),bj={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if((0,wj.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};Om.default=bj});var y_=S(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var xc=Q(),g_=pe(),xj={message:({params:e})=>(0,xc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,xc._)`{failingKeyword: ${e.ifClause}}`},Sj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:xj,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,g_.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=h_(n,"then"),s=h_(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(u(),e.reset(),o&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else o?t.if(a,c("then")):t.if((0,xc.not)(a),c("else"));e.pass(i,()=>e.error(!0));function u(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,p){return()=>{let d=e.subschema({keyword:l},a);t.assign(i,a),e.mergeValidEvaluated(d,i),p?t.assign(p,(0,xc._)`${l}`):e.setParams({ifClause:l})}}}};function h_(e,t){let r=e.schema[t];return r!==void 0&&!(0,g_.alwaysValidSchema)(e,r)}Mm.default=Sj});var D_=S(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var Ej=pe(),_j={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Ej.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Lm.default=_j});var v_=S(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var Pj=wm(),Tj=ZE(),Aj=bm(),Fj=YE(),Rj=QE(),$j=t_(),kj=n_(),Ij=Am(),Nj=s_(),Oj=l_(),Mj=p_(),Lj=d_(),Bj=f_(),zj=m_(),jj=y_(),Uj=D_();function Vj(e=!1){let t=[Mj.default,Lj.default,Bj.default,zj.default,jj.default,Uj.default,kj.default,Ij.default,$j.default,Nj.default,Oj.default];return e?t.push(Tj.default,Fj.default):t.push(Pj.default,Aj.default),t.push(Rj.default),t}Bm.default=Vj});var C_=S(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Ke=Q(),Hj={message:({schemaCode:e})=>(0,Ke.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ke._)`{format: ${e}}`},qj={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Hj,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:u,errSchemaPath:c,schemaEnv:l,self:p}=a;if(!u.validateFormats)return;o?d():h();function d(){let m=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),f=r.const("fDef",(0,Ke._)`${m}[${i}]`),g=r.let("fType"),y=r.let("format");r.if((0,Ke._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(g,(0,Ke._)`${f}.type || "string"`).assign(y,(0,Ke._)`${f}.validate`),()=>r.assign(g,(0,Ke._)`"string"`).assign(y,f)),e.fail$data((0,Ke.or)(b(),w()));function b(){return u.strictSchema===!1?Ke.nil:(0,Ke._)`${i} && !${y}`}function w(){let T=l.$async?(0,Ke._)`(${f}.async ? await ${y}(${n}) : ${y}(${n}))`:(0,Ke._)`${y}(${n})`,E=(0,Ke._)`(typeof ${y} == "function" ? ${T} : ${y}.test(${n}))`;return(0,Ke._)`${y} && ${y} !== true && ${g} === ${t} && !${E}`}}function h(){let m=p.formats[s];if(!m){b();return}if(m===!0)return;let[f,g,y]=w(m);f===t&&e.pass(T());function b(){if(u.strictSchema===!1){p.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function w(E){let F=E instanceof RegExp?(0,Ke.regexpCode)(E):u.code.formats?(0,Ke._)`${u.code.formats}${(0,Ke.getProperty)(s)}`:void 0,$=r.scopeValue("formats",{key:s,ref:E,code:F});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,Ke._)`${$}.validate`]:["string",E,$]}function T(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ke._)`await ${y}(${n})`}return typeof g=="function"?(0,Ke._)`${y}(${n})`:(0,Ke._)`${y}.test(${n})`}}}};zm.default=qj});var w_=S(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var Kj=C_(),Gj=[Kj.default];jm.default=Gj});var b_=S(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.contentVocabulary=hi.metadataVocabulary=void 0;hi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];hi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var S_=S(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Wj=RE(),Zj=qE(),Jj=v_(),Yj=w_(),x_=b_(),Qj=[Wj.default,Zj.default,(0,Jj.default)(),Yj.default,x_.metadataVocabulary,x_.contentVocabulary];Um.default=Qj});var __=S(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.DiscrError=void 0;var E_;(function(e){e.Tag="tag",e.Mapping="mapping"})(E_||(Sc.DiscrError=E_={}))});var T_=S(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});var gi=Q(),Vm=__(),P_=sc(),Xj=Us(),eU=pe(),tU={message:({params:{discrError:e,tagName:t}})=>e===Vm.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,gi._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},rU={keyword:"discriminator",type:"object",schemaType:"object",error:tU,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),c=t.const("tag",(0,gi._)`${r}${(0,gi.getProperty)(a)}`);t.if((0,gi._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Vm.DiscrError.Tag,tag:c,tagName:a})),e.ok(u);function l(){let h=d();t.if(!1);for(let m in h)t.elseIf((0,gi._)`${c} === ${m}`),t.assign(u,p(h[m]));t.else(),e.error(!1,{discrError:Vm.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function p(h){let m=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:h},m);return e.mergeEvaluated(f,gi.Name),m}function d(){var h;let m={},f=y(o),g=!0;for(let T=0;T<i.length;T++){let E=i[T];if(E?.$ref&&!(0,eU.schemaHasRulesButRef)(E,s.self.RULES)){let $=E.$ref;if(E=P_.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,$),E instanceof P_.SchemaEnv&&(E=E.schema),E===void 0)throw new Xj.default(s.opts.uriResolver,s.baseId,$)}let F=(h=E?.properties)===null||h===void 0?void 0:h[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(f||y(E)),b(F,T)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return m;function y({required:T}){return Array.isArray(T)&&T.includes(a)}function b(T,E){if(T.const)w(T.const,E);else if(T.enum)for(let F of T.enum)w(F,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(T,E){if(typeof T!="string"||T in m)throw new Error(`discriminator: "${a}" values must be unique strings`);m[T]=E}}}};Hm.default=rU});var A_=S((noe,nU)=>{nU.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Km=S((Ne,qm)=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.MissingRefError=Ne.ValidationError=Ne.CodeGen=Ne.Name=Ne.nil=Ne.stringify=Ne.str=Ne._=Ne.KeywordCxt=Ne.Ajv=void 0;var oU=EE(),iU=S_(),sU=T_(),F_=A_(),aU=["/properties"],Ec="http://json-schema.org/draft-07/schema",yi=class extends oU.default{_addVocabularies(){super._addVocabularies(),iU.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(sU.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(F_,aU):F_;this.addMetaSchema(t,Ec,!1),this.refs["http://json-schema.org/schema"]=Ec}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ec)?Ec:void 0)}};Ne.Ajv=yi;qm.exports=Ne=yi;qm.exports.Ajv=yi;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.default=yi;var uU=js();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return uU.KeywordCxt}});var Di=Q();Object.defineProperty(Ne,"_",{enumerable:!0,get:function(){return Di._}});Object.defineProperty(Ne,"str",{enumerable:!0,get:function(){return Di.str}});Object.defineProperty(Ne,"stringify",{enumerable:!0,get:function(){return Di.stringify}});Object.defineProperty(Ne,"nil",{enumerable:!0,get:function(){return Di.nil}});Object.defineProperty(Ne,"Name",{enumerable:!0,get:function(){return Di.Name}});Object.defineProperty(Ne,"CodeGen",{enumerable:!0,get:function(){return Di.CodeGen}});var cU=oc();Object.defineProperty(Ne,"ValidationError",{enumerable:!0,get:function(){return cU.default}});var lU=Us();Object.defineProperty(Ne,"MissingRefError",{enumerable:!0,get:function(){return lU.default}})});var L_=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.formatNames=nn.fastFormats=nn.fullFormats=void 0;function rn(e,t){return{validate:e,compare:t}}nn.fullFormats={date:rn(I_,Jm),time:rn(Wm(!0),Ym),"date-time":rn(R_(!0),O_),"iso-time":rn(Wm(),N_),"iso-date-time":rn(R_(),M_),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:gU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:xU,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:yU,int32:{type:"number",validate:CU},int64:{type:"number",validate:wU},float:{type:"number",validate:k_},double:{type:"number",validate:k_},password:!0,binary:!0};nn.fastFormats={...nn.fullFormats,date:rn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Jm),time:rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ym),"date-time":rn(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,O_),"iso-time":rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,N_),"iso-date-time":rn(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,M_),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};nn.formatNames=Object.keys(nn.fullFormats);function pU(e){return e%4===0&&(e%100!==0||e%400===0)}var dU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,fU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function I_(e){let t=dU.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&pU(r)?29:fU[n])}function Jm(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Gm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Wm(e){return function(r){let n=Gm.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],u=n[5]==="-"?-1:1,c=+(n[6]||0),l=+(n[7]||0);if(c>23||l>59||e&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let p=s-l*u,d=o-c*u-(p<0?1:0);return(d===23||d===-1)&&(p===59||p===-1)&&i<61}}function Ym(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function N_(e,t){if(!(e&&t))return;let r=Gm.exec(e),n=Gm.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Zm=/t|\s/i;function R_(e){let t=Wm(e);return function(n){let o=n.split(Zm);return o.length===2&&I_(o[0])&&t(o[1])}}function O_(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function M_(e,t){if(!(e&&t))return;let[r,n]=e.split(Zm),[o,s]=t.split(Zm),i=Jm(r,o);if(i!==void 0)return i||Ym(n,s)}var mU=/\/|:/,hU=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function gU(e){return mU.test(e)&&hU.test(e)}var $_=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function yU(e){return $_.lastIndex=0,$_.test(e)}var DU=-(2**31),vU=2**31-1;function CU(e){return Number.isInteger(e)&&e<=vU&&e>=DU}function wU(e){return Number.isInteger(e)}function k_(){return!0}var bU=/[^\\]\\Z/;function xU(e){if(bU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var B_=S(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.formatLimitDefinition=void 0;var SU=Km(),Fr=Q(),Un=Fr.operators,_c={formatMaximum:{okStr:"<=",ok:Un.LTE,fail:Un.GT},formatMinimum:{okStr:">=",ok:Un.GTE,fail:Un.LT},formatExclusiveMaximum:{okStr:"<",ok:Un.LT,fail:Un.GTE},formatExclusiveMinimum:{okStr:">",ok:Un.GT,fail:Un.LTE}},EU={message:({keyword:e,schemaCode:t})=>(0,Fr.str)`should be ${_c[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Fr._)`{comparison: ${_c[e].okStr}, limit: ${t}}`};vi.formatLimitDefinition={keyword:Object.keys(_c),type:"string",schemaType:"string",$data:!0,error:EU,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:s}=e,{opts:i,self:a}=s;if(!i.validateFormats)return;let u=new SU.KeywordCxt(s,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let d=t.scopeValue("formats",{ref:a.formats,code:i.code.formats}),h=t.const("fmt",(0,Fr._)`${d}[${u.schemaCode}]`);e.fail$data((0,Fr.or)((0,Fr._)`typeof ${h} != "object"`,(0,Fr._)`${h} instanceof RegExp`,(0,Fr._)`typeof ${h}.compare != "function"`,p(h)))}function l(){let d=u.schema,h=a.formats[d];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let m=t.scopeValue("formats",{key:d,ref:h,code:i.code.formats?(0,Fr._)`${i.code.formats}${(0,Fr.getProperty)(d)}`:void 0});e.fail$data(p(m))}function p(d){return(0,Fr._)`${d}.compare(${r}, ${n}) ${_c[o].fail} 0`}},dependencies:["format"]};var _U=e=>(e.addKeyword(vi.formatLimitDefinition),e);vi.default=_U});var V_=S((ra,U_)=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var Ci=L_(),PU=B_(),Qm=Q(),z_=new Qm.Name("fullFormats"),TU=new Qm.Name("fastFormats"),Xm=(e,t={keywords:!0})=>{if(Array.isArray(t))return j_(e,t,Ci.fullFormats,z_),e;let[r,n]=t.mode==="fast"?[Ci.fastFormats,TU]:[Ci.fullFormats,z_],o=t.formats||Ci.formatNames;return j_(e,o,r,n),t.keywords&&(0,PU.default)(e),e};Xm.get=(e,t="full")=>{let n=(t==="fast"?Ci.fastFormats:Ci.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function j_(e,t,r,n){var o,s;(o=(s=e.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,Qm._)`require("ajv-formats/dist/formats").${n}`);for(let i of t)e.addFormat(i,r[i])}U_.exports=ra=Xm;Object.defineProperty(ra,"__esModule",{value:!0});ra.default=Xm});var W_=S((Soe,G_)=>{G_.exports=K_;K_.sync=kU;var H_=require("fs");function $U(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function q_(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:$U(t,r)}function K_(e,t,r){H_.stat(e,function(n,o){r(n,n?!1:q_(o,e,t))})}function kU(e,t){return q_(H_.statSync(e),e,t)}});var X_=S((Eoe,Q_)=>{Q_.exports=J_;J_.sync=IU;var Z_=require("fs");function J_(e,t,r){Z_.stat(e,function(n,o){r(n,n?!1:Y_(o,t))})}function IU(e,t){return Y_(Z_.statSync(e),t)}function Y_(e,t){return e.isFile()&&NU(e,t)}function NU(e,t){var r=e.mode,n=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,p=r&c||r&u&&o===i||r&a&&n===s||r&l&&s===0;return p}});var tP=S((Poe,eP)=>{var _oe=require("fs"),Pc;process.platform==="win32"||global.TESTING_WINDOWS?Pc=W_():Pc=X_();eP.exports=eh;eh.sync=OU;function eh(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){eh(e,t||{},function(s,i){s?o(s):n(i)})})}Pc(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function OU(e,t){try{return Pc.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var uP=S((Toe,aP)=>{var wi=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",rP=require("path"),MU=wi?";":":",nP=tP(),oP=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),iP=(e,t)=>{let r=t.colon||MU,n=e.match(/\//)||wi&&e.match(/\\/)?[""]:[...wi?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=wi?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=wi?o.split(r):[""];return wi&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},sP=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:s}=iP(e,t),i=[],a=c=>new Promise((l,p)=>{if(c===n.length)return t.all&&i.length?l(i):p(oP(e));let d=n[c],h=/^".*"$/.test(d)?d.slice(1,-1):d,m=rP.join(h,e),f=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;l(u(f,c,0))}),u=(c,l,p)=>new Promise((d,h)=>{if(p===o.length)return d(a(l+1));let m=o[p];nP(c+m,{pathExt:s},(f,g)=>{if(!f&&g)if(t.all)i.push(c+m);else return d(c+m);return d(u(c,l,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},LU=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=iP(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=rP.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let p=0;p<n.length;p++){let d=l+n[p];try{if(nP.sync(d,{pathExt:o}))if(t.all)s.push(d);else return d}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw oP(e)};aP.exports=sP;sP.sync=LU});var lP=S((Aoe,th)=>{"use strict";var cP=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};th.exports=cP;th.exports.default=cP});var mP=S((Foe,fP)=>{"use strict";var pP=require("path"),BU=uP(),zU=lP();function dP(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=BU.sync(e.command,{path:r[zU({env:r})],pathExt:t?pP.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return i&&(i=pP.resolve(o?e.options.cwd:"",i)),i}function jU(e){return dP(e)||dP(e,!0)}fP.exports=jU});var hP=S((Roe,nh)=>{"use strict";var rh=/([()\][%!^"`<>&|;, *?])/g;function UU(e){return e=e.replace(rh,"^$1"),e}function VU(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(rh,"^$1"),t&&(e=e.replace(rh,"^$1")),e}nh.exports.command=UU;nh.exports.argument=VU});var yP=S(($oe,gP)=>{"use strict";gP.exports=/^#!(.*)/});var vP=S((koe,DP)=>{"use strict";var HU=yP();DP.exports=(e="")=>{let t=e.match(HU);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var wP=S((Ioe,CP)=>{"use strict";var oh=require("fs"),qU=vP();function KU(e){let r=Buffer.alloc(150),n;try{n=oh.openSync(e,"r"),oh.readSync(n,r,0,150,0),oh.closeSync(n)}catch{}return qU(r.toString())}CP.exports=KU});var EP=S((Noe,SP)=>{"use strict";var GU=require("path"),bP=mP(),xP=hP(),WU=wP(),ZU=process.platform==="win32",JU=/\.(?:com|exe)$/i,YU=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function QU(e){e.file=bP(e);let t=e.file&&WU(e.file);return t?(e.args.unshift(e.file),e.command=t,bP(e)):e.file}function XU(e){if(!ZU)return e;let t=QU(e),r=!JU.test(t);if(e.options.forceShell||r){let n=YU.test(t);e.command=GU.normalize(e.command),e.command=xP.command(e.command),e.args=e.args.map(s=>xP.argument(s,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function e8(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:XU(n)}SP.exports=e8});var TP=S((Ooe,PP)=>{"use strict";var ih=process.platform==="win32";function sh(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function t8(e,t){if(!ih)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let s=_P(o,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function _P(e,t){return ih&&e===1&&!t.file?sh(t.original,"spawn"):null}function r8(e,t){return ih&&e===1&&!t.file?sh(t.original,"spawnSync"):null}PP.exports={hookChildProcess:t8,verifyENOENT:_P,verifyENOENTSync:r8,notFoundError:sh}});var RP=S((Moe,bi)=>{"use strict";var AP=require("child_process"),ah=EP(),uh=TP();function FP(e,t,r){let n=ah(e,t,r),o=AP.spawn(n.command,n.args,n.options);return uh.hookChildProcess(o,n),o}function n8(e,t,r){let n=ah(e,t,r),o=AP.spawnSync(n.command,n.args,n.options);return o.error=o.error||uh.verifyENOENTSync(o.status,n),o}bi.exports=FP;bi.exports.spawn=FP;bi.exports.sync=n8;bi.exports._parse=ah;bi.exports._enoent=uh});var NP=S((yie,C8)=>{C8.exports={name:"dotenv",version:"16.3.2",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var BP=S((Die,bn)=>{var OP=require("fs"),ch=require("path"),w8=require("os"),b8=require("crypto"),x8=NP(),lh=x8.version,S8=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function E8(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
33
- `);let n;for(;(n=S8.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
34
- `),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}function _8(e){let t=LP(e),r=it.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let n=MP(e).split(","),o=n.length,s;for(let i=0;i<o;i++)try{let a=n[i].trim(),u=A8(r,a);s=it.decrypt(u.ciphertext,u.key);break}catch(a){if(i+1>=o)throw a}return it.parse(s)}function P8(e){console.log(`[dotenv@${lh}][INFO] ${e}`)}function T8(e){console.log(`[dotenv@${lh}][WARN] ${e}`)}function Tc(e){console.log(`[dotenv@${lh}][DEBUG] ${e}`)}function MP(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function A8(e,t){let r;try{r=new URL(t)}catch(a){throw a.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):a}let n=r.password;if(!n)throw new Error("INVALID_DOTENV_KEY: Missing key part");let o=r.searchParams.get("environment");if(!o)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);return{ciphertext:i,key:n}}function LP(e){let t=ch.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function F8(e){return e[0]==="~"?ch.join(w8.homedir(),e.slice(1)):e}function R8(e){P8("Loading env from encrypted .env.vault");let t=it._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),it.populate(r,t,e),{parsed:t}}function $8(e){let t=ch.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&(e.path!=null&&(t=F8(e.path)),e.encoding!=null?r=e.encoding:n&&Tc("No encoding is specified. UTF-8 is used by default"));try{let o=it.parse(OP.readFileSync(t,{encoding:r})),s=process.env;return e&&e.processEnv!=null&&(s=e.processEnv),it.populate(s,o,e),{parsed:o}}catch(o){return n&&Tc(`Failed to load ${t} ${o.message}`),{error:o}}}function k8(e){let t=LP(e);return MP(e).length===0?it.configDotenv(e):OP.existsSync(t)?it._configVault(e):(T8(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),it.configDotenv(e))}function I8(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),o=n.subarray(0,12),s=n.subarray(-16);n=n.subarray(12,-16);try{let i=b8.createDecipheriv("aes-256-gcm",r,o);return i.setAuthTag(s),`${i.update(n)}${i.final()}`}catch(i){let a=i instanceof RangeError,u=i.message==="Invalid key length",c=i.message==="Unsupported state or unable to authenticate data";if(a||u){let l="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(l)}else if(c){let l="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(l)}else throw console.error("Error: ",i.code),console.error("Error: ",i.message),i}}function N8(e,t,r={}){let n=!!(r&&r.debug),o=!!(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let s of Object.keys(t))Object.prototype.hasOwnProperty.call(e,s)?(o===!0&&(e[s]=t[s]),n&&Tc(o===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):e[s]=t[s]}var it={configDotenv:$8,_configVault:R8,_parseVault:_8,config:k8,decrypt:I8,parse:E8,populate:N8};bn.exports.configDotenv=it.configDotenv;bn.exports._configVault=it._configVault;bn.exports._parseVault=it._parseVault;bn.exports.config=it.config;bn.exports.decrypt=it.decrypt;bn.exports.parse=it.parse;bn.exports.populate=it.populate;bn.exports=it});var g4={};wa(g4,{createDevToolsServer:()=>Zl,version:()=>bh});module.exports=uT(g4);var cT="1.21.3",Xt=process.env.OVERRIDE_VERSION??cT;var Fc=require("node:http");var $c="preview-url";var bo="framework",ba="platform",xa="node",Sh="/~builder-connect",qn="/~builder-connected",kc="/~builder-dev-tools",Ic="/~builder-dev-tools.js",Kn="/~builder-dev-tools-close",Eh="/mappings";function se(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Sa(e,t=""){let r=se(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function et(e,t,r){if(t){let n=e.ts.createPrinter({newLine:e.ts.NewLineKind.LineFeed,removeComments:r});return e.ts.isSourceFile(t)?n.printFile(t).trim()+`
32
+ deps: ${r}}`};var oj={keyword:"dependencies",type:"object",schemaType:"object",error:tn.error,code(e){let[t,r]=ij(e);XE(e,t),e_(e,r)}};function ij({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function XE(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let u=(0,ta.propertyInData)(r,n,i,o.opts.ownProperties);e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(u,()=>{for(let c of a)(0,ta.checkReportMissingProp)(e,c)}):(r.if((0,_m._)`${u} && (${(0,ta.checkMissingProp)(e,a,s)})`),(0,ta.reportMissingProp)(e,s),r.else())}}tn.validatePropertyDeps=XE;function e_(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t)(0,nj.alwaysValidSchema)(s,t[a])||(r.if((0,ta.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let u=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}tn.validateSchemaDeps=e_;tn.default=oj});var n_=S(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var r_=Q(),sj=pe(),aj={message:"property name must be valid",params:({params:e})=>(0,r_._)`{propertyName: ${e.propertyName}}`},uj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:aj,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,sj.alwaysValidSchema)(o,r))return;let s=t.name("valid");t.forIn("key",n,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if((0,r_.not)(s),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(s)}};Pm.default=uj});var Am=S(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var vc=mr(),Ar=Q(),cj=Cn(),Cc=pe(),lj={message:"must NOT have additional properties",params:({params:e})=>(0,Ar._)`{additionalProperty: ${e.additionalProperty}}`},pj={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lj,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,Cc.alwaysValidSchema)(i,r))return;let c=(0,vc.allSchemaProperties)(n.properties),l=(0,vc.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Ar._)`${s} === ${cj.default.errors}`);function p(){t.forIn("key",o,g=>{!c.length&&!l.length?m(g):t.if(d(g),()=>m(g))})}function d(g){let y;if(c.length>8){let b=(0,Cc.schemaRefOrVal)(i,n.properties,"properties");y=(0,vc.isOwnProperty)(t,b,g)}else c.length?y=(0,Ar.or)(...c.map(b=>(0,Ar._)`${g} === ${b}`)):y=Ar.nil;return l.length&&(y=(0,Ar.or)(y,...l.map(b=>(0,Ar._)`${(0,vc.usePattern)(e,b)}.test(${g})`))),(0,Ar.not)(y)}function h(g){t.code((0,Ar._)`delete ${o}[${g}]`)}function m(g){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Cc.alwaysValidSchema)(i,r)){let y=t.name("valid");u.removeAdditional==="failing"?(f(g,y,!1),t.if((0,Ar.not)(y),()=>{e.reset(),h(g)})):(f(g,y),a||t.if((0,Ar.not)(y),()=>t.break()))}}function f(g,y,b){let w={keyword:"additionalProperties",dataProp:g,dataPropType:Cc.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(w,y)}}};Tm.default=pj});var s_=S(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var dj=js(),o_=mr(),Fm=pe(),i_=Am(),fj={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&i_.default.code(new dj.KeywordCxt(s,i_.default,"additionalProperties"));let i=(0,o_.allSchemaProperties)(r);for(let p of i)s.definedProperties.add(p);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=Fm.mergeEvaluated.props(t,(0,Fm.toHash)(i),s.props));let a=i.filter(p=>!(0,Fm.alwaysValidSchema)(s,r[p]));if(a.length===0)return;let u=t.name("valid");for(let p of a)c(p)?l(p):(t.if((0,o_.propertyInData)(t,o,p,s.opts.ownProperties)),l(p),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(u);function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}function l(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};Rm.default=fj});var l_=S($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var a_=mr(),wc=Q(),u_=pe(),c_=pe(),mj={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,a_.allSchemaProperties)(r),u=a.filter(f=>(0,u_.alwaysValidSchema)(s,r[f]));if(a.length===0||u.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof wc.Name)&&(s.props=(0,c_.evaluatedPropsToName)(t,s.props));let{props:p}=s;d();function d(){for(let f of a)c&&h(f),s.allErrors?m(f):(t.var(l,!0),m(f),t.if(l))}function h(f){for(let g in c)new RegExp(f).test(g)&&(0,u_.checkStrictMode)(s,`property ${g} matches pattern ${f} (use allowMatchingProperties)`)}function m(f){t.forIn("key",n,g=>{t.if((0,wc._)`${(0,a_.usePattern)(e,f)}.test(${g})`,()=>{let y=u.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:g,dataPropType:c_.Type.Str},l),s.opts.unevaluated&&p!==!0?t.assign((0,wc._)`${p}[${g}]`,!0):!y&&!s.allErrors&&t.if((0,wc.not)(l),()=>t.break())})})}}};$m.default=mj});var p_=S(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var hj=pe(),gj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,hj.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};km.default=gj});var d_=S(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var yj=mr(),Dj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:yj.validateUnion,error:{message:"must match a schema in anyOf"}};Im.default=Dj});var f_=S(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var bc=Q(),vj=pe(),Cj={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,bc._)`{passingSchemas: ${e.passing}}`},wj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Cj,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),u=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(i,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,p)=>{let d;(0,vj.alwaysValidSchema)(o,l)?t.var(u,!0):d=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&t.if((0,bc._)`${u} && ${i}`).assign(i,!1).assign(a,(0,bc._)`[${a}, ${p}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(a,p),d&&e.mergeEvaluated(d,bc.Name)})})}}};Nm.default=wj});var m_=S(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var bj=pe(),xj={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if((0,bj.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};Om.default=xj});var y_=S(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var xc=Q(),g_=pe(),Sj={message:({params:e})=>(0,xc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,xc._)`{failingKeyword: ${e.ifClause}}`},Ej={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Sj,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,g_.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=h_(n,"then"),s=h_(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(u(),e.reset(),o&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else o?t.if(a,c("then")):t.if((0,xc.not)(a),c("else"));e.pass(i,()=>e.error(!0));function u(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,p){return()=>{let d=e.subschema({keyword:l},a);t.assign(i,a),e.mergeValidEvaluated(d,i),p?t.assign(p,(0,xc._)`${l}`):e.setParams({ifClause:l})}}}};function h_(e,t){let r=e.schema[t];return r!==void 0&&!(0,g_.alwaysValidSchema)(e,r)}Mm.default=Ej});var D_=S(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var _j=pe(),Pj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,_j.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Lm.default=Pj});var v_=S(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var Tj=wm(),Aj=ZE(),Fj=bm(),Rj=YE(),$j=QE(),kj=t_(),Ij=n_(),Nj=Am(),Oj=s_(),Mj=l_(),Lj=p_(),Bj=d_(),zj=f_(),jj=m_(),Uj=y_(),Vj=D_();function Hj(e=!1){let t=[Lj.default,Bj.default,zj.default,jj.default,Uj.default,Vj.default,Ij.default,Nj.default,kj.default,Oj.default,Mj.default];return e?t.push(Aj.default,Rj.default):t.push(Tj.default,Fj.default),t.push($j.default),t}Bm.default=Hj});var C_=S(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Ke=Q(),qj={message:({schemaCode:e})=>(0,Ke.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ke._)`{format: ${e}}`},Kj={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:qj,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:u,errSchemaPath:c,schemaEnv:l,self:p}=a;if(!u.validateFormats)return;o?d():h();function d(){let m=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),f=r.const("fDef",(0,Ke._)`${m}[${i}]`),g=r.let("fType"),y=r.let("format");r.if((0,Ke._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(g,(0,Ke._)`${f}.type || "string"`).assign(y,(0,Ke._)`${f}.validate`),()=>r.assign(g,(0,Ke._)`"string"`).assign(y,f)),e.fail$data((0,Ke.or)(b(),w()));function b(){return u.strictSchema===!1?Ke.nil:(0,Ke._)`${i} && !${y}`}function w(){let T=l.$async?(0,Ke._)`(${f}.async ? await ${y}(${n}) : ${y}(${n}))`:(0,Ke._)`${y}(${n})`,E=(0,Ke._)`(typeof ${y} == "function" ? ${T} : ${y}.test(${n}))`;return(0,Ke._)`${y} && ${y} !== true && ${g} === ${t} && !${E}`}}function h(){let m=p.formats[s];if(!m){b();return}if(m===!0)return;let[f,g,y]=w(m);f===t&&e.pass(T());function b(){if(u.strictSchema===!1){p.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function w(E){let F=E instanceof RegExp?(0,Ke.regexpCode)(E):u.code.formats?(0,Ke._)`${u.code.formats}${(0,Ke.getProperty)(s)}`:void 0,$=r.scopeValue("formats",{key:s,ref:E,code:F});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,Ke._)`${$}.validate`]:["string",E,$]}function T(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ke._)`await ${y}(${n})`}return typeof g=="function"?(0,Ke._)`${y}(${n})`:(0,Ke._)`${y}.test(${n})`}}}};zm.default=Kj});var w_=S(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var Gj=C_(),Wj=[Gj.default];jm.default=Wj});var b_=S(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.contentVocabulary=hi.metadataVocabulary=void 0;hi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];hi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var S_=S(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Zj=RE(),Jj=qE(),Yj=v_(),Qj=w_(),x_=b_(),Xj=[Zj.default,Jj.default,(0,Yj.default)(),Qj.default,x_.metadataVocabulary,x_.contentVocabulary];Um.default=Xj});var __=S(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.DiscrError=void 0;var E_;(function(e){e.Tag="tag",e.Mapping="mapping"})(E_||(Sc.DiscrError=E_={}))});var T_=S(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});var gi=Q(),Vm=__(),P_=sc(),eU=Us(),tU=pe(),rU={message:({params:{discrError:e,tagName:t}})=>e===Vm.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,gi._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},nU={keyword:"discriminator",type:"object",schemaType:"object",error:rU,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),c=t.const("tag",(0,gi._)`${r}${(0,gi.getProperty)(a)}`);t.if((0,gi._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Vm.DiscrError.Tag,tag:c,tagName:a})),e.ok(u);function l(){let h=d();t.if(!1);for(let m in h)t.elseIf((0,gi._)`${c} === ${m}`),t.assign(u,p(h[m]));t.else(),e.error(!1,{discrError:Vm.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function p(h){let m=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:h},m);return e.mergeEvaluated(f,gi.Name),m}function d(){var h;let m={},f=y(o),g=!0;for(let T=0;T<i.length;T++){let E=i[T];if(E?.$ref&&!(0,tU.schemaHasRulesButRef)(E,s.self.RULES)){let $=E.$ref;if(E=P_.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,$),E instanceof P_.SchemaEnv&&(E=E.schema),E===void 0)throw new eU.default(s.opts.uriResolver,s.baseId,$)}let F=(h=E?.properties)===null||h===void 0?void 0:h[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(f||y(E)),b(F,T)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return m;function y({required:T}){return Array.isArray(T)&&T.includes(a)}function b(T,E){if(T.const)w(T.const,E);else if(T.enum)for(let F of T.enum)w(F,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(T,E){if(typeof T!="string"||T in m)throw new Error(`discriminator: "${a}" values must be unique strings`);m[T]=E}}}};Hm.default=nU});var A_=S((uoe,oU)=>{oU.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Km=S((Ne,qm)=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.MissingRefError=Ne.ValidationError=Ne.CodeGen=Ne.Name=Ne.nil=Ne.stringify=Ne.str=Ne._=Ne.KeywordCxt=Ne.Ajv=void 0;var iU=EE(),sU=S_(),aU=T_(),F_=A_(),uU=["/properties"],Ec="http://json-schema.org/draft-07/schema",yi=class extends iU.default{_addVocabularies(){super._addVocabularies(),sU.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(aU.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(F_,uU):F_;this.addMetaSchema(t,Ec,!1),this.refs["http://json-schema.org/schema"]=Ec}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ec)?Ec:void 0)}};Ne.Ajv=yi;qm.exports=Ne=yi;qm.exports.Ajv=yi;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.default=yi;var cU=js();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return cU.KeywordCxt}});var Di=Q();Object.defineProperty(Ne,"_",{enumerable:!0,get:function(){return Di._}});Object.defineProperty(Ne,"str",{enumerable:!0,get:function(){return Di.str}});Object.defineProperty(Ne,"stringify",{enumerable:!0,get:function(){return Di.stringify}});Object.defineProperty(Ne,"nil",{enumerable:!0,get:function(){return Di.nil}});Object.defineProperty(Ne,"Name",{enumerable:!0,get:function(){return Di.Name}});Object.defineProperty(Ne,"CodeGen",{enumerable:!0,get:function(){return Di.CodeGen}});var lU=oc();Object.defineProperty(Ne,"ValidationError",{enumerable:!0,get:function(){return lU.default}});var pU=Us();Object.defineProperty(Ne,"MissingRefError",{enumerable:!0,get:function(){return pU.default}})});var L_=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.formatNames=nn.fastFormats=nn.fullFormats=void 0;function rn(e,t){return{validate:e,compare:t}}nn.fullFormats={date:rn(I_,Jm),time:rn(Wm(!0),Ym),"date-time":rn(R_(!0),O_),"iso-time":rn(Wm(),N_),"iso-date-time":rn(R_(),M_),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:yU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:SU,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:DU,int32:{type:"number",validate:wU},int64:{type:"number",validate:bU},float:{type:"number",validate:k_},double:{type:"number",validate:k_},password:!0,binary:!0};nn.fastFormats={...nn.fullFormats,date:rn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Jm),time:rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ym),"date-time":rn(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,O_),"iso-time":rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,N_),"iso-date-time":rn(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,M_),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};nn.formatNames=Object.keys(nn.fullFormats);function dU(e){return e%4===0&&(e%100!==0||e%400===0)}var fU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function I_(e){let t=fU.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&dU(r)?29:mU[n])}function Jm(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Gm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Wm(e){return function(r){let n=Gm.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],u=n[5]==="-"?-1:1,c=+(n[6]||0),l=+(n[7]||0);if(c>23||l>59||e&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let p=s-l*u,d=o-c*u-(p<0?1:0);return(d===23||d===-1)&&(p===59||p===-1)&&i<61}}function Ym(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function N_(e,t){if(!(e&&t))return;let r=Gm.exec(e),n=Gm.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Zm=/t|\s/i;function R_(e){let t=Wm(e);return function(n){let o=n.split(Zm);return o.length===2&&I_(o[0])&&t(o[1])}}function O_(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function M_(e,t){if(!(e&&t))return;let[r,n]=e.split(Zm),[o,s]=t.split(Zm),i=Jm(r,o);if(i!==void 0)return i||Ym(n,s)}var hU=/\/|:/,gU=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function yU(e){return hU.test(e)&&gU.test(e)}var $_=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DU(e){return $_.lastIndex=0,$_.test(e)}var vU=-(2**31),CU=2**31-1;function wU(e){return Number.isInteger(e)&&e<=CU&&e>=vU}function bU(e){return Number.isInteger(e)}function k_(){return!0}var xU=/[^\\]\\Z/;function SU(e){if(xU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var B_=S(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.formatLimitDefinition=void 0;var EU=Km(),Fr=Q(),Un=Fr.operators,_c={formatMaximum:{okStr:"<=",ok:Un.LTE,fail:Un.GT},formatMinimum:{okStr:">=",ok:Un.GTE,fail:Un.LT},formatExclusiveMaximum:{okStr:"<",ok:Un.LT,fail:Un.GTE},formatExclusiveMinimum:{okStr:">",ok:Un.GT,fail:Un.LTE}},_U={message:({keyword:e,schemaCode:t})=>(0,Fr.str)`should be ${_c[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Fr._)`{comparison: ${_c[e].okStr}, limit: ${t}}`};vi.formatLimitDefinition={keyword:Object.keys(_c),type:"string",schemaType:"string",$data:!0,error:_U,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:s}=e,{opts:i,self:a}=s;if(!i.validateFormats)return;let u=new EU.KeywordCxt(s,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let d=t.scopeValue("formats",{ref:a.formats,code:i.code.formats}),h=t.const("fmt",(0,Fr._)`${d}[${u.schemaCode}]`);e.fail$data((0,Fr.or)((0,Fr._)`typeof ${h} != "object"`,(0,Fr._)`${h} instanceof RegExp`,(0,Fr._)`typeof ${h}.compare != "function"`,p(h)))}function l(){let d=u.schema,h=a.formats[d];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let m=t.scopeValue("formats",{key:d,ref:h,code:i.code.formats?(0,Fr._)`${i.code.formats}${(0,Fr.getProperty)(d)}`:void 0});e.fail$data(p(m))}function p(d){return(0,Fr._)`${d}.compare(${r}, ${n}) ${_c[o].fail} 0`}},dependencies:["format"]};var PU=e=>(e.addKeyword(vi.formatLimitDefinition),e);vi.default=PU});var V_=S((ra,U_)=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var Ci=L_(),TU=B_(),Qm=Q(),z_=new Qm.Name("fullFormats"),AU=new Qm.Name("fastFormats"),Xm=(e,t={keywords:!0})=>{if(Array.isArray(t))return j_(e,t,Ci.fullFormats,z_),e;let[r,n]=t.mode==="fast"?[Ci.fastFormats,AU]:[Ci.fullFormats,z_],o=t.formats||Ci.formatNames;return j_(e,o,r,n),t.keywords&&(0,TU.default)(e),e};Xm.get=(e,t="full")=>{let n=(t==="fast"?Ci.fastFormats:Ci.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function j_(e,t,r,n){var o,s;(o=(s=e.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,Qm._)`require("ajv-formats/dist/formats").${n}`);for(let i of t)e.addFormat(i,r[i])}U_.exports=ra=Xm;Object.defineProperty(ra,"__esModule",{value:!0});ra.default=Xm});var W_=S((Aoe,G_)=>{G_.exports=K_;K_.sync=IU;var H_=require("fs");function kU(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function q_(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:kU(t,r)}function K_(e,t,r){H_.stat(e,function(n,o){r(n,n?!1:q_(o,e,t))})}function IU(e,t){return q_(H_.statSync(e),e,t)}});var X_=S((Foe,Q_)=>{Q_.exports=J_;J_.sync=NU;var Z_=require("fs");function J_(e,t,r){Z_.stat(e,function(n,o){r(n,n?!1:Y_(o,t))})}function NU(e,t){return Y_(Z_.statSync(e),t)}function Y_(e,t){return e.isFile()&&OU(e,t)}function OU(e,t){var r=e.mode,n=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,p=r&c||r&u&&o===i||r&a&&n===s||r&l&&s===0;return p}});var tP=S(($oe,eP)=>{var Roe=require("fs"),Pc;process.platform==="win32"||global.TESTING_WINDOWS?Pc=W_():Pc=X_();eP.exports=eh;eh.sync=MU;function eh(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){eh(e,t||{},function(s,i){s?o(s):n(i)})})}Pc(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function MU(e,t){try{return Pc.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var uP=S((koe,aP)=>{var wi=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",rP=require("path"),LU=wi?";":":",nP=tP(),oP=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),iP=(e,t)=>{let r=t.colon||LU,n=e.match(/\//)||wi&&e.match(/\\/)?[""]:[...wi?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=wi?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=wi?o.split(r):[""];return wi&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},sP=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:s}=iP(e,t),i=[],a=c=>new Promise((l,p)=>{if(c===n.length)return t.all&&i.length?l(i):p(oP(e));let d=n[c],h=/^".*"$/.test(d)?d.slice(1,-1):d,m=rP.join(h,e),f=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;l(u(f,c,0))}),u=(c,l,p)=>new Promise((d,h)=>{if(p===o.length)return d(a(l+1));let m=o[p];nP(c+m,{pathExt:s},(f,g)=>{if(!f&&g)if(t.all)i.push(c+m);else return d(c+m);return d(u(c,l,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},BU=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=iP(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=rP.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let p=0;p<n.length;p++){let d=l+n[p];try{if(nP.sync(d,{pathExt:o}))if(t.all)s.push(d);else return d}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw oP(e)};aP.exports=sP;sP.sync=BU});var lP=S((Ioe,th)=>{"use strict";var cP=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};th.exports=cP;th.exports.default=cP});var mP=S((Noe,fP)=>{"use strict";var pP=require("path"),zU=uP(),jU=lP();function dP(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=zU.sync(e.command,{path:r[jU({env:r})],pathExt:t?pP.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return i&&(i=pP.resolve(o?e.options.cwd:"",i)),i}function UU(e){return dP(e)||dP(e,!0)}fP.exports=UU});var hP=S((Ooe,nh)=>{"use strict";var rh=/([()\][%!^"`<>&|;, *?])/g;function VU(e){return e=e.replace(rh,"^$1"),e}function HU(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(rh,"^$1"),t&&(e=e.replace(rh,"^$1")),e}nh.exports.command=VU;nh.exports.argument=HU});var yP=S((Moe,gP)=>{"use strict";gP.exports=/^#!(.*)/});var vP=S((Loe,DP)=>{"use strict";var qU=yP();DP.exports=(e="")=>{let t=e.match(qU);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var wP=S((Boe,CP)=>{"use strict";var oh=require("fs"),KU=vP();function GU(e){let r=Buffer.alloc(150),n;try{n=oh.openSync(e,"r"),oh.readSync(n,r,0,150,0),oh.closeSync(n)}catch{}return KU(r.toString())}CP.exports=GU});var EP=S((zoe,SP)=>{"use strict";var WU=require("path"),bP=mP(),xP=hP(),ZU=wP(),JU=process.platform==="win32",YU=/\.(?:com|exe)$/i,QU=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function XU(e){e.file=bP(e);let t=e.file&&ZU(e.file);return t?(e.args.unshift(e.file),e.command=t,bP(e)):e.file}function e8(e){if(!JU)return e;let t=XU(e),r=!YU.test(t);if(e.options.forceShell||r){let n=QU.test(t);e.command=WU.normalize(e.command),e.command=xP.command(e.command),e.args=e.args.map(s=>xP.argument(s,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function t8(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:e8(n)}SP.exports=t8});var TP=S((joe,PP)=>{"use strict";var ih=process.platform==="win32";function sh(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r8(e,t){if(!ih)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let s=_P(o,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function _P(e,t){return ih&&e===1&&!t.file?sh(t.original,"spawn"):null}function n8(e,t){return ih&&e===1&&!t.file?sh(t.original,"spawnSync"):null}PP.exports={hookChildProcess:r8,verifyENOENT:_P,verifyENOENTSync:n8,notFoundError:sh}});var RP=S((Uoe,bi)=>{"use strict";var AP=require("child_process"),ah=EP(),uh=TP();function FP(e,t,r){let n=ah(e,t,r),o=AP.spawn(n.command,n.args,n.options);return uh.hookChildProcess(o,n),o}function o8(e,t,r){let n=ah(e,t,r),o=AP.spawnSync(n.command,n.args,n.options);return o.error=o.error||uh.verifyENOENTSync(o.status,n),o}bi.exports=FP;bi.exports.spawn=FP;bi.exports.sync=o8;bi.exports._parse=ah;bi.exports._enoent=uh});var NP=S((bie,w8)=>{w8.exports={name:"dotenv",version:"16.3.2",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var BP=S((xie,xn)=>{var OP=require("fs"),ch=require("path"),b8=require("os"),x8=require("crypto"),S8=NP(),lh=S8.version,E8=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function _8(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
33
+ `);let n;for(;(n=E8.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
34
+ `),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}function P8(e){let t=LP(e),r=it.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let n=MP(e).split(","),o=n.length,s;for(let i=0;i<o;i++)try{let a=n[i].trim(),u=F8(r,a);s=it.decrypt(u.ciphertext,u.key);break}catch(a){if(i+1>=o)throw a}return it.parse(s)}function T8(e){console.log(`[dotenv@${lh}][INFO] ${e}`)}function A8(e){console.log(`[dotenv@${lh}][WARN] ${e}`)}function Tc(e){console.log(`[dotenv@${lh}][DEBUG] ${e}`)}function MP(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function F8(e,t){let r;try{r=new URL(t)}catch(a){throw a.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):a}let n=r.password;if(!n)throw new Error("INVALID_DOTENV_KEY: Missing key part");let o=r.searchParams.get("environment");if(!o)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);return{ciphertext:i,key:n}}function LP(e){let t=ch.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function R8(e){return e[0]==="~"?ch.join(b8.homedir(),e.slice(1)):e}function $8(e){T8("Loading env from encrypted .env.vault");let t=it._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),it.populate(r,t,e),{parsed:t}}function k8(e){let t=ch.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&(e.path!=null&&(t=R8(e.path)),e.encoding!=null?r=e.encoding:n&&Tc("No encoding is specified. UTF-8 is used by default"));try{let o=it.parse(OP.readFileSync(t,{encoding:r})),s=process.env;return e&&e.processEnv!=null&&(s=e.processEnv),it.populate(s,o,e),{parsed:o}}catch(o){return n&&Tc(`Failed to load ${t} ${o.message}`),{error:o}}}function I8(e){let t=LP(e);return MP(e).length===0?it.configDotenv(e):OP.existsSync(t)?it._configVault(e):(A8(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),it.configDotenv(e))}function N8(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),o=n.subarray(0,12),s=n.subarray(-16);n=n.subarray(12,-16);try{let i=x8.createDecipheriv("aes-256-gcm",r,o);return i.setAuthTag(s),`${i.update(n)}${i.final()}`}catch(i){let a=i instanceof RangeError,u=i.message==="Invalid key length",c=i.message==="Unsupported state or unable to authenticate data";if(a||u){let l="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(l)}else if(c){let l="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(l)}else throw console.error("Error: ",i.code),console.error("Error: ",i.message),i}}function O8(e,t,r={}){let n=!!(r&&r.debug),o=!!(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let s of Object.keys(t))Object.prototype.hasOwnProperty.call(e,s)?(o===!0&&(e[s]=t[s]),n&&Tc(o===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):e[s]=t[s]}var it={configDotenv:k8,_configVault:$8,_parseVault:P8,config:I8,decrypt:N8,parse:_8,populate:O8};xn.exports.configDotenv=it.configDotenv;xn.exports._configVault=it._configVault;xn.exports._parseVault=it._parseVault;xn.exports.config=it.config;xn.exports.decrypt=it.decrypt;xn.exports.parse=it.parse;xn.exports.populate=it.populate;xn.exports=it});var y4={};wa(y4,{createDevToolsServer:()=>Zl,version:()=>bh});module.exports=uT(y4);var cT="1.21.5",Xt=process.env.OVERRIDE_VERSION??cT;var Fc=require("node:http");var $c="preview-url";var bo="framework",ba="platform",xa="node",Sh="/~builder-connect",qn="/~builder-connected",kc="/~builder-dev-tools",Ic="/~builder-dev-tools.js",Kn="/~builder-dev-tools-close",Eh="/mappings";function se(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Sa(e,t=""){let r=se(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function et(e,t,r){if(t){let n=e.ts.createPrinter({newLine:e.ts.NewLineKind.LineFeed,removeComments:r});return e.ts.isSourceFile(t)?n.printFile(t).trim()+`
35
35
  `:n.printNode(e.ts.EmitHint.Unspecified,t,e.ts.createSourceFile("module.tsx","",e.ts.ScriptTarget.Latest)).trim()+`
36
- `}return""}var Ah=H(Ph(),1);function er(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function ae(e,t,r){t=Dr(t),r=Dr(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let o;return n==="index"?o=e.relative(t,r):o=e.relative(t,e.join(r,n)),o=Dr(e.normalize(o)),o.startsWith(".")||(o="./"+o),o}function Dr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function Gn(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),o=n[n.length-1];return Th(o==="index"?e.basename(e.dirname(t)):o)}function Th(e){return Se(e).replace(/ /g,"")}function tr(e,t){let r=e.extname(t),n=Dr(e.basename(t,r)).split("/").pop();return Se(n==="index"?e.basename(e.dirname(t)):n)}function Ee(e,t){let r=Dr(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(o=>o!=="."&&o!==".."&&o!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(o=>o.name.includes("next"))?"@/"+r:"~/"+r}function ge(e,t){let r=t,n=[];for(let o=0;o<2;o++){let s=e.basename(r);if(!s||s==="components")break;n.unshift(s),r=e.dirname(r)}return n.join("/")}function Se(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function Ft(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function we(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}async function Fh(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function Ri(e){return typeof e=="number"}function xo(e){return typeof e=="boolean"}function xt(e){return typeof e=="string"}function So(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function Ht(e){return JSON.parse(JSON.stringify(e))}function Ea(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function Rh(){try{let e=(0,Ah.default)();if(e?.name)return e.name}catch{}return"npm"}function pT(){return process.platform.startsWith("win")}function Oe(){return process.pkg?"@builder.io/agent":pT()?'"@builder.io/dev-tools"':"builder.io"}function St(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var dT=["node_modules","dist","build","public"];async function Rt(e,t){async function r(o,s){if(s>10)return;let i=await e.readdir(o);for(let a of i){if(dT.includes(a))continue;let u=e.join(o,a),c=await e.stat(u);if(c){if(c.isFile()&&a.startsWith("builder-registry."))return u;if(c.isDirectory()){let l=await r(u,s+1);if(l)return l}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await St(e)?"ts":"js"}`;return e.join(t,s)}return n}async function xn(e,t){let r=e.resolve("/");for(let n=0;n<20;n++){let o=e.join(t,"package.json"),s=await e.readFile(o);if(s)return JSON.parse(s);if(t===r)break;t=e.dirname(t)}return null}async function $h(e,t){for(let r=0;r<20;r++){let n=e.dirname(t),o=e.join(n,"node_modules");if(await e.exists(o))return o;if(t===e.getAppRootDir())break;t=e.dirname(t)}return e.join(e.getAppRootDir(),"node_modules")}async function $i(e,t,r){let n=await e.readdir(t);return n.includes(r)?e.join(t,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let i=e.join(t,s);if((await e.stat(i)).isDirectory()){let u=await $i(e,i,r);if(u)return u}}))).find(s=>typeof s=="string")}async function Ye(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await $h(e,t[0]),o=e.join(n,"typescript","lib"),s=new Map,i={fileExists:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=ki.get(a);if(!u){try{e.statSync(a).isFile()?u={exists:!0,content:e.readFileSync(a)}:u={exists:!1}}catch{u={exists:!1}}ki.set(a,u)}return u.exists}if(!s.has(a))if(e.existsSync(a)){let c=e.statSync(a);s.set(a,c.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>e.normalize(a),getCurrentDirectory:()=>e.cwd(),getDefaultLibFileName:()=>e.join(o,"lib.d.ts"),getDefaultLibLocation:()=>o,getNewLine:()=>`
37
- `,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=ki.get(a);if(c)return se(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(o)&&l===".ts"&&(u=Ih.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Pa(c)}return a.includes("node_modules")&&(u?ki.set(a,{exists:!0,content:u}):ki.set(a,{exists:!1})),se(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return fT(e,i,t,r)}catch(a){if(a instanceof Pa){await mT(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function fT(e,t,r,n){let o={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),i=>e.existsSync(i));if(s){let i=kh.get(s);if(!i){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(i=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,kh.set(s,i))}i&&(o.options=Ht(i))}return o.options.noEmit=!0,o.options.isolatedModules=!1,o.options.strict=!1,o.options.jsx=e.ts.JsxEmit.Preserve,o.options.allowJs=!0,Object.assign(o.options,n),e.ts.createProgram(o)}async function Eo(e,t,r){r||(r=await Ye(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}var Pa=class{constructor(t){Je(this,"libName");this.libName=t}};async function mT(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;_a.has(t)||_a.set(t,fetch(r).then(n=>n.text()).then(n=>{Ih.set(t,n)})),await _a.get(t),_a.delete(t)}var Ih=new Map,_a=new Map,ki=new Map,kh=new Map;async function Nh(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:Nc(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function Nc(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(o=>{r.diagnostics.push({messageText:String(o.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var kr=require("node:fs/promises");var Mc=require("node:os"),Lc=H(require("node:path"),1),yT=H(require("typescript"),1),DT=H(require("launch-editor"),1);async function _o(e){let t=[],r=await xn(e,e.getRepoRootDir());if(r){let n=await Mh(r,e);t.push(...n)}return t}async function Mh(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let o of hT)if(n.has(o)&&!r.some(s=>s.name===o)){let s={name:o};Oh.has(o)&&(s.version=await Oh.get(o)(t)),r.push(s)}}return r}function Oc(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var Oh=new Map([["next",async e=>{if(!e.spawnSync)return;let t=Rh(),r=t==="npm"?"npx":t,{stdout:n}=e.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let o=n.match(/(Next.js v)([\d.]+)/g);if(!o)return;let s=o[0].split("Next.js v")[1],[i,a,u]=s.split(".");return{major:Oc(i),minor:Oc(a),patch:Oc(u)}}]]),hT=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"];var vT=H(require("@sentry/node"),1);function Lh(){let e=(0,Mc.homedir)();return Lc.default.join(e,".config","builder","dev-tools.json")}function Bc(e,t){return typeof e=="object"&&e!=null&&t in e}async function Po(){let e=Lh();try{let t=await(0,kr.readFile)(e,"utf-8");if(typeof t=="string")return JSON.parse(t)}catch(t){if(t.code==="ENOENT")return null}return null}async function zc(e){let t=Lh();e=typeof e=="object"&&e!=null?e:{},await(0,kr.mkdir)(Lc.default.dirname(t),{recursive:!0}),await(0,kr.writeFile)(t,JSON.stringify(e??{},null,2))}var q={gen1:"Gen 1",gen2:"Gen 2"},Ii={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"};var Bh=require("node:console"),zh=require("node:http"),jh=require("node:https");function To(e){let t=Date.now();return new Promise((r,n)=>{let s=CT(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},i=>{let a="";i.on("data",u=>{a+=u}),i.on("end",()=>{if((0,Bh.debug)(`${e.method} ${e.url.href}, duration: ${Date.now()-t}ms`),typeof i.statusCode=="number"&&i.statusCode>=200&&i.statusCode<300)if(typeof i.headers["content-type"]!="string"||!i.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${i.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(u){n(`Response from ${e.url.href} is not valid JSON: ${a}
36
+ `}return""}var Ah=H(Ph(),1);function er(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function ae(e,t,r){t=Dr(t),r=Dr(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let o;return n==="index"?o=e.relative(t,r):o=e.relative(t,e.join(r,n)),o=Dr(e.normalize(o)),o.startsWith(".")||(o="./"+o),o}function Dr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function Gn(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),o=n[n.length-1];return Th(o==="index"?e.basename(e.dirname(t)):o)}function Th(e){return Se(e).replace(/ /g,"")}function tr(e,t){let r=e.extname(t),n=Dr(e.basename(t,r)).split("/").pop();return Se(n==="index"?e.basename(e.dirname(t)):n)}function Ee(e,t){let r=Dr(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(o=>o!=="."&&o!==".."&&o!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(o=>o.name.includes("next"))?"@/"+r:"~/"+r}function ge(e,t){let r=t,n=[];for(let o=0;o<2;o++){let s=e.basename(r);if(!s||s==="components")break;n.unshift(s),r=e.dirname(r)}return n.join("/")}function Se(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function Ft(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function we(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}async function Fh(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function Ri(e){return typeof e=="number"}function xo(e){return typeof e=="boolean"}function xt(e){return typeof e=="string"}function So(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function Ht(e){return JSON.parse(JSON.stringify(e))}function Ea(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function Rh(){try{let e=(0,Ah.default)();if(e?.name)return e.name}catch{}return"npm"}function pT(){return process.platform.startsWith("win")}function Oe(){return process.pkg?"@builder.io/agent":pT()?'"@builder.io/dev-tools"':"builder.io"}function St(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var dT=["node_modules","dist","build","public"];async function Rt(e,t){async function r(o,s){if(s>10)return;let i=await e.readdir(o);for(let a of i){if(dT.includes(a))continue;let u=e.join(o,a),c=await e.stat(u);if(c){if(c.isFile()&&a.startsWith("builder-registry."))return u;if(c.isDirectory()){let l=await r(u,s+1);if(l)return l}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await St(e)?"ts":"js"}`;return e.join(t,s)}return n}async function Sn(e,t){let r=e.resolve("/");for(let n=0;n<20;n++){let o=e.join(t,"package.json"),s=await e.readFile(o);if(s)return JSON.parse(s);if(t===r)break;t=e.dirname(t)}return null}async function $h(e,t){for(let r=0;r<20;r++){let n=e.dirname(t),o=e.join(n,"node_modules");if(await e.exists(o))return o;if(t===e.getAppRootDir())break;t=e.dirname(t)}return e.join(e.getAppRootDir(),"node_modules")}async function $i(e,t,r){let n=await e.readdir(t);return n.includes(r)?e.join(t,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let i=e.join(t,s);if((await e.stat(i)).isDirectory()){let u=await $i(e,i,r);if(u)return u}}))).find(s=>typeof s=="string")}async function Ye(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await $h(e,t[0]),o=e.join(n,"typescript","lib"),s=new Map,i={fileExists:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=ki.get(a);if(!u){try{e.statSync(a).isFile()?u={exists:!0,content:e.readFileSync(a)}:u={exists:!1}}catch{u={exists:!1}}ki.set(a,u)}return u.exists}if(!s.has(a))if(e.existsSync(a)){let c=e.statSync(a);s.set(a,c.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>e.normalize(a),getCurrentDirectory:()=>e.cwd(),getDefaultLibFileName:()=>e.join(o,"lib.d.ts"),getDefaultLibLocation:()=>o,getNewLine:()=>`
37
+ `,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=ki.get(a);if(c)return se(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(o)&&l===".ts"&&(u=Ih.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Pa(c)}return a.includes("node_modules")&&(u?ki.set(a,{exists:!0,content:u}):ki.set(a,{exists:!1})),se(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return fT(e,i,t,r)}catch(a){if(a instanceof Pa){await mT(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function fT(e,t,r,n){let o={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),i=>e.existsSync(i));if(s){let i=kh.get(s);if(!i){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(i=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,kh.set(s,i))}i&&(o.options=Ht(i))}return o.options.noEmit=!0,o.options.isolatedModules=!1,o.options.strict=!1,o.options.jsx=e.ts.JsxEmit.Preserve,o.options.allowJs=!0,Object.assign(o.options,n),e.ts.createProgram(o)}async function Eo(e,t,r){r||(r=await Ye(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}var Pa=class{constructor(t){Ge(this,"libName");this.libName=t}};async function mT(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;_a.has(t)||_a.set(t,fetch(r).then(n=>n.text()).then(n=>{Ih.set(t,n)})),await _a.get(t),_a.delete(t)}var Ih=new Map,_a=new Map,ki=new Map,kh=new Map;async function Nh(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:Nc(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function Nc(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(o=>{r.diagnostics.push({messageText:String(o.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var kr=require("node:fs/promises");var Mc=require("node:os"),Lc=H(require("node:path"),1),yT=H(require("typescript"),1),DT=H(require("launch-editor"),1);async function _o(e){let t=[],r=await Sn(e,e.getRepoRootDir());if(r){let n=await Mh(r,e);t.push(...n)}return t}async function Mh(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let o of hT)if(n.has(o)&&!r.some(s=>s.name===o)){let s={name:o};Oh.has(o)&&(s.version=await Oh.get(o)(t)),r.push(s)}}return r}function Oc(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var Oh=new Map([["next",async e=>{if(!e.spawnSync)return;let t=Rh(),r=t==="npm"?"npx":t,{stdout:n}=e.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let o=n.match(/(Next.js v)([\d.]+)/g);if(!o)return;let s=o[0].split("Next.js v")[1],[i,a,u]=s.split(".");return{major:Oc(i),minor:Oc(a),patch:Oc(u)}}]]),hT=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"];var vT=H(require("@sentry/node"),1);function Lh(){let e=(0,Mc.homedir)();return Lc.default.join(e,".config","builder","dev-tools.json")}function Bc(e,t){return typeof e=="object"&&e!=null&&t in e}async function Po(){let e=Lh();try{let t=await(0,kr.readFile)(e,"utf-8");if(typeof t=="string")return JSON.parse(t)}catch(t){if(t.code==="ENOENT")return null}return null}async function zc(e){let t=Lh();e=typeof e=="object"&&e!=null?e:{},await(0,kr.mkdir)(Lc.default.dirname(t),{recursive:!0}),await(0,kr.writeFile)(t,JSON.stringify(e??{},null,2))}var q={gen1:"Gen 1",gen2:"Gen 2"},Ii={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"};var Bh=require("node:console"),zh=require("node:http"),jh=require("node:https");function To(e){let t=Date.now();return new Promise((r,n)=>{let s=CT(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},i=>{let a="";i.on("data",u=>{a+=u}),i.on("end",()=>{if((0,Bh.debug)(`${e.method} ${e.url.href}, duration: ${Date.now()-t}ms`),typeof i.statusCode=="number"&&i.statusCode>=200&&i.statusCode<300)if(typeof i.headers["content-type"]!="string"||!i.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${i.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(u){n(`Response from ${e.url.href} is not valid JSON: ${a}
38
38
  ${u}`)}else n(`Request to ${e.url.href} failed with status ${i.statusCode}: ${a}`)})}).on("error",i=>{n(`Error fetching ${e.url.href}, ${i}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function CT(e){if(e.protocol==="https:")return jh.request;if(e.protocol==="http:")return zh.request;throw new Error(`Unsupported protocol ${e.protocol}`)}async function Uh(e){let t=new URL(`https://cdn.builder.io/api/v3/query/${e.publicApiKey}/${e.model}`);return t.searchParams.set("omit","meta.componentsUsed"),t.searchParams.set("apiKey",e.publicApiKey),t.searchParams.set("userAttributes.urlPath",e.pageUrl),t.searchParams.set("options.page.model",`"${e.model}"`),t.searchParams.set("cachebust","true"),(await To({url:t,method:"GET"}))[e.model]}async function Vh(e,t){if(t.kind===Ii.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
39
39
  models {
40
40
  id
@@ -53,7 +53,7 @@ Restarting server after Builder Devtools update...
53
53
  <h3>How's Devtools working for you?</h3>
54
54
  <p>We'd love your feedback!</p>
55
55
  </div>
56
- \`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.21.3"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
56
+ \`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.21.5"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
57
57
  </style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
58
58
  <aside>
59
59
  <div class="logo"></div>
@@ -92,7 +92,7 @@ Restarting server after Builder Devtools update...
92
92
  </nav>
93
93
  </section>
94
94
  </main>
95
- \`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.21.3"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.21.3"),mo());})();`)}async function Xh(e){return eg(e,`<!doctype html>
95
+ \`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.21.5"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.21.5"),mo());})();`)}async function Xh(e){return eg(e,`<!doctype html>
96
96
  <html lang="en" dir="ltr">
97
97
  <head>
98
98
  <meta charset="utf-8" />
@@ -266,25 +266,25 @@ Restarting server after Builder Devtools update...
266
266
  `).map(n=>HT(n,t,r)).join(`
267
267
  `)}var qT=["up","down","left","right","space","enter","cancel"],$a={actions:new Set(qT),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function Cg(e,t){if(typeof e=="string")return $a.aliases.get(e)===t;for(let r of e)if(r!==void 0&&Cg(r,t))return!0;return!1}function KT(e,t){if(e===t)return;let r=e.split(`
268
268
  `),n=t.split(`
269
- `),o=[];for(let s=0;s<Math.max(r.length,n.length);s++)r[s]!==n[s]&&o.push(s);return o}var u9=globalThis.process.platform.startsWith("win"),dg=Symbol("clack:cancel");function Ra(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var GT=Object.defineProperty,WT=(e,t,r)=>t in e?GT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qt=(e,t,r)=>(WT(e,typeof t!="symbol"?t+"":t,r),r),Gc=class{constructor(t,r=!0){qt(this,"input"),qt(this,"output"),qt(this,"_abortSignal"),qt(this,"rl"),qt(this,"opts"),qt(this,"_render"),qt(this,"_track",!1),qt(this,"_prevFrame",""),qt(this,"_subscribers",new Map),qt(this,"_cursor",0),qt(this,"state","initial"),qt(this,"error",""),qt(this,"value");let{input:n=Ia.stdin,output:o=Ia.stdout,render:s,signal:i,...a}=t;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=i,this.input=n,this.output=o}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let n=this._subscribers.get(t)??[];n.push(r),this._subscribers.set(t,n)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let n=this._subscribers.get(t)??[],o=[];for(let s of n)s.cb(...r),s.once&&o.push(()=>n.splice(n.indexOf(s),1));for(let s of o)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(dg);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new mg.Writable;n._write=(o,s,i)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),i()},this.input.pipe(n),this.rl=Kc.default.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),Kc.default.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),Ra(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(rr.cursor.show),this.output.off("resize",this.render),Ra(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(rr.cursor.show),this.output.off("resize",this.render),Ra(this.input,!1),t(dg)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&$a.aliases.has(r.name)&&this.emit("cursor",$a.aliases.get(r.name)),$a.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Cg([t,r?.name,r?.sequence],"cancel")&&(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(`
269
+ `),o=[];for(let s=0;s<Math.max(r.length,n.length);s++)r[s]!==n[s]&&o.push(s);return o}var c9=globalThis.process.platform.startsWith("win"),dg=Symbol("clack:cancel");function Ra(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var GT=Object.defineProperty,WT=(e,t,r)=>t in e?GT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qt=(e,t,r)=>(WT(e,typeof t!="symbol"?t+"":t,r),r),Gc=class{constructor(t,r=!0){qt(this,"input"),qt(this,"output"),qt(this,"_abortSignal"),qt(this,"rl"),qt(this,"opts"),qt(this,"_render"),qt(this,"_track",!1),qt(this,"_prevFrame",""),qt(this,"_subscribers",new Map),qt(this,"_cursor",0),qt(this,"state","initial"),qt(this,"error",""),qt(this,"value");let{input:n=Ia.stdin,output:o=Ia.stdout,render:s,signal:i,...a}=t;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=i,this.input=n,this.output=o}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let n=this._subscribers.get(t)??[];n.push(r),this._subscribers.set(t,n)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let n=this._subscribers.get(t)??[],o=[];for(let s of n)s.cb(...r),s.once&&o.push(()=>n.splice(n.indexOf(s),1));for(let s of o)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(dg);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new mg.Writable;n._write=(o,s,i)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),i()},this.input.pipe(n),this.rl=Kc.default.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),Kc.default.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),Ra(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(rr.cursor.show),this.output.off("resize",this.render),Ra(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(rr.cursor.show),this.output.off("resize",this.render),Ra(this.input,!1),t(dg)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&$a.aliases.has(r.name)&&this.emit("cursor",$a.aliases.get(r.name)),$a.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Cg([t,r?.name,r?.sequence],"cancel")&&(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(`
270
270
  `),Ra(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=pg(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
271
271
  `).length-1;this.output.write(rr.cursor.move(-999,t*-1))}render(){let t=pg(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(rr.cursor.hide);else{let r=KT(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let n=r[0];this.output.write(rr.cursor.move(0,n)),this.output.write(rr.erase.lines(1));let o=t.split(`
272
272
  `);this.output.write(o[n]),this._prevFrame=t,this.output.write(rr.cursor.move(0,o.length-n-1));return}if(r&&r?.length>1){let n=r[0];this.output.write(rr.cursor.move(0,n)),this.output.write(rr.erase.down());let o=t.split(`
273
273
  `).slice(n);this.output.write(o.join(`
274
- `)),this._prevFrame=t;return}this.output.write(rr.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};var ZT;ZT=new WeakMap;var JT=Object.defineProperty,YT=(e,t,r)=>t in e?JT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fg=(e,t,r)=>(YT(e,typeof t!="symbol"?t+"":t,r),r),ka=class extends Gc{constructor(t){super(t,!1),fg(this,"options"),fg(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){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}};var nr=H(require("node:process"),1),fe=H(Wn(),1),wg=H(Ta(),1);function QT(){return nr.default.platform!=="win32"?nr.default.env.TERM!=="linux":!!nr.default.env.CI||!!nr.default.env.WT_SESSION||!!nr.default.env.TERMINUS_SUBLIME||nr.default.env.ConEmuTask==="{cmd::Cmder}"||nr.default.env.TERM_PROGRAM==="Terminus-Sublime"||nr.default.env.TERM_PROGRAM==="vscode"||nr.default.env.TERM==="xterm-256color"||nr.default.env.TERM==="alacritty"||nr.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var XT=QT(),He=(e,t)=>XT?e:t,eA=He("\u25C6","*"),tA=He("\u25A0","x"),rA=He("\u25B2","x"),bg=He("\u25C7","o"),nA=He("\u250C","T"),vr=He("\u2502","|"),xg=He("\u2514","\u2014"),oA=He("\u25CF",">"),iA=He("\u25CB"," "),v9=He("\u25FB","[\u2022]"),C9=He("\u25FC","[+]"),w9=He("\u25FB","[ ]"),b9=He("\u25AA","\u2022"),x9=He("\u2500","-"),S9=He("\u256E","+"),E9=He("\u251C","+"),_9=He("\u256F","+"),sA=He("\u25CF","\u2022"),aA=He("\u25C6","*"),uA=He("\u25B2","!"),cA=He("\u25A0","x"),lA=e=>{switch(e){case"initial":case"active":return fe.default.cyan(eA);case"cancel":return fe.default.red(tA);case"error":return fe.default.yellow(rA);case"submit":return fe.default.green(bg)}},pA=e=>{let{cursor:t,options:r,style:n}=e,o=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),i=Math.min(s,Math.max(o,5)),a=0;t>=a+i-3?a=Math.max(Math.min(t-i+3,r.length-i),0):t<a+2&&(a=Math.max(t-2,0));let u=i<r.length&&a>0,c=i<r.length&&a+i<r.length;return r.slice(a,a+i).map((l,p,d)=>{let h=p===0&&u,m=p===d.length-1&&c;return h||m?fe.default.dim("..."):n(l,p+a===t)})};var Oi=e=>{let t=(r,n)=>{let o=r.label??String(r.value);switch(n){case"selected":return`${fe.default.dim(o)}`;case"active":return`${fe.default.green(oA)} ${o} ${r.hint?fe.default.dim(`(${r.hint})`):""}`;case"cancelled":return`${fe.default.strikethrough(fe.default.dim(o))}`;default:return`${fe.default.dim(iA)} ${fe.default.dim(o)}`}};return new ka({options:e.options,initialValue:e.initialValue,render(){let r=`${fe.default.gray(vr)}
274
+ `)),this._prevFrame=t;return}this.output.write(rr.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};var ZT;ZT=new WeakMap;var JT=Object.defineProperty,YT=(e,t,r)=>t in e?JT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fg=(e,t,r)=>(YT(e,typeof t!="symbol"?t+"":t,r),r),ka=class extends Gc{constructor(t){super(t,!1),fg(this,"options"),fg(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){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}};var nr=H(require("node:process"),1),fe=H(Wn(),1),wg=H(Ta(),1);function QT(){return nr.default.platform!=="win32"?nr.default.env.TERM!=="linux":!!nr.default.env.CI||!!nr.default.env.WT_SESSION||!!nr.default.env.TERMINUS_SUBLIME||nr.default.env.ConEmuTask==="{cmd::Cmder}"||nr.default.env.TERM_PROGRAM==="Terminus-Sublime"||nr.default.env.TERM_PROGRAM==="vscode"||nr.default.env.TERM==="xterm-256color"||nr.default.env.TERM==="alacritty"||nr.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var XT=QT(),He=(e,t)=>XT?e:t,eA=He("\u25C6","*"),tA=He("\u25A0","x"),rA=He("\u25B2","x"),bg=He("\u25C7","o"),nA=He("\u250C","T"),vr=He("\u2502","|"),xg=He("\u2514","\u2014"),oA=He("\u25CF",">"),iA=He("\u25CB"," "),C9=He("\u25FB","[\u2022]"),w9=He("\u25FC","[+]"),b9=He("\u25FB","[ ]"),x9=He("\u25AA","\u2022"),S9=He("\u2500","-"),E9=He("\u256E","+"),_9=He("\u251C","+"),P9=He("\u256F","+"),sA=He("\u25CF","\u2022"),aA=He("\u25C6","*"),uA=He("\u25B2","!"),cA=He("\u25A0","x"),lA=e=>{switch(e){case"initial":case"active":return fe.default.cyan(eA);case"cancel":return fe.default.red(tA);case"error":return fe.default.yellow(rA);case"submit":return fe.default.green(bg)}},pA=e=>{let{cursor:t,options:r,style:n}=e,o=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),i=Math.min(s,Math.max(o,5)),a=0;t>=a+i-3?a=Math.max(Math.min(t-i+3,r.length-i),0):t<a+2&&(a=Math.max(t-2,0));let u=i<r.length&&a>0,c=i<r.length&&a+i<r.length;return r.slice(a,a+i).map((l,p,d)=>{let h=p===0&&u,m=p===d.length-1&&c;return h||m?fe.default.dim("..."):n(l,p+a===t)})};var Oi=e=>{let t=(r,n)=>{let o=r.label??String(r.value);switch(n){case"selected":return`${fe.default.dim(o)}`;case"active":return`${fe.default.green(oA)} ${o} ${r.hint?fe.default.dim(`(${r.hint})`):""}`;case"cancelled":return`${fe.default.strikethrough(fe.default.dim(o))}`;default:return`${fe.default.dim(iA)} ${fe.default.dim(o)}`}};return new ka({options:e.options,initialValue:e.initialValue,render(){let r=`${fe.default.gray(vr)}
275
275
  ${lA(this.state)} ${e.message}
276
276
  `;switch(this.state){case"submit":return`${r}${fe.default.gray(vr)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${fe.default.gray(vr)} ${t(this.options[this.cursor],"cancelled")}
277
277
  ${fe.default.gray(vr)}`;default:return`${r}${fe.default.cyan(vr)} ${pA({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(n,o)=>t(n,o?"active":"inactive")}).join(`
278
278
  ${fe.default.cyan(vr)} `)}
279
279
  ${fe.default.cyan(xg)}
280
- `}}}).prompt()};var Sn=(e="")=>{process.stdout.write(`${fe.default.gray(nA)} ${e}
280
+ `}}}).prompt()};var En=(e="")=>{process.stdout.write(`${fe.default.gray(nA)} ${e}
281
281
  `)},Oa=(e="")=>{process.stdout.write(`${fe.default.gray(vr)}
282
282
  ${fe.default.gray(xg)} ${e}
283
283
 
284
284
  `)},re={message:(e="",{symbol:t=fe.default.gray(vr)}={})=>{let r=[`${fe.default.gray(vr)}`];if(e){let[n,...o]=e.split(`
285
285
  `);r.push(`${t} ${n}`,...o.map(s=>`${fe.default.gray(vr)} ${s}`))}process.stdout.write(`${r.join(`
286
286
  `)}
287
- `)},info:e=>{re.message(e,{symbol:fe.default.blue(sA)})},success:e=>{re.message(e,{symbol:fe.default.green(aA)})},step:e=>{re.message(e,{symbol:fe.default.green(bg)})},warn:e=>{re.message(e,{symbol:fe.default.yellow(uA)})},warning:e=>{re.warn(e)},error:e=>{re.message(e,{symbol:fe.default.red(cA)})}},P9=`${fe.default.gray(vr)} `;var Vn=H(Wn(),1);var Z=H(require("typescript"),1);async function or(e){let t=Sg(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function ir(e,t){t=typeof t=="object"&&t!=null?t:{};let r=Sg(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function Sg(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}async function Ir(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let s=e.join(e.getAppRootDir(),o),i=await dA(e,s);if(i){let a=i[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=e.join(e.getAppRootDir(),t[t.length-1]),n}async function dA(e,t){let r=await e.readFile(t);return typeof r=="string"?Eg(r):null}function Eg(e){let t={},r=e.replace(/\r\n?/gm,`
287
+ `)},info:e=>{re.message(e,{symbol:fe.default.blue(sA)})},success:e=>{re.message(e,{symbol:fe.default.green(aA)})},step:e=>{re.message(e,{symbol:fe.default.green(bg)})},warn:e=>{re.message(e,{symbol:fe.default.yellow(uA)})},warning:e=>{re.warn(e)},error:e=>{re.message(e,{symbol:fe.default.red(cA)})}},T9=`${fe.default.gray(vr)} `;var Vn=H(Wn(),1);var Z=H(require("typescript"),1);async function or(e){let t=Sg(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function ir(e,t){t=typeof t=="object"&&t!=null?t:{};let r=Sg(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function Sg(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}async function Ir(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let s=e.join(e.getAppRootDir(),o),i=await dA(e,s);if(i){let a=i[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=e.join(e.getAppRootDir(),t[t.length-1]),n}async function dA(e,t){let r=await e.readFile(t);return typeof r=="string"?Eg(r):null}function Eg(e){let t={},r=e.replace(/\r\n?/gm,`
288
288
  `),n;for(;(n=fA.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
289
289
  `),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}var fA=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;async function Nr(e,t,r,n){let o="# https://www.builder.io/c/docs/using-your-api-key",s=await e.readFile(t);try{if(s)if(s.includes(r))if(s.includes(n))e.debug(`"${r}" with "${n}" already set in ${t}`);else return e.debug(`Replace "${r}" in ${t}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await e.writeFile(t,s),"update";else return e.debug(`Append "${r}" to ${t}`),s+=`
290
290
 
@@ -302,7 +302,7 @@ ${r}=${n}
302
302
  `}r+=` {
303
303
  name: "${t.name}",
304
304
  }
305
- `,r+=");";let n=Sa(e,r);return el(e,n,t)}function el(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;r.acceptsChildren?e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"||(o[0]=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[o[0]])):e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"&&(o[0]=o[0].arguments[0]);let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Qe(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}function ce(e,t,r,n="esm"){return Array.isArray(r.namedImports)&&r.namedImports.forEach(o=>{t=zA(e,t,o,r.importPath,!!r.isTypeOnly,n)}),typeof r.defaultImport=="string"&&(t=jA(e,t,r.defaultImport,r.importPath,n)),t}function zA(e,t,r,n,o,s){return s==="cjs"?Ig(e,t,null,r,n):kg(e,t,null,r,n,o)}function jA(e,t,r,n,o){return o==="cjs"?Ig(e,t,r,null,n):kg(e,t,r,null,n,!1)}function kg(e,t,r,n,o,s){let i=[...t.statements],a=0,u=!1,c=!1;for(let h=0;h<i.length;h++){let m=i[h];if(!e.ts.isImportDeclaration(m)||(a=h,!m.moduleSpecifier||!e.ts.isStringLiteral(m.moduleSpecifier))||m.moduleSpecifier.text!==o||!!m.importClause?.isTypeOnly!==s)continue;let f=[],g=m.importClause?.namedBindings;if(g&&e.ts.isNamedImports(g)&&g.elements&&f.push(...g.elements),typeof n=="string"){if(f.some(b=>b.name.text===n))return t;f.push(e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))),f.sort((b,w)=>b.name.text.localeCompare(w.name.text)),u=!0}let y=m.importClause?m.importClause.name:void 0;if(typeof r=="string"){if(y&&y.text===r)return t;y=e.ts.factory.createIdentifier(r),c=!0}if(u||c)return i[h]=e.ts.factory.updateImportDeclaration(m,void 0,e.ts.factory.createImportClause(s,y,e.ts.factory.createNamedImports(f)),m.moduleSpecifier,void 0),e.ts.factory.updateSourceFile(t,i)}let l,p;typeof r=="string"&&(l=e.ts.factory.createIdentifier(r)),typeof n=="string"&&(p=e.ts.factory.createNamedImports([e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))]));let d=e.ts.factory.createImportDeclaration(void 0,e.ts.factory.createImportClause(s,l,p),e.ts.factory.createStringLiteral(o));return i.splice(a,0,d),e.ts.factory.updateSourceFile(t,i)}function Ig(e,t,r,n,o){let s=[...t.statements],i=0;for(let a=0;a<s.length;a++){let u=s[a];if(e.ts.isVariableStatement(u))for(let c=0;c<u.declarationList.declarations.length;c++){let l=[...u.declarationList.declarations],p=l[c],d=p.initializer;if(!d||!e.ts.isCallExpression(d))continue;let h=d.expression;if(!e.ts.isIdentifier(h)||h.text!=="require"||d.arguments.length!==1)continue;let m=d.arguments[0];if(e.ts.isStringLiteral(m)&&(i=a,m.text===o)){if(e.ts.isIdentifier(p.name)&&typeof r=="string")return p.name.text===r?t:(l[c]=e.ts.factory.updateVariableDeclaration(p,e.ts.factory.createIdentifier(r),p.exclamationToken,p.type,p.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s));if(e.ts.isObjectBindingPattern(p.name)&&typeof n=="string"){let f=[...p.name.elements];return f.some(y=>!e.ts.isBindingElement(y)||!e.ts.isIdentifier(y.name)?!1:y.name.text===n)?t:(f.push(e.ts.factory.createBindingElement(void 0,void 0,n)),f.sort((y,b)=>!e.ts.isBindingElement(y)||!e.ts.isIdentifier(y.name)||!e.ts.isBindingElement(b)||!e.ts.isIdentifier(b.name)?0:y.name.text.localeCompare(b.name.text)),l[c]=e.ts.factory.updateVariableDeclaration(p,e.ts.factory.createObjectBindingPattern(f),p.exclamationToken,p.type,p.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s))}}}}if(typeof r=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(r,void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}if(typeof n=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(e.ts.factory.createObjectBindingPattern([e.ts.factory.createBindingElement(void 0,void 0,n)]),void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}return t}function Yn(e,t,r="esm"){return r==="cjs"?VA(e,t):UA(e,t)}function UA(e,t){let r=[];for(let n of t.statements){if(e.ts.isExportDeclaration(n)){if(n.exportClause&&e.ts.isNamedExports(n.exportClause)){for(let o of n.exportClause.elements)if(n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:o}),e.ts.isIdentifier(o.name)){let s=o.name.text;for(let i of t.statements)if(e.ts.isVariableStatement(i))for(let a of i.declarationList.declarations)e.ts.isIdentifier(a.name)&&a.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i});else e.ts.isFunctionDeclaration(i)&&i.name&&i.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i})}}else!n.exportClause&&n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:n});continue}if(e.ts.isExportAssignment(n)){let o=n.flags===e.ts.NodeFlags.None,s=n.expression;if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements){if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:o,statement:a,node:a});e.ts.isFunctionDeclaration(a)&&a.name?.text===i&&r.push({isDefaultExport:o,statement:a,node:a})}}else(e.ts.isArrowFunction(s)||e.ts.isCallExpression(s)||e.ts.isFunctionDeclaration(s)||e.ts.isObjectLiteralExpression(s))&&r.push({isDefaultExport:o,statement:n,node:s});continue}if((e.ts.isVariableStatement(n)||e.ts.isFunctionDeclaration(n))&&n.modifiers&&n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.ExportKeyword)){r.push({isDefaultExport:n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.DefaultKeyword),statement:n,node:n});continue}}return r}function VA(e,t){let r=[];for(let n of t.statements)if(e.ts.isExpressionStatement(n)&&e.ts.isBinaryExpression(n.expression)&&e.ts.isPropertyAccessExpression(n.expression.left)){let o=n.expression.left,s=n.expression.right;if(!e.ts.isIdentifier(o.expression))continue;if(o.expression.text==="module"&&o.name.text==="exports"){if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements)if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a});else e.ts.isFunctionDeclaration(a)&&a.name&&a.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a})}else r.push({isDefaultExport:!0,statement:n,node:s});continue}}return r}function HA(e,t,r){for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&n.importClause){if(n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings)){for(let o of n.importClause.namedBindings.elements)if(e.ts.isIdentifier(o.name)&&o.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"named"}}if(n.importClause.name&&n.importClause.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"default"}}return null}async function Mr(e,t,r,n){let o=HA(e,r,n);if(o){let s=await zi(e,e.normalize(e.resolve(e.dirname(t),o.importPath))),i=e.relative(e.getAppRootDir(),s);return{displayFilePath:ge(e,s),filePath:s,relFilePath:i,importPath:o.importPath,exportType:o.exportType}}return null}function $o(e,t,r){for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(e.ts.isVariableStatement(o)){for(let s of o.declarationList.declarations)if(e.ts.isIdentifier(s.name)&&s.name.text===r)return{statement:o,statementIndex:n}}}return null}function Ge(e,t,r){let n=$o(e,t,r);if(n&&n.statement.declarationList.declarations.length>0){let o=n.statement.declarationList.declarations[0];if(o.initializer&&e.ts.isArrayLiteralExpression(o.initializer))return{statement:n.statement,statementIndex:n.statementIndex,variableDeclaration:o,arrayLiteralExp:o.initializer}}return null}function Ma(e,t){if(t){if(qA(e,t))return!0;let r=!1;if(t.forEachChild(n=>{Ma(e,n)&&(r=!0)}),r)return!0}return!1}function qA(e,t){return e.ts.isJsxElement(t)||e.ts.isJsxOpeningElement(t)||e.ts.isJsxOpeningFragment(t)||e.ts.isJsxSelfClosingElement(t)||e.ts.isJsxFragment(t)||e.ts.isJsxChild(t)}async function zi(e,t){let r=e.extname(t).toLowerCase();if(r===""||!tl.includes(r)){for(let n of tl){let o=t+n;if(await e.exists(o))return o}for(let n of tl){let o=e.join(t,"index"+n);if(await e.exists(o))return o}}return t}var tl=[".tsx",".jsx",".ts",".js"];function ko(e,t,r){if(!r||!t)return;let n=t.getSymbolAtLocation(r);if(!n)return;let o=n.valueDeclaration;if(!o)return;let s=o.getSourceFile().fileName,i=KA(e,s);return i?[{name:i}]:void 0}function KA(e,t){if(typeof t=="string"){t=e.normalize(Dr(t));let r=t.split("/"),n=r.lastIndexOf("node_modules");if(n>-1){let o=r.slice(n+1),s=o[0];if(s)return s.startsWith("@")&&o[1]&&(s+="/"+o[1]),s}}}function sr(e){let t=[];for(let r of e)if(r.dependencies)for(let n of r.dependencies)t.some(o=>o.name===n.name)||t.push({...n});return t.sort((r,n)=>r.name.localeCompare(n.name))}function Ng(e,t,r="esm"){return r==="cjs"?ZA(e,t):WA(e,t)}var GA=/^(@\w|\w)/;function WA(e,t){let r=[];for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&e.ts.isLiteralExpression(n.moduleSpecifier)){if(!GA.test(n.moduleSpecifier.text)||n.importClause?.isTypeOnly)continue;if(n.importClause&&n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings))for(let o of n.importClause.namedBindings.elements)o.isTypeOnly||r.push({isDefaultExport:!1,statement:n,node:o.name});n.importClause&&n.importClause.name&&r.push({isDefaultExport:!0,statement:n,node:n.importClause.name})}return r}function ZA(e,t){return[]}async function Io(e,t){if(!t.some(i=>!i.isRegistered))return t;let n=await Ye(e,t.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(t.map(async i=>{let a=n.getSourceFile(i.filePath);if(a){let c=(await En(e,o,i.filePath,a,!1)).find(l=>l.cmpInfo.id===i.id);c&&(i.inputs=Jn(e,o,c.node.fnNode))}return i}))}async function No(e,t,r,n){if(t.node.fnNode){let{sourceFile:o,typeChecker:s}=await Eo(e,t.cmpInfo.filePath,r),a=(await En(e,s,t.cmpInfo.filePath,o,n)).find(u=>u.cmpInfo.id===t.cmpInfo.id);if(!a)throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return Jn(e,s,a.node.fnNode)}return[]}async function Mg(e,t,r){let n=e.extname(t).toLowerCase();if(n===".tsx"||n===".jsx"||n===".ts"||n===".js"){let o=await e.readFile(t);if(o)return JA(e,t,o,r)}return null}function JA(e,t,r,n=!1){let o=se(e,r);return En(e,null,t,o,n)}async function En(e,t,r,n,o){let s=[];for(let a of n.statements)if(e.ts.isExpressionStatement(a)&&e.ts.isStringLiteral(a.expression)&&a.expression.text==="use server")return s;let i=Yn(e,n);return o&&i.push(...Ng(e,n)),r=e.normalize(r),await Promise.all(i.map(async a=>{let u=await YA(e,t,r,a);s.push(...u)})),s}async function YA(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Ee(e,r);if(e.ts.isVariableStatement(n.node)){for(let a of n.node.declarationList.declarations){if(!e.ts.isIdentifier(a.name)||!So(a.name.text))continue;let u=sn(e,t,a.initializer);if(u){let c=u.name||a.name.text,l=n.isDefaultExport?"default":c,p=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:ge(e,r),name:Se(c),inputs:[],exportName:l,exportType:p,importName:c,filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}}return o}if(e.ts.isArrowFunction(n.node)){let a=sn(e,t,n.node);if(a){let u=tr(e,r),c=n.isDefaultExport?"default":u,l=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,c),displayFilePath:ge(e,r),name:u,inputs:[],exportName:c,exportType:l,importName:Gn(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:a.deps,framework:"react"},node:a})}return o}if(e.ts.isFunctionExpression(n.node)||e.ts.isFunctionDeclaration(n.node)){let a=n.node.name?.text;if(a&&!So(a))return o;let u=sn(e,t,n.node);if(u){let c=u.name||tr(e,r),l=n.isDefaultExport||!u.name?"default":u.name,p=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:ge(e,r),name:c,inputs:[],exportName:l,exportType:p,importName:u.name||Gn(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}return o}if((e.ts.isExportSpecifier(n.node)||e.ts.isIdentifier(n.node))&&So(n.node.getText())){let a,u=sn(e,t,n.node);if(u){let c=u.name||tr(e,r),l=n.isDefaultExport||!u.name?"default":u.name,p=n.isDefaultExport?"default":"named",d=QA(e,n.node)?.moduleSpecifier??XA(e,n.node)?.moduleSpecifier;if(d&&e.ts.isStringLiteral(d)){let h=t?.getSymbolAtLocation(d);if(h&&h.declarations&&h.declarations.length>0){let m=h.declarations[0];(!e.ts.isSourceFile(m)||e.ts.isSourceFile(m)&&m.fileName.includes("node_modules"))&&(a=d.text)}}o.push({cmpInfo:{id:await we(e,r,l,a),displayFilePath:ge(e,r),name:c,inputs:[],exportName:l,exportType:p,importName:u.name||Gn(e,r),filePath:r,relFilePath:s,importPath:a||i,externalImportPath:a,dependencies:u.deps,framework:"react"},node:u})}return o}if(e.ts.isExportDeclaration(n.node)&&n.node.exportClause===void 0){let a=n.node.moduleSpecifier;if(a&&e.ts.isStringLiteral(a)){let u=await tF(e,t,r,a);o.push(...u)}return o}return o}function QA(e,t){for(;t;){if(e.ts.isExportDeclaration(t))return t;t=t.parent}return null}function XA(e,t){for(;t;){if(e.ts.isImportDeclaration(t))return t;t=t.parent}return null}function sn(e,t,r){if(!r)return null;if(e.ts.isArrowFunction(r))return Ma(e,r.body)?{name:"",fnNode:r,deps:ko(e,t,r)}:null;if(e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r))return Ma(e,r.body)?{name:r.name?.text||"",fnNode:r,deps:ko(e,t,r)}:null;if(e.ts.isCallExpression(r)){let n=r.expression;if(e.ts.isPropertyAccessExpression(n)){let o=r.arguments;if(o.length===0)return null;let s=n.expression;if(!e.ts.isIdentifier(s)||s.text!=="React")return null;let i=n.name;return!e.ts.isIdentifier(i)||i.text!=="forwardRef"?null:sn(e,t,o[0])}else if(e.ts.isIdentifier(n)&&(n.text==="observer"||n.text==="forwardRef")){let o=r.arguments;return o.length===0?null:sn(e,t,o[0])}return null}if(!t)return null;if(e.ts.isPropertyAccessExpression(r)){let n=r.expression,o=r.name;if(!e.ts.isIdentifier(n)||!e.ts.isIdentifier(o)||!So(o.text))return null;let i=t.getTypeAtLocation(o).getCallSignatures();if(i.length>0&&i[0].getParameters().length>0)return{name:"",fnNode:o,deps:ko(e,t,o)}}if(e.ts.isExportSpecifier(r)){let n=r.name;return{name:n.text||"",fnNode:n,deps:ko(e,t,n)}}if(e.ts.isIdentifier(r))return{name:r.text||"",fnNode:r,deps:ko(e,t,r)};if(e.ts.isExpressionStatement(r)){let n=r.expression;if(e.ts.isAsExpression(n)&&e.ts.isIdentifier(n.type)&&n.type.text==="default")return sn(e,t,n.expression)}if(e.ts.isVariableStatement(r)){for(let n of r.declarationList.declarations)if(n.initializer&&e.ts.isAsExpression(n.initializer)){let o=n.initializer;if(e.ts.isIdentifier(o.type)&&o.type.text==="default"){let s=sn(e,t,o.expression);if(s&&e.ts.isIdentifier(n.name))return{name:n.name.text,fnNode:s.fnNode,deps:s.deps}}}}return null}async function Lg(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.normalize(s.fileName);if(Ea(e,eF,s.fileName)||i===e.reactConfigPath||i===e.builderComponentPath)return;let a=await En(e,o,i,s,i===e.registryPath);r.push(...a)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var eF=new Set(["node_modules","dist"]);async function tF(e,t,r,n){let o=[],s=n.text;if(!t)return o;try{let i=t.getSymbolAtLocation(n);if(!i)return o;let a=t.getExportsOfModule(i);for(let u of a){let c=u.valueDeclaration||u.declarations?.[0];if(!c)continue;let l=u.name;if(!So(l)&&l!=="default"||!Bg(e,t,c))continue;let p=sn(e,t,c);if(p){let d=u.name,h=d==="default"?"default":"named",m=Se(d),f=d==="default"?Gn(e,r):d;o.push({cmpInfo:{id:await we(e,r,d,s),displayFilePath:ge(e,r),name:m,inputs:[],exportName:d,exportType:h,importName:f,filePath:r,relFilePath:e.relative(e.getAppRootDir(),r),importPath:s,externalImportPath:s,dependencies:p.deps,framework:"react"},node:p})}}}catch(i){e.Sentry?.captureException(new Error(`Error processing module ${s}:`,{cause:i}),{extra:{modulePath:s,filePath:r}})}return o}function Bg(e,t,r){if(e.ts.isInterfaceDeclaration(r)||e.ts.isTypeAliasDeclaration(r))return!1;if(e.ts.isExportSpecifier(r)){let n=t.getSymbolAtLocation(r.name);if(n){let s=t.getAliasedSymbol(n).declarations?.[0];if(s)return Bg(e,t,s)}return!1}if(e.ts.isFunctionDeclaration(r)||e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)){let n=t.getSignatureFromDeclaration(r);if(n){let o=t.getReturnTypeOfSignature(n);return Og(o,t)}}return e.ts.isClassDeclaration(r)?r.heritageClauses?.some(o=>o.types.some(s=>s.expression.getText()==="React.Component"||s.expression.getText()==="Component"))??!1:e.ts.isVariableDeclaration(r)?t.getTypeAtLocation(r).getCallSignatures().some(s=>Og(t.getReturnTypeOfSignature(s),t)):!1}function Og(e,t){let r=t.typeToString(e);return r==="JSX.Element"||r==="Element"||r.includes("ReactElement")||r.includes("React.ReactElement")||r.includes("ReactNode")}async function zg(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(e.appDir&&rF.has(i)||e.dirname(s.fileName).includes("node_modules"))return;let a=e.normalize(s.fileName);if(a===e.nextConfigPath||a===e.builderComponentPath)return;let u=await En(e,o,a,s,a===e.registryPath||er(a));r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var rF=new Set(["default.tsx","default.ts","default.jsx","default.js","error.tsx","error.ts","error.jsx","error.js","layout.tsx","layout.ts","layout.jsx","layout.js","loading.tsx","loading.ts","loading.jsx","loading.js","not-found.tsx","not-found.ts","not-found.jsx","not-found.js","page.tsx","page.ts","page.jsx","page.js","route.tsx","route.ts","route.jsx","route.js","template.tsx","template.ts","template.jsx","template.js"]);function Lr(e,t){let r=[],n=[],o=[],s=[];for(let i of t.statements){if(e.ts.isImportDeclaration(i)){if(e.ts.isStringLiteral(i.moduleSpecifier)){let u=i.moduleSpecifier.text;if(!u.startsWith(".")&&!u.startsWith("/")){r.push(i);continue}}let a=i.importClause;if(a){if(a.namedBindings){n.push(i);continue}if(a.name){n.push(i);continue}}o.push(i);continue}s.push(i)}return e.ts.factory.updateSourceFile(t,[...rl(e,r),...rl(e,n),...rl(e,o),...s])}function Cr(e){let t=e.split(`
305
+ `,r+=");";let n=Sa(e,r);return el(e,n,t)}function el(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;r.acceptsChildren?e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"||(o[0]=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[o[0]])):e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"&&(o[0]=o[0].arguments[0]);let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Qe(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}function ce(e,t,r,n="esm"){return Array.isArray(r.namedImports)&&r.namedImports.forEach(o=>{t=zA(e,t,o,r.importPath,!!r.isTypeOnly,n)}),typeof r.defaultImport=="string"&&(t=jA(e,t,r.defaultImport,r.importPath,n)),t}function zA(e,t,r,n,o,s){return s==="cjs"?Ig(e,t,null,r,n):kg(e,t,null,r,n,o)}function jA(e,t,r,n,o){return o==="cjs"?Ig(e,t,r,null,n):kg(e,t,r,null,n,!1)}function kg(e,t,r,n,o,s){let i=[...t.statements],a=0,u=!1,c=!1;for(let h=0;h<i.length;h++){let m=i[h];if(!e.ts.isImportDeclaration(m)||(a=h,!m.moduleSpecifier||!e.ts.isStringLiteral(m.moduleSpecifier))||m.moduleSpecifier.text!==o||!!m.importClause?.isTypeOnly!==s)continue;let f=[],g=m.importClause?.namedBindings;if(g&&e.ts.isNamedImports(g)&&g.elements&&f.push(...g.elements),typeof n=="string"){if(f.some(b=>b.name.text===n))return t;f.push(e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))),f.sort((b,w)=>b.name.text.localeCompare(w.name.text)),u=!0}let y=m.importClause?m.importClause.name:void 0;if(typeof r=="string"){if(y&&y.text===r)return t;y=e.ts.factory.createIdentifier(r),c=!0}if(u||c)return i[h]=e.ts.factory.updateImportDeclaration(m,void 0,e.ts.factory.createImportClause(s,y,e.ts.factory.createNamedImports(f)),m.moduleSpecifier,void 0),e.ts.factory.updateSourceFile(t,i)}let l,p;typeof r=="string"&&(l=e.ts.factory.createIdentifier(r)),typeof n=="string"&&(p=e.ts.factory.createNamedImports([e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))]));let d=e.ts.factory.createImportDeclaration(void 0,e.ts.factory.createImportClause(s,l,p),e.ts.factory.createStringLiteral(o));return i.splice(a,0,d),e.ts.factory.updateSourceFile(t,i)}function Ig(e,t,r,n,o){let s=[...t.statements],i=0;for(let a=0;a<s.length;a++){let u=s[a];if(e.ts.isVariableStatement(u))for(let c=0;c<u.declarationList.declarations.length;c++){let l=[...u.declarationList.declarations],p=l[c],d=p.initializer;if(!d||!e.ts.isCallExpression(d))continue;let h=d.expression;if(!e.ts.isIdentifier(h)||h.text!=="require"||d.arguments.length!==1)continue;let m=d.arguments[0];if(e.ts.isStringLiteral(m)&&(i=a,m.text===o)){if(e.ts.isIdentifier(p.name)&&typeof r=="string")return p.name.text===r?t:(l[c]=e.ts.factory.updateVariableDeclaration(p,e.ts.factory.createIdentifier(r),p.exclamationToken,p.type,p.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s));if(e.ts.isObjectBindingPattern(p.name)&&typeof n=="string"){let f=[...p.name.elements];return f.some(y=>!e.ts.isBindingElement(y)||!e.ts.isIdentifier(y.name)?!1:y.name.text===n)?t:(f.push(e.ts.factory.createBindingElement(void 0,void 0,n)),f.sort((y,b)=>!e.ts.isBindingElement(y)||!e.ts.isIdentifier(y.name)||!e.ts.isBindingElement(b)||!e.ts.isIdentifier(b.name)?0:y.name.text.localeCompare(b.name.text)),l[c]=e.ts.factory.updateVariableDeclaration(p,e.ts.factory.createObjectBindingPattern(f),p.exclamationToken,p.type,p.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s))}}}}if(typeof r=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(r,void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}if(typeof n=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(e.ts.factory.createObjectBindingPattern([e.ts.factory.createBindingElement(void 0,void 0,n)]),void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}return t}function Yn(e,t,r="esm"){return r==="cjs"?VA(e,t):UA(e,t)}function UA(e,t){let r=[];for(let n of t.statements){if(e.ts.isExportDeclaration(n)){if(n.exportClause&&e.ts.isNamedExports(n.exportClause)){for(let o of n.exportClause.elements)if(n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:o}),e.ts.isIdentifier(o.name)){let s=o.name.text;for(let i of t.statements)if(e.ts.isVariableStatement(i))for(let a of i.declarationList.declarations)e.ts.isIdentifier(a.name)&&a.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i});else e.ts.isFunctionDeclaration(i)&&i.name&&i.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i})}}else!n.exportClause&&n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:n});continue}if(e.ts.isExportAssignment(n)){let o=n.flags===e.ts.NodeFlags.None,s=n.expression;if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements){if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:o,statement:a,node:a});e.ts.isFunctionDeclaration(a)&&a.name?.text===i&&r.push({isDefaultExport:o,statement:a,node:a})}}else(e.ts.isArrowFunction(s)||e.ts.isCallExpression(s)||e.ts.isFunctionDeclaration(s)||e.ts.isObjectLiteralExpression(s))&&r.push({isDefaultExport:o,statement:n,node:s});continue}if((e.ts.isVariableStatement(n)||e.ts.isFunctionDeclaration(n))&&n.modifiers&&n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.ExportKeyword)){r.push({isDefaultExport:n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.DefaultKeyword),statement:n,node:n});continue}}return r}function VA(e,t){let r=[];for(let n of t.statements)if(e.ts.isExpressionStatement(n)&&e.ts.isBinaryExpression(n.expression)&&e.ts.isPropertyAccessExpression(n.expression.left)){let o=n.expression.left,s=n.expression.right;if(!e.ts.isIdentifier(o.expression))continue;if(o.expression.text==="module"&&o.name.text==="exports"){if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements)if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a});else e.ts.isFunctionDeclaration(a)&&a.name&&a.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a})}else r.push({isDefaultExport:!0,statement:n,node:s});continue}}return r}function HA(e,t,r){for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&n.importClause){if(n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings)){for(let o of n.importClause.namedBindings.elements)if(e.ts.isIdentifier(o.name)&&o.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"named"}}if(n.importClause.name&&n.importClause.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"default"}}return null}async function Mr(e,t,r,n){let o=HA(e,r,n);if(o){let s=await zi(e,e.normalize(e.resolve(e.dirname(t),o.importPath))),i=e.relative(e.getAppRootDir(),s);return{displayFilePath:ge(e,s),filePath:s,relFilePath:i,importPath:o.importPath,exportType:o.exportType}}return null}function $o(e,t,r){for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(e.ts.isVariableStatement(o)){for(let s of o.declarationList.declarations)if(e.ts.isIdentifier(s.name)&&s.name.text===r)return{statement:o,statementIndex:n}}}return null}function We(e,t,r){let n=$o(e,t,r);if(n&&n.statement.declarationList.declarations.length>0){let o=n.statement.declarationList.declarations[0];if(o.initializer&&e.ts.isArrayLiteralExpression(o.initializer))return{statement:n.statement,statementIndex:n.statementIndex,variableDeclaration:o,arrayLiteralExp:o.initializer}}return null}function Ma(e,t){if(t){if(qA(e,t))return!0;let r=!1;if(t.forEachChild(n=>{Ma(e,n)&&(r=!0)}),r)return!0}return!1}function qA(e,t){return e.ts.isJsxElement(t)||e.ts.isJsxOpeningElement(t)||e.ts.isJsxOpeningFragment(t)||e.ts.isJsxSelfClosingElement(t)||e.ts.isJsxFragment(t)||e.ts.isJsxChild(t)}async function zi(e,t){let r=e.extname(t).toLowerCase();if(r===""||!tl.includes(r)){for(let n of tl){let o=t+n;if(await e.exists(o))return o}for(let n of tl){let o=e.join(t,"index"+n);if(await e.exists(o))return o}}return t}var tl=[".tsx",".jsx",".ts",".js"];function ko(e,t,r){if(!r||!t)return;let n=t.getSymbolAtLocation(r);if(!n)return;let o=n.valueDeclaration;if(!o)return;let s=o.getSourceFile().fileName,i=KA(e,s);return i?[{name:i}]:void 0}function KA(e,t){if(typeof t=="string"){t=e.normalize(Dr(t));let r=t.split("/"),n=r.lastIndexOf("node_modules");if(n>-1){let o=r.slice(n+1),s=o[0];if(s)return s.startsWith("@")&&o[1]&&(s+="/"+o[1]),s}}}function sr(e){let t=[];for(let r of e)if(r.dependencies)for(let n of r.dependencies)t.some(o=>o.name===n.name)||t.push({...n});return t.sort((r,n)=>r.name.localeCompare(n.name))}function Ng(e,t,r="esm"){return r==="cjs"?ZA(e,t):WA(e,t)}var GA=/^(@\w|\w)/;function WA(e,t){let r=[];for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&e.ts.isLiteralExpression(n.moduleSpecifier)){if(!GA.test(n.moduleSpecifier.text)||n.importClause?.isTypeOnly)continue;if(n.importClause&&n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings))for(let o of n.importClause.namedBindings.elements)o.isTypeOnly||r.push({isDefaultExport:!1,statement:n,node:o.name});n.importClause&&n.importClause.name&&r.push({isDefaultExport:!0,statement:n,node:n.importClause.name})}return r}function ZA(e,t){return[]}async function Io(e,t){if(!t.some(i=>!i.isRegistered))return t;let n=await Ye(e,t.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(t.map(async i=>{let a=n.getSourceFile(i.filePath);if(a){let c=(await _n(e,o,i.filePath,a,!1)).find(l=>l.cmpInfo.id===i.id);c&&(i.inputs=Jn(e,o,c.node.fnNode))}return i}))}async function No(e,t,r,n){if(t.node.fnNode){let{sourceFile:o,typeChecker:s}=await Eo(e,t.cmpInfo.filePath,r),a=(await _n(e,s,t.cmpInfo.filePath,o,n)).find(u=>u.cmpInfo.id===t.cmpInfo.id);if(!a)throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return Jn(e,s,a.node.fnNode)}return[]}async function Mg(e,t,r){let n=e.extname(t).toLowerCase();if(n===".tsx"||n===".jsx"||n===".ts"||n===".js"){let o=await e.readFile(t);if(o)return JA(e,t,o,r)}return null}function JA(e,t,r,n=!1){let o=se(e,r);return _n(e,null,t,o,n)}async function _n(e,t,r,n,o){let s=[];for(let a of n.statements)if(e.ts.isExpressionStatement(a)&&e.ts.isStringLiteral(a.expression)&&a.expression.text==="use server")return s;let i=Yn(e,n);return o&&i.push(...Ng(e,n)),r=e.normalize(r),await Promise.all(i.map(async a=>{let u=await YA(e,t,r,a);s.push(...u)})),s}async function YA(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Ee(e,r);if(e.ts.isVariableStatement(n.node)){for(let a of n.node.declarationList.declarations){if(!e.ts.isIdentifier(a.name)||!So(a.name.text))continue;let u=sn(e,t,a.initializer);if(u){let c=u.name||a.name.text,l=n.isDefaultExport?"default":c,p=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:ge(e,r),name:Se(c),inputs:[],exportName:l,exportType:p,importName:c,filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}}return o}if(e.ts.isArrowFunction(n.node)){let a=sn(e,t,n.node);if(a){let u=tr(e,r),c=n.isDefaultExport?"default":u,l=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,c),displayFilePath:ge(e,r),name:u,inputs:[],exportName:c,exportType:l,importName:Gn(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:a.deps,framework:"react"},node:a})}return o}if(e.ts.isFunctionExpression(n.node)||e.ts.isFunctionDeclaration(n.node)){let a=n.node.name?.text;if(a&&!So(a))return o;let u=sn(e,t,n.node);if(u){let c=u.name||tr(e,r),l=n.isDefaultExport||!u.name?"default":u.name,p=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:ge(e,r),name:c,inputs:[],exportName:l,exportType:p,importName:u.name||Gn(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}return o}if((e.ts.isExportSpecifier(n.node)||e.ts.isIdentifier(n.node))&&So(n.node.getText())){let a,u=sn(e,t,n.node);if(u){let c=u.name||tr(e,r),l=n.isDefaultExport||!u.name?"default":u.name,p=n.isDefaultExport?"default":"named",d=QA(e,n.node)?.moduleSpecifier??XA(e,n.node)?.moduleSpecifier;if(d&&e.ts.isStringLiteral(d)){let h=t?.getSymbolAtLocation(d);if(h&&h.declarations&&h.declarations.length>0){let m=h.declarations[0];(!e.ts.isSourceFile(m)||e.ts.isSourceFile(m)&&m.fileName.includes("node_modules"))&&(a=d.text)}}o.push({cmpInfo:{id:await we(e,r,l,a),displayFilePath:ge(e,r),name:c,inputs:[],exportName:l,exportType:p,importName:u.name||Gn(e,r),filePath:r,relFilePath:s,importPath:a||i,externalImportPath:a,dependencies:u.deps,framework:"react"},node:u})}return o}if(e.ts.isExportDeclaration(n.node)&&n.node.exportClause===void 0){let a=n.node.moduleSpecifier;if(a&&e.ts.isStringLiteral(a)){let u=await tF(e,t,r,a);o.push(...u)}return o}return o}function QA(e,t){for(;t;){if(e.ts.isExportDeclaration(t))return t;t=t.parent}return null}function XA(e,t){for(;t;){if(e.ts.isImportDeclaration(t))return t;t=t.parent}return null}function sn(e,t,r){if(!r)return null;if(e.ts.isArrowFunction(r))return Ma(e,r.body)?{name:"",fnNode:r,deps:ko(e,t,r)}:null;if(e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r))return Ma(e,r.body)?{name:r.name?.text||"",fnNode:r,deps:ko(e,t,r)}:null;if(e.ts.isCallExpression(r)){let n=r.expression;if(e.ts.isPropertyAccessExpression(n)){let o=r.arguments;if(o.length===0)return null;let s=n.expression;if(!e.ts.isIdentifier(s)||s.text!=="React")return null;let i=n.name;return!e.ts.isIdentifier(i)||i.text!=="forwardRef"?null:sn(e,t,o[0])}else if(e.ts.isIdentifier(n)&&(n.text==="observer"||n.text==="forwardRef")){let o=r.arguments;return o.length===0?null:sn(e,t,o[0])}return null}if(!t)return null;if(e.ts.isPropertyAccessExpression(r)){let n=r.expression,o=r.name;if(!e.ts.isIdentifier(n)||!e.ts.isIdentifier(o)||!So(o.text))return null;let i=t.getTypeAtLocation(o).getCallSignatures();if(i.length>0&&i[0].getParameters().length>0)return{name:"",fnNode:o,deps:ko(e,t,o)}}if(e.ts.isExportSpecifier(r)){let n=r.name;return{name:n.text||"",fnNode:n,deps:ko(e,t,n)}}if(e.ts.isIdentifier(r))return{name:r.text||"",fnNode:r,deps:ko(e,t,r)};if(e.ts.isExpressionStatement(r)){let n=r.expression;if(e.ts.isAsExpression(n)&&e.ts.isIdentifier(n.type)&&n.type.text==="default")return sn(e,t,n.expression)}if(e.ts.isVariableStatement(r)){for(let n of r.declarationList.declarations)if(n.initializer&&e.ts.isAsExpression(n.initializer)){let o=n.initializer;if(e.ts.isIdentifier(o.type)&&o.type.text==="default"){let s=sn(e,t,o.expression);if(s&&e.ts.isIdentifier(n.name))return{name:n.name.text,fnNode:s.fnNode,deps:s.deps}}}}return null}async function Lg(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.normalize(s.fileName);if(Ea(e,eF,s.fileName)||i===e.reactConfigPath||i===e.builderComponentPath)return;let a=await _n(e,o,i,s,i===e.registryPath);r.push(...a)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var eF=new Set(["node_modules","dist"]);async function tF(e,t,r,n){let o=[],s=n.text;if(!t)return o;try{let i=t.getSymbolAtLocation(n);if(!i)return o;let a=t.getExportsOfModule(i);for(let u of a){let c=u.valueDeclaration||u.declarations?.[0];if(!c)continue;let l=u.name;if(!So(l)&&l!=="default"||!Bg(e,t,c))continue;let p=sn(e,t,c);if(p){let d=u.name,h=d==="default"?"default":"named",m=Se(d),f=d==="default"?Gn(e,r):d;o.push({cmpInfo:{id:await we(e,r,d,s),displayFilePath:ge(e,r),name:m,inputs:[],exportName:d,exportType:h,importName:f,filePath:r,relFilePath:e.relative(e.getAppRootDir(),r),importPath:s,externalImportPath:s,dependencies:p.deps,framework:"react"},node:p})}}}catch(i){e.Sentry?.captureException(new Error(`Error processing module ${s}:`,{cause:i}),{extra:{modulePath:s,filePath:r}})}return o}function Bg(e,t,r){if(e.ts.isInterfaceDeclaration(r)||e.ts.isTypeAliasDeclaration(r))return!1;if(e.ts.isExportSpecifier(r)){let n=t.getSymbolAtLocation(r.name);if(n){let s=t.getAliasedSymbol(n).declarations?.[0];if(s)return Bg(e,t,s)}return!1}if(e.ts.isFunctionDeclaration(r)||e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)){let n=t.getSignatureFromDeclaration(r);if(n){let o=t.getReturnTypeOfSignature(n);return Og(o,t)}}return e.ts.isClassDeclaration(r)?r.heritageClauses?.some(o=>o.types.some(s=>s.expression.getText()==="React.Component"||s.expression.getText()==="Component"))??!1:e.ts.isVariableDeclaration(r)?t.getTypeAtLocation(r).getCallSignatures().some(s=>Og(t.getReturnTypeOfSignature(s),t)):!1}function Og(e,t){let r=t.typeToString(e);return r==="JSX.Element"||r==="Element"||r.includes("ReactElement")||r.includes("React.ReactElement")||r.includes("ReactNode")}async function zg(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(e.appDir&&rF.has(i)||e.dirname(s.fileName).includes("node_modules"))return;let a=e.normalize(s.fileName);if(a===e.nextConfigPath||a===e.builderComponentPath)return;let u=await _n(e,o,a,s,a===e.registryPath||er(a));r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var rF=new Set(["default.tsx","default.ts","default.jsx","default.js","error.tsx","error.ts","error.jsx","error.js","layout.tsx","layout.ts","layout.jsx","layout.js","loading.tsx","loading.ts","loading.jsx","loading.js","not-found.tsx","not-found.ts","not-found.jsx","not-found.js","page.tsx","page.ts","page.jsx","page.js","route.tsx","route.ts","route.jsx","route.js","template.tsx","template.ts","template.jsx","template.js"]);function Lr(e,t){let r=[],n=[],o=[],s=[];for(let i of t.statements){if(e.ts.isImportDeclaration(i)){if(e.ts.isStringLiteral(i.moduleSpecifier)){let u=i.moduleSpecifier.text;if(!u.startsWith(".")&&!u.startsWith("/")){r.push(i);continue}}let a=i.importClause;if(a){if(a.namedBindings){n.push(i);continue}if(a.name){n.push(i);continue}}o.push(i);continue}s.push(i)}return e.ts.factory.updateSourceFile(t,[...rl(e,r),...rl(e,n),...rl(e,o),...s])}function Cr(e){let t=e.split(`
306
306
  `).map(n=>n.trimEnd());e="";let r=!1;for(let n=t.length-1;n>=0;n--){let o=t[n];!r&&o.startsWith("import ")&&(r=!0,o=o+`
307
307
  `),/^builder.init(.*)$/.test(o)&&(o=o+`
308
308
  `),t[n-1]&&!t[n-1].includes("*/")&&(o.trim().startsWith("Builder.registerComponent")&&(o=`
@@ -312,7 +312,7 @@ ${r}=${n}
312
312
  `+o)),e=o+`
313
313
  `+e}return e.trim()+`
314
314
  `}function rl(e,t){return t.sort((r,n)=>{let o=jg(e,r),s=jg(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())})}function jg(e,t){let r=t.importClause;if(r){let n=r.namedBindings;if(n&&e.ts.isNamedImports(n)&&n.elements.length>0)return n.elements[0].name.text;if(r.name)return r.name.text}return t.moduleSpecifier&&e.ts.isStringLiteral(t.moduleSpecifier)?t.moduleSpecifier.text:""}function Vg(e){return typeof e=="string"&&!e.includes("'use client'")&&!e.includes(`"use client"'`)&&(e=`"use client"
315
- ${e}`),e}function Hg(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function Br(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let o=Ug(e,r),s=Ug(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Ug(e,t){let r=t.properties.find(n=>ye(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}async function qg(e){let t=await e.readFile(e.registryPath);return t?nF(e,t):{components:[],sourceFile:se(e,"")}}async function nF(e,t){let r=se(e,t);return e.sdkVersion===q.gen2?iF(e,r):oF(e,r)}async function oF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isCallExpression(p)){let d=e.ts.isIdentifier(p.expression)&&p.expression.text;if(d==="withChildren"){let m=il(e,p.arguments[0]);if(e.ts.isCallExpression(m)){let f=await nl(e,n,m,l,!0);f&&r.push(f)}else{let f=m;if(e.ts.isIdentifier(f)){let g=await ol(e,t,n,f,l,!0);g&&r.push(g)}}continue}if(d==="dynamic"){let m=await nl(e,n,p,l,!1);m&&r.push(m);continue}let h=il(e,p.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let m=await nl(e,n,h,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(h)){let m=await ol(e,t,n,h,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(p)){let d=await ol(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:Ft(r)}}function il(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:il(e,t.arguments[0]):t}async function nl(e,t,r,n,o){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:o,framework:"react"},i=r.arguments;if(i.length===0)return null;let a=i[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let p=l.text,d=await Oo(e,p);s.filePath=d,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(d)?s.importPath=Ee(e,s.filePath):(s.externalImportPath=p,s.importPath=s.externalImportPath),s.name=tr(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let p=l.expression;if(!e.ts.isCallExpression(p)||p.expression.kind!==e.ts.SyntaxKind.ImportKeyword||p.arguments.length!==1)return null;let h=p.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(u.name))return null;let m=h.text,f=await Oo(e,m);s.filePath=f,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(f)?s.importPath=Ee(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=Se(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=$t(e,s,n),s.displayFilePath=ge(e,s.filePath),s.filePath&&s.exportName&&(s.id=await we(e,s.filePath,s.exportName,s.externalImportPath)),s}async function ol(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await Oo(e,c.text);i.filePath=l,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(l)?i.importPath=Ee(e,i.filePath):(i.externalImportPath=c.text,i.importPath=i.externalImportPath),i.name=tr(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await Oo(e,l.text);i.filePath=p,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(p)?i.importPath=Ee(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Se(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=$t(e,i,o),i.displayFilePath=ge(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function Oo(e,t){return zi(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function Kg(e,t,r){let n=!1,o=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){o=c;continue}if(!e.ts.isExpressionStatement(l))continue;let p=l.expression;if(!e.ts.isCallExpression(p))continue;let d=p.expression;if(!e.ts.isPropertyAccessExpression(d))continue;let h=d.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(d.name.text=="init"){n=!0;break}else continue}if(n)return t;let i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(Or)),a=r?e.ts.factory.createNonNullExpression(i):i,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(o+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function iF(e,t){let r=[],n=Ge(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await sl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function sl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ro(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(ye(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let h=u.arguments;if(h.length===0)return null;let m=h[0];if(!e.ts.isArrowFunction(m))return null;let f=m.body;if(e.ts.isCallExpression(f)){if(f.expression.kind!==e.ts.SyntaxKind.ImportKeyword||f.arguments.length!==1)return null;let y=f.arguments[0];if(!e.ts.isStringLiteral(y))return null;let b=y.text,w=await Oo(e,b);n.filePath=w,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(w)?n.importPath=Ee(e,n.filePath):(n.externalImportPath=b,n.importPath=n.externalImportPath),n.name=tr(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(f)){let g=f.expression;if(!e.ts.isParenthesizedExpression(g))return null;let y=g.expression;if(!e.ts.isAwaitExpression(y))return null;let b=y.expression;if(!e.ts.isCallExpression(b)||b.expression.kind!==e.ts.SyntaxKind.ImportKeyword||b.arguments.length!==1)return null;let T=b.arguments[0];if(!e.ts.isStringLiteral(T)||!e.ts.isIdentifier(f.name))return null;let E=T.text,F=await Oo(e,E);n.filePath=F,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(F)?n.importPath=Ee(e,n.filePath):(n.externalImportPath=E,n.importPath=n.externalImportPath),n.name=Se(f.name.text),n.importName=f.name.text,n.exportName=f.name.text,n.exportType="named"}else return null;return n=$t(e,n,r),n.displayFilePath=ge(e,n.filePath),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Se(a)),n.importName=a;let c=await Mr(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Ee(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=Ee(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}function zr(e,t){let r=[...t.statements],n=!1;for(let o=t.statements.length-1;o>=0;o--){let s=t.statements[o];if(e.ts.isImportDeclaration(s)&&s.importClause){let i=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let p=l.name;if(p&&e.ts.isIdentifier(p)){let d=p.text;Gg(e,t,d)||u.splice(c,1)}}}if(u.length===0)i=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[o]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;Gg(e,t,u)||(i=!0)}i&&(r.splice(o,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function Gg(e,t,r){let n=!1;function o(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,o)}}return e.ts.forEachChild(t,o),n}function jr(e,t,r,n,o,s,i){let a=null,u=null,c=null,l=-1;t=Ht(t),r=Ht(r);let p=t.find(h=>h.id===e),d=r.find(h=>h.id===e);if(n)d||(a={...Ht(p),inputs:Ht(p.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof d?.nodeIndex=="number"&&d.nodeIndex>-1){if(o)l=d.nodeIndex,u=Ht(d),r=r.filter(h=>h.id!==e);else if(s!=null)sF(d,s),l=d.nodeIndex,c=d;else if(i!=null){let h=d.inputs.find(m=>m.name===i.name);h&&(i.registerInput===!1?h.isRegistered=!1:(aF(h,i),h.isRegistered=!0),c=d,l=d.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:wr(t,r)}}function wr(e,t){let r=Ft([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(o=>o.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(Xc),n.inputs.sort((i,a)=>i.name.toLowerCase().localeCompare(a.name.toLowerCase()));let o=t.find(i=>i.id===n.id);o&&(o.acceptsChildren=Qc(n));let s=e.find(i=>i.id===n.id&&i.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function sF(e,t){xt(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),xt(t.description)?e.description=t.description:t.description===null&&delete e.description,xt(t.image)?e.image=t.image:t.image===null&&delete e.image}function aF(e,t){xt(t.type)&&(e.type=t.type),xt(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,xt(t.defaultValue)||Ri(t.defaultValue)||xo(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,xt(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}async function _n(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await Ye(e,[...t])}function Ur(e,t,r){return $o(e,t,r.variableName)?t:uF(e,t,r)}function uF(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,o=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,o),i=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],i),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}async function Vr(e,t,r,n,o,s,i,a){let u=await _n(e),[c,l,p,d]=await Promise.all([zg(e,u),qg(e),St(e),Mi(e)]),h=c.map(w=>w.cmpInfo),m=l.components,f={components:wr(h,m),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Io(e,f.components),f;let g=!1,y=l.sourceFile,b=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(b.length>0){let w=b.map(F=>{let $=c.find(I=>I.cmpInfo.id===F);if(!$)throw new Error(`Component ${F} not found`);return $}),T=Array.from(new Set(w.map(F=>F.cmpInfo.filePath))),E=await Ye(e,T);for(let F of w){let $=f.components.find(v=>v.id===F.cmpInfo.id),I=await No(e,F,E,e.registryPath===F.cmpInfo.filePath||er(F.cmpInfo.filePath));Kt($,I);let k=h.findIndex(v=>v.id===F.cmpInfo.id);h[k].inputs=I;let R=jr(F.cmpInfo.id,h,m,r,n,o,s);if(e.sdkVersion===q.gen2){let{elements:v,elmIndex:z,statementIndex:V,statement:K,variableDeclaration:x}=await pF(e,y,F);if(R.addCmpToRegistry)v.push(lF(e,R.addCmpToRegistry)),g=!0;else if(R.removeCmpFromRegistry)v.splice(z,1),g=!0;else if(R.updateRegisteredCmp){let _=Qe(e,v[z],R.updateRegisteredCmp);v[z]=e.ts.factory.updateObjectLiteralExpression(_,[Zg(e,R.updateRegisteredCmp),..._.properties.slice(1)]),g=!0}if(g&&i){let _=[...y.statements];_[V]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,v)))])),y=e.ts.factory.updateSourceFile(y,_),y=Wg(e,R,y),y=ce(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=R.components,m=R.components.filter(je=>je.isRegistered)}}else{let v=[...y.statements];R.addCmpToRegistry?(v.push($g(e,R.addCmpToRegistry)),g=!0):R.removeCmpFromRegistry?(v.splice(R.nodeIndex,1),g=!0):R.updateRegisteredCmp&&(v[R.nodeIndex]=el(e,v[R.nodeIndex],R.updateRegisteredCmp),g=!0),g&&i&&(y=e.ts.factory.updateSourceFile(y,v),y=ce(e,y,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),y=Kg(e,y,p),y=Wg(e,R,y),$?.acceptsChildren&&(y=ce(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=R.components,m=R.components.filter(z=>z.isRegistered))}}}if(g&&i){y=zr(e,y),y=Lr(e,y),e.appDir&&(y=Hg(e,y));let w=et(e,y);w=Cr(w),e.appDir&&(w=Vg(w)),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return f}function Zg(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",dF(e,t))}function cF(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function lF(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([Zg(e,t),...t.acceptsChildren?[cF(e)]:[]],!0),t)}async function pF(e,t,r){let n=Ge(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await sl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function Wg(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:ae(e,e.registryPath,n.filePath);n.exportType==="default"?r=ce(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ce(e,r,{namedImports:[n.importName],importPath:o}))}}else r=ce(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function dF(e,t){let r=t.externalImportPath?t.externalImportPath:ae(e,e.registryPath,t.filePath),n=t.exportName!=="default",o;n?o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):o=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),o);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}async function Yg(e){let t=[],r=await yF(e,t);return await ry(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await mF(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await hF(e,e.pagesDir,t)),t}async function Qg(e){let t=[];return await ry(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await fF(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await gF(e,e.pagesDir,t)),t}async function fF(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"figma-imports",n);if(!await e.exists(o)){let s=await e.formatCode(o,ey({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Xg(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function mF(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"[...page]",n);if(!await e.exists(o)){let s=await e.formatCode(o,ey({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Xg(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function Xg(e){let t=e.typescriptEnabled;return e.sdkVersion===q.gen2?`
315
+ ${e}`),e}function Hg(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function Br(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let o=Ug(e,r),s=Ug(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Ug(e,t){let r=t.properties.find(n=>ye(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}async function qg(e){let t=await e.readFile(e.registryPath);return t?nF(e,t):{components:[],sourceFile:se(e,"")}}async function nF(e,t){let r=se(e,t);return e.sdkVersion===q.gen2?iF(e,r):oF(e,r)}async function oF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isCallExpression(p)){let d=e.ts.isIdentifier(p.expression)&&p.expression.text;if(d==="withChildren"){let m=il(e,p.arguments[0]);if(e.ts.isCallExpression(m)){let f=await nl(e,n,m,l,!0);f&&r.push(f)}else{let f=m;if(e.ts.isIdentifier(f)){let g=await ol(e,t,n,f,l,!0);g&&r.push(g)}}continue}if(d==="dynamic"){let m=await nl(e,n,p,l,!1);m&&r.push(m);continue}let h=il(e,p.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let m=await nl(e,n,h,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(h)){let m=await ol(e,t,n,h,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(p)){let d=await ol(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:Ft(r)}}function il(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:il(e,t.arguments[0]):t}async function nl(e,t,r,n,o){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:o,framework:"react"},i=r.arguments;if(i.length===0)return null;let a=i[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let p=l.text,d=await Oo(e,p);s.filePath=d,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(d)?s.importPath=Ee(e,s.filePath):(s.externalImportPath=p,s.importPath=s.externalImportPath),s.name=tr(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let p=l.expression;if(!e.ts.isCallExpression(p)||p.expression.kind!==e.ts.SyntaxKind.ImportKeyword||p.arguments.length!==1)return null;let h=p.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(u.name))return null;let m=h.text,f=await Oo(e,m);s.filePath=f,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(f)?s.importPath=Ee(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=Se(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=$t(e,s,n),s.displayFilePath=ge(e,s.filePath),s.filePath&&s.exportName&&(s.id=await we(e,s.filePath,s.exportName,s.externalImportPath)),s}async function ol(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await Oo(e,c.text);i.filePath=l,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(l)?i.importPath=Ee(e,i.filePath):(i.externalImportPath=c.text,i.importPath=i.externalImportPath),i.name=tr(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await Oo(e,l.text);i.filePath=p,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(p)?i.importPath=Ee(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Se(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=$t(e,i,o),i.displayFilePath=ge(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function Oo(e,t){return zi(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function Kg(e,t,r){let n=!1,o=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){o=c;continue}if(!e.ts.isExpressionStatement(l))continue;let p=l.expression;if(!e.ts.isCallExpression(p))continue;let d=p.expression;if(!e.ts.isPropertyAccessExpression(d))continue;let h=d.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(d.name.text=="init"){n=!0;break}else continue}if(n)return t;let i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(Or)),a=r?e.ts.factory.createNonNullExpression(i):i,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(o+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function iF(e,t){let r=[],n=We(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await sl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function sl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ro(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(ye(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let h=u.arguments;if(h.length===0)return null;let m=h[0];if(!e.ts.isArrowFunction(m))return null;let f=m.body;if(e.ts.isCallExpression(f)){if(f.expression.kind!==e.ts.SyntaxKind.ImportKeyword||f.arguments.length!==1)return null;let y=f.arguments[0];if(!e.ts.isStringLiteral(y))return null;let b=y.text,w=await Oo(e,b);n.filePath=w,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(w)?n.importPath=Ee(e,n.filePath):(n.externalImportPath=b,n.importPath=n.externalImportPath),n.name=tr(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(f)){let g=f.expression;if(!e.ts.isParenthesizedExpression(g))return null;let y=g.expression;if(!e.ts.isAwaitExpression(y))return null;let b=y.expression;if(!e.ts.isCallExpression(b)||b.expression.kind!==e.ts.SyntaxKind.ImportKeyword||b.arguments.length!==1)return null;let T=b.arguments[0];if(!e.ts.isStringLiteral(T)||!e.ts.isIdentifier(f.name))return null;let E=T.text,F=await Oo(e,E);n.filePath=F,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(F)?n.importPath=Ee(e,n.filePath):(n.externalImportPath=E,n.importPath=n.externalImportPath),n.name=Se(f.name.text),n.importName=f.name.text,n.exportName=f.name.text,n.exportType="named"}else return null;return n=$t(e,n,r),n.displayFilePath=ge(e,n.filePath),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Se(a)),n.importName=a;let c=await Mr(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Ee(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=Ee(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}function zr(e,t){let r=[...t.statements],n=!1;for(let o=t.statements.length-1;o>=0;o--){let s=t.statements[o];if(e.ts.isImportDeclaration(s)&&s.importClause){let i=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let p=l.name;if(p&&e.ts.isIdentifier(p)){let d=p.text;Gg(e,t,d)||u.splice(c,1)}}}if(u.length===0)i=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[o]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;Gg(e,t,u)||(i=!0)}i&&(r.splice(o,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function Gg(e,t,r){let n=!1;function o(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,o)}}return e.ts.forEachChild(t,o),n}function jr(e,t,r,n,o,s,i){let a=null,u=null,c=null,l=-1;t=Ht(t),r=Ht(r);let p=t.find(h=>h.id===e),d=r.find(h=>h.id===e);if(n)d||(a={...Ht(p),inputs:Ht(p.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof d?.nodeIndex=="number"&&d.nodeIndex>-1){if(o)l=d.nodeIndex,u=Ht(d),r=r.filter(h=>h.id!==e);else if(s!=null)sF(d,s),l=d.nodeIndex,c=d;else if(i!=null){let h=d.inputs.find(m=>m.name===i.name);h&&(i.registerInput===!1?h.isRegistered=!1:(aF(h,i),h.isRegistered=!0),c=d,l=d.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:wr(t,r)}}function wr(e,t){let r=Ft([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(o=>o.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(Xc),n.inputs.sort((i,a)=>i.name.toLowerCase().localeCompare(a.name.toLowerCase()));let o=t.find(i=>i.id===n.id);o&&(o.acceptsChildren=Qc(n));let s=e.find(i=>i.id===n.id&&i.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function sF(e,t){xt(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),xt(t.description)?e.description=t.description:t.description===null&&delete e.description,xt(t.image)?e.image=t.image:t.image===null&&delete e.image}function aF(e,t){xt(t.type)&&(e.type=t.type),xt(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,xt(t.defaultValue)||Ri(t.defaultValue)||xo(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,xt(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}async function Pn(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await Ye(e,[...t])}function Ur(e,t,r){return $o(e,t,r.variableName)?t:uF(e,t,r)}function uF(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,o=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,o),i=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],i),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}async function Vr(e,t,r,n,o,s,i,a){let u=await Pn(e),[c,l,p,d]=await Promise.all([zg(e,u),qg(e),St(e),Mi(e)]),h=c.map(w=>w.cmpInfo),m=l.components,f={components:wr(h,m),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Io(e,f.components),f;let g=!1,y=l.sourceFile,b=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(b.length>0){let w=b.map(F=>{let $=c.find(I=>I.cmpInfo.id===F);if(!$)throw new Error(`Component ${F} not found`);return $}),T=Array.from(new Set(w.map(F=>F.cmpInfo.filePath))),E=await Ye(e,T);for(let F of w){let $=f.components.find(v=>v.id===F.cmpInfo.id),I=await No(e,F,E,e.registryPath===F.cmpInfo.filePath||er(F.cmpInfo.filePath));Kt($,I);let k=h.findIndex(v=>v.id===F.cmpInfo.id);h[k].inputs=I;let R=jr(F.cmpInfo.id,h,m,r,n,o,s);if(e.sdkVersion===q.gen2){let{elements:v,elmIndex:z,statementIndex:V,statement:K,variableDeclaration:x}=await pF(e,y,F);if(R.addCmpToRegistry)v.push(lF(e,R.addCmpToRegistry)),g=!0;else if(R.removeCmpFromRegistry)v.splice(z,1),g=!0;else if(R.updateRegisteredCmp){let _=Qe(e,v[z],R.updateRegisteredCmp);v[z]=e.ts.factory.updateObjectLiteralExpression(_,[Zg(e,R.updateRegisteredCmp),..._.properties.slice(1)]),g=!0}if(g&&i){let _=[...y.statements];_[V]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,v)))])),y=e.ts.factory.updateSourceFile(y,_),y=Wg(e,R,y),y=ce(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=R.components,m=R.components.filter(je=>je.isRegistered)}}else{let v=[...y.statements];R.addCmpToRegistry?(v.push($g(e,R.addCmpToRegistry)),g=!0):R.removeCmpFromRegistry?(v.splice(R.nodeIndex,1),g=!0):R.updateRegisteredCmp&&(v[R.nodeIndex]=el(e,v[R.nodeIndex],R.updateRegisteredCmp),g=!0),g&&i&&(y=e.ts.factory.updateSourceFile(y,v),y=ce(e,y,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),y=Kg(e,y,p),y=Wg(e,R,y),$?.acceptsChildren&&(y=ce(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=R.components,m=R.components.filter(z=>z.isRegistered))}}}if(g&&i){y=zr(e,y),y=Lr(e,y),e.appDir&&(y=Hg(e,y));let w=et(e,y);w=Cr(w),e.appDir&&(w=Vg(w)),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return f}function Zg(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",dF(e,t))}function cF(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function lF(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([Zg(e,t),...t.acceptsChildren?[cF(e)]:[]],!0),t)}async function pF(e,t,r){let n=We(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await sl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function Wg(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:ae(e,e.registryPath,n.filePath);n.exportType==="default"?r=ce(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ce(e,r,{namedImports:[n.importName],importPath:o}))}}else r=ce(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function dF(e,t){let r=t.externalImportPath?t.externalImportPath:ae(e,e.registryPath,t.filePath),n=t.exportName!=="default",o;n?o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):o=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),o);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}async function Yg(e){let t=[],r=await yF(e,t);return await ry(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await mF(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await hF(e,e.pagesDir,t)),t}async function Qg(e){let t=[];return await ry(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await fF(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await gF(e,e.pagesDir,t)),t}async function fF(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"figma-imports",n);if(!await e.exists(o)){let s=await e.formatCode(o,ey({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Xg(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function mF(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"[...page]",n);if(!await e.exists(o)){let s=await e.formatCode(o,ey({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Xg(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function Xg(e){let t=e.typescriptEnabled;return e.sdkVersion===q.gen2?`
316
316
  "use client";
317
317
  import { ${t?"BuilderContent, ":""} isPreviewing, Content } from "@builder.io/sdk-react";
318
318
  import DefaultErrorPage from "next/error";
@@ -671,13 +671,13 @@ export default Counter;
671
671
  export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
672
672
  ];`:`export const CUSTOM_COMPONENTS = [
673
673
  ];
674
- `}async function Mo(e){let t=await xn(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return q.gen2;if(r.has("@builder.io/react"))return q.gen1}return null}async function ny(e){let t=await CF(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>Yg(t),ensureFigmaImportPage:()=>Qg(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Vr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Vr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Vr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Vr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Vr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Vr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Mi(t),setPublicApiKey:n=>_g(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===q.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function CF(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await wF(e),o=await St(e),s=e.getFrameworks().find(c=>c.name==="next"),i={asyncParams:s?.version?.major!==void 0&&s.version.major>=15},a={},u={...e,addExternalPackage:c=>{a[e.join(t,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>a[c]??e.readFileSync(c),existsSync:c=>!!a[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},appDir:null,pagesDir:null,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",nextConfigPath:n,typescriptEnabled:o,features:i};if(e.sdkVersion?u.sdkVersion=e.sdkVersion:u.sdkVersion=await Mo(u),await e.exists(r)){u.srcDir=r,u.componentsDir=e.join(r,"components");let c=e.join(r,"app");await e.exists(c)&&(u.appDir=c);let l=e.join(r,"pages");await e.exists(l)&&(u.pagesDir=l),u.registryPath=await Rt(e,r)}else u.componentsDir=e.join(t,"components"),u.registryPath=await Rt(e,t);if(u.builderComponentPath=e.join(u.componentsDir,`builder.${o?"tsx":"jsx"}`),!u.appDir){let c=e.join(t,"app");await e.exists(c)&&(u.appDir=c)}if(!u.pagesDir){let c=e.join(t,"pages");await e.exists(c)&&(u.pagesDir=c)}if(!u.appDir&&!u.pagesDir&&!e.ignoreMissingConfig)throw new Error(`Could not find Next.js "app" or "pages" directory. Searched in "${t}".`);return u}async function wF(e){let t=e.join(e.getAppRootDir(),"next.config.ts");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"next.config.mjs");if(await e.exists(r))return r;let n=e.join(e.getAppRootDir(),"next.config.js");if(await e.exists(n))return n;throw new Error(`Could not find Next.js config file. Searched for "next.config.ts", "next.config.mjs" and "next.config.js" in "${e.getAppRootDir()}".`)}async function ji(e){return await Ir(e,[".env"],iy)}async function oy(e,t){bF(t);let r=await ji(e),n=await Nr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}function bF(e){typeof process<"u"&&(process.env[iy]=e)}var iy="PUBLIC_BUILDER_API_KEY";function sy(e,t,r){if(r.length===0)return e;let n=e.split(`
674
+ `}async function Mo(e){let t=await Sn(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return q.gen2;if(r.has("@builder.io/react"))return q.gen1}return null}async function ny(e){let t=await CF(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>Yg(t),ensureFigmaImportPage:()=>Qg(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Vr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Vr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Vr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Vr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Vr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Vr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Mi(t),setPublicApiKey:n=>_g(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===q.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function CF(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await wF(e),o=await St(e),s=e.getFrameworks().find(c=>c.name==="next"),i={asyncParams:s?.version?.major!==void 0&&s.version.major>=15},a={},u={...e,addExternalPackage:c=>{a[e.join(t,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>a[c]??e.readFileSync(c),existsSync:c=>!!a[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},appDir:null,pagesDir:null,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",nextConfigPath:n,typescriptEnabled:o,features:i};if(e.sdkVersion?u.sdkVersion=e.sdkVersion:u.sdkVersion=await Mo(u),await e.exists(r)){u.srcDir=r,u.componentsDir=e.join(r,"components");let c=e.join(r,"app");await e.exists(c)&&(u.appDir=c);let l=e.join(r,"pages");await e.exists(l)&&(u.pagesDir=l),u.registryPath=await Rt(e,r)}else u.componentsDir=e.join(t,"components"),u.registryPath=await Rt(e,t);if(u.builderComponentPath=e.join(u.componentsDir,`builder.${o?"tsx":"jsx"}`),!u.appDir){let c=e.join(t,"app");await e.exists(c)&&(u.appDir=c)}if(!u.pagesDir){let c=e.join(t,"pages");await e.exists(c)&&(u.pagesDir=c)}if(!u.appDir&&!u.pagesDir&&!e.ignoreMissingConfig)throw new Error(`Could not find Next.js "app" or "pages" directory. Searched in "${t}".`);return u}async function wF(e){let t=e.join(e.getAppRootDir(),"next.config.ts");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"next.config.mjs");if(await e.exists(r))return r;let n=e.join(e.getAppRootDir(),"next.config.js");if(await e.exists(n))return n;throw new Error(`Could not find Next.js config file. Searched for "next.config.ts", "next.config.mjs" and "next.config.js" in "${e.getAppRootDir()}".`)}async function ji(e){return await Ir(e,[".env"],iy)}async function oy(e,t){bF(t);let r=await ji(e),n=await Nr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}function bF(e){typeof process<"u"&&(process.env[iy]=e)}var iy="PUBLIC_BUILDER_API_KEY";function sy(e,t,r){if(r.length===0)return e;let n=e.split(`
675
675
  `),o=n.findIndex(a=>a.includes(r));if(o===-1||n.some(a=>a.includes(t[0])))return e;let i=["/**",...t.map(a=>` * ${a.trim()}`)," */"];return n.splice(o,0,...i),n.join(`
676
676
  `)}async function uy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(i.startsWith(".")||EF.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await La(e,o,a,s);r.push(...u)})),r}async function cy(e,t){if(e.extname(t).toLowerCase()===".tsx"){let n=await e.readFile(t);if(n)return xF(e,t,n)}return null}function xF(e,t,r){let n=se(e,r);return La(e,null,t,n)}async function La(e,t,r,n){r=e.normalize(r);let o=[],s=Yn(e,n);return await Promise.all(s.map(async i=>{let a=await SF(e,t,r,i);a&&o.push(a)})),o}async function SF(e,t,r,n){let o=e.relative(e.getAppRootDir(),r),s=Ee(e,r);if(e.ts.isVariableStatement(n.node))for(let i of n.node.declarationList.declarations){let a=ay(e,i.initializer);if(a&&e.ts.isIdentifier(i.name)){let u=i.name.text;return{cmpInfo:{id:await we(e,r,u),displayFilePath:ge(e,r),name:Se(u),inputs:[],exportName:n.isDefaultExport?"default":u,exportType:n.isDefaultExport?"default":"named",importName:u,filePath:r,relFilePath:o,importPath:s,framework:"qwik"},node:a}}}else if(e.ts.isCallExpression(n.node)){let i=ay(e,n.node);if(i)return{cmpInfo:{id:await we(e,r,"default"),displayFilePath:ge(e,r),name:tr(e,r),inputs:[],exportName:"default",exportType:"default",importName:Gn(e,r),filePath:r,relFilePath:o,importPath:s,framework:"qwik"},node:i}}return null}function ay(e,t){if(t&&e.ts.isCallExpression(t)&&e.ts.isIdentifier(t.expression)&&t.expression.text==="component$"&&t.arguments.length>0){let r=t.arguments[0];if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))return{callExpression:t,fnNode:r}}return null}var EF=new Set(["node_modules","layout.tsx","404.tsx","router-head.tsx"]);async function ly(e,t){let r=t.node.fnNode;if((e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))&&r.parameters.length>0){let{sourceFile:o,typeChecker:s}=await Eo(e,t.cmpInfo.filePath,null);if(!(await La(e,s,t.cmpInfo.filePath,o)).find(u=>u.cmpInfo.id===t.cmpInfo.id))throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return Jn(e,s,r)}return[]}async function py(e){return al(e)}async function al(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,_F),t.push({filePath:e.registryPath,modifiedType:"create"})),t}var _F=`import type { RegisteredComponent } from "@builder.io/sdk-qwik";
677
677
 
678
678
  export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
679
679
  ];
680
- `;async function dy(e){await al(e);let t=await e.readFile(e.registryPath);return t?PF(e,t):{components:[],sourceFile:se(e,"")}}async function PF(e,t){let r=se(e,t);return TF(e,r)}async function TF(e,t){let r=[],n=Ge(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await ul(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function ul(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(ye(e,o)==="component"&&e.ts.isIdentifier(o.initializer)){let i=o.initializer.text;n.name===""&&(n.name=Se(i)),n.importName=i;let a=await Mr(e,e.registryPath,t,i);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=Ee(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await cy(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===i);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName)),n}async function fy(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await Ye(e,[...t])}async function Qn(e,t,r,n,o,s,i,a){let u=await fy(e),[c,l,p]=await Promise.all([uy(e,u),dy(e),ji(e)]),d=c.map(f=>f.cmpInfo),h=l.components,m={components:wr(d,h),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m;if(t!=null){let f=c.find(R=>R.cmpInfo.id===t);if(!f)throw new Error(`Component ${t} not found`);let g=l.sourceFile,y=m.components.find(R=>R.id===t),b=await ly(e,f);Kt(y,b),t=Array.isArray(t)?t[0]:t;let w=jr(t,d,h,r,n,o,s),{elements:T,elmIndex:E,statementIndex:F,statement:$,variableDeclaration:I}=await FF(e,g,f),k=!1;if(w.addCmpToRegistry?(T.push(AF(e,w.addCmpToRegistry)),k=!0):w.removeCmpFromRegistry?(T.splice(E,1),k=!0):w.updateRegisteredCmp&&(T[E]=Qe(e,T[E],w.updateRegisteredCmp),k=!0),k&&i){let R=[...g.statements];R[F]=e.ts.factory.updateVariableStatement($,$.modifiers,e.ts.factory.updateVariableDeclarationList($.declarationList,[e.ts.factory.updateVariableDeclaration(I,I.name,I.exclamationToken,I.type,e.ts.factory.createArrayLiteralExpression(Br(e,T)))])),g=e.ts.factory.updateSourceFile(g,R),y.exportType==="named"?g=ce(e,g,{namedImports:[y.importName],importPath:ae(e,e.registryPath,y.filePath)}):g=ce(e,g,{defaultImport:y.importName,importPath:ae(e,e.registryPath,y.filePath)}),g=ce(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),g=Ur(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g=zr(e,g),g=Lr(e,g);let v=et(e,g);v=Cr(v),v=sy(v,RF,"CUSTOM_COMPONENTS"),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}m.components=w.components}return m}function AF(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function FF(e,t,r){let n=Ge(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await ul(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var RF=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"];async function my(e){let t=await $F(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>py(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>Qn(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let o=await Qn(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Qn(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Qn(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Qn(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Qn(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>ji(t),setPublicApiKey:n=>oy(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function $F(e){let t=await $i(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await Rt(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}async function Ui(e){return await Ir(e,[".env"],Vi)}async function hy(e,t){let r=await Ui(e),n=await Nr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Vi="PUBLIC_BUILDER_KEY";var kF=new Set(["dist","node_modules"]);async function gy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async i=>{let a=e.basename(i.fileName);if(a.startsWith(".")||a==="node_modules"||Ea(e,kF,i.fileName)||IF.has(a)||a.includes("$."))return;let u=e.normalize(i.fileName);if(u===e.remixConfigPath||u===s)return;let c=await En(e,o,u,i,u===e.registryPath);r.push(...c)})),r}var IF=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"]);async function yy(e){await Ba(e);let t=await e.readFile(e.registryPath);return t?NF(e,t):{components:[],sourceFile:se(e,"")}}async function NF(e,t){let r=se(e,t);return OF(e,r)}async function OF(e,t){let r=[],n=Ge(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await cl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function cl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===q.gen2&&Ro(e,r)&&(n.acceptsChildren=!0);for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(ye(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(i=l.text)}if(!i)continue;n.name===""&&(n.name=Se(i)),n.importName=i;let u=await Mr(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Ee(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Mg(e,u.filePath,e.registryPath===u.filePath||er(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Hr(e,t,r,n,o,s,i,a){let u=await _n(e),[c,l,p]=await Promise.all([gy(e,u),yy(e),Ui(e)]),d=c.map(b=>b.cmpInfo),h=l.components,m={components:wr(d,h),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Io(e,m.components),m;let f=!1,g=l.sourceFile,y=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(y.length>0){let b=y.map(E=>{let F=c.find($=>$.cmpInfo.id===E);if(!F)throw new Error(`Component ${E} not found`);return F}),w=Array.from(new Set(b.map(E=>E.cmpInfo.filePath))),T=await Ye(e,w);for(let E of b){let F=m.components.find(x=>x.id===E.cmpInfo.id),$=await No(e,E,T,e.registryPath===E.cmpInfo.filePath||er(E.cmpInfo.filePath));Kt(F,$);let I=d.findIndex(x=>x.id===E.cmpInfo.id);d[I].inputs=$;let k=jr(E.cmpInfo.id,d,h,r,n,o,s),{elements:R,elmIndex:v,statementIndex:z,statement:V,variableDeclaration:K}=await LF(e,g,E);if(k.addCmpToRegistry)R.push(MF(e,k.addCmpToRegistry)),f=!0;else if(k.removeCmpFromRegistry)R.splice(v,1),f=!0;else if(k.updateRegisteredCmp){let x=Qe(e,R[v],k.updateRegisteredCmp);R[v]=e.ts.factory.updateObjectLiteralExpression(x,[Dy(e,k.updateRegisteredCmp),...x.properties.slice(1)]),f=!0}if(f&&i){let x=[...g.statements];x[z]=e.ts.factory.updateVariableStatement(V,V.modifiers,e.ts.factory.updateVariableDeclarationList(V.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),g=e.ts.factory.updateSourceFile(g,x),F.exportType==="named"?g=ce(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)}):g=ce(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)});let _=e.sdkVersion===q.gen2?"@builder.io/sdk-react":"@builder.io/react";g=ce(e,g,{namedImports:["RegisteredComponent"],importPath:_,isTypeOnly:!0}),F.acceptsChildren&&e.sdkVersion!==q.gen2&&(g=ce(e,g,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g=Ur(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=k.components,h=k.components.filter(je=>je.isRegistered)}}}if(f&&i){g=zr(e,g),g=Lr(e,g);let b=et(e,g);b=Cr(b),b=await e.formatCode(e.registryPath,b),await e.writeFile(e.registryPath,b)}return m}function Dy(e,t){if(e.sdkVersion===q.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function MF(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([Dy(e,t),...t.acceptsChildren&&e.sdkVersion===q.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function LF(e,t,r){let n=Ge(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await cl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}async function vy(e){let t=[],r=await jF(e,t);return t.push(...await Ba(e)),await VF(e,r),await zF(e,t),t}async function Cy(e){let t=[];return t.push(...await Ba(e)),await BF(e,t),t}async function BF(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${o}`);let s=await e.formatCode(n,wy({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}async function zF(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===q.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${o}`);let s=await e.formatCode(n,wy({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}function wy({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=ae(e,t,e.registryPath),s="",i="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",i=": LoaderArgs");let a=`process.env.${Vi}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${Vi}`,u=", context"),n&&(a+="!"),e.sdkVersion===q.gen2?`
680
+ `;async function dy(e){await al(e);let t=await e.readFile(e.registryPath);return t?PF(e,t):{components:[],sourceFile:se(e,"")}}async function PF(e,t){let r=se(e,t);return TF(e,r)}async function TF(e,t){let r=[],n=We(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await ul(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function ul(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(ye(e,o)==="component"&&e.ts.isIdentifier(o.initializer)){let i=o.initializer.text;n.name===""&&(n.name=Se(i)),n.importName=i;let a=await Mr(e,e.registryPath,t,i);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=Ee(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await cy(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===i);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName)),n}async function fy(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await Ye(e,[...t])}async function Qn(e,t,r,n,o,s,i,a){let u=await fy(e),[c,l,p]=await Promise.all([uy(e,u),dy(e),ji(e)]),d=c.map(f=>f.cmpInfo),h=l.components,m={components:wr(d,h),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m;if(t!=null){let f=c.find(R=>R.cmpInfo.id===t);if(!f)throw new Error(`Component ${t} not found`);let g=l.sourceFile,y=m.components.find(R=>R.id===t),b=await ly(e,f);Kt(y,b),t=Array.isArray(t)?t[0]:t;let w=jr(t,d,h,r,n,o,s),{elements:T,elmIndex:E,statementIndex:F,statement:$,variableDeclaration:I}=await FF(e,g,f),k=!1;if(w.addCmpToRegistry?(T.push(AF(e,w.addCmpToRegistry)),k=!0):w.removeCmpFromRegistry?(T.splice(E,1),k=!0):w.updateRegisteredCmp&&(T[E]=Qe(e,T[E],w.updateRegisteredCmp),k=!0),k&&i){let R=[...g.statements];R[F]=e.ts.factory.updateVariableStatement($,$.modifiers,e.ts.factory.updateVariableDeclarationList($.declarationList,[e.ts.factory.updateVariableDeclaration(I,I.name,I.exclamationToken,I.type,e.ts.factory.createArrayLiteralExpression(Br(e,T)))])),g=e.ts.factory.updateSourceFile(g,R),y.exportType==="named"?g=ce(e,g,{namedImports:[y.importName],importPath:ae(e,e.registryPath,y.filePath)}):g=ce(e,g,{defaultImport:y.importName,importPath:ae(e,e.registryPath,y.filePath)}),g=ce(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),g=Ur(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g=zr(e,g),g=Lr(e,g);let v=et(e,g);v=Cr(v),v=sy(v,RF,"CUSTOM_COMPONENTS"),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}m.components=w.components}return m}function AF(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function FF(e,t,r){let n=We(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await ul(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var RF=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"];async function my(e){let t=await $F(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>py(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>Qn(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let o=await Qn(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Qn(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Qn(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Qn(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Qn(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>ji(t),setPublicApiKey:n=>oy(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function $F(e){let t=await $i(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await Rt(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}async function Ui(e){return await Ir(e,[".env"],Vi)}async function hy(e,t){let r=await Ui(e),n=await Nr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Vi="PUBLIC_BUILDER_KEY";var kF=new Set(["dist","node_modules"]);async function gy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async i=>{let a=e.basename(i.fileName);if(a.startsWith(".")||a==="node_modules"||Ea(e,kF,i.fileName)||IF.has(a)||a.includes("$."))return;let u=e.normalize(i.fileName);if(u===e.remixConfigPath||u===s)return;let c=await _n(e,o,u,i,u===e.registryPath);r.push(...c)})),r}var IF=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"]);async function yy(e){await Ba(e);let t=await e.readFile(e.registryPath);return t?NF(e,t):{components:[],sourceFile:se(e,"")}}async function NF(e,t){let r=se(e,t);return OF(e,r)}async function OF(e,t){let r=[],n=We(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await cl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function cl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===q.gen2&&Ro(e,r)&&(n.acceptsChildren=!0);for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(ye(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(i=l.text)}if(!i)continue;n.name===""&&(n.name=Se(i)),n.importName=i;let u=await Mr(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Ee(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Mg(e,u.filePath,e.registryPath===u.filePath||er(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Hr(e,t,r,n,o,s,i,a){let u=await Pn(e),[c,l,p]=await Promise.all([gy(e,u),yy(e),Ui(e)]),d=c.map(b=>b.cmpInfo),h=l.components,m={components:wr(d,h),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Io(e,m.components),m;let f=!1,g=l.sourceFile,y=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(y.length>0){let b=y.map(E=>{let F=c.find($=>$.cmpInfo.id===E);if(!F)throw new Error(`Component ${E} not found`);return F}),w=Array.from(new Set(b.map(E=>E.cmpInfo.filePath))),T=await Ye(e,w);for(let E of b){let F=m.components.find(x=>x.id===E.cmpInfo.id),$=await No(e,E,T,e.registryPath===E.cmpInfo.filePath||er(E.cmpInfo.filePath));Kt(F,$);let I=d.findIndex(x=>x.id===E.cmpInfo.id);d[I].inputs=$;let k=jr(E.cmpInfo.id,d,h,r,n,o,s),{elements:R,elmIndex:v,statementIndex:z,statement:V,variableDeclaration:K}=await LF(e,g,E);if(k.addCmpToRegistry)R.push(MF(e,k.addCmpToRegistry)),f=!0;else if(k.removeCmpFromRegistry)R.splice(v,1),f=!0;else if(k.updateRegisteredCmp){let x=Qe(e,R[v],k.updateRegisteredCmp);R[v]=e.ts.factory.updateObjectLiteralExpression(x,[Dy(e,k.updateRegisteredCmp),...x.properties.slice(1)]),f=!0}if(f&&i){let x=[...g.statements];x[z]=e.ts.factory.updateVariableStatement(V,V.modifiers,e.ts.factory.updateVariableDeclarationList(V.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),g=e.ts.factory.updateSourceFile(g,x),F.exportType==="named"?g=ce(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)}):g=ce(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)});let _=e.sdkVersion===q.gen2?"@builder.io/sdk-react":"@builder.io/react";g=ce(e,g,{namedImports:["RegisteredComponent"],importPath:_,isTypeOnly:!0}),F.acceptsChildren&&e.sdkVersion!==q.gen2&&(g=ce(e,g,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g=Ur(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=k.components,h=k.components.filter(je=>je.isRegistered)}}}if(f&&i){g=zr(e,g),g=Lr(e,g);let b=et(e,g);b=Cr(b),b=await e.formatCode(e.registryPath,b),await e.writeFile(e.registryPath,b)}return m}function Dy(e,t){if(e.sdkVersion===q.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function MF(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([Dy(e,t),...t.acceptsChildren&&e.sdkVersion===q.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function LF(e,t,r){let n=We(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await cl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}async function vy(e){let t=[],r=await jF(e,t);return t.push(...await Ba(e)),await VF(e,r),await zF(e,t),t}async function Cy(e){let t=[];return t.push(...await Ba(e)),await BF(e,t),t}async function BF(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${o}`);let s=await e.formatCode(n,wy({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}async function zF(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===q.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${o}`);let s=await e.formatCode(n,wy({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}function wy({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=ae(e,t,e.registryPath),s="",i="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",i=": LoaderArgs");let a=`process.env.${Vi}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${Vi}`,u=", context"),n&&(a+="!"),e.sdkVersion===q.gen2?`
681
681
 
682
682
  import {
683
683
  Content,
@@ -860,7 +860,7 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
860
860
  `,r+=` {
861
861
  name: "${t.name}",
862
862
  }
863
- `,r+=");";let n=Sa(e,r);return ll(e,n,t)}function ll(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Qe(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}async function Ey(e){let t=await e.readFile(e.registryPath);return t?ZF(e,t):{components:[],sourceFile:se(e,"")}}async function ZF(e,t){let r=se(e,t);return e.sdkVersion===q.gen2?QF(e,r):JF(e,r)}async function JF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isIdentifier(p)){let d=await YF(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:Ft(r)}}async function YF(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;i.filePath=await pl(e,c.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),i.importPath=Ee(e,i.filePath),i.name=tr(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await pl(e,l.text);i.filePath=await pl(e,l.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(p)?i.importPath=Ee(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Se(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=$t(e,i,o),i.displayFilePath=ge(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function pl(e,t){return zi(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function QF(e,t){let r=[],n=Ge(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await dl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function dl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ro(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(ye(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Se(a)),n.importName=a;let c=await Mr(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Ee(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}async function qr(e,t,r,n,o,s,i,a){let u=await _n(e),[c,l,p,d]=await Promise.all([Lg(e,u),Ey(e),St(e),Hi(e)]),h=c.map(w=>w.cmpInfo),m=l.components,f={components:wr(h,m),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Io(e,f.components),f;let g=!1,y=l.sourceFile,b=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(b.length>0){let w=b.map(F=>{let $=c.find(I=>I.cmpInfo.id===F);if(!$)throw new Error(`Component ${F} not found`);return $}),T=Array.from(new Set(w.map(F=>F.cmpInfo.filePath))),E=await Ye(e,T);for(let F of w){let $=f.components.find(v=>v.id===F.cmpInfo.id),I=await No(e,F,E,e.registryPath===F.cmpInfo.filePath||er(F.cmpInfo.filePath));Kt($,I);let k=h.findIndex(v=>v.id===F.cmpInfo.id);h[k].inputs=I;let R=jr(F.cmpInfo.id,h,m,r,n,o,s);if(e.sdkVersion===q.gen2){let{elements:v,elmIndex:z,statementIndex:V,statement:K,variableDeclaration:x}=await XF(e,y,F);if(R.addCmpToRegistry)v.push(eR(e,R.addCmpToRegistry)),g=!0;else if(R.removeCmpFromRegistry)v.splice(z,1),g=!0;else if(R.updateRegisteredCmp){let _=Qe(e,v[z],R.updateRegisteredCmp),je=e.ts.factory.createIdentifier(R.updateRegisteredCmp.importName);v[z]=e.ts.factory.updateObjectLiteralExpression(_,[e.ts.factory.createPropertyAssignment("component",je),..._.properties.slice(1)]),g=!0}if(g&&i){let _=[...y.statements];_[V]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,v)))])),y=e.ts.factory.updateSourceFile(y,_),y=_y(e,R,y),y=ce(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=R.components,m=R.components.filter(je=>je.isRegistered)}}else{let v=[...y.statements];R.addCmpToRegistry?(v.push(Sy(e,R.addCmpToRegistry)),g=!0):R.removeCmpFromRegistry?(v.splice(R.nodeIndex,1),g=!0):R.updateRegisteredCmp&&(v[R.nodeIndex]=ll(e,v[R.nodeIndex],R.updateRegisteredCmp),g=!0),g&&i&&(y=e.ts.factory.updateSourceFile(y,v),y=ce(e,y,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),y=_y(e,R,y),$?.acceptsChildren&&(y=ce(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=R.components,m=R.components.filter(z=>z.isRegistered))}}}if(g&&i){y=zr(e,y),y=Lr(e,y);let w=et(e,y);w=Cr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return f}async function XF(e,t,r){let n=Ge(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await dl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function eR(e,t){let r=e.ts.factory.createIdentifier(t.importName);return Qe(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",r),...t.acceptsChildren?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}function _y(e,t,r){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:ae(e,e.registryPath,n.filePath);n.exportType==="default"?r=ce(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ce(e,r,{namedImports:[n.importName],importPath:o}))}return r}async function Py(e){let t=[],r=await tR(e,t);if(await Fy(e,t,r),!await e.exists(e.builderComponentPath)){let n=await e.formatCode(e.builderComponentPath,Ay(e,e.builderComponentPath));await e.writeFile(e.builderComponentPath,n),t.push({filePath:e.builderComponentPath,modifiedType:"create"})}return t}async function Ty(e){let t=[];await Fy(e,t);let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,n=e.join(e.componentsDir,r);if(!await e.exists(n)){let o=await e.formatCode(n,Ay(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}function Ay(e,t,r="page"){let n=e.typescriptEnabled;return e.sdkVersion===q.gen2?`
863
+ `,r+=");";let n=Sa(e,r);return ll(e,n,t)}function ll(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Qe(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}async function Ey(e){let t=await e.readFile(e.registryPath);return t?ZF(e,t):{components:[],sourceFile:se(e,"")}}async function ZF(e,t){let r=se(e,t);return e.sdkVersion===q.gen2?QF(e,r):JF(e,r)}async function JF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isIdentifier(p)){let d=await YF(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:Ft(r)}}async function YF(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;i.filePath=await pl(e,c.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),i.importPath=Ee(e,i.filePath),i.name=tr(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await pl(e,l.text);i.filePath=await pl(e,l.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(p)?i.importPath=Ee(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Se(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=$t(e,i,o),i.displayFilePath=ge(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function pl(e,t){return zi(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function QF(e,t){let r=[],n=We(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await dl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function dl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ro(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(ye(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Se(a)),n.importName=a;let c=await Mr(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Ee(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}async function qr(e,t,r,n,o,s,i,a){let u=await Pn(e),[c,l,p,d]=await Promise.all([Lg(e,u),Ey(e),St(e),Hi(e)]),h=c.map(w=>w.cmpInfo),m=l.components,f={components:wr(h,m),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Io(e,f.components),f;let g=!1,y=l.sourceFile,b=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(b.length>0){let w=b.map(F=>{let $=c.find(I=>I.cmpInfo.id===F);if(!$)throw new Error(`Component ${F} not found`);return $}),T=Array.from(new Set(w.map(F=>F.cmpInfo.filePath))),E=await Ye(e,T);for(let F of w){let $=f.components.find(v=>v.id===F.cmpInfo.id),I=await No(e,F,E,e.registryPath===F.cmpInfo.filePath||er(F.cmpInfo.filePath));Kt($,I);let k=h.findIndex(v=>v.id===F.cmpInfo.id);h[k].inputs=I;let R=jr(F.cmpInfo.id,h,m,r,n,o,s);if(e.sdkVersion===q.gen2){let{elements:v,elmIndex:z,statementIndex:V,statement:K,variableDeclaration:x}=await XF(e,y,F);if(R.addCmpToRegistry)v.push(eR(e,R.addCmpToRegistry)),g=!0;else if(R.removeCmpFromRegistry)v.splice(z,1),g=!0;else if(R.updateRegisteredCmp){let _=Qe(e,v[z],R.updateRegisteredCmp),je=e.ts.factory.createIdentifier(R.updateRegisteredCmp.importName);v[z]=e.ts.factory.updateObjectLiteralExpression(_,[e.ts.factory.createPropertyAssignment("component",je),..._.properties.slice(1)]),g=!0}if(g&&i){let _=[...y.statements];_[V]=e.ts.factory.updateVariableStatement(K,K.modifiers,e.ts.factory.updateVariableDeclarationList(K.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,v)))])),y=e.ts.factory.updateSourceFile(y,_),y=_y(e,R,y),y=ce(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=R.components,m=R.components.filter(je=>je.isRegistered)}}else{let v=[...y.statements];R.addCmpToRegistry?(v.push(Sy(e,R.addCmpToRegistry)),g=!0):R.removeCmpFromRegistry?(v.splice(R.nodeIndex,1),g=!0):R.updateRegisteredCmp&&(v[R.nodeIndex]=ll(e,v[R.nodeIndex],R.updateRegisteredCmp),g=!0),g&&i&&(y=e.ts.factory.updateSourceFile(y,v),y=ce(e,y,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),y=_y(e,R,y),$?.acceptsChildren&&(y=ce(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=R.components,m=R.components.filter(z=>z.isRegistered))}}}if(g&&i){y=zr(e,y),y=Lr(e,y);let w=et(e,y);w=Cr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return f}async function XF(e,t,r){let n=We(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await dl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function eR(e,t){let r=e.ts.factory.createIdentifier(t.importName);return Qe(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",r),...t.acceptsChildren?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}function _y(e,t,r){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:ae(e,e.registryPath,n.filePath);n.exportType==="default"?r=ce(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ce(e,r,{namedImports:[n.importName],importPath:o}))}return r}async function Py(e){let t=[],r=await tR(e,t);if(await Fy(e,t,r),!await e.exists(e.builderComponentPath)){let n=await e.formatCode(e.builderComponentPath,Ay(e,e.builderComponentPath));await e.writeFile(e.builderComponentPath,n),t.push({filePath:e.builderComponentPath,modifiedType:"create"})}return t}async function Ty(e){let t=[];await Fy(e,t);let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,n=e.join(e.componentsDir,r);if(!await e.exists(n)){let o=await e.formatCode(n,Ay(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}function Ay(e,t,r="page"){let n=e.typescriptEnabled;return e.sdkVersion===q.gen2?`
864
864
  import React from "react";
865
865
  import {
866
866
  Content,
@@ -1183,7 +1183,7 @@ export class Counter {
1183
1183
  }
1184
1184
  }
1185
1185
 
1186
- `.trimStart()}async function tD(e){await Wa(e);let t=await e.readFile(e.registryPath);return t?MR(e,t):{components:[],sourceFile:se(e,"")}}async function MR(e,t){let r=se(e,t);return LR(e,r)}async function LR(e,t){let r=[],n=Ge(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Sl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function Sl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(ye(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(i=c.text)}if(!i)continue;n.name===""&&(n.name=Se(i)),n.importName=i;let u=await Mr(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Ee(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Iy(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Kr(e,t,r,n,o,s,i,a){let u=await _n(e),[c,l,p]=await Promise.all([ky(e,u),tD(e),Ki(e)]),d=c.map(b=>b.cmpInfo),h=l.components,m={components:wr(d,h),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Ny(e,c,m.components),m;let f=!1,g=l.sourceFile,y=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(y.length>0){let b=y.map(E=>{let F=c.find($=>$.cmpInfo.id===E);if(!F)throw new Error(`Component ${E} not found`);return F}),w=Array.from(new Set(b.map(E=>E.cmpInfo.filePath))),T=await Ye(e,w);for(let E of b){let F=m.components.find(x=>x.id===E.cmpInfo.id),$=await ml(e,E,T);Kt(F,$);let I=d.findIndex(x=>x.id===E.cmpInfo.id);d[I].inputs=$;let k=jr(E.cmpInfo.id,d,h,r,n,o,s),{elements:R,elmIndex:v,statementIndex:z,statement:V,variableDeclaration:K}=await zR(e,g,E);if(k.addCmpToRegistry)R.push(BR(e,k.addCmpToRegistry)),f=!0;else if(k.removeCmpFromRegistry)R.splice(v,1),f=!0;else if(k.updateRegisteredCmp){let x=Qe(e,R[v],k.updateRegisteredCmp);R[v]=e.ts.factory.updateObjectLiteralExpression(x,[rD(e,k.updateRegisteredCmp),...x.properties.slice(1)]),f=!0}if(f&&i){let x=[...g.statements];x[z]=e.ts.factory.updateVariableStatement(V,V.modifiers,e.ts.factory.updateVariableDeclarationList(V.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),g=e.ts.factory.updateSourceFile(g,x),F.exportType==="named"?g=ce(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)}):g=ce(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)}),g=ce(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),g=Ur(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=k.components,h=k.components.filter(_=>_.isRegistered)}}}if(f&&i){g=zr(e,g),g=Lr(e,g);let b=et(e,g);b=Cr(b),b=await e.formatCode(e.registryPath,b),await e.writeFile(e.registryPath,b)}return m}function rD(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function BR(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([rD(e,t)],!0),t)}async function zR(e,t,r){let n=Ge(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Sl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}async function nD(e){let t=await jR(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>Qy(t),ensureFigmaImportPage:()=>Xy(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Kr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Kr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Kr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Kr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Kr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Kr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ki(t),setPublicApiKey:n=>Ry(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function jR(e){let t=await UR(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await St(e),s=e.join(n,"app"),i=await Rt(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:i,angularConfigPath:t,typescriptEnabled:o,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:p=>{a[e.join(r,p,"index.ts")]=`export * from "${p}";`},readFileSync:p=>a[p]??e.readFileSync(p),existsSync:p=>!!a[p]||e.existsSync(p),readdirSync:p=>{let d=e.readdirSync(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d},readdir:async p=>{let d=await e.readdir(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${o?"ts":"js"}`);let c=`app.module.${o?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function UR(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}async function Zi(e){let t=e.configType==="vite"?VR:HR;return await Ir(e,[".env"],t)}async function oD(e,t){let r=await Zi(e),n=await Nr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var VR="VITE_PUBLIC_BUILDER_KEY",HR="PUBLIC_BUILDER_KEY";async function sD(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let o=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",i=WR(s),a=KR(n,r),u=qR(n);return{id:ZR(t),name:i,filePath:o,relFilePath:o,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:i,importPath:o,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function qR(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function KR(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...El(l)):r.push(...iD(l))}}let o=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=o.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...El(c))}else{let c=u.slice(1,-1);r.push(...iD(c))}}let i=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=i.exec(e))!==null;)a[1]&&r.push(...El(a[1]));return GR(r)}function El(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,i,a]=n;t.push({name:i.trim(),type:_l(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let o=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=o.exec(e))!==null;){let[,i,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:i.trim(),type:u?_l(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,i,a]=n;t.some(u=>u.name===i.trim())||t.push({name:i.trim(),type:_l(a.trim()),required:!1})}return t}function iD(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function _l(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function GR(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function WR(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function ZR(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}async function to(e,t){let r=await JR(e,t.readAllInputTypes),n=await Zi(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function JR(e,t){let r=[],n=await YR(e,e.getAppRootDir());for(let o of n){let s=await sD(e,o,t);s&&r.push(s)}return r}async function YR(e,t){let r=[],n=async s=>{try{let i=await e.readdir(s);for(let a of i){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let o=["components","pages","layouts"];for(let s of o){let i=e.join(t,s);try{(await e.stat(i)).isDirectory()&&await n(i)}catch{}}return r}async function aD(e){let t={errors:[]};try{await cD(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function uD(e){let t=[];t.push(...await cD(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let o=await e.formatCode(n,QR(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}async function cD(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,e$(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function QR(e,t,r="page"){let n=ae(e,t,e.registryPath),o=e.typescriptEnabled;return e.isNuxt?`<template>
1186
+ `.trimStart()}async function tD(e){await Wa(e);let t=await e.readFile(e.registryPath);return t?MR(e,t):{components:[],sourceFile:se(e,"")}}async function MR(e,t){let r=se(e,t);return LR(e,r)}async function LR(e,t){let r=[],n=We(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Sl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:Ft(r)}}async function Sl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(ye(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(i=c.text)}if(!i)continue;n.name===""&&(n.name=Se(i)),n.importName=i;let u=await Mr(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Ee(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Iy(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=$t(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Kr(e,t,r,n,o,s,i,a){let u=await Pn(e),[c,l,p]=await Promise.all([ky(e,u),tD(e),Ki(e)]),d=c.map(b=>b.cmpInfo),h=l.components,m={components:wr(d,h),registryPath:e.registryPath,registryDisplayPath:ge(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Ny(e,c,m.components),m;let f=!1,g=l.sourceFile,y=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(y.length>0){let b=y.map(E=>{let F=c.find($=>$.cmpInfo.id===E);if(!F)throw new Error(`Component ${E} not found`);return F}),w=Array.from(new Set(b.map(E=>E.cmpInfo.filePath))),T=await Ye(e,w);for(let E of b){let F=m.components.find(x=>x.id===E.cmpInfo.id),$=await ml(e,E,T);Kt(F,$);let I=d.findIndex(x=>x.id===E.cmpInfo.id);d[I].inputs=$;let k=jr(E.cmpInfo.id,d,h,r,n,o,s),{elements:R,elmIndex:v,statementIndex:z,statement:V,variableDeclaration:K}=await zR(e,g,E);if(k.addCmpToRegistry)R.push(BR(e,k.addCmpToRegistry)),f=!0;else if(k.removeCmpFromRegistry)R.splice(v,1),f=!0;else if(k.updateRegisteredCmp){let x=Qe(e,R[v],k.updateRegisteredCmp);R[v]=e.ts.factory.updateObjectLiteralExpression(x,[rD(e,k.updateRegisteredCmp),...x.properties.slice(1)]),f=!0}if(f&&i){let x=[...g.statements];x[z]=e.ts.factory.updateVariableStatement(V,V.modifiers,e.ts.factory.updateVariableDeclarationList(V.declarationList,[e.ts.factory.updateVariableDeclaration(K,K.name,K.exclamationToken,K.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),g=e.ts.factory.updateSourceFile(g,x),F.exportType==="named"?g=ce(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)}):g=ce(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:ae(e,e.registryPath,F.filePath)}),g=ce(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),g=Ur(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=k.components,h=k.components.filter(_=>_.isRegistered)}}}if(f&&i){g=zr(e,g),g=Lr(e,g);let b=et(e,g);b=Cr(b),b=await e.formatCode(e.registryPath,b),await e.writeFile(e.registryPath,b)}return m}function rD(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function BR(e,t){return Qe(e,e.ts.factory.createObjectLiteralExpression([rD(e,t)],!0),t)}async function zR(e,t,r){let n=We(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Sl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}async function nD(e){let t=await jR(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>Qy(t),ensureFigmaImportPage:()=>Xy(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Kr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Kr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Kr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Kr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Kr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Kr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ki(t),setPublicApiKey:n=>Ry(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function jR(e){let t=await UR(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await St(e),s=e.join(n,"app"),i=await Rt(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:i,angularConfigPath:t,typescriptEnabled:o,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:p=>{a[e.join(r,p,"index.ts")]=`export * from "${p}";`},readFileSync:p=>a[p]??e.readFileSync(p),existsSync:p=>!!a[p]||e.existsSync(p),readdirSync:p=>{let d=e.readdirSync(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d},readdir:async p=>{let d=await e.readdir(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${o?"ts":"js"}`);let c=`app.module.${o?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function UR(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}async function Zi(e){let t=e.configType==="vite"?VR:HR;return await Ir(e,[".env"],t)}async function oD(e,t){let r=await Zi(e),n=await Nr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var VR="VITE_PUBLIC_BUILDER_KEY",HR="PUBLIC_BUILDER_KEY";async function sD(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let o=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",i=WR(s),a=KR(n,r),u=qR(n);return{id:ZR(t),name:i,filePath:o,relFilePath:o,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:i,importPath:o,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function qR(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function KR(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...El(l)):r.push(...iD(l))}}let o=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=o.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...El(c))}else{let c=u.slice(1,-1);r.push(...iD(c))}}let i=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=i.exec(e))!==null;)a[1]&&r.push(...El(a[1]));return GR(r)}function El(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,i,a]=n;t.push({name:i.trim(),type:_l(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let o=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=o.exec(e))!==null;){let[,i,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:i.trim(),type:u?_l(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,i,a]=n;t.some(u=>u.name===i.trim())||t.push({name:i.trim(),type:_l(a.trim()),required:!1})}return t}function iD(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function _l(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function GR(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function WR(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function ZR(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}async function to(e,t){let r=await JR(e,t.readAllInputTypes),n=await Zi(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:sr(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function JR(e,t){let r=[],n=await YR(e,e.getAppRootDir());for(let o of n){let s=await sD(e,o,t);s&&r.push(s)}return r}async function YR(e,t){let r=[],n=async s=>{try{let i=await e.readdir(s);for(let a of i){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let o=["components","pages","layouts"];for(let s of o){let i=e.join(t,s);try{(await e.stat(i)).isDirectory()&&await n(i)}catch{}}return r}async function aD(e){let t={errors:[]};try{await cD(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function uD(e){let t=[];t.push(...await cD(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let o=await e.formatCode(n,QR(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}async function cD(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,e$(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function QR(e,t,r="page"){let n=ae(e,t,e.registryPath),o=e.typescriptEnabled;return e.isNuxt?`<template>
1187
1187
  <div>
1188
1188
  <div v-if="pending">Loading...</div>
1189
1189
  <div v-else-if="error">Error loading content</div>
@@ -1289,13 +1289,13 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
1289
1289
  // ]
1290
1290
  // }
1291
1291
  ];
1292
- `}async function lD(e){let t=await t$(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await aD(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>uD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>to(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await to(t,{readAllInputTypes:!1}),s=o.components.find(i=>i.id===n.cmpId);return{...o,component:s}},registerComponent:async n=>to(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>to(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>to(t,{readAllInputTypes:!1}),unregisterComponent:async n=>to(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Zi(t),setPublicApiKey:n=>oD(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===q.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function t$(e){let t=await r$(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await St(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:o,configType:"",isNuxt:await n$(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l}};t.includes("webpack.config")&&(i.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(i.configType="vite");let a=await e.exists(n);i.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){i.componentsDir=c;break}return i.componentsDir||(i.componentsDir=a?e.join(n,"components"):e.join(r,"components")),i.registryPath=await Rt(e,i.componentsDir),i}async function r$(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function n$(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),o={...n.dependencies,...n.devDependencies};return!!(o.nuxt||o["@nuxt/kit"]||o.nuxt3)}}catch{}return!1}var Qa=H(xD(),1);async function SD(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let i={filePath:Dr(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Ht(s.inputs)};return Ht(i)}),version:1};e.debug("exporting registry components:",n.components.length);let o=(0,Qa.compress)(n);return btoa(JSON.stringify(o))}async function ED(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),o=JSON.parse(atob(r)),s=(0,Qa.decompress)(o),i=Ht(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=Dr(e.normalize(a.filePath)),c=n.components.find(p=>Dr(p.filePath).endsWith(u)&&p.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let p of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:p.name,type:p.type,required:p.required,defaultValue:p.defaultValue,friendlyName:p.friendlyName,helperText:p.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});i=Ht(l)}return i}var kt={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue",native:"native"},gq={[kt.react]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}],[kt.remix]:[{version:q.gen1,recommended:!1},{version:q.gen2,recommended:!0}],[kt.angular]:[{version:q.gen2,recommended:!0}],[kt.next]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}],[kt.qwik]:[{version:q.gen2,recommended:!0}],[kt.vue]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}]};async function _D(e,t){let r=[],n=new Set;async function o(s){let i=e.join(s,"package.json");try{if(!await e.exists(i))return null;let u=await e.readFile(i);if(u===null)throw new Error(`Failed to read package.json at ${i}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},p=await e.readdir(s);for(let d of p)d!=="node_modules"&&(await e.stat(e.join(s,d))).isDirectory()&&l.subPackages.push(d);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let p=e.join(t,"node_modules",l);await o(p)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let p=await e.readdir(e.join(t,l));for(let d of p){let h=e.join(t,l,d);await o(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var P$={"@builder.io/qwik-city":my,next:ny,"@remix-run/react":by,react:fl,"@angular/core":nD,vue:lD,native:fl},T$={"@builder.io/qwik-city":kt.qwik,next:kt.next,"@remix-run/react":kt.remix,react:kt.react,"@angular/core":kt.angular,vue:kt.vue,native:kt.native};async function Xa(e,t=!1){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await _o(e)),e.frameworks.length===0&&t&&e.frameworks.push({name:"native"}),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let r of e.frameworks){let n=P$[r.name];if(n)try{let o=await n(e);return{...o,exportRegistry:()=>SD(e,o),importRegistry:i=>ED(e,o,i),framework:T$[r.name],findAllDependencies:async()=>await _D(e,e.getRepoRootDir())}}catch(o){e.Sentry?.captureException(o,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var fK=`
1292
+ `}async function lD(e){let t=await t$(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await aD(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>uD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>to(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await to(t,{readAllInputTypes:!1}),s=o.components.find(i=>i.id===n.cmpId);return{...o,component:s}},registerComponent:async n=>to(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>to(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>to(t,{readAllInputTypes:!1}),unregisterComponent:async n=>to(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Zi(t),setPublicApiKey:n=>oD(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===q.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>or(t),setCache:n=>ir(t,n)}}async function t$(e){let t=await r$(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await St(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:o,configType:"",isNuxt:await n$(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l}};t.includes("webpack.config")&&(i.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(i.configType="vite");let a=await e.exists(n);i.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){i.componentsDir=c;break}return i.componentsDir||(i.componentsDir=a?e.join(n,"components"):e.join(r,"components")),i.registryPath=await Rt(e,i.componentsDir),i}async function r$(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function n$(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),o={...n.dependencies,...n.devDependencies};return!!(o.nuxt||o["@nuxt/kit"]||o.nuxt3)}}catch{}return!1}var Qa=H(xD(),1);async function SD(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let i={filePath:Dr(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Ht(s.inputs)};return Ht(i)}),version:1};e.debug("exporting registry components:",n.components.length);let o=(0,Qa.compress)(n);return btoa(JSON.stringify(o))}async function ED(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),o=JSON.parse(atob(r)),s=(0,Qa.decompress)(o),i=Ht(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=Dr(e.normalize(a.filePath)),c=n.components.find(p=>Dr(p.filePath).endsWith(u)&&p.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let p of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:p.name,type:p.type,required:p.required,defaultValue:p.defaultValue,friendlyName:p.friendlyName,helperText:p.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});i=Ht(l)}return i}var kt={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue",native:"native"},yq={[kt.react]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}],[kt.remix]:[{version:q.gen1,recommended:!1},{version:q.gen2,recommended:!0}],[kt.angular]:[{version:q.gen2,recommended:!0}],[kt.next]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}],[kt.qwik]:[{version:q.gen2,recommended:!0}],[kt.vue]:[{version:q.gen1,recommended:!0},{version:q.gen2,recommended:!1}]};async function _D(e,t){let r=[],n=new Set;async function o(s){let i=e.join(s,"package.json");try{if(!await e.exists(i))return null;let u=await e.readFile(i);if(u===null)throw new Error(`Failed to read package.json at ${i}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},p=await e.readdir(s);for(let d of p)d!=="node_modules"&&(await e.stat(e.join(s,d))).isDirectory()&&l.subPackages.push(d);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let p=e.join(t,"node_modules",l);await o(p)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let p=await e.readdir(e.join(t,l));for(let d of p){let h=e.join(t,l,d);await o(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var P$={"@builder.io/qwik-city":my,next:ny,"@remix-run/react":by,react:fl,"@angular/core":nD,vue:lD,native:fl},T$={"@builder.io/qwik-city":kt.qwik,next:kt.next,"@remix-run/react":kt.remix,react:kt.react,"@angular/core":kt.angular,vue:kt.vue,native:kt.native};async function Xa(e,t=!1){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await _o(e)),e.frameworks.length===0&&t&&e.frameworks.push({name:"native"}),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let r of e.frameworks){let n=P$[r.name];if(n)try{let o=await n(e);return{...o,exportRegistry:()=>SD(e,o),importRegistry:i=>ED(e,o,i),framework:T$[r.name],findAllDependencies:async()=>await _D(e,e.getRepoRootDir())}}catch(o){e.Sentry?.captureException(o,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var mK=`
1293
1293
  /** @type {import('next').NextConfig} */
1294
1294
  const nextConfig = {
1295
1295
  }
1296
1296
 
1297
1297
  module.exports = nextConfig
1298
- `.trimStart();var PD=H(require("@sentry/node"),1),TD=H(require("@amplitude/analytics-node"),1);async function pn(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([PD.flush(2e3),TD.flush().promise])}catch(t){console.error(t)}process.exit(e)}var Fn=process.env.AIR_HOST||"https://api.builder.io";var zo=H(require("@amplitude/analytics-node"),1),Qi=H(require("@sentry/node"),1);var st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function AD(e,t=0){return(st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]).toLowerCase()}var FD=H(require("node:crypto")),tu=new Uint8Array(256),eu=tu.length;function Ul(){return eu>tu.length-16&&(FD.default.randomFillSync(tu),eu=0),tu.slice(eu,eu+=16)}var RD=H(require("node:crypto")),Vl={randomUUID:RD.default.randomUUID};function A$(e,t,r){if(Vl.randomUUID&&!t&&!e)return Vl.randomUUID();e=e||{};let n=e.random||(e.rng||Ul)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return AD(n)}var Hl=A$;var Rn=class extends Error{},ve=class extends Rn{constructor({type:r,cause:n,message:o,suggestions:s=[],hostname:i,port:a,statusCode:u,errorCode:c}){super(o,{cause:n});Je(this,"type");Je(this,"suggestions");Je(this,"hostname");Je(this,"port");Je(this,"statusCode");Je(this,"errorCode");this.name="NetworkError",this.type=r,this.suggestions=s,this.hostname=i,this.port=a,this.statusCode=u,this.errorCode=c}},ru=process.platform==="win32",F$=process.platform==="darwin";function R$(e){return ru?`tracert ${e}`:`traceroute ${e}`}function $$(){return F$?"sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder":ru?"ipconfig /flushdns":"sudo systemd-resolve --flush-caches"}function k$(e,t){return ru?`Test-NetConnection -ComputerName ${e} -Port ${t}`:`nc -zv ${e} ${t}`}function I$(e){return ru?`nslookup ${e}`:`dig ${e}`}function N$(e,t){return`openssl s_client -connect ${e}:${t} -showcerts`}var O$=new Set(["DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN"]),M$=new Set(["UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","INVALID_CA","CERT_SIGNATURE_FAILURE","CERT_REVOKED","CERT_REJECTED","CERT_UNTRUSTED","CERT_CHAIN_TOO_LONG","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","UNABLE_TO_DECRYPT_CERT_SIGNATURE","HOSTNAME_MISMATCH","ERR_TLS_CERT_ALTNAME_INVALID"]),L$=new Set(["CERT_HAS_EXPIRED","ERROR_IN_CERT_NOT_AFTER_FIELD"]),B$=new Set(["CERT_NOT_YET_VALID","ERROR_IN_CERT_NOT_BEFORE_FIELD"]),z$=new Set(["CRL_HAS_EXPIRED","CRL_NOT_YET_VALID","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD"]),j$=new Set(["ERR_TLS_INVALID_PROTOCOL_VERSION","ERR_TLS_INVALID_PROTOCOL_METHOD","ERR_TLS_PROTOCOL_VERSION_CONFLICT","ERR_TLS_INVALID_STATE","ERR_TLS_INVALID_CONTEXT","ERR_TLS_RENEGOTIATION_DISABLED","ERR_TLS_REQUIRED_SERVER_NAME","ERR_TLS_SESSION_ATTACK","ERR_TLS_SNI_FROM_SERVER","ERR_TLS_DH_PARAM_SIZE","ERR_SSL_WRONG_VERSION_NUMBER","EPROTO"]),U$=new Set(["ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_HANDSHAKE_FAILURE"]),V$=new Set(["CRYPT_E_NO_REVOCATION_CHECK","CRYPT_E_REVOCATION_OFFLINE","CRYPT_E_NO_REVOCATION_DLL","CRYPT_E_NOT_IN_REVOCATION_DATABASE","UNABLE_TO_GET_CRL","CRL_SIGNATURE_FAILURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE"]),H$=new Set(["ERR_PROXY_INVALID_CONFIG","ERR_PROXY_TUNNEL","ERR_TUNNEL_CONNECTION_FAILED"]),q$=new Set(["ENETUNREACH","EHOSTUNREACH","ENETDOWN","ENONET"]);function ql(e,t,r){let n=e.code,o=`${t}${r?`:${r}`:""}`;if(n==="ECONNREFUSED"){let s=r||443;return new ve({type:"connection_refused",cause:e,message:`Connection refused to ${o}. The server may be down or not accepting connections on this port.`,suggestions:["Verify the server is running and accepting connections",`Test if the port is reachable: ${k$(t,s)}`,"Check if a firewall is blocking the connection","Ensure the correct port number is being used","If using a proxy, verify proxy settings are correct","Try again in a few minutes - the service may be temporarily unavailable"],hostname:t,port:r,errorCode:n})}if(n==="ECONNRESET")return new ve({type:"connection_reset",cause:e,message:`Connection to ${o} was reset. The server closed the connection unexpectedly.`,suggestions:["The server may have restarted or timed out - try again","Check if a proxy or firewall is terminating connections","If behind a corporate network, the connection may be blocked","Verify network stability - intermittent connectivity can cause resets","If using keep-alive connections, the server may have closed an idle connection"],hostname:t,port:r,errorCode:n});if(n==="ECONNABORTED")return new ve({type:"connection_aborted",cause:e,message:`Connection to ${o} was aborted before completing.`,suggestions:["The request may have been interrupted - try again","Check for network instability or packet loss","If using a proxy, verify the proxy is functioning correctly","The server may have terminated the connection early"],hostname:t,port:r,errorCode:n});if(n==="ETIMEDOUT"||n==="ESOCKETTIMEDOUT"||n==="ERR_SOCKET_CONNECTION_TIMEOUT"||n==="ERR_HTTP_REQUEST_TIMEOUT")return new ve({type:"connection_timeout",cause:e,message:`Connection to ${o} timed out. The server did not respond in time.`,suggestions:["Check your internet connection speed and stability","The server may be overloaded - try again in a few minutes","If behind a proxy, ensure the proxy is not causing delays","Corporate firewalls may be slowing or blocking the connection","Try using a different network (e.g., mobile hotspot) to isolate the issue"],hostname:t,port:r,errorCode:n});if(n==="ENOTFOUND"||n==="EAI_AGAIN")return new ve({type:"dns_not_found",cause:e,message:`Cannot resolve hostname '${t}'. DNS lookup failed.`,suggestions:["Check your internet connection","Verify the hostname is spelled correctly",`Test DNS resolution: ${I$(t)}`,"Try using a different DNS server (e.g., 8.8.8.8 or 1.1.1.1)","If on a VPN, try disconnecting and reconnecting",`Flush your DNS cache: ${$$()}`],hostname:t,errorCode:n});if(n&&O$.has(n)){let s=r||443;return new ve({type:"ssl_self_signed",cause:e,message:`SSL certificate error: The server at ${o} is using a self-signed certificate that is not trusted.`,suggestions:["If on a corporate network, add your company's CA certificate:"," \u2192 npm config set cafile /path/to/company-cert.pem"," \u2192 Or set NODE_EXTRA_CA_CERTS=/path/to/company-cert.pem","For Node.js 22+, use --use-system-ca flag if the CA is installed in your system",`Inspect the certificate: ${N$(t,s)}`,"Contact your IT department to get the corporate root CA certificate","If this is your server, consider using Let's Encrypt for free valid certificates","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n})}if(n&&L$.has(n))return new ve({type:"ssl_certificate_expired",cause:e,message:`SSL certificate error: The certificate for ${o} has expired.`,suggestions:["Contact the server administrator to renew the SSL certificate","Check if your system clock is set correctly - incorrect time can cause certificate errors","If this is your server, renew the certificate immediately","This may indicate a security issue - proceed with caution"],hostname:t,port:r,errorCode:n});if(n&&B$.has(n))return new ve({type:"ssl_certificate_not_yet_valid",cause:e,message:`SSL certificate error: The certificate for ${o} is not yet valid. The certificate's validity period has not started yet.`,suggestions:["Check if your system clock is set correctly - this is the most common cause","Verify your system date and time are accurate","If the clock is correct, wait until the certificate becomes valid","Contact the server administrator - they may have deployed a certificate too early"],hostname:t,port:r,errorCode:n});if(n&&z$.has(n)){let s=n==="CRL_HAS_EXPIRED",i=n==="CRL_NOT_YET_VALID";return new ve({type:"ssl_certificate_invalid",cause:e,message:`SSL error: The Certificate Revocation List (CRL) for ${o} ${s?"has expired":i?"is not yet valid":"has invalid date fields"}. This means the revocation list is stale, not that the certificate itself has expired.`,suggestions:["This is often a server-side configuration issue - the server needs to update its CRL","Check if your system clock is set correctly - incorrect time can cause CRL validation errors","If behind a corporate proxy, the proxy may be caching an outdated CRL","Try again later - the server administrator may need to refresh the CRL","If on a corporate network, contact your IT department","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n})}if(n&&M$.has(n))return new ve({type:"ssl_certificate_invalid",cause:e,message:`SSL certificate error: The certificate for ${o} could not be verified. ${K$(n)}`,suggestions:["If on a corporate network, add your company's CA certificate:"," \u2192 npm config set cafile /path/to/company-cert.pem"," \u2192 Or set NODE_EXTRA_CA_CERTS=/path/to/company-cert.pem","For Node.js 22+, use --use-system-ca flag if certificates are installed in your system","The server may be missing intermediate certificates in its chain","If behind a corporate proxy, contact IT for the proxy's root CA certificate","Verify you're connecting to the correct server (check for DNS hijacking)","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n});if(n&&U$.has(n))return new ve({type:"ssl_handshake_failed",cause:e,message:`SSL/TLS handshake with ${o} failed. Could not establish a secure connection.`,suggestions:["The server may be temporarily unavailable - try again","Check if a proxy or firewall is intercepting HTTPS traffic","Your corporate network may require specific certificates to be installed","The server may require a specific TLS version your client doesn't support","Try connecting from a different network to isolate the issue"],hostname:t,port:r,errorCode:n});if(n&&V$.has(n)){let s=n==="CRYPT_E_REVOCATION_OFFLINE";return new ve({type:"ssl_certificate_invalid",cause:e,message:`Certificate revocation check failed for ${o}. ${s?"The revocation server is offline.":"Unable to verify certificate revocation status."}`,suggestions:["This is often a temporary issue - try again in a few minutes","The certificate revocation server (CRL/OCSP) may be unreachable","If on a corporate network, add your company's CA certificate:"," \u2192 npm config set cafile /path/to/company-cert.pem","Check if a firewall or proxy is blocking access to revocation servers","Contact your IT department for assistance with certificate configuration","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n})}return n&&j$.has(n)?new ve({type:"ssl_protocol_error",cause:e,message:`SSL/TLS protocol error connecting to ${o}. ${G$(n)}`,suggestions:["The server may require a different TLS version (try TLS 1.2 or 1.3)","If behind a proxy, it may not support modern TLS protocols","Corporate firewalls sometimes downgrade TLS - contact your IT department","The server's SSL configuration may be outdated or misconfigured","Try updating Node.js to get the latest TLS support"],hostname:t,port:r,errorCode:n}):n&&H$.has(n)?new ve({type:"proxy_error",cause:e,message:`Proxy error while connecting to ${o}. The proxy server could not establish a tunnel.`,suggestions:["Verify your proxy settings (HTTP_PROXY, HTTPS_PROXY environment variables)","Check if the proxy server is running and accessible","Ensure the proxy allows connections to the target host","Try bypassing the proxy by adding the host to NO_PROXY","Corporate proxies may require authentication - check credentials","The proxy may be blocking this specific destination"],hostname:t,port:r,errorCode:n}):n&&q$.has(n)?new ve({type:"network_unreachable",cause:e,message:`Cannot reach ${o}. ${n==="EHOSTUNREACH"?"The host":"The network"} is unreachable.`,suggestions:["Check your internet connection is active","If on WiFi, try reconnecting to the network","VPN connection may have dropped - reconnect if using VPN","The destination network may be down or unreachable from your location","Check if a firewall is blocking outbound connections",`Diagnose the route: ${R$(t)}`],hostname:t,port:r,errorCode:n}):n==="EPIPE"?new ve({type:"connection_reset",cause:e,message:`Broken pipe to ${o}. The connection was closed while data was being sent.`,suggestions:["The server closed the connection unexpectedly - try again","Check if the request payload is too large","Network instability may have caused the connection to drop","If using keep-alive, the server may have closed an idle connection"],hostname:t,port:r,errorCode:n}):n==="ERR_SOCKET_BAD_PORT"?new ve({type:"socket_error",cause:e,message:`Invalid port number for ${t}. Port must be a number between 1 and 65535.`,suggestions:["Check your configuration for the correct port number","Ensure the port is a valid integer (1-65535)","Common ports: HTTP (80), HTTPS (443), custom services typically use 3000-9999","If using environment variables, verify they are set correctly"],hostname:t,port:r,errorCode:n}):n==="ERR_SOCKET_CLOSED"||n==="ERR_SOCKET_CLOSED_BEFORE_CONNECTION"?new ve({type:"socket_error",cause:e,message:`Socket closed unexpectedly while connecting to ${o}.`,suggestions:["The connection was closed unexpectedly - try again","Check for network instability","The server may have rejected the connection"],hostname:t,port:r,errorCode:n}):new ve({type:"unknown",cause:e,errorCode:n,message:`Network error connecting to ${o}: ${n?`[${n}] `:""}${e.message}`,suggestions:["Check your internet connection","If behind a proxy, verify proxy settings are correct","Try connecting from a different network","Check if a firewall or antivirus is blocking the connection","Try again in a few minutes - the service may be temporarily unavailable"],hostname:t,port:r})}function K$(e){return{UNABLE_TO_GET_ISSUER_CERT:"The certificate issuer could not be found.",UNABLE_TO_GET_ISSUER_CERT_LOCALLY:"The certificate issuer is not in the local trusted store.",UNABLE_TO_VERIFY_LEAF_SIGNATURE:"The first certificate in the chain could not be verified.",INVALID_CA:"The CA certificate is invalid.",CERT_SIGNATURE_FAILURE:"The certificate signature is invalid.",CERT_REVOKED:"The certificate has been revoked.",CERT_REJECTED:"The certificate was rejected.",CERT_UNTRUSTED:"The certificate is not trusted.",HOSTNAME_MISMATCH:"The certificate hostname does not match the requested hostname.",ERR_TLS_CERT_ALTNAME_INVALID:"The hostname is not in the certificate's subject alternative names."}[e]||""}function G$(e){return{ERR_TLS_INVALID_PROTOCOL_VERSION:"The TLS protocol version is not supported.",ERR_TLS_INVALID_PROTOCOL_METHOD:"The TLS protocol method is invalid.",ERR_TLS_PROTOCOL_VERSION_CONFLICT:"There is a conflict between TLS protocol versions.",EPROTO:"A protocol error occurred during the SSL/TLS handshake.",ERR_SSL_WRONG_VERSION_NUMBER:"SSL version number mismatch.",ERR_TLS_DH_PARAM_SIZE:"The Diffie-Hellman parameters are too small (insecure)."}[e]||""}async function Xi(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await W$(),o=await Z$();return await zo.track(e,r,{user_id:n,device_id:o}).promise}var nu,Kl;async function $D(e){nu=e;let t=await Po();await zc({...t,userId:e})}async function W$(){if(nu)return nu;let e=await Po(),t;return Bc(e,"userId")&&(t=e.userId),nu=t,t}async function Z$(){if(Kl)return Kl;let e=await Po(),t=Hl();return Bc(e,"deviceId")?t=e.deviceId:await zc({...e,deviceId:t}),Kl=t,t}var iu=require("undici");var kD="0.0.0";var ou=H(require("node:process"),1),ID=H(require("@sentry/node"),1);var $n=class extends Error{constructor(r,n,o){super(r,o);Je(this,"code");this.name="CodeGenError",this.code=n}};var Gl;function Y$(){let e=ou.default.env.FUSION_REJECT_UNAUTHORIZED!=="0";return Gl||(Gl=new iu.Agent({connect:{rejectUnauthorized:e}})),Gl}var Gr=async(e,t)=>{let r=new URL(e),n=r.hostname,o=r.port?parseInt(r.port):void 0;try{let s=ID.getTraceData(),i=await(0,iu.fetch)(e,{...t,dispatcher:Y$(),headers:{...t?.headers,...Q$(),...s}});if(!i.ok){if(i.status===402){let a=await i.json(),u=a.code??"credits-limit-daily",c=a.message??"You've reached the DAY AI credits limit for your current plan.";throw new $n(c,u)}else if(i.status===429){let a=await i.json(),u=a.code??"credits-limit-other",c=a.message??"Rate limit exceeded. Please try again later.";throw new $n(c,u)}if(i.status>=500){let a;try{let u=await i.text();if(u)try{let c=JSON.parse(u);a=c.message||c.error||u}catch{a=u}}catch{}throw new ve({type:"server_error",cause:a?new Error(a):void 0,message:`Server error from ${n} (HTTP ${i.status}). The server encountered an internal error.`,suggestions:["Try again in a few minutes - this may be a temporary issue","Contact support if the problem persists"],hostname:n,statusCode:i.status})}}return i}catch(s){if(s instanceof ve||s instanceof $n||s instanceof Error&&s.name==="AbortError")throw s;if(s instanceof Error){if(s.name==="TypeError"&&s.cause instanceof Error){let c=s.cause;if(c.code)throw ql(c,n,o)}if(s.code)throw ql(s,n,o);if(s.message?.includes("SSL")||s.message?.includes("TLS")||s.message?.includes("certificate")||s.message?.includes("CERT"))throw new ve({type:"ssl_certificate_invalid",cause:s,message:`SSL/TLS error connecting to ${n}. The connection could not be secured.`,suggestions:["Check if you're behind a corporate proxy that requires custom certificates","Set NODE_EXTRA_CA_CERTS to include your organization's CA certificate","For Node.js 22+, try the --use-system-ca flag if certificates are installed locally","Try again in a few minutes","Contact support@builder.io if the issue persists"],hostname:n})}let i=t?.method||"GET",a=s instanceof Error?s.message:String(s);throw new ve({type:"unknown",cause:s instanceof Error?s:new Error(String(s)),message:`Network error for ${i} ${r.toString()}: ${a}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:n,port:o})}};function Q$(){let t={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[ou.default.platform]||"Unknown",r=ou.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${t}${r?"; "+r:""}) builder-cli/${kD}`,"Sec-Ch-Ua-Platform":t}}var X$=H(require("@sentry/node"),1);var on=H(Wn(),1);var nk=H(require("chokidar"),1),ok=H(require("ignore"),1);var C=H(Wn(),1);function Jl(e){switch(Xi("cli help",{subcommand:e}),console.log(""),Sn((0,C.bgCyan)((0,C.bold)((0,C.white)(" help ")))+" "+(0,C.dim)(Xt)),e){case"add":case"generate":case"gen":case"g":Sn(`${(0,C.cyan)("\u2192")} ${(0,C.bold)("Generate Figma Components")}
1298
+ `.trimStart();var PD=H(require("@sentry/node"),1),TD=H(require("@amplitude/analytics-node"),1);async function pn(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([PD.flush(2e3),TD.flush().promise])}catch(t){console.error(t)}process.exit(e)}var dn=process.env.AIR_HOST||"https://api.builder.io";var zo=H(require("@amplitude/analytics-node"),1),Qi=H(require("@sentry/node"),1);var st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function AD(e,t=0){return(st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]).toLowerCase()}var FD=H(require("node:crypto")),tu=new Uint8Array(256),eu=tu.length;function Ul(){return eu>tu.length-16&&(FD.default.randomFillSync(tu),eu=0),tu.slice(eu,eu+=16)}var RD=H(require("node:crypto")),Vl={randomUUID:RD.default.randomUUID};function A$(e,t,r){if(Vl.randomUUID&&!t&&!e)return Vl.randomUUID();e=e||{};let n=e.random||(e.rng||Ul)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return AD(n)}var Hl=A$;var Rn=class extends Error{},ve=class extends Rn{constructor({type:r,cause:n,message:o,suggestions:s=[],hostname:i,port:a,statusCode:u,errorCode:c}){super(o,{cause:n});Ge(this,"type");Ge(this,"suggestions");Ge(this,"hostname");Ge(this,"port");Ge(this,"statusCode");Ge(this,"errorCode");this.name="NetworkError",this.type=r,this.suggestions=s,this.hostname=i,this.port=a,this.statusCode=u,this.errorCode=c}},ru=process.platform==="win32",F$=process.platform==="darwin";function R$(e){return ru?`tracert ${e}`:`traceroute ${e}`}function $$(){return F$?"sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder":ru?"ipconfig /flushdns":"sudo systemd-resolve --flush-caches"}function k$(e,t){return ru?`Test-NetConnection -ComputerName ${e} -Port ${t}`:`nc -zv ${e} ${t}`}function I$(e){return ru?`nslookup ${e}`:`dig ${e}`}function N$(e,t){return`openssl s_client -connect ${e}:${t} -showcerts`}var O$=new Set(["DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN"]),M$=new Set(["UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","INVALID_CA","CERT_SIGNATURE_FAILURE","CERT_REVOKED","CERT_REJECTED","CERT_UNTRUSTED","CERT_CHAIN_TOO_LONG","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","UNABLE_TO_DECRYPT_CERT_SIGNATURE","HOSTNAME_MISMATCH","ERR_TLS_CERT_ALTNAME_INVALID"]),L$=new Set(["CERT_HAS_EXPIRED","ERROR_IN_CERT_NOT_AFTER_FIELD"]),B$=new Set(["CERT_NOT_YET_VALID","ERROR_IN_CERT_NOT_BEFORE_FIELD"]),z$=new Set(["CRL_HAS_EXPIRED","CRL_NOT_YET_VALID","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD"]),j$=new Set(["ERR_TLS_INVALID_PROTOCOL_VERSION","ERR_TLS_INVALID_PROTOCOL_METHOD","ERR_TLS_PROTOCOL_VERSION_CONFLICT","ERR_TLS_INVALID_STATE","ERR_TLS_INVALID_CONTEXT","ERR_TLS_RENEGOTIATION_DISABLED","ERR_TLS_REQUIRED_SERVER_NAME","ERR_TLS_SESSION_ATTACK","ERR_TLS_SNI_FROM_SERVER","ERR_TLS_DH_PARAM_SIZE","ERR_SSL_WRONG_VERSION_NUMBER","EPROTO"]),U$=new Set(["ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_HANDSHAKE_FAILURE"]),V$=new Set(["CRYPT_E_NO_REVOCATION_CHECK","CRYPT_E_REVOCATION_OFFLINE","CRYPT_E_NO_REVOCATION_DLL","CRYPT_E_NOT_IN_REVOCATION_DATABASE","UNABLE_TO_GET_CRL","CRL_SIGNATURE_FAILURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE"]),H$=new Set(["ERR_PROXY_INVALID_CONFIG","ERR_PROXY_TUNNEL","ERR_TUNNEL_CONNECTION_FAILED"]),q$=new Set(["ENETUNREACH","EHOSTUNREACH","ENETDOWN","ENONET"]);function ql(e,t,r){let n=e.code,o=`${t}${r?`:${r}`:""}`;if(n==="ECONNREFUSED"){let s=r||443;return new ve({type:"connection_refused",cause:e,message:`Connection refused to ${o}. The server may be down or not accepting connections on this port.`,suggestions:["Verify the server is running and accepting connections",`Test if the port is reachable: ${k$(t,s)}`,"Check if a firewall is blocking the connection","Ensure the correct port number is being used","If using a proxy, verify proxy settings are correct","Try again in a few minutes - the service may be temporarily unavailable"],hostname:t,port:r,errorCode:n})}if(n==="ECONNRESET")return new ve({type:"connection_reset",cause:e,message:`Connection to ${o} was reset. The server closed the connection unexpectedly.`,suggestions:["The server may have restarted or timed out - try again","Check if a proxy or firewall is terminating connections","If behind a corporate network, the connection may be blocked","Verify network stability - intermittent connectivity can cause resets","If using keep-alive connections, the server may have closed an idle connection"],hostname:t,port:r,errorCode:n});if(n==="ECONNABORTED")return new ve({type:"connection_aborted",cause:e,message:`Connection to ${o} was aborted before completing.`,suggestions:["The request may have been interrupted - try again","Check for network instability or packet loss","If using a proxy, verify the proxy is functioning correctly","The server may have terminated the connection early"],hostname:t,port:r,errorCode:n});if(n==="ETIMEDOUT"||n==="ESOCKETTIMEDOUT"||n==="ERR_SOCKET_CONNECTION_TIMEOUT"||n==="ERR_HTTP_REQUEST_TIMEOUT")return new ve({type:"connection_timeout",cause:e,message:`Connection to ${o} timed out. The server did not respond in time.`,suggestions:["Check your internet connection speed and stability","The server may be overloaded - try again in a few minutes","If behind a proxy, ensure the proxy is not causing delays","Corporate firewalls may be slowing or blocking the connection","Try using a different network (e.g., mobile hotspot) to isolate the issue"],hostname:t,port:r,errorCode:n});if(n==="ENOTFOUND"||n==="EAI_AGAIN")return new ve({type:"dns_not_found",cause:e,message:`Cannot resolve hostname '${t}'. DNS lookup failed.`,suggestions:["Check your internet connection","Verify the hostname is spelled correctly",`Test DNS resolution: ${I$(t)}`,"Try using a different DNS server (e.g., 8.8.8.8 or 1.1.1.1)","If on a VPN, try disconnecting and reconnecting",`Flush your DNS cache: ${$$()}`],hostname:t,errorCode:n});if(n&&O$.has(n)){let s=r||443;return new ve({type:"ssl_self_signed",cause:e,message:`SSL certificate error: The server at ${o} is using a self-signed certificate that is not trusted.`,suggestions:["If on a corporate network, add your company's CA certificate:"," \u2192 npm config set cafile /path/to/company-cert.pem"," \u2192 Or set NODE_EXTRA_CA_CERTS=/path/to/company-cert.pem","For Node.js 22+, use --use-system-ca flag if the CA is installed in your system",`Inspect the certificate: ${N$(t,s)}`,"Contact your IT department to get the corporate root CA certificate","If this is your server, consider using Let's Encrypt for free valid certificates","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n})}if(n&&L$.has(n))return new ve({type:"ssl_certificate_expired",cause:e,message:`SSL certificate error: The certificate for ${o} has expired.`,suggestions:["Contact the server administrator to renew the SSL certificate","Check if your system clock is set correctly - incorrect time can cause certificate errors","If this is your server, renew the certificate immediately","This may indicate a security issue - proceed with caution"],hostname:t,port:r,errorCode:n});if(n&&B$.has(n))return new ve({type:"ssl_certificate_not_yet_valid",cause:e,message:`SSL certificate error: The certificate for ${o} is not yet valid. The certificate's validity period has not started yet.`,suggestions:["Check if your system clock is set correctly - this is the most common cause","Verify your system date and time are accurate","If the clock is correct, wait until the certificate becomes valid","Contact the server administrator - they may have deployed a certificate too early"],hostname:t,port:r,errorCode:n});if(n&&z$.has(n)){let s=n==="CRL_HAS_EXPIRED",i=n==="CRL_NOT_YET_VALID";return new ve({type:"ssl_certificate_invalid",cause:e,message:`SSL error: The Certificate Revocation List (CRL) for ${o} ${s?"has expired":i?"is not yet valid":"has invalid date fields"}. This means the revocation list is stale, not that the certificate itself has expired.`,suggestions:["This is often a server-side configuration issue - the server needs to update its CRL","Check if your system clock is set correctly - incorrect time can cause CRL validation errors","If behind a corporate proxy, the proxy may be caching an outdated CRL","Try again later - the server administrator may need to refresh the CRL","If on a corporate network, contact your IT department","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n})}if(n&&M$.has(n))return new ve({type:"ssl_certificate_invalid",cause:e,message:`SSL certificate error: The certificate for ${o} could not be verified. ${K$(n)}`,suggestions:["If on a corporate network, add your company's CA certificate:"," \u2192 npm config set cafile /path/to/company-cert.pem"," \u2192 Or set NODE_EXTRA_CA_CERTS=/path/to/company-cert.pem","For Node.js 22+, use --use-system-ca flag if certificates are installed in your system","The server may be missing intermediate certificates in its chain","If behind a corporate proxy, contact IT for the proxy's root CA certificate","Verify you're connecting to the correct server (check for DNS hijacking)","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n});if(n&&U$.has(n))return new ve({type:"ssl_handshake_failed",cause:e,message:`SSL/TLS handshake with ${o} failed. Could not establish a secure connection.`,suggestions:["The server may be temporarily unavailable - try again","Check if a proxy or firewall is intercepting HTTPS traffic","Your corporate network may require specific certificates to be installed","The server may require a specific TLS version your client doesn't support","Try connecting from a different network to isolate the issue"],hostname:t,port:r,errorCode:n});if(n&&V$.has(n)){let s=n==="CRYPT_E_REVOCATION_OFFLINE";return new ve({type:"ssl_certificate_invalid",cause:e,message:`Certificate revocation check failed for ${o}. ${s?"The revocation server is offline.":"Unable to verify certificate revocation status."}`,suggestions:["This is often a temporary issue - try again in a few minutes","The certificate revocation server (CRL/OCSP) may be unreachable","If on a corporate network, add your company's CA certificate:"," \u2192 npm config set cafile /path/to/company-cert.pem","Check if a firewall or proxy is blocking access to revocation servers","Contact your IT department for assistance with certificate configuration","\u26A0\uFE0F Temporary workaround (not secure): npm config set strict-ssl false"],hostname:t,port:r,errorCode:n})}return n&&j$.has(n)?new ve({type:"ssl_protocol_error",cause:e,message:`SSL/TLS protocol error connecting to ${o}. ${G$(n)}`,suggestions:["The server may require a different TLS version (try TLS 1.2 or 1.3)","If behind a proxy, it may not support modern TLS protocols","Corporate firewalls sometimes downgrade TLS - contact your IT department","The server's SSL configuration may be outdated or misconfigured","Try updating Node.js to get the latest TLS support"],hostname:t,port:r,errorCode:n}):n&&H$.has(n)?new ve({type:"proxy_error",cause:e,message:`Proxy error while connecting to ${o}. The proxy server could not establish a tunnel.`,suggestions:["Verify your proxy settings (HTTP_PROXY, HTTPS_PROXY environment variables)","Check if the proxy server is running and accessible","Ensure the proxy allows connections to the target host","Try bypassing the proxy by adding the host to NO_PROXY","Corporate proxies may require authentication - check credentials","The proxy may be blocking this specific destination"],hostname:t,port:r,errorCode:n}):n&&q$.has(n)?new ve({type:"network_unreachable",cause:e,message:`Cannot reach ${o}. ${n==="EHOSTUNREACH"?"The host":"The network"} is unreachable.`,suggestions:["Check your internet connection is active","If on WiFi, try reconnecting to the network","VPN connection may have dropped - reconnect if using VPN","The destination network may be down or unreachable from your location","Check if a firewall is blocking outbound connections",`Diagnose the route: ${R$(t)}`],hostname:t,port:r,errorCode:n}):n==="EPIPE"?new ve({type:"connection_reset",cause:e,message:`Broken pipe to ${o}. The connection was closed while data was being sent.`,suggestions:["The server closed the connection unexpectedly - try again","Check if the request payload is too large","Network instability may have caused the connection to drop","If using keep-alive, the server may have closed an idle connection"],hostname:t,port:r,errorCode:n}):n==="ERR_SOCKET_BAD_PORT"?new ve({type:"socket_error",cause:e,message:`Invalid port number for ${t}. Port must be a number between 1 and 65535.`,suggestions:["Check your configuration for the correct port number","Ensure the port is a valid integer (1-65535)","Common ports: HTTP (80), HTTPS (443), custom services typically use 3000-9999","If using environment variables, verify they are set correctly"],hostname:t,port:r,errorCode:n}):n==="ERR_SOCKET_CLOSED"||n==="ERR_SOCKET_CLOSED_BEFORE_CONNECTION"?new ve({type:"socket_error",cause:e,message:`Socket closed unexpectedly while connecting to ${o}.`,suggestions:["The connection was closed unexpectedly - try again","Check for network instability","The server may have rejected the connection"],hostname:t,port:r,errorCode:n}):new ve({type:"unknown",cause:e,errorCode:n,message:`Network error connecting to ${o}: ${n?`[${n}] `:""}${e.message}`,suggestions:["Check your internet connection","If behind a proxy, verify proxy settings are correct","Try connecting from a different network","Check if a firewall or antivirus is blocking the connection","Try again in a few minutes - the service may be temporarily unavailable"],hostname:t,port:r})}function K$(e){return{UNABLE_TO_GET_ISSUER_CERT:"The certificate issuer could not be found.",UNABLE_TO_GET_ISSUER_CERT_LOCALLY:"The certificate issuer is not in the local trusted store.",UNABLE_TO_VERIFY_LEAF_SIGNATURE:"The first certificate in the chain could not be verified.",INVALID_CA:"The CA certificate is invalid.",CERT_SIGNATURE_FAILURE:"The certificate signature is invalid.",CERT_REVOKED:"The certificate has been revoked.",CERT_REJECTED:"The certificate was rejected.",CERT_UNTRUSTED:"The certificate is not trusted.",HOSTNAME_MISMATCH:"The certificate hostname does not match the requested hostname.",ERR_TLS_CERT_ALTNAME_INVALID:"The hostname is not in the certificate's subject alternative names."}[e]||""}function G$(e){return{ERR_TLS_INVALID_PROTOCOL_VERSION:"The TLS protocol version is not supported.",ERR_TLS_INVALID_PROTOCOL_METHOD:"The TLS protocol method is invalid.",ERR_TLS_PROTOCOL_VERSION_CONFLICT:"There is a conflict between TLS protocol versions.",EPROTO:"A protocol error occurred during the SSL/TLS handshake.",ERR_SSL_WRONG_VERSION_NUMBER:"SSL version number mismatch.",ERR_TLS_DH_PARAM_SIZE:"The Diffie-Hellman parameters are too small (insecure)."}[e]||""}async function Xi(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await W$(),o=await Z$();return await zo.track(e,r,{user_id:n,device_id:o}).promise}var nu,Kl;async function $D(e){nu=e;let t=await Po();await zc({...t,userId:e})}async function W$(){if(nu)return nu;let e=await Po(),t;return Bc(e,"userId")&&(t=e.userId),nu=t,t}async function Z$(){if(Kl)return Kl;let e=await Po(),t=Hl();return Bc(e,"deviceId")?t=e.deviceId:await zc({...e,deviceId:t}),Kl=t,t}var iu=require("undici");var kD="0.0.0";var ou=H(require("node:process"),1),ID=H(require("@sentry/node"),1);var $n=class extends Error{constructor(r,n,o){super(r,o);Ge(this,"code");this.name="CodeGenError",this.code=n}};var Gl;function Y$(){let e=ou.default.env.FUSION_REJECT_UNAUTHORIZED!=="0";return Gl||(Gl=new iu.Agent({connect:{rejectUnauthorized:e}})),Gl}var Gr=async(e,t)=>{let r=new URL(e),n=r.hostname,o=r.port?parseInt(r.port):void 0;try{let s=ID.getTraceData(),i=await(0,iu.fetch)(e,{...t,dispatcher:Y$(),headers:{...t?.headers,...Q$(),...s}});if(!i.ok){if(i.status===402){let a=await i.json(),u=a.code??"credits-limit-daily",c=a.message??"You've reached the DAY AI credits limit for your current plan.";throw new $n(c,u)}else if(i.status===429){let a=await i.json(),u=a.code??"credits-limit-other",c=a.message??"Rate limit exceeded. Please try again later.";throw new $n(c,u)}if(i.status>=500){let a;try{let u=await i.text();if(u)try{let c=JSON.parse(u);a=c.message||c.error||u}catch{a=u}}catch{}throw new ve({type:"server_error",cause:a?new Error(a):void 0,message:`Server error from ${n} (HTTP ${i.status}). The server encountered an internal error.`,suggestions:["Try again in a few minutes - this may be a temporary issue","Contact support if the problem persists"],hostname:n,statusCode:i.status})}}return i}catch(s){if(s instanceof ve||s instanceof $n||s instanceof Error&&s.name==="AbortError")throw s;if(s instanceof Error){if(s.name==="TypeError"&&s.cause instanceof Error){let c=s.cause;if(c.code)throw ql(c,n,o)}if(s.code)throw ql(s,n,o);if(s.message?.includes("SSL")||s.message?.includes("TLS")||s.message?.includes("certificate")||s.message?.includes("CERT"))throw new ve({type:"ssl_certificate_invalid",cause:s,message:`SSL/TLS error connecting to ${n}. The connection could not be secured.`,suggestions:["Check if you're behind a corporate proxy that requires custom certificates","Set NODE_EXTRA_CA_CERTS to include your organization's CA certificate","For Node.js 22+, try the --use-system-ca flag if certificates are installed locally","Try again in a few minutes","Contact support@builder.io if the issue persists"],hostname:n})}let i=t?.method||"GET",a=s instanceof Error?s.message:String(s);throw new ve({type:"unknown",cause:s instanceof Error?s:new Error(String(s)),message:`Network error for ${i} ${r.toString()}: ${a}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:n,port:o})}};function Q$(){let t={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[ou.default.platform]||"Unknown",r=ou.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${t}${r?"; "+r:""}) builder-cli/${kD}`,"Sec-Ch-Ua-Platform":t}}var X$=H(require("@sentry/node"),1);var on=H(Wn(),1);var nk=H(require("chokidar"),1),ok=H(require("ignore"),1);var C=H(Wn(),1);function Jl(e){switch(Xi("cli help",{subcommand:e}),console.log(""),En((0,C.bgCyan)((0,C.bold)((0,C.white)(" help ")))+" "+(0,C.dim)(Xt)),e){case"add":case"generate":case"gen":case"g":En(`${(0,C.cyan)("\u2192")} ${(0,C.bold)("Generate Figma Components")}
1299
1299
 
1300
1300
  ${(0,C.bgGreen)((0,C.white)(` npx ${Oe()} figma generate URL [URL ...] `))}
1301
1301
 
@@ -1447,7 +1447,7 @@ ${(0,C.yellow)("Example:")}
1447
1447
  ${(0,C.cyan)('npx builder.io launch -p 3000 -c "npm run dev"')}
1448
1448
 
1449
1449
  ${(0,C.yellow)("Note:")}
1450
- - The proxy runs on port ${(0,C.cyan)("48752")} and the API server on port ${(0,C.cyan)("48753")}`);break;case"launch-init":Sn(`${(0,C.cyan)("\u2192")} ${(0,C.bold)("Initialize Builder.io Repository")}
1450
+ - The proxy runs on port ${(0,C.cyan)("48752")} and the API server on port ${(0,C.cyan)("48753")}`);break;case"launch-init":En(`${(0,C.cyan)("\u2192")} ${(0,C.bold)("Initialize Builder.io Repository")}
1451
1451
 
1452
1452
  ${(0,C.bgGreen)((0,C.white)(` npx ${Oe()} init `))}
1453
1453
 
@@ -1503,10 +1503,10 @@ ${(0,C.yellow)("Note:")}
1503
1503
  `),[{command:"launch",description:"Launch Builder Fusion development server"},{command:"auth",description:"Authenticate with Builder.io"},{command:"index-repo",description:"Index your design system repository for AI code generation"},{command:"connect-repo",description:"Connect your git repository to Builder.io Fusion"},{command:"code",description:"Generate or modify code based on Figma designs"},{command:"figma generate",description:"Start the auto-mapping wizard for Figma Component URLs"},{command:"figma publish",description:"Publish your Figma Mappings to Builder.io"},{command:"figma migrate",description:"Migrate existing Figma Mappings into the repo as local files"},{command:"add",description:"Add a component to your project"}].forEach(({command:n,description:o})=>{re.info(`${(0,C.cyan)("\u2192")} ${(0,C.bgGreen)((0,C.white)(` npx ${Oe()} ${n} `))}
1504
1504
  ${(0,C.dim)(o)}
1505
1505
  `)}),re.info(`For detailed help about a specific command, run:
1506
- ${(0,C.cyan)(`npx ${Oe()} <command> --help`)}`)}Oa("bye \u{1F44B}")}var ik=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos","BuilderIO/fusion-angular-tailwind-starter","BuilderIO/fusion-svelte-tailwind-starter","BuilderIO/fusion-vue-tailwind-starter"],sk="BuilderIO/fusion-starter",Yl=[...ik,sk],jG=Yl.map(e=>`https://github.com/${e}`);function dn(){}dn.prototype={diff:function(t,r){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var u=r.length,c=t.length,l=1,p=u+c;o.maxEditLength&&(p=Math.min(p,o.maxEditLength));var d=(n=o.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(m[0],r,t,0);if(m[0].oldPos+1>=c&&f+1>=u)return a([{value:this.join(r),count:r.length}]);var g=-1/0,y=1/0;function b(){for(var T=Math.max(g,-l);T<=Math.min(y,l);T+=2){var E=void 0,F=m[T-1],$=m[T+1];F&&(m[T-1]=void 0);var I=!1;if($){var k=$.oldPos-T;I=$&&0<=k&&k<u}var R=F&&F.oldPos+1<c;if(!I&&!R){m[T]=void 0;continue}if(!R||I&&F.oldPos+1<$.oldPos?E=i.addToPath($,!0,void 0,0):E=i.addToPath(F,void 0,!0,1),f=i.extractCommon(E,r,t,T),E.oldPos+1>=c&&f+1>=u)return a(ak(i,E.lastComponent,r,t,i.useLongestToken));m[T]=E,E.oldPos+1>=c&&(y=Math.min(y,T-1)),f+1>=u&&(g=Math.max(g,T+1))}l++}if(s)(function T(){setTimeout(function(){if(l>p||Date.now()>h)return s();b()||T()},0)})();else for(;l<=p&&Date.now()<=h;){var w=b();if(w)return w}},addToPath:function(t,r,n,o){var s=t.lastComponent;return s&&s.added===r&&s.removed===n?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,o){for(var s=r.length,i=n.length,a=t.oldPos,u=a-o,c=0;u+1<s&&a+1<i&&this.equals(r[u+1],n[a+1]);)u++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,u},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function ak(e,t,r,n,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,u=s.length,c=0,l=0;a<u;a++){var p=s[a];if(p.removed){if(p.value=e.join(n.slice(l,l+p.count)),l+=p.count,a&&s[a-1].added){var h=s[a-1];s[a-1]=s[a],s[a]=h}}else{if(!p.added&&o){var d=r.slice(c,c+p.count);d=d.map(function(f,g){var y=n[l+g];return y.length>f.length?y:f}),p.value=e.join(d)}else p.value=e.join(r.slice(c,c+p.count));c+=p.count,p.added||(l+=p.count)}}var m=s[u-1];return u>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(s[u-2].value+=m.value,s.pop()),s}var nW=new dn;var OD=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,MD=/\S/,LD=new dn;LD.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!MD.test(e)&&!MD.test(t)};LD.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&OD.test(t[r])&&OD.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var BD=new dn;BD.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
1507
- `));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var uk=new dn;uk.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var ck=new dn;ck.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function su(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?su=function(t){return typeof t}:su=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}var lk=Object.prototype.toString,rs=new dn;rs.useLongestToken=!0;rs.tokenize=BD.tokenize;rs.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,o=n===void 0?function(s,i){return typeof i>"u"?r:i}:n;return typeof e=="string"?e:JSON.stringify(Ql(e,null,null,o),o," ")};rs.equals=function(e,t){return dn.prototype.equals.call(rs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Ql(e,t,r,n,o){t=t||[],r=r||[],n&&(e=n(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return r[s];var i;if(lk.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),r.push(i),s=0;s<e.length;s+=1)i[s]=Ql(e[s],t,r,n,o);return t.pop(),r.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),su(e)==="object"&&e!==null){t.push(e),i={},r.push(i);var a=[],u;for(u in e)e.hasOwnProperty(u)&&a.push(u);for(a.sort(),s=0;s<a.length;s+=1)u=a[s],i[u]=Ql(e[u],t,r,n,u);t.pop(),r.pop()}else i=e;return i}var Xl=new dn;Xl.tokenize=function(e){return e.slice()};Xl.join=Xl.removeEmpty=function(e){return e};function au(){let e=new Error("AbortError");return e.name="AbortError",e}var rp=H(KD(),1);var Dk=H(require("@sentry/node"),1);var np=class{constructor(){Je(this,"processes",new Set);Je(this,"cleanupHandlersRegistered",!1);this.registerCleanupHandlers()}track(t){this.processes.add(t),t.on("exit",()=>{this.processes.delete(t)})}untrack(t){this.processes.delete(t)}async killAll(t){if(this.processes.size===0)return;let r=[];for(let n of this.processes)n.pid&&n.exitCode===null&&r.push(uu(t,n));await Promise.all(r),this.processes.clear()}registerCleanupHandlers(){if(this.cleanupHandlersRegistered)return;this.cleanupHandlersRegistered=!0;let t=async r=>{try{await this.killAll()}catch(n){console.error("[ProcessTracker] Error during cleanup:",n)}};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM")),process.on("SIGHUP",()=>t("SIGHUP")),process.on("exit",()=>{for(let r of this.processes)if(r.pid&&r.exitCode===null)try{process.kill(r.pid,"SIGKILL")}catch{}})}get count(){return this.processes.size}},OW=new np;function vk(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}async function uu(e,t,r,n=5e3){if(typeof t!="number"&&(!t||(tp(t)?t.getExitCode()!==null:t.exitCode!==null)))return null;if(r?.aborted)return au();let o=new Promise((a,u)=>{r?.addEventListener("abort",()=>{u(new Error("killProcess aborted by the user"))},{once:!0})}),s,i;if(typeof t=="number"?s=t:(i=t,s=tp(i)?i.getPid():i.pid),!s){if(e?.Sentry?.captureMessage("killProcess: no pid (process never spawned or already exited)",{level:"info",extra:{procType:i?tp(i)?"DevCommandProcess":"ChildProcess":"number"}}),i)try{i.kill("SIGKILL")}catch{}return null}try{return await Promise.race([await new Promise((a,u)=>(0,rp.default)(s,"SIGTERM",c=>{c?u(c):a()})),new Promise((a,u)=>setTimeout(()=>u(new Error("SIGTERM killProcess timeout")),n)),o]),null}catch(a){if(a.code==="ESRCH")return null;e?.Sentry?.captureException(a,{level:"warning"});try{return await Promise.race([await new Promise((u,c)=>(0,rp.default)(s,"SIGKILL",l=>{l?c(l):u()})),new Promise((u,c)=>setTimeout(()=>c(new Error("SIGKILL killProcess timeout")),n)),o]),null}catch(u){return u.code==="ESRCH"||!vk(s)?null:(e?.Sentry?.captureException(u,{level:"warning"}),u instanceof Error?u:new Error("killProcess: failed to kill process: "+String(u)))}}finally{i&&i.removeAllListeners()}}var tp=e=>"type"in e;var U8=H(require("chokidar"),1);var zI=H(wp(),1);var LI=H(wp(),1);var VZ=process.platform==="win32"?"C:\\Windows\\System32\\drivers\\etc\\hosts":"/etc/hosts";var bN=H(qC(),1);var wN=H(tw(),1);var nw="/_builder.io",hJ=nw+"/api";var vJ=new(require("https")).Agent({rejectUnauthorized:!1});var _N=H(require("@sentry/node"),1);var Zp=Object.freeze({status:"aborted"});function P(e,t,r){function n(a,u){var c;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(c=a._zod).traits??(c.traits=new Set),a._zod.traits.add(e),t(a,u);for(let l in i.prototype)l in a||Object.defineProperty(a,l,{value:i.prototype[l].bind(a)});a._zod.constr=i,a._zod.def=u}let o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var u;let c=r?.Parent?new s:this;n(c,a),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}var PN=Symbol("zod_brand"),mn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Eu={};function Jt(e){return e&&Object.assign(Eu,e),Eu}var me={};wa(me,{BIGINT_FORMAT_RANGES:()=>aw,Class:()=>Yp,NUMBER_FORMAT_RANGES:()=>id,aborted:()=>co,allowsEval:()=>rd,assert:()=>$N,assertEqual:()=>TN,assertIs:()=>FN,assertNever:()=>RN,assertNotEqual:()=>AN,assignProp:()=>td,cached:()=>fs,captureStackTrace:()=>Pu,cleanEnum:()=>qN,cleanRegex:()=>hs,clone:()=>xr,createTransparentProxy:()=>LN,defineLazy:()=>_e,esc:()=>uo,escapeRegex:()=>In,extend:()=>jN,finalizeIssue:()=>Sr,floatSafeRemainder:()=>ed,getElementAtPath:()=>kN,getEnumValues:()=>Qp,getLengthableOrigin:()=>gs,getParsedType:()=>MN,getSizableOrigin:()=>uw,isObject:()=>Jo,isPlainObject:()=>Yo,issue:()=>sd,joinValues:()=>_u,jsonStringifyReplacer:()=>Xp,merge:()=>UN,normalizeParams:()=>U,nullish:()=>ms,numKeys:()=>ON,omit:()=>zN,optionalKeys:()=>od,partial:()=>VN,pick:()=>BN,prefixIssues:()=>Yr,primitiveTypes:()=>sw,promiseAllObject:()=>IN,propertyKeyTypes:()=>nd,randomString:()=>NN,required:()=>HN,stringifyPrimitive:()=>Tu,unwrapMessage:()=>ds});function TN(e){return e}function AN(e){return e}function FN(e){}function RN(e){throw new Error}function $N(e){}function Qp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function _u(e,t="|"){return e.map(r=>Tu(r)).join(t)}function Xp(e,t){return typeof t=="bigint"?t.toString():t}function fs(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ms(e){return e==null}function hs(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ed(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function _e(e,t,r){Object.defineProperty(e,t,{get(){{let o=r();return e[t]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function td(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function kN(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function IN(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let s=0;s<t.length;s++)o[t[s]]=n[s];return o})}function NN(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function uo(e){return JSON.stringify(e)}var Pu=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var rd=fs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Yo(e){if(Jo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(Jo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ON(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var MN=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},nd=new Set(["string","number","symbol"]),sw=new Set(["string","number","bigint","boolean","symbol","undefined"]);function In(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xr(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function U(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function LN(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,s){return t??(t=e()),Reflect.set(t,n,o,s)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function Tu(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function od(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var id={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},aw={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function BN(e,t){let r={},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(r[o]=n.shape[o])}return xr(e,{...e._zod.def,shape:r,checks:[]})}function zN(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete r[o]}return xr(e,{...e._zod.def,shape:r,checks:[]})}function jN(e,t){if(!Yo(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return td(this,"shape",n),n},checks:[]};return xr(e,r)}function UN(e,t){return xr(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return td(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function VN(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=e?new e({type:"optional",innerType:n[s]}):n[s])}else for(let s in n)o[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return xr(t,{...t._zod.def,shape:o,checks:[]})}function HN(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new e({type:"nonoptional",innerType:n[s]});return xr(t,{...t._zod.def,shape:o,checks:[]})}function co(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Yr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ds(e){return typeof e=="string"?e:e?.message}function Sr(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=ds(e.inst?._zod.def?.error?.(e))??ds(t?.error?.(e))??ds(r.customError?.(e))??ds(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function uw(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function gs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sd(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function qN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Yp=class{constructor(...t){}};var cw=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Xp,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Au=P("$ZodError",cw),ad=P("$ZodError",cw,{Parent:Error});function ud(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function cd(e,t){let r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let c=i.path[u];u===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return o(e),n}var lw=e=>(t,r,n,o)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new mn;if(i.issues.length){let a=new(o?.Err??e)(i.issues.map(u=>Sr(u,s,Jt())));throw Pu(a,o?.callee),a}return i.value};var pw=e=>async(t,r,n,o)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){let a=new(o?.Err??e)(i.issues.map(u=>Sr(u,s,Jt())));throw Pu(a,o?.callee),a}return i.value};var ld=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new mn;return s.issues.length?{success:!1,error:new(e??Au)(s.issues.map(i=>Sr(i,o,Jt())))}:{success:!0,data:s.value}},dw=ld(ad),pd=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Sr(i,o,Jt())))}:{success:!0,data:s.value}},fw=pd(ad);var mw=/^[cC][^\s-]{8,}$/,hw=/^[0-9a-z]+$/,gw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yw=/^[0-9a-vA-V]{20}$/,Dw=/^[A-Za-z0-9]{27}$/,vw=/^[a-zA-Z0-9_-]{21}$/,Cw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var ww=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,dd=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var bw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var GN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xw(){return new RegExp(GN,"u")}var Sw=/^(?:(?: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])$/,Ew=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,_w=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Pw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fd=/^[A-Za-z0-9_-]*$/,Aw=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Fw=/^\+(?:[0-9]){6,14}[0-9]$/,Rw="(?:(?:\\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])))",$w=new RegExp(`^${Rw}$`);function kw(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Iw(e){return new RegExp(`^${kw(e)}$`)}function Nw(e){let t=kw({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Rw}T(?:${n})$`)}var Ow=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Mw=/^\d+n?$/,Lw=/^\d+$/,Bw=/^-?\d+(?:\.\d+)?/i,zw=/true|false/i,jw=/null/i;var Uw=/^[^A-Z]*$/,Vw=/^[^a-z]*$/;var Dt=P("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Hw={number:"number",bigint:"bigint",object:"date"},md=P("$ZodCheckLessThan",(e,t)=>{Dt.init(e,t);let r=Hw[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hd=P("$ZodCheckGreaterThan",(e,t)=>{Dt.init(e,t);let r=Hw[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qw=P("$ZodCheckMultipleOf",(e,t)=>{Dt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ed(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Kw=P("$ZodCheckNumberFormat",(e,t)=>{Dt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,s]=id[t.format];e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,r&&(a.pattern=Lw)}),e._zod.check=i=>{let a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inst:e})}});var Gw=P("$ZodCheckMaxLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let i=gs(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ww=P("$ZodCheckMinLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let i=gs(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zw=P("$ZodCheckLengthEquals",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,s=o.length;if(s===t.length)return;let i=gs(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ys=P("$ZodCheckStringFormat",(e,t)=>{var r,n;Dt.init(e,t),e._zod.onattach.push(o=>{let s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Jw=P("$ZodCheckRegex",(e,t)=>{ys.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Yw=P("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Uw),ys.init(e,t)}),Qw=P("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vw),ys.init(e,t)}),Xw=P("$ZodCheckIncludes",(e,t)=>{Dt.init(e,t);let r=In(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),eb=P("$ZodCheckStartsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`^${In(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tb=P("$ZodCheckEndsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`.*${In(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});var rb=P("$ZodCheckOverwrite",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ru=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
1506
+ ${(0,C.cyan)(`npx ${Oe()} <command> --help`)}`)}Oa("bye \u{1F44B}")}var ik=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos","BuilderIO/fusion-angular-tailwind-starter","BuilderIO/fusion-svelte-tailwind-starter","BuilderIO/fusion-vue-tailwind-starter"],sk="BuilderIO/fusion-starter",Yl=[...ik,sk],UG=Yl.map(e=>`https://github.com/${e}`);function fn(){}fn.prototype={diff:function(t,r){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var u=r.length,c=t.length,l=1,p=u+c;o.maxEditLength&&(p=Math.min(p,o.maxEditLength));var d=(n=o.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(m[0],r,t,0);if(m[0].oldPos+1>=c&&f+1>=u)return a([{value:this.join(r),count:r.length}]);var g=-1/0,y=1/0;function b(){for(var T=Math.max(g,-l);T<=Math.min(y,l);T+=2){var E=void 0,F=m[T-1],$=m[T+1];F&&(m[T-1]=void 0);var I=!1;if($){var k=$.oldPos-T;I=$&&0<=k&&k<u}var R=F&&F.oldPos+1<c;if(!I&&!R){m[T]=void 0;continue}if(!R||I&&F.oldPos+1<$.oldPos?E=i.addToPath($,!0,void 0,0):E=i.addToPath(F,void 0,!0,1),f=i.extractCommon(E,r,t,T),E.oldPos+1>=c&&f+1>=u)return a(ak(i,E.lastComponent,r,t,i.useLongestToken));m[T]=E,E.oldPos+1>=c&&(y=Math.min(y,T-1)),f+1>=u&&(g=Math.max(g,T+1))}l++}if(s)(function T(){setTimeout(function(){if(l>p||Date.now()>h)return s();b()||T()},0)})();else for(;l<=p&&Date.now()<=h;){var w=b();if(w)return w}},addToPath:function(t,r,n,o){var s=t.lastComponent;return s&&s.added===r&&s.removed===n?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,o){for(var s=r.length,i=n.length,a=t.oldPos,u=a-o,c=0;u+1<s&&a+1<i&&this.equals(r[u+1],n[a+1]);)u++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,u},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function ak(e,t,r,n,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,u=s.length,c=0,l=0;a<u;a++){var p=s[a];if(p.removed){if(p.value=e.join(n.slice(l,l+p.count)),l+=p.count,a&&s[a-1].added){var h=s[a-1];s[a-1]=s[a],s[a]=h}}else{if(!p.added&&o){var d=r.slice(c,c+p.count);d=d.map(function(f,g){var y=n[l+g];return y.length>f.length?y:f}),p.value=e.join(d)}else p.value=e.join(r.slice(c,c+p.count));c+=p.count,p.added||(l+=p.count)}}var m=s[u-1];return u>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(s[u-2].value+=m.value,s.pop()),s}var oW=new fn;var OD=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,MD=/\S/,LD=new fn;LD.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!MD.test(e)&&!MD.test(t)};LD.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&OD.test(t[r])&&OD.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var BD=new fn;BD.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
1507
+ `));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var uk=new fn;uk.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var ck=new fn;ck.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function su(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?su=function(t){return typeof t}:su=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}var lk=Object.prototype.toString,rs=new fn;rs.useLongestToken=!0;rs.tokenize=BD.tokenize;rs.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,o=n===void 0?function(s,i){return typeof i>"u"?r:i}:n;return typeof e=="string"?e:JSON.stringify(Ql(e,null,null,o),o," ")};rs.equals=function(e,t){return fn.prototype.equals.call(rs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Ql(e,t,r,n,o){t=t||[],r=r||[],n&&(e=n(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return r[s];var i;if(lk.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),r.push(i),s=0;s<e.length;s+=1)i[s]=Ql(e[s],t,r,n,o);return t.pop(),r.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),su(e)==="object"&&e!==null){t.push(e),i={},r.push(i);var a=[],u;for(u in e)e.hasOwnProperty(u)&&a.push(u);for(a.sort(),s=0;s<a.length;s+=1)u=a[s],i[u]=Ql(e[u],t,r,n,u);t.pop(),r.pop()}else i=e;return i}var Xl=new fn;Xl.tokenize=function(e){return e.slice()};Xl.join=Xl.removeEmpty=function(e){return e};function au(){let e=new Error("AbortError");return e.name="AbortError",e}var rp=H(KD(),1);var Dk=H(require("@sentry/node"),1);var np=class{constructor(){Ge(this,"processes",new Set);Ge(this,"cleanupHandlersRegistered",!1);this.registerCleanupHandlers()}track(t){this.processes.add(t),t.on("exit",()=>{this.processes.delete(t)})}untrack(t){this.processes.delete(t)}async killAll(t){if(this.processes.size===0)return;let r=[];for(let n of this.processes)n.pid&&n.exitCode===null&&r.push(uu(t,n));await Promise.all(r),this.processes.clear()}registerCleanupHandlers(){if(this.cleanupHandlersRegistered)return;this.cleanupHandlersRegistered=!0;let t=async r=>{try{await this.killAll()}catch(n){console.error("[ProcessTracker] Error during cleanup:",n)}};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM")),process.on("SIGHUP",()=>t("SIGHUP")),process.on("exit",()=>{for(let r of this.processes)if(r.pid&&r.exitCode===null)try{process.kill(r.pid,"SIGKILL")}catch{}})}get count(){return this.processes.size}},MW=new np;function vk(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}async function uu(e,t,r,n=5e3){if(typeof t!="number"&&(!t||(tp(t)?t.getExitCode()!==null:t.exitCode!==null)))return null;if(r?.aborted)return au();let o=new Promise((a,u)=>{r?.addEventListener("abort",()=>{u(new Error("killProcess aborted by the user"))},{once:!0})}),s,i;if(typeof t=="number"?s=t:(i=t,s=tp(i)?i.getPid():i.pid),!s){if(e?.Sentry?.captureMessage("killProcess: no pid (process never spawned or already exited)",{level:"info",extra:{procType:i?tp(i)?"DevCommandProcess":"ChildProcess":"number"}}),i)try{i.kill("SIGKILL")}catch{}return null}try{return await Promise.race([await new Promise((a,u)=>(0,rp.default)(s,"SIGTERM",c=>{c?u(c):a()})),new Promise((a,u)=>setTimeout(()=>u(new Error("SIGTERM killProcess timeout")),n)),o]),null}catch(a){if(a.code==="ESRCH")return null;e?.Sentry?.captureException(a,{level:"warning"});try{return await Promise.race([await new Promise((u,c)=>(0,rp.default)(s,"SIGKILL",l=>{l?c(l):u()})),new Promise((u,c)=>setTimeout(()=>c(new Error("SIGKILL killProcess timeout")),n)),o]),null}catch(u){return u.code==="ESRCH"||!vk(s)?null:(e?.Sentry?.captureException(u,{level:"warning"}),u instanceof Error?u:new Error("killProcess: failed to kill process: "+String(u)))}}finally{i&&i.removeAllListeners()}}var tp=e=>"type"in e;var V8=H(require("chokidar"),1);var zI=H(wp(),1);var LI=H(wp(),1);var HZ=process.platform==="win32"?"C:\\Windows\\System32\\drivers\\etc\\hosts":"/etc/hosts";var bN=H(qC(),1);var wN=H(tw(),1);var nw="/_builder.io",gJ=nw+"/api";var CJ=new(require("https")).Agent({rejectUnauthorized:!1});var PN=H(require("@sentry/node"),1);var Zp=Object.freeze({status:"aborted"});function P(e,t,r){function n(a,u){var c;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(c=a._zod).traits??(c.traits=new Set),a._zod.traits.add(e),t(a,u);for(let l in i.prototype)l in a||Object.defineProperty(a,l,{value:i.prototype[l].bind(a)});a._zod.constr=i,a._zod.def=u}let o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var u;let c=r?.Parent?new s:this;n(c,a),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}var TN=Symbol("zod_brand"),hn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Eu={};function Jt(e){return e&&Object.assign(Eu,e),Eu}var me={};wa(me,{BIGINT_FORMAT_RANGES:()=>aw,Class:()=>Yp,NUMBER_FORMAT_RANGES:()=>id,aborted:()=>co,allowsEval:()=>rd,assert:()=>kN,assertEqual:()=>AN,assertIs:()=>RN,assertNever:()=>$N,assertNotEqual:()=>FN,assignProp:()=>td,cached:()=>fs,captureStackTrace:()=>Pu,cleanEnum:()=>KN,cleanRegex:()=>hs,clone:()=>xr,createTransparentProxy:()=>BN,defineLazy:()=>_e,esc:()=>uo,escapeRegex:()=>In,extend:()=>UN,finalizeIssue:()=>Sr,floatSafeRemainder:()=>ed,getElementAtPath:()=>IN,getEnumValues:()=>Qp,getLengthableOrigin:()=>gs,getParsedType:()=>LN,getSizableOrigin:()=>uw,isObject:()=>Jo,isPlainObject:()=>Yo,issue:()=>sd,joinValues:()=>_u,jsonStringifyReplacer:()=>Xp,merge:()=>VN,normalizeParams:()=>U,nullish:()=>ms,numKeys:()=>MN,omit:()=>jN,optionalKeys:()=>od,partial:()=>HN,pick:()=>zN,prefixIssues:()=>Yr,primitiveTypes:()=>sw,promiseAllObject:()=>NN,propertyKeyTypes:()=>nd,randomString:()=>ON,required:()=>qN,stringifyPrimitive:()=>Tu,unwrapMessage:()=>ds});function AN(e){return e}function FN(e){return e}function RN(e){}function $N(e){throw new Error}function kN(e){}function Qp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function _u(e,t="|"){return e.map(r=>Tu(r)).join(t)}function Xp(e,t){return typeof t=="bigint"?t.toString():t}function fs(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ms(e){return e==null}function hs(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ed(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function _e(e,t,r){Object.defineProperty(e,t,{get(){{let o=r();return e[t]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function td(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function IN(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function NN(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let s=0;s<t.length;s++)o[t[s]]=n[s];return o})}function ON(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function uo(e){return JSON.stringify(e)}var Pu=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var rd=fs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Yo(e){if(Jo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(Jo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function MN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var LN=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},nd=new Set(["string","number","symbol"]),sw=new Set(["string","number","bigint","boolean","symbol","undefined"]);function In(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xr(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function U(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function BN(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,s){return t??(t=e()),Reflect.set(t,n,o,s)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function Tu(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function od(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var id={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},aw={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function zN(e,t){let r={},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(r[o]=n.shape[o])}return xr(e,{...e._zod.def,shape:r,checks:[]})}function jN(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete r[o]}return xr(e,{...e._zod.def,shape:r,checks:[]})}function UN(e,t){if(!Yo(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return td(this,"shape",n),n},checks:[]};return xr(e,r)}function VN(e,t){return xr(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return td(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function HN(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=e?new e({type:"optional",innerType:n[s]}):n[s])}else for(let s in n)o[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return xr(t,{...t._zod.def,shape:o,checks:[]})}function qN(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new e({type:"nonoptional",innerType:n[s]});return xr(t,{...t._zod.def,shape:o,checks:[]})}function co(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Yr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ds(e){return typeof e=="string"?e:e?.message}function Sr(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=ds(e.inst?._zod.def?.error?.(e))??ds(t?.error?.(e))??ds(r.customError?.(e))??ds(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function uw(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function gs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sd(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function KN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Yp=class{constructor(...t){}};var cw=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Xp,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Au=P("$ZodError",cw),ad=P("$ZodError",cw,{Parent:Error});function ud(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function cd(e,t){let r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let c=i.path[u];u===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return o(e),n}var lw=e=>(t,r,n,o)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new hn;if(i.issues.length){let a=new(o?.Err??e)(i.issues.map(u=>Sr(u,s,Jt())));throw Pu(a,o?.callee),a}return i.value};var pw=e=>async(t,r,n,o)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){let a=new(o?.Err??e)(i.issues.map(u=>Sr(u,s,Jt())));throw Pu(a,o?.callee),a}return i.value};var ld=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new hn;return s.issues.length?{success:!1,error:new(e??Au)(s.issues.map(i=>Sr(i,o,Jt())))}:{success:!0,data:s.value}},dw=ld(ad),pd=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Sr(i,o,Jt())))}:{success:!0,data:s.value}},fw=pd(ad);var mw=/^[cC][^\s-]{8,}$/,hw=/^[0-9a-z]+$/,gw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yw=/^[0-9a-vA-V]{20}$/,Dw=/^[A-Za-z0-9]{27}$/,vw=/^[a-zA-Z0-9_-]{21}$/,Cw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var ww=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,dd=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var bw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var WN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xw(){return new RegExp(WN,"u")}var Sw=/^(?:(?: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])$/,Ew=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,_w=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Pw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fd=/^[A-Za-z0-9_-]*$/,Aw=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Fw=/^\+(?:[0-9]){6,14}[0-9]$/,Rw="(?:(?:\\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])))",$w=new RegExp(`^${Rw}$`);function kw(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Iw(e){return new RegExp(`^${kw(e)}$`)}function Nw(e){let t=kw({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Rw}T(?:${n})$`)}var Ow=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Mw=/^\d+n?$/,Lw=/^\d+$/,Bw=/^-?\d+(?:\.\d+)?/i,zw=/true|false/i,jw=/null/i;var Uw=/^[^A-Z]*$/,Vw=/^[^a-z]*$/;var Dt=P("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Hw={number:"number",bigint:"bigint",object:"date"},md=P("$ZodCheckLessThan",(e,t)=>{Dt.init(e,t);let r=Hw[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hd=P("$ZodCheckGreaterThan",(e,t)=>{Dt.init(e,t);let r=Hw[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qw=P("$ZodCheckMultipleOf",(e,t)=>{Dt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ed(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Kw=P("$ZodCheckNumberFormat",(e,t)=>{Dt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,s]=id[t.format];e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,r&&(a.pattern=Lw)}),e._zod.check=i=>{let a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inst:e})}});var Gw=P("$ZodCheckMaxLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let i=gs(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ww=P("$ZodCheckMinLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let i=gs(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zw=P("$ZodCheckLengthEquals",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,s=o.length;if(s===t.length)return;let i=gs(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ys=P("$ZodCheckStringFormat",(e,t)=>{var r,n;Dt.init(e,t),e._zod.onattach.push(o=>{let s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Jw=P("$ZodCheckRegex",(e,t)=>{ys.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Yw=P("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Uw),ys.init(e,t)}),Qw=P("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vw),ys.init(e,t)}),Xw=P("$ZodCheckIncludes",(e,t)=>{Dt.init(e,t);let r=In(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),eb=P("$ZodCheckStartsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`^${In(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tb=P("$ZodCheckEndsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`.*${In(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});var rb=P("$ZodCheckOverwrite",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ru=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
1508
1508
  `).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(let i of s)this.content.push(i)}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
1509
- `))}};var ob={major:4,minor:0,patch:0};var De=P("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ob;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,i,a)=>{let u=co(s),c;for(let l of i){if(l._zod.def.when){if(!l._zod.def.when(s))continue}else if(u)continue;let p=s.issues.length,d=l._zod.check(s);if(d instanceof Promise&&a?.async===!1)throw new mn;if(c||d instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await d,s.issues.length!==p&&(u||(u=co(s,p)))});else{if(s.issues.length===p)continue;u||(u=co(s,p))}}return c?c.then(()=>s):s};e._zod.run=(s,i)=>{let a=e._zod.parse(s,i);if(a instanceof Promise){if(i.async===!1)throw new mn;return a.then(u=>o(u,n,i))}return o(a,n,i)}}e["~standard"]={validate:o=>{try{let s=dw(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return fw(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),ku=P("$ZodString",(e,t)=>{De.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ow(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ke=P("$ZodStringFormat",(e,t)=>{ys.init(e,t),ku.init(e,t)}),mb=P("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ww),ke.init(e,t)}),hb=P("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=dd(n))}else t.pattern??(t.pattern=dd());ke.init(e,t)}),gb=P("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=bw),ke.init(e,t)}),yb=P("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=r=>{try{let n=r.value,o=new URL(n),s=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Aw.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!n.endsWith("/")&&s.endsWith("/")?r.value=s.slice(0,-1):r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Db=P("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xw()),ke.init(e,t)}),vb=P("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=vw),ke.init(e,t)}),Cb=P("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=mw),ke.init(e,t)}),wb=P("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=hw),ke.init(e,t)}),bb=P("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gw),ke.init(e,t)}),xb=P("$ZodXID",(e,t)=>{t.pattern??(t.pattern=yw),ke.init(e,t)}),Sb=P("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Dw),ke.init(e,t)}),Eb=P("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Nw(t)),ke.init(e,t)}),_b=P("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$w),ke.init(e,t)}),Pb=P("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Iw(t)),ke.init(e,t)}),Tb=P("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Cw),ke.init(e,t)}),Ab=P("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Sw),ke.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Fb=P("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ew),ke.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Rb=P("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_w),ke.init(e,t)}),$b=P("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pw),ke.init(e,t),e._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function kb(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ib=P("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Tw),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{kb(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function WN(e){if(!fd.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return kb(r)}var Nb=P("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=fd),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{WN(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ob=P("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fw),ke.init(e,t)});function ZN(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var Mb=P("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=r=>{ZN(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var yd=P("$ZodNumber",(e,t)=>{De.init(e,t),e._zod.pattern=e._zod.bag.pattern??Bw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),Lb=P("$ZodNumber",(e,t)=>{Kw.init(e,t),yd.init(e,t)}),Bb=P("$ZodBoolean",(e,t)=>{De.init(e,t),e._zod.pattern=zw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),zb=P("$ZodBigInt",(e,t)=>{De.init(e,t),e._zod.pattern=Mw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var jb=P("$ZodNull",(e,t)=>{De.init(e,t),e._zod.pattern=jw,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),Ub=P("$ZodAny",(e,t)=>{De.init(e,t),e._zod.parse=r=>r}),Vb=P("$ZodUnknown",(e,t)=>{De.init(e,t),e._zod.parse=r=>r}),Hb=P("$ZodNever",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});var qb=P("$ZodDate",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),r}});function ib(e,t,r){e.issues.length&&t.issues.push(...Yr(r,e.issues)),t.value[r]=e.value}var Kb=P("$ZodArray",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let s=[];for(let i=0;i<o.length;i++){let a=o[i],u=t.element._zod.run({value:a,issues:[]},n);u instanceof Promise?s.push(u.then(c=>ib(c,r,i))):ib(u,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function $u(e,t,r){e.issues.length&&t.issues.push(...Yr(r,e.issues)),t.value[r]=e.value}function sb(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...Yr(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}var Gb=P("$ZodObject",(e,t)=>{De.init(e,t);let r=fs(()=>{let p=Object.keys(t.shape);for(let h of p)if(!(t.shape[h]instanceof De))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let d=od(t.shape);return{shape:t.shape,keys:p,keySet:new Set(p),numKeys:p.length,optionalKeys:new Set(d)}});_e(e._zod,"propValues",()=>{let p=t.shape,d={};for(let h in p){let m=p[h]._zod;if(m.values){d[h]??(d[h]=new Set);for(let f of m.values)d[h].add(f)}}return d});let n=p=>{let d=new Ru(["shape","payload","ctx"]),h=r.value,m=b=>{let w=uo(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};d.write("const input = payload.value;");let f=Object.create(null),g=0;for(let b of h.keys)f[b]=`key_${g++}`;d.write("const newResult = {}");for(let b of h.keys)if(h.optionalKeys.has(b)){let w=f[b];d.write(`const ${w} = ${m(b)};`);let T=uo(b);d.write(`
1509
+ `))}};var ob={major:4,minor:0,patch:0};var De=P("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ob;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,i,a)=>{let u=co(s),c;for(let l of i){if(l._zod.def.when){if(!l._zod.def.when(s))continue}else if(u)continue;let p=s.issues.length,d=l._zod.check(s);if(d instanceof Promise&&a?.async===!1)throw new hn;if(c||d instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await d,s.issues.length!==p&&(u||(u=co(s,p)))});else{if(s.issues.length===p)continue;u||(u=co(s,p))}}return c?c.then(()=>s):s};e._zod.run=(s,i)=>{let a=e._zod.parse(s,i);if(a instanceof Promise){if(i.async===!1)throw new hn;return a.then(u=>o(u,n,i))}return o(a,n,i)}}e["~standard"]={validate:o=>{try{let s=dw(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return fw(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),ku=P("$ZodString",(e,t)=>{De.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ow(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ke=P("$ZodStringFormat",(e,t)=>{ys.init(e,t),ku.init(e,t)}),mb=P("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ww),ke.init(e,t)}),hb=P("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=dd(n))}else t.pattern??(t.pattern=dd());ke.init(e,t)}),gb=P("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=bw),ke.init(e,t)}),yb=P("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=r=>{try{let n=r.value,o=new URL(n),s=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Aw.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!n.endsWith("/")&&s.endsWith("/")?r.value=s.slice(0,-1):r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Db=P("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xw()),ke.init(e,t)}),vb=P("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=vw),ke.init(e,t)}),Cb=P("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=mw),ke.init(e,t)}),wb=P("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=hw),ke.init(e,t)}),bb=P("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gw),ke.init(e,t)}),xb=P("$ZodXID",(e,t)=>{t.pattern??(t.pattern=yw),ke.init(e,t)}),Sb=P("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Dw),ke.init(e,t)}),Eb=P("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Nw(t)),ke.init(e,t)}),_b=P("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$w),ke.init(e,t)}),Pb=P("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Iw(t)),ke.init(e,t)}),Tb=P("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Cw),ke.init(e,t)}),Ab=P("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Sw),ke.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Fb=P("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ew),ke.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Rb=P("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_w),ke.init(e,t)}),$b=P("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pw),ke.init(e,t),e._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function kb(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ib=P("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Tw),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{kb(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ZN(e){if(!fd.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return kb(r)}var Nb=P("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=fd),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{ZN(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ob=P("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fw),ke.init(e,t)});function JN(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var Mb=P("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=r=>{JN(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var yd=P("$ZodNumber",(e,t)=>{De.init(e,t),e._zod.pattern=e._zod.bag.pattern??Bw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),Lb=P("$ZodNumber",(e,t)=>{Kw.init(e,t),yd.init(e,t)}),Bb=P("$ZodBoolean",(e,t)=>{De.init(e,t),e._zod.pattern=zw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),zb=P("$ZodBigInt",(e,t)=>{De.init(e,t),e._zod.pattern=Mw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var jb=P("$ZodNull",(e,t)=>{De.init(e,t),e._zod.pattern=jw,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),Ub=P("$ZodAny",(e,t)=>{De.init(e,t),e._zod.parse=r=>r}),Vb=P("$ZodUnknown",(e,t)=>{De.init(e,t),e._zod.parse=r=>r}),Hb=P("$ZodNever",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});var qb=P("$ZodDate",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),r}});function ib(e,t,r){e.issues.length&&t.issues.push(...Yr(r,e.issues)),t.value[r]=e.value}var Kb=P("$ZodArray",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let s=[];for(let i=0;i<o.length;i++){let a=o[i],u=t.element._zod.run({value:a,issues:[]},n);u instanceof Promise?s.push(u.then(c=>ib(c,r,i))):ib(u,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function $u(e,t,r){e.issues.length&&t.issues.push(...Yr(r,e.issues)),t.value[r]=e.value}function sb(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...Yr(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}var Gb=P("$ZodObject",(e,t)=>{De.init(e,t);let r=fs(()=>{let p=Object.keys(t.shape);for(let h of p)if(!(t.shape[h]instanceof De))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let d=od(t.shape);return{shape:t.shape,keys:p,keySet:new Set(p),numKeys:p.length,optionalKeys:new Set(d)}});_e(e._zod,"propValues",()=>{let p=t.shape,d={};for(let h in p){let m=p[h]._zod;if(m.values){d[h]??(d[h]=new Set);for(let f of m.values)d[h].add(f)}}return d});let n=p=>{let d=new Ru(["shape","payload","ctx"]),h=r.value,m=b=>{let w=uo(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};d.write("const input = payload.value;");let f=Object.create(null),g=0;for(let b of h.keys)f[b]=`key_${g++}`;d.write("const newResult = {}");for(let b of h.keys)if(h.optionalKeys.has(b)){let w=f[b];d.write(`const ${w} = ${m(b)};`);let T=uo(b);d.write(`
1510
1510
  if (${w}.issues.length) {
1511
1511
  if (input[${T}] === undefined) {
1512
1512
  if (${T} in input) {
@@ -1529,19 +1529,19 @@ ${(0,C.yellow)("Note:")}
1529
1529
  if (${w}.issues.length) payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
1530
1530
  ...iss,
1531
1531
  path: iss.path ? [${uo(b)}, ...iss.path] : [${uo(b)}]
1532
- })));`),d.write(`newResult[${uo(b)}] = ${w}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let y=d.compile();return(b,w)=>y(p,b,w)},o,s=Jo,i=!Eu.jitless,u=i&&rd.value,c=t.catchall,l;e._zod.parse=(p,d)=>{l??(l=r.value);let h=p.value;if(!s(h))return p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p;let m=[];if(i&&u&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),p=o(p,d);else{p.value={};let w=l.shape;for(let T of l.keys){let E=w[T],F=E._zod.run({value:h[T],issues:[]},d),$=E._zod.optin==="optional"&&E._zod.optout==="optional";F instanceof Promise?m.push(F.then(I=>$?sb(I,p,T,h):$u(I,p,T))):$?sb(F,p,T,h):$u(F,p,T)}}if(!c)return m.length?Promise.all(m).then(()=>p):p;let f=[],g=l.keySet,y=c._zod,b=y.def.type;for(let w of Object.keys(h)){if(g.has(w))continue;if(b==="never"){f.push(w);continue}let T=y.run({value:h[w],issues:[]},d);T instanceof Promise?m.push(T.then(E=>$u(E,p,w))):$u(T,p,w)}return f.length&&p.issues.push({code:"unrecognized_keys",keys:f,input:h,inst:e}),m.length?Promise.all(m).then(()=>p):p}});function ab(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>Sr(s,n,Jt())))}),t}var Dd=P("$ZodUnion",(e,t)=>{De.init(e,t),_e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),_e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),_e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),_e(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>hs(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let o=!1,s=[];for(let i of t.options){let a=i._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)s.push(a),o=!0;else{if(a.issues.length===0)return a;s.push(a)}}return o?Promise.all(s).then(i=>ab(i,r,e,n)):ab(s,r,e,n)}}),Wb=P("$ZodDiscriminatedUnion",(e,t)=>{Dd.init(e,t);let r=e._zod.parse;_e(e._zod,"propValues",()=>{let o={};for(let s of t.options){let i=s._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[a,u]of Object.entries(i)){o[a]||(o[a]=new Set);for(let c of u)o[a].add(c)}}return o});let n=fs(()=>{let o=t.options,s=new Map;for(let i of o){let a=i._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let u of a){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,i)}}return s});e._zod.parse=(o,s)=>{let i=o.value;if(!Jo(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),o;let a=n.value.get(i?.[t.discriminator]);return a?a._zod.run(o,s):t.unionFallback?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:i,path:[t.discriminator],inst:e}),o)}}),Zb=P("$ZodIntersection",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([u,c])=>ub(r,u,c)):ub(r,s,i)}});function gd(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Yo(e)&&Yo(t)){let r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(let s of n){let i=gd(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],s=t[n],i=gd(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ub(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),co(e))return e;let n=gd(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}var Jb=P("$ZodRecord",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Yo(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let s=[];if(t.keyType._zod.values){let i=t.keyType._zod.values;r.value={};for(let u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){let c=t.valueType._zod.run({value:o[u],issues:[]},n);c instanceof Promise?s.push(c.then(l=>{l.issues.length&&r.issues.push(...Yr(u,l.issues)),r.value[u]=l.value})):(c.issues.length&&r.issues.push(...Yr(u,c.issues)),r.value[u]=c.value)}let a;for(let u in o)i.has(u)||(a=a??[],a.push(u));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{r.value={};for(let i of Reflect.ownKeys(o)){if(i==="__proto__")continue;let a=t.keyType._zod.run({value:i,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(c=>Sr(c,n,Jt())),input:i,path:[i],inst:e}),r.value[a.value]=a.value;continue}let u=t.valueType._zod.run({value:o[i],issues:[]},n);u instanceof Promise?s.push(u.then(c=>{c.issues.length&&r.issues.push(...Yr(i,c.issues)),r.value[a.value]=c.value})):(u.issues.length&&r.issues.push(...Yr(i,u.issues)),r.value[a.value]=u.value)}}return s.length?Promise.all(s).then(()=>r):r}});var Yb=P("$ZodEnum",(e,t)=>{De.init(e,t);let r=Qp(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>nd.has(typeof n)).map(n=>typeof n=="string"?In(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return e._zod.values.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),Qb=P("$ZodLiteral",(e,t)=>{De.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?In(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}});var Xb=P("$ZodTransform",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new mn;return r.value=o,r}}),ex=P("$ZodOptional",(e,t)=>{De.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_e(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${hs(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),tx=P("$ZodNullable",(e,t)=>{De.init(e,t),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${hs(r.source)}|null)$`):void 0}),_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),rx=P("$ZodDefault",(e,t)=>{De.init(e,t),e._zod.optin="optional",_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>cb(s,t)):cb(o,t)}});function cb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var nx=P("$ZodPrefault",(e,t)=>{De.init(e,t),e._zod.optin="optional",_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ox=P("$ZodNonOptional",(e,t)=>{De.init(e,t),_e(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>lb(s,e)):lb(o,e)}});function lb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var ix=P("$ZodCatch",(e,t)=>{De.init(e,t),e._zod.optin="optional",_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>Sr(i,n,Jt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Sr(s,n,Jt()))},input:r.value}),r.issues=[]),r)}});var sx=P("$ZodPipe",(e,t)=>{De.init(e,t),_e(e._zod,"values",()=>t.in._zod.values),_e(e._zod,"optin",()=>t.in._zod.optin),_e(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>pb(s,t,n)):pb(o,t,n)}});function pb(e,t,r){return co(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var ax=P("$ZodReadonly",(e,t)=>{De.init(e,t),_e(e._zod,"propValues",()=>t.innerType._zod.propValues),_e(e._zod,"values",()=>t.innerType._zod.values),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(db):db(o)}});function db(e){return e.value=Object.freeze(e.value),e}var ux=P("$ZodCustom",(e,t)=>{Dt.init(e,t),De.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>fb(s,r,n,e));fb(o,r,n,e)}});function fb(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(sd(o))}}var JN=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},YN=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${JN(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Tu(n.values[0])}`:`Invalid option: expected one of ${_u(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${_u(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function cx(){return{localeError:YN()}}var QN=Symbol("ZodOutput"),XN=Symbol("ZodInput"),vd=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function lx(){return new vd}var Qo=lx();function px(e,t){return new e({type:"string",...U(t)})}function dx(e,t){return new e({type:"string",coerce:!0,...U(t)})}function fx(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...U(t)})}function Cd(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...U(t)})}function mx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...U(t)})}function hx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...U(t)})}function gx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...U(t)})}function yx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...U(t)})}function wd(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...U(t)})}function Dx(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...U(t)})}function vx(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...U(t)})}function Cx(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...U(t)})}function wx(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...U(t)})}function bx(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...U(t)})}function xx(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...U(t)})}function Sx(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...U(t)})}function Ex(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...U(t)})}function _x(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...U(t)})}function Px(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...U(t)})}function Tx(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...U(t)})}function Ax(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...U(t)})}function Fx(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...U(t)})}function Rx(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...U(t)})}function $x(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...U(t)})}function kx(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...U(t)})}function Ix(e,t){return new e({type:"string",format:"date",check:"string_format",...U(t)})}function Nx(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...U(t)})}function Ox(e,t){return new e({type:"string",format:"duration",check:"string_format",...U(t)})}function Mx(e,t){return new e({type:"number",checks:[],...U(t)})}function Lx(e,t){return new e({type:"number",coerce:!0,checks:[],...U(t)})}function Bx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...U(t)})}function zx(e,t){return new e({type:"boolean",...U(t)})}function jx(e,t){return new e({type:"boolean",coerce:!0,...U(t)})}function Ux(e,t){return new e({type:"bigint",coerce:!0,...U(t)})}function Vx(e,t){return new e({type:"null",...U(t)})}function Hx(e){return new e({type:"any"})}function qx(e){return new e({type:"unknown"})}function Kx(e,t){return new e({type:"never",...U(t)})}function Gx(e,t){return new e({type:"date",coerce:!0,...U(t)})}function Xo(e,t){return new md({check:"less_than",...U(t),value:e,inclusive:!1})}function hn(e,t){return new md({check:"less_than",...U(t),value:e,inclusive:!0})}function ei(e,t){return new hd({check:"greater_than",...U(t),value:e,inclusive:!1})}function Er(e,t){return new hd({check:"greater_than",...U(t),value:e,inclusive:!0})}function Ds(e,t){return new qw({check:"multiple_of",...U(t),value:e})}function Iu(e,t){return new Gw({check:"max_length",...U(t),maximum:e})}function ti(e,t){return new Ww({check:"min_length",...U(t),minimum:e})}function Nu(e,t){return new Zw({check:"length_equals",...U(t),length:e})}function bd(e,t){return new Jw({check:"string_format",format:"regex",...U(t),pattern:e})}function xd(e){return new Yw({check:"string_format",format:"lowercase",...U(e)})}function Sd(e){return new Qw({check:"string_format",format:"uppercase",...U(e)})}function Ed(e,t){return new Xw({check:"string_format",format:"includes",...U(t),includes:e})}function _d(e,t){return new eb({check:"string_format",format:"starts_with",...U(t),prefix:e})}function Pd(e,t){return new tb({check:"string_format",format:"ends_with",...U(t),suffix:e})}function lo(e){return new rb({check:"overwrite",tx:e})}function Td(e){return lo(t=>t.normalize(e))}function Ad(){return lo(e=>e.trim())}function Fd(){return lo(e=>e.toLowerCase())}function Rd(){return lo(e=>e.toUpperCase())}function Wx(e,t,r){return new e({type:"array",element:t,...U(r)})}function Zx(e,t,r){let n=U(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Jx(e,t,r){return new e({type:"custom",check:"custom",fn:t,...U(r)})}var vs={};wa(vs,{ZodISODate:()=>Qx,ZodISODateTime:()=>Yx,ZodISODuration:()=>e0,ZodISOTime:()=>Xx,date:()=>kd,datetime:()=>$d,duration:()=>Nd,time:()=>Id});var Yx=P("ZodISODateTime",(e,t)=>{Eb.init(e,t),Le.init(e,t)});function $d(e){return kx(Yx,e)}var Qx=P("ZodISODate",(e,t)=>{_b.init(e,t),Le.init(e,t)});function kd(e){return Ix(Qx,e)}var Xx=P("ZodISOTime",(e,t)=>{Pb.init(e,t),Le.init(e,t)});function Id(e){return Nx(Xx,e)}var e0=P("ZodISODuration",(e,t)=>{Tb.init(e,t),Le.init(e,t)});function Nd(e){return Ox(e0,e)}var r0=(e,t)=>{Au.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cd(e,r)},flatten:{value:r=>ud(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},nQ=P("ZodError",r0),Cs=P("ZodError",r0,{Parent:Error});var n0=lw(Cs),o0=pw(Cs),i0=ld(Cs),s0=pd(Cs);var Pe=P("ZodType",(e,t)=>(De.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>xr(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>n0(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>i0(e,r,n),e.parseAsync=async(r,n)=>o0(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>s0(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(GO(r,n)),e.superRefine=r=>e.check(WO(r)),e.overwrite=r=>e.check(lo(r)),e.optional=()=>Ve(e),e.nullable=()=>c0(e),e.nullish=()=>Ve(c0(e)),e.nonoptional=r=>zO(e,r),e.array=()=>N(e),e.or=r=>Te([e,r]),e.and=r=>Lu(e,r),e.transform=r=>Md(e,D0(r)),e.default=r=>MO(e,r),e.prefault=r=>BO(e,r),e.catch=r=>UO(e,r),e.pipe=r=>Md(e,r),e.readonly=()=>qO(e),e.describe=r=>{let n=e.clone();return Qo.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Qo.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Qo.get(e);let n=e.clone();return Qo.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),l0=P("_ZodString",(e,t)=>{ku.init(e,t),Pe.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(bd(...n)),e.includes=(...n)=>e.check(Ed(...n)),e.startsWith=(...n)=>e.check(_d(...n)),e.endsWith=(...n)=>e.check(Pd(...n)),e.min=(...n)=>e.check(ti(...n)),e.max=(...n)=>e.check(Iu(...n)),e.length=(...n)=>e.check(Nu(...n)),e.nonempty=(...n)=>e.check(ti(1,...n)),e.lowercase=n=>e.check(xd(n)),e.uppercase=n=>e.check(Sd(n)),e.trim=()=>e.check(Ad()),e.normalize=(...n)=>e.check(Td(...n)),e.toLowerCase=()=>e.check(Fd()),e.toUpperCase=()=>e.check(Rd())}),Ld=P("ZodString",(e,t)=>{ku.init(e,t),l0.init(e,t),e.email=r=>e.check(fx(aO,r)),e.url=r=>e.check(wd(p0,r)),e.jwt=r=>e.check($x(bO,r)),e.emoji=r=>e.check(Dx(uO,r)),e.guid=r=>e.check(Cd(a0,r)),e.uuid=r=>e.check(mx(Ou,r)),e.uuidv4=r=>e.check(hx(Ou,r)),e.uuidv6=r=>e.check(gx(Ou,r)),e.uuidv7=r=>e.check(yx(Ou,r)),e.nanoid=r=>e.check(vx(cO,r)),e.guid=r=>e.check(Cd(a0,r)),e.cuid=r=>e.check(Cx(lO,r)),e.cuid2=r=>e.check(wx(pO,r)),e.ulid=r=>e.check(bx(dO,r)),e.base64=r=>e.check(Ax(vO,r)),e.base64url=r=>e.check(Fx(CO,r)),e.xid=r=>e.check(xx(fO,r)),e.ksuid=r=>e.check(Sx(mO,r)),e.ipv4=r=>e.check(Ex(hO,r)),e.ipv6=r=>e.check(_x(gO,r)),e.cidrv4=r=>e.check(Px(yO,r)),e.cidrv6=r=>e.check(Tx(DO,r)),e.e164=r=>e.check(Rx(wO,r)),e.datetime=r=>e.check($d(r)),e.date=r=>e.check(kd(r)),e.time=r=>e.check(Id(r)),e.duration=r=>e.check(Nd(r))});function D(e){return px(Ld,e)}var Le=P("ZodStringFormat",(e,t)=>{ke.init(e,t),l0.init(e,t)}),aO=P("ZodEmail",(e,t)=>{gb.init(e,t),Le.init(e,t)});var a0=P("ZodGUID",(e,t)=>{mb.init(e,t),Le.init(e,t)});var Ou=P("ZodUUID",(e,t)=>{hb.init(e,t),Le.init(e,t)});var p0=P("ZodURL",(e,t)=>{yb.init(e,t),Le.init(e,t)});function d0(e){return wd(p0,e)}var uO=P("ZodEmoji",(e,t)=>{Db.init(e,t),Le.init(e,t)});var cO=P("ZodNanoID",(e,t)=>{vb.init(e,t),Le.init(e,t)});var lO=P("ZodCUID",(e,t)=>{Cb.init(e,t),Le.init(e,t)});var pO=P("ZodCUID2",(e,t)=>{wb.init(e,t),Le.init(e,t)});var dO=P("ZodULID",(e,t)=>{bb.init(e,t),Le.init(e,t)});var fO=P("ZodXID",(e,t)=>{xb.init(e,t),Le.init(e,t)});var mO=P("ZodKSUID",(e,t)=>{Sb.init(e,t),Le.init(e,t)});var hO=P("ZodIPv4",(e,t)=>{Ab.init(e,t),Le.init(e,t)});var gO=P("ZodIPv6",(e,t)=>{Fb.init(e,t),Le.init(e,t)});var yO=P("ZodCIDRv4",(e,t)=>{Rb.init(e,t),Le.init(e,t)});var DO=P("ZodCIDRv6",(e,t)=>{$b.init(e,t),Le.init(e,t)});var vO=P("ZodBase64",(e,t)=>{Ib.init(e,t),Le.init(e,t)});var CO=P("ZodBase64URL",(e,t)=>{Nb.init(e,t),Le.init(e,t)});var wO=P("ZodE164",(e,t)=>{Ob.init(e,t),Le.init(e,t)});var bO=P("ZodJWT",(e,t)=>{Mb.init(e,t),Le.init(e,t)});var Mu=P("ZodNumber",(e,t)=>{yd.init(e,t),Pe.init(e,t),e.gt=(n,o)=>e.check(ei(n,o)),e.gte=(n,o)=>e.check(Er(n,o)),e.min=(n,o)=>e.check(Er(n,o)),e.lt=(n,o)=>e.check(Xo(n,o)),e.lte=(n,o)=>e.check(hn(n,o)),e.max=(n,o)=>e.check(hn(n,o)),e.int=n=>e.check(u0(n)),e.safe=n=>e.check(u0(n)),e.positive=n=>e.check(ei(0,n)),e.nonnegative=n=>e.check(Er(0,n)),e.negative=n=>e.check(Xo(0,n)),e.nonpositive=n=>e.check(hn(0,n)),e.multipleOf=(n,o)=>e.check(Ds(n,o)),e.step=(n,o)=>e.check(Ds(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function he(e){return Mx(Mu,e)}var xO=P("ZodNumberFormat",(e,t)=>{Lb.init(e,t),Mu.init(e,t)});function u0(e){return Bx(xO,e)}var Bd=P("ZodBoolean",(e,t)=>{Bb.init(e,t),Pe.init(e,t)});function be(e){return zx(Bd,e)}var f0=P("ZodBigInt",(e,t)=>{zb.init(e,t),Pe.init(e,t),e.gte=(n,o)=>e.check(Er(n,o)),e.min=(n,o)=>e.check(Er(n,o)),e.gt=(n,o)=>e.check(ei(n,o)),e.gte=(n,o)=>e.check(Er(n,o)),e.min=(n,o)=>e.check(Er(n,o)),e.lt=(n,o)=>e.check(Xo(n,o)),e.lte=(n,o)=>e.check(hn(n,o)),e.max=(n,o)=>e.check(hn(n,o)),e.positive=n=>e.check(ei(BigInt(0),n)),e.negative=n=>e.check(Xo(BigInt(0),n)),e.nonpositive=n=>e.check(hn(BigInt(0),n)),e.nonnegative=n=>e.check(Er(BigInt(0),n)),e.multipleOf=(n,o)=>e.check(Ds(n,o));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});var SO=P("ZodNull",(e,t)=>{jb.init(e,t),Pe.init(e,t)});function zd(e){return Vx(SO,e)}var EO=P("ZodAny",(e,t)=>{Ub.init(e,t),Pe.init(e,t)});function m0(){return Hx(EO)}var _O=P("ZodUnknown",(e,t)=>{Vb.init(e,t),Pe.init(e,t)});function Be(){return qx(_O)}var PO=P("ZodNever",(e,t)=>{Hb.init(e,t),Pe.init(e,t)});function TO(e){return Kx(PO,e)}var h0=P("ZodDate",(e,t)=>{qb.init(e,t),Pe.init(e,t),e.min=(n,o)=>e.check(Er(n,o)),e.max=(n,o)=>e.check(hn(n,o));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});var AO=P("ZodArray",(e,t)=>{Kb.init(e,t),Pe.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(ti(r,n)),e.nonempty=r=>e.check(ti(1,r)),e.max=(r,n)=>e.check(Iu(r,n)),e.length=(r,n)=>e.check(Nu(r,n)),e.unwrap=()=>e.element});function N(e,t){return Wx(AO,e,t)}var g0=P("ZodObject",(e,t)=>{Gb.init(e,t),Pe.init(e,t),me.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Lt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Be()}),e.loose=()=>e.clone({...e._zod.def,catchall:Be()}),e.strict=()=>e.clone({...e._zod.def,catchall:TO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>me.extend(e,r),e.merge=r=>me.merge(e,r),e.pick=r=>me.pick(e,r),e.omit=r=>me.omit(e,r),e.partial=(...r)=>me.partial(v0,e,r[0]),e.required=(...r)=>me.required(C0,e,r[0])});function M(e,t){let r={type:"object",get shape(){return me.assignProp(this,"shape",{...e}),this.shape},...me.normalizeParams(t)};return new g0(r)}function Xe(e,t){return new g0({type:"object",get shape(){return me.assignProp(this,"shape",{...e}),this.shape},catchall:Be(),...me.normalizeParams(t)})}var y0=P("ZodUnion",(e,t)=>{Dd.init(e,t),Pe.init(e,t),e.options=t.options});function Te(e,t){return new y0({type:"union",options:e,...me.normalizeParams(t)})}var FO=P("ZodDiscriminatedUnion",(e,t)=>{y0.init(e,t),Wb.init(e,t)});function jd(e,t,r){return new FO({type:"union",options:t,discriminator:e,...me.normalizeParams(r)})}var RO=P("ZodIntersection",(e,t)=>{Zb.init(e,t),Pe.init(e,t)});function Lu(e,t){return new RO({type:"intersection",left:e,right:t})}var $O=P("ZodRecord",(e,t)=>{Jb.init(e,t),Pe.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function ze(e,t,r){return new $O({type:"record",keyType:e,valueType:t,...me.normalizeParams(r)})}var Od=P("ZodEnum",(e,t)=>{Yb.init(e,t),Pe.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let s={};for(let i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Od({...t,checks:[],...me.normalizeParams(o),entries:s})},e.exclude=(n,o)=>{let s={...t.entries};for(let i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Od({...t,checks:[],...me.normalizeParams(o),entries:s})}});function Lt(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Od({type:"enum",entries:r,...me.normalizeParams(t)})}var kO=P("ZodLiteral",(e,t)=>{Qb.init(e,t),Pe.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new kO({type:"literal",values:Array.isArray(e)?e:[e],...me.normalizeParams(t)})}var IO=P("ZodTransform",(e,t)=>{Xb.init(e,t),Pe.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=s=>{if(typeof s=="string")r.issues.push(me.issue(s,r.value,t));else{let i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!0),r.issues.push(me.issue(i))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function D0(e){return new IO({type:"transform",transform:e})}var v0=P("ZodOptional",(e,t)=>{ex.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new v0({type:"optional",innerType:e})}var NO=P("ZodNullable",(e,t)=>{tx.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function c0(e){return new NO({type:"nullable",innerType:e})}var OO=P("ZodDefault",(e,t)=>{rx.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function MO(e,t){return new OO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var LO=P("ZodPrefault",(e,t)=>{nx.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function BO(e,t){return new LO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var C0=P("ZodNonOptional",(e,t)=>{ox.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zO(e,t){return new C0({type:"nonoptional",innerType:e,...me.normalizeParams(t)})}var jO=P("ZodCatch",(e,t)=>{ix.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function UO(e,t){return new jO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var VO=P("ZodPipe",(e,t)=>{sx.init(e,t),Pe.init(e,t),e.in=t.in,e.out=t.out});function Md(e,t){return new VO({type:"pipe",in:e,out:t})}var HO=P("ZodReadonly",(e,t)=>{ax.init(e,t),Pe.init(e,t)});function qO(e){return new HO({type:"readonly",innerType:e})}var w0=P("ZodCustom",(e,t)=>{ux.init(e,t),Pe.init(e,t)});function KO(e){let t=new Dt({check:"custom"});return t._zod.check=e,t}function b0(e,t){return Zx(w0,e??(()=>!0),t)}function GO(e,t={}){return Jx(w0,e,t)}function WO(e){let t=KO(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(me.issue(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(me.issue(o))}},e(r.value,r)));return t}function Ud(e,t){return Md(D0(e),t)}var x0={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var Bu={};wa(Bu,{bigint:()=>QO,boolean:()=>YO,date:()=>XO,number:()=>JO,string:()=>ZO});function ZO(e){return dx(Ld,e)}function JO(e){return Lx(Mu,e)}function YO(e){return jx(Bd,e)}function QO(e){return Ux(f0,e)}function XO(e){return Gx(h0,e)}Jt(cx());var S0="io.modelcontextprotocol/related-task",ju="2.0",at=b0(e=>e!==null&&(typeof e=="object"||typeof e=="function")),E0=Te([D(),he().int()]),_0=D(),YQ=Xe({ttl:Te([he(),zd()]).optional(),pollInterval:he().optional()}),t2=M({ttl:he().optional()}),r2=M({taskId:D()}),Vd=Xe({progressToken:E0.optional(),[S0]:r2.optional()}),Yt=M({_meta:Vd.optional()}),Uu=Yt.extend({task:t2.optional()});var ut=M({method:D(),params:Yt.loose().optional()}),pr=M({_meta:Vd.optional()}),dr=M({method:D(),params:pr.loose().optional()}),ct=Xe({_meta:Vd.optional()}),Vu=Te([D(),he().int()]),n2=M({jsonrpc:B(ju),id:Vu,...ut.shape}).strict();var o2=M({jsonrpc:B(ju),...dr.shape}).strict();var P0=M({jsonrpc:B(ju),id:Vu,result:ct}).strict();var ws;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ws||(ws={}));var T0=M({jsonrpc:B(ju),id:Vu.optional(),error:M({code:he().int(),message:D(),data:Be().optional()})}).strict();var Hd=Te([n2,o2,P0,T0]),QQ=Te([P0,T0]),qd=ct.strict(),i2=pr.extend({requestId:Vu.optional(),reason:D().optional()}),Kd=dr.extend({method:B("notifications/cancelled"),params:i2}),s2=M({src:D(),mimeType:D().optional(),sizes:N(D()).optional(),theme:Lt(["light","dark"]).optional()}),bs=M({icons:N(s2).optional()}),ni=M({name:D(),title:D().optional()}),A0=ni.extend({...ni.shape,...bs.shape,version:D(),websiteUrl:D().optional(),description:D().optional()}),a2=Lu(M({applyDefaults:be().optional()}),ze(D(),Be())),u2=Ud(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Lu(M({form:a2.optional(),url:at.optional()}),ze(D(),Be()).optional())),c2=Xe({list:at.optional(),cancel:at.optional(),requests:Xe({sampling:Xe({createMessage:at.optional()}).optional(),elicitation:Xe({create:at.optional()}).optional()}).optional()}),l2=Xe({list:at.optional(),cancel:at.optional(),requests:Xe({tools:Xe({call:at.optional()}).optional()}).optional()}),p2=M({experimental:ze(D(),at).optional(),sampling:M({context:at.optional(),tools:at.optional()}).optional(),elicitation:u2.optional(),roots:M({listChanged:be().optional()}).optional(),tasks:c2.optional()}),d2=Yt.extend({protocolVersion:D(),capabilities:p2,clientInfo:A0}),f2=ut.extend({method:B("initialize"),params:d2});var m2=M({experimental:ze(D(),at).optional(),logging:at.optional(),completions:at.optional(),prompts:M({listChanged:be().optional()}).optional(),resources:M({subscribe:be().optional(),listChanged:be().optional()}).optional(),tools:M({listChanged:be().optional()}).optional(),tasks:l2.optional()}),F0=ct.extend({protocolVersion:D(),capabilities:m2,serverInfo:A0,instructions:D().optional()}),h2=dr.extend({method:B("notifications/initialized"),params:pr.optional()});var Gd=ut.extend({method:B("ping"),params:Yt.optional()}),g2=M({progress:he(),total:Ve(he()),message:Ve(D())}),y2=M({...pr.shape,...g2.shape,progressToken:E0}),Wd=dr.extend({method:B("notifications/progress"),params:y2}),D2=Yt.extend({cursor:_0.optional()}),xs=ut.extend({params:D2.optional()}),Ss=ct.extend({nextCursor:_0.optional()}),v2=Lt(["working","input_required","completed","failed","cancelled"]),Es=M({taskId:D(),status:v2,ttl:Te([he(),zd()]),createdAt:D(),lastUpdatedAt:D(),pollInterval:Ve(he()),statusMessage:Ve(D())}),Hu=ct.extend({task:Es}),C2=pr.merge(Es),Zd=dr.extend({method:B("notifications/tasks/status"),params:C2}),Jd=ut.extend({method:B("tasks/get"),params:Yt.extend({taskId:D()})}),Yd=ct.merge(Es),Qd=ut.extend({method:B("tasks/result"),params:Yt.extend({taskId:D()})}),XQ=ct.loose(),Xd=xs.extend({method:B("tasks/list")}),ef=Ss.extend({tasks:N(Es)}),tf=ut.extend({method:B("tasks/cancel"),params:Yt.extend({taskId:D()})}),w2=ct.merge(Es),R0=M({uri:D(),mimeType:Ve(D()),_meta:ze(D(),Be()).optional()}),$0=R0.extend({text:D()}),rf=D().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),k0=R0.extend({blob:rf}),_s=Lt(["user","assistant"]),oi=M({audience:N(_s).optional(),priority:he().min(0).max(1).optional(),lastModified:vs.datetime({offset:!0}).optional()}),I0=M({...ni.shape,...bs.shape,uri:D(),description:Ve(D()),mimeType:Ve(D()),annotations:oi.optional(),_meta:Ve(Xe({}))}),b2=M({...ni.shape,...bs.shape,uriTemplate:D(),description:Ve(D()),mimeType:Ve(D()),annotations:oi.optional(),_meta:Ve(Xe({}))}),x2=xs.extend({method:B("resources/list")}),N0=Ss.extend({resources:N(I0)}),S2=xs.extend({method:B("resources/templates/list")}),O0=Ss.extend({resourceTemplates:N(b2)}),nf=Yt.extend({uri:D()}),E2=nf,_2=ut.extend({method:B("resources/read"),params:E2}),M0=ct.extend({contents:N(Te([$0,k0]))}),L0=dr.extend({method:B("notifications/resources/list_changed"),params:pr.optional()}),P2=nf,T2=ut.extend({method:B("resources/subscribe"),params:P2}),A2=nf,F2=ut.extend({method:B("resources/unsubscribe"),params:A2}),R2=pr.extend({uri:D()}),$2=dr.extend({method:B("notifications/resources/updated"),params:R2}),k2=M({name:D(),description:Ve(D()),required:Ve(be())}),I2=M({...ni.shape,...bs.shape,description:Ve(D()),arguments:Ve(N(k2)),_meta:Ve(Xe({}))}),N2=xs.extend({method:B("prompts/list")}),B0=Ss.extend({prompts:N(I2)}),O2=Yt.extend({name:D(),arguments:ze(D(),D()).optional()}),M2=ut.extend({method:B("prompts/get"),params:O2}),of=M({type:B("text"),text:D(),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),sf=M({type:B("image"),data:rf,mimeType:D(),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),af=M({type:B("audio"),data:rf,mimeType:D(),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),L2=M({type:B("tool_use"),name:D(),id:D(),input:ze(D(),Be()),_meta:ze(D(),Be()).optional()}),B2=M({type:B("resource"),resource:Te([$0,k0]),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),z2=I0.extend({type:B("resource_link")}),uf=Te([of,sf,af,z2,B2]),j2=M({role:_s,content:uf}),z0=ct.extend({description:D().optional(),messages:N(j2)}),j0=dr.extend({method:B("notifications/prompts/list_changed"),params:pr.optional()}),U2=M({title:D().optional(),readOnlyHint:be().optional(),destructiveHint:be().optional(),idempotentHint:be().optional(),openWorldHint:be().optional()}),V2=M({taskSupport:Lt(["required","optional","forbidden"]).optional()}),U0=M({...ni.shape,...bs.shape,description:D().optional(),inputSchema:M({type:B("object"),properties:ze(D(),at).optional(),required:N(D()).optional()}).catchall(Be()),outputSchema:M({type:B("object"),properties:ze(D(),at).optional(),required:N(D()).optional()}).catchall(Be()).optional(),annotations:U2.optional(),execution:V2.optional(),_meta:ze(D(),Be()).optional()}),H2=xs.extend({method:B("tools/list")}),V0=Ss.extend({tools:N(U0)}),qu=ct.extend({content:N(uf).default([]),structuredContent:ze(D(),Be()).optional(),isError:be().optional()}),eX=qu.or(ct.extend({toolResult:Be()})),q2=Uu.extend({name:D(),arguments:ze(D(),Be()).optional()}),K2=ut.extend({method:B("tools/call"),params:q2}),H0=dr.extend({method:B("notifications/tools/list_changed"),params:pr.optional()}),G2=M({autoRefresh:be().default(!0),debounceMs:he().int().nonnegative().default(300)}),q0=Lt(["debug","info","notice","warning","error","critical","alert","emergency"]),W2=Yt.extend({level:q0}),Z2=ut.extend({method:B("logging/setLevel"),params:W2}),J2=pr.extend({level:q0,logger:D().optional(),data:Be()}),Y2=dr.extend({method:B("notifications/message"),params:J2}),Q2=M({name:D().optional()}),X2=M({hints:N(Q2).optional(),costPriority:he().min(0).max(1).optional(),speedPriority:he().min(0).max(1).optional(),intelligencePriority:he().min(0).max(1).optional()}),eM=M({mode:Lt(["auto","required","none"]).optional()}),tM=M({type:B("tool_result"),toolUseId:D().describe("The unique identifier for the corresponding tool call."),content:N(uf).default([]),structuredContent:M({}).loose().optional(),isError:be().optional(),_meta:ze(D(),Be()).optional()}),rM=jd("type",[of,sf,af]),zu=jd("type",[of,sf,af,L2,tM]),nM=M({role:_s,content:Te([zu,N(zu)]),_meta:ze(D(),Be()).optional()}),oM=Uu.extend({messages:N(nM),modelPreferences:X2.optional(),systemPrompt:D().optional(),includeContext:Lt(["none","thisServer","allServers"]).optional(),temperature:he().optional(),maxTokens:he().int(),stopSequences:N(D()).optional(),metadata:at.optional(),tools:N(U0).optional(),toolChoice:eM.optional()}),K0=ut.extend({method:B("sampling/createMessage"),params:oM}),G0=ct.extend({model:D(),stopReason:Ve(Lt(["endTurn","stopSequence","maxTokens"]).or(D())),role:_s,content:rM}),iM=ct.extend({model:D(),stopReason:Ve(Lt(["endTurn","stopSequence","maxTokens","toolUse"]).or(D())),role:_s,content:Te([zu,N(zu)])}),sM=M({type:B("boolean"),title:D().optional(),description:D().optional(),default:be().optional()}),aM=M({type:B("string"),title:D().optional(),description:D().optional(),minLength:he().optional(),maxLength:he().optional(),format:Lt(["email","uri","date","date-time"]).optional(),default:D().optional()}),uM=M({type:Lt(["number","integer"]),title:D().optional(),description:D().optional(),minimum:he().optional(),maximum:he().optional(),default:he().optional()}),cM=M({type:B("string"),title:D().optional(),description:D().optional(),enum:N(D()),default:D().optional()}),lM=M({type:B("string"),title:D().optional(),description:D().optional(),oneOf:N(M({const:D(),title:D()})),default:D().optional()}),pM=M({type:B("string"),title:D().optional(),description:D().optional(),enum:N(D()),enumNames:N(D()).optional(),default:D().optional()}),dM=Te([cM,lM]),fM=M({type:B("array"),title:D().optional(),description:D().optional(),minItems:he().optional(),maxItems:he().optional(),items:M({type:B("string"),enum:N(D())}),default:N(D()).optional()}),mM=M({type:B("array"),title:D().optional(),description:D().optional(),minItems:he().optional(),maxItems:he().optional(),items:M({anyOf:N(M({const:D(),title:D()}))}),default:N(D()).optional()}),hM=Te([fM,mM]),gM=Te([pM,dM,hM]),yM=Te([gM,sM,aM,uM]),DM=Uu.extend({mode:B("form").optional(),message:D(),requestedSchema:M({type:B("object"),properties:ze(D(),yM),required:N(D()).optional()})}),vM=Uu.extend({mode:B("url"),message:D(),elicitationId:D(),url:D().url()}),CM=Te([DM,vM]),W0=ut.extend({method:B("elicitation/create"),params:CM}),wM=pr.extend({elicitationId:D()}),bM=dr.extend({method:B("notifications/elicitation/complete"),params:wM}),Z0=ct.extend({action:Lt(["accept","decline","cancel"]),content:Ud(e=>e===null?void 0:e,ze(D(),Te([D(),he(),be(),N(D())])).optional())}),xM=M({type:B("ref/resource"),uri:D()});var SM=M({type:B("ref/prompt"),name:D()}),EM=Yt.extend({ref:Te([SM,xM]),argument:M({name:D(),value:D()}),context:M({arguments:ze(D(),D()).optional()}).optional()}),_M=ut.extend({method:B("completion/complete"),params:EM});var J0=ct.extend({completion:Xe({values:N(D()).max(100),total:Ve(he().int()),hasMore:Ve(be())})}),PM=M({uri:D().startsWith("file://"),name:D().optional(),_meta:ze(D(),Be()).optional()}),TM=ut.extend({method:B("roots/list"),params:Yt.optional()}),AM=ct.extend({roots:N(PM)}),FM=dr.extend({method:B("notifications/roots/list_changed"),params:pr.optional()}),tX=Te([Gd,f2,_M,Z2,M2,N2,x2,S2,_2,T2,F2,K2,H2,Jd,Qd,Xd,tf]),rX=Te([Kd,Wd,h2,FM,Zd]),nX=Te([qd,G0,iM,Z0,AM,Yd,ef,Hu]),oX=Te([Gd,K0,W0,TM,Jd,Qd,Xd,tf]),iX=Te([Kd,Wd,Y2,$2,L0,H0,j0,Zd,bM]),sX=Te([qd,F0,J0,z0,B0,N0,O0,M0,qu,V0,Yd,ef,Hu]);var RM=Symbol("Let zodToJsonSchema decide on which parser to use");var BX=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var AU=H(Km(),1),FU=H(V_(),1);var o8=H(RP(),1),$P=H(require("node:process"),1);var Voe=$P.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];var i8;i8=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);var ft=d0().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:x0.custom,message:"URL must be parseable",fatal:!0}),Zp}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),s8=Xe({resource:D().url(),authorization_servers:N(ft).optional(),jwks_uri:D().url().optional(),scopes_supported:N(D()).optional(),bearer_methods_supported:N(D()).optional(),resource_signing_alg_values_supported:N(D()).optional(),resource_name:D().optional(),resource_documentation:D().optional(),resource_policy_uri:D().url().optional(),resource_tos_uri:D().url().optional(),tls_client_certificate_bound_access_tokens:be().optional(),authorization_details_types_supported:N(D()).optional(),dpop_signing_alg_values_supported:N(D()).optional(),dpop_bound_access_tokens_required:be().optional()}),IP=Xe({issuer:D(),authorization_endpoint:ft,token_endpoint:ft,registration_endpoint:ft.optional(),scopes_supported:N(D()).optional(),response_types_supported:N(D()),response_modes_supported:N(D()).optional(),grant_types_supported:N(D()).optional(),token_endpoint_auth_methods_supported:N(D()).optional(),token_endpoint_auth_signing_alg_values_supported:N(D()).optional(),service_documentation:ft.optional(),revocation_endpoint:ft.optional(),revocation_endpoint_auth_methods_supported:N(D()).optional(),revocation_endpoint_auth_signing_alg_values_supported:N(D()).optional(),introspection_endpoint:D().optional(),introspection_endpoint_auth_methods_supported:N(D()).optional(),introspection_endpoint_auth_signing_alg_values_supported:N(D()).optional(),code_challenge_methods_supported:N(D()).optional(),client_id_metadata_document_supported:be().optional()}),a8=Xe({issuer:D(),authorization_endpoint:ft,token_endpoint:ft,userinfo_endpoint:ft.optional(),jwks_uri:ft,registration_endpoint:ft.optional(),scopes_supported:N(D()).optional(),response_types_supported:N(D()),response_modes_supported:N(D()).optional(),grant_types_supported:N(D()).optional(),acr_values_supported:N(D()).optional(),subject_types_supported:N(D()),id_token_signing_alg_values_supported:N(D()),id_token_encryption_alg_values_supported:N(D()).optional(),id_token_encryption_enc_values_supported:N(D()).optional(),userinfo_signing_alg_values_supported:N(D()).optional(),userinfo_encryption_alg_values_supported:N(D()).optional(),userinfo_encryption_enc_values_supported:N(D()).optional(),request_object_signing_alg_values_supported:N(D()).optional(),request_object_encryption_alg_values_supported:N(D()).optional(),request_object_encryption_enc_values_supported:N(D()).optional(),token_endpoint_auth_methods_supported:N(D()).optional(),token_endpoint_auth_signing_alg_values_supported:N(D()).optional(),display_values_supported:N(D()).optional(),claim_types_supported:N(D()).optional(),claims_supported:N(D()).optional(),service_documentation:D().optional(),claims_locales_supported:N(D()).optional(),ui_locales_supported:N(D()).optional(),claims_parameter_supported:be().optional(),request_parameter_supported:be().optional(),request_uri_parameter_supported:be().optional(),require_request_uri_registration:be().optional(),op_policy_uri:ft.optional(),op_tos_uri:ft.optional(),client_id_metadata_document_supported:be().optional()}),u8=M({...a8.shape,...IP.pick({code_challenge_methods_supported:!0}).shape}),c8=M({access_token:D(),id_token:D().optional(),token_type:D(),expires_in:Bu.number().optional(),scope:D().optional(),refresh_token:D().optional()}).strip(),l8=M({error:D(),error_description:D().optional(),error_uri:D().optional()}),kP=ft.optional().or(B("").transform(()=>{})),p8=M({redirect_uris:N(ft),token_endpoint_auth_method:D().optional(),grant_types:N(D()).optional(),response_types:N(D()).optional(),client_name:D().optional(),client_uri:ft.optional(),logo_uri:kP,scope:D().optional(),contacts:N(D()).optional(),tos_uri:kP,policy_uri:D().optional(),jwks_uri:ft.optional(),jwks:m0().optional(),software_id:D().optional(),software_version:D().optional(),software_statement:D().optional()}).strip(),d8=M({client_id:D(),client_secret:D().optional(),client_id_issued_at:he().optional(),client_secret_expires_at:he().optional()}).strip(),f8=p8.merge(d8),Goe=M({error:D(),error_description:D().optional()}).strip(),Woe=M({token:D(),token_type_hint:D().optional()}).strip();var We=class extends Error{constructor(t,r){super(t),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){let t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}},na=class extends We{};na.errorCode="invalid_request";var xi=class extends We{};xi.errorCode="invalid_client";var Si=class extends We{};Si.errorCode="invalid_grant";var Ei=class extends We{};Ei.errorCode="unauthorized_client";var oa=class extends We{};oa.errorCode="unsupported_grant_type";var ia=class extends We{};ia.errorCode="invalid_scope";var sa=class extends We{};sa.errorCode="access_denied";var _i=class extends We{};_i.errorCode="server_error";var aa=class extends We{};aa.errorCode="temporarily_unavailable";var ua=class extends We{};ua.errorCode="unsupported_response_type";var ca=class extends We{};ca.errorCode="unsupported_token_type";var la=class extends We{};la.errorCode="invalid_token";var pa=class extends We{};pa.errorCode="method_not_allowed";var da=class extends We{};da.errorCode="too_many_requests";var Pi=class extends We{};Pi.errorCode="invalid_client_metadata";var fa=class extends We{};fa.errorCode="insufficient_scope";var ma=class extends We{};ma.errorCode="invalid_target";var m8={[na.errorCode]:na,[xi.errorCode]:xi,[Si.errorCode]:Si,[Ei.errorCode]:Ei,[oa.errorCode]:oa,[ia.errorCode]:ia,[sa.errorCode]:sa,[_i.errorCode]:_i,[aa.errorCode]:aa,[ua.errorCode]:ua,[ca.errorCode]:ca,[la.errorCode]:la,[pa.errorCode]:pa,[da.errorCode]:da,[Pi.errorCode]:Pi,[fa.errorCode]:fa,[ma.errorCode]:ma};var L8=H(require("@sentry/node"),1);var B8=H(BP(),1);var z8=()=>{if(typeof globalThis<"u"&&globalThis.crypto)return globalThis.crypto;if(typeof require<"u")try{let e=require("crypto");if(e.webcrypto)return e.webcrypto}catch{}throw new Error("Web Crypto API is not available. Requires Node.js 15+ or a browser environment.")},Iie=z8();var ph=H(require("node:process"),1);function dh(){let{env:e}=ph.default,{TERM:t,TERM_PROGRAM:r}=e;return ph.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var fh=H(Wn(),1),Ti=H(Ta(),1),ha=H(Wn(),1),hh=()=>{let e=mh?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=mh?80:120,r,n=!1,o="",s="",i="",a=g=>{let y=g>1?"Something went wrong":"Canceled";n&&h(y,g)},u=(g,y)=>{console.error(y,g),a(2)},c=()=>a(1),l=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",a)},p=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",a)},d=(g="")=>{n=!0,o=g.replace(/\.+$/,""),process.stdout.write(`${fh.default.gray(V8)}
1532
+ })));`),d.write(`newResult[${uo(b)}] = ${w}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let y=d.compile();return(b,w)=>y(p,b,w)},o,s=Jo,i=!Eu.jitless,u=i&&rd.value,c=t.catchall,l;e._zod.parse=(p,d)=>{l??(l=r.value);let h=p.value;if(!s(h))return p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p;let m=[];if(i&&u&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),p=o(p,d);else{p.value={};let w=l.shape;for(let T of l.keys){let E=w[T],F=E._zod.run({value:h[T],issues:[]},d),$=E._zod.optin==="optional"&&E._zod.optout==="optional";F instanceof Promise?m.push(F.then(I=>$?sb(I,p,T,h):$u(I,p,T))):$?sb(F,p,T,h):$u(F,p,T)}}if(!c)return m.length?Promise.all(m).then(()=>p):p;let f=[],g=l.keySet,y=c._zod,b=y.def.type;for(let w of Object.keys(h)){if(g.has(w))continue;if(b==="never"){f.push(w);continue}let T=y.run({value:h[w],issues:[]},d);T instanceof Promise?m.push(T.then(E=>$u(E,p,w))):$u(T,p,w)}return f.length&&p.issues.push({code:"unrecognized_keys",keys:f,input:h,inst:e}),m.length?Promise.all(m).then(()=>p):p}});function ab(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>Sr(s,n,Jt())))}),t}var Dd=P("$ZodUnion",(e,t)=>{De.init(e,t),_e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),_e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),_e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),_e(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>hs(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let o=!1,s=[];for(let i of t.options){let a=i._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)s.push(a),o=!0;else{if(a.issues.length===0)return a;s.push(a)}}return o?Promise.all(s).then(i=>ab(i,r,e,n)):ab(s,r,e,n)}}),Wb=P("$ZodDiscriminatedUnion",(e,t)=>{Dd.init(e,t);let r=e._zod.parse;_e(e._zod,"propValues",()=>{let o={};for(let s of t.options){let i=s._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[a,u]of Object.entries(i)){o[a]||(o[a]=new Set);for(let c of u)o[a].add(c)}}return o});let n=fs(()=>{let o=t.options,s=new Map;for(let i of o){let a=i._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let u of a){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,i)}}return s});e._zod.parse=(o,s)=>{let i=o.value;if(!Jo(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),o;let a=n.value.get(i?.[t.discriminator]);return a?a._zod.run(o,s):t.unionFallback?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:i,path:[t.discriminator],inst:e}),o)}}),Zb=P("$ZodIntersection",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([u,c])=>ub(r,u,c)):ub(r,s,i)}});function gd(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Yo(e)&&Yo(t)){let r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(let s of n){let i=gd(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],s=t[n],i=gd(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ub(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),co(e))return e;let n=gd(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}var Jb=P("$ZodRecord",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Yo(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let s=[];if(t.keyType._zod.values){let i=t.keyType._zod.values;r.value={};for(let u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){let c=t.valueType._zod.run({value:o[u],issues:[]},n);c instanceof Promise?s.push(c.then(l=>{l.issues.length&&r.issues.push(...Yr(u,l.issues)),r.value[u]=l.value})):(c.issues.length&&r.issues.push(...Yr(u,c.issues)),r.value[u]=c.value)}let a;for(let u in o)i.has(u)||(a=a??[],a.push(u));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{r.value={};for(let i of Reflect.ownKeys(o)){if(i==="__proto__")continue;let a=t.keyType._zod.run({value:i,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(c=>Sr(c,n,Jt())),input:i,path:[i],inst:e}),r.value[a.value]=a.value;continue}let u=t.valueType._zod.run({value:o[i],issues:[]},n);u instanceof Promise?s.push(u.then(c=>{c.issues.length&&r.issues.push(...Yr(i,c.issues)),r.value[a.value]=c.value})):(u.issues.length&&r.issues.push(...Yr(i,u.issues)),r.value[a.value]=u.value)}}return s.length?Promise.all(s).then(()=>r):r}});var Yb=P("$ZodEnum",(e,t)=>{De.init(e,t);let r=Qp(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>nd.has(typeof n)).map(n=>typeof n=="string"?In(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return e._zod.values.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),Qb=P("$ZodLiteral",(e,t)=>{De.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?In(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}});var Xb=P("$ZodTransform",(e,t)=>{De.init(e,t),e._zod.parse=(r,n)=>{let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new hn;return r.value=o,r}}),ex=P("$ZodOptional",(e,t)=>{De.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_e(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${hs(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),tx=P("$ZodNullable",(e,t)=>{De.init(e,t),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${hs(r.source)}|null)$`):void 0}),_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),rx=P("$ZodDefault",(e,t)=>{De.init(e,t),e._zod.optin="optional",_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>cb(s,t)):cb(o,t)}});function cb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var nx=P("$ZodPrefault",(e,t)=>{De.init(e,t),e._zod.optin="optional",_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ox=P("$ZodNonOptional",(e,t)=>{De.init(e,t),_e(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>lb(s,e)):lb(o,e)}});function lb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var ix=P("$ZodCatch",(e,t)=>{De.init(e,t),e._zod.optin="optional",_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>Sr(i,n,Jt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Sr(s,n,Jt()))},input:r.value}),r.issues=[]),r)}});var sx=P("$ZodPipe",(e,t)=>{De.init(e,t),_e(e._zod,"values",()=>t.in._zod.values),_e(e._zod,"optin",()=>t.in._zod.optin),_e(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>pb(s,t,n)):pb(o,t,n)}});function pb(e,t,r){return co(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var ax=P("$ZodReadonly",(e,t)=>{De.init(e,t),_e(e._zod,"propValues",()=>t.innerType._zod.propValues),_e(e._zod,"values",()=>t.innerType._zod.values),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(db):db(o)}});function db(e){return e.value=Object.freeze(e.value),e}var ux=P("$ZodCustom",(e,t)=>{Dt.init(e,t),De.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>fb(s,r,n,e));fb(o,r,n,e)}});function fb(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(sd(o))}}var YN=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},QN=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${YN(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Tu(n.values[0])}`:`Invalid option: expected one of ${_u(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${_u(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function cx(){return{localeError:QN()}}var XN=Symbol("ZodOutput"),eO=Symbol("ZodInput"),vd=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function lx(){return new vd}var Qo=lx();function px(e,t){return new e({type:"string",...U(t)})}function dx(e,t){return new e({type:"string",coerce:!0,...U(t)})}function fx(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...U(t)})}function Cd(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...U(t)})}function mx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...U(t)})}function hx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...U(t)})}function gx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...U(t)})}function yx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...U(t)})}function wd(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...U(t)})}function Dx(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...U(t)})}function vx(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...U(t)})}function Cx(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...U(t)})}function wx(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...U(t)})}function bx(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...U(t)})}function xx(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...U(t)})}function Sx(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...U(t)})}function Ex(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...U(t)})}function _x(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...U(t)})}function Px(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...U(t)})}function Tx(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...U(t)})}function Ax(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...U(t)})}function Fx(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...U(t)})}function Rx(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...U(t)})}function $x(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...U(t)})}function kx(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...U(t)})}function Ix(e,t){return new e({type:"string",format:"date",check:"string_format",...U(t)})}function Nx(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...U(t)})}function Ox(e,t){return new e({type:"string",format:"duration",check:"string_format",...U(t)})}function Mx(e,t){return new e({type:"number",checks:[],...U(t)})}function Lx(e,t){return new e({type:"number",coerce:!0,checks:[],...U(t)})}function Bx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...U(t)})}function zx(e,t){return new e({type:"boolean",...U(t)})}function jx(e,t){return new e({type:"boolean",coerce:!0,...U(t)})}function Ux(e,t){return new e({type:"bigint",coerce:!0,...U(t)})}function Vx(e,t){return new e({type:"null",...U(t)})}function Hx(e){return new e({type:"any"})}function qx(e){return new e({type:"unknown"})}function Kx(e,t){return new e({type:"never",...U(t)})}function Gx(e,t){return new e({type:"date",coerce:!0,...U(t)})}function Xo(e,t){return new md({check:"less_than",...U(t),value:e,inclusive:!1})}function gn(e,t){return new md({check:"less_than",...U(t),value:e,inclusive:!0})}function ei(e,t){return new hd({check:"greater_than",...U(t),value:e,inclusive:!1})}function Er(e,t){return new hd({check:"greater_than",...U(t),value:e,inclusive:!0})}function Ds(e,t){return new qw({check:"multiple_of",...U(t),value:e})}function Iu(e,t){return new Gw({check:"max_length",...U(t),maximum:e})}function ti(e,t){return new Ww({check:"min_length",...U(t),minimum:e})}function Nu(e,t){return new Zw({check:"length_equals",...U(t),length:e})}function bd(e,t){return new Jw({check:"string_format",format:"regex",...U(t),pattern:e})}function xd(e){return new Yw({check:"string_format",format:"lowercase",...U(e)})}function Sd(e){return new Qw({check:"string_format",format:"uppercase",...U(e)})}function Ed(e,t){return new Xw({check:"string_format",format:"includes",...U(t),includes:e})}function _d(e,t){return new eb({check:"string_format",format:"starts_with",...U(t),prefix:e})}function Pd(e,t){return new tb({check:"string_format",format:"ends_with",...U(t),suffix:e})}function lo(e){return new rb({check:"overwrite",tx:e})}function Td(e){return lo(t=>t.normalize(e))}function Ad(){return lo(e=>e.trim())}function Fd(){return lo(e=>e.toLowerCase())}function Rd(){return lo(e=>e.toUpperCase())}function Wx(e,t,r){return new e({type:"array",element:t,...U(r)})}function Zx(e,t,r){let n=U(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Jx(e,t,r){return new e({type:"custom",check:"custom",fn:t,...U(r)})}var vs={};wa(vs,{ZodISODate:()=>Qx,ZodISODateTime:()=>Yx,ZodISODuration:()=>e0,ZodISOTime:()=>Xx,date:()=>kd,datetime:()=>$d,duration:()=>Nd,time:()=>Id});var Yx=P("ZodISODateTime",(e,t)=>{Eb.init(e,t),Le.init(e,t)});function $d(e){return kx(Yx,e)}var Qx=P("ZodISODate",(e,t)=>{_b.init(e,t),Le.init(e,t)});function kd(e){return Ix(Qx,e)}var Xx=P("ZodISOTime",(e,t)=>{Pb.init(e,t),Le.init(e,t)});function Id(e){return Nx(Xx,e)}var e0=P("ZodISODuration",(e,t)=>{Tb.init(e,t),Le.init(e,t)});function Nd(e){return Ox(e0,e)}var r0=(e,t)=>{Au.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cd(e,r)},flatten:{value:r=>ud(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},uQ=P("ZodError",r0),Cs=P("ZodError",r0,{Parent:Error});var n0=lw(Cs),o0=pw(Cs),i0=ld(Cs),s0=pd(Cs);var Pe=P("ZodType",(e,t)=>(De.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>xr(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>n0(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>i0(e,r,n),e.parseAsync=async(r,n)=>o0(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>s0(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(WO(r,n)),e.superRefine=r=>e.check(ZO(r)),e.overwrite=r=>e.check(lo(r)),e.optional=()=>Ve(e),e.nullable=()=>c0(e),e.nullish=()=>Ve(c0(e)),e.nonoptional=r=>jO(e,r),e.array=()=>N(e),e.or=r=>Te([e,r]),e.and=r=>Lu(e,r),e.transform=r=>Md(e,D0(r)),e.default=r=>LO(e,r),e.prefault=r=>zO(e,r),e.catch=r=>VO(e,r),e.pipe=r=>Md(e,r),e.readonly=()=>KO(e),e.describe=r=>{let n=e.clone();return Qo.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Qo.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Qo.get(e);let n=e.clone();return Qo.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),l0=P("_ZodString",(e,t)=>{ku.init(e,t),Pe.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(bd(...n)),e.includes=(...n)=>e.check(Ed(...n)),e.startsWith=(...n)=>e.check(_d(...n)),e.endsWith=(...n)=>e.check(Pd(...n)),e.min=(...n)=>e.check(ti(...n)),e.max=(...n)=>e.check(Iu(...n)),e.length=(...n)=>e.check(Nu(...n)),e.nonempty=(...n)=>e.check(ti(1,...n)),e.lowercase=n=>e.check(xd(n)),e.uppercase=n=>e.check(Sd(n)),e.trim=()=>e.check(Ad()),e.normalize=(...n)=>e.check(Td(...n)),e.toLowerCase=()=>e.check(Fd()),e.toUpperCase=()=>e.check(Rd())}),Ld=P("ZodString",(e,t)=>{ku.init(e,t),l0.init(e,t),e.email=r=>e.check(fx(uO,r)),e.url=r=>e.check(wd(p0,r)),e.jwt=r=>e.check($x(xO,r)),e.emoji=r=>e.check(Dx(cO,r)),e.guid=r=>e.check(Cd(a0,r)),e.uuid=r=>e.check(mx(Ou,r)),e.uuidv4=r=>e.check(hx(Ou,r)),e.uuidv6=r=>e.check(gx(Ou,r)),e.uuidv7=r=>e.check(yx(Ou,r)),e.nanoid=r=>e.check(vx(lO,r)),e.guid=r=>e.check(Cd(a0,r)),e.cuid=r=>e.check(Cx(pO,r)),e.cuid2=r=>e.check(wx(dO,r)),e.ulid=r=>e.check(bx(fO,r)),e.base64=r=>e.check(Ax(CO,r)),e.base64url=r=>e.check(Fx(wO,r)),e.xid=r=>e.check(xx(mO,r)),e.ksuid=r=>e.check(Sx(hO,r)),e.ipv4=r=>e.check(Ex(gO,r)),e.ipv6=r=>e.check(_x(yO,r)),e.cidrv4=r=>e.check(Px(DO,r)),e.cidrv6=r=>e.check(Tx(vO,r)),e.e164=r=>e.check(Rx(bO,r)),e.datetime=r=>e.check($d(r)),e.date=r=>e.check(kd(r)),e.time=r=>e.check(Id(r)),e.duration=r=>e.check(Nd(r))});function D(e){return px(Ld,e)}var Le=P("ZodStringFormat",(e,t)=>{ke.init(e,t),l0.init(e,t)}),uO=P("ZodEmail",(e,t)=>{gb.init(e,t),Le.init(e,t)});var a0=P("ZodGUID",(e,t)=>{mb.init(e,t),Le.init(e,t)});var Ou=P("ZodUUID",(e,t)=>{hb.init(e,t),Le.init(e,t)});var p0=P("ZodURL",(e,t)=>{yb.init(e,t),Le.init(e,t)});function d0(e){return wd(p0,e)}var cO=P("ZodEmoji",(e,t)=>{Db.init(e,t),Le.init(e,t)});var lO=P("ZodNanoID",(e,t)=>{vb.init(e,t),Le.init(e,t)});var pO=P("ZodCUID",(e,t)=>{Cb.init(e,t),Le.init(e,t)});var dO=P("ZodCUID2",(e,t)=>{wb.init(e,t),Le.init(e,t)});var fO=P("ZodULID",(e,t)=>{bb.init(e,t),Le.init(e,t)});var mO=P("ZodXID",(e,t)=>{xb.init(e,t),Le.init(e,t)});var hO=P("ZodKSUID",(e,t)=>{Sb.init(e,t),Le.init(e,t)});var gO=P("ZodIPv4",(e,t)=>{Ab.init(e,t),Le.init(e,t)});var yO=P("ZodIPv6",(e,t)=>{Fb.init(e,t),Le.init(e,t)});var DO=P("ZodCIDRv4",(e,t)=>{Rb.init(e,t),Le.init(e,t)});var vO=P("ZodCIDRv6",(e,t)=>{$b.init(e,t),Le.init(e,t)});var CO=P("ZodBase64",(e,t)=>{Ib.init(e,t),Le.init(e,t)});var wO=P("ZodBase64URL",(e,t)=>{Nb.init(e,t),Le.init(e,t)});var bO=P("ZodE164",(e,t)=>{Ob.init(e,t),Le.init(e,t)});var xO=P("ZodJWT",(e,t)=>{Mb.init(e,t),Le.init(e,t)});var Mu=P("ZodNumber",(e,t)=>{yd.init(e,t),Pe.init(e,t),e.gt=(n,o)=>e.check(ei(n,o)),e.gte=(n,o)=>e.check(Er(n,o)),e.min=(n,o)=>e.check(Er(n,o)),e.lt=(n,o)=>e.check(Xo(n,o)),e.lte=(n,o)=>e.check(gn(n,o)),e.max=(n,o)=>e.check(gn(n,o)),e.int=n=>e.check(u0(n)),e.safe=n=>e.check(u0(n)),e.positive=n=>e.check(ei(0,n)),e.nonnegative=n=>e.check(Er(0,n)),e.negative=n=>e.check(Xo(0,n)),e.nonpositive=n=>e.check(gn(0,n)),e.multipleOf=(n,o)=>e.check(Ds(n,o)),e.step=(n,o)=>e.check(Ds(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function he(e){return Mx(Mu,e)}var SO=P("ZodNumberFormat",(e,t)=>{Lb.init(e,t),Mu.init(e,t)});function u0(e){return Bx(SO,e)}var Bd=P("ZodBoolean",(e,t)=>{Bb.init(e,t),Pe.init(e,t)});function be(e){return zx(Bd,e)}var f0=P("ZodBigInt",(e,t)=>{zb.init(e,t),Pe.init(e,t),e.gte=(n,o)=>e.check(Er(n,o)),e.min=(n,o)=>e.check(Er(n,o)),e.gt=(n,o)=>e.check(ei(n,o)),e.gte=(n,o)=>e.check(Er(n,o)),e.min=(n,o)=>e.check(Er(n,o)),e.lt=(n,o)=>e.check(Xo(n,o)),e.lte=(n,o)=>e.check(gn(n,o)),e.max=(n,o)=>e.check(gn(n,o)),e.positive=n=>e.check(ei(BigInt(0),n)),e.negative=n=>e.check(Xo(BigInt(0),n)),e.nonpositive=n=>e.check(gn(BigInt(0),n)),e.nonnegative=n=>e.check(Er(BigInt(0),n)),e.multipleOf=(n,o)=>e.check(Ds(n,o));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});var EO=P("ZodNull",(e,t)=>{jb.init(e,t),Pe.init(e,t)});function zd(e){return Vx(EO,e)}var _O=P("ZodAny",(e,t)=>{Ub.init(e,t),Pe.init(e,t)});function m0(){return Hx(_O)}var PO=P("ZodUnknown",(e,t)=>{Vb.init(e,t),Pe.init(e,t)});function Be(){return qx(PO)}var TO=P("ZodNever",(e,t)=>{Hb.init(e,t),Pe.init(e,t)});function AO(e){return Kx(TO,e)}var h0=P("ZodDate",(e,t)=>{qb.init(e,t),Pe.init(e,t),e.min=(n,o)=>e.check(Er(n,o)),e.max=(n,o)=>e.check(gn(n,o));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});var FO=P("ZodArray",(e,t)=>{Kb.init(e,t),Pe.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(ti(r,n)),e.nonempty=r=>e.check(ti(1,r)),e.max=(r,n)=>e.check(Iu(r,n)),e.length=(r,n)=>e.check(Nu(r,n)),e.unwrap=()=>e.element});function N(e,t){return Wx(FO,e,t)}var g0=P("ZodObject",(e,t)=>{Gb.init(e,t),Pe.init(e,t),me.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Lt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Be()}),e.loose=()=>e.clone({...e._zod.def,catchall:Be()}),e.strict=()=>e.clone({...e._zod.def,catchall:AO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>me.extend(e,r),e.merge=r=>me.merge(e,r),e.pick=r=>me.pick(e,r),e.omit=r=>me.omit(e,r),e.partial=(...r)=>me.partial(v0,e,r[0]),e.required=(...r)=>me.required(C0,e,r[0])});function M(e,t){let r={type:"object",get shape(){return me.assignProp(this,"shape",{...e}),this.shape},...me.normalizeParams(t)};return new g0(r)}function Xe(e,t){return new g0({type:"object",get shape(){return me.assignProp(this,"shape",{...e}),this.shape},catchall:Be(),...me.normalizeParams(t)})}var y0=P("ZodUnion",(e,t)=>{Dd.init(e,t),Pe.init(e,t),e.options=t.options});function Te(e,t){return new y0({type:"union",options:e,...me.normalizeParams(t)})}var RO=P("ZodDiscriminatedUnion",(e,t)=>{y0.init(e,t),Wb.init(e,t)});function jd(e,t,r){return new RO({type:"union",options:t,discriminator:e,...me.normalizeParams(r)})}var $O=P("ZodIntersection",(e,t)=>{Zb.init(e,t),Pe.init(e,t)});function Lu(e,t){return new $O({type:"intersection",left:e,right:t})}var kO=P("ZodRecord",(e,t)=>{Jb.init(e,t),Pe.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function ze(e,t,r){return new kO({type:"record",keyType:e,valueType:t,...me.normalizeParams(r)})}var Od=P("ZodEnum",(e,t)=>{Yb.init(e,t),Pe.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let s={};for(let i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Od({...t,checks:[],...me.normalizeParams(o),entries:s})},e.exclude=(n,o)=>{let s={...t.entries};for(let i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Od({...t,checks:[],...me.normalizeParams(o),entries:s})}});function Lt(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Od({type:"enum",entries:r,...me.normalizeParams(t)})}var IO=P("ZodLiteral",(e,t)=>{Qb.init(e,t),Pe.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new IO({type:"literal",values:Array.isArray(e)?e:[e],...me.normalizeParams(t)})}var NO=P("ZodTransform",(e,t)=>{Xb.init(e,t),Pe.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=s=>{if(typeof s=="string")r.issues.push(me.issue(s,r.value,t));else{let i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!0),r.issues.push(me.issue(i))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function D0(e){return new NO({type:"transform",transform:e})}var v0=P("ZodOptional",(e,t)=>{ex.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new v0({type:"optional",innerType:e})}var OO=P("ZodNullable",(e,t)=>{tx.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function c0(e){return new OO({type:"nullable",innerType:e})}var MO=P("ZodDefault",(e,t)=>{rx.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function LO(e,t){return new MO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var BO=P("ZodPrefault",(e,t)=>{nx.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zO(e,t){return new BO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var C0=P("ZodNonOptional",(e,t)=>{ox.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jO(e,t){return new C0({type:"nonoptional",innerType:e,...me.normalizeParams(t)})}var UO=P("ZodCatch",(e,t)=>{ix.init(e,t),Pe.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function VO(e,t){return new UO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var HO=P("ZodPipe",(e,t)=>{sx.init(e,t),Pe.init(e,t),e.in=t.in,e.out=t.out});function Md(e,t){return new HO({type:"pipe",in:e,out:t})}var qO=P("ZodReadonly",(e,t)=>{ax.init(e,t),Pe.init(e,t)});function KO(e){return new qO({type:"readonly",innerType:e})}var w0=P("ZodCustom",(e,t)=>{ux.init(e,t),Pe.init(e,t)});function GO(e){let t=new Dt({check:"custom"});return t._zod.check=e,t}function b0(e,t){return Zx(w0,e??(()=>!0),t)}function WO(e,t={}){return Jx(w0,e,t)}function ZO(e){let t=GO(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(me.issue(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(me.issue(o))}},e(r.value,r)));return t}function Ud(e,t){return Md(D0(e),t)}var x0={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var Bu={};wa(Bu,{bigint:()=>XO,boolean:()=>QO,date:()=>e2,number:()=>YO,string:()=>JO});function JO(e){return dx(Ld,e)}function YO(e){return Lx(Mu,e)}function QO(e){return jx(Bd,e)}function XO(e){return Ux(f0,e)}function e2(e){return Gx(h0,e)}Jt(cx());var S0="io.modelcontextprotocol/related-task",ju="2.0",at=b0(e=>e!==null&&(typeof e=="object"||typeof e=="function")),E0=Te([D(),he().int()]),_0=D(),rX=Xe({ttl:Te([he(),zd()]).optional(),pollInterval:he().optional()}),r2=M({ttl:he().optional()}),n2=M({taskId:D()}),Vd=Xe({progressToken:E0.optional(),[S0]:n2.optional()}),Yt=M({_meta:Vd.optional()}),Uu=Yt.extend({task:r2.optional()});var ut=M({method:D(),params:Yt.loose().optional()}),pr=M({_meta:Vd.optional()}),dr=M({method:D(),params:pr.loose().optional()}),ct=Xe({_meta:Vd.optional()}),Vu=Te([D(),he().int()]),o2=M({jsonrpc:B(ju),id:Vu,...ut.shape}).strict();var i2=M({jsonrpc:B(ju),...dr.shape}).strict();var P0=M({jsonrpc:B(ju),id:Vu,result:ct}).strict();var ws;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ws||(ws={}));var T0=M({jsonrpc:B(ju),id:Vu.optional(),error:M({code:he().int(),message:D(),data:Be().optional()})}).strict();var Hd=Te([o2,i2,P0,T0]),nX=Te([P0,T0]),qd=ct.strict(),s2=pr.extend({requestId:Vu.optional(),reason:D().optional()}),Kd=dr.extend({method:B("notifications/cancelled"),params:s2}),a2=M({src:D(),mimeType:D().optional(),sizes:N(D()).optional(),theme:Lt(["light","dark"]).optional()}),bs=M({icons:N(a2).optional()}),ni=M({name:D(),title:D().optional()}),A0=ni.extend({...ni.shape,...bs.shape,version:D(),websiteUrl:D().optional(),description:D().optional()}),u2=Lu(M({applyDefaults:be().optional()}),ze(D(),Be())),c2=Ud(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Lu(M({form:u2.optional(),url:at.optional()}),ze(D(),Be()).optional())),l2=Xe({list:at.optional(),cancel:at.optional(),requests:Xe({sampling:Xe({createMessage:at.optional()}).optional(),elicitation:Xe({create:at.optional()}).optional()}).optional()}),p2=Xe({list:at.optional(),cancel:at.optional(),requests:Xe({tools:Xe({call:at.optional()}).optional()}).optional()}),d2=M({experimental:ze(D(),at).optional(),sampling:M({context:at.optional(),tools:at.optional()}).optional(),elicitation:c2.optional(),roots:M({listChanged:be().optional()}).optional(),tasks:l2.optional()}),f2=Yt.extend({protocolVersion:D(),capabilities:d2,clientInfo:A0}),m2=ut.extend({method:B("initialize"),params:f2});var h2=M({experimental:ze(D(),at).optional(),logging:at.optional(),completions:at.optional(),prompts:M({listChanged:be().optional()}).optional(),resources:M({subscribe:be().optional(),listChanged:be().optional()}).optional(),tools:M({listChanged:be().optional()}).optional(),tasks:p2.optional()}),F0=ct.extend({protocolVersion:D(),capabilities:h2,serverInfo:A0,instructions:D().optional()}),g2=dr.extend({method:B("notifications/initialized"),params:pr.optional()});var Gd=ut.extend({method:B("ping"),params:Yt.optional()}),y2=M({progress:he(),total:Ve(he()),message:Ve(D())}),D2=M({...pr.shape,...y2.shape,progressToken:E0}),Wd=dr.extend({method:B("notifications/progress"),params:D2}),v2=Yt.extend({cursor:_0.optional()}),xs=ut.extend({params:v2.optional()}),Ss=ct.extend({nextCursor:_0.optional()}),C2=Lt(["working","input_required","completed","failed","cancelled"]),Es=M({taskId:D(),status:C2,ttl:Te([he(),zd()]),createdAt:D(),lastUpdatedAt:D(),pollInterval:Ve(he()),statusMessage:Ve(D())}),Hu=ct.extend({task:Es}),w2=pr.merge(Es),Zd=dr.extend({method:B("notifications/tasks/status"),params:w2}),Jd=ut.extend({method:B("tasks/get"),params:Yt.extend({taskId:D()})}),Yd=ct.merge(Es),Qd=ut.extend({method:B("tasks/result"),params:Yt.extend({taskId:D()})}),oX=ct.loose(),Xd=xs.extend({method:B("tasks/list")}),ef=Ss.extend({tasks:N(Es)}),tf=ut.extend({method:B("tasks/cancel"),params:Yt.extend({taskId:D()})}),b2=ct.merge(Es),R0=M({uri:D(),mimeType:Ve(D()),_meta:ze(D(),Be()).optional()}),$0=R0.extend({text:D()}),rf=D().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),k0=R0.extend({blob:rf}),_s=Lt(["user","assistant"]),oi=M({audience:N(_s).optional(),priority:he().min(0).max(1).optional(),lastModified:vs.datetime({offset:!0}).optional()}),I0=M({...ni.shape,...bs.shape,uri:D(),description:Ve(D()),mimeType:Ve(D()),annotations:oi.optional(),_meta:Ve(Xe({}))}),x2=M({...ni.shape,...bs.shape,uriTemplate:D(),description:Ve(D()),mimeType:Ve(D()),annotations:oi.optional(),_meta:Ve(Xe({}))}),S2=xs.extend({method:B("resources/list")}),N0=Ss.extend({resources:N(I0)}),E2=xs.extend({method:B("resources/templates/list")}),O0=Ss.extend({resourceTemplates:N(x2)}),nf=Yt.extend({uri:D()}),_2=nf,P2=ut.extend({method:B("resources/read"),params:_2}),M0=ct.extend({contents:N(Te([$0,k0]))}),L0=dr.extend({method:B("notifications/resources/list_changed"),params:pr.optional()}),T2=nf,A2=ut.extend({method:B("resources/subscribe"),params:T2}),F2=nf,R2=ut.extend({method:B("resources/unsubscribe"),params:F2}),$2=pr.extend({uri:D()}),k2=dr.extend({method:B("notifications/resources/updated"),params:$2}),I2=M({name:D(),description:Ve(D()),required:Ve(be())}),N2=M({...ni.shape,...bs.shape,description:Ve(D()),arguments:Ve(N(I2)),_meta:Ve(Xe({}))}),O2=xs.extend({method:B("prompts/list")}),B0=Ss.extend({prompts:N(N2)}),M2=Yt.extend({name:D(),arguments:ze(D(),D()).optional()}),L2=ut.extend({method:B("prompts/get"),params:M2}),of=M({type:B("text"),text:D(),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),sf=M({type:B("image"),data:rf,mimeType:D(),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),af=M({type:B("audio"),data:rf,mimeType:D(),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),B2=M({type:B("tool_use"),name:D(),id:D(),input:ze(D(),Be()),_meta:ze(D(),Be()).optional()}),z2=M({type:B("resource"),resource:Te([$0,k0]),annotations:oi.optional(),_meta:ze(D(),Be()).optional()}),j2=I0.extend({type:B("resource_link")}),uf=Te([of,sf,af,j2,z2]),U2=M({role:_s,content:uf}),z0=ct.extend({description:D().optional(),messages:N(U2)}),j0=dr.extend({method:B("notifications/prompts/list_changed"),params:pr.optional()}),V2=M({title:D().optional(),readOnlyHint:be().optional(),destructiveHint:be().optional(),idempotentHint:be().optional(),openWorldHint:be().optional()}),H2=M({taskSupport:Lt(["required","optional","forbidden"]).optional()}),U0=M({...ni.shape,...bs.shape,description:D().optional(),inputSchema:M({type:B("object"),properties:ze(D(),at).optional(),required:N(D()).optional()}).catchall(Be()),outputSchema:M({type:B("object"),properties:ze(D(),at).optional(),required:N(D()).optional()}).catchall(Be()).optional(),annotations:V2.optional(),execution:H2.optional(),_meta:ze(D(),Be()).optional()}),q2=xs.extend({method:B("tools/list")}),V0=Ss.extend({tools:N(U0)}),qu=ct.extend({content:N(uf).default([]),structuredContent:ze(D(),Be()).optional(),isError:be().optional()}),iX=qu.or(ct.extend({toolResult:Be()})),K2=Uu.extend({name:D(),arguments:ze(D(),Be()).optional()}),G2=ut.extend({method:B("tools/call"),params:K2}),H0=dr.extend({method:B("notifications/tools/list_changed"),params:pr.optional()}),W2=M({autoRefresh:be().default(!0),debounceMs:he().int().nonnegative().default(300)}),q0=Lt(["debug","info","notice","warning","error","critical","alert","emergency"]),Z2=Yt.extend({level:q0}),J2=ut.extend({method:B("logging/setLevel"),params:Z2}),Y2=pr.extend({level:q0,logger:D().optional(),data:Be()}),Q2=dr.extend({method:B("notifications/message"),params:Y2}),X2=M({name:D().optional()}),eM=M({hints:N(X2).optional(),costPriority:he().min(0).max(1).optional(),speedPriority:he().min(0).max(1).optional(),intelligencePriority:he().min(0).max(1).optional()}),tM=M({mode:Lt(["auto","required","none"]).optional()}),rM=M({type:B("tool_result"),toolUseId:D().describe("The unique identifier for the corresponding tool call."),content:N(uf).default([]),structuredContent:M({}).loose().optional(),isError:be().optional(),_meta:ze(D(),Be()).optional()}),nM=jd("type",[of,sf,af]),zu=jd("type",[of,sf,af,B2,rM]),oM=M({role:_s,content:Te([zu,N(zu)]),_meta:ze(D(),Be()).optional()}),iM=Uu.extend({messages:N(oM),modelPreferences:eM.optional(),systemPrompt:D().optional(),includeContext:Lt(["none","thisServer","allServers"]).optional(),temperature:he().optional(),maxTokens:he().int(),stopSequences:N(D()).optional(),metadata:at.optional(),tools:N(U0).optional(),toolChoice:tM.optional()}),K0=ut.extend({method:B("sampling/createMessage"),params:iM}),G0=ct.extend({model:D(),stopReason:Ve(Lt(["endTurn","stopSequence","maxTokens"]).or(D())),role:_s,content:nM}),sM=ct.extend({model:D(),stopReason:Ve(Lt(["endTurn","stopSequence","maxTokens","toolUse"]).or(D())),role:_s,content:Te([zu,N(zu)])}),aM=M({type:B("boolean"),title:D().optional(),description:D().optional(),default:be().optional()}),uM=M({type:B("string"),title:D().optional(),description:D().optional(),minLength:he().optional(),maxLength:he().optional(),format:Lt(["email","uri","date","date-time"]).optional(),default:D().optional()}),cM=M({type:Lt(["number","integer"]),title:D().optional(),description:D().optional(),minimum:he().optional(),maximum:he().optional(),default:he().optional()}),lM=M({type:B("string"),title:D().optional(),description:D().optional(),enum:N(D()),default:D().optional()}),pM=M({type:B("string"),title:D().optional(),description:D().optional(),oneOf:N(M({const:D(),title:D()})),default:D().optional()}),dM=M({type:B("string"),title:D().optional(),description:D().optional(),enum:N(D()),enumNames:N(D()).optional(),default:D().optional()}),fM=Te([lM,pM]),mM=M({type:B("array"),title:D().optional(),description:D().optional(),minItems:he().optional(),maxItems:he().optional(),items:M({type:B("string"),enum:N(D())}),default:N(D()).optional()}),hM=M({type:B("array"),title:D().optional(),description:D().optional(),minItems:he().optional(),maxItems:he().optional(),items:M({anyOf:N(M({const:D(),title:D()}))}),default:N(D()).optional()}),gM=Te([mM,hM]),yM=Te([dM,fM,gM]),DM=Te([yM,aM,uM,cM]),vM=Uu.extend({mode:B("form").optional(),message:D(),requestedSchema:M({type:B("object"),properties:ze(D(),DM),required:N(D()).optional()})}),CM=Uu.extend({mode:B("url"),message:D(),elicitationId:D(),url:D().url()}),wM=Te([vM,CM]),W0=ut.extend({method:B("elicitation/create"),params:wM}),bM=pr.extend({elicitationId:D()}),xM=dr.extend({method:B("notifications/elicitation/complete"),params:bM}),Z0=ct.extend({action:Lt(["accept","decline","cancel"]),content:Ud(e=>e===null?void 0:e,ze(D(),Te([D(),he(),be(),N(D())])).optional())}),SM=M({type:B("ref/resource"),uri:D()});var EM=M({type:B("ref/prompt"),name:D()}),_M=Yt.extend({ref:Te([EM,SM]),argument:M({name:D(),value:D()}),context:M({arguments:ze(D(),D()).optional()}).optional()}),PM=ut.extend({method:B("completion/complete"),params:_M});var J0=ct.extend({completion:Xe({values:N(D()).max(100),total:Ve(he().int()),hasMore:Ve(be())})}),TM=M({uri:D().startsWith("file://"),name:D().optional(),_meta:ze(D(),Be()).optional()}),AM=ut.extend({method:B("roots/list"),params:Yt.optional()}),FM=ct.extend({roots:N(TM)}),RM=dr.extend({method:B("notifications/roots/list_changed"),params:pr.optional()}),sX=Te([Gd,m2,PM,J2,L2,O2,S2,E2,P2,A2,R2,G2,q2,Jd,Qd,Xd,tf]),aX=Te([Kd,Wd,g2,RM,Zd]),uX=Te([qd,G0,sM,Z0,FM,Yd,ef,Hu]),cX=Te([Gd,K0,W0,AM,Jd,Qd,Xd,tf]),lX=Te([Kd,Wd,Q2,k2,L0,H0,j0,Zd,xM]),pX=Te([qd,F0,J0,z0,B0,N0,O0,M0,qu,V0,Yd,ef,Hu]);var $M=Symbol("Let zodToJsonSchema decide on which parser to use");var HX=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var FU=H(Km(),1),RU=H(V_(),1);var i8=H(RP(),1),$P=H(require("node:process"),1);var Woe=$P.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];var s8;s8=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);var ft=d0().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:x0.custom,message:"URL must be parseable",fatal:!0}),Zp}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),a8=Xe({resource:D().url(),authorization_servers:N(ft).optional(),jwks_uri:D().url().optional(),scopes_supported:N(D()).optional(),bearer_methods_supported:N(D()).optional(),resource_signing_alg_values_supported:N(D()).optional(),resource_name:D().optional(),resource_documentation:D().optional(),resource_policy_uri:D().url().optional(),resource_tos_uri:D().url().optional(),tls_client_certificate_bound_access_tokens:be().optional(),authorization_details_types_supported:N(D()).optional(),dpop_signing_alg_values_supported:N(D()).optional(),dpop_bound_access_tokens_required:be().optional()}),IP=Xe({issuer:D(),authorization_endpoint:ft,token_endpoint:ft,registration_endpoint:ft.optional(),scopes_supported:N(D()).optional(),response_types_supported:N(D()),response_modes_supported:N(D()).optional(),grant_types_supported:N(D()).optional(),token_endpoint_auth_methods_supported:N(D()).optional(),token_endpoint_auth_signing_alg_values_supported:N(D()).optional(),service_documentation:ft.optional(),revocation_endpoint:ft.optional(),revocation_endpoint_auth_methods_supported:N(D()).optional(),revocation_endpoint_auth_signing_alg_values_supported:N(D()).optional(),introspection_endpoint:D().optional(),introspection_endpoint_auth_methods_supported:N(D()).optional(),introspection_endpoint_auth_signing_alg_values_supported:N(D()).optional(),code_challenge_methods_supported:N(D()).optional(),client_id_metadata_document_supported:be().optional()}),u8=Xe({issuer:D(),authorization_endpoint:ft,token_endpoint:ft,userinfo_endpoint:ft.optional(),jwks_uri:ft,registration_endpoint:ft.optional(),scopes_supported:N(D()).optional(),response_types_supported:N(D()),response_modes_supported:N(D()).optional(),grant_types_supported:N(D()).optional(),acr_values_supported:N(D()).optional(),subject_types_supported:N(D()),id_token_signing_alg_values_supported:N(D()),id_token_encryption_alg_values_supported:N(D()).optional(),id_token_encryption_enc_values_supported:N(D()).optional(),userinfo_signing_alg_values_supported:N(D()).optional(),userinfo_encryption_alg_values_supported:N(D()).optional(),userinfo_encryption_enc_values_supported:N(D()).optional(),request_object_signing_alg_values_supported:N(D()).optional(),request_object_encryption_alg_values_supported:N(D()).optional(),request_object_encryption_enc_values_supported:N(D()).optional(),token_endpoint_auth_methods_supported:N(D()).optional(),token_endpoint_auth_signing_alg_values_supported:N(D()).optional(),display_values_supported:N(D()).optional(),claim_types_supported:N(D()).optional(),claims_supported:N(D()).optional(),service_documentation:D().optional(),claims_locales_supported:N(D()).optional(),ui_locales_supported:N(D()).optional(),claims_parameter_supported:be().optional(),request_parameter_supported:be().optional(),request_uri_parameter_supported:be().optional(),require_request_uri_registration:be().optional(),op_policy_uri:ft.optional(),op_tos_uri:ft.optional(),client_id_metadata_document_supported:be().optional()}),c8=M({...u8.shape,...IP.pick({code_challenge_methods_supported:!0}).shape}),l8=M({access_token:D(),id_token:D().optional(),token_type:D(),expires_in:Bu.number().optional(),scope:D().optional(),refresh_token:D().optional()}).strip(),p8=M({error:D(),error_description:D().optional(),error_uri:D().optional()}),kP=ft.optional().or(B("").transform(()=>{})),d8=M({redirect_uris:N(ft),token_endpoint_auth_method:D().optional(),grant_types:N(D()).optional(),response_types:N(D()).optional(),client_name:D().optional(),client_uri:ft.optional(),logo_uri:kP,scope:D().optional(),contacts:N(D()).optional(),tos_uri:kP,policy_uri:D().optional(),jwks_uri:ft.optional(),jwks:m0().optional(),software_id:D().optional(),software_version:D().optional(),software_statement:D().optional()}).strip(),f8=M({client_id:D(),client_secret:D().optional(),client_id_issued_at:he().optional(),client_secret_expires_at:he().optional()}).strip(),m8=d8.merge(f8),Qoe=M({error:D(),error_description:D().optional()}).strip(),Xoe=M({token:D(),token_type_hint:D().optional()}).strip();var Ze=class extends Error{constructor(t,r){super(t),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){let t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}},na=class extends Ze{};na.errorCode="invalid_request";var xi=class extends Ze{};xi.errorCode="invalid_client";var Si=class extends Ze{};Si.errorCode="invalid_grant";var Ei=class extends Ze{};Ei.errorCode="unauthorized_client";var oa=class extends Ze{};oa.errorCode="unsupported_grant_type";var ia=class extends Ze{};ia.errorCode="invalid_scope";var sa=class extends Ze{};sa.errorCode="access_denied";var _i=class extends Ze{};_i.errorCode="server_error";var aa=class extends Ze{};aa.errorCode="temporarily_unavailable";var ua=class extends Ze{};ua.errorCode="unsupported_response_type";var ca=class extends Ze{};ca.errorCode="unsupported_token_type";var la=class extends Ze{};la.errorCode="invalid_token";var pa=class extends Ze{};pa.errorCode="method_not_allowed";var da=class extends Ze{};da.errorCode="too_many_requests";var Pi=class extends Ze{};Pi.errorCode="invalid_client_metadata";var fa=class extends Ze{};fa.errorCode="insufficient_scope";var ma=class extends Ze{};ma.errorCode="invalid_target";var h8={[na.errorCode]:na,[xi.errorCode]:xi,[Si.errorCode]:Si,[Ei.errorCode]:Ei,[oa.errorCode]:oa,[ia.errorCode]:ia,[sa.errorCode]:sa,[_i.errorCode]:_i,[aa.errorCode]:aa,[ua.errorCode]:ua,[ca.errorCode]:ca,[la.errorCode]:la,[pa.errorCode]:pa,[da.errorCode]:da,[Pi.errorCode]:Pi,[fa.errorCode]:fa,[ma.errorCode]:ma};var B8=H(require("@sentry/node"),1);var z8=H(BP(),1);var j8=()=>{if(typeof globalThis<"u"&&globalThis.crypto)return globalThis.crypto;if(typeof require<"u")try{let e=require("crypto");if(e.webcrypto)return e.webcrypto}catch{}throw new Error("Web Crypto API is not available. Requires Node.js 15+ or a browser environment.")},Bie=j8();var ph=H(require("node:process"),1);function dh(){let{env:e}=ph.default,{TERM:t,TERM_PROGRAM:r}=e;return ph.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var fh=H(Wn(),1),Ti=H(Ta(),1),ha=H(Wn(),1),hh=()=>{let e=mh?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=mh?80:120,r,n=!1,o="",s="",i="",a=g=>{let y=g>1?"Something went wrong":"Canceled";n&&h(y,g)},u=(g,y)=>{console.error(y,g),a(2)},c=()=>a(1),l=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",a)},p=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",a)},d=(g="")=>{n=!0,o=g.replace(/\.+$/,""),process.stdout.write(`${fh.default.gray(H8)}
1533
1533
  `);let y=0,b=0;l(),process.env.CI||(r=setInterval(()=>{let w=fh.default.magenta(e[y]),T=".".repeat(Math.floor(b)).slice(0,3);process.stdout.write(Ti.cursor.move(-999,-i.split(`
1534
1534
  `).length+1)),process.stdout.write(Ti.erase.down(i.split(`
1535
- `).length));let E=`${w} ${o}${T}${s}`;process.stdout.write(E),y=y+1<e.length?y+1:0,b=b<e.length?b+.125:0,i=E},t))},h=(g,y=0)=>{o=g??o,n=!1,clearInterval(r);let b=y===0?(0,ha.green)(K8):y===1?(0,ha.red)(H8):(0,ha.red)(q8);process.stdout.write(Ti.cursor.move(-999,-i.split(`
1535
+ `).length));let E=`${w} ${o}${T}${s}`;process.stdout.write(E),y=y+1<e.length?y+1:0,b=b<e.length?b+.125:0,i=E},t))},h=(g,y=0)=>{o=g??o,n=!1,clearInterval(r);let b=y===0?(0,ha.green)(G8):y===1?(0,ha.red)(q8):(0,ha.red)(K8);process.stdout.write(Ti.cursor.move(-999,-i.split(`
1536
1536
  `).length+1)),process.stdout.write(Ti.erase.down(i.split(`
1537
1537
  `).length)),process.stdout.write(`${b} ${o}
1538
- `),i=o,p()};return{start:d,stop:h,message:(g="")=>{o=g??o},extra:(g="")=>{s=g}}},mh=dh(),Ac=(e,t)=>mh?e:t,V8=Ac("\u2502","|"),H8=Ac("\u25A0","x"),q8=Ac("\u25B2","x"),K8=Ac("\u25C7","o");var zP=require("child_process");async function gh(e){try{let i=(await import("open")).default;await i(e);return}catch{}let t=process.platform,r,n;if(t==="darwin")r="open",n=[e];else if(t==="win32"){let s=`Start-Process '${e.replace(/'/g,"''")}'`,i=Buffer.from(s,"utf16le").toString("base64");r="powershell.exe",n=["-NoProfile","-NonInteractive","-EncodedCommand",i]}else r="xdg-open",n=[e];let o=t==="win32";return new Promise((s,i)=>{let a=(0,zP.spawn)(r,n,{stdio:"ignore",detached:!o,shell:o});a.on("error",i),a.on("spawn",()=>{a.off("error",i),a.unref(),s()}),a.on("close",u=>{u!==null&&u!==0&&i(new Error(`Failed to open browser with exit code ${u}`))})})}var W8=H(require("@sentry/node"),1);var uue=`
1539
- `+(0,on.dim)("ESC to interrupt");var yr=H(require("typescript"),1);function yh(e){return!(e.category!==yr.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}async function Z8(e,t,r){let n=[],o=[t],s=e.relative(e.getAppRootDir(),t.fileName);for(;o.length>0;){let i=o.shift();if(e4(i,t)){let a=Y8(e,i,t,r),{line:u,character:c}=t.getLineAndCharacterOfPosition(i.getStart());a&&(a.loc=`${s}:${u+1}:${c+1}`,n.push(a))}o.push(...i.getChildren(t))}return n}var J8="figmaMapping";function Y8(e,t,r,n){let[o]=t.arguments;if(!o)throw new Error("Invalid figmaMapping call, no arguments found");if(!Z.default.isObjectLiteralExpression(o))throw new Error("Invalid figmaMapping call, argument is not an object literal");let s=o.properties;if(!s)throw new Error("Invalid figmaMapping call, argument has no properties");let i="",a,u,c,l="-",p=e.basename(r.fileName).replace(/\.mapper\.[tsxjm]+$/,""),d,h,m,f,g;if(t.typeArguments&&t.typeArguments.length>0){let $=jP(t.typeArguments[0].getText(r));$&&(p=$)}for(let $ of s){let I=$.name?.getText(r);if(!I)throw new Error("Invalid figmaMapping call, property has no name");switch(I){case"componentName":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, componentName has no initializer");let k=$.initializer;if(!Z.default.isStringLiteral(k))throw new Error("Invalid figmaMapping call, componentName is not a string literal");a=k.text;break}case"url":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, url has no initializer");let k=$.initializer;if(!Z.default.isStringLiteral(k))throw new Error("Invalid figmaMapping call, url is not a string literal");f=k.text;break}case"componentKey":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, componentKey has no initializer");let k=$.initializer;if(!Z.default.isStringLiteral(k))throw new Error("Invalid figmaMapping call, componentKey is not a string literal");i=k.text;break}case"meta":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, meta has no initializer");let k=$.initializer;if(Z.default.isObjectLiteralExpression(k)){g={imports:[]};for(let R of k.properties)Z.default.isPropertyAssignment(R)&&Z.default.isIdentifier(R.name)&&R.name.text==="imports"&&Z.default.isArrayLiteralExpression(R.initializer)&&(g.imports=R.initializer.elements.map(z=>{if(Z.default.isStringLiteral(z))return z.text;if(Z.default.isObjectLiteralExpression(z)){let V={};for(let K of z.properties)if(Z.default.isPropertyAssignment(K)&&Z.default.isIdentifier(K.name)){let x=K.name.text;Z.default.isStringLiteral(K.initializer)&&(V[x]=K.initializer.text)}return V}return null}).filter(Boolean))}break}case"mapper":if(Z.default.isMethodDeclaration($)){let k=function(v){let V=n.getSymbolAtLocation(v)?.getDeclarations()?.[0];if(V){let K=X8(V);if(K?.importClause){let x=K.importClause.name?.getText(r);return x===l?(d="default",h=x):K.importClause.namedBindings&&Z.default.isNamedImports(K.importClause.namedBindings)&&(d="named",K.importClause.namedBindings.elements.forEach(_=>{_.name.getText(r)===l&&(h=_.name.getText(r))})),h&&Z.default.isStringLiteral(K.moduleSpecifier)&&(m=K.moduleSpecifier.text),!0}}return!1},R=function(v){if((Z.default.isJsxOpeningElement(v)||Z.default.isJsxSelfClosingElement(v))&&Z.default.isIdentifier(v.tagName)){l=v.tagName.getText(r),k(v.tagName);return}else if(Z.default.isTaggedTemplateExpression(v)&&Z.default.isIdentifier(v.tag)&&(v.tag.escapedText==="html"||v.tag.escapedText==="tmpl")){if(Z.default.isTemplateExpression(v.template)){let V=v.template.templateSpans.find(K=>Z.default.isIdentifier(K.expression)&&Q8(K.expression.text)&&k(K.expression));if(V&&Z.default.isIdentifier(V.expression)){l=V.expression.text;return}}let z=v.template.getText(r).match(/^`\s*<([^\s]+)/);if(z){l=z[1];return}if(z=v.template.getText(r).match(/^`\s*([^\s]+)/),z){l=z[1];return}}else Z.default.forEachChild(v,R)};var E=k,F=R;if($.parameters&&$.parameters.length>0&&$.parameters[0]&&$.parameters[0].type){let v=$.parameters[0].type.getText(r),z=jP(v);z&&(p=z)}Z.default.forEachChild($,R),c=$.getText(r).replace(/^mapper/,"function Mapper"),u=Dh(c);break}case"designTokenMapper":if(Z.default.isMethodDeclaration($)){c=$.getText(r).replace(/^designTokenMapper/,"function Mapper"),u=Dh(c),i="design-tokens";break}case"genericMapper":if(Z.default.isMethodDeclaration($)){c=$.getText(r).replace(/^genericMapper/,"function Mapper"),u=Dh(c),i="*";break}}}if(!i&&!f)throw new Error("Invalid figmaMapping call, no componentKey or url found");if(!i&&!u)throw new Error("Invalid figmaMapping call, no mapper found");if(!i&&!c)throw new Error("Invalid figmaMapping call, no original mapper found");let y=n4(r),b=g?.imports??[],w=[],T=[];w.push(...y);for(let $ of b)typeof $=="string"?T.push($):w.push($);return{builderName:l,figmaName:a??p,figmaKey:i,figmaUrl:f,inputMapper:u,exportType:d,importName:h,importPath:m,originalInputMapper:c,imports:w,importStrings:T.length>0?T:void 0,source:"cli"}}function Q8(e){return e.charAt(0)===e.charAt(0).toUpperCase()}function Dh(e){return Z.default.transpile(e,{target:Z.default.ScriptTarget.Latest,allowNonTsExtensions:!0,moduleResolution:Z.default.ModuleResolutionKind.NodeJs,module:Z.default.ModuleKind.CommonJS,noImplicitAny:!1,esModuleInterop:!0,noUnusedLocals:!1,noUnusedParameters:!1,jsx:Z.default.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment",allowJs:!0,checkJs:!0,strict:!0,suppressImplicitAnyIndexErrors:!0,typeRoots:["node_modules/@types"],inlineSources:!0,inlineSourceMap:!0})}function X8(e){let t=e;for(;t;){if(Z.default.isImportDeclaration(t))return t;t=t.parent}}function e4(e,t){return Z.default.isCallExpression(e)&&e.expression.getText(t)===J8}async function UP(e){let t=["node_modules","dist","build","public"];return(await e.readdirRecursive(e.getAppRootDir(),t)).filter(n=>er(n))}function jP(e){let t=e.match(/^Figma(\w+)Props$/);if(t&&typeof t[1]=="string")return t[1]}async function VP(e,t,r,n=!1){try{return r||(r=await Xa(e)),(await r.setPublicApiKey({publicApiKey:t})).modifiedType==="permission-error"?{success:!1,error:"permission-error"}:(n&&await r.ensureFigmaImportPage(),{success:!0})}catch(o){let s="unknown-error";return o instanceof Error?s=o.message:typeof o=="string"&&(s=o),{success:!1,error:s}}}var t4={getCanonicalFileName:e=>e,getCurrentDirectory:()=>Z.default.sys.getCurrentDirectory(),getNewLine:()=>Z.default.sys.newLine};function r4(e){return Z.default.formatDiagnosticsWithColorAndContext(e,t4)}async function HP({sys:e,mappingFiles:t,typeCheck:r}){if(e.Sentry?.setContext("findMappings",{mappingFiles:t}),!t.length)return{mapperFiles:[],figmaBuilderLinks:[],figmaLinksToResolve:[],diagnostics:[]};let n=[],o=[],s=[],i=await Ye(e,t),a=i.getTypeChecker(),u=i.getSyntacticDiagnostics().filter(yh).filter(p=>p.file?.fileName?t.includes(p.file.fileName):!1);if(u.length>0)return re.error(`At least one of the mappings contain syntactic errors:
1538
+ `),i=o,p()};return{start:d,stop:h,message:(g="")=>{o=g??o},extra:(g="")=>{s=g}}},mh=dh(),Ac=(e,t)=>mh?e:t,H8=Ac("\u2502","|"),q8=Ac("\u25A0","x"),K8=Ac("\u25B2","x"),G8=Ac("\u25C7","o");var zP=require("child_process");async function gh(e){try{let i=(await import("open")).default;await i(e);return}catch{}let t=process.platform,r,n;if(t==="darwin")r="open",n=[e];else if(t==="win32"){let s=`Start-Process '${e.replace(/'/g,"''")}'`,i=Buffer.from(s,"utf16le").toString("base64");r="powershell.exe",n=["-NoProfile","-NonInteractive","-EncodedCommand",i]}else r="xdg-open",n=[e];let o=t==="win32";return new Promise((s,i)=>{let a=(0,zP.spawn)(r,n,{stdio:"ignore",detached:!o,shell:o});a.on("error",i),a.on("spawn",()=>{a.off("error",i),a.unref(),s()}),a.on("close",u=>{u!==null&&u!==0&&i(new Error(`Failed to open browser with exit code ${u}`))})})}var Z8=H(require("@sentry/node"),1);var mue=`
1539
+ `+(0,on.dim)("ESC to interrupt");var yr=H(require("typescript"),1);function yh(e){return!(e.category!==yr.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}async function J8(e,t,r){let n=[],o=[t],s=e.relative(e.getAppRootDir(),t.fileName);for(;o.length>0;){let i=o.shift();if(t4(i,t)){let a=Q8(e,i,t,r),{line:u,character:c}=t.getLineAndCharacterOfPosition(i.getStart());a&&(a.loc=`${s}:${u+1}:${c+1}`,n.push(a))}o.push(...i.getChildren(t))}return n}var Y8="figmaMapping";function Q8(e,t,r,n){let[o]=t.arguments;if(!o)throw new Error("Invalid figmaMapping call, no arguments found");if(!Z.default.isObjectLiteralExpression(o))throw new Error("Invalid figmaMapping call, argument is not an object literal");let s=o.properties;if(!s)throw new Error("Invalid figmaMapping call, argument has no properties");let i="",a,u,c,l="-",p=e.basename(r.fileName).replace(/\.mapper\.[tsxjm]+$/,""),d,h,m,f,g;if(t.typeArguments&&t.typeArguments.length>0){let $=jP(t.typeArguments[0].getText(r));$&&(p=$)}for(let $ of s){let I=$.name?.getText(r);if(!I)throw new Error("Invalid figmaMapping call, property has no name");switch(I){case"componentName":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, componentName has no initializer");let k=$.initializer;if(!Z.default.isStringLiteral(k))throw new Error("Invalid figmaMapping call, componentName is not a string literal");a=k.text;break}case"url":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, url has no initializer");let k=$.initializer;if(!Z.default.isStringLiteral(k))throw new Error("Invalid figmaMapping call, url is not a string literal");f=k.text;break}case"componentKey":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, componentKey has no initializer");let k=$.initializer;if(!Z.default.isStringLiteral(k))throw new Error("Invalid figmaMapping call, componentKey is not a string literal");i=k.text;break}case"meta":{if(!("initializer"in $))throw new Error("Invalid figmaMapping call, meta has no initializer");let k=$.initializer;if(Z.default.isObjectLiteralExpression(k)){g={imports:[]};for(let R of k.properties)Z.default.isPropertyAssignment(R)&&Z.default.isIdentifier(R.name)&&R.name.text==="imports"&&Z.default.isArrayLiteralExpression(R.initializer)&&(g.imports=R.initializer.elements.map(z=>{if(Z.default.isStringLiteral(z))return z.text;if(Z.default.isObjectLiteralExpression(z)){let V={};for(let K of z.properties)if(Z.default.isPropertyAssignment(K)&&Z.default.isIdentifier(K.name)){let x=K.name.text;Z.default.isStringLiteral(K.initializer)&&(V[x]=K.initializer.text)}return V}return null}).filter(Boolean))}break}case"mapper":if(Z.default.isMethodDeclaration($)){let k=function(v){let V=n.getSymbolAtLocation(v)?.getDeclarations()?.[0];if(V){let K=e4(V);if(K?.importClause){let x=K.importClause.name?.getText(r);return x===l?(d="default",h=x):K.importClause.namedBindings&&Z.default.isNamedImports(K.importClause.namedBindings)&&(d="named",K.importClause.namedBindings.elements.forEach(_=>{_.name.getText(r)===l&&(h=_.name.getText(r))})),h&&Z.default.isStringLiteral(K.moduleSpecifier)&&(m=K.moduleSpecifier.text),!0}}return!1},R=function(v){if((Z.default.isJsxOpeningElement(v)||Z.default.isJsxSelfClosingElement(v))&&Z.default.isIdentifier(v.tagName)){l=v.tagName.getText(r),k(v.tagName);return}else if(Z.default.isTaggedTemplateExpression(v)&&Z.default.isIdentifier(v.tag)&&(v.tag.escapedText==="html"||v.tag.escapedText==="tmpl")){if(Z.default.isTemplateExpression(v.template)){let V=v.template.templateSpans.find(K=>Z.default.isIdentifier(K.expression)&&X8(K.expression.text)&&k(K.expression));if(V&&Z.default.isIdentifier(V.expression)){l=V.expression.text;return}}let z=v.template.getText(r).match(/^`\s*<([^\s]+)/);if(z){l=z[1];return}if(z=v.template.getText(r).match(/^`\s*([^\s]+)/),z){l=z[1];return}}else Z.default.forEachChild(v,R)};var E=k,F=R;if($.parameters&&$.parameters.length>0&&$.parameters[0]&&$.parameters[0].type){let v=$.parameters[0].type.getText(r),z=jP(v);z&&(p=z)}Z.default.forEachChild($,R),c=$.getText(r).replace(/^mapper/,"function Mapper"),u=Dh(c);break}case"designTokenMapper":if(Z.default.isMethodDeclaration($)){c=$.getText(r).replace(/^designTokenMapper/,"function Mapper"),u=Dh(c),i="design-tokens";break}case"genericMapper":if(Z.default.isMethodDeclaration($)){c=$.getText(r).replace(/^genericMapper/,"function Mapper"),u=Dh(c),i="*";break}}}if(!i&&!f)throw new Error("Invalid figmaMapping call, no componentKey or url found");if(!i&&!u)throw new Error("Invalid figmaMapping call, no mapper found");if(!i&&!c)throw new Error("Invalid figmaMapping call, no original mapper found");let y=o4(r),b=g?.imports??[],w=[],T=[];w.push(...y);for(let $ of b)typeof $=="string"?T.push($):w.push($);return{builderName:l,figmaName:a??p,figmaKey:i,figmaUrl:f,inputMapper:u,exportType:d,importName:h,importPath:m,originalInputMapper:c,imports:w,importStrings:T.length>0?T:void 0,source:"cli"}}function X8(e){return e.charAt(0)===e.charAt(0).toUpperCase()}function Dh(e){return Z.default.transpile(e,{target:Z.default.ScriptTarget.Latest,allowNonTsExtensions:!0,moduleResolution:Z.default.ModuleResolutionKind.NodeJs,module:Z.default.ModuleKind.CommonJS,noImplicitAny:!1,esModuleInterop:!0,noUnusedLocals:!1,noUnusedParameters:!1,jsx:Z.default.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment",allowJs:!0,checkJs:!0,strict:!0,suppressImplicitAnyIndexErrors:!0,typeRoots:["node_modules/@types"],inlineSources:!0,inlineSourceMap:!0})}function e4(e){let t=e;for(;t;){if(Z.default.isImportDeclaration(t))return t;t=t.parent}}function t4(e,t){return Z.default.isCallExpression(e)&&e.expression.getText(t)===Y8}async function UP(e){let t=["node_modules","dist","build","public"];return(await e.readdirRecursive(e.getAppRootDir(),t)).filter(n=>er(n))}function jP(e){let t=e.match(/^Figma(\w+)Props$/);if(t&&typeof t[1]=="string")return t[1]}async function VP(e,t,r,n=!1){try{return r||(r=await Xa(e)),(await r.setPublicApiKey({publicApiKey:t})).modifiedType==="permission-error"?{success:!1,error:"permission-error"}:(n&&await r.ensureFigmaImportPage(),{success:!0})}catch(o){let s="unknown-error";return o instanceof Error?s=o.message:typeof o=="string"&&(s=o),{success:!1,error:s}}}var r4={getCanonicalFileName:e=>e,getCurrentDirectory:()=>Z.default.sys.getCurrentDirectory(),getNewLine:()=>Z.default.sys.newLine};function n4(e){return Z.default.formatDiagnosticsWithColorAndContext(e,r4)}async function HP({sys:e,mappingFiles:t,typeCheck:r}){if(e.Sentry?.setContext("findMappings",{mappingFiles:t}),!t.length)return{mapperFiles:[],figmaBuilderLinks:[],figmaLinksToResolve:[],diagnostics:[]};let n=[],o=[],s=[],i=await Ye(e,t),a=i.getTypeChecker(),u=i.getSyntacticDiagnostics().filter(yh).filter(p=>p.file?.fileName?t.includes(p.file.fileName):!1);if(u.length>0)return re.error(`At least one of the mappings contain syntactic errors:
1540
1540
 
1541
- ${r4(u)}`),pn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(yh);for(let p of t)try{let d=i.getSourceFile(p);if(!d){e.Sentry?.captureException(new Error("Could not find source file"),{extra:{file:p,sourceFiles:i.getSourceFiles().map(f=>f.fileName)},level:"warning"});continue}let h=d?.fileName;if(o.push({filePath:p,content:d.getText()}),h){let f=c.filter(g=>g.file?.fileName===h);f.length>0&&s.push(...f)}let m=await Z8(e,d,a);n.push(...m)}catch(d){return e.Sentry?.captureException(d),await pn(1)}let l=n.filter(p=>p.figmaUrl&&!p.figmaKey).map(p=>p.figmaUrl);return{mapperFiles:o,figmaBuilderLinks:n,figmaLinksToResolve:l,diagnostics:s}}function n4(e){let t=[];for(let r of e.statements){if(!Z.default.isImportDeclaration(r)||!r.importClause||r.importClause.isTypeOnly||!Z.default.isStringLiteral(r.moduleSpecifier))continue;let n=r.moduleSpecifier.text;if(n.startsWith("@builder.io"))continue;r.importClause.name&&t.push({importType:"default",importName:r.importClause.name.text,importPath:n});let o=r.importClause.namedBindings;if(o&&Z.default.isNamedImports(o))for(let s of o.elements)s.isTypeOnly||t.push({importType:"named",importName:s.name.text,importPath:n})}return t}var WP=require("crypto");var o4=5294,i4=5284,Ch=4,vh=e=>!!(process.env.CI||e.ci),s4=(e,t)=>{let r=vh(t)?{}:wh(e),n=r.spaceName,o=t.builderUserId??process.env.BUILDER_USER_ID??r.userId,s=t.builderPublicKey??process.env.BUILDER_PUBLIC_KEY??r.builderPublicKey,i=t.builderPrivateKey??process.env.BUILDER_PRIVATE_KEY??r.builderPrivateKey,a=process.env.FIGMA_PERSONAL_TOKEN??t.figmaToken,u;return a?u={access_token:a,oauth:!1}:u=r.figmaAuth,{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:u,timestamp:r.timestamp}},ts=async(e,t,r)=>{let{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:a,timestamp:u}=s4(e,t);if(r.forceSpaceId&&!t.yes&&s&&s!==r.forceSpaceId)if(re.warning(`You are currently authenticated for space ${(0,Vn.yellow)(s)} (${n||"unnamed"}), but this command requires space ${(0,Vn.green)(r.forceSpaceId)}.`),await Oi({message:"You must switch to the correct space to continue with this code generation command.",options:[{value:"switch",label:"Switch to required space",hint:"Authenticate with the correct space and continue"},{value:"exit",label:"Exit code generation",hint:"Cancel the command and stay in current space"}]})==="switch")s=r.forceSpaceId,i=void 0,n=void 0,o=void 0;else return re.info("Code generation cancelled. You can run the command again when you're ready to switch spaces."),await pn(1);if(vh(t)){if(!a&&r.requireFigmaAuth==="if-unset")throw new Error(`No Figma personal token found.
1541
+ ${n4(u)}`),pn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(yh);for(let p of t)try{let d=i.getSourceFile(p);if(!d){e.Sentry?.captureException(new Error("Could not find source file"),{extra:{file:p,sourceFiles:i.getSourceFiles().map(f=>f.fileName)},level:"warning"});continue}let h=d?.fileName;if(o.push({filePath:p,content:d.getText()}),h){let f=c.filter(g=>g.file?.fileName===h);f.length>0&&s.push(...f)}let m=await J8(e,d,a);n.push(...m)}catch(d){return e.Sentry?.captureException(d),await pn(1)}let l=n.filter(p=>p.figmaUrl&&!p.figmaKey).map(p=>p.figmaUrl);return{mapperFiles:o,figmaBuilderLinks:n,figmaLinksToResolve:l,diagnostics:s}}function o4(e){let t=[];for(let r of e.statements){if(!Z.default.isImportDeclaration(r)||!r.importClause||r.importClause.isTypeOnly||!Z.default.isStringLiteral(r.moduleSpecifier))continue;let n=r.moduleSpecifier.text;if(n.startsWith("@builder.io"))continue;r.importClause.name&&t.push({importType:"default",importName:r.importClause.name.text,importPath:n});let o=r.importClause.namedBindings;if(o&&Z.default.isNamedImports(o))for(let s of o.elements)s.isTypeOnly||t.push({importType:"named",importName:s.name.text,importPath:n})}return t}var WP=require("crypto");var i4=5294,s4=5284,Ch=4,vh=e=>!!(process.env.CI||e.ci),a4=(e,t)=>{let r=vh(t)?{}:wh(e),n=r.spaceName,o=t.builderUserId??process.env.BUILDER_USER_ID??r.userId,s=t.builderPublicKey??process.env.BUILDER_PUBLIC_KEY??r.builderPublicKey,i=t.builderPrivateKey??process.env.BUILDER_PRIVATE_KEY??r.builderPrivateKey,a=process.env.FIGMA_PERSONAL_TOKEN??t.figmaToken,u;return a?u={access_token:a,oauth:!1}:u=r.figmaAuth,{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:u,timestamp:r.timestamp}},ts=async(e,t,r)=>{let{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:a,timestamp:u}=a4(e,t);if(r.forceSpaceId&&!t.yes&&s&&s!==r.forceSpaceId)if(re.warning(`You are currently authenticated for space ${(0,Vn.yellow)(s)} (${n||"unnamed"}), but this command requires space ${(0,Vn.green)(r.forceSpaceId)}.`),await Oi({message:"You must switch to the correct space to continue with this code generation command.",options:[{value:"switch",label:"Switch to required space",hint:"Authenticate with the correct space and continue"},{value:"exit",label:"Exit code generation",hint:"Cancel the command and stay in current space"}]})==="switch")s=r.forceSpaceId,i=void 0,n=void 0,o=void 0;else return re.info("Code generation cancelled. You can run the command again when you're ready to switch spaces."),await pn(1);if(vh(t)){if(!a&&r.requireFigmaAuth==="if-unset")throw new Error(`No Figma personal token found.
1542
1542
  Please set the FIGMA_PERSONAL_TOKEN environment variable.`);if(!i&&r.builderPrivateKey)throw new Error(`No Builder private key found.
1543
1543
  Please set the BUILDER_PRIVATE_KEY environment variable.`);if(!s&&r.builderPublicKey)throw new Error(`No Builder public key found.
1544
- Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,userId:o,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await u4(e),qP(e,{figmaAuth:a})),r.force||!i&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:c,spaceId:l,spaceName:p,userId:d}=await c4(e,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,Vn.yellow)(l)}, however the command specified --spaceId=${(0,Vn.green)(r.forceSpaceId)}`);s=l,i=c,n=p,o=d,await $D(o),await xn(e,e.getAppRootDir())&&(await VP(e,l,void 0,!1)||re.warn("Unable to set public api key in an existing .env file or create a new one. Please ensure you have write access in the current directory.")),qP(e,{builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:new Date().toISOString()})}return o?e.Sentry?.setUser({id:o,username:process.env.USER||process.env.USERNAME||"unknown"}):s&&e.Sentry?.setUser({id:s,username:process.env.USER||process.env.USERNAME||"unknown"}),(n||s)&&e.Sentry?.setContext("builder",{spaceId:s,spaceName:n,userId:o}),{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:u}},a4="RHr2ed743waC2g2ZHMEJSn6O0NQ08L";async function u4(e){let t=(0,WP.randomUUID)();return ZP({sys:e,name:"Figma",initialPort:o4,requestListener:async(r,n,o,s,i)=>{let a=new URL(n.url||"",`http://localhost:${r}`);if(a.pathname==="/figma-connect"){let u=a.searchParams.get("code"),c=a.searchParams.get("state"),l="nrGCqw6TLl95QJhVDi097A",p=a4,h=`Basic ${Buffer.from(`${l}:${p}`).toString("base64")}`;if(u&&t===c){let f=await(await Gr("https://api.figma.com/v1/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:h},body:new URLSearchParams({redirect_uri:`http://localhost:${r}/figma-connect`,code:u,grant_type:"authorization_code"}).toString()})).json();o.end(`<!doctype html>
1544
+ Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,userId:o,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await c4(e),qP(e,{figmaAuth:a})),r.force||!i&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:c,spaceId:l,spaceName:p,userId:d}=await l4(e,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,Vn.yellow)(l)}, however the command specified --spaceId=${(0,Vn.green)(r.forceSpaceId)}`);s=l,i=c,n=p,o=d,await $D(o),await Sn(e,e.getAppRootDir())&&(await VP(e,l,void 0,!1)||re.warn("Unable to set public api key in an existing .env file or create a new one. Please ensure you have write access in the current directory.")),qP(e,{builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:new Date().toISOString()})}return o?e.Sentry?.setUser({id:o,username:process.env.USER||process.env.USERNAME||"unknown"}):s&&e.Sentry?.setUser({id:s,username:process.env.USER||process.env.USERNAME||"unknown"}),(n||s)&&e.Sentry?.setContext("builder",{spaceId:s,spaceName:n,userId:o}),{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:u}},u4="RHr2ed743waC2g2ZHMEJSn6O0NQ08L";async function c4(e){let t=(0,WP.randomUUID)();return ZP({sys:e,name:"Figma",initialPort:i4,requestListener:async(r,n,o,s,i)=>{let a=new URL(n.url||"",`http://localhost:${r}`);if(a.pathname==="/figma-connect"){let u=a.searchParams.get("code"),c=a.searchParams.get("state"),l="nrGCqw6TLl95QJhVDi097A",p=u4,h=`Basic ${Buffer.from(`${l}:${p}`).toString("base64")}`;if(u&&t===c){let f=await(await Gr("https://api.figma.com/v1/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:h},body:new URLSearchParams({redirect_uri:`http://localhost:${r}/figma-connect`,code:u,grant_type:"authorization_code"}).toString()})).json();o.end(`<!doctype html>
1545
1545
  <html lang="en" dir="ltr">
1546
1546
  <head>
1547
1547
  <meta charset="utf-8" />
@@ -1650,7 +1650,7 @@ Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,bui
1650
1650
  <!--SCRIPT_PLACEHOLDER-->
1651
1651
  </body>
1652
1652
  </html>
1653
- `.replace("{{MESSAGE}}","The CLI has authenticated correctly with Figma"),()=>{s({...f,oauth:!0})})}}},onListen:r=>{let n=new URL("https://www.figma.com/oauth");return n.searchParams.set("client_id","nrGCqw6TLl95QJhVDi097A"),n.searchParams.set("redirect_uri",`http://localhost:${r}/figma-connect`),n.searchParams.set("scope","files:read,file_dev_resources:read,file_variables:read"),n.searchParams.set("state",t),n.searchParams.set("response_type","code"),n.href}})}async function c4(e,t){let r=await e.getDeviceId();return ZP({sys:e,name:"Builder.io",initialPort:i4,requestListener:async(n,o,s,i)=>{let a=new URL(o.url||"",`http://localhost:${n}`);a.pathname===qn&&s.end(`<!doctype html>
1653
+ `.replace("{{MESSAGE}}","The CLI has authenticated correctly with Figma"),()=>{s({...f,oauth:!0})})}}},onListen:r=>{let n=new URL("https://www.figma.com/oauth");return n.searchParams.set("client_id","nrGCqw6TLl95QJhVDi097A"),n.searchParams.set("redirect_uri",`http://localhost:${r}/figma-connect`),n.searchParams.set("scope","files:read,file_dev_resources:read,file_variables:read"),n.searchParams.set("state",t),n.searchParams.set("response_type","code"),n.href}})}async function l4(e,t){let r=await e.getDeviceId();return ZP({sys:e,name:"Builder.io",initialPort:s4,requestListener:async(n,o,s,i)=>{let a=new URL(o.url||"",`http://localhost:${n}`);a.pathname===qn&&s.end(`<!doctype html>
1654
1654
  <html lang="en" dir="ltr">
1655
1655
  <head>
1656
1656
  <meta charset="utf-8" />
@@ -1763,7 +1763,7 @@ Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,bui
1763
1763
  `+a+`
1764
1764
  `)}else(0,At.writeFileSync)(s,a+`
1765
1765
  `)}}function wh(e){let t=(0,Qt.join)(e.getAppRootDir(),".config","builderio","data.json"),r=[(0,Qt.join)(e.getAppRootDir(),"node_modules",".builder","data.json"),t,(0,Qt.join)(e.getRepoRootDir(),".git",".builder.json")];for(let n of r)if((0,At.existsSync)(n))try{let o=(0,At.readFileSync)(n,"utf8");return JSON.parse(o).credentials}catch(o){e.Sentry?.captureException(o,{level:"warning"})}return{}}async function ZP(e){let t,r,n,o=new Promise((p,d)=>{t=p,r=d}),s=e.initialPort,i=0,a=(0,KP.createServer)((p,d)=>e.requestListener(s,p,d,t,r)),u=()=>{c(),a&&("closeAllConnections"in a&&a.closeAllConnections(),a.close(p=>{p&&e.sys.Sentry?.captureException(p)}))};process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",u),process.on("SIGTERM",u),process.on("exit",u);let c=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",u),process.removeListener("SIGTERM",u),process.removeListener("exit",u)},l=()=>new Promise((p,d)=>{let h=m=>{a.removeListener("error",h),m.code==="EADDRINUSE"&&i<Ch?(re.warning(`Port ${s} is already in use, trying next port`),s++,i++,p(0)):d(m)};a.once("error",h),a.listen(s,()=>{a.removeListener("error",h);let m=a.address();p(m.port)})});try{let p=0;for(;p===0&&i<Ch;)p=await l();if(p===0)throw new Error(`Failed to find an available port after ${Ch} attempts`);let d=e.onListen(p);re.warn(`Required authenticating with ${e.name}
1766
- OPEN: ${(0,Vn.dim)(d)}`),n=hh(),n.start(`Waiting for ${e.name} authentication`),await gh(d);let h=await o;return n&&n.stop(`Authenticated with ${e.name} successfully`),h}catch(p){throw n&&(n.stop(`Failed to authenticate with ${e.name}.`,-1),Jl("auth")),e.sys.Sentry?.captureException(p),u(),p}finally{u()}}async function YP(e,t,r,n){try{if(!e)return Ai(r,n,400,"Builder context closed");let o=m4(r);if(o.pathname===kc){if(r.method==="POST"){let s=await f4(r);if(s)try{let i=await Yh(e,JSON.parse(s));return JP(r,n,200,i)}catch(i){e.debug("Dev API Error",i.stack||i.message||i);let a={errors:[String(i.message||i)]};return JP(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},i=r.headers.origin;i&&i!=="null"?QP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return Ai(r,n,405,`${kc} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(o.pathname===Ic)return l4(r,n,200,await Qh(e));if(o.pathname===Sh){let s=o.searchParams.get($c);return s?d4(n,302,await rg(e,s)):Ai(r,n,400,`Missing ${$c} querystring`)}if(o.pathname===qn)return p4(r,n,200,await Xh(e));if(o.pathname===Eh){await ts(e,{_:[]},{});let s=await UP(e),{figmaBuilderLinks:i,diagnostics:a}=await HP({mappingFiles:s,sys:e});return ga(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:i,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return o.pathname===Kn?(e.debug(`Close Dev Tools Server Requested: ${o.href}`),setTimeout(()=>{try{t.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),Ai(r,n,200,"Closing Dev Tools Server")):Ai(r,n,404,"Not found")}catch(o){return e?.Sentry?.captureException(o),Ai(r,n,500,`Dev Server Error: ${o}`)}}function JP(e,t,r,n){ga(e,t,r,"application/json",JSON.stringify(n))}function l4(e,t,r,n){ga(e,t,r,"application/javascript",n)}function p4(e,t,r,n){ga(e,t,r,"text/html",n)}function Ai(e,t,r,n){ga(e,t,r,"text/plain",n)}function ga(e,t,r,n,o){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":Xt},i=e.headers.origin;i&&i!=="null"?QP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",t.writeHead(r,s),t.end(o)}function QP(e){return e.hostname==="localhost"||e.origin==="https://builder.io"||e.origin==="https://www.builder.io"||e.origin.endsWith(".builder.io")?!0:e.port===""?!1:e.port!=="80"&&e.port!=="443"}function d4(e,t,r){e.writeHead(t,{Location:r}),e.end()}async function f4(e){let t="";for await(let r of e)t+=r;return t}function m4(e){let t=e.url||"/";return new URL(t,`http://${e.headers.host}`)}async function XP(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let t=await h4(e),r=(0,Fc.createServer)((o,s)=>{YP(e,r,o,s)}),n=()=>new Promise((o,s)=>{r.listening?(e.debug(`closing devtools server on port ${t}`),r.close(i=>{e=null,i?(e.debug(`error closing devtools server on port ${t}`),s(i)):(e&&e.debug(`closed devtools server on port ${t}`),o())})):(e.debug(`devtools server on port ${t} not listening`),o())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${t}`).href,port:t,setContext:o=>{e.debug(`set devtools context on server ${t}`),e=o},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(o=>{r.listen(t,()=>{e.debug(`started devtools server on port ${t}`),o(globalThis.__builderDevToolsServer)})})}function h4(e){return new Promise(t=>{let r=e.port;try{(0,Fc.request)({hostname:"localhost",port:r,path:Kn,method:"GET"},o=>{o.on("end",()=>{e.debug(`${Kn} - Response ended`),t(r)})}).on("error",o=>{e.debug(`${Kn} - No response ${o}`),t(r)}).end()}catch(n){e.debug(`${Kn} - Error ${n}`),t(r)}})}async function Zl(e){let t={...e,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:e.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:e.getAllProjectFiles||(()=>Promise.resolve([]))},r=e.getFrameworks().map(s=>s.name).join(", ");t.debug(`create devtools ${bh} [${r}]`);let n=await XP(t);return t.devToolsServerUrl=n.url,t.port=n.port,{getUrl:()=>t.devToolsServerUrl}}var bh=Xt;0&&(module.exports={createDevToolsServer,version});
1766
+ OPEN: ${(0,Vn.dim)(d)}`),n=hh(),n.start(`Waiting for ${e.name} authentication`),await gh(d);let h=await o;return n&&n.stop(`Authenticated with ${e.name} successfully`),h}catch(p){throw n&&(n.stop(`Failed to authenticate with ${e.name}.`,-1),Jl("auth")),e.sys.Sentry?.captureException(p),u(),p}finally{u()}}async function YP(e,t,r,n){try{if(!e)return Ai(r,n,400,"Builder context closed");let o=h4(r);if(o.pathname===kc){if(r.method==="POST"){let s=await m4(r);if(s)try{let i=await Yh(e,JSON.parse(s));return JP(r,n,200,i)}catch(i){e.debug("Dev API Error",i.stack||i.message||i);let a={errors:[String(i.message||i)]};return JP(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},i=r.headers.origin;i&&i!=="null"?QP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return Ai(r,n,405,`${kc} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(o.pathname===Ic)return p4(r,n,200,await Qh(e));if(o.pathname===Sh){let s=o.searchParams.get($c);return s?f4(n,302,await rg(e,s)):Ai(r,n,400,`Missing ${$c} querystring`)}if(o.pathname===qn)return d4(r,n,200,await Xh(e));if(o.pathname===Eh){await ts(e,{_:[]},{});let s=await UP(e),{figmaBuilderLinks:i,diagnostics:a}=await HP({mappingFiles:s,sys:e});return ga(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:i,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return o.pathname===Kn?(e.debug(`Close Dev Tools Server Requested: ${o.href}`),setTimeout(()=>{try{t.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),Ai(r,n,200,"Closing Dev Tools Server")):Ai(r,n,404,"Not found")}catch(o){return e?.Sentry?.captureException(o),Ai(r,n,500,`Dev Server Error: ${o}`)}}function JP(e,t,r,n){ga(e,t,r,"application/json",JSON.stringify(n))}function p4(e,t,r,n){ga(e,t,r,"application/javascript",n)}function d4(e,t,r,n){ga(e,t,r,"text/html",n)}function Ai(e,t,r,n){ga(e,t,r,"text/plain",n)}function ga(e,t,r,n,o){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":Xt},i=e.headers.origin;i&&i!=="null"?QP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",t.writeHead(r,s),t.end(o)}function QP(e){return e.hostname==="localhost"||e.origin==="https://builder.io"||e.origin==="https://www.builder.io"||e.origin.endsWith(".builder.io")?!0:e.port===""?!1:e.port!=="80"&&e.port!=="443"}function f4(e,t,r){e.writeHead(t,{Location:r}),e.end()}async function m4(e){let t="";for await(let r of e)t+=r;return t}function h4(e){let t=e.url||"/";return new URL(t,`http://${e.headers.host}`)}async function XP(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let t=await g4(e),r=(0,Fc.createServer)((o,s)=>{YP(e,r,o,s)}),n=()=>new Promise((o,s)=>{r.listening?(e.debug(`closing devtools server on port ${t}`),r.close(i=>{e=null,i?(e.debug(`error closing devtools server on port ${t}`),s(i)):(e&&e.debug(`closed devtools server on port ${t}`),o())})):(e.debug(`devtools server on port ${t} not listening`),o())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${t}`).href,port:t,setContext:o=>{e.debug(`set devtools context on server ${t}`),e=o},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(o=>{r.listen(t,()=>{e.debug(`started devtools server on port ${t}`),o(globalThis.__builderDevToolsServer)})})}function g4(e){return new Promise(t=>{let r=e.port;try{(0,Fc.request)({hostname:"localhost",port:r,path:Kn,method:"GET"},o=>{o.on("end",()=>{e.debug(`${Kn} - Response ended`),t(r)})}).on("error",o=>{e.debug(`${Kn} - No response ${o}`),t(r)}).end()}catch(n){e.debug(`${Kn} - Error ${n}`),t(r)}})}async function Zl(e){let t={...e,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:e.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:e.getAllProjectFiles||(()=>Promise.resolve([]))},r=e.getFrameworks().map(s=>s.name).join(", ");t.debug(`create devtools ${bh} [${r}]`);let n=await XP(t);return t.devToolsServerUrl=n.url,t.port=n.port,{getUrl:()=>t.devToolsServerUrl}}var bh=Xt;0&&(module.exports={createDevToolsServer,version});
1767
1767
  /*! Bundled license information:
1768
1768
 
1769
1769
  is-number/index.js: